if(window.AdServ=window.AdServ||{},window.AdServ.adspaces=window.AdServ.adspaces||window.ba_adspaces||[],window.adServingLoad=window.adServingLoad||"",function(win,doc){"use strict";var AdServ=win.AdServ;AdServ.conf={xhrTimeout:5e3,baseUrl:""};var e=function(s){return eval("("+s+")")};AdServ.parseJSON="object"==typeof JSON?JSON.parse:function(t){t+="";var r=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(r.test(t)&&(t=t.replace(r,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e(t);throw"JSON.parse"},AdServ.get=function(e,t){var r,a;try{a=new XMLHttpRequest}catch(i){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(i){return null}}var n=function(){a.abort(),t("aborted by a timeout",null,a)};return r=setTimeout(n,AdServ.conf.xhrTimeout),a.onreadystatechange=function(){4==a.readyState&&(clearTimeout(r),t(200!=a.status?"err : "+a.status:!1,a.responseText,a))},a.open("GET",e,!0),a.send(),a},AdServ.getJSON=function(e,t){return AdServ.get(e,function(e,r,a){var i=r;e||(i=AdServ.parseJSON(r)),t(e,i,a)})},AdServ.ready=function(e){function t(e){for(h=1;e=a.shift();)e()}var r,a=[],i=!1,n=document,s=n.documentElement,o=s.doScroll,c="DOMContentLoaded",d="addEventListener",l="onreadystatechange",u="readyState",h=/^loade|c/.test(n[u]);return n[d]&&n[d](c,r=function(){n.removeEventListener(c,r,i),t()},i),o&&n.attachEvent(l,r=function(){/^c/.test(n[u])&&(n.detachEvent(l,r),t())}),e=o?function(t){self!=top?h?t():a.push(t):function(){try{s.doScroll("left")}catch(r){return setTimeout(function(){e(t)},50)}t()}()}:function(e){h?e():a.push(e)}}(),AdServ.loadAdspaces=function(e){e||(e=AdServ.conf.baseUrl);var t,r={},a=[];AdServ.ready(function(){if(AdServ.adspaces&&0!=AdServ.adspaces.length){for(t=0;AdServ.adspaces.length>t;t++){var i,n=AdServ.adspaces[t];n.id>0&&(n.context=n.context||"_GLOBAL_",r[n.context]?i=r[n.context]:(i=r[n.context]={name:n.context,adspaces:[],keyword:n.keyword||"",searchword:n.searchword||""},a.push(n.context)),i[n.id]=n,i.adspaces.push(n.id))}var s=function(e,t){t.onload&&"function"==typeof t.onload&&t.onload(e,t),AdServ.emit("campaign",e,t)};for(s.waiting=0,s.results=[],AdServ.on("campaign",function(e,t){s.results.push([e,t]),1>--s.waiting&&(AdServ.onload&&"function"==typeof AdServ.onload&&AdServ.onload(s.results),AdServ.emit("done",s.results))}),t=0;a.length>t;t++){var o=a[t],c=r[o];if(c.adspaces&&c.adspaces.length>0){var d=e+"/api/v1/get/campaigns.json?adspaces="+c.adspaces.join(",")+"&keyword="+c.keyword+"&searchword="+c.searchword;AdServ.getJSON(d,function(t){return function(r,a){if(r)AdServ.emit("error",r),AdServ.emit("campaign",{error:r});else if(a.campaigns){s.waiting+=a.campaigns.length;for(var i=0;a.campaigns.length>i;i++){a.campaigns[i].found=!1;var n=a.campaigns[i];if(n.banner>0){var o=t[n.adspace],c=doc.getElementById(o.target);if(c.innerHTML="",n.campaign&&n.banner&&n.adspace){n.found=!0;var d="script_"+o.target+"_"+n.adspace,l=document.getElementById(d);l?(AdServ.emit("error","already loaded "+d),s.waiting--):(l=document.createElement("script"),l.id=d,l.type="text/javascript",l.async=!1,l.onload=l.onreadystatechange=function(e,t){return function(){s(e,t[e.adspace])}}(n,t),l.src=e+"/api/v1/get/js_banner"+"?adspaceid="+n.adspace+"&campaignid="+n.campaign+"&bannerid="+n.banner+"&appendTo="+o.target,c.parentNode.insertBefore(l,c))}}else s(n,t[n.adspace])}}}}(c))}}}})},AdServ.eventHandlers={},AdServ.on=function(e,t,r){var a=function(){};AdServ.eventHandlers[e]=void 0===AdServ.eventHandlers[e]?[]:AdServ.eventHandlers[e],r="object"==typeof r?r:window,a=function(e){return t.apply(r,Array.prototype.slice.call(e,1))},AdServ.eventHandlers[e].push(a)},AdServ.emit=function(e){if(void 0!==AdServ.eventHandlers[e])for(var t=0;AdServ.eventHandlers[e].length>t;t++)AdServ.eventHandlers[e][t](arguments)}}(window,document),deconcept===void 0)var deconcept={};deconcept.util===void 0&&(deconcept.util={}),deconcept.SWFObjectUtil===void 0&&(deconcept.SWFObjectUtil={}),deconcept.baSWFObject=function(e,t,r,a,i,n,s,o,c,d,l){if(document.createElement&&document.getElementById){this.DETECT_KEY=l?l:"detectflash",this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY),this.params={},this.variables={},this.attributes=[],e&&this.setAttribute("swf",e),t&&this.setAttribute("id",t),r&&this.setAttribute("width",r),a&&this.setAttribute("height",a),i&&this.setAttribute("version",new deconcept.PlayerVersion((""+i).split("."))),this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),s),n&&this.addParam("bgcolor",n);var u=o?o:"high";this.addParam("quality",u),this.setAttribute("useExpressInstall",s),this.setAttribute("doExpressInstall",!1);var h=c?c:window.location;this.setAttribute("xiRedirectUrl",h),this.setAttribute("redirectUrl",""),d&&this.setAttribute("redirectUrl",d)}},deconcept.baSWFObject.prototype={setAttribute:function(e,t){this.attributes[e]=t},getAttribute:function(e){return this.attributes[e]},addParam:function(e,t){this.params[e]=t},getParams:function(){return this.params},addVariable:function(e,t){this.variables[e]=t},getVariable:function(e){return this.variables[e]},getVariables:function(){return this.variables},getVariablePairs:function(){var e,t=[],r=this.getVariables();for(e in r)t.push(e+"="+r[e]);return t},getSWFHTML:function(){var e="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","PlugIn"),e='0&&(e+='flashvars="'+a+'"'),e+="/>"}else{this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","ActiveX"),e='',e+='';var i=this.getParams();for(var r in i)e+='';var n=this.getVariablePairs().join("&");n.length>0&&(e+=''),e+=""}return e},write:function(e){if(this.getAttribute("useExpressInstall")){var t=new deconcept.PlayerVersion([6,0,65]);this.installedVer.versionIsValid(t)&&!this.installedVer.versionIsValid(this.getAttribute("version"))&&(this.setAttribute("doExpressInstall",!0),this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))),document.title=document.title.slice(0,47)+" - Flash Player Installation",this.addVariable("MMdoctitle",document.title))}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var r="string"==typeof e?document.getElementById(e):e;return r.innerHTML=this.getSWFHTML(),!0}return""!=this.getAttribute("redirectUrl")&&document.location.replace(this.getAttribute("redirectUrl")),!1}},deconcept.SWFObjectUtil.getPlayerVersion=function(e,t){var r=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];a&&a.description&&(r=new deconcept.PlayerVersion(a.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")))}else{try{for(var i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),n=3;null!=i;n++)i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+n),r=new deconcept.PlayerVersion([n,0,0])}catch(s){}if(e&&r.major>e.major)return r;if(!e||(0!=e.minor||0!=e.rev)&&r.major==e.major||6!=r.major||t)try{r=new deconcept.PlayerVersion(i.GetVariable("$version").split(" ")[1].split(","))}catch(s){}}return r},deconcept.PlayerVersion=function(e){this.major=null!=parseInt(e[0])?parseInt(e[0]):0,this.minor=parseInt(e[1])||0,this.rev=parseInt(e[2])||0},deconcept.PlayerVersion.prototype.versionIsValid=function(e){return this.majore.major?!0:this.minore.minor?!0:this.rev-1?t.indexOf("&",r):t.length;if(t.length>1&&r>-1)return t.substring(t.indexOf("=",r)+1,a)}return""}},null==Array.prototype.push&&(Array.prototype.push=function(e){return this[this.length]=e,this.length});var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.baSWFObject,baSWFObject=deconcept.baSWFObject;; AdServ.loadAdspaces('/creatives')