window.__tnt||(window.__tnt={});
(function(m,n,d,g,v){var h=g.ads||(g.ads={}),t=function(a){switch(a){case "slow":return 1E3;case "medium":return 500;case "fast":return 250;case "instant":return 0;default:return 500}},q=function(a){var e=new d.Deferred;switch(a.start_open){case "1":k(a,0);if("0"!==a.auto_limit)setTimeout(function(){k(a)},1E3*a.auto_limit);else d(a.positionDiv).find(".tnt-expandable-small").on("click",function(){k(a)});break;case "2":d(a.positionDiv).on("mouseover mouseout",function(){k(a)});break;case "3":k(a,0);
d(a.positionDiv).find(".tnt-expandable-small").addClass("click-to-close");if("0"!==a.auto_limit)setTimeout(function(){k(a)},1E3*a.auto_limit),d(a.positionDiv).on("mouseover mouseout",function(){k(a)});else if(d(a.positionDiv).find(".tnt-expandable-small").hasClass("click-to-close"))d(a.positionDiv).find(".tnt-expandable-small").on("click hover",function(){k(a)});break;default:d(a.positionDiv).find(".tnt-expandable-small").on("click",function(){k(a)})}e.resolve(a);return e.promise()},u=function(a){var e=
new d.Deferred;a.clickuri&&(d(a.positionDiv).find(".tnt-expandable-big img").wrap(''),0!=a.start_open&&d(a.positionDiv).find(".tnt-expandable-small img").wrap(''));e.resolve(a);return e.promise()},r=function(a){var e=new d.Deferred;d(a.positionDiv).css({position:"relative"});e.resolve(a);return e.promise()},k=function(a,e){var c=new d.Deferred,b=d(a.positionDiv).find(".tnt-expandable-big"),f=0===e?e:t(a.transition_speed);switch(a.overlay_content){case "0":b.addClass("noOverlay");
break;case "1":b.addClass("overlay")}switch(a.transition_direction){case "left":b.css({position:"absolute",top:0,"z-index":999,right:a.width}).stop().animate({width:"toggle"},f);break;case "right":b.css({position:"absolute",top:0,left:a.width,"z-index":999}).stop().animate({width:"toggle"},f);break;case "up":b.css({position:"absolute",bottom:a.height,left:0,"z-index":999}).stop().slideToggle(f);break;default:b.css({left:0,"z-index":999}).stop().slideToggle(f)}c.resolve(a);return c.promise()};h.video=
function(a){if("_popup"==a.region)return!1;if(a.embed)g.video||(g.video={}),g.video.blox||(g.video.blox={}),g.video.blox.ads||(g.video.blox.ads={postroll:[],preroll:[]}),"post"==a.rolltype?g.video.blox.ads.postroll.push(a):g.video.blox.ads.preroll.push(a);else{var e=function(){var c="video/mp4";null!=a.asseturl.match(/\.flv\?/)&&(c="video/x-flv");d(a.positionDiv).addClass("tnt-video-ad-wrapper").append('').attr("data-videoclickuri",a.clickuri);a.autoplay=0').append('');e()}):(videojs.options.flash.swf=
b,e())})}};h.expandable=function(a){l(a,'

'+('
')).then(r(a)).then(u(a)).then(q(a)).then()};h.flashcurl=function(a){if("undefined"!==typeof a.clickuri)var e=a.clickuri.replace(/"/g,""");var c;c=''+('
";c+="
";var b;b=''+('
";b+="
";l(a,a.clickuri?'':
'')};h.curl=function(a){if("undefined"!==typeof a.clickuri)var e=a.clickuri.replace(/"/g,""");var c='',b='';l(a,a.clickuri?'":'")};h.html=function(a){a.width||(a.width=d(a.positionDiv).closest(".tncms-region-ads").prev().data("tnt-ads-tmp").width);l(a,a.html)};h.flash=function(a){var e=(d(a.positionDiv).width()<=a.width?d(a.positionDiv).width():a.width)/a.width,c=e*a.width,b=e*a.height,e="undefined"!==typeof a.clickuri[0]?"http://"+a.clickuri[0].replace(/"/g,"""):null,f="undefined"!==
typeof a.clickuri[1]?"http://"+a.clickuri[1].replace(/"/g,"""):null,c=""+('";l(a,c)};h.flashexpand=function(a){var e='',c='';l(a,e+c).then(r(a)).then(q(a)).then()};h.popup=function(a){function e(){d("#blox-ad-position-_popup1").remove();d("#BlackOutDiv").remove()}var c=n.createElement("div");c.setAttribute("id",
"BlackOutDiv");c.style.position="fixed";c.style.top=0;c.style.left=0;c.style.width="100%";c.style.height="100%";c.style.zIndex=99998;c.style.backgroundColor="black";c.style.opacity=0.9;c.style.filter="alpha(opacity=90)";var b;b='';if("video"==a.type){var f="video/mp4";null!=a.asseturl.match(/\.flv\?/)&&(f="video/x-flv");a.clickuri&&(b+='');
b+=''}else if("text"==a.type){f=p(a);if("undefined"===typeof f||null===f)f="Advertisement";if(a.clickuri){var g=a.clickuri.replace(/"/g,""");b+=''+a.title+""+a.text+'
'+f+" "}else b+=''+a.title+"
"+a.text+'
'+
f+"
"}else"flash"==a.type?(f="undefined"!==typeof a.clickuri[0]?"http://"+a.clickuri[0].replace(/"/g,"""):null,g="undefined"!==typeof a.clickuri[1]?"http://"+a.clickuri[1].replace(/"/g,"""):null,b+='"):"image"==a.type?("undefined"!==typeof a.clickuri&&(f="http://"+a.clickuri.replace(/"/g,""")),b+=""===a.clickuri?'
':'
'):"html"==a.type?(b+='',b+=a.html,b+="
"):"html5"==a.type&&(f=""+("//"+a.cdn+"/content/tncms/ads/__html5/"+a.uuid+"/"+a.html5_id+"/"+a.htmlfile),a.clickuri&&(f+="?clickTag="+encodeURIComponent(a.clickuri)),b+='',b+='",b+="
");b+="";"undefined"!=typeof c.addEventListener?c.addEventListener("click",e,!1):("BackCompat"==n.compatMode&&(c.style.width="110%",c.style.height="110%",c.style.position="absolute"),c.attachEvent("onclick",e));n.getElementsByTagName("body")[0].appendChild(c);TNCMS.AdManager.renderAd(a);l(a,b)};h.image=function(a){if("undefined"!==typeof a.clickuri)var e=
a.clickuri.replace(/"/g,""");if("wallpaper"==a.display){var c="",e="",b=a.height,d=n.getElementsByTagName("body")[0],c=c+(d.style.backgroundImage="url("+a.asseturl+")"),c=c+(d.style.height=b+"px"),c=c+(d.className+=" wallpaper-ad ");a.clickuri&&(e+='')}else e="anchor"==a.display?""===a.clickuri?'
':'
':""===a.clickuri?'
':'
';l(a,e,c)};h.text=function(a){a.width||(a.width=
d(a.positionDiv).closest(".tncms-region-ads").prev().data("tnt-ads-tmp").width);var e=p(a);if("undefined"===typeof e||null===e)e="Advertisement";e=a.clickuri?''+a.title+""+a.text+'
'+e+" ":''+a.title+"
"+a.text+'
'+e+"
";l(a,e)};h._resize=
function(){var a,e=d(m).width();d(m).on("resize",function(){d(m).width()!=e&&(clearTimeout(a),a=setTimeout(function(){h._render()},500),e=d(m).width())})};h._render=function(){d("div[data-tnt-ads]").each(function(a,e){var c=-1=b.width,f=320>=b.width&&320==d(m).width(),g=728>=b.width&&768==d(m).width(),h=d(this).is(":visible"),k="wallpaper"==b.display,l="popup"==b.display&&!1==s;if((c||f||g)&&h||
k||l)s=!0,"position"==b.type&&TNCMS.AdManager.render({region:b.region,slot:b.slot,fold:b.fold,width:b.width,display:b.display})})};var p=function(a){if(d(a.positionDiv).closest(".tncms-region-ads").prev().attr("data-tnt-ads-tmp"))var e=d(a.positionDiv).closest(".tncms-region-ads").prev().data("tnt-ads-tmp").overline;else d(a.positionDiv).attr("data-tnt-ads")&&(e=d(a.positionDiv).data("tnt-ads").overline);return e},l=function(a,e){var c=new d.Deferred,b="";"anchor"==a.display&&(b+=" tnt-ads-anchor alert ");
"popup"==a.display&&(b+=" tnt-ads-popup ");b+="tnt-"+a.type+"-ad-wrapper";b=["tnt-ads",b].join(" ");"wallpaper"==a.display?(d("#wallpaper-left").empty().append(e),d("#wallpaper-right").empty().append(e)):"popup"==a.display?d(a.positionDiv).empty().removeAttr("style").removeClass().addClass(b).css({"max-width":a.width+"px","max-height":a.height+"px"}).append(e):(d(a.positionDiv).empty().removeAttr("style").removeClass().addClass(b).css({"max-width":a.width+"px"}).append(e),320==d(m).width()&&320>=
a.width&&a.width>d(a.positionDiv).width()&&(b=Math.round((d(a.positionDiv).width()-a.width)/2),d(a.positionDiv).css({margin:"0 "+b+"px"})));"text"!=a.type&&(b=p(a))&&1>d(a.positionDiv).siblings(".tnt-ads-overline").length&&(b=''+b+"
",d(a.positionDiv).before(b));c.resolve(a);return c.promise()},s=!1})(window,document,jQuery,__tnt);