function emailArticle(b,f){var c=document.createElement("div");var e='<img src="http://'+location.host+"/logger/p.gif?type=EMAILED&a="+b+"&d=/"+f+'" />';c.innerHTML=e;document.body.appendChild(c);return false;}function sendEmailSetup(h,g,e,d,c,b){var a="";if(polopoly.user.isLoggedIn()){a="&sender="+polopoly.user.name()+"&loggedIn=yes";}else{a="&loggedIn=no";}var f;f="http://"+location.host+"/emailarticle?"+"&emailPost=false"+"&whichSite="+b+"&path="+e+"&title="+d+"&body="+c;if(a!==""){f+=a;}emailArticle(h,g);document.getElementById("emailPop").href=f;emailBox();return false;}function sendtophone(b,f){var c=document.createElement("div");var e='<img src="http://'+location.host+"/logger/p.gif?type=EMAILED&a="+b+"&d=/"+f+'" />';c.innerHTML=e;document.body.appendChild(c);return false;}function sendToPhoneSetup(a,e,h,d,k,b,g,f){var c="sendPost=false"+"&whichSite="+f+"&name="+escape(h);if(d!==""){c=c+"&date="+escape(d);}c=c+"&emailPost=false"+"&addr="+escape(k)+"&contactphone="+b+"&path="+g;var j="http://"+location.host+"/sendtophone?"+c;sendtophone(a,e);document.getElementById("phonePop").href=j;phoneBox();return false;}function openPopup(a){if(a.href){a=a.href;}var b=window.open(a,"popup","width=500, height=320, menubar=no, location=no, resizable=yes, scrollbars=no");if(b){b.focus();}return false;}function clearField(a){if(a.value===a.defaultValue){a.value="";}}function resetField(a){if(a.value===""){a.value=a.defaultValue;}}function viewAllComments(){document.comments.submit();return false;}function submitComment(a){a.action=a.formURL.value;a.submit();viewAllComments();}function viewAllCommentsWithPostCommentOpen(){document.commentsOpenPost.submit();return false;}s_nd_events="";$(document).ready(function(){$("a.tips").cluetip({sticky:true,closePosition:"title",arrows:true});$("a.tips-width").cluetip({width:"385px",showTitle:true});$("a.tips-sticky").cluetip({sticky:true,closePosition:"title",arrows:true});});$(document).ready(function(){var c="<span></span>";var b='<span></span><p class="close">Close</p>';var a=false;$(".toggle").prev().append(' <a href="#" class="toggleLink"><span></span></a>');$(".toggle").hide();$("a.toggleLink").click(function(){a=!a;$(this).html((!a)?c:b);$(this).parent().next(".toggle").toggle("slow");return false;});});$(function(){$("select.uniform, .uniformRadio :radio, .uniformChecker :checkbox").uniform();});var min=100;var max=200;function increaseFontSize(){var b=document.getElementById("primary").getElementsByTagName("p");for(i=0;i<b.length;i++){if(b[i].style.fontSize){var a=parseInt(b[i].style.fontSize.replace("%",""),0);}else{a=100;}if(a!==max){a+=20;}b[i].style.fontSize=a+"%";}}function decreaseFontSize(){var b=document.getElementById("primary").getElementsByTagName("p");for(i=0;i<b.length;i++){if(b[i].style.fontSize){var a=parseInt(b[i].style.fontSize.replace("%","",0),0);}else{a=100;}if(a!==min){a-=20;}b[i].style.fontSize=a+"%";}}(function(e){e.fn.fixPNG=function(){return this.each(function(){var l=e(this).css("backgroundImage");if(l.match(/^url\(["']?(.*\.png)["']?\)$/i)){l=RegExp.$1;e(this).css({"backgroundImage":"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(e(this).css("backgroundRepeat")==="no-repeat"?"crop":"scale")+", src='"+l+"')"}).each(function(){var m=e(this).css("position");if(m!=="absolute"&&m!=="relative"){e(this).css("position","relative");}});}});};var c,a,h=false,b=new Image(),j,k=1,d=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i;var i=null,g=e.browser.msie&&e.browser.version.substr(0,1)==6&&!window.XMLHttpRequest,f=g||(e.browser.msie&&e.browser.version.substr(0,1)==7);e.fn.fancybox=function(l){var p=e.extend({},e.fn.fancybox.defaults,l);var w=this;function r(){c=this;a=e.extend({},p);q();return false;}function q(){if(h){return;}if(e.isFunction(a.callbackOnStart)){a.callbackOnStart();}a.itemArray=[];a.itemCurrent=0;if(p.itemArray.length>0){a.itemArray=p.itemArray;}else{var x={};if(!c.rel||c.rel===""){x={href:c.href,title:c.title};if(e(c).children("img:first").length){x.orig=e(c).children("img:first");}else{x.orig=e(c);}if(x.title===""||typeof x.title==="undefined"){x.title=x.orig.attr("alt");}a.itemArray.push(x);}else{var y=e(w).filter("a[rel="+c.rel+"]");x={};for(var o=0;o<y.length;o++){x={href:y[o].href,title:y[o].title};if(e(y[o]).children("img:first").length){x.orig=e(y[o]).children("img:first");}else{x.orig=e(y[o]);}if(x.title===""||typeof x.title==="undefined"){x.title=x.orig.attr("alt");}a.itemArray.push(x);}}}while(a.itemArray[a.itemCurrent].href!==c.href){a.itemCurrent++;}if(a.overlayShow){if(g){e("embed, object, select").css("visibility","hidden");e("#fancy_overlay").css("height",e(document).height());}e("#fancy_overlay").css({"background-color":a.overlayColor,"opacity":a.overlayOpacity}).show();}e(window).bind("resize.fb scroll.fb",e.fn.fancybox.scrollBox);s();}function s(){e("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();var o=a.itemArray[a.itemCurrent].href;if(o.match("iframe")||c.className.indexOf("iframe")>=0){e.fn.fancybox.showLoading();n('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" scrolling="no" hspace="0" src="'+o+'" width="'+a.frameWidth+'" height="'+a.frameHeight+'"></iframe>',a.frameWidth,a.frameHeight);}else{if(o.match(/#/)){var x=window.location.href.split("#")[0];x=o.replace(x,"");x=x.substr(x.indexOf("#"));n('<div id="fancy_div">'+e(x).html()+"</div>",a.frameWidth,a.frameHeight);}else{if(o.match(d)){b=new Image();b.src=o;if(b.complete){v();}else{e.fn.fancybox.showLoading();e(b).unbind().bind("load",function(){e("#fancy_loading").hide();v();});}}else{e.fn.fancybox.showLoading();e.get(o,function(y){e("#fancy_loading").hide();n('<div id="fancy_ajax">'+y+"</div>",a.frameWidth,a.frameHeight);});}}}}function v(){var z=b.width;var o=b.height;var B=(a.padding*2)+40;var A=(a.padding*2)+60;var x=e.fn.fancybox.getViewport();if(a.imageScale&&(z>(x[0]-B)||o>(x[1]-A))){var y=Math.min(Math.min(x[0]-B,z)/z,Math.min(x[1]-A,o)/o);z=Math.round(y*z);o=Math.round(y*o);}n('<img alt="" id="fancy_img" src="'+b.src+'" />',z,o);}function t(){var o="";if((a.itemArray.length-1)>a.itemCurrent){o=a.itemArray[a.itemCurrent+1].href||false;if(o&&o.match(d)){objNext=new Image();objNext.src=o;}}if(a.itemCurrent>0){o=a.itemArray[a.itemCurrent-1].href||false;if(o&&o.match(d)){objNext=new Image();objNext.src=o;}}}function n(B,x,D){h=true;var z=a.padding;if(f||i){e("#fancy_content")[0].style.removeExpression("height");e("#fancy_content")[0].style.removeExpression("width");}if(z>0){x+=z*2;D+=z*2;e("#fancy_content").css({"top":z+"px","right":z+"px","bottom":z+"px","left":z+"px","width":"auto","height":"auto"});if(f||i){e("#fancy_content")[0].style.setExpression("height","(this.parentNode.clientHeight - "+z*2+")");e("#fancy_content")[0].style.setExpression("width","(this.parentNode.clientWidth - "+z*2+")");}}else{e("#fancy_content").css({"top":0,"right":0,"bottom":0,"left":0,"width":"100%","height":"100%"});}if(e("#fancy_outer").is(":visible")&&x===e("#fancy_outer").width()&&D===e("#fancy_outer").height()){e("#fancy_content").fadeOut("fast",function(){e("#fancy_content").empty().append(e(B)).fadeIn("normal",function(){m();});});return;}var C=e.fn.fancybox.getViewport();var F=(D+60)>C[1]?C[3]:(C[3]+Math.round((C[1]-D-60)*0.5));var y=(x+40)>C[0]?C[2]:(C[2]+Math.round((C[0]-x-40)*0.5));var E={"left":y,"top":F,"width":x+"px","height":D+"px"};if(e("#fancy_outer").is(":visible")){e("#fancy_content").fadeOut("normal",function(){e("#fancy_content").empty();e("#fancy_outer").animate(E,a.zoomSpeedChange,a.easingChange,function(){e("#fancy_content").append(e(B)).fadeIn("normal",function(){m();});});});}else{if(a.zoomSpeedIn>0&&a.itemArray[a.itemCurrent].orig!==undefined){e("#fancy_content").empty().append(e(B));var A=a.itemArray[a.itemCurrent].orig;var o=e.fn.fancybox.getPosition(A);e("#fancy_outer").css({"left":(o.left-20-a.padding)+"px","top":(o.top-20-a.padding)+"px","width":e(A).width()+(a.padding*2),"height":e(A).height()+(a.padding*2)});if(a.zoomOpacity){E.opacity="show";}e("#fancy_outer").animate(E,a.zoomSpeedIn,a.easingIn,function(){m();});}else{e("#fancy_content").hide().empty().append(e(B)).show();e("#fancy_outer").css(E).fadeIn("normal",function(){m();});}}}function u(){if(a.itemCurrent!==0){e("#fancy_left, #fancy_left_ico").unbind().bind("click",function(o){o.stopPropagation();a.itemCurrent--;s();return false;});e("#fancy_left").show();}if(a.itemCurrent!==(a.itemArray.length-1)){e("#fancy_right, #fancy_right_ico").unbind().bind("click",function(o){o.stopPropagation();a.itemCurrent++;s();return false;});e("#fancy_right").show();}}function m(){if(e.browser.msie){e("#fancy_content")[0].style.removeAttribute("filter");e("#fancy_outer")[0].style.removeAttribute("filter");}u();t();e(document).bind("keydown.fb",function(x){if(x.keyCode===27&&a.enableEscapeButton){e.fn.fancybox.close();}else{if(x.keyCode===37&&a.itemCurrent!==0){e(document).unbind("keydown.fb");a.itemCurrent--;s();}else{if(x.keyCode===39&&a.itemCurrent!==(a.itemArray.length-1)){e(document).unbind("keydown.fb");a.itemCurrent++;s();}}}});if(a.hideOnContentClick){e("#fancy_content").click(e.fn.fancybox.close);}if(a.overlayShow&&a.hideOnOverlayClick){e("#fancy_overlay").bind("click",e.fn.fancybox.close);}if(a.showCloseButton){e("#fancy_close").bind("click",e.fn.fancybox.close).show();}if(typeof a.itemArray[a.itemCurrent].title!=="undefined"&&a.itemArray[a.itemCurrent].title.length>0){var o=e("#fancy_outer").position();e("#fancy_title div").text(a.itemArray[a.itemCurrent].title).html();e("#fancy_title").css({"top":o.top+e("#fancy_outer").outerHeight()-32,"left":o.left+((e("#fancy_outer").outerWidth()*0.5)-(e("#fancy_title").width()*0.5))}).show();}if(a.overlayShow&&g){e("embed, object, select",e("#fancy_content")).css("visibility","visible");}if(e.isFunction(a.callbackOnShow)){a.callbackOnShow(a.itemArray[a.itemCurrent]);}if(e.browser.msie){e("#fancy_outer")[0].style.removeAttribute("filter");e("#fancy_content")[0].style.removeAttribute("filter");}h=false;}return this.unbind("click.fb").bind("click.fb",r);};e.fn.fancybox.scrollBox=function(){var l=e.fn.fancybox.getViewport();if(a.centerOnScroll&&e("#fancy_outer").is(":visible")){var m=e("#fancy_outer").outerWidth();var n=e("#fancy_outer").outerHeight();var o={"top":(n>l[1]?l[3]:l[3]+Math.round((l[1]-n)*0.5)),"left":(m>l[0]?l[2]:l[2]+Math.round((l[0]-m)*0.5))};e("#fancy_outer").css(o);e("#fancy_title").css({"top":o.top+n-32,"left":o.left+((m*0.5)-(e("#fancy_title").width()*0.5))});}if(g&&e("#fancy_overlay").is(":visible")){e("#fancy_overlay").css({"height":e(document).height()});}if(e("#fancy_loading").is(":visible")){e("#fancy_loading").css({"left":((l[0]-40)*0.5+l[2]),"top":((l[1]-40)*0.5+l[3])});}};e.fn.fancybox.getNumeric=function(l,m){return Number(e.curCSS(l.jquery?l[0]:l,m,true))||0;};e.fn.fancybox.getPosition=function(l){var m=l.offset();m.top+=e.fn.fancybox.getNumeric(l,"paddingTop");m.top+=e.fn.fancybox.getNumeric(l,"borderTopWidth");m.left+=e.fn.fancybox.getNumeric(l,"paddingLeft");m.left+=e.fn.fancybox.getNumeric(l,"borderLeftWidth");return m;};e.fn.fancybox.showIframe=function(){e("#fancy_loading").hide();e("#fancy_frame").css("visibility","visible");};e.fn.fancybox.getViewport=function(){return[e(window).width(),e(window).height(),e(document).scrollLeft(),e(document).scrollTop()];};e.fn.fancybox.animateLoading=function(){if(!e("#fancy_loading").is(":visible")){clearInterval(j);return;}e("#fancy_loading > div").css("top",(k*-40)+"px");k=(k+1)%12;};e.fn.fancybox.showLoading=function(){clearInterval(j);var l=e.fn.fancybox.getViewport();e("#fancy_loading").css({"left":((l[0]-40)*0.5+l[2]),"top":((l[1]-40)*0.5+l[3])}).show();e("#fancy_loading").bind("click",e.fn.fancybox.close);j=setInterval(e.fn.fancybox.animateLoading,66);};e.fn.fancybox.close=function(){h=true;e(b).unbind();e(document).unbind("keydown.fb");e(window).unbind("resize.fb scroll.fb");e("#fancy_overlay, #fancy_content, #fancy_close").unbind();e("#fancy_close, #fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide();__cleanup=function(){if(e("#fancy_overlay").is(":visible")){e("#fancy_overlay").fadeOut("fast");}e("#fancy_content").empty();if(a.centerOnScroll){e(window).unbind("resize.fb scroll.fb");}if(g){e("embed, object, select").css("visibility","visible");}if(e.isFunction(a.callbackOnClose)){a.callbackOnClose();}h=false;};if(e("#fancy_outer").is(":visible")!==false){if(a.zoomSpeedOut>0&&a.itemArray[a.itemCurrent].orig!==undefined){var m=a.itemArray[a.itemCurrent].orig;var l=e.fn.fancybox.getPosition(m);var n={"left":(l.left-20-a.padding)+"px","top":(l.top-20-a.padding)+"px","width":e(m).width()+(a.padding*2),"height":e(m).height()+(a.padding*2)};if(a.zoomOpacity){n.opacity="hide";}e("#fancy_outer").stop(false,true).animate(n,a.zoomSpeedOut,a.easingOut,__cleanup);}else{e("#fancy_outer").stop(false,true).fadeOut("fast",__cleanup);}}else{__cleanup();}return false;};e.fn.fancybox.build=function(){var l="";l+='<div id="fancy_overlay"></div>';l+='<div id="fancy_loading"><div></div></div>';l+='<div id="fancy_outer">';l+='<div id="fancy_inner">';l+='<div id="fancy_close">close</div>';l+='<div id="fancy_bg"><div class="fancy_bg" id="fancy_bg_n"></div><div class="fancy_bg" id="fancy_bg_ne"></div><div class="fancy_bg" id="fancy_bg_e"></div><div class="fancy_bg" id="fancy_bg_se"></div><div class="fancy_bg" id="fancy_bg_s"></div><div class="fancy_bg" id="fancy_bg_sw"></div><div class="fancy_bg" id="fancy_bg_w"></div><div class="fancy_bg" id="fancy_bg_nw"></div></div>';l+='<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>';l+='<div id="fancy_content"></div>';l+="</div>";l+="</div>";l+='<div id="fancy_title"></div>';e(l).appendTo("body");e('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title");if(e.browser.msie){e(".fancy_bg").fixPNG();}if(g){e("div#fancy_overlay").css("position","absolute");e("#fancy_loading div, #fancy_close, .fancy_title, .fancy_ico").fixPNG();e("#fancy_inner").prepend('<iframe id="fancy_bigIframe" src="javascript:false;" scrolling="no" frameborder="0"></iframe>');var m=e("#fancy_bigIframe")[0].contentWindow.document;m.open();m.close();}};e.fn.fancybox.defaults={padding:10,imageScale:true,zoomOpacity:true,zoomSpeedIn:0,zoomSpeedOut:0,zoomSpeedChange:300,easingIn:"swing",easingOut:"swing",easingChange:"swing",frameWidth:560,frameHeight:340,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",enableEscapeButton:true,showCloseButton:true,hideOnOverlayClick:true,hideOnContentClick:true,centerOnScroll:true,itemArray:[],callbackOnStart:null,callbackOnShow:null,callbackOnClose:null};e(document).ready(function(){i=e.browser.msie&&!e.boxModel;if(e("#fancy_outer").length<1){e.fn.fancybox.build();}});}(jQuery));$(document).ready(function(){$("a.loginLink").fancybox({"hideOnContentClick":false,"frameHeight":380,"frameWidth":400});$("a.forgotPasswordLink").fancybox({"hideOnContentClick":false,"frameHeight":380,"frameWidth":400});$("a.rateArticle").fancybox({"hideOnContentClick":false,"frameHeight":130,"frameWidth":300});$("a.socMedia").fancybox({"hideOnContentClick":false,"frameHeight":220,"frameWidth":300});$("a.mapExpand").fancybox({"hideOnContentClick":false,"frameHeight":440,"frameWidth":620});$("a.newstip").fancybox({"hideOnContentClick":false,"frameHeight":480,"frameWidth":390});$("a.mediaSubmit").fancybox({"hideOnContentClick":false,"frameHeight":350,"frameWidth":650});$("a.postAComment").fancybox({"hideOnContentClick":false,"frameHeight":400,"frameWidth":400});$("a.favorites").fancybox({"hideOnContentClick":false,"frameHeight":280,"frameWidth":476});$("a.oolBox").fancybox({"hideOnContentClick":false,"frameHeight":350,"frameWidth":425});$("a.gatePage").fancybox({"hideOnContentClick":false,"frameHeight":350,"frameWidth":425,"showCloseButton":false,"hideOnOverlayClick":false});$("a.photoPop").fancybox({"hideOnContentClick":false,"frameHeight":490,"frameWidth":680});$("a.mapDirections").fancybox({"hideOnContentClick":false,"frameHeight":526,"frameWidth":800});});function gatePage(){$("#gatePage").fancybox({"frameWidth":400,"frameHeight":350,"showCloseButton":false,"hideOnOverlayClick":false,"hideOnContentClick":false}).trigger("click");}function emailBox(){$("#emailPop").fancybox({"frameWidth":430,"frameHeight":440,"hideOnContentClick":false}).trigger("click");}function phoneBox(){$("#phonePop").fancybox({"frameWidth":380,"frameHeight":160,"hideOnContentClick":false}).trigger("click");}function intercept(){$("#gatePage").fancybox({"frameWidth":400,"frameHeight":350,"hideOnContentClick":false}).trigger("click");}function close_fancybox(){parent.$.fn.fancybox.close();}function GB_updateAccountWindow(){$("#fancy_outer").css({"width":"800px","height":"250px"});$("#fancy_close").css({"display":"none"});$(".loginLink").fancybox.scrollBox();}function FBresize_500_280(){$("#fancy_outer").css({"width":"500px","height":"280px"});$(".loginLink").fancybox.scrollBox();}function aliLogin(){$("#aliLogin").fancybox({"frameWidth":400,"frameHeight":350,"showCloseButton":true,"hideOnOverlayClick":true,"hideOnContentClick":false}).trigger("click");}function mmnLogin(){$("#mmnLogin").fancybox({"frameWidth":400,"frameHeight":350,"showCloseButton":true,"hideOnOverlayClick":true,"hideOnContentClick":false}).trigger("click");}function forgotPass(){$("#forgotPass").fancybox({"frameWidth":400,"frameHeight":380,"showCloseButton":true,"hideOnOverlayClick":true,"hideOnContentClick":false}).trigger("click");}(function(a){a.uniform={options:{selectClass:"uniformSelect",radioClass:"radio",checkboxClass:"checkBox",checkedClass:"checked",focusClass:"focus"}};if(a.browser.msie&&a.browser.version<7){a.selectOpacity=false;}else{a.selectOpacity=true;}a.fn.uniform=function(c){c=a.extend(a.uniform.options,c);function b(g){var h=a("<div />"),f=a("<span />");h.addClass(c.selectClass);f.html(g.children(":selected").text());g.css("opacity",0);g.wrap(h);g.before(f);h=g.parent("div");f=g.siblings("span");g.change(function(){f.text(g.children(":selected").text());}).focus(function(){h.addClass(c.focusClass);}).blur(function(){h.removeClass(c.focusClass);});}function d(g){var h=a("<div />"),f=a("<span />");h.addClass(c.checkboxClass);a(g).wrap(h);a(g).wrap(f);f=g.parent();h=f.parent();a(g).css("opacity",0).focus(function(){h.addClass(c.focusClass);}).blur(function(){h.removeClass(c.focusClass);}).click(function(){if(!a(g).attr("checked")){f.removeClass(c.checkedClass);}else{f.addClass(c.checkedClass);}});if(a(g).attr("checked")){f.addClass(c.checkedClass);}}function e(g){var h=a("<div />"),f=a("<span />");h.addClass(c.radioClass);a(g).wrap(h);a(g).wrap(f);f=g.parent();h=f.parent();a(g).css("opacity",0).focus(function(){h.addClass(c.focusClass);}).blur(function(){h.removeClass(c.focusClass);}).click(function(){if(!a(g).attr("checked")){f.removeClass(c.checkedClass);}else{a("."+c.radioClass+" span."+c.checkedClass).removeClass(c.checkedClass);f.addClass(c.checkedClass);}});if(a(g).attr("checked")){f.addClass(c.checkedClass);}}return this.each(function(){if(a.selectOpacity){var f=a(this);if(f.is("select")){b(f);}else{if(f.is(":checkbox")){d(f);}else{if(f.is(":radio")){e(f);}}}}});};}(jQuery));(function(e){var i,h,g,d,f,j,c;e.fn.cluetip=function(l,k){if(typeof l==="object"){k=l;l=null;}return this.each(function(I){var u=e(this);var F=e.extend(false,{},e.fn.cluetip.defaults,k||{},e.metadata?u.metadata():e.meta?u.data():{});var o=false;var y=+F.cluezIndex;var Q=false,P=0;if(!e("#cluetip").length){h=e('<div id="cluetip-inner"></div>');d=e('<h3 id="cluetip-title"></h3>');g=e('<div id="cluetip-outer"></div>').append(h).prepend(d);i=e('<div id="cluetip"></div>').css({zIndex:F.cluezIndex}).append(g).append('<div id="cluetip-extra"></div>')[b](a).hide();e('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:y-1}).insertBefore("#cluetip").hide();i.css({position:"absolute",zIndex:y});g.css({position:"relative",zIndex:y+1});f=e('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:y+1}).appendTo("#cluetip");}var H=(F.dropShadow)?+F.dropShadowSteps:0;if(!j){j=e([]);for(var T=0;T<H;T++){j=j.add(e("<div></div>").css({zIndex:y-T-1,opacity:0.1,top:-1+T,left:0+T}));}j.css({position:"absolute",backgroundColor:"#000"}).prependTo(i);}var D=u.attr(F.attribute),r=F.cluetipClass;if(!D&&!F.splitTitle&&!l){return true;}if(F.local&&F.localPrefix){D=F.localPrefix+D;}if(F.local&&F.hideLocal){e(D+":first").hide();}var E=parseInt(F.topOffset,10),A=parseInt(F.leftOffset,10);var z,R;var w=isNaN(parseInt(F.height,10))?"auto":(/\D/g).test(F.height)?F.height:F.height+"px";var m,s,J,W,L,S;var x=isNaN(parseInt(F.width,10))?275:parseInt(F.width,10);var U=x+(parseInt(i.css("paddingLeft"),10)||0)+(parseInt(i.css("paddingRight"),10)||0)+H;var B=this.offsetWidth;var t,K,X,M,n;var O;var G=(F.attribute!=="title")?u.attr(F.titleAttribute):"";if(F.splitTitle){if(G===undefined){G="";}O=G.split(F.splitTitle);G=O.shift();}var q;var v=function(ac){if(!F.onActivate(u)){return false;}Q=true;i.removeClass().css({width:x});if(D===u.attr("href")){u.css("cursor",F.cursor);}u.attr("title","");if(F.hoverClass){u.addClass(F.hoverClass);}s=J=u.offset().top;t=u.offset().left;M=ac.pageX;L=ac.pageY;if(u[0].tagName.toLowerCase()!=="area"){m=e(document).scrollTop();n=e(window).width();}if(F.positionBy==="fixed"){K=B+t+A;i.css({left:K});}else{K=(B>t&&t>U)||t+B+U+A>n?t-U-A:B+t+A;if(u[0].tagName.toLowerCase()==="area"||F.positionBy==="mouse"||B+U>n){if(M+20+U>n){i.addClass(" cluetip-"+r);K=(M-U-A)>=0?M-U-A-parseInt(i.css("marginLeft"),10)+parseInt(h.css("marginRight"),10):M-(U/2);}else{K=M+A;}}var Z=K<0?ac.pageY+E:ac.pageY;i.css({left:(K>0&&F.positionBy!=="bottomTop")?K:(M+(U/2)>n)?n/2-U/2:Math.max(M-(U/2),0)});}R=e(window).height();if(l){h.html(l);N(Z);}else{if(O){var aa=O.length;for(var ab=0;ab<aa;ab++){if(ab===0){h.html(O[ab]);}else{h.append('<div class="split-body">'+O[ab]+"</div>");}}N(Z);}else{if(!F.local&&D.indexOf("#")!==0){if(o&&F.ajaxCache){h.html(o);N(Z);}else{var ad=F.ajaxSettings;ad.url=D;ad.beforeSend=function(){g.children().empty();if(F.waitImage){e("#cluetip-waitimage").css({top:L+20,left:M+20}).show();}};ad.error=function(){if(Q){h.html("<i>sorry, the contents could not be loaded</i>");}};ad.success=function(af){o=F.ajaxProcess(af);if(Q){h.html(o);}};ad.complete=function(){c=e("#cluetip-inner img").length;if(c&&!e.browser.opera){e("#cluetip-inner img").load(function(){c--;if(c<1){e("#cluetip-waitimage").hide();if(Q){N(Z);}}});}else{e("#cluetip-waitimage").hide();if(Q){N(Z);}}};e.ajax(ad);}}else{if(F.local){var ae=e(D+":eq("+I+")");var Y=e.fn.wrapInner?ae.wrapInner("<div></div>").children().clone(true):ae.html();if(e.fn.wrapInner){h.empty().append(Y);}else{h.html(Y);}N(Z);}}}}};var N=function(aa){i.addClass("cluetip-"+r);if(F.truncate){var ab=h.text().slice(0,F.truncate)+"...";h.html(ab);}function Y(){}if(G){d.show().html(G);}else{if(F.showTitle){d.show().html(" ");}else{d.hide();}}if(F.sticky){var Z=e('<div id="cluetip-close"><a href="#">'+F.closeText+"</a></div>");if(F.closePosition==="bottom"){Z.appendTo(h);}else{if(F.closePosition==="title"){Z.prependTo(d);}else{Z.prependTo(h);}}Z.click(function(){C();return false;});if(F.mouseOutClose){if(e.fn.hoverIntent&&F.hoverIntent){i.hoverIntent({over:Y,timeout:F.hoverIntent.timeout,out:function(){Z.trigger("click");}});}else{i.hover(Y,function(){Z.trigger("click");});}}else{i.unbind("mouseout");}}var ac="";g.css({overflow:w==="auto"?"visible":"auto",height:w});z=w==="auto"?Math.max(i.outerHeight(),i.height()):parseInt(w,10);W=J;S=m+R;if(F.positionBy==="fixed"){W=J-F.dropShadowSteps+E;}else{if((K<M&&Math.max(K,0)+U>M)||F.positionBy==="bottomTop"){if(J+z+E>S&&L-m>z+E){W=L-z-E;ac="top";}else{W=L+E;ac="bottom";}}else{if(J+z+E>S){W=(z>=R)?m:S-z-E;}else{if(u.css("display")==="block"||u[0].tagName.toLowerCase()==="area"||F.positionBy==="mouse"){W=aa-E;}else{W=J-F.dropShadowSteps;}}}}if(ac===""){if(K<t){ac="left";}else{ac="right";}}i.css({top:W+"px"}).removeClass().addClass("clue-"+ac+"-"+r).addClass(" cluetip-"+r);if(F.arrows){var ad=(J-W-F.dropShadowSteps);f.css({top:(/(left|right)/.test(ac)&&K>=0&&ad>0)?ad+"px":/(left|right)/.test(ac)?0:""}).show();}else{f.hide();}j.hide();i.hide()[F.fx.open](F.fx.open!=="show"&&F.fx.openSpeed);if(F.dropShadow){j.css({height:z,width:x}).show();}if(e.fn.bgiframe){i.bgiframe();}if(F.delayedClose>0){P=setTimeout(C,F.delayedClose);}F.onShow(i,h);};var V=function(){Q=false;e("#cluetip-waitimage").hide();if(!F.sticky||(/click|toggle/).test(F.activation)){C();clearTimeout(P);}if(F.hoverClass){u.removeClass(F.hoverClass);}e(".cluetip-clicked").removeClass("cluetip-clicked");};var C=function(){g.parent().hide().removeClass();F.onHide(i,h);if(G){u.attr(F.titleAttribute,G);}u.css("cursor","");if(F.arrows){f.css({top:""});}};if((/click|toggle/).test(F.activation)){u.click(function(Y){if(i.is(":hidden")||!u.is(".cluetip-clicked")){v(Y);e(".cluetip-clicked").removeClass("cluetip-clicked");u.addClass("cluetip-clicked");}else{V(Y);}this.blur();return false;});}else{if(F.activation==="focus"){u.focus(function(Y){v(Y);});u.blur(function(Y){V(Y);});}else{u.click(function(){if(u.attr("href")&&u.attr("href")===D&&!F.clickThrough){return false;}});var p=function(Y){if(F.tracking===true){var aa=K-Y.pageX;var Z=W?W-Y.pageY:J-Y.pageY;u.mousemove(function(ab){i.css({left:ab.pageX+aa,top:ab.pageY+Z});});}};if(e.fn.hoverIntent&&F.hoverIntent){u.mouseover(function(){u.attr("title","");}).hoverIntent({sensitivity:F.hoverIntent.sensitivity,interval:F.hoverIntent.interval,over:function(Y){v(Y);p(Y);},timeout:F.hoverIntent.timeout,out:function(Y){V(Y);u.unbind("mousemove");}});}else{u.hover(function(Y){v(Y);p(Y);},function(Y){V(Y);u.unbind("mousemove");});}}}});};e.fn.cluetip.defaults={width:"auto",height:"auto",cluezIndex:100,positionBy:"auto",topOffset:15,leftOffset:15,local:false,localPrefix:null,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"pointer",arrows:true,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"click",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(k){return true;},onShow:function(k,l){},onHide:function(k,l){},ajaxCache:true,ajaxProcess:function(k){k=k.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,"");k=k.replace(/<(link|title)(.|\s)*?\/(link|title)>/g,"");return k;},ajaxSettings:{dataType:"html"},debug:false};var b="appendTo",a="body";e.cluetip={};e.cluetip.setup=function(k){if(k&&k.insertionType&&(k.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){b=k.insertionType;}if(k&&k.insertionElement){a=k.insertionElement;}};}(jQuery));var polopoly;if(polopoly){throw ("Initialized twice");}var polopoly={};polopoly.service={};polopoly.user={init:function(){this.data=this._initCookie("cata");this.sessionData=this._initCookie("data");},_initCookie:function(c){var a=polopoly.cookie.get(c);if(!a){return;}var d=polopoly.base64.stringDecode(a);if(!d){return;}try{var b=polopoly.json.parse(d);}catch(f){return;}return b;},getServiceSettings:function(b,a){if(!this.data||!this.data[b]){return;}return this.data[b][a];},setServiceSettings:function(c,a,b){if(!this.data){this.data={};}if(!this.data[c]){this.data[c]={};}this.data[c][a]=b;this._persistDataInCookie();},getSessionServiceSettings:function(b,a){if(!this.sessionData||!this.sessionData[b]){return;}return this.sessionData[b][a];},setSessionServiceSettings:function(c,a,b){if(!this.sessionData){this.sessionData={};}if(!this.sessionData[c]){this.sessionData[c]={};}this.sessionData[c][a]=b;this._persistSessionDataInCookie();},_persistDataInCookie:function(){var a=polopoly.json.stringify(this.data);var b=polopoly.base64.stringEncode(a);polopoly.cookie.set("cata",b);},_persistSessionDataInCookie:function(){var a=polopoly.json.stringify(this.sessionData);var b=polopoly.base64.stringEncode(a);polopoly.cookie.setForSession("data",b);},isLoggedIn:function(){var a=polopoly.cookie.get("sessionKey");var c=polopoly.cookie.get("loginName");var b=polopoly.cookie.get("userId");return(a)&&(c)&&(b);},isOnPlant:function(){var a=polopoly.cookie.get("OP");return(a);},isOptimumUser:function(){var a=polopoly.cookie.get("ValidatedOptimumUserID");return(a);},isNewsdaySubscriber:function(){var a=polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));return(a)&&((a=="Premium1")||(a=="Both"));},isSubscriber:function(){var a=polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));return(polopoly.user.isOptimumUser()||polopoly.user.isNewsdaySubscriber()||(a=="CompAccount"));},isSubscriberAll:function(){return(polopoly.user.isOptimumUser()&&polopoly.user.isNewsdaySubscriber());},isMigratedUser:function(){return polopoly.cookie.get("MigratedUser");},name:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("loginName"));},displayName:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("displayName"));},ndNDAL:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));},zipCoords:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("zipcoordinates"));},popMessageCookie:function(a){var f=polopoly.cookie.get(a);var b=polopoly.base64.stringDecode(f);if(b.length){var c;try{c=polopoly.json.parse(b);}catch(d){}return c;}},refreshUserData:function(b,a){jQuery.ajax({"cache":false,"error":b,"success":a,"timeout":3000,"type":"GET","url":"/membership/refresh"});}};polopoly.cookie={clear:function(a){document.cookie=a+"= ; expires=01 Jan 1970 00:00:00 UTC; path=/";},clearDomain:function(a){document.cookie=a+"= ; expires=01 Jan 1970 00:00:00 UTC; domain=newsday.com; path=/";},set:function(a,b){document.cookie=a+"="+b+"; expires=01 Jan 2038 00:00:00 UTC; path=/";},setDomain:function(a,b){document.cookie=a+"="+b+"; expires=01 Jan 2038 00:00:00 UTC; domain=newsday.com; path=/";},setForSession:function(a,b){document.cookie=a+"="+b+"; expires=-1; path=/";},get:function(a){return polopoly.util.stringAsHashValue(a,document.cookie,";");}};polopoly.comments={get:function(b,d,a,c){jQuery.get(b,{"comments":d,"ajax":"true","ot":"example.AjaxPageLayout.ot"},function(e){$(a).html(e);if(c){c(a);}},"html");}};polopoly.fav={get:function(b,d,a,c){jQuery.get(b,{"playlist":d,"ajax":"true","ot":"example.AjaxPageLayout.ot"},function(e){$(a).html(e);if(c){c(a);}},"html");}};polopoly.json={_cx:/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_escapable:/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_gap:null,_indent:null,_meta:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},_rep:null,_f:function(a){return a<10?"0"+a:a;},init:function(){if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+this._f(this.getUTCMonth()+1)+"-"+this._f(this.getUTCDate())+"T"+this._f(this.getUTCHours())+":"+this._f(this.getUTCMinutes())+":"+this._f(this.getUTCSeconds())+"Z";};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf();};}},_quote:function(a){this._escapable.lastIndex=0;return this._escapable.test(a)?'"'+a.replace(this._escapable,function(b){var d=this._meta[b];return typeof d==="string"?d:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+a+'"';},_str:function(h,e){var c,b,j,a,f=this._gap,d,g=e[h];if(g&&typeof g==="object"&&typeof g.toJSON==="function"){g=g.toJSON(h);}if(typeof this._rep==="function"){g=this._rep.call(e,h,g);}switch(typeof g){case"string":return this._quote(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g){return"null";}this._gap+=this._indent;d=[];if(Object.prototype.toString.apply(g)==="[object Array]"){a=g.length;for(c=0;c<a;c+=1){d[c]=this._str(c,g)||"null";}j=d.length===0?"[]":this._gap?"[\n"+this._gap+d.join(",\n"+this._gap)+"\n"+f+"]":"["+d.join(",")+"]";this._gap=f;return j;}if(this._rep&&typeof this._rep==="object"){a=this._rep.length;for(c=0;c<a;c+=1){b=this._rep[c];if(typeof b==="string"){j=this._str(b,g);if(j){d.push(this._quote(b)+(this._gap?": ":":")+j);}}}}else{for(b in g){if(Object.hasOwnProperty.call(g,b)){j=this._str(b,g);if(j){d.push(this._quote(b)+(this._gap?": ":":")+j);}}}}j=d.length===0?"{}":this._gap?"{\n"+this._gap+d.join(",\n"+this._gap)+"\n"+f+"}":"{"+d.join(",")+"}";this._gap=f;return j;}},stringify:function(d,b,c){var a;this._gap="";this._indent="";if(typeof c==="number"){for(a=0;a<c;a+=1){this._indent+=" ";}}else{if(typeof c==="string"){this._indent=c;}}this._rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number")){throw new Error("JSON.stringify");}return this._str("",{"":d});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}this._cx.lastIndex=0;if(this._cx.test(text)){text=text.replace(this._cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");}};function trim11(b){b=b.replace(/^\s+/,"");for(var a=b.length-1;a>=0;a--){if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break;}}return b;}polopoly.util={querystringValue:function(a){return this.stringAsHashValue(a,location.search.substr(1),"&");},stringAsHashValue:function(e,c,b){if(c&&c!==""){var a=c.split(b);for(var d=0;d<a.length;d++){var f=trim11(a[d]);if(f.substring(0,e.length+1)==(e+"=")){return decodeURIComponent(f.substring(e.length+1));}}}}};polopoly.base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",stringDecode:function(a){return this._utf8_decode(this.decode(a));},decode:function(d){try{if(d.length===0){return"";}}catch(c){return"";}d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");d=this._padIfNecessary(d);var a="";var m,k,h;var l,j,g,f;var b=0;do{l=this._keyStr.indexOf(d.charAt(b++)||"=");j=this._keyStr.indexOf(d.charAt(b++)||"=");g=this._keyStr.indexOf(d.charAt(b++)||"=");f=this._keyStr.indexOf(d.charAt(b++)||"=");m=(l<<2)|(j>>4);k=((j&15)<<4)|(g>>2);h=((g&3)<<6)|f;a=a+String.fromCharCode(m);if(g!=64){a=a+String.fromCharCode(k);}if(f!=64){a=a+String.fromCharCode(h);}}while(b<d.length);return a;},_padIfNecessary:function(a){if((a.length%4)===0){return a;}var c=(4-(a.length%4));for(var b=0;b<c;b++){a+="=";}return a;},stringEncode:function(a){return this.encode(this._utf8_encode(a));},encode:function(c){var a="";var k,h,f,j,g,e,d;var b=0;while(b<c.length){k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64;}else{if(isNaN(f)){d=64;}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d);}return a;},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d);}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128);}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128);}}}return a;},_utf8_decode:function(a){var b="";var e=0;var g,f,d=0;while(e<a.length){g=a.charCodeAt(e);if(g<128){b+=String.fromCharCode(g);e++;}else{if((g>191)&&(g<224)){d=a.charCodeAt(e+1);b+=String.fromCharCode(((g&31)<<6)|(d&63));e+=2;}else{d=a.charCodeAt(e+1);c3=a.charCodeAt(e+2);b+=String.fromCharCode(((g&15)<<12)|((d&63)<<6)|(c3&63));e+=3;}}}return b;}};polopoly.loginBox={_login:{"auth":"authError","perm":"permError","down":"downError","default":"defaultError"},init:function(){document.__ppUseDefLogin=false;try{this.defLogin=p_l_i18n.defaultLoginName;}catch(o){this.defLogin="E-mail";}defLogin=this.defLogin;window.setTimeout(this._tryAutoFill,500);jQuery(".not-loggedin .submit").click(function(){var t=jQuery(this).parents(".not-loggedin");var u=t.find(".loginname");var e=t.find(".password");if(u.val()===defLogin&&e.val()===defLogin){u.val("");e.val("");}});var g=polopoly.cookie.get("loginName");var a=polopoly.cookie.get("sessionKey");if(polopoly.user.isLoggedIn()){jQuery(".loggedin").show();jQuery(".loggedin .user-name").append(polopoly.user.displayName());polopoly.cookie.setDomain("nd-dpnm",polopoly.base64.stringEncode(polopoly.user.displayName()));polopoly.cookie.setDomain("nd-lgnm",polopoly.base64.stringEncode(polopoly.user.name()));polopoly.cookie.setDomain("nd-ndal",polopoly.base64.stringEncode(polopoly.user.ndNDAL()));polopoly.cookie.setDomain("nd-zips",polopoly.base64.stringEncode(polopoly.user.zipCoords()));}else{if(polopoly.user.isMigratedUser()){jQuery(".migrated-resetpassword").show();}else{jQuery(".not-loggedin").show();polopoly.cookie.clearDomain("nd-dpnm");polopoly.cookie.clearDomain("nd-lgnm");polopoly.cookie.clearDomain("nd-ndal");polopoly.cookie.clearDomain("nd-zips");}}if(polopoly.user.isNewsdaySubscriber()){jQuery(".newsday-subscriber").show();}else{jQuery(".not-newsday-subscriber").show();}if(polopoly.user.isNewsdaySubscriber()){var s=1000;var q="tnd";var j=846970;var b=new Date();var k=b.getFullYear();var p=b.getMonth();var m=b.getDate();var i=b.getHours();var l=b.getMinutes();var r=b.getSeconds();yearStr=k.toString();p+=1;if(p<10){monthStr="0"+p.toString();}else{monthStr=p.toString();}if(m<10){dayStr="0"+m.toString();}else{dayStr=m.toString();}if(i<10){hourStr="0"+i.toString();}else{hourStr=i.toString();}if(l<10){minuteStr="0"+l.toString();}else{minuteStr=l.toString();}if(r<10){secondStr="0"+r.toString();}else{secondStr=r.toString();}var d=yearStr+monthStr+dayStr+hourStr+minuteStr+secondStr;var f=Number(d);var h=s+f+j;var n="http://www.liveedition.net/newsday/login_tnds.aspx?u="+s.toString()+"&t="+d+"&cs="+h;var c='<a href="'+n+'">Newsday e-Edition</a> ';jQuery(".loggedin .eelink").append(c);}this._trySetError(".not-loggedin .form-error",polopoly.util.querystringValue("login_formerror"));if(polopoly.util.querystringValue("login_formerror")){jQuery("#loginForm").show();}},_trySetError:function(a,b){if(!b){return;}var c=p_l_i18n[this._login[b]]||p_l_i18n[this._login["default"]];jQuery(a).css("display","block").text(c);},_tryAutoFill:function(){if(jQuery(".loginname").val()===""&&jQuery(".password").val()===""){jQuery(".loginname").val(this.defLogin);jQuery(".password").val(this.defLogin);document.__ppUseDefLogin=true;}}};polopoly.util.lrumap=function(b,a){if(b){myMap=b;}else{myMap=[];}if(!a){a=10;}return{map:myMap,size:a,get:function(e){var d=this._findId(e);if(d){var c=this.map[d][1];this._setLeader(d);return c;}},rawMap:function(){return this.map;},put:function(e,d){var c=this._findId(e);if(c){this.map[c]=[e,d];}else{this.map.unshift([e,d]);}if(this.map.length>this.size){this.map.splice(this.size);}},remove:function(d){var c=this._findId(d);if(c){this.map.splice(c,1);}},_findId:function(d){var c=this._findId(d);for(c in this.map){if(this.map[c][0]==d){return c;}}},_setLeader:function(d){var c=this.map[key];this.map.splice(key,1);this.map.unshift(c);}};};polopoly.newslist={create:function(c,h,d,a,i){var b=polopoly.newslist._getNameFromId(c,h);if(!polopoly.newslist.allListIds){polopoly.newslist.allListIds=[];polopoly.newslist.allListIds[h]=d;}if(!polopoly.newslist.defaultListIds){polopoly.newslist.defaultListIds=[];polopoly.newslist.defaultListIds[h]=a;}jQuery("#edit_"+b+" .button").click(function(){jQuery("#"+b+" .settings").slideToggle(100);});var g=this.getSelection(c,h,i);jQuery("#"+b+" :checkbox").removeAttr("checked");for(var f=0;f<g.length;f++){checkedValue="#c"+h.replace(".","_")+"-"+g[f].replace(".","_");jQuery("#"+b+" "+checkedValue).attr("checked","checked");}if(i&&polopoly.user.isLoggedIn()||!i){jQuery("#edit_"+b).show();}var e=jQuery("#"+b+" input.save");if(i){e.click(function(){polopoly.newslist.storeOnServer(c,h);});}else{e.click(function(){polopoly.newslist.storeInCookie(c,h);});}this.updateList(c,h,i);},getSelection:function(c,a,d){var b;if(d){b=polopoly.user.getSessionServiceSettings(c,a);}else{b=polopoly.user.getServiceSettings(c,a);}return b?b:polopoly.newslist.defaultListIds[a];},_storeInCookie:function(d,a,c){var e=jQuery("#"+c+" input:checkbox:checked");var b=[];jQuery.each(e,function(){b[b.length]=this.value;});polopoly.user.setServiceSettings(d,a,b);this.updateList(d,a,false);},_storeInSessionCookie:function(d,a,c){var e=jQuery("#"+c+" input:checkbox:checked");var b=[];jQuery.each(e,function(){b[b.length]=this.value;});polopoly.user.setSessionServiceSettings(d,a,b);this.updateList(d,a,true);},storeInCookie:function(c,a){var b=polopoly.newslist._getNameFromId(c,a);polopoly.newslist._storeInCookie(c,a,b);jQuery("#"+b+" .settings").hide(100);},storeOnServer:function(c,a){var b=polopoly.newslist._getNameFromId(c,a);jQuery("#error_"+b).hide();polopoly.newslist._storeInSessionCookie(c,a,b);jQuery.ajax({"cache":false,"data":{"sdid":c,"siid":a},"error":function(e,f,d){jQuery("#error_"+b+"").show();},"success":function(e,d){jQuery("#"+b+" .settings").hide(100);},"timeout":2000,"type":"POST","url":"/membership/persist"});},updateList:function(d,l,a){var b=polopoly.newslist._getNameFromId(d,l);var k=this.getSelection(d,l,a);if(k.length===0){jQuery("#"+b+" .lists").html("<div class='no_selection'><h4>customize my news and stay on top of what matters to you</h4>Get a quick view of the news and information that is most important to you. Click the 'edit my settings' button below and get started now.</div>");return;}var f=polopoly.newslist.allListIds[l];var c=[];for(var g=0;g<k.length;g++){if(polopoly.newslist._contains(f,k[g])){c.push(k[g]);}}var e=[];var j=c.length;for(g=0;g<c.length;g++){var h=c[g];jQuery.get("/cmlink/"+l,{"topic":h,"mode":"ajax","comment":"true"},function(i,m,n){return function(q){i[m]=q;var r=true;for(var o=0;o<n;o++){if(!i[o]){r=false;}}if(r){var p="";for(o=0;o<n;o++){p+=i[o];}jQuery("#"+b+" .lists").html(p);}};}(e,g,j),"html");}},_contains:function(c,b){if(!c){return false;}for(var a=0;a<c.length;a++){if(c[a]==b){return true;}}return false;},_getNameFromId:function(b,a){return"newsList_"+a.replace(".","_");}};polopoly.passwordMeter={_colors:["#FF0000","#FF0000","#FFCC00","#00CC00","#00FF00"],create:function(d,f){var b="is"+Math.ceil(Math.random()*3000);jQuery(f).html("<div id='"+b+"' style='height: 100%;'></div>");var e=jQuery(f).width();var c=function a(g,h){return function(j){var l=jQuery(d).val();var k=g(l);var i=k>0?Math.ceil(k/4*e):(l.length>0?0.01*e:0);jQuery("#"+b).css("width",i+"px");jQuery("#"+b).css("background-color",h[k]);};}(this._testPassword,this._colors);jQuery(d).keyup(c);},_testPassword:function(a){score=0;if(a.length<5){score+=3;}else{if(a.length>4&&a.length<8){score+=6;}else{if(a.length>7&&a.length<16){score+=12;}else{if(a.length>15){score+=18;}}}}if(a.match(/[a-z]/)){score+=1;}if(a.match(/[A-Z]/)){score+=5;}if(a.match(/\d+/)){score+=5;}if(a.match(/(.*[0-9].*[0-9].*[0-9])/)){score+=5;}if(a.match(/.[!,@,#,$,%,\^,&,*,?,_,~]/)){score+=5;}if(a.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/)){score+=5;}if(a.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){score+=2;}if(a.match(/([a-zA-Z])/)&&a.match(/([0-9])/)){score+=2;}if(a.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/)){score+=2;}if(score<5){return 0;}else{if(score>=5&&score<15){return 1;}else{if(score>=15&&score<30){return 2;}else{if(score>=30&&score<35){return 3;}else{return 4;}}}}}};jQuery().ready(function(){return function(c){var b;for(var a=0;a<c.length;a++){for(b in c[a]){var d=c[a][b];if(typeof(d["init"])=="function"){d.init();}}}}([polopoly,polopoly.service]);});var userId=polopoly.cookie.get("userId");var userIdTmp=polopoly.cookie.get("userIdTmp");var NDAL=polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));if(polopoly.user.isLoggedIn()){var userLoggedIn="true";}else{var userLoggedIn="false";}