function createHeroBlock(a){if(jQuery){var b={wrapper:$("#hero_wrapper"),page:window.location.hash,hash:new Array,urlVars:new Array,getUrlVars:function(){var a=this;var b=new Array;var c=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var d=0;d<c.length;d++){a.hash=c[d].split("=");b.push(a.hash[0]);b[a.hash[0]]=a.hash[1]}a.urlVars=b},selectTab:function(a){$(a).siblings().each(function(){$(this).removeClass("hero_tab_active");$("#"+this.id+"_content").hide()});$(a).addClass("hero_tab_active");$("#"+a.attr("id")+"_content").fadeIn(400);var b=a.attr("id").substr(8,1);window.location.hash="product"+b},rotations:0,setRotations:function(){var b=this;if(a.rotations){b.rotations=a.rotations}},runCarousel:true,carouselTimeout:0,setCarouselTimeout:function(){var b=this;if(a.timeout){b.carouselTimeout=a.timeout}},startCarousel:function(){var a,b;a=this;b=0;for(i=0;i<a.rotations;i++){setTimeout(function(){if(a.runCarousel==true){if($(".hero_tab_active").next().val()!=undefined){a.selectTab($(".hero_tab_active").next())}else{a.selectTab($("#hero_tab1"))}}},a.carouselTimeout*(i+1))}},init:function(){var a=this;a.setRotations();a.setCarouselTimeout();a.getUrlVars();$(a.wrapper).bind("click",function(){a.runCarousel=false});$(a.wrapper).find("select").bind("focus",function(){a.runCarousel=false});$(".nonjs_product_link").click(function(b){a.selectTab($(b.currentTarget).parent());a.runCarousel=false;return false});$(".hero_tab").bind("click",function(b){a.selectTab($(b.currentTarget));a.runCarousel=false});if(typeof a.urlVars["submit_from"]=="string"){switch(a.urlVars["submit_from"]){case"growupForm":$("#hero_tab2").click();break;case"termForm":$("#hero_tab3").click();break;default:$("#hero_tab1").click();break}}else if(a.page&&typeof a.urlVars["submit_from"]=="undefined"){switch(a.page){case"#product2":a.selectTab($("#hero_tab2"));break;case"#product3":a.selectTab($("#hero_tab3"));break;default:a.selectTab($("#hero_tab1"));break}}else{a.startCarousel()}}};b.init()}else{var b="error"}return b}
