function powerLeagueBanner(){$("#banner-powerleague").show();$("#player1").animate({marginTop:"0"},{duration:500});$("#player2").delay(600).animate({marginTop:"0"},{duration:500});$("#player3").delay(300).animate({marginTop:"0"},{duration:500});$("#pl-heading").delay(900).fadeIn();$("#pl-body").delay(1000).fadeIn();$(".find-out-more").delay(1100).fadeIn()}function powerLeagueBannerReset(){$("#banner-powerleague").hide();$("#player1").css({marginTop:318});$("#player2").css({marginTop:318});$("#player3").css({marginTop:318});$("#pl-heading").hide();$("#pl-body").hide();$(".find-out-more").hide()}function bobTheBuilderBanner(){$("#banner-bobthebuilder").show();$("#bob-logo").delay(1200).animate({marginTop:"0"},{duration:500});$("#bob").delay(800).animate({marginBottom:"0"},{duration:500});$("#bottle1").animate({marginBottom:"0",right:"320"},{duration:500});$("#bottle2").delay(300).animate({marginBottom:"0",right:"199"},{duration:500});$("#bob-heading").delay(1400).fadeIn();$("#bob-body").delay(1500).fadeIn();$("#bob-fom").delay(1600).fadeIn()}function bobTheBuilderBannerReset(){$("#banner-bobthebuilder").hide();$("#bob-logo").css({marginTop:-192});$("#bob").css({marginBottom:-318});$("#bottle1").css({marginBottom:-305,right:220});$("#bottle2").css({marginBottom:-153,right:119});$("#bob-heading, #bob-body, #bob-fom").hide()}function cookingMarvBanner(){$("#banner-cookingmarv").show();$("#blue1").delay(300).animate({marginBottom:"0"},{duration:100});$("#blue2").delay(600).animate({marginBottom:"0"},{duration:100});$("#white1").delay(1050).animate({marginBottom:"0"},{duration:100});$("#white2").animate({marginBottom:"0"},{duration:100});$("#pink1").delay(950).animate({marginBottom:"0"},{duration:100});$("#green1").delay(800).animate({marginBottom:"0"},{duration:100});$("#ckm-bird").delay(1300).animate({marginBottom:"0"},{duration:500});$("#ckm-heading").delay(1900).fadeIn();$("#ckm-body").delay(2000).fadeIn();$(".find-out-more").delay(2100).fadeIn()}function cookingMarvBannerReset(){$("#blue1").css({marginBottom:-177});$("#blue2").css({marginBottom:-169});$("#white1").css({marginBottom:-158});$("#white2").css({marginBottom:-248});$("#pink1").css({marginBottom:-162});$("#green1").css({marginBottom:-90});$("#ckm-bird").css({marginBottom:-318});$("#ckm-heading").hide();$("#ckm-body").hide();$("#banner-cookingmarv").hide()}(function(a){a.fn.tabSlideOut=function(l){var e=a.extend({tabHandle:".handle",speed:300,action:"click",tabLocation:"left",topPos:"200px",leftPos:"20px",fixedPosition:false,positioning:"absolute",pathToTabImage:null,imageHeight:null,imageWidth:null,onLoadSlideOut:false},l||{});e.tabHandle=a(e.tabHandle);var f=this;if(e.fixedPosition===true){e.positioning="fixed"}else{e.positioning="absolute"}if(document.all&&!window.opera&&!window.XMLHttpRequest){e.positioning="absolute"}if(e.pathToTabImage!=null){e.tabHandle.css({background:"url("+e.pathToTabImage+") no-repeat",width:e.imageWidth,height:e.imageHeight})}e.tabHandle.css({display:"block",textIndent:"-99999px",outline:"none",position:"absolute"});f.css({"line-height":"1",position:e.positioning});var j={containerWidth:parseInt(f.outerWidth(),10)+"px",containerHeight:parseInt(f.outerHeight(),10)+"px",tabWidth:parseInt(e.tabHandle.outerWidth(),10)+"px",tabHeight:parseInt(e.tabHandle.outerHeight(),10)+"px"};if(e.tabLocation==="top"||e.tabLocation==="bottom"){f.css({left:e.leftPos});e.tabHandle.css({right:0})}if(e.tabLocation==="top"){f.css({top:"-"+j.containerHeight});e.tabHandle.css({bottom:"-"+j.tabHeight})}if(e.tabLocation==="bottom"){f.css({bottom:"-"+j.containerHeight,position:"fixed"});e.tabHandle.css({top:"-"+j.tabHeight})}if(e.tabLocation==="left"||e.tabLocation==="right"){f.css({height:j.containerHeight,top:e.topPos});e.tabHandle.css({top:0})}if(e.tabLocation==="left"){f.css({left:"-"+j.containerWidth});e.tabHandle.css({right:"-"+j.tabWidth})}if(e.tabLocation==="right"){f.css({right:"-"+j.containerWidth});e.tabHandle.css({left:"-"+j.tabWidth});a("html").css("overflow-x","hidden")}e.tabHandle.click(function(m){m.preventDefault()});var d=function(){if(e.tabLocation==="top"){f.animate({top:"-"+j.containerHeight},e.speed).removeClass("open")}else{if(e.tabLocation==="left"){f.animate({left:"-"+j.containerWidth},e.speed).removeClass("open")}else{if(e.tabLocation==="right"){f.animate({right:"-"+j.containerWidth},e.speed).removeClass("open")}else{if(e.tabLocation==="bottom"){f.animate({bottom:"-"+j.containerHeight},e.speed).removeClass("open")}}}}};var g=function(){if(e.tabLocation=="top"){f.animate({top:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="left"){f.animate({left:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="right"){f.animate({right:"-3px"},e.speed).addClass("open")}else{if(e.tabLocation=="bottom"){f.animate({bottom:"-3px"},e.speed).addClass("open")}}}}};var c=function(){f.click(function(m){m.stopPropagation()});a(document).click(function(){d()})};var k=function(){e.tabHandle.click(function(m){if(f.hasClass("open")){d()}else{g()}});c()};var h=function(){f.hover(function(){g()},function(){d()});e.tabHandle.click(function(m){if(f.hasClass("open")){d()}});c()};var b=function(){d();setTimeout(g,500)};if(e.action==="click"){k()}if(e.action==="hover"){h()}if(e.onLoadSlideOut){b()}}})(jQuery);$(function(){$(".slide-out-div").tabSlideOut({tabHandle:".handle",pathToTabImage:"/cd-content/themes/clear/gui/text-say-hello.png",imageHeight:"144px",imageWidth:"38px",tabLocation:"right",speed:300,action:"click",topPos:"445px",leftPos:"20px",fixedPosition:false})});var currentBanner=0;var numBanners=2;var sceneTime=8500;var controlOff="/cd-content/themes/clear/gui/button-control-off.png";var controlOn="/cd-content/themes/clear/gui/button-control.png";function resetAllScenes(){powerLeagueBannerReset();cookingMarvBannerReset();bobTheBuilderBannerReset()}function updateScene(a){currentBanner=a;updateControls(a);resetAllScenes();switch(a){case 0:powerLeagueBanner();break;case 1:cookingMarvBanner();break;case 2:bobTheBuilderBanner();break;default:powerLeagueBanner();break}}function updateControls(a){$(".banner-control").attr("src",controlOff);$(".banner-control").eq(a).attr("src",controlOn)}function intervalChange(){var a=currentBanner+1;if(a>numBanners){a=0}updateScene(a)}function checkSignUp(){var b=$("#email_address").attr("value");var a=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;if(a.test(b)==false||b.length<5){alert("Please enter a valid email address");return false}return true}var t=setInterval(function(){intervalChange()},sceneTime);$("document").ready(function(){powerLeagueBanner();$(".cbox").colorbox({iframe:true,innerWidth:620,innerHeight:420});$(".banner-control").click(function(){updateScene(parseInt($(this).index()));clearInterval(t);t=setInterval(function(){intervalChange()},sceneTime)});$("#slideshow").cycle({fx:"scrollLeft"});$(".s-root-title").click(function(){var b="/cd-content/themes/clear/gui/";var a=$(this).find("img");if(a.attr("src").indexOf("-right.png")==-1){a.attr("src",b+"arrow-white-right.png")}else{a.attr("src",b+"arrow-white-down.png")}});$(".s-title").click(function(){$(this).siblings(".s-tab").toggle();$(this).siblings(".s-content").toggle()})});$(".work-item").mouseover(function(){$(".work-over").hide();$(this).find(".work-over").show()});$(".work-item").mouseout(function(){$(this).find(".work-over").hide()});var numSlides=$("#slideshow > img").length;if(parseInt(numSlides)>0&&$("#numSlides").length>0){var sep=" | ";var newString="";for(var i=1;i<=numSlides;i++){newString+='<span class="slide-control">'+i+"</span>";if(i<numSlides){newString+=sep}}$("#numSlides").html(newString)}$(".slide-control").click(function(){$("#slideshow").cycle($(this).index())});var panelOpen=false;var heightChanged=false;var iHeight=0;var oldHeight=0;$(".handle").click(function(){iHeight=parseInt($(".main").css("height").replace("str",""));panelOpen=!panelOpen;if(panelOpen){if(iHeight<750){oldHeight=iHeight;heightChanged=true;$(".main").css("height","750")}}else{if(heightChanged){heightChanged=false;$(".main").css("height",oldHeight)}}});$("#slideout-cover").show();
