(function(E){var I=(typeof _cbVarStr!=="undefined")?_cbVarStr:"b1020";var B="http://www.foxnews.com";B=G(B);(function(){var M=function(Q){Q=Q||false;var N=new Date(),R=N.getFullYear().toString()+(N.getMonth()+1).toString()+N.getDate().toString(),P=N.getHours()+1,O=N.getMinutes();R+=P.toString()+((Q&&!isNaN(Q))?(Math.floor(O/parseInt(Q,10))).toString():"");return R;};document.write('<script type="text/javascript" src="http://www.fncstatic.com/static/all/js/geo.js?cb='+M(1)+'"><\/script>');}());var L={feed:{whatsHotLive:{feedFunction:"FeedSource_WhatsHotWatchLive",url:"http://www.foxnews.com/js/whatshot.js",rotate:3,show:{hot:false,live:2},fade:{use:true,delay:900}},onAir:{feedFunction:"FeedSource_FNCTV",url:"http://www.foxnews.com/js/onair.js",descCharLimit:35,imageDomainLoc:""},onAirCarousel:{feedFunction:"FOX_FN_OnAir_Data",url:"http://www.foxnews.com/static/managed/json/onair-feed-data.js"}},weather:{emailTxt:"Enter city or zip",hideFormDelay:3000},onAir:{hideDelay:200},authentication:{use:"render",domain:"foxnews.com",check:"/authentication/registration/validate/"}};function K(){this.headObj={};}K.prototype={init:function(M){if(E("body").data("HasHeaderInit")){return false;}E("body").data("HasHeaderInit",true);var N;for(N in M){if(M.hasOwnProperty(N)){this["_"+N]=M[N];}}this.feeds.root=this.weather.root=this.onAir.root=this.authentication.root=this.whatsHot.root=this;this.setHolders();this.docReady();this.weather.set();this.whatsHot.set();this.onAir.set();this.authentication.set();this.feeds.set();},setHolders:function(){var M=E("#section-head");this.headObj={elm:M,branding:M.children(".branding"),util:M.find("#util"),userOptions:M.find("#uo-data"),headlines:M.find("#headlines-primary"),primaryNav:M.find("#nav-primary"),onAir:M.children(".slide.slide-1"),authentication:M.find("#account")};this.setListeners();},docReady:function(){E(document).ready(function(){});},setListeners:function(){}};K.prototype.authentication={set:function(){var O=this;var N=this.root;if(N.headObj.authentication.size()===0){return false;}function M(){var T=document.location.hostname;var S=T.split(".");var Q=S.length;var R=S[Q-2]+"."+S[Q-1];L.authentication.domain=R;}function P(){M();if(typeof O[L.authentication.use]==="function"){O[L.authentication.use]();}else{O.render();}}if(typeof AuthService!=="undefined"){P();}else{E(document).ready(function(){if(typeof AuthService!=="undefined"){P();}else{D("[head.authentication] Authentication Service not found.");}});}this.setHolders();},setHolders:function(){var M=this.root.helper.getQueryStr("usr");if(M){E(".login-fields > .field > input[name='userName']").attr("value",M);}},render:function(){var R=this.root,P=R.headObj.authentication,O=(P.size()===0)?true:false,T=false,N=false;if(!O){T=P.find(".user-options > p:first");N=P.find("> .username > .encapsulate");var M=P.find("> .username"),U=E("body");N.hover(function(){E(this).addClass("hover");},function(){E(this).removeClass("hover");});N.click(function(){if(P.hasClass("active")){P.addClass("inactive").removeClass("active");}else{P.addClass("active").removeClass("inactive");}});M.hover(function(){window.FXAuthClickIsOver=true;},function(){if(window.FXAuthClickIsOver){window.FXAuthClickIsOver=false;}});if(!U.data("FXAuthClick")){U.data("FXAuthClick",true);U.mousedown(function(){if(!window.FXAuthClickIsOver&&P.hasClass("active")){P.removeClass("active").addClass("inactive");}});}}else{P=E("#authentication").parent();T=P.find(".username");}function Q(Y){Y=Y||"Profile";var W="",X="";if(L.authentication.domain!=="foxnews.com"){W=' target="_blank"';if(typeof E.cookie!=="undefined"&&E.cookie("p_DN")){X="?usr="+E.cookie("p_DN");}}return"<a"+W+' href="http://www.foxnews.com/community/user/profile'+X+'">'+Y+"</a>";}V.prototype=new AuthService();function V(){AuthService.call(this,{domain:L.authentication.domain});var W=this;this.createLoginLogout=function(a){var Z=[],Y=P.find("#authentication");if(W.isLoggedIn()){if(O){Y=Y.children(":first");Y.each(function(){if(!W.isThirdParty()){E(this).html(Q());}else{E(this).css({display:"none"});}});Y.next().each(function(){var b=E('<a href="#">Log Out</a>');b.click(function(){try{S.logout(S.domain);}catch(c){D("[head.authentication] Logout - An error occured: "+c);}return false;});E(this).html(b);});T.html('<img src="http://www.foxnews.com/static/all/img/head/profile.png" alt="" /> '+W.getDisplayName());T.css({display:"inline"});}else{Y=P.find(".user-options > ul").children(":first");Y.each(function(){if(!W.isThirdParty()){E(this).html(Q(E(this).text()));}else{Y.css({display:"none"});}});Y.next().find("a").click(function(){try{S.logout(S.domain);}catch(b){D("[head.authentication] Logout - An error occured: "+b);}return false;});P.addClass("inactive");var X=(function(){var d=W.getDisplayName(),c=d,e="",b="<span${title}>${name}</span>";if(d.length>13){c=d.slice(0,13)+"...";e=' title="'+d+'"';}return b.replace("${title}",e).replace("${name}",c);}());T.html("You're logged in as "+X);}}else{Y.children().find("a").each(function(){var b=E(this),c=b.text().toLowerCase();if(c.indexOf("register")>-1){b.click(function(){try{S.registrationOverlay(this);if(typeof FOX!=="undefined"&&FOX.utils&&FOX.utils.pageRefresh){FOX.utils.pageRefresh.disable();}else{if(typeof ew_disableRefresh==="function"){ew_disableRefresh();}}}catch(d){D("[head.authentication] Register - An error occured: "+d);}return false;});}else{if(c.indexOf("login")>-1){b.click(function(){try{S.providerOverlay(S.domain);if(typeof FOX!=="undefined"&&FOX.utils&&FOX.utils.pageRefresh){FOX.utils.pageRefresh.disable();}else{if(typeof ew_disableRefresh==="function"){ew_disableRefresh();}}}catch(d){D("[head.authentication] Login - An error occured: "+d);}return false;});}}});if(O){Y.css({display:"inline"});}else{T.html("Please login.");}}};this.onSuccessLogin=function(){S.createLoginLogout();W.closeOverlay("login-provider");};this.callback=function(X){var Y=W.createObjFromJSON(X);if(Y.authentication.status==="ok"){if(W.thirdPartyAPI){W.thirdPartyAPI.disqus.login(Y,function(){W.thirdPartyAPI.idms.login(Y,function(){window.FOX_TP_Reload=setTimeout(function(){window.location.reload();},1000);});});}}W.closeOverlay("login-provider");};}var S=window.authentication_service=new V();S.init();S.createLoginLogout();}};K.prototype.weather={set:function(){var N=this,M=this.root,Q=M.headObj.util.find(".weather-search");if(Q.size()===0){return false;}var P=Q.children("form"),R=Q.children("p");function O(){try{if(!weather_service.serviceTriggered){weather_service.init("http://www.foxnews.com");}}catch(S){D("[header.weather] Error in weather service: "+S);}}if(typeof weather_service!=="undefined"){O();}else{E(document).ready(function(){if(typeof weather_service!=="undefined"){O();}else{D("[header.weather] Cannot find weather service: weather_service");}});}},submitForm:function(){D("[header.weather] Submitting form");},toggle:function(N,M){N.css("display","none");M.css({opacity:"0",display:"block"});H.show(M,{speed:300,type:"swing"});}};K.prototype.onAir={set:function(){var N=this,M=this.root;if(M.headObj.onAir.size()===0){return false;}window[L.feed.onAir.feedFunction]=function(O){N.renderOnAirNow(O);};window[L.feed.onAirCarousel.feedFunction]=function(O){N.renderOnAirCarousel(O,function(){N.carousel();N.setCarouselListeners();});};M.feeds.onAir();M.feeds.onAirCarousel();},renderOnAirNow:function(h){var V=this,d=this.root,S=h.schedules.today,P=h.schedules.tomorrow,W=E("#show-data"),e=W.children("ul:first");if(W.size()===0){return false;}function a(i){i=E.trim(i);return(i.split(":"))[0]+i.charAt(i.length-2)+"<span>et</span>";}function Y(j){var i=L.feed.onAir.descCharLimit;return(j.length>i)?j.substring(0,i)+"...":j;}function N(l,o){o=o||false;var j,i=[],k=(o)?l:l+1;function m(p){i.push("<li"+((j===0)?' class="first"':"")+">");i.push('<p class="media"><a href="'+p.link+'"><img src="'+L.feed.onAir.imageDomainLoc+p.img+'" alt="" /></a></p>');i.push('<div class="info">');i.push('<p class="relation">'+p.title+"</p>");i.push('<p class="summary"><a href="'+p.link+'" title="'+p.dek+'">'+Y(p.dek)+"</a></p></div>");i.push('<p class="time">'+a(p.time)+"</p></li>");}for(j=l;j<=k;j++){var n=S[j];m(n);}if(o&&P[0]){m(P[0]);}e.html(i.join(""));}var Z,c=new Date(h.now.date+" "+h.now.time),X=parseInt(c.getHours()+""+((c.getMinutes()<10)?"0"+c.getMinutes():c.getMinutes()),10);for(Z=0;Z<S.length;Z++){var f=S[Z],b=(S[Z+1])?S[Z+1]:false;try{var Q=E.trim(f.time).toLowerCase();Q=(Q.charAt(Q.indexOf("m")-2)!==" ")?Q.replace("pm"," pm").replace("am"," am"):Q;var T=new Date(h.now.date+" "+Q),g=parseInt(T.getHours()+""+((T.getMinutes()<10)?"0"+T.getMinutes():T.getMinutes()),10);if(b){var R=E.trim(b.time).toLowerCase();R=(R.charAt(R.indexOf("m")-2)!==" ")?R.replace("pm"," pm").replace("am"," am"):R;var O=new Date(h.now.date+" "+R),M=parseInt(O.getHours()+""+((O.getMinutes()<10)?"0"+O.getMinutes():O.getMinutes()),10);if(X>=g&&X<M){N(Z);break;}}else{N(Z,true);break;}}catch(U){D("[head.onAir] Error: "+U);}}},renderOnAirCarousel:function(R,Q){var N=this;var M=this.root;var O=R;var P=function(){var Z=M.headObj.onAir.find("> .content > .slideshow");var V=[],U=O.length;for(var T=0;T<U;T++){var Y=O[T],S=(T===0)?true:false,X=(T+1===U)?true:false,W=(S)?" section-first":(X)?" section-last":"";V.push('<li class="section'+W+'">');V.push('<p class="media"><a href="'+Y.link+'"><img alt="'+Y.title+'" pre-src="'+Y.img+'" src="http://www.fncstatic.com/static/all/img/clear.gif"></a></p>');V.push('<h3><a href="'+Y.link+'">'+Y.title+"</a></h3>");V.push('<p class="time"><span>'+Y.day+"</span> "+Y.time+"</p></li>");}Z.html("<ul>"+V.join("")+"</ul>");};P();if(typeof Q==="function"){Q();}},carousel:function(){var N=this.root,O=N.headObj.onAir.children(".content");var M={elm:O,slide:"horizontal",scroll:5,speed:1200,show:5,rotate:false};function P(S){var Q,R=[];for(Q=1;Q<=S.batch.max;Q++){R.push('<li><a href="#">&nbsp;</a></li>');}return R.join("");}M.elm.each(function(S){var R=0,U=E(this);if(U.data("carousel_initialized")){return false;}var T=U.find("ol");var V={prev:U.find(".prev"),next:U.find(".next"),first:U.find(".first-page"),last:U.find(".last-page")};var Q={auto:{set:false,speed:3000},slide:M.slide,scroll:M.scroll,show:M.show,speed:M.speed,rotate:M.rotate,eventCallback:function(W){if(W.event==="init"){R=W.batch.max;T.html(P(W));T.children(":first").addClass("active");U.data("carousel_initialized",true);}else{T.children().each(function(X){E(this).toggleClass("active",function(){return(X+1===W.batch.current)?true:false;});});}if(W.batch.current===1){V.prev.addClass("inactive-prev");V.first.addClass("inactive-first");}else{V.prev.removeClass("inactive-prev");V.first.removeClass("inactive-first");}if(W.batch.current===W.batch.max){V.next.addClass("inactive-next");V.last.addClass("inactive-last");}else{V.next.removeClass("inactive-next");V.last.removeClass("inactive-last");}},controlsCallback:function(W){T.children().find("a").each(function(X){E(this).click(function(){W.stopAutoScroll();W.scrollToBatch(X+1);return false;});});V.first.click(function(){W.stopAutoScroll();W.scrollToItem(1);return false;});V.prev.click(function(){W.stopAutoScroll();W.slide("prev");return false;});V.next.click(function(){W.stopAutoScroll();W.slide("next");return false;});V.last.click(function(){W.stopAutoScroll();W.scrollToItem(R);return false;});}};if(typeof E.fn.jfoxCarousel!=="undefined"){U.jfoxCarousel(Q);}else{E(document).ready(function(){U.jfoxCarousel(Q);});}});},setCarouselListeners:function(){var T=this.root,N=T.headObj.primaryNav,M=N.children("ul:first").children("li.on-air"),P=T.headObj.onAir,V=P.css("height").replace("px",""),O=L.onAir.hideDelay;var S={close:M.find("img").filter(function(){return(E(this).attr("src").indexOf("close.png")>-1)?true:false;}),open:M.find("img").filter(function(){return(E(this).attr("src").indexOf("plus.png")>-1)?true:false;})};function R(){var W=P.find(".slideshow > ul > li");W.each(function(){var Y=E(this),a=Y.find("> .media img"),Z=a.attr("pre-src"),X=new Image();if(Z&&!a.data("preloaded")){X.onload=function(){a.attr("src",Z);};X.src=Z;a.data("preloaded",true);}});}function Q(){P.data("isRendering",true);P.data("hidden",true);P.animate({height:"0px",opacity:"0"},O,"swing",function(){P.css({display:"none"}).data("isRendering",false);});S.close.hide();S.open.show();M.removeClass("active");}function U(){if(!P.data("initToFirst")){P.data("initToFirst",true);P.find("p.controls > a.prev").click();}P.data("isRendering",true);P.data("hidden",false);P.css("display","block");P.animate({height:V,opacity:"1"},O,"swing",function(){P.data("isRendering",false);});S.close.show();S.open.hide();M.addClass("active");}S.close.hide();P.css({height:"0px",opacity:"0"}).data("hidden",true);M.find("a").click(function(){R();if(P.data("isRendering")){return false;}if(P.data("hidden")){U();}else{Q();}return false;});}};K.prototype.whatsHot={set:function(){var N=this,M=this.root;this.render.root=M;if(M.headObj.headlines.size()===0){return false;}window[L.feed.whatsHotLive.feedFunction]=function(O){N.render.set(O);};M.feeds.whatsHotLive();},render:{set:function(S){var O=this.root,N=O.headObj.headlines;var Q=this.hot({title:"Full Coverage",feed:S.whatshot,len:L.feed.whatsHotLive.show.hot});var T=this.live({title:"Watch Live",feed:S.watchlive,len:L.feed.whatsHotLive.show.live});if(typeof S.whatshot!=="undefined"){if(S.whatshot.length===0){return false;}var P=E('<dl class="first"></dl>');P.append(Q).children("dd:first").addClass("first");N.html(P);}if(typeof S.watchlive!=="undefined"){if(S.watchlive.length===0){return false;}var R=E("<dl></dl>");R.append(T).children("dd:first").addClass("first");N.append(R);var M=N.children("dl:nth-child(2)");if(S.watchlive.length>L.feed.whatsHotLive.show.live){this.rotate(M);}else{M.children("dd").css("display","inline");}}},hot:function(O){if(typeof O.feed==="undefined"){return false;}O.len=O.len||O.feed.length;var N,M=[];if(O.len>0){M.push("<dt>"+O.title+"</dt>");for(N=0;N<O.feed.length;N++){var Q=O.feed[N],P=(N>=O.len)?' style="display:none;"':"";M.push("<dd"+P+'><a href="'+Q.link+'">'+Q.title+"</a></dd>");}}return E(M.join(""));},live:function(O){if(typeof O.feed==="undefined"){return false;}O.len=O.len||O.feed.length;var N,M=[];if(O.len>0){M.push("<dt>"+O.title+"</dt>");for(N=0;N<O.feed.length;N++){var Q=O.feed[N],P=(N>=O.len)?' style="display:none;"':"";M.push("<dd"+P+'><a href="'+Q.link+'">'+Q.title+"</a></dd>");}}return E(M.join(""));},rotate:function(R){var S=R.children("dd"),T=R.children("dt:first"),N=S.size(),Q=L.feed.whatsHotLive.fade;if(N===0){return false;}var M=L.feed.whatsHotLive.rotate*1000;if(Q.use){M=M+Q.delay;}var O=false;S.each(function(V){var W=E(this);W.addClass("first");W.css("display",(V===0)?"inline":"none");if(V===0){W.data("rotateNumber",V+1);}});if(!R.data("rotateNumber")){R.data("rotateNumber",1);}function P(W){W=W||false;var V=R.data("rotateNumber")+1;V=(V>N)?1:V;R.data("rotateNumber",V);S.each(function(X){var Z=E(this),Y=X+1;if(!Q.use||W==="click"){Z.css("display",(Y===V)?"inline":"none");}else{if(Y===V){Z.fadeIn(Q.delay);}else{Z.hide();}}});}function U(){clearInterval(O);O=setInterval(function(){P();},M);}U();T.css("cursor","pointer").click(function(){P("click");});R.hover(function(){clearInterval(O);},function(){U();});}}};K.prototype.feeds={set:function(){},whatsHotLive:function(){this.get.append({url:L.feed.whatsHotLive.url});},onAir:function(){this.get.append({url:L.feed.onAir.url});},onAirCarousel:function(){this.get.append({url:L.feed.onAirCarousel.url});},get:{append:function(M){(function(){var N=document.createElement("script");N.src=M.url;N.async=true;E("head").get(0).appendChild(N);}());},json:function(M){E.ajax({type:"GET",url:M.url,data:M.query,success:function(N){if(M.callback){M.callback(N);}}});}}};K.prototype.helper={getQueryStr:function(R){var P=(window.location.search).substr(1);if(P.length>0){var M,Q=P.split("&"),N={};for(M=0;M<Q.length;M++){var O=Q[M].split("=");N[O[0]]=O[1];}return(N[R])?N[R]:false;}return false;}};function D(M){if(typeof window.console==="object"){console.log(M);}}function G(M){try{var U=document.location.hostname,P=U.toLowerCase().split("."),V=["pvw-qa","origin-qa","staging"],W=["foxnews.com","foxbusiness.com"];if(P.length>1){var R,Q,T=P[P.length-2]+"."+P[P.length-1],O=P.slice(0,P.length-2).join(".");var S=function(){for(R=0;R<W.length;R++){if(T===W[R]){M="";break;}}};for(Q=0;Q<V.length;Q++){if(O.indexOf(V[Q])>-1){S();break;}}}}catch(N){}return M;}var H={isIE:function(){return E.browser.msie;},animate:function(N,M){if(!this.isIE()){if(!M.speed){M.speed=300;}if(!M.type){M.type="swing";}N.animate(M.css,M.speed,M.type,function(){if(M.callback){M.callback();}});}else{N.css(M.css);N.css("opacity","");if(M.callback){M.callback();}}},hide:function(P,M){if(!P){return false;}var N,O={opacity:"0"};if(M.css){for(N in M.css){if(M.css.hasOwnProperty(N)){O[N]=M.css[N];}}}M.css=O;this.animate(P,M);},show:function(P,M){if(!P){return false;}var N,O={opacity:"1"};if(M.css){for(N in M.css){if(M.css.hasOwnProperty(N)){O[N]=M.css[N];}}}M.css=O;this.animate(P,M);}};var J=window.foxHeader=new K();(function(){try{if(FOX.site.bottomInit){var M=FOX.site.bottomInit;FOX.site.bottomInit=function(){J.init();M();};}}catch(N){E(document).ready(function(){J.init();});}}());var F=window.siteStreamFlashPlayer=function(N,M){var V=(typeof N==="undefined")?1:N,S=(typeof M==="undefined")?"foxnews":M,U=850,Q=506,O=(screen.width-U)/2,T=(screen.height-Q)/2,P="height="+Q+",width="+U+",top="+T+",left="+O+",toolbar=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=no",R=window.open("http://interactive."+S+".com/livestream/live.html?chanId="+V+"&openAIR=true","livePlayer",P);R.focus();};var A=window.siteStreamLivePlayer=function(R){var M=914,N=419,Q=(screen.width-M)/2,P=(screen.height-N)/2;url="http://video.foxnews.com/video-live-streaming.html",settings="height="+N+",width="+M+",top="+P+",left="+Q+",toolbar=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=no",url=url+((R&&!isNaN(R))?"?video_id="+R:"");var O=window.open(url,"LivePlayer",settings);O.focus();};var C=window.FOX_isMnt=function(){var M=false,O=window.CONST_Akamai_TIME||false;try{if(O.yr==="2011"&&O.mm==="11"&&(O.dd==="05"||O.dd==="06")){M=true;}else{if(O.yr==="2011"&&O.mm==="11"&&O.dd==="04"&&parseInt(O.hr,10)>=17){M=true;}}}catch(N){}return M;};}(jQuery));(function(A){A(document).ready(function(){A("#section-footer").find('a[rel="external"]').attr("target","_blank");});}(jQuery));
/*Fri Feb 03 14:16:40 EST 2012*/

