function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore){selObj.selectedIndex=0}}function ddtabcontent(a){this.tabinterfaceid=a;this.tabs=document.getElementById(a).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.currentTabIndex=0;this.subcontentids=[];this.revcontentids=[];this.selectedClassTarget="link"}ddtabcontent.getCookie=function(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return""};ddtabcontent.setCookie=function(a,b){document.cookie=a+"="+b+";path=/"};ddtabcontent.prototype={expandit:function(a){this.cancelautorun();var b="";try{if(typeof a=="string"&&document.getElementById(a).getAttribute("rel")){b=document.getElementById(a)}else{if(parseInt(a)!=NaN&&this.tabs[a].getAttribute("rel")){b=this.tabs[a]}}}catch(c){alert("Invalid Tab ID or position entered!")}if(b!=""){this.expandtab(b)}},cycleit:function(b,a){if(b=="next"){var c=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0}else{if(b=="prev"){var c=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1}}if(typeof a=="undefined"){this.cancelautorun()}this.expandtab(this.tabs[this.hottabspositions[c]])},setpersist:function(a){this.enabletabpersistence=a},setselectedClassTarget:function(a){this.selectedClassTarget=a||"link"},getselectedClassTarget:function(a){return(this.selectedClassTarget==("linkparent".toLowerCase()))?a.parentNode:a},urlparamselect:function(b){var a=window.location.search.match(new RegExp(b+"=(\\d+)","i"));return(a==null)?null:parseInt(RegExp.$1)},expandtab:function(b){var c=b.getAttribute("rel");var d=(b.getAttribute("rev"))?","+b.getAttribute("rev").replace(/\s+/,"")+",":"";this.expandsubcontent(c);this.expandrevcontent(d);for(var a=0;a<this.tabs.length;a++){this.getselectedClassTarget(this.tabs[a]).className=(this.tabs[a].getAttribute("rel")==c)?"selected":""}if(this.enabletabpersistence){ddtabcontent.setCookie(this.tabinterfaceid,b.tabposition)}this.setcurrenttabindex(b.tabposition)},expandsubcontent:function(c){for(var b=0;b<this.subcontentids.length;b++){var a=document.getElementById(this.subcontentids[b]);a.style.display=(a.id==c)?"block":"none"}},expandrevcontent:function(c){var a=this.revcontentids;for(var b=0;b<a.length;b++){document.getElementById(a[b]).style.display=(c.indexOf(","+a[b]+",")!=-1)?"block":"none"}},setcurrenttabindex:function(a){for(var b=0;b<this.hottabspositions.length;b++){if(a==this.hottabspositions[b]){this.currentTabIndex=b;break}}},autorun:function(){this.cycleit("next",true)},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer)}},init:function(a){var e=ddtabcontent.getCookie(this.tabinterfaceid);var d=-1;var f=this.urlparamselect(this.tabinterfaceid);this.automodeperiod=a||0;for(var c=0;c<this.tabs.length;c++){this.tabs[c].tabposition=c;if(this.tabs[c].getAttribute("rel")){var b=this;this.hottabspositions[this.hottabspositions.length]=c;this.subcontentids[this.subcontentids.length]=this.tabs[c].getAttribute("rel");this.tabs[c].onclick=function(){b.expandtab(this);b.cancelautorun();return false};if(this.tabs[c].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[c].getAttribute("rev").split(/\s*,\s*/))}if(f==c||this.enabletabpersistence&&d==-1&&parseInt(e)==c||!this.enabletabpersistence&&d==-1&&this.getselectedClassTarget(this.tabs[c]).className=="selected"){d=c}}}if(d!=-1){this.expandtab(this.tabs[d])}else{this.expandtab(this.tabs[this.hottabspositions[0]])}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.autoruntimer=setInterval(function(){b.autorun()},this.automodeperiod)}}};$(document).ready(function(){$("a#options").click(function(){if(($(".layout_options")).is(":hidden")){$("#wrapper").fadeTo("fast",0.33);$(".layout_options").fadeIn("normal")}else{$("#wrapper").fadeTo("fast",1);$(".layout_options").fadeOut("normal")}});$("a#reset").click(function(){$(".cat-widget").each(function(){$.cookie($(this).attr("id"),null,{path:"/",expires:100});$(this).show()});$(".box_a").each(function(){$.cookie($(this).attr("id"),null,{path:"/",expires:100});$(this).show()});$(".widgets li").each(function(){$.cookie($(this).attr("id"),null,{path:"/",expires:100});$(this).show()});$(".layout_options").fadeOut("normal");$("#wrapper").fadeTo("fast",1)});$("#menu ul ul").hide(1e-39);$("#menu ul li a").addClass("nav_parent");$("#menu ul ul a").removeClass("nav_parent");$("#menu ul ul a").addClass("nav_child");$(".nav_parent").bind("mouseenter",function(){if(($(this).next().is("ul"))&&($(this).next().is(":visible"))){return false}else{if(($(this).next().is("ul"))&&($(this).next().is(":hidden"))){$(this).next().show();return false}}});$(".nav_parent").parent().bind("mouseleave",function(){$("#menu ul ul:visible").hide()});$(".minimize").click(function(){$(this).parent("h3").next(".container").toggle()});$(".Sminimize").click(function(){$(this).parent("h2").next().toggle()});$(".Wminimize").click(function(){$(this).parent("h2").next().toggle()});$(".close").click(function(){$(this).parent("h3").parent(".cat-widget").fadeOut("slow");$.cookie($(this).parent("h3").parent(".cat-widget").attr("id"),"closed",{path:"/",expires:100});return false});$(".Sclose").click(function(){$(this).parent("h2").parent().fadeOut("slow");$.cookie($(this).parent("h2").parent(".box_a").attr("id"),"closed",{path:"/",expires:100});return false});$(".Wclose").click(function(){$(this).parent("h2").parent().fadeOut("slow");$.cookie($(this).parent("h2").parent("li").attr("id"),"closed",{path:"/",expires:100});return false});$(".cat-widget").each(function(){var a=$(this).attr("id");if($.cookie(a)=="closed"){$(this).hide()}});$(".box_a").each(function(){var a=$(this).attr("id");if($.cookie(a)=="closed"){$(this).hide()}});$(".widgets li").each(function(){var a=$(this).attr("id");if($.cookie(a)=="closed"){$(this).hide()}});clearInput("#feedemail");$(".videothumb").bind("mouseenter",function(){$(this).children(".playit").children("a").fadeTo("fast",0.5);$(this).children(".playit").children("a").show();return false});$(".videothumb").bind("mouseleave",function(){$(this).children(".playit").children("a").hide();return false})});jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};
