$(document).ready(function(){
	
   function hideBanners() {
	 $("#BT-Vault").hide();
	 $("#BA-Carib").hide();
	 $("#BT-Vision").hide();
	 $("#BT-Contact").hide();
	 $("#HP-Deals").hide();
	 $("#Nike-Run").hide();
	 $("#Tesco-Green").hide();
	 $("#Veet-WaxCream").hide();
	 $("#Vodafone-Curve").hide();
   };	

	
   function scrollBannerlinks() {
     $.scrollTo( '#bannerlinks', 800);
   };


   $("#BA-Carib-link").click(function(){ 
	 hideBanners();
	 $("#workScroller").animate({height: 440 }, 400 );
	 $("#contentScroller").animate({height: 665 }, 400 );
	 $("#contentwrap").animate({height: 695 }, 400, function() {scrollBannerlinks()});
     $("#BA-Carib > h5").animate({opacity: 'show' }, 1500);     
	 $("#BA-Carib > object").animate({opacity: 'show' }, 1500);
	 $("#BA-Carib").show();
	 // Animating elements in separately, main div animation seems to cause text not fade in correctly,
	 // looks like text is waiting for flash to finish fade in, text appears white before going straight to 100%
	 return false;
   });

   
   $("#BT-Vision-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 440 }, 400 );
	 $("#contentScroller").animate({height: 665 }, 400 );
	 $("#contentwrap").animate({height: 695 }, 400, function() {scrollBannerlinks()});
     $("#BT-Vision > h5").animate({opacity: 'show' }, 1500);
	 $("#BT-Vision > object").animate({opacity: 'show' }, 1500);
	 $("#BT-Vision").show();
	 return false;
   });   

   
   $("#BT-Vault-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 980 }, 400 );
	 $("#contentScroller").animate({height: 1205 }, 400 );
	 $("#contentwrap").animate({height: 1235 }, 400, function() {scrollBannerlinks()});
     $("#BT-Vault > h5").animate({opacity: 'show' }, 1500);
	 $("#BT-Vault > object").animate({opacity: 'show' }, 1500);
	 $("#BT-Vault").show();
	 return false;
   }); 

   
   $("#BT-Contact-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 1010 }, 400 );
	 $("#contentScroller").animate({height: 1235 }, 400 );
	 $("#contentwrap").animate({height: 1265 }, 400, function() {scrollBannerlinks()});
	 $("#BT-Contact > h5").animate({opacity: 'show' }, 1500);
	 $("#BT-Contact > object").animate({opacity: 'show' }, 1500);
	 $("#BT-Contact").show();
	 return false;
   }); 

   
   $("#HP-Deals-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 1165 }, 400 );
	 $("#contentScroller").animate({height: 1390 }, 400 );
	 $("#contentwrap").animate({height: 1420 }, 400, function() {scrollBannerlinks()});
	 $("#HP-Deals > h5").animate({opacity: 'show' }, 1500);
	 $("#HP-Deals > object").animate({opacity: 'show' }, 1500);
	 $("#HP-Deals").show();
	 return false;
   });

   
   $("#Nike-Run-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 1125 }, 400 );
	 $("#contentScroller").animate({height: 1350 }, 400 );
	 $("#contentwrap").animate({height: 1380 }, 400, function() {scrollBannerlinks()});
	 $("#Nike-Run > h5").animate({opacity: 'show' }, 1500);
	 $("#Nike-Run > object").animate({opacity: 'show' }, 1500);
	 $("#Nike-Run").show();
	 return false;
   });

   
   $("#Tesco-Green-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 1125 }, 400 );
	 $("#contentScroller").animate({height: 1350 }, 400 );
	 $("#contentwrap").animate({height: 1380 }, 400, function() {scrollBannerlinks()});
	 $("#Tesco-Green > h5").animate({opacity: 'show' }, 1500);
	 $("#Tesco-Green > img").animate({opacity: 'show' }, 1500);
	 $("#Tesco-Green").show();
	 return false;
   });

   
   $("#Veet-WaxCream-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 785 }, 400 );
	 $("#contentScroller").animate({height: 1010 }, 400 );
	 $("#contentwrap").animate({height: 1040 }, 400, function() {scrollBannerlinks()});
	 $("#Veet-WaxCream > h5").animate({opacity: 'show' }, 1500);
	 $("#Veet-WaxCream > object").animate({opacity: 'show' }, 1500);
	 $("#Veet-WaxCream").show();
	 return false;
   }); 
   
   
   $("#Vodafone-Curve-link").click(function(){
	 hideBanners();
	 $("#workScroller").animate({height: 795 }, 400 );
	 $("#contentScroller").animate({height: 1020 }, 400 );
	 $("#contentwrap").animate({height: 1050 }, 400, function() {scrollBannerlinks()});
	 $("#Vodafone-Curve > h5").animate({opacity: 'show' }, 1500);
	 $("#Vodafone-Curve > object").animate({opacity: 'show' }, 1500);
	 $("#Vodafone-Curve").show();
	 return false;
   }); 
   
});
