﻿$(document).ready(function (){
    var p = $('#specialsInner a').length;
    var j = $('#specialsInner a').innerWidth();
    var t = p * j;
    $('#specialsInner').css({width: t});    
    
    		

			//Set css in Firefox (Required to use the backgroundPosition js)
			$('.shutter1').css({backgroundPosition: '0px 0px'});
			$('.shutter2').css({backgroundPosition: '0px 0px'});
			$('.shutter3').css({backgroundPosition: '0px 0px'});
			$('.shutter4').css({backgroundPosition: '0px 0px'});

			//Animate the shutter  
			$("#coachWeekendSlider .link").hover(function(){
			      $(this).parent().stop().animate({backgroundPosition: '(0px -152px)'}, 600 );
			    }, function() {
			      $(this).parent().stop().animate({backgroundPosition: '(0px 0px)'}, 500 );
			});
			$("#cheapWeekSlider .link").hover(function(){
			      $(this).parent().stop().animate({backgroundPosition: '(0px -160px)'}, 600 );
			    }, function() {
			      $(this).parent().stop().animate({backgroundPosition: '(0px 0px)'}, 500 );
			});
			$("#flightWeekendSlider .link").hover(function(){
			      $(this).parent().stop().animate({backgroundPosition: '(0px -233px)'}, 650 );
			    }, function() {
			      $(this).parent().stop().animate({backgroundPosition: '(0px 0px)'}, 550 );
			});
			$("#flyDriveSlider .link").hover(function(){
			      $(this).parent().stop().animate({backgroundPosition: '(0px -280px)'}, 750 );
			    }, function() {
			      $(this).parent().stop().animate({backgroundPosition: '(0px 0px)'}, 620 );
			});
			
			
			
});
