var widthContainer,isFirstTime=!0,_timer=0;function deferLogin(){window.jQuery?domReadyLogin():setTimeout(function(){deferLogin()},100)}function domReadyLogin(){setTimeout(function(){"undefined"!=typeof arrInFocus&&animateinFocus()},5e3),jQuery("");var t=jQuery(".newHeaderBanner");jQuery(t[t.length-1]).slideDown(400,function(){t.length-1&&jQuery(t[0]).remove()});var i=jQuery("#hiddenHeaderAdInfo");i.length>0&&void 0!==i.data("id")&&UpdateAdViewCount(i.data("id"),"banner")}}})}}function DisplayAds(){try{var e=jQuery(".linkAdContainer"),t=jQuery("#NewsArticleAdBox"),i=jQuery("#NewArticleAdMiddle"),n=jQuery("#PremiumSponsorTextAdBox"),o=jQuery("#bannerLargeAd"),a=jQuery("#HeaderAdvertise");if(e.length>0&&GetLinkAds(),t.length>0&&(0===o.length&&jQuery("#NewsArticleAdBox").parent().append("
"),GetNewsArticleAd()),i.length,n.length>0&&GetPremiumSponsorsTextAd(),a.length>0){var s=window.location.href.toLowerCase().replace(/^https?:\/\//,"").split("/")[1];-1===["advertiser"].indexOf(s)&&setTimeout(function(){GetHeaderAd()},1e3)}GetNewsArticleLargeAd()}catch(r){console.log("Error while try to bind Ads at login js")}}var _bottom=0,reachedBottom=!1,_TotalLargeBannerScrolled=0;function bindLargeAdScrollEvent(){var e=jQuery("#bannerLargeAd").prev();jQuery(window).scroll(function(){if(jQuery(document).height()-jQuery("#bannerLargeAd").parent().height()>jQuery("#bannerLargeAd").parent().height()){var t=e.offset().top+e.height(),i=window.scrollY;window.scrollY>jQuery(document).height()-jQuery(window).height()-150?(reachedBottom||(reachedBottom=!0,_TotalLargeBannerScrolled=window.scrollY,_bottom=jQuery(document).height()-(jQuery("#bannerLargeAd").offset().top+jQuery("#bannerLargeAd").height())-150),jQuery("#bannerLargeAd").css({position:"fixed",top:"",bottom:_bottom-(_TotalLargeBannerScrolled-i)+"px"})):i>t-50?(reachedBottom=!1,jQuery("#bannerLargeAd").css({position:"fixed",top:"50px",bottom:""})):jQuery("#bannerLargeAd").css({position:"relative",top:""})}})}var isLargeAdAnimation=!1,isAdAnimation=!1,isMiddleAdAnimation=!1;function animatelargeAds(){var e=!0;jQuery(jQuery(".large-ad-child")[1]).animate({right:"50%"},{easing:"swing",duration:300,queue:!0,complete:function(){e&&setTimeout(function(){jQuery(jQuery(".large-ad-child")[0]).remove()},800),e=!1}}),jQuery(jQuery(".large-ad-child")[0]).css("right","50%")}function animateAds(){var e=!0;jQuery(jQuery(".ad-child")[1]).animate({right:"0"},{easing:"swing",duration:300,queue:!0,complete:function(){e&&setTimeout(function(){jQuery(jQuery(".ad-child")[0]).remove()},800),e=!1}}),jQuery(jQuery(".ad-child")[0]).css("right","0")}function animateMiddleAds(){var e=!0;jQuery(jQuery(".middle-ad-child")[1]).animate({right:"0"},{easing:"swing",duration:300,queue:!0,complete:function(){e&&setTimeout(function(){jQuery(jQuery(".middle-ad-child")[0]).remove()},800),e=!1}}),jQuery(jQuery(".middle-ad-child")[0]).css("right","0")}function resendVerificationLink(e){jQuery.ajax({type:"POST",url:"/UserRegistration/LoginCheck.aspx/resendVerificationLink",data:JSON.stringify({EncrypedEmail:e}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(e){!0==e.d&&(jQuery("#verificationPopupHead").html("Verification Email Sent"),jQuery("#InnerBox").html("Verification email has been sent to your email address. Please check your email."))}})}function loadConfirmationStyles(){if(jQuery("#confirmationPopupStyles").length<1){var e="",jQuery("head").append(e)}}String.prototype.toLocalDateTime=function(){var e=new Date(this),t=e.getFullYear(),i=e.getMonth(),n=e.getDate(),o=e.getHours(),a=e.getMinutes(),s=o>=12?" PM":" AM";return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i]+" "+n+", "+t+" "+((o=(o+11)%12+1)<10?"0"+o:o)+":"+(a<10?"0"+a:a)+s};var infocusCounter=0;function animateinFocus(){infocusCounter++,infocusCounter%=arrInFocus.length,jQuery("#InFocus").attr("href",arrInFocus[infocusCounter].Url);var e=arrInFocus[infocusCounter].Title.split("");jQuery("#InFocus").html(""),jQuery.each(e,function(t,i){setTimeout(function(){jQuery("#InFocus").html(jQuery("#InFocus").html()+i),t==e.length-1&&setTimeout(function(){animateinFocus()},4e3)},50*t)})}function getFontsByUrl(e){var t=document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.href=e,t.append(i)}