﻿worship_window=null;function body_ready(){jQuery("#mycarousel").supersleight({shim:"/images/v2/x.gif"});jQuery("#ctl00_ctl00_cphMain_cphMain_mycarousel").jcarousel({wrap:"circular",scroll:1,easing:"easeinout",animation:1000,auto:5,start:1});setupslideshow();jQuery(".tab").each(function(){jQuery(this).bind("click",function(){var a=jQuery(this).attr("id").replace("tab","con");switch(a){case"conworship":openworshipwindow();break;case"concity":window.open("http://century.onthecity.org/plaza");break;default:showTabClick(a,jQuery(this).attr("id"));break;}});});}function openworshipwindow(){try{if(worship_window&&worship_window.open&&!worship_window.closed){worship_window.focus();}else{worship_window=window.open("resources/worshipmedia/","__cbcWorship","resizable=no,left=50,top=50,width=1100,height=800,toolbar=no,scrollbars=yes,location=no,menubar=no");if(!worship_window.opener){worship_window.opener=this.window;}worship_window.focus();if(!worship_window){alert("IsNull");}}}catch(a){alert("Exception: "+a);}}function setupslideshow(){jQuery(".jcarousel-clip-horizontal").css("margin-left",function(){var e=jQuery(window).width()/2;var d=parseFloat(jQuery(".jcarousel-item").css("width").replace(/^\D+/,""));var b=e-(d/2);b=d-(b%d);return -b;});var a=(jQuery(window).width()-jQuery(".jcarousel-item").width())/2;jQuery("#maskleft").width(a);jQuery("#maskright").width(a);jQuery("#maskright").offset({top:jQuery("#maskleft").offset().top,left:jQuery("#maskleft").width()+850});jQuery(".jcarousel-next-horizontal").css("right",a+"px");jQuery(".jcarousel-prev-horizontal").css("left",a+"px");}function showTabClick(b,a){jQuery("#"+a).toggleClass("tab-active");jQuery("#"+a).toggleClass("tab-inactive");jQuery("#"+a).unbind("click");jQuery(".tab").each(function(c,d){if(jQuery(d).attr("id")!=a){if(jQuery(d).attr("title")=="Collapse"){jQuery(d).trigger("click");}}});jQuery("#"+b).slideDown("slow",function(){jQuery.scrollTo({top:"100%",left:"0px"},1000);setupslideshow();});jQuery("#"+a).attr("title","Collapse");jQuery("#"+a).bind("click",function(){hideTabClick(b,a);});}function hideTabClick(b,a){jQuery("#"+a).toggleClass("tab-active");jQuery("#"+a).toggleClass("tab-inactive");jQuery("#"+a).unbind("click");jQuery("#"+b).slideUp("slow",setupslideshow);jQuery("#"+a).attr("title","Expand");jQuery("#"+a).bind("click",function(){showTabClick(b,a);});}
