function Ad4Game(n){this.slots=n}function CPMStar(n){this.key=54195;this.slots=n}Ad4Game.prototype={parseGames:function(n){for(var t=0,i=[];t<=n;)t>0&&(ad4game.next(),ad4game.ok()&&i.push(this.parseGame(ad4game))),t++;return i},parseGame:function(n){return{title:n.get_title(20),thumb:n.get_image(140,140),url:n.get_url().replace("&amp;","&")}},renderGames:function(){for(var t=this.parseGames(this.slots.length),n=0;n<t.length;n++)$(this.slots[n]).replaceWith(Game.getTemplate(t[n]))},getGames:function(){var n=document.createElement("script");n.setAttribute("src","http://ads.ad4game.com/www/delivery/edito-select.php?zoneid=41128&limit="+this.slots.length*3);n.onreadystatechange=n.onload=function(){this.renderGames()}.bind(this);document.body.appendChild(n)}};window.Ad4Game=Ad4Game;CPMStar.prototype={defineVariable:function(){window.cpmstar_dynamic_editorials={editorial_1:{cpmstar_pid:this.key,cpmstar_multi:this.slots.length,cpmstar_callback:function(n){this.renderGames(n)}.bind(this)}}},parseGames:function(n){for(var t=[];n.adsLeft();)t.push(this.parseGame(n)),n.nextAd();return t},parseGame:function(n){return{title:n.getTitle(),thumb:n.getImageUrl(90,90),url:n.getLink()}},renderGames:function(n){for(var i=this.parseGames(n),t=0;t<i.length;t++)$(this.slots[t]).replaceWith(Game.getTemplate(i[t]))},getGames:function(){return this.defineVariable(),function(){var n=document.createElement("script");return n.type="text/javascript",n.async=!0,n.src="http://cdn.cpmstar.com/cached/js/textad_async_v100.pack.js",document.body.appendChild(n)}()}};window.CPMStar=CPMStar,function(n,t){"use strict";n.NZN=n.NZN||{};NZN.FacebookNative={parseItens:function(){n.fbAsyncInit=function(){FB.Event.subscribe("ad.loaded",function(){console.log("ad loaded")});FB.Event.subscribe("ad.error",function(n,t){console.log("ad error "+n+": "+t)})},function(t){var i,r=t.getElementsByTagName("script")[0];t.getElementById("facebook-jssdk")||(i=t.createElement("script"),i.id="facebook-jssdk",i.src="//connect.facebook.net/en_US/sdk/xfbml.ad.js#xfbml=1&version=v2.5&appId="+n.FACEBOOK_ID,r.parentNode.insertBefore(i,r))}(t)}}}(window,document);NZN.FacebookNative.parseItens(),function(n,t){"use strict";function u(){var n=i("cpmstar"),t;n.length>0&&(t=new CPMStar(n),t.getGames())}function i(t){return n.map(n(".premium-slots .game.empty"),function(i){if(n(i).data("advertiser")===t)return i})}function r(){}t.NZN=t.NZN||{};NZN.PremiumSlotsCPMStar=function(){u()};r.getTemplate=function(n){return'   <a href="##URL##" title="##TITLE##" target="_blank">     <div class="app_info-container">         <img alt="##TITLE##" src="##THUMB##" width="90" height="90" style="display: block;">         <div class="app_info">             <h3>##TITLE##<\/h3>         <\/div>     <\/div>   <\/a>'.replace(/##URL##/g,n.url).replace(/##TITLE##/g,n.title).replace(/##THUMB##/g,n.thumb)};t.Game=r}(window.jQuery,window,document)