$(document).ready(function(){var imgPath="/_res/images/home/";featureActive=0;featureLen=$("#content-feature li").size()-1;if($.browser.msie&&$.browser.version<7){$("#content-feature li:first-child").show();}
if(featureLen>0){$("#content-feature").append("<div id='feature-nav'></div>");$("#feature-nav").append("<a><img src='"+imgPath+"prev.gif' alt='' id='feature-prev' /></a>");$("#content-feature li").each(function(i){$(this).attr("id","feature"+i);if(i==0){$("#feature-nav").append("<img src='"+imgPath+"box-on.gif' alt='' id='feature-box"+i+"' class='feature-box' />");}
else{$("#feature-nav").append("<img src='"+imgPath+"box-off.gif' alt='' id='feature-box"+i+"' class='feature-box' />");}});$("#feature-nav").append("<a><img src='"+imgPath+"next.gif' alt='' id='feature-next' /></a>");$("img.feature-box").click(function(){clearTimeout(featureTimer);$("#feature"+featureActive).fadeOut();$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-on","-off"));featureActive=$(this).attr("id").substring(11,12);$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-off","-on"));$("#feature"+featureActive).fadeIn();});$("#feature-next").click(function(){clearTimeout(featureTimer);$("#feature"+featureActive).fadeOut();$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-on","-off"));if(featureActive<featureLen){featureActive++;}
else{featureActive=0;}
$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-off","-on"));$("#feature"+featureActive).fadeIn();});$("#feature-prev").click(function(){clearTimeout(featureTimer);$("#feature"+featureActive).fadeOut();$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-on","-off"));if(featureActive>0){featureActive--;}
else{featureActive=featureLen;}
$("#feature-box"+featureActive).attr("src",$("#feature-box"+featureActive).attr("src").replace("-off","-on"));$("#feature"+featureActive).fadeIn();});var featureTimer;function timedCount(){$("#feature-next").click();featureTimer=setTimeout(function(){timedCount();},6000);}
featureTimer=setTimeout(function(){timedCount();},6000);}
var hpcol_heights=Array();hpcol_heights.push($('#content-feature').height());hpcol_heights.push($('#content-alerts').height());hpcol_heights.push($('#content-service').height());var hpcol_max=1;for(var hts=1;hts<hpcol_heights.length;hts++){if(hpcol_heights[hts]>hpcol_max){hpcol_max=hpcol_heights[hts];}}
$('#content-feature').height(hpcol_max);$('#content-feature ul').height(hpcol_max-21);$('div.storm-warning').height(hpcol_max-3);$('div.storm-warning ul').height(hpcol_max-7);$('#content-alerts p').height(hpcol_max-133);$('#content-service form.expander').height(hpcol_max-($('#content-service').height()-$('form.expander').height()-1));});
