if(typeof(tab)=="undefined"){tab={}}$(".js-infopanel").live("click",function(){var b=$(this);var c=b.attr("data-ipwidth");var a=b.attr("data-ipheight");ipOpen(b.attr("href"),c,a);return false});$(document).ready(function(){$("#navigation #main a").mousedown(function(){ga_track_event(tabConfig.section,"Navagation Tab click",$(this).text())});$("#navigation #secondary a").mousedown(function(){ga_track_event(tabConfig.section,"Utility Links click",$(this).text())})});function ipOpen(d,c,a){if(!c){c=1000}if(!a){a=581}if(!tab.infowindows){tab.infowindows=0}if(window.opener){window.location.href=d}else{var b=window.open(d,"info"+tab.infowindows++,"location=no,status=yes,scrollbars=yes,resizable=yes,width="+c+",height="+a+",alwaysRaised=yes");b.focus()}}function ga_track_pageview(a){try{_gaq.push(["_trackPageview",a])}catch(b){if(typeof(console)=="object"){console.error(b)}}}function ga_track_event(c,f,b,d){c=c.substr(0,1).toUpperCase()+c.substr(1).toLowerCase();f=f.substr(0,1).toUpperCase()+f.substr(1).toLowerCase();try{var a=["_trackEvent",c,f];if(b){a.push(b)}if(b&&d){a.push(d)}_gaq.push(a)}catch(g){if(typeof(console)=="object"){console.error(g)}}}function news_alerts_load(d){var c=$("#news-alerts");var b;var a=function(){var g=c.find(".alert");var f=$(b.alerts[0]).appendTo(c);g.fadeOut(function(){g.remove()});f.fadeIn();b.alerts.unshift(b.alerts.pop());var e=f.find(".content");f.find("a").mousedown(function(){ga_track_event("news alerts",tabConfig.section+" click",e.text())})};$.getJSON("/ajax/shared/news-alerts/"+d,function(e){c.stopTime("rotate");b=e;if(b.alerts.length){c.slideDown(a);if(b.alerts.length>1){c.everyTime(b.interval*1000,"rotate",a)}}else{from=c.find(".alert");from.fadeOut(function(){from.remove();c.slideUp()})}});$("html").stopTime("news-alert-reload").oneTime(300000,"news-alert-reload",function(){news_alerts_load(d)})};
