// JavaScript Document

   $(document).ready(function(){
     
	 
		var getPrevLink  = $("#navSelected").parent().prev().children().attr("href");
		var getNextLink  = $("#navSelected").parent().next().children().attr("href");
		
		$(".linkPortRight").attr("href", getNextLink);
		$(".linkPortLeft").attr("href", getPrevLink);
		
	 
	$(document).ready(function(){
		$("#content").hide().fadeIn("slow").animate({opacity: 1}, 400);
	 	$(".homeBg").hide().fadeIn("slow").animate({opacity: 1}, 800);
		$("#footerCover").fadeOut(3800);
		<!-- $(".linkLogoInt").hide().fadeIn("slow").animate({opacity: 1}, 200); -->
		$(".homeBox1").hide().animate({opacity: 0.01}, 300).fadeIn("slow").animate({opacity: 0.7}, 800);
		$(".homeBox2").hide().animate({opacity: 0.01}, 800).fadeIn("slow").animate({opacity: 0.8}, 800);
		$(".homeBox2 h12").hide().animate({opacity: 0.01}, 800).fadeIn("slow").animate({opacity: 1}, 800);
		
		$(".imgBox11").hide().fadeIn("slow").animate({opacity: 1}, 800).fadeIn("slow");
		$(".imgBox1").hide().animate({opacity: 0.01}, 600).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBoxSmall").hide().animate({opacity: 0.01}, 1100).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBox2").hide().animate({opacity: 0.01}, 3000).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBox3").hide().animate({opacity: 0.01}, 5000).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBox4").hide().animate({opacity: 0.01}, 7000).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBox6").hide().animate({opacity: 0.01}, 5700).fadeIn("slow").animate({opacity: 1}, 800);
		$(".imgBox5").hide().animate({opacity: 0.01}, 5000).fadeIn("slow").animate({opacity: 1}, 800);
		
		$(".brandsBox1").hide().animate({opacity: 0.01}, 400).fadeIn("slow").animate({opacity: 1}, 800);
		$(".brandsBox2").hide().animate({opacity: 0.01}, 1000).fadeIn("slow").animate({opacity: 1}, 800);
		$(".brandsBox3").hide().animate({opacity: 0.01}, 1600).fadeIn("slow").animate({opacity: 1}, 800);
		$(".brandsBox4").hide().animate({opacity: 0.01}, 2000).fadeIn("slow").animate({opacity: 1}, 800);
		
		$(".brandsBox5").hide().animate({opacity: 0.01}, 400).fadeIn("slow").animate({opacity: 1}, 800);
		$(".brandsBox6").hide().animate({opacity: 0.01}, 1000).fadeIn("slow").animate({opacity: 1}, 800);
		$(".brandsBox7").hide().animate({opacity: 0.01}, 1600).fadeIn("slow").animate({opacity: 1}, 800);
		
		$(".textHide1").animate({opacity: 1}, 1500).animate({opacity: 0}, 1700).fadeOut();
		$(".textHide2").animate({opacity: 1}, 2000).animate({opacity: 0}, 1700).fadeOut();
		$(".textHide3").animate({opacity: 1}, 2000).animate({opacity: 0}, 1700).fadeOut();
		$(".brandTextHide1").animate({opacity: 1}, 2600).animate({opacity: 0}, 1700).fadeOut();
		$(".brandTextHide2").animate({opacity: 1}, 3100).animate({opacity: 0}, 1700).fadeOut();
		<!-- $(".textBox").hide().animate({opacity: 0.01}, 1000).fadeIn("slow").animate({opacity: 1}, 1000);-->
	 	});
		
		$(".linkPortLeft").click(function(){
			timerPrev();
			fadeOut();
		});
		$(".linkPortRight").click(function(){
			timerNext();
			fadeOut();
		});
		$(".linkHome").click(function(){
			timerIndex();
			fadeOut();
		});
		$(".linkHomeGlobal").click(function(){
			timerGlobal();
			fadeOut();
		});
		
		$(".linkIndex").click(function(){
			timerHome();
			fadeOut();
		});
		$(".btnAbout").click(function(){
			timerAbout();
			fadeOut();
		});
		
		$(".btnNews").click(function(){
			timerNews();
			fadeOut();
		});
		$(".btnContact").click(function(){
			timerContact();
			fadeOut();
		});
		
		$(".link1").click(function(){
			timer1();
			fadeOut();
		});
		$(".link2").click(function(){
			timer2();
			fadeOut();
		});
		$(".link3").click(function(){
			timer3();
			fadeOut();
		});
		$(".link4").click(function(){
			timer4();
			fadeOut();
		});
		$(".link5").click(function(){
			timer5();
			fadeOut();
		});
		$(".link6").click(function(){
			timer6();
			fadeOut();
		});
		$(".link7").click(function(){
			timer7();
			fadeOut();
		});
		
		$("a").click(function(){
			return false;
		});
				
	 });
	 
	 function fadeOut(){
			$("#content").fadeOut("slow");
			$(".homeBg").fadeOut("slow");
			$(".homeBox1").fadeOut("slow");
			$(".homeBox2").fadeOut("slow");
			$(".homeBox2 h12").fadeOut("slow");
			<!-- $(".linkLogoInt").fadeOut("slow"); -->
			
			$(".imgBox11").fadeOut("slow");
			$(".imgBox1").fadeOut("fast");
			$(".imgBox2").fadeOut("slow");
			$(".imgBox3").fadeOut("slow");
			$(".imgBox4").fadeOut("slow");
			$(".imgBox6").fadeOut("slow");
			$(".imgBox5").fadeOut("slow");
			
			$(".imgNappyWrap").fadeOut("slow");
			$(".badge").fadeOut("slow");
			$(".tablwareImg").fadeOut("slow");
			
			$(".brandsBox5").fadeOut("slow");
			$(".brandsBox6").fadeOut("slow");
			$(".brandsBox7").fadeOut("slow");
			
			$(".textHide1").animate({opacity: 1}, 500);
			$(".textHide2").animate({opacity: 1}, 500);
		}
		
	
	function timerPrev() {
		window.location.href = getPrevLink;
		}
	 function timerNext() {
		window.location.href = getNextLink;
		}
	
	function timerHome() {
		var time = window.setTimeout("location.href = 'http://www.wsdv.co.uk/'", 500);
		}
	function timerIndex() {
		var time = window.setTimeout("location.href = 'index.php'", 500);
		}
	function timerGlobal() {
		var time = window.setTimeout("location.href = 'http://www.wsdv.com'", 500);
		}
	 function timerAbout() {
		var time = window.setTimeout("location.href = 'about.php'", 500);
		}
	 function timerNews() {
		var time = window.setTimeout("location.href = 'news.php'", 500);
		}
	 function timerContact() {
		var time = window.setTimeout("location.href = 'contact.php'", 500);
		}
	 function timer1() {
		var time = window.setTimeout("location.href = 'contents.php'", 500);
		}
	 function timer2() {
		var time = window.setTimeout("location.href = 'plymouth.php'", 500);
		}
	 function timer3() {
		var time = window.setTimeout("location.href = 'chivas.php'", 500);
		}
	 function timer4() {
		var time = window.setTimeout("location.href = 'ivan.php'", 500);
		}
	 function timer5() {
		var time = window.setTimeout("location.href = 'wines.php'", 500);
		}
	 function timer6() {
		var time = window.setTimeout("location.href = 'wines-cube.php'", 500);
		}
	 function timer7() {
		var time = window.setTimeout("location.href = 'sam-adams.php'", 500);
		}
	 	 