﻿// JavaScript Document



$(document).ready(function() {

	

	$("#homeMenu ul li:last-child a").css("border-right", "0");

	$("#pageMenu ul li:last-child a").css("border-right", "0");

	

	$(".homeNavItem").css("opacity","0.4");

	

	$(".homeNavItem").hover(

	  function () {

		//$(this).fadeIn("fast");

		$(this).stop().animate({opacity: 1.0}, 200);

	  }, 

	  function () {

		//$(this).fadeOut();

		$(this).stop().animate({opacity: 0.4}, "slow");

	  }

	);

	

	$(function()

	{

		$('.scroll-pane').jScrollPane({verticalGutter: 15});

		$('.scroll-pane2').jScrollPane({verticalGutter: 15});

	});



	$(".filmStrip a").click(function(){

		template=$(this).attr('href');

		if (template.indexOf("?") == -1) {

			loadNews(template + '?overrideLayout=1');

		} else {

			loadNews(template + '&overrideLayout=1');	

		}

		return false;

	});



	function loadNews(template) {

		d = new Date();

		loadingGraphic = '<img src="https://assets.vin65.com/images/loading.gif">';

		

		$('.currentVideo').html(loadingGraphic);

		$.get(template + '&timestamp=' + d.getTime(), function(responseText)

		{

			$('.currentVideo').html(responseText);

		});



}





	

	

	

});
