;/*7P1RCD3H9R0M*/var I10C;(function(I10C){ I10C.ScriptBegin || (I10C.ScriptBegin = function(){}); I10C.ScriptEnd || (I10C.ScriptEnd = function(){});I10C.PostMessage || (I10C.PostMessage = function(){ return this.postMessage.apply(this, arguments); });I10C.Location || (I10C.Location = function i10cloc(ba$e, isWrite, op){ var locat1onPresent = Object.getOwnPropertyNames(ba$e).indexOf('locat1on') !== -1; return (!isWrite) ? ( locat1onPresent ? ba$e.locat1on : (ba$e.location || ba$e.locat1on)) : (locat1onPresent ? {set href(v) {ba$e.locat1on.href = v;}, get href() {return i10cloc(ba$e,false,op);}} : {set href(v) {ba$e.location = v;}, get href() {return i10cloc(ba$e,false,op);}});});})(I10C || (I10C = {}));I10C.ScriptBegin();if(typeof(_fskparameters)=='undefined') { _fskparameters=[]; }if(typeof(fskLib)=='undefined') { fskLib=jQuery; }_fskparameters['_server']='http://api.freeskreen.com';_fskparameters['_pid']='27';_fskparameters['_flc']='';_fskparameters['_slc']='';_fskparameters['_manageUser']=false; _fskparameters['_ups']=''; _fskparameters['_sid']='ysaGKUrklPIsid5';_fskparameters['_eligibleConfig']='';_fskparameters['_confId']='';_fskparameters['_wallType']='';_fskparameters['_featuredOffer']=null;_fskparameters['_redeemUrl']='http://news.nationalpost.com/post-points';_fskparameters['_currentUser']=null;if(!_fskparameters['_clientUrlToLoad']) {_fskparameters['_clientUrlToLoad']='http://api.freeskreen.com/publisher/client?';} if(!_fskparameters['_userUrlToLoad']) {_fskparameters['_userUrlToLoad']='http://api.freeskreen.com/user/widget?';}if(!_fskparameters['_userUrlToLoadLogIn']) {_fskparameters['_userUrlToLoadLogIn']='http://api.freeskreen.com/user/widget/login?';}if(!_fskparameters['_signInUrlToLoad']) {_fskparameters['_signInUrlToLoad']='http://api.freeskreen.com/publisher/login?';}if(!_fskparameters['_pollUrlToLoad']) {_fskparameters['_pollUrlToLoad']='http://api.freeskreen.com/publisher/poll?';}_fskparameters['_zindex']=1100000; _fskparameters['_ut']='KWcrLYqoSBBzuKDYA9sDlv4DMyO0Ob';_fskparameters['_utid']='27';_fskparameters['_uts']='38fa24b0-a91c-4f1e-b87f-faac7c1f3734';if(jQuery('#fsk_user').length==0)jQuery('body').append('
');function Fsk(){this.mainPanel;this.pageUrl=null;this.checked={};this.hasToRefresh=!1;this.listeners=[];this.destructors=[];this.messageHandlers={};this.isMobile={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPad|iPod|iPhone/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return _Fsk.isMobile.Android()|| _Fsk.isMobile.BlackBerry()||_Fsk.isMobile.iOS()||_Fsk.isMobile.Opera()||_Fsk.isMobile.Windows()},iOSVersion:function(){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||0,10)]},UAMobile:function(){var a={};try{_Fsk.isMobile.Android()?(a.os="Android",a.osv=navigator.userAgent.match(/; Android (\d+(?:\.\d+)+)/i)[0].replace("; Android ","")):_Fsk.isMobile.iOS()?(a.os="iOS",a.osv=_Fsk.isMobile.iOSVersion(),a.make="Apple",a.model=navigator.userAgent.match(/iPhone/i)? "iPhone":navigator.userAgent.match(/iPad/i)?"iPad":navigator.userAgent.match(/iPod/i)?"Ipod":""):_Fsk.isMobile.Windows()&&(a.os="Windows")}catch(b){console.log(b)}return a}};this.sliceIdx=-2;I10C.Location(window, false, 0).hostname.match(/\.com\.br$/)&&(this.sliceIdx=-3);this.domain="undefined"!=typeof _fskparameters._cDomain?_fskparameters._cDomain:locat1on.host.split(".").slice(this.sliceIdx).join(".");-1==this.domain.indexOf(".")&&(this.domain=void 0);if("undefined"!=typeof _fskparameters._ut){var m=new Date; m.setDate(m.getDate()+30);document.cookie="fsk_ut_"+_fskparameters._utid+"="+_fskparameters._ut+";expires="+m.toUTCString()+(this.domain?";domain=."+this.domain:"")+";path=/"}"undefined"!=typeof _fskparameters._uts&&(m=new Date,m.setMinutes(m.getMinutes()+30),document.cookie="fsk_uts="+_fskparameters._uts+";expires="+m.toUTCString()+(this.domain?";domain=."+this.domain:"")+";path=/");this.getFSLC=function(){return"&flc="+encodeURIComponent(_fskparameters._flc)+"&slc="+encodeURIComponent(_fskparameters._slc)}; this.getLocation=function(a){var b=document.createElement("a");b.href=a;return b};this.ontouchmove=function(a){_Fsk.isOpened&&a.preventDefault()};this._addMessageHandler=function(a,b){"undefined"==typeof _Fsk.messageHandlers[a]&&(_Fsk.messageHandlers[a]=[]);_Fsk.messageHandlers[a].push(b)};this.registerMessageHandler=function(a,b){"string"==typeof a?_Fsk._addMessageHandler(a,b):_Fsk.each(a,function(a,d){_Fsk._addMessageHandler(d,b)})};this.fskMessageListener=function(a){if(a.data&&"string"==typeof a.data&& (_Fsk.getLocation(a.origin).hostname==_Fsk.getLocation(_fskparameters._server).hostname||_Fsk.getLocation(a.origin).hostname==_Fsk.getLocation("http://sb.freeskreen.com").hostname)){try{var b=JSON.parse(a.data);if("undefined"!=typeof b.ns&&"FSK"==b.ns&&"undefined"!=typeof _Fsk.messageHandlers[b.ev]){_Fsk.each(_Fsk.messageHandlers[b.ev],function(a,d){d(b)});return}}catch(c){}0==a.data.indexOf("fsk_")&&(a=a.data,_Fsk.messageHash!=a&&(_Fsk.messageHash=a,0==_Fsk.messageHash.indexOf("fsk_scroll_top")? window.scrollTo(0,0):0==_Fsk.messageHash.indexOf("fsk_completed_")?(a=_Fsk.messageHash.substring(14),_Fsk.completed(a)):0==_Fsk.messageHash.indexOf("fsk_redirect_")?(a=_Fsk.messageHash.replace("fsk_redirect_",""),I10C.Location(window, false, 0).href=a):0==_Fsk.messageHash.indexOf("fsk_height_")?(a=_Fsk.messageHash.substring(11),_Fsk.updatePageSize(a)):_Fsk.each(_Fsk.listeners,function(a,b){return!b(_Fsk.messageHash)})))}};this.scrollTop=function(){window.scrollTo(0,0)};this.getCookie=function(a){var b=document.cookie, c=b.indexOf(" "+a+"=");-1==c&&(c=b.indexOf(a+"="));-1==c?b=null:(c=b.indexOf("=",c)+1,a=b.indexOf(";",c),-1==a&&(a=b.length),b=unescape(b.substring(c,a)));return b};this.completed=function(a){var b=this.getData("fsk_act"),c="",d=Math.floor((new Date).getTime()/1E3);_Fsk.each(b.split(";"),function(b,e){if(""==e)return!0;if(0!=e.indexOf(a+"="))return c+=e+";",!0;e=e.split("=")[1];var g=e.split("|");g[0]=d;g[1]=0;c+=a+"="+g.join("|")+";"});0!=c.indexOf(a+"=")&&0>=c.indexOf(";"+a+"=")&&(c+=a+"="+d+"|0|"+ d+"|0;");this.setData("fsk_act",c)};this.started=function(a){var b=this.getData("fsk_act"),c="",d=Math.floor((new Date).getTime()/1E3);_Fsk.each(b.split(";"),function(b,e){if(""==e)return!0;if(0!=e.indexOf(a+"="))return c+=e+";",!0;var g=_fskparameters._actConf[""+a].split("|");e=e.split("=")[1];var k=e.split("|");k[3]=0;""!=g[2]&&d-parseInt(k[2])>=parseInt(g[2])?(k[2]=d,k[4]=1):""!=g[2]&&""!=g[4]&&d-parseInt(k[2])=c.indexOf(";"+a+"=")&&(c+=a+"="+d+"|0|"+d+"|0;");this.setData("fsk_act",c)};this.refresh=function(a){var b=this.getData("fsk_act"),c="";(new Date).getTime();_Fsk.each(b.split(";"),function(b,f){if(""==f)return!0;if(0!=f.indexOf(a+"="))return c+=f+";",!0;f=f.split("=")[1];var e=f.split("|");e[3]=parseInt(e[3])+1;e[1]=parseInt(e[1])+1;c+=a+"="+e.join("|")+";"});0!=c.indexOf(a+"=")&&0>=c.indexOf(";"+a+"=")&&(c+=a+"=0|0|0|0|0");this.setData("fsk_act", c)};this.check=function(a,b){if(this.checked&&this.checked[a])return this.checked[a];var c=this.getData("fsk_act"),d="",f=Math.floor((new Date).getTime()/1E3),e=!1;if("undefined"==typeof _fskparameters._actConf)return!1;_Fsk.each(c.split(";"),function(c,k){if(""==k)return!0;if(0!=k.indexOf(a+"="))return d+=k+";",!0;k=k.split("=")[1];var l=k.split("|"),h=_fskparameters._actConf[""+a].split("|"),m=""!=h[3]&&parseInt(l[3])>=parseInt(h[3]);5>l.length&&(l[4]=0);var n=""!=h[2]&&f-parseInt(l[2])>=parseInt(h[2]), n=n||""!=h[2]&&""!=h[4]&&f-parseInt(l[2])=parseInt(h[1]),q=""!=h[0]&&f-parseInt(l[0])>=parseInt(h[0]);(e=(e=(e=""==h[0]&&""==h[1]&&""==h[2]&&""==h[3])||m&&n||m&&""==h[2]||n&&""==h[3])||p&&q||p&&""==h[1]||q&&""==h[0])&&!b?(l[2]=f,l[3]=0):(l[1]=parseInt(l[1])+1,l[3]=parseInt(l[3])+1);d+=a+"="+l.join("|")+";"});0!=d.indexOf(a+"=")&&0>=d.indexOf(";"+a+"=")&&(d+=a+"=0|0|0|0|0;",e=!0);this.setData("fsk_act",d);return this.checked[a]= e};this.getActivity=function(a){var b=this.getData("fsk_act"),c="";_Fsk.each(b.split(";"),function(b,f){if(""==f||0!=f.indexOf(a+"="))return!0;c=f.split("=")[1]});return c};this.parseVideos=function(){var a=this.getData("fsk_v"),b={};_Fsk.each(a.split(";"),function(a,d){if(""==d)return!0;var f=d.split("=")[0];b[f]={};b[f].id=f;var e=d.split("=")[1].split("|");0g.right||cg.bottom);if(!isVisible)return!1;visibleY=Math.min(g.bottom,c)-Math.max(g.top,d);visible=visibleY/a.outerHeight(!1);return visible>=b||isNaN(visible)&&0==a.height()?!0:!1}}_Fsk=new Fsk;document.ontouchmove=_Fsk.ontouchmove;window.postMessage&&_Fsk.addListeners([["message",_Fsk.fskMessageListener]]); _Fsk.viewport=function(){var a=window,b="inner";"innerWidth"in window||(b="client",a=document.documentElement||document.body);return{width:a[b+"Width"],height:a[b+"Height"]}}; _Fsk.openOverlay=function(a,b,c){a||(a="#");this.mainPanel&&document.body.removeChild(this.mainPanel);this.mainPanel=document.createElement("DIV");this.mainPanel.style.position="fixed";this.mainPanel.style.background="transparent";this.mainPanel.style.top="0px";this.mainPanel.style.left="0px";this.mainPanel.style.width="100%";this.mainPanel.style.height="100%";this.mainPanel.style.overflow="visible";this.mainPanel.style.zIndex=_fskparameters._zindex;this.publisherFrame=document.createElement("IFRAME"); this.publisherFrame.id="fsk_publisher";this.publisherFrame.name="fsk_publisher";this.publisherFrame.allowTransparency="true";var d=-1=a?this.pageFrame.style.display="none":(this.pageFrame.style.display="block",this.newHeight=parseInt(a)+50,this.pageFrame.style.height=this.newHeight+"px")}; _Fsk.scanUsers=function(a){var b=document.getElementById("fsk_user_login"),c=document.getElementById("fsk_user");b&&this.refreshUserDiv(b,"fsk_frame_user_login",_fskparameters._userUrlToLoadLogIn,a);c&&this.refreshUserDiv(c,"fsk_frame_user",_fskparameters._userUrlToLoad,a)}; _Fsk.refreshUserDiv=function(a,b,c,d){if(a.hasChildNodes())if(d)a.removeChild(document.getElementById(b));else{I10C.PostMessage.call(document.getElementById(b).contentWindow,"fsk_user_refresh","https://"+_Fsk.getLocation(_fskparameters._server).hostname);return}_Fsk.userHash=null;this.userIframe=document.createElement("IFRAME");this.userIframe.id=b;this.userIframe.name=b;b=c+("pid="+_fskparameters._pid);b+="&sid="+_fskparameters._sid;this.userIframe.setAttribute("src",b);this.userIframe.style.width="100%"; this.userIframe.style.height="100%";this.userIframe.style.border="none";this.userIframe.frameBorder="0";this.userIframe.scrolling="no";a.appendChild(this.userIframe)}; _Fsk.loyaltyMessageListener=function(a){!_Fsk.mainPanel||0!=_Fsk.messageHash.indexOf("fsk_login_")&&0!=_Fsk.messageHash.indexOf("fsk_close")&&0!=_Fsk.messageHash.indexOf("fsk_join_")||(_Fsk.hide(),_Fsk.fireUserRefresh());if(0==a.indexOf("fsk_code_redeem"))return _Fsk.openRedeemCode(),!0;if(0==a.indexOf("fsk_overlay_activated"))return _Fsk.hasToRefresh=!0;if(0==a.indexOf("fsk_overlay_action_")){_Fsk.fireUserRefresh(!0);_Fsk.hasToRefresh=!0;if(0==a.indexOf("fsk_overlay_action_login_")){var b=a.replace("fsk_overlay_action_login_", "");_Fsk.updateCookies("fsk_sid",b)}else _Fsk.updateCookies("fsk_sid","",!0);return!0}if(0==a.indexOf("fsk_logged_"))return b=a.substring(11),_Fsk.updateCookies("fsk_sid",b),I10C.Location(window, false, 0).reload(),!0;if(0==a.indexOf("fsk_oauth_register="))return b=a.replace("fsk_oauth_register=",""),_Fsk.openOverlay("#fsk_join",void 0,b),!0;if("fsk_logout"==a)return _Fsk.updateCookies("fsk_sid","",!0),I10C.Location(window, false, 0).reload(),!0;if(0==a.indexOf("fsk_lost_pwd"))return _Fsk.fireLostPassword(),!0;if(0==a.indexOf("fsk_redeem")){b= _fskparameters._redeemUrl;a=a.split("_");var c="";3==a.length-1&&(c="#fsk_offer/"+a[2]);0