// INIT MAIN DOC
jQuery(document).ready(function($) {
	// START POINT
	var posLeft = 2100 - (($(window).width() - 1000) / 2);
	var posTop = 1525 - (($(window).height() - 650) / 2);
	$.scrollTo( {top:posTop, left:posLeft}, 1 );
	
	// NAV
	$(function(){
	$('.nav a')
		.css( {backgroundPosition: "0px 12px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:100});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0px 12px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0px 12px"});
			}})
		})
	});
	
	$(function(){
	$('.gameNav a')
		.css( {backgroundPosition: "-12px 0px"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:100});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-12px 0px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "-12px 0px"});
			}})
		})
	});

	// CONTENT
	var contentPosLeft = ($(window).width() - 900) / 2;
	var contentPosTop = ($(window).height() - 535) / 2;
	
	$('.navToNews').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#newsWrap').fadeIn('slow');
		});
	});
	
	$('.navToInvolved').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#getInvolvedWrap').fadeIn('slow');
			$('.twitterFeed').html('<iframe src="twitterFeed.html" width="260" height="500" frameborder="0" scrolling="no"></iframe>');
		});
	});
	
	$('.navTo2009').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#baftas2009wrap').fadeIn('slow');
		});
	});
	
	$('.navToBAFTA').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#aboutBaftaWrap').fadeIn('slow');
		});
	});
	
	$('.navToGAME').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#aboutGameWrap').fadeIn('slow');
		});
	});
	
	$('.navToPrivacy').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#privacyWrap').fadeIn('slow');
		});
	});
	
	$('.navToTerms').click(function() {
		$('.contentFade').fadeIn('fast', function() {
			$('.contentPanelWrap').css({top: contentPosTop, left: contentPosLeft});
			$('#termsWrap').fadeIn('slow');
		});
	});
	
	$('.contentClose').click(function() {
		$('.contentPanelWrap').fadeOut('fast', function() {
			$('.contentFade').fadeOut('slow');
		});
	});
	
	// OTHER CONTENT STUFFS
	$('#privacyNext').click(function() {
		$('.privacy_policy').animate({'top': '-=500px'}, 500, function() {
			$('#privacyNext').css('display', 'none');
			$('#privacyPrev').css('display', 'block');
		});
	});
	$('#privacyPrev').click(function() {
		$('.privacy_policy').animate({'top': '0'}, 500, function() {
			$('#privacyNext').css('display', 'block');
			$('#privacyPrev').css('display', 'none');
		});
	});
	
	/*
	$('#termsNext').click(function() {
		$('.termsCond').animate({'top': '-=500px'}, 500, function() {
			$('#termsNext').css('display', 'none');
			$('#termsPrev').css('display', 'block');
		});
	});
	$('#termsPrev').click(function() {
		$('.termsCond').animate({'top': '0'}, 500, function() {
			$('#termsNext').css('display', 'block');
			$('#termsPrev').css('display', 'none');
		});
	});	
	*/
	
			$('#termsPrev').click(function(){
				var vidPlistPos = ($(".termsCond").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$(".termsCond").animate({'top': '+=500px'}, 'fast');
				} else { 
					$(".termsCond").animate({'top': '0px'});
				};
			});
			$('#termsNext').click(function(){
				var vidPlistPos = ($(".termsCond").position().top)*-1;
				var vidPlistPosPos = $(".termsCond").position().top;
				if (vidPlistPos >= 1000) {
					$(".termsCond").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$(".termsCond").animate({'top': '-=500px'}, 'fast');
				};
			});	
	
	
	// ACCORDION
    accOpen = 775;
    accClosed = 30;	
	
	accCurrent01 = $(".a1");
    $(".accordion01 li div.accPanelWrap").click(function() {
        $(accCurrent01).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent01 = this;
	});
	accCurrent02 = $(".a2");
    $(".accordion02 li div.accPanelWrap").click(function() {
        $(accCurrent02).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent02 = this;
	});
	accCurrent03 = $(".a3");
    $(".accordion03 li div.accPanelWrap").click(function() {
        $(accCurrent03).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent03 = this;
	});
	accCurrent04 = $(".a4");
    $(".accordion04 li div.accPanelWrap").click(function() {
        $(accCurrent04).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent04 = this;
	});
	accCurrent05 = $(".a5");
    $(".accordion05 li div.accPanelWrap").click(function() {
        $(accCurrent05).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent05 = this;
	});
	accCurrent06 = $(".a6");
    $(".accordion06 li div.accPanelWrap").click(function() {
        $(accCurrent06).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent06 = this;
	});
	accCurrent07 = $(".a7");
    $(".accordion07 li div.accPanelWrap").click(function() {
        $(accCurrent07).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent07 = this;
	});
	accCurrent08 = $(".a8");
    $(".accordion08 li div.accPanelWrap").click(function() {
        $(accCurrent08).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent08 = this;
	});
	accCurrent09 = $(".a9");
    $(".accordion09 li div.accPanelWrap").click(function() {
        $(accCurrent09).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent09 = this;
	});
	accCurrent10 = $(".a10");
    $(".accordion10 li div.accPanelWrap").click(function() {
        $(accCurrent10).animate({width: accClosed+"px"}, { queue:false, duration:400 });
		$(this).animate({width: accOpen+"px"}, { queue:false, duration:400});
		accCurrent10 = this;
	});

	
	// MAIN FADE
	$('.landingFade').click(function() {
		$('.mainFade').fadeOut('slow', function() {
  			$('.mainFade').css({display: "none"});
		});
	});

	// MAIN NAV
	$('.navtoLAND').click(function() {
		var panelTop = 1525 - (($(window).height() - 650) / 2);
		var panelLeft = 2100 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			$('.bgWrap').fadeOut(400);
	});
	
	$('.navto01').click(function() {
		var panelTop = 236 - (($(window).height() - 650) / 2);
		var panelLeft = 376 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true});
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");

			// ADD SMOKE IMAGE
			$('.bops_smokeFadeWrap').css("zIndex", "720");		
			$('.bops_smokeFade').html('<img src="../images/panelsBG/BOPS/smokeFade.png" alt="" />').animate({'left': '-1517px'}, 50000).animate({'left': '0px'}, 50000);

			// SET THE FADES AND POSITIONS
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_bops').fadeIn(1000);

			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#bops_accPanelWrap').click(function() {
		$('#bops_videoWrap').html('<iframe src="http://embed.buto.tv/v6KdQ" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#bops_accPanelWrap_screens').click(function() {
		$('#slider01').html('<img src="../images/screens/BOPS/01.jpg" alt=" "  /><img src="../images/screens/BOPS/02.jpg" alt=" "  /><img src="../images/screens/BOPS/03.jpg" alt=" "  /><img src="../images/screens/BOPS/04.jpg" alt=" "  /><img src="../images/screens/BOPS/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev01').click(function(){
				var vidPlistPos = ($("#slider01").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider01").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider01").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext01').click(function(){
				var vidPlistPos = ($("#slider01").position().top)*-1;
				var vidPlistPosPos = $("#slider01").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider01").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider01").animate({'top': '-=500px'}, 'fast');
				};
			});	



	
	$('.navto02').click(function() {
		var panelTop = 1081 - (($(window).height() - 650) / 2);
		var panelLeft = 736 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// THIS PANEL
			function dcGlow(){
				var randomnumber3 = Math.floor(2000 - (Math.random()*1000));
				$('.bgGlow').html('<img src="../images/panelsBG/DC/bgGlow.png" alt="" />').fadeOut(randomnumber3).fadeIn(randomnumber3, function(){
						dcGlow();
					});
				}
			dcGlow();

			
			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_dc').fadeIn(1000);
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#dc_accPanelWrap').click(function() {
		$('#dc_videoWrap').html('<iframe src="http://embed.buto.tv/h25F4" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#dc_accPanelWrap_screens').click(function() {
		$('#slider02').html('<img src="../images/screens/DC/01.jpg" alt=" "  /><img src="../images/screens/DC/02.jpg" alt=" "  /><img src="../images/screens/DC/03.jpg" alt=" "  /><img src="../images/screens/DC/04.jpg" alt=" "  /><img src="../images/screens/DC/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev02').click(function(){
				var vidPlistPos = ($("#slider02").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider02").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider02").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext02').click(function(){
				var vidPlistPos = ($("#slider02").position().top)*-1;
				var vidPlistPosPos = $("#slider02").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider02").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider02").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto03').click(function() {
		var panelTop = 1923 - (($(window).height() - 650) / 2);
		var panelLeft = 416 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// THIS PANEL ANI
			$('.static_fifa').animate({"left": "700px"}, 40000);
			
			// SET THE FADES AND POSITIONS
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_fifa').fadeIn(1000);
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#fifa_accPanelWrap').click(function() {
		$('#fifa_videoWrap').html('<iframe src="http://embed.buto.tv/y8Kbb" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#fifa_accPanelWrap_screens').click(function() {
		$('#slider03').html('<img src="../images/screens/FIFA/01.jpg" alt=" "  /><img src="../images/screens/FIFA/02.jpg" alt=" "  /><img src="../images/screens/FIFA/03.jpg" alt=" "  /><img src="../images/screens/FIFA/04.jpg" alt=" "  /><img src="../images/screens/FIFA/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev03').click(function(){
				var vidPlistPos = ($("#slider03").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider03").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider03").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext03').click(function(){
				var vidPlistPos = ($("#slider03").position().top)*-1;
				var vidPlistPosPos = $("#slider03").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider03").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider03").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto04').click(function() {
		var panelTop = 2798 - (($(window).height() - 650) / 2);
		var panelLeft = 916 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// THIS PANEL
			$('.dust').html('<img src="../images/panelsBG/HALO/dust.png" alt="" />').animate({'left': '-1355px'}, 40000).animate({'left': '0px'}, 40000);

			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_halo').fadeIn(1000);
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#halo_accPanelWrap').click(function() {
		$('#halo_videoWrap').html('<iframe src="http://embed.buto.tv/gJ2vH" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#halo_accPanelWrap_screens').click(function() {
		$('#slider04').html('<img src="../images/screens/HALO/01.jpg" alt=" "  /><img src="../images/screens/HALO/02.jpg" alt=" "  /><img src="../images/screens/HALO/03.jpg" alt=" "  /><img src="../images/screens/HALO/04.jpg" alt=" "  /><img src="../images/screens/HALO/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev04').click(function(){
				var vidPlistPos = ($("#slider04").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider04").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider04").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext04').click(function(){
				var vidPlistPos = ($("#slider04").position().top)*-1;
				var vidPlistPosPos = $("#slider04").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider04").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider04").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto05').click(function() {
		var panelTop = 645 - (($(window).height() - 650) / 2);
		var panelLeft = 1916 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.bulletHole').css("display", "none");
			
			// THIS PANEL ANI
			$('.static_hr').animate({"left": "1439px"}, 1000);

			// SET THE FADES AND POSITIONS
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_hr').fadeIn(1000);
			
			// THIS PANEL
			
			
			var randomTime = Math.floor(Math.random()*1000);
			window.setInterval(function(){
				function dripDrip(){
					var randomDripPosX = Math.floor(Math.random()*1657);
					var randomDripPosY = Math.floor(Math.random()*1000);
					var randomID = Math.floor(Math.random()*100);
					$('.dripCont').append('<div class="drip classRandom_' + randomID + '" style="top:' + randomDripPosX + 'px; left:' + randomDripPosY + 'px;"></div>');
					$('.classRandom_' + randomID).fadeOut(600, function() {
						$(this).remove();
					});		
					}
				dripDrip();	
			}, randomTime);
			
			var randomTime2 = Math.floor(Math.random()*900);
			window.setInterval(function(){
				function dripDrip(){
					var randomDripPosX = Math.floor(Math.random()*1657);
					var randomDripPosY = Math.floor(Math.random()*1000);
					var randomID = Math.floor(Math.random()*100);
					$('.dripCont2').append('<div class="drip2 classRandom_' + randomID + '" style="top:' + randomDripPosX + 'px; left:' + randomDripPosY + 'px;"></div>');
					$('.classRandom_' + randomID).fadeOut(400, function() {
						$(this).remove();
					});		
					}
				dripDrip();	
			}, randomTime2);
			
			
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#hr_accPanelWrap').click(function() {
		$('#hr_videoWrap').html('<iframe src="http://embed.buto.tv/tjpng" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#hr_accPanelWrap_screens').click(function() {
		$('#slider05').html('<img src="../images/screens/HR/01.jpg" alt=" "  /><img src="../images/screens/HR/02.jpg" alt=" "  /><img src="../images/screens/HR/03.jpg" alt=" "  /><img src="../images/screens/HR/04.jpg" alt=" "  /><img src="../images/screens/HR/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev05').click(function(){
				var vidPlistPos = ($("#slider05").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider05").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider05").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext05').click(function(){
				var vidPlistPos = ($("#slider05").position().top)*-1;
				var vidPlistPosPos = $("#slider05").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider05").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider05").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto06').click(function() {
		var panelTop = 2379 - (($(window).height() - 650) / 2);
		var panelLeft = 2272 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// PANEL ANI

			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_limbo').fadeIn(1000);
			
			function limboGlow(){
				var randomnumber = Math.floor(Math.random()*701);
				$('.limboGlow').fadeOut(randomnumber).delay(randomnumber).fadeIn(randomnumber).delay(randomnumber).fadeOut(randomnumber).delay(randomnumber).fadeIn(randomnumber).fadeOut(randomnumber).animate({'display': 'none'}, 10, function(){
						limboGlow();
					});
				}
			limboGlow();
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#limbo_accPanelWrap').click(function() {
		$('#limbo_videoWrap').html('<iframe src="http://embed.buto.tv/hxK7C" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#limbo_accPanelWrap_screens').click(function() {
		$('#slider06').html('<img src="../images/screens/LIMBO/01.jpg" alt=" "  /><img src="../images/screens/LIMBO/02.jpg" alt=" "  /><img src="../images/screens/LIMBO/03.jpg" alt=" "  /><img src="../images/screens/LIMBO/04.jpg" alt=" "  /><img src="../images/screens/LIMBO/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev06').click(function(){
				var vidPlistPos = ($("#slider06").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider06").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider06").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext06').click(function(){
				var vidPlistPos = ($("#slider06").position().top)*-1;
				var vidPlistPosPos = $("#slider06").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider06").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider06").animate({'top': '-=500px'}, 'fast');
				};
			});	

			
	
	$('.navto07').click(function() {
		var panelTop = 431 - (($(window).height() - 650) / 2);
		var panelLeft = 3215 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");

			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_me2').fadeIn(1000);
			
			function me2lightning(){
				var randomnumber2 = Math.floor(Math.random()*300);
				$('.lightning_me2').fadeOut(randomnumber2).fadeIn(randomnumber2).delay(randomnumber2).fadeOut(randomnumber2).delay(randomnumber2).fadeIn(randomnumber2).fadeOut(randomnumber2).animate({'display': 'none'}, 10, function(){
						me2lightning();
					});
				}
			me2lightning();
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#me2_accPanelWrap').click(function() {
		$('#me2_videoWrap').html('<iframe src="http://embed.buto.tv/9DmJk" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#me2_accPanelWrap_screens').click(function() {
		$('#slider07').html('<img src="../images/screens/ME2/01.jpg" alt=" "  /><img src="../images/screens/ME2/02.jpg" alt=" "  /><img src="../images/screens/ME2/03.jpg" alt=" "  /><img src="../images/screens/ME2/04.jpg" alt=" "  /><img src="../images/screens/ME2/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev07').click(function(){
				var vidPlistPos = ($("#slider07").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider07").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider07").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext07').click(function(){
				var vidPlistPos = ($("#slider07").position().top)*-1;
				var vidPlistPosPos = $("#slider07").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider07").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider07").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto08').click(function() {
		var panelTop = 1273 - (($(window).height() - 650) / 2);
		var panelLeft = 3568 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// THIS PANEL
			$('.static_n4s').animate({"left": "4274px"}, 30000);
			$('.static2_n4s').animate({"top": "855px"}, 50000);

			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_n4s').fadeIn(1000);
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#n4s_accPanelWrap').click(function() {
		$('#n4s_videoWrap').html('<iframe src="http://embed.buto.tv/rJQ7r" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#n4s_accPanelWrap_screens').click(function() {
		$('#slider08').html('<img src="../images/screens/N4S/01.jpg" alt=" "  /><img src="../images/screens/N4S/02.jpg" alt=" "  /><img src="../images/screens/N4S/03.jpg" alt=" "  /><img src="../images/screens/N4S/04.jpg" alt=" "  /><img src="../images/screens/N4S/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev08').click(function(){
				var vidPlistPos = ($("#slider08").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider08").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider08").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext08').click(function(){
				var vidPlistPos = ($("#slider08").position().top)*-1;
				var vidPlistPosPos = $("#slider08").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider08").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider08").animate({'top': '-=500px'}, 'fast');
				};
			});	

	
	$('.navto09').click(function() {
		var panelTop = 2072 - (($(window).height() - 650) / 2);
		var panelLeft = 4032 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );
			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.bubbleYoshi').stop().animate({"top": "3171px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px"}, 400);
			$('.static2_n4s').stop().animate({"top": "1086px"}, 400);
			$('.dripCont').html(' ');
			
			// THIS PANEL
			/*
			$('.bhole01').delay(4000, function() {
				$(this).css("display", "block");
			});
			$('.bhole02').delay(5200, function() {
				$(this).css("display", "block");
			});
			$('.bhole03').delay(5600, function() {
				$(this).css("display", "block");
			});
			*/
			
			window.setTimeout(function(){ $('.bhole03').css("display", "block"); }, 3000);
			window.setTimeout(function(){ $('.bhole02').css("display", "block"); }, 3400);
			window.setTimeout(function(){ $('.bhole01').css("display", "block"); }, 3600);

			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_rdr').fadeIn(1000);
			
			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});
	$('#rdr_accPanelWrap').click(function() {
		$('#rdr_videoWrap').html('<iframe src="http://embed.buto.tv/XSrJg" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	// SCREENS
	$('#rdr_accPanelWrap_screens').click(function() {
		$('#slider09').html('<img src="../images/screens/RDR/01.jpg" alt=" "  /><img src="../images/screens/RDR/02.jpg" alt=" "  /><img src="../images/screens/RDR/03.jpg" alt=" "  /><img src="../images/screens/RDR/04.jpg" alt=" "  /><img src="../images/screens/RDR/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev09').click(function(){
				var vidPlistPos = ($("#slider09").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider09").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider09").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext09').click(function(){
				var vidPlistPos = ($("#slider09").position().top)*-1;
				var vidPlistPosPos = $("#slider09").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider09").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider09").animate({'top': '-=500px'}, 'fast');
				};
			});	
			
	
	$('.navto10').click(function() {
		var panelTop = 2897 - (($(window).height() - 650) / 2);
		var panelLeft = 3440 - (($(window).width() - 1000) / 2);
		$.scrollTo({top:panelTop, left:panelLeft}, 2000, {queue:true} );

			// SORT OUT REST OF VIEWPORT
			$('.static_hr').animate({"left": "2570px"}, 1000);
			$('.bops_smokeFadeWrap').css("zIndex", "500");
			$('.static_fifa').stop().animate({"left": "1157px"}, 400);
			$('.static_n4s').stop().animate({"left": "4151px", "top": "1180px"}, 400);
			$('.static2_n4s').stop().animate({"left": "4082px", "top": "1086px"}, 400);
			$('.dripCont').html(' ');
			$('.bulletHole').css("display", "none");
			
			// PANEL ANI
			$('.bubbleYoshi').animate({"top": "10px"}, 80000);
			// SET THE FADES OF VIEWPORT
			$('.bgWrap').fadeOut(400);
			$('#bgWrap_smg2').fadeIn(1000);

			// VIDEO
			$('.videoWrap').html('<img src="../images/videoLoading.jpg" alt="Loading..." />');
	});	
	$('#smg2_accPanelWrap').click(function() {
		$('#smg2_videoWrap').html('<iframe src="http://embed.buto.tv/2rZb5" width="730" height="408" frameborder="0" scrolling="no"></iframe>');
	});
	
	// SCREENS
	$('#smg2_accPanelWrap_screens').click(function() {
		$('#slider10').html('<img src="../images/screens/SMG2/01.jpg" alt=" "  /><img src="../images/screens/SMG2/02.jpg" alt=" "  /><img src="../images/screens/SMG2/03.jpg" alt=" "  /><img src="../images/screens/SMG2/04.jpg" alt=" "  /><img src="../images/screens/SMG2/05.jpg" alt=" "  />');
	});
	// CAROUSEL PREV
			$('#screensPrev10').click(function(){
				var vidPlistPos = ($("#slider10").position().top) *-1;
				if ((vidPlistPos - 1) >= 0) {
					$("#slider10").animate({'top': '+=500px'}, 'fast');
				} else { 
					$("#slider10").animate({'top': '0px'});
				};
			});
			// CAROUSEL NEXT
			$('#screensNext10').click(function(){
				var vidPlistPos = ($("#slider10").position().top)*-1;
				var vidPlistPosPos = $("#slider10").position().top;
				if (vidPlistPos >= 2000) {
					$("#slider10").animate({'top': vidPlistPosPos + 'px'});
				} else {
					$("#slider10").animate({'top': '-=500px'}, 'fast');
				};
			});	
	
});


window.setInterval(function(){
	var winWidth = $(window).width();
	var winHeight = $(window).height();
	if ((winWidth >= 800) && (winHeight >= 800)) {
		$('body').css("overflow", "hidden");
	} else {
		$('body').css("overflow", "visible");
	}
}, 1);
