void 0===window.GMData&&(GMData={},GMData.version="",GMData.protocol=document.location.protocol,GMData.env=function(){function a(a){return b[a]}var b={};try{b=JSON.parse('{"log_level":"warn","player_debug":false,"player_benchmarking":false,"root_url":"//adg.bzgint.com/pub/adg/","collector_url":"//gmpx.bzgint.com/collectorx/","banner_url":"//adg.bzgint.com/pub/adg/banner.js","adg_file":"adg.js","config_file":"config.js","banner_file":"gmbanner.js","data":"data.js","combined_adg":"combined_adg.js","combined_banner":"combined_banner.js","banner":"build/gmbanner.js","player":"player.swf","express":"expressInstall.swf","template":"templateVars/","style_files":"style_files/","data_url":"//adg.bzgint.com/pub/adg/data.js","esearch_host":"//rtd.elasticsearch.genesismedia.com","cookie_service":"//php.genesismedia.com/cookie/cookie.php","geolocation":"//telize.genesismedia.com/geoip","replacement_script":"//php.genesismedia.com/banner/domain.php","img_asset_path":"//adg.bzgint.com/pub/adg/img/","img_files":"img/","nasa_score_type":"complete_score","whitelist_domains":[],"whitelist_params":[],"privacy":"//s3.amazonaws.com/gm-privacy/privacy.html","build":"84","build_date":"2017-5-16 15:31:33"}')}catch(a){console.log("[GMData] - Can not parse env json")}return{get:a}}(),GMData.log_level=GMData.env.get("log_level"),GMData.root_url=GMData.protocol+GMData.env.get("root_url"),GMData.adg_file=GMData.root_url+GMData.env.get("adg_file"),GMData.banner_file=GMData.root_url+GMData.env.get("banner_file"),GMData.data_url=GMData.protocol+GMData.env.get("data_url"),GMData.banner_url=GMData.env.get("banner_url"),GMData.loadSmartCookieTag=function(){if(navigator&&navigator.platform){var a=!1;if("iP"===navigator.platform.substr(0,2)){var b=/constructor/i.test(window.HTMLElement),c=window.navigator,d=c.userAgent,e=!!window.indexedDB;-1===d.indexOf("Safari")||-1===d.indexOf("Version")||c.standalone?!e&&b||!window.statusbar.visible?a=!0:(window.webkit&&window.webkit.messageHandlers||!b||e)&&(a=!0):a=!1}if(!a){var f=document.createElement("IFRAME");f.onload=function(){if(navigator&&navigator.platform){var a=!1;if("iP"===navigator.platform.substr(0,2)){var b=/constructor/i.test(window.HTMLElement),c=window.navigator,d=c.userAgent,e=!!window.indexedDB;-1===d.indexOf("Safari")||-1===d.indexOf("Version")||c.standalone?!e&&b||!window.statusbar.visible?a=!0:(window.webkit&&window.webkit.messageHandlers||!b||e)&&(a=!0):a=!1}if(!a){(new Image).src="//rtb-csync.smartadserver.com/h/cs/cn?cname=adserver.genesismediaus.com&ts=636208827421283906"}}},f.src="//csync.smartadserver.com/rtb/csync/CookieSync.html?nwid=1316&dcid=4",f.scrolling="no",f.frameBorder=0,f.width=0,f.height=0,f.style.margin=0,f.style.padding=0,f.style.display="none",f.style.width="0px",f.style.height="0px",f.style.visibility="hidden",null!=document.body&&document.body.appendChild(f)}}},"complete"===document.readyState?GMData.loadSmartCookieTag():window.attachEvent?window.attachEvent("onload",GMData.loadSmartCookieTag):window.addEventListener("load",GMData.loadSmartCookieTag,!1),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){for(var b=this,c=0;c0)){n={};for(var b=0;b0)){k={};for(var b=0;b-1}var g={xdc:!0,pub_id:""};return{get:a,getAll:b,set:d}}(),GMData.Setup=function(){function a(){GMData.Logger.info("[Setup] Run"),GMData.SettingsHandler.set(GMData.PubSettings().getAllSettings()),GMData.PageViewData.init(),GMData.SessionData.init(),GMData.PianoEventHandler.init(),window.GMUserCookieService=function(a){GMData.UserData.getUserCookieInstance().asyncCookieCallback(a)},GMData.UserData.init(),GMData.AdData.init(),GMData.ADGEventHandler.init("START"),GMData.BannerEventHandler.init("START"),GMData.GeoLocation.load(),GMData.HIDHandler.init(),GMData.VendorAdapter.onDataLoad(),void 0!==ADG&&ADG.API&&GMData.ADGInterface.init(ADG.API.getSettings()),GMData.Browser.addEvent(window,"message",GMData.ADGInvoker.messageCallback)}function b(){GMData.Audience.load(),GMData.Audience.fireAudienceLoaded()}return{run:a,runOnAsyncLoad:b}}(),GMData.Timer=function(){function a(){return c}function b(){return GMData.DateUtils.getDateDifferenceInSeconds(new Date,c)}var c=new Date;return{getLoadedTime:a,getTimeAfterLoad:b}}(),GMData.ESHandler=function(){function a(a){if(GMData.Logger.log("[ESHandler] Setting verticals"),void 0!==a._source&&void 0!==a._source.verticals)for(var b in a._source.verticals)GMData.Vertical.set(b,a._source.verticals[b])}function b(a){if(GMData.Logger.log("[ESHandler] Setting NASA feedback"),void 0!==a._source&&a._source.exploration&&void 0!==a._source[j][i].capped_weights){GMData.Feedback.useNASAExploration();for(var b in a._source[j][i].capped_weights)GMData.Feedback.set(b,a._source[j][i].capped_weights[b])}else if(void 0!==a._source&&void 0!==a._source[i].capped_weights)for(var c in a._source[i].capped_weights)GMData.Feedback.set(c,a._source[i].capped_weights[c])}function c(c){if(!c)return GMData.Feedback.setNASAUnusedReason("noDocument"),[];var d=c.hits;if(!d||!d.hits||0===d.total)return GMData.Feedback.setNASAUnusedReason("noDocument"),[];for(var e=0;e0)return!0;return!1}function b(a){return"undefined"!==q[a]?q[a]:null}function c(a,b){q[a]=b}function d(a){p=a.replace(/\s/g,"").split(","),f()}function e(){return q}function f(){for(var a in q)p.indexOf(a)<=-1&&delete q[a]}function g(){return a()?q:void 0}function h(){s=!0}function i(){return s}function j(){t=!0}function k(){return t}function l(){u=!0}function m(){return u}function n(a){r=a}function o(){return r}var p,q={1:0,3:0,4:0,6:0,7:0,8:0},r="",s=!1,t=!1,u=!1;return{get:b,set:c,setPubAllowedIntercepts:d,getPubAllowedIntercepts:e,getAll:g,useNASA:h,isNASAUsed:i,useNASAExploration:j,isNASAExplorationUsed:k,setNASAEnable:l,isNASAEnable:m,setNASAUnusedReason:n,getNASAUnusedReason:o}}(),GMData.PARHandler=function(){function a(a){var b=GMData.URL.getSanitizedUrl(),c=JSON.stringify(a).replace(/__URL_HERE__/gi,b);return JSON.parse(c)}function b(b){if(g(),!b.enabled)return void(j.processed=!0);if("undefined"!=typeof GMPreProcessedPAR){if("fetching"===GMPreProcessedPAR.status)return;if("fetched"===GMPreProcessedPAR.status)return void e(GMData.ESHandler.formatHits(GMPreProcessedPAR))}j.fields=b.fields,GMData.Logger.debug("[PARHandler] initializing ");var c={host:GMData.env.get("esearch_host"),index:j.config.alias,responseCallback:f,query:a(j.query)};GMData.ESHandler.init(c),GMData.ESHandler.load()}function c(a){for(var b in a)a.hasOwnProperty(b)&&(j[b]=a[b])}function d(a){return j.hasOwnProperty(a)?j[a]:null}function e(a){f(a)}function f(a){j.processed=!0;var b={},c=!1;if(0!==a.length){for(var d=0;d-1&&(!i||a[d]._source["@timestamp"]>i)&&(c=a[d]._source,i=c["@timestamp"]);c&&(c.hasOwnProperty("24_hour")&&c["24_hour"].hasOwnProperty("ad_metrics")&&(j.score=c["24_hour"].ad_metrics.par,isNaN(c["24_hour"].ad_metrics.par)||""===c["24_hour"].ad_metrics.par||(j.par=Math.round(h(Number(c["24_hour"].ad_metrics.par).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.completion_rank)||""===c["24_hour"].ad_metrics.completion_rank||(j.vtr=Math.round(h(Number(c["24_hour"].ad_metrics.completion_rank).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.skip_rank)||""===c["24_hour"].ad_metrics.skip_rank||(j.skr=Math.round(h(Number(c["24_hour"].ad_metrics.skip_rank).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.ad_starts)||""===c["24_hour"].ad_metrics.ad_starts||(j.ads=Math.round(h(Number(c["24_hour"].ad_metrics.ad_starts).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.fill_rate)||""===c["24_hour"].ad_metrics.fill_rate||(j.flr=Math.round(h(Number(c["24_hour"].ad_metrics.fill_rate).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.util_rate)||""===c["24_hour"].ad_metrics.util_rate||(j.ulr=Math.round(h(Number(c["24_hour"].ad_metrics.util_rate).toFixed(2)))),isNaN(c["24_hour"].ad_metrics.percentage_video_watched)||""===c["24_hour"].ad_metrics.percentage_video_watched||(j.pvw=Math.round(h(Number(c["24_hour"].ad_metrics.percentage_video_watched).toFixed(2))))),j.result=b,j.response=!0)}}function g(){j.par=0,j.vtr=0,j.skr=0,j.ads=0,j.flr=0,j.ulr=0,j.pvw=0}function h(a){return a<1?(a%1!=0&&(a*=100),a):100}var i,j={config:{alias:"rankings",method:"POST"},enabled:!0,processed:!1,query:{size:200,query:{filtered:{filter:{bool:{must:[{and:[{term:{url:"__URL_HERE__"}},{or:[{exists:{field:"verticals"}},{exists:{field:"hashedurl"}},{range:{"@timestamp":{gte:"now-1h",lte:"now"}}}]}]}],_cache:!0}}}}},fields:[],score:void 0,percentageFields:["vtr","intention","interaction"],result:void 0};return{get:d,set:c,init:b,setPARResults:e}}(),GMData.PageViewData=function(){function a(){d=(new Date).getTime(),null===e.page_view_id&&(e.page_view_id=GMData.Utils.generateUUID())}function b(a){return e[a]}function c(){return d||(d=(new Date).getTime()),(new Date).getTime()-d}var d,e={page_view_id:null};return{init:a,get:b,getSequenceTS:c}}(),GMData.PianoEventHandler=function(){function a(){j={},k=[],GMData.Browser.addEvent(document,"pressPlusLightboxOpen",c),GMData.Browser.addEvent(document,"pressPlusLightboxNotOpen",d),GMData.Browser.addEvent(document,"pressPlusMeterOn",b)}function b(){k.push("pressPlusMeterOn"),g("pressPlusMeterOn")}function c(){k.push("pressPlusLightboxOpen"),g("pressPlusLightboxOpen")}function d(){k.push("pressPlusLightboxNotOpen"),g("pressPlusLightboxNotOpen")}function e(a,b){if("function"==typeof a&&(j=j||{},b)){if(b instanceof Array)for(var c=0;c32766?(GMData.SessionData.setSessionID(GMData.Utils.generateUUID()),GMData.SessionData.setBeginDate((new Date).valueOf()),GMData.SessionData.setSessionDepth(0),GMData.SessionData.setSessionReferrer(),a.setCookie(b()),GMData.SessionData.setExpiryTime(a.getExpiryIfSet()),eventType.fireEvent("SESSION_INIT")):(GMData.SessionData.setSessionID(a.getValue("ssid")),GMData.SessionData.setBeginDate(a.getValue("begindate")),GMData.SessionData.setSessionDepth(a.getValue("ssdepth")),GMData.SessionData.setSessionReferrer(a.getValue("referrer")),a.setCookie(b()),GMData.SessionData.setExpiryTime(a.getExpiryIfSet()))}function b(){return"ssid="+GMData.SessionData.get("session_id")+"|ssdepth="+GMData.SessionData.get("session_depth")+"|referrer="+GMData.SessionData.get("referrer")+"|begindate="+GMData.SessionData.get("begin_date")}var c={cookie_name:"gmdata.session",expiry_units:"minutes",expiry_duration:30};return{init:a}},GMData.SiteUserCookieHandler=function(){function a(){return e}function b(){return{userId:e,returningUser:g}}function c(a){return"suid="+a}var d,e="",f={cookie_name:"gmdata.site_user",expiry_duration:1,expiry_units:"years"},g=!0;return function(){if(!GMData.Utils.cookiesEnabled())return GMData.Logger.debug("GMData: Cookies are disabled..."),void GMData.UserData.set("user_id","uid_do_not_track");d=new GMData.Cookie,d.init(f.cookie_name,f.expiry_duration,f.expiry_units),e=d.getValue("suid"),e&&"0"!==e?d.setCookie(c(e)):(e=GMData.Utils.generateUUID(),d.setCookie(c(e)),g=!1)}(),{getUserId:a,getUser:b}},GMData.UserCookieHandler=function(){function a(){return eventType=new GMData.Event("user"),GMData.SettingsHandler.get("xdc")?GMData.Utils.cookiesEnabled()?(b(),void d.getCookie()):(GMData.Logger.debug("GMData: Cookies are disabled..."),GMData.UserData.set("user_id","uid_do_not_track"),void GMData.UserData.setReturningUser(!1)):void GMData.Logger.debug("[GMData]-[UserCookieHandler]-XDC Disabled Exiting")}function b(){d=new GMData.RemoteCookie,d.init(e.remote_cookie_name,e.expiry_duration,e.expiry_units,e.cookie_service)}function c(a){"service_failure"!==a&&"service_disabled"!==a&&(d.setCookieStatus(a.genesis_user),GMData.UserData.setUserID(a.genesis_user),a.gm_opt_out_cookie?(d.setCookie("opted_out_user"),GMData.Audience.setOptOutState(!0)):"opted_out_user"===GMData.UserData.get("user_id")&&(GMData.UserData.setUserID(GMData.Utils.generateUUID()),d.setCookie(GMData.UserData.get("user_id")),GMData.Audience.setOptOutState(!1))),!a.gm_opt_out_cookie&&GMData.SettingsHandler.get("xdc"),GMData.Setup.runOnAsyncLoad()}var d,e={cookie_name:"gmdata.user",remote_cookie_name:"gmdata.remoteuser",expiry_duration:1,expiry_units:"years",cookie_service:GMData.protocol+GMData.env.get("cookie_service")};return{init:a,asyncCookieCallback:c}},GMData.ADGEventHandler=function(){function a(a){e=a,f=[a],d=new GMData.StateHandler}function b(a){var b=g[e];if(void 0===g[e])return GMData.Logger.error("[EventHandler] - Event '"+e+"' doesn't have possible next events."),!1;if(d&&!d.shouldFireEvent(a))return GMData.Logger.debug("[EventHandler] - Event '"+a+"' not fired because dependencies not resolved."),!1;if(-1===b.indexOf(a)){if(!i[a])return GMData.Logger.error("[EventHandler] - NO VALID TRANSITION from event '"+e+"' to event '"+a+"'."),!1;if(-1===i[a].indexOf(e))return GMData.Logger.error("[EventHandler] - Non Transition event : "+a+" not possible with current event : "+e),!1}return i[a]||(GMData.Logger.debug("[EventHandler] - Transitioning from event '"+e+"' to event '"+a+"'."),e=a),(void 0===h[a]||!h[a])&&(void 0===h[a]||h[a]||(h[a]=!0),f.push(a),GMData.Logger.debug("[EventHandler] - Event stack: ["+f+"]"),!0)}function c(){return f}var d,e="START",f=["START"],g={START:["TAG_LOADED"],TAG_LOADED:["FREE_VIEW_ALLOWED","INVALID_CONFIG","PASSBACK_SENT","UI_LOADED","UI_LOAD_FAILURE"],FREE_VIEW_ALLOWED:["PASSBACK_SENT","AD_STOPPED","FREE_VIEW_ALLOWED"],UI_LOADED:["AD_OPPORTUNITY","AD_REQUEST","PASSBACK_SENT","AD_LOAD_FAILURE","FREE_VIEW_ALLOWED"],AD_OPPORTUNITY:["PASSBACK_SENT","AD_RESPONSE_RECEIVED","NO_AD_RESPONSE"],AD_LOAD_FAILURE:["FREE_VIEW_ALLOWED","AD_REQUEST","AD_LOAD_FAILURE","PASSBACK_SENT"],UI_LOAD_FAILURE:["PASSBACK_SENT","FREE_VIEW_ALLOWED"],AD_RESPONSE_RECEIVED:["AD_REQUEST","AD_LOADED","AD_LOAD_FAILURE","PASSBACK_SENT"],AD_REQUEST:["FREE_VIEW_ALLOWED","PASSBACK_SENT","AD_RESPONSE_RECEIVED","NO_AD_RESPONSE","AD_LOAD_FAILURE","AD_LOADED"],NO_AD_RESPONSE:["PASSBACK_SENT","AD_LOAD_FAILURE","FREE_VIEW_ALLOWED"],PASSBACK_SENT:["AD_LOAD_FAILURE","UI_LOADED","UI_LOAD_FAILURE","FREE_VIEW_ALLOWED"],AD_LOADED:["FREE_VIEW_ALLOWED","UNIT_DISPLAYED","PASSBACK_SENT","AD_START","AD_LOAD_FAILURE","CLOSE_ACTIVE","AD_STOPPED"],UNIT_DISPLAYED:["AD_IMPRESSION","CLICK_TO_PLAY","AD_START","ABANDON","SKIP","AD_VIDEO_START","SKIP_ENABLED","AD_LOAD_FAILURE","UNIT_CLOSED","CLOSE_CLICKED","AD_STOPPED"],CLICK_TO_PLAY:["AD_START","AD_VIDEO_START"],CLOSE_CLICKED:["UNIT_CLOSED","FEEDBACK","AD_STOPPED","AD_COMPLETE"],AD_START:["SKIP","CLICK_TO_PLAY","AD_VIDEO_START","ABANDON","UNIT_DISPLAYED","AD_STOPPED","SKIP_ENABLED","SKIP_DISPATCHED","CLOSE_ACTIVE","FEEDBACK"],AD_VIDEO_START:["SKIP","AD_FIRST_QUARTILE","ABANDON","UNIT_DISPLAYED","AD_COMPLETE","AD_STOPPED","SKIP_ENABLED","CLOSE_CLICKED","UNIT_CLOSED","CLOSE_ACTIVE"],AD_FIRST_QUARTILE:["SKIP","SKIP_ENABLED","AD_SECOND_QUARTILE","ABANDON","AD_STOPPED","CLOSE_CLICKED","CLOSE_ACTIVE"], AD_SECOND_QUARTILE:["SKIP_ENABLED","SKIP","AD_THIRD_QUARTILE","ABANDON","AD_STOPPED","CLOSE_CLICKED","CLOSE_ACTIVE"],AD_THIRD_QUARTILE:["SKIP_ENABLED","SKIP","AD_COMPLETE","ABANDON","AD_STOPPED","CLOSE_CLICKED","CLOSE_ACTIVE"],AD_STOPPED:["UNIT_CLOSED","FEEDBACK","AD_LOAD_FAILURE","AD_STOPPED","HOVER_ON_PLAYER","CLOSE_CLICKED","AD_CLICK_THROUGH","AD_LOADED","MOBILE_DOCKED"],SKIP:["UNIT_CLOSED","FEEDBACK"],SKIP_ENABLED:["SKIP","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","ABANDON","AD_STOPPED","CLOSE_CLICKED","CLOSE_ACTIVE"],AD_COMPLETE:["AD_STOPPED","UNIT_CLOSED","ABANDON","FEEDBACK"],FEEDBACK:["UNIT_CLOSED","ABANDON","AD_STOPPED"],ABANDON:["END","FEEDBACK"],UNIT_CLOSED:["END"],AD_IMPRESSION:["UNIT_DISPLAYED"]},h={HOVER_ON_PLAYER:!1,UNMUTED_ON_HOVER:!1,AD_CLICK_THROUGH:!1,SESSION_INIT:!1,ELIGIBLE_AD_PLAYBACK:!1,ELIGIBLE_AD_START:!1,SKIP_ENABLED:!1,SKIP_DISPATCHED:!1,CLOSE_ACTIVE:!1,CLOSE_CLICKED:!1,UNMUTED_BYUSER:!1,MUTED_BYUSER:!1,SOUNDICON_HOVERED:!1,MOBILE_DOCKED:!1,MOBILE_REPLAYED:!1,AD_STOPPED:!1,FREE_VIEW_ALLOWED:!1},i={HOVER_ON_PLAYER:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],UNMUTED_ON_HOVER:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],AD_CLICK_THROUGH:["AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","SKIP_ENABLED","UNIT_DISPLAYED"],MUTE_CLICKED:["AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","SKIP_ENABLED","UNIT_DISPLAYED"],ELIGIBLE_AD_PLAYBACK:["AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED"],ELIGIBLE_AD_START:["UNIT_DISPLAYED","AD_START","AD_VIDEO_START","CLICK_TO_PLAY","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","SKIP_ENABLED"],SKIP_DISPATCHED:["AD_VIDEO_START","UNIT_DISPLAYED","SKIP_ENABLED"],CLOSE_ACTIVE:["AD_START","AD_VIDEO_START","UNIT_DISPLAYED","SKIP_ENABLED"],AD_IMPRESSION:["AD_START","AD_VIDEO_START","UNIT_DISPLAYED"],UNMUTED_BYUSER:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],MUTED_BYUSER:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],SOUNDICON_HOVERED:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],MOBILE_DOCKED:["UNIT_DISPLAYED","SKIP_ENABLED","CLICK_TO_PLAY","AD_START","AD_VIDEO_START","AD_FIRST_QUARTILE","AD_SECOND_QUARTILE","AD_THIRD_QUARTILE","AD_COMPLETE","SKIP_ENABLED","CLOSE_CLICKED","FEEDBACK"],MOBILE_REPLAYED:["UNIT_CLOSED","FEEDBACK","AD_LOAD_FAILURE","AD_STOPPED","HOVER_ON_PLAYER"]};return{init:a,isValidTransition:b,getEventStack:c}}(),GMData.BannerEventHandler=function(){function a(a){current_event=a,e=[a],d=new GMData.StateHandler}function b(a){return e.push(a),!0}function c(){return e}var d,e=[];return{init:a,isValidTransition:b,getEventStack:c}}(),GMData.Event=function(a){function b(a){for(var b=0;b0),pe:!!GMData.ADGInterface.get("passback_url"),br:GMData.UserAgent.name,bv:GMData.UserAgent.version.replace(/\..*/g,""),skt:GMData.ADGInterface.get("skip_time"),mskt:GMData.ADGInterface.get("max_skip_time"),pvid:GMData.PageViewData.get("page_view_id"),rf:GMData.URL.getSanitizedReferrer(),ssrf:GMData.URL.sanitizeDomain(GMData.SessionData.get("referrer")),ssid:GMData.SessionData.get("session_id"),uid:GMData.UserData.get("user_id"),suid:GMData.UserData.get("site_user_id"),ssd:GMData.SessionData.get("session_depth"),ts:(new Date).getTime(),lt:(new Date).getTime(),mode:m.adg,pid:GMData.SettingsHandler.get("pub_id"),nas:GMData.Feedback.isNASAUsed(),nes:GMData.Feedback.isNASAExplorationUsed(),naf:GMData.Feedback.isNASAEnable(),plid:GMData.ADGInterface.get("placement"),sts:GMData.PageViewData.getSequenceTS(),fv:GMData.ADGInterface.get("flash_version"),pgid:GMData.ADGInterface.get("placement_id"),fmtid:GMData.ADGInterface.get("ad_url_config").fmtid},GMData.Feedback.isNASAUsed()||""===GMData.Feedback.getNASAUnusedReason()||(a.nur=GMData.Feedback.getNASAUnusedReason())),"banner"===j.tagType&&(a={tpc:"adg",dn:GMData.URL.getDomain(),sid:GMData.ADGInterface.get("site_id"),url:GMData.URL.getSanitizedUrl(),br:GMData.UserAgent.name,dv:GMData.UserAgent.deviceType,os:GMData.UserAgent.os,bv:GMData.UserAgent.version.replace(/\..*/g,""),pvid:GMData.PageViewData.get("page_view_id"),ssid:GMData.SessionData.get("session_id"),uid:GMData.UserData.get("user_id"),suid:GMData.UserData.get("site_user_id"),ssd:GMData.SessionData.get("session_depth"),lang:window.navigator.language,rf:GMData.URL.getSanitizedReferrer(),ru:GMData.UserData.get("returning_user"),ssrf:GMData.URL.sanitizeDomain(GMData.SessionData.get("referrer")),iid:GMData.BannerInterface.get("intercept_id"),ts:(new Date).getTime(),lt:(new Date).getTime(),pid:GMData.SettingsHandler.get("pub_id"),mode:m.banner,sts:GMData.PageViewData.getSequenceTS()}),"page"===j.tagType&&(a={tpc:"adg",dn:GMData.URL.getDomain(),sid:GMData.ADGInterface.get("site_id"),url:GMData.URL.getSanitizedUrl(),br:GMData.UserAgent.name,dv:GMData.UserAgent.deviceType,os:GMData.UserAgent.os,bv:GMData.UserAgent.version.replace(/\..*/g,""),pvid:GMData.PageViewData.get("page_view_id"),ssid:GMData.SessionData.get("session_id"),uid:GMData.UserData.get("user_id"),suid:GMData.UserData.get("site_user_id"),ssd:GMData.SessionData.get("session_depth"),lang:window.navigator.language,rf:GMData.URL.getSanitizedReferrer(),ru:GMData.UserData.get("returning_user"),ssrf:GMData.URL.sanitizeDomain(GMData.SessionData.get("referrer")),ts:(new Date).getTime(),lt:(new Date).getTime(),pid:GMData.SettingsHandler.get("pub_id"),sts:GMData.PageViewData.getSequenceTS()}),"session"===j.tagType&&(a={tpc:"adg",dn:GMData.URL.getDomain(),sid:GMData.ADGInterface.get("site_id"),url:GMData.URL.getSanitizedUrl(),br:GMData.UserAgent.name,bv:GMData.UserAgent.version.replace(/\..*/g,""),pvid:GMData.PageViewData.get("page_view_id"),ssid:GMData.SessionData.get("session_id"),uid:GMData.UserData.get("user_id"),suid:GMData.UserData.get("site_user_id"),rf:GMData.URL.getSanitizedReferrer(),ssd:GMData.SessionData.get("session_depth"),ssrf:GMData.URL.sanitizeDomain(GMData.SessionData.get("referrer")),dv:GMData.UserAgent.deviceType,os:GMData.UserAgent.os,ts:(new Date).getTime(),lt:(new Date).getTime(),pid:GMData.SettingsHandler.get("pub_id"),sts:GMData.PageViewData.getSequenceTS()}),"user"===j.tagType&&(a={tpc:"adg",dn:GMData.URL.getDomain(),sid:GMData.ADGInterface.get("site_id"),url:GMData.URL.getSanitizedUrl(),br:GMData.UserAgent.name,bv:GMData.UserAgent.version.replace(/\..*/g,""),pvid:GMData.PageViewData.get("page_view_id"),rf:GMData.URL.getSanitizedReferrer(),ssid:GMData.SessionData.get("session_id"),ssd:GMData.SessionData.get("session_depth"),ssrf:GMData.URL.sanitizeDomain(GMData.SessionData.get("referrer")),uid:GMData.UserData.get("user_id"),suid:GMData.UserData.get("site_user_id"),ts:(new Date).getTime(),lt:(new Date).getTime(),pid:GMData.SettingsHandler.get("pub_id"),sts:GMData.PageViewData.getSequenceTS()}),GMData.Utils.getParametersAsKeyValueString(a,!0)}function e(a,b){var c={},d=a.customParams||[];if("adg"===j.tagType&&(d=d.concat(o)),void 0!==d)for(var e,f=0;f=0?GMData.Browser.addEvent(window,"pagehide",k):GMData.Browser.addEvent(window,"beforeunload",k),r=setInterval(e,100)}function c(){return!!(x&&y||!x&&!y)}function d(){!1===w&&v&&c()&&(A+=100)}function e(){c()&&A<3e3?A+=100:(clearInterval(r),q=setInterval(d,100))}function f(){GMData.Browser.removeEvent(document,"mousemove",f),v=!0,w&&(w=!1,s=setInterval(g,100))}function g(){z<30?z++:(clearInterval(s),z=0,w=!0,GMData.Browser.addEvent(document,"mousemove",f))}function h(a){E.indexOf(a.target.id)>-1||(GMData.Browser.removeEvent(document.documentElement,"click",h),t.fireEvent("PAGE_CLICK"))}function i(){var a=GMData.scrollDepth();C=0?GMData.Browser.removeEvent(window,"pagehide",k):GMData.Browser.removeEvent(window,"beforeunload",k),u?t.fireEvent("PAGE_UNLOAD",{atsop:A,tsop:GMData.PageViewData.getSequenceTS(),sc:B,pl:o(),msd:C,pvd:D,sket:GMData.ADGInterface.getCalculatedSkipTime(),sid:GMData.ADGInterface.get("site_id")}):t.fireEvent("PAGE_UNLOAD",{atsop:A,tsop:GMData.PageViewData.getSequenceTS(),sc:B,pl:o(),msd:C,pvd:D,sket:GMData.ADGInterface.getCalculatedSkipTime(),sid:GMData.ADGInterface.get("site_id"),fpv:Math.round(100*GMData.ADGInterface.getVolume())})}function l(){GMData.Logger.debug("[HIDHandler] startAdTracking"),y=!0,j()}function m(){GMData.Logger.debug("[HIDHandler] endAdTracking"),x=!0}function n(){return A}function o(){return Math.round(document.height||document.body.offsetHeight)}function p(){u=!0}var q,r,s,t,u=!1,v=!1,w=!0,x=!1,y=!1,z=0,A=0,B=0,C=0,D=0,E=["gmbClose"];return{init:a,startAdTracking:l,endAdTracking:m,getAtsop:n,freeViewAllowedFired:p}}(),GMData.PageEventHandler=function(){function a(a){current_event=a,e=[a],d=new GMData.StateHandler}function b(a){return current_event=a,(void 0===f[a]||!f[a])&&(void 0===f[a]||f[a]||(f[a]=!0,e.push(a)),e.push(a),!0)}function c(){return e}var d,e=[],f={PAGE_SCROLL:!1,PAGE_CLICK:!1,PAGE_UNLOAD:!1,PAGE_SCROLL_AD_TO_TOP:!1};return{init:a,isValidTransition:b,getEventStack:c}}(),GMData.SessionEventHandler=function(){function a(a){current_event=a,e=[a],d=new GMData.StateHandler}function b(a){return e.push(a),!0}function c(){return e}var d,e=[];return{init:a,isValidTransition:b,getEventStack:c}}(),GMData.StateHandler=function(){function a(){return{AD_LOAD_FAILURE:!c.NO_AD_RESPONSE,UNIT_CLOSED:c.UNIT_DISPLAYED,SKIP:c.SKIP_ENABLED}}function b(b){var d=a();return!(void 0!==d[b]&&!d[b])&&(void 0!==c[b]&&(c[b]=!0),!0)}var c={UNIT_DISPLAYED:!1,NO_AD_RESPONSE:!1,SKIP_ENABLED:!1};return{shouldFireEvent:b}},GMData.UserEventHandler=function(){function a(a){current_event=a,e=[a],d=new GMData.StateHandler}function b(a){return e.push(a),!0}function c(){return e}var d,e=[];return{init:a,isValidTransition:b,getEventStack:c}}(),GMData.MoatInterface=function(){function a(a){switch(a.event){case"dataReady":f=b(a);break;case"adVideoStart":case"adVideoFirstQuartile":case"adVideoMidpoint":case"adVideoThirdQuartile":case"adVideoComplete":case"adStopped":case"muteClicked":case"adPaused":case"adPlaying":c(a)}}function b(a){var b=document.getElementById("adgSwfWrapper"),c={level1:a.adId||a.campaignId,level2:a.bannerId||a.insertionId,level3:a.creativeId||GMData.ADGInterface.get("site_id"),pvid:GMData.PageViewData.get("page_view_id"),domain:GMData.URL.getDomain()};a.pageId&&(c.level4=a.pageId);var d=a.mediaFile||"";return GMData.initMoat(b,c,0,g,d)}function c(a){var c={adVideoStart:"AdVideoStart",adVideoFirstQuartile:"AdVideoFirstQuartile",adVideoMidpoint:"AdVideoMidPoint",adVideoThirdQuartile:"AdVideoThirdQuartile",adVideoComplete:"AdVideoComplete",adStopped:"AdStopped",muteClicked:"AdVolumeChange",adPaused:"AdPaused",adPlaying:"AdResumed"};f||(f=b(a)),f.dispatchEvent({type:c[a.event],adVolume:e()}),GMData.Logger.debug("[MoatInterface]-[fireEvent] - "+a.event),d()}function d(){if(!h&&"undefined"!=typeof CUPlayerInstance&&CUPlayerInstance.duration&&CUPlayerInstance.duration()>0){f.adData.duration=0,f.dispatchEvent({type:"ADTimeRemaining",volume:e(),duration:CUPlayerInstance.duration()}),GMData.Logger.debug("[MoatInterface]-[fireEvent] - ADTimeRemaining"),h=!0}}function e(){return"undefined"!=typeof CUPlayerInstance&&CUPlayerInstance.volume?"number"==typeof CUPlayerInstance.volume?CUPlayerInstance.volume:CUPlayerInstance.volume():0}var f,g="genesismediajsint1250150215154",h=!1;return{eventsCB:a}}(),GMData.VendorAdapter=function(){function a(){d.executeMediaMetrix()}function b(){GMData.Logger.debug("[VendorAdapter] onVideoStart -> data tag"),d.executeComscore({id:GMData.ADGInterface.get("comscore_id"),name:GMData.ADGInterface.get("comscore_name")})}function c(){GMData.Logger.debug("[VendorAdapter] onAdStart -> data tag"),e.load()}var d=function(){function a(a,b){(new Image).src=b?a+"?"+b:a}function b(a){var b=f.replace("##id##",a.id||h);return b=b.replace("##c3##",a.name||i)}function c(c){a(b(c))}function d(){var a=g.replace("##id##",h);return a=a.replace("##c3##",j)}function e(){a(d())}var f="http://b.scorecardresearch.com/p?c1=1&c2=##id##&c3=##c3##&c5=01&cv=2.0&cj=1",g="http://b.scorecardresearch.com/p?c1=7&c2=##id##&c3=##c3##&cv=2.0&cj=1",h="16170130",i="adg",j="7109298320131093";return{executeComscore:c,executeMediaMetrix:e}}(),e=function(){function a(a){var b=document.createElement("script");b.type="text/javascript",b.src=a,document.getElementsByTagName("head")[0].appendChild(b)}function b(){g.gmSiteID=document.location.host,void 0!==ADG?(g.gmAdId=ADG.PlayerAdapter.getAdId(),g.gmInsertionId=ADG.PlayerEvents.getInsertionId(),g.environment="ad"):g.environment="data",a(e())}function c(a){return g.hasOwnPorperty(a)?g[a]:""}function d(a){for(var b in a)g.hasOwnProperty(b)&&(g[b]=a[b])}function e(){var a=f.replace("[CAMPAIGNID]",g.gmAdId||g.gmInsertionId);return a=a.replace("[DATAORAD]",g.environment),a=a.replace("[GENESISDOMAIN]",g.gmSiteID)}var f="http://b.voicefive.com/c2/19765422/rs.js#c1=3&c3=19765422_vme&c4=[CAMPAIGNID]&c5=[DATAORAD]|[GENESISDOMAIN]&c6=&c10=1&c11=&c13=&c16=gen&ax_vme=2&",g={gmSiteID:"",gmAdId:"",gmInsertionId:"",environment:"data"};return{load:b,set:d,get:c,buildMdotUrl:e}}();return{onDataLoad:a,onVideoStart:b,onAdStart:c}}(),GMData.initMoat=function(a,b,c,d,e){GMData.Logger.info("[InitMoat] Setting up Moat");var f=window.location.protocol,g="https:"===f?"z":"js",h=document.createElement("script"),i=[],j={adData:{ids:b,duration:c,url:e},dispatchEvent:function(a){this.sendEvent?(i&&(i.push(a),a=i,i=!1),this.sendEvent(a)):i.push(a)}},k="_moatApi"+Math.floor(1e8*Math.random());return window[k]=j,h.type="text/javascript",a&&a.insertBefore(h,a.childNodes[0]||null),h.src=f+"//"+g+".moatads.com/"+d+"/moatvideo.js#"+k,j},GMData.DateUtils=function(){function a(a,b){return(a.getTime()-b.getTime())/1e3}function b(a){var b=new Date(a);b.setDate(a.getDate()-1);var c=b.getDate(),d=b.getMonth()+1,e=b.getFullYear();return c<10&&(c="0"+c),d<10&&(d="0"+d),e+"."+d+"."+c}function c(a){var b=new Date(a);b.setMinutes(b.getMinutes()-60);var c=b.getUTCDate(),d=b.getUTCMonth()+1,e=b.getUTCHours(),f=b.getUTCFullYear();return c<10&&(c="0"+c),d<10&&(d="0"+d),e<10&&(e="0"+e),f+"."+d+"."+c+"."+e}return{getDateDifferenceInSeconds:a,getPreviousDayString:b,getPreviousHourString:c}}(),GMData.Logger=function(){function a(a){void 0!==a.enabled&&(j=a.enabled),void 0!==a.level&&(k=a.level)}function b(){return k}function c(a){k=a}function d(){return j}function e(a,b){if(d())switch(b){case"debug":f(a);break;case"info":g(a);break;case"warn":h(a);break;case"error":i(a);break;default:g(a)}}function f(a){d()&&log_levels.debug>=log_levels[k]&&("object"==typeof a?console.dir(a):console.debug("[DEBUG] - [DATA] - "+a))}function g(a){d()&&log_levels.info>=log_levels[k]&&console.info("[INFO] - [DATA] - "+a)}function h(a){d()&&log_levels.warn>=log_levels[k]&&console.warn("[WARNING] - [DATA] - "+a)}function i(a){d()&&log_levels.error>=log_levels[k]&&console.error("[ERROR] - [DATA] - "+a)}window.console=window.console||{},console.log=console.log||function(){},console.debug=console.debug||console.log,console.dir=console.dir||console.log,console.info=console.info||console.log,console.warn=console.warn||console.log,console.error=console.error||console.log;var j=!0,k=GMData.log_level;return log_levels={debug:0,info:1,warn:2,error:3},{init:a,getLevel:b,setLevel:c,isEnabled:d,log:e,debug:f,info:g,warn:h,error:i}}();var GMTracker=function(){function a(a,c){return"string"!=typeof a?(GMData.Logger.log("GMTracker ::: No given eventName, not pixel sent"),!1):(GMData.Utils.shootPixel(e(),b(a,c)),!0)}function b(a,b){var e="",f=d(b)||"";return e="evt="+a+"&"+c(),f&&(e+="&"+f),e}function c(){var a={uid:GMData.UserData.get("user_id"),br:GMData.UserAgent.name,bv:GMData.UserAgent.version.replace(/\..*/g,""),dt:GMData.UserAgent.deviceType,url:GMData.URL.getUrlWithoutProtocol(),pvid:GMData.PageViewData.get("page_view_id"),ts:(new Date).getTime()};return GMData.Utils.getParametersAsKeyValueString(a,!0)}function d(a){if("object"==typeof a)return GMData.Utils.getParametersAsKeyValueString(a,!0);GMData.Logger.warn("GMTracker ::: no customParams received/customParams wrong type: pixel will be shoot without custom data")}function e(){var a=GMData.URL.getDomain();return GMData.protocol+GMData.env.get("collector_url")+a+"/"}return{trackEvent:a}}();if(GMData.scrollDepth=function(){function a(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}function b(){return window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop||0}function c(){return Math.max(document.body.scrollHeight||0,document.documentElement.scrollHeight||0,document.body.offsetHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0,document.documentElement.clientHeight||0)}return function(){return Math.floor((b()+a())/c()*100)}()},function(a,b){"use strict";var c="model",d="name",e="type",f="vendor",g="version",h="mobile",i="tablet",j={extend:function(a,b){var c={};for(var d in a)b[d]&&b[d].length%2==0?c[d]=b[d].concat(a[d]):c[d]=a[d];return c},has:function(a,b){return"string"==typeof a&&-1!==b.toLowerCase().indexOf(a.toLowerCase())},lowerize:function(a){return a.toLowerCase()},major:function(a){return"string"==typeof a?a.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},k={rgx:function(){var a,b,c,d,e,f,g={},h=0,i=arguments;for(c=0;c0?2===d.length?"function"==typeof d[1]?g[d[0]]=d[1].call(this,f):g[d[0]]=d[1]:3===d.length?"function"!=typeof d[1]||d[1].exec&&d[1].test?g[d[0]]=f?f.replace(d[1],d[2]):void 0:g[d[0]]=f?d[1].call(this,f,d[2]):void 0:4===d.length&&(g[d[0]]=f?d[3].call(this,f.replace(d[1],d[2])):void 0):g[d]=f||void 0;h+=2}return g},str:function(a,b){for(var c in b)if("object"==typeof b[c]&&b[c].length>0){for(var d=0;d0?f:d}function d(a,b){var c=b.parentNode;c.lastchild===b?c.appendChild(a):c.insertBefore(a,b.nextSibling)}function e(a){if(!a)return 0;var b=0;do{b+=a.offsetTop||0,a=a.offsetParent}while(a);return b}function f(a){if(a){return(a.getBoundingClientRect().left||0)+"x"+(a.getBoundingClientRect().top||0)}}function g(a){if(9===ADG.SettingsHandler.get("placement"))return!!a&&p;if(!a)return!1;var b=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,f=d+b,g=e(a),h=g+a.offsetHeight,i=a.getBoundingClientRect().left||0,j=a.getBoundingClientRect().right||a.offsetWidth,k=document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,l=k+c,m=Math.abs(a.clientHeight)/2,n=Math.abs(a.clientWidth)/2;if(m<=0||n<=0)return!1;var o=h-m<=f&&g+m>=d,q=a.offsetWidth<=c&&i>=k&&j<=l;return o&&q}function h(a){return(document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,f=d+b,g=e(a),h=g+a.offsetHeight,i=a.getBoundingClientRect().left||0,j=a.getBoundingClientRect().right||a.offsetWidth,k=document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,l=k+c,m=hf,n=jl;return m||n}function k(a){if(!a)return!1;var b=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,d=c+b,f=e(a),g=f+a.offsetHeight;return Math.round(f-(d-c-(g-f))/2)}function l(a){a||(a=window.event),a.preventDefault&&a.preventDefault(),a.returnValue=!1}function m(){document.onmousewheel=function(){l()},document.addEventListener&&document.addEventListener("DOMMouseScroll",l,!1)}function n(){document.onmousewheel=null,document.addEventListener&&document.removeEventListener("DOMMouseScroll",l,!1)}function o(a){p=a}var p=!1;return{getPosition:f,attachElementToHead:a,getElementsByClassName:b,insertAfter:d,isElementFullyVisible:g,isElementFullyInvisible:j,isElementBelowScreen:h,getCenterPosition:k,disableMouseWheel:m,enableMouseWheel:n,setVisibility:o,$:c}}(),GMData.Logger=function(){function a(a){void 0!==a.enabled&&(l=a.enabled),void 0!==a.level&&(m=a.level)}function b(){return m}function c(a){m=a}function d(){return l}function e(a,b){if(d())switch(b){case"performance":case"debug":g(a);break;case"info":h(a);break;case"warn":i(a);break;case"error":j(a);break;default:h(a)}}function f(a){d()&&console.log(a)}function g(a){d()&&log_levels.debug>=log_levels[m]&&("object"==typeof a?console.dir(a):console.debug("[DEBUG] - [GMData] - "+a))}function h(a){d()&&log_levels.info>=log_levels[m]&&console.info("[INFO] - [GMData] - "+a)}function i(a){d()&&log_levels.warn>=log_levels[m]&&console.warn("[WARNING] - [GMData] - "+a)}function j(a){d()&&log_levels.error>=log_levels[m]&&console.error("[ERROR] - [GMData] - "+a)}function k(a){!d()||log_levels[m]0?b[0].replace(/\//gi,""):""}function b(){var a=[],b=h(!0),c=b.match(/(^(\w+)\.(\w+)\.(\w{1,3}))/);c&&c.length>2&&a.push(c[2]);var d=b.match(/(\/([\w|-]*(?=\/|\?)))/gi);return d&&d.length>0&&a.push(d[0].replace(/\//gi,"")),a}function c(a,b,c){var d,e,f,g=!!a.match(/adtech/gi),h=!!a.match(/genesismedia/gi),i=encodeURIComponent("=");if(g){for(d in b)b.hasOwnProperty(d)&&"undefined"!==b[d]&&(b[d]instanceof Array?a+=";KV"+d+"="+b[d].join(","):a+=";KV"+d+"="+b[d]);if(c)for(d in c)c.hasOwnProperty(d)&&c[d]&&(c[d]instanceof Array?a+=";KV"+d+"="+c[d].join(","):a+=";KV"+d+"="+c[d])}else if(h){for(d in b)if(b.hasOwnProperty(d)&&"undefined"!==b[d])if(b[d]instanceof Array)for(e=b[d],f=0;f0?2===d.length?"function"==typeof d[1]?g[d[0]]=d[1].call(this,f):g[d[0]]=d[1]:3===d.length?"function"!=typeof d[1]||d[1].exec&&d[1].test?g[d[0]]=f?f.replace(d[1],d[2]):void 0:g[d[0]]=f?d[1].call(this,f,d[2]):void 0:4===d.length&&(g[d[0]]=f?d[3].call(this,f.replace(d[1],d[2])):void 0):g[d]=f||void 0;h+=2}return g},str:function(a,b){for(var c in b)if("object"==typeof b[c]&&b[c].length>0){for(var d=0;d0&&(c=c.substring(0,c.length-1)),b||(c+="&ts="+j()+"&tz="+k()),c}function j(){return(new Date).getTime()}function k(){return-1*(new Date).getTimezoneOffset()/60}function l(){document.cookie="cookietest=1";var a=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",a}function m(a){var b=/^(\d{1,3}\.){3}\d{1,3}$/,c=/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/;return b.test(a)&&c.test(a)?a:null}return{trim:a,round:b,shootPixels:c,shootPixel:e,generateUUID:d,addJS:f,cookiesEnabled:l,getNumberValue:g,isEmpty:h,validateIPv4Address:m,getUTC_TimeStamp:j,getParametersAsKeyValueString:i}}(),GMData.XDomainRequest=function(){function a(a,b,c){var d=new XDomainRequest;if(!a.url)return void GMData.Logger.warn("GMData.XDomainRequest - AJAX: URL not present");d.open(a.method||"GET",a.url),c&&(d.onerror=c),d.onload=function(){b&&b(d.responseText)},d.onprogress=function(){},d.ontimeout=function(){},setTimeout(function(){d.send(a.data||null)},0)}return{load:a}},GMData.XMLHttpRequest=function(){function a(a,b,c){var d=new XMLHttpRequest;if(!a.url)return void GMData.Logger.warn("GMData.XMLHttpRequest - AJAX: URL not present");if(d.open(a.method||"GET",a.url),a.headers)for(var e=a.headers.length-1;e>=0;e--)header=a.headers[e],header.name&&header.value&&d.setRequestHeader(header.name,header.value);c&&(d.onerror=c),d.onreadystatechange=function(){4===this.readyState&&b&&b(this.response)},d.send(a.data||null)}return{load:a}},GMData.Logger.init({enabled:!0,level:GMData.log_level}),GMData.AjaxManager.init(),GMData.PARHandler.init({enabled:!0,fields:[{name:"retention_rank_hr",cutoff:0}]}),GMData.Setup.run(),ADG=window.ADG||{},Array.prototype.indexOf||(Array.prototype.indexOf=function(a){for(var b=this,c=0;c0?f:d}function d(a,b){var c=b.parentNode;c.lastchild===b?c.appendChild(a):c.insertBefore(a,b.nextSibling)}function e(a){if(!a)return 0;var b=0;do{b+=a.offsetTop||0,a=a.offsetParent}while(a);return b}function f(a){if(a){return(a.getBoundingClientRect().left||0)+"x"+(a.getBoundingClientRect().top||0)}}function g(a){if(9===ADG.SettingsHandler.get("placement"))return!!a&&p;if(!a)return!1;var b=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,f=d+b,g=e(a),h=g+a.offsetHeight,i=a.getBoundingClientRect().left||0,j=a.getBoundingClientRect().right||a.offsetWidth,k=document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,l=k+c,m=Math.abs(a.clientHeight)/2,n=Math.abs(a.clientWidth)/2;if(m<=0||n<=0)return!1;var o=h-m<=f&&g+m>=d,q=a.offsetWidth<=c&&i>=k&&j<=l;return o&&q}function h(a){return(document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,f=d+b,g=e(a),h=g+a.offsetHeight,i=a.getBoundingClientRect().left||0,j=a.getBoundingClientRect().right||a.offsetWidth,k=document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,l=k+c,m=hf,n=jl;return m||n}function k(a){if(!a)return!1;var b=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,d=c+b,f=e(a),g=f+a.offsetHeight;return Math.round(f-(d-c-(g-f))/2)}function l(a){a||(a=window.event),a.preventDefault&&a.preventDefault(),a.returnValue=!1}function m(){document.onmousewheel=function(){l()},document.addEventListener&&document.addEventListener("DOMMouseScroll",l,!1)}function n(){document.onmousewheel=null,document.addEventListener&&document.removeEventListener("DOMMouseScroll",l,!1)}function o(a){p=a}var p=!1;return{getPosition:f,attachElementToHead:a,getElementsByClassName:b,insertAfter:d,isElementFullyVisible:g,isElementFullyInvisible:j,isElementBelowScreen:h,getCenterPosition:k,disableMouseWheel:m,enableMouseWheel:n,setVisibility:o,$:c}}(),ADG.Logger=function(){function a(a){void 0!==a.enabled&&(l=a.enabled),void 0!==a.level&&(m=a.level)}function b(){return m}function c(a){m=a}function d(){return l}function e(a,b){if(d())switch(b){case"performance":case"debug":g(a);break;case"info":h(a);break;case"warn":i(a);break;case"error":j(a);break;default:h(a)}}function f(a){d()&&console.log(a)}function g(a){d()&&log_levels.debug>=log_levels[m]&&("object"==typeof a?console.dir(a):console.debug("[DEBUG] - [ADG] - "+a))}function h(a){d()&&log_levels.info>=log_levels[m]&&console.info("[INFO] - [ADG] - "+a)}function i(a){d()&&log_levels.warn>=log_levels[m]&&console.warn("[WARNING] - [ADG] - "+a)}function j(a){d()&&log_levels.error>=log_levels[m]&&console.error("[ERROR] - [ADG] - "+a)}function k(a){!d()||log_levels[m]0?b[0].replace(/\//gi,""):""}function b(){var a=[],b=h(!0),c=b.match(/(^(\w+)\.(\w+)\.(\w{1,3}))/);c&&c.length>2&&a.push(c[2]);var d=b.match(/(\/([\w|-]*(?=\/|\?)))/gi);return d&&d.length>0&&a.push(d[0].replace(/\//gi,"")),a}function c(a,b,c){var d,e,f,g=!!a.match(/adtech/gi),h=!!a.match(/genesismedia/gi),i=encodeURIComponent("=");if(g){for(d in b)b.hasOwnProperty(d)&&"undefined"!==b[d]&&(b[d]instanceof Array?a+=";KV"+d+"="+b[d].join(","):a+=";KV"+d+"="+b[d]);if(c)for(d in c)c.hasOwnProperty(d)&&c[d]&&(c[d]instanceof Array?a+=";KV"+d+"="+c[d].join(","):a+=";KV"+d+"="+c[d])}else if(h){for(d in b)if(b.hasOwnProperty(d)&&"undefined"!==b[d])if(b[d]instanceof Array)for(e=b[d],f=0;f0?2===d.length?"function"==typeof d[1]?g[d[0]]=d[1].call(this,f):g[d[0]]=d[1]:3===d.length?"function"!=typeof d[1]||d[1].exec&&d[1].test?g[d[0]]=f?f.replace(d[1],d[2]):void 0:g[d[0]]=f?d[1].call(this,f,d[2]):void 0:4===d.length&&(g[d[0]]=f?d[3].call(this,f.replace(d[1],d[2])):void 0):g[d]=f||void 0;h+=2}return g},str:function(a,b){for(var c in b)if("object"==typeof b[c]&&b[c].length>0){for(var d=0;d0&&(c=c.substring(0,c.length-1)),b||(c+="&ts="+j()+"&tz="+k()),c}function j(){return(new Date).getTime()}function k(){return-1*(new Date).getTimezoneOffset()/60}function l(){document.cookie="cookietest=1";var a=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",a}function m(a){var b=/^(\d{1,3}\.){3}\d{1,3}$/,c=/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/;return b.test(a)&&c.test(a)?a:null}return{trim:a,round:b,shootPixels:c,shootPixel:e,generateUUID:d,addJS:f,cookiesEnabled:l,getNumberValue:g,isEmpty:h,validateIPv4Address:m,getUTC_TimeStamp:j,getParametersAsKeyValueString:i}}(),ADG.XDomainRequest=function(){function a(a,b,c){var d=new XDomainRequest;if(!a.url)return void ADG.Logger.warn("ADG.XDomainRequest - AJAX: URL not present");d.open(a.method||"GET",a.url),c&&(d.onerror=c),d.onload=function(){b&&b(d.responseText)},d.onprogress=function(){},d.ontimeout=function(){},setTimeout(function(){d.send(a.data||null)},0)}return{load:a}},ADG.XMLHttpRequest=function(){function a(a,b,c){var d=new XMLHttpRequest;if(!a.url)return void ADG.Logger.warn("ADG.XMLHttpRequest - AJAX: URL not present");if(d.open(a.method||"GET",a.url),a.headers)for(var e=a.headers.length-1;e>=0;e--)header=a.headers[e],header.name&&header.value&&d.setRequestHeader(header.name,header.value);c&&(d.onerror=c),d.onreadystatechange=function(){4===this.readyState&&b&&b(this.response)},d.send(a.data||null)}return{load:a}},ADG.Close=function(){function a(){l={enabled:!0,active:!1},ADG.Logger.debug("[Close Button] Initialized"),l.enabled=!1!==ADG.SettingsHandler.get("close_button")&&c(),j=new ADG.Subject,k=new ADG.Observer,k.notify=d,ADG.PlayerEvents.getSubject().addObserver(k),l.enabled}function b(){if(l.enabled&&!l.active){var a;a=l,a.event="closeActive",a.active=!0,j.notify(a),i=(new Date).getTime(),ADG.Logger.debug("[Close Button]- Notifying active")}}function c(){return!(3!==ADG.SettingsHandler.get("placement")||!ADG.SettingsHandler.get("close_button"))}function d(a){switch(a.event){case"adStarted":c&&b()}}function e(a){return l[a]}function f(){return l.active}function g(){return j}function h(){return l}var i,j,k,l={};return{init:a,isActive:f,playerObserver:k,getSubject:g,get:e,getAll:h,activateClose:b}}(),ADG.ExternalInterface=function(){function a(){z=z||{},z.all=z.all||[],x=new ADG.Observer,x.notify=c,ADG.SetupHandler.getSubject().addObserver(x),q=new ADG.Observer,q.notify=c,ADG.PlayerEvents.getSubject().addObserver(q),r=new ADG.Observer,ADG.Skip.getSubject().addObserver(r),r.notify=c,s=new ADG.Observer,ADG.Close.getSubject().addObserver(s),s.notify=c,t=new ADG.Observer,ADG.UnitWrapper.getSubject().addObserver(t),t.notify=c,templateObserver=new ADG.Observer,ADG.TemplateHandler.getSubject().addObserver(templateObserver),templateObserver.notify=c,u=new ADG.Observer,ADG.PassbackHandler.getSubject().addObserver(u),u.notify=c,v=new ADG.Observer,ADG.FreeViewHandler.getSubject().addObserver(v),v.notify=c,w=new ADG.Observer,ADG.FeedbackHandler.getSubject().addObserver(w),w.notify=c,y=new ADG.Observer,ADG.NonLockingHandler.getSubject().addObserver(y),y.notify=c,A=new ADG.ParamBuilder}function b(){ADG.UnitWrapper.getSubject().removeObserver(t)}function c(a){a=A.get(a);try{B.push(a),f(z.all,a),z[a.event]&&f(z[a.event],a)}catch(a){ADG.Logger.debug("[ExternalInterface] Error calling callback")}}function d(a,b){if("function"==typeof a){if(z=z||{},b){if("string"==typeof b)e(a,b);else if(b.constructor===Array)for(var c=0;c=10&&(e=c,d=b(d,"31380"),ADG.SettingsHandler.setAdUrlConfigProperty("fmtid","31380"),ADG.SettingsHandler.set("ad_url",d),ADG.SettingsHandler.set("enableNASA","false"),ADG.SettingsHandler.set("mobile","true"),ADG.SettingsHandler.set("volume","muted"),ADG.SettingsHandler.set("intercept_id",e)),h=Number(e.substring(0,e.length-3)),ADG.SettingsHandler.set("placement",h)}function b(a,b){var c=a.split("fmtid");if(c.length>1){var d=c[1],e=d.indexOf("&");return c[1]=e>0?d.substring(e,d.length):"",c.join("fmtid="+b)}return a}function c(a){h=ADG.SettingsHandler.get("placement");var b=[];Array.isArray(a)?b=a:isNaN(a)||b.push(Number(a));for(var c=0;c1?d[1].split("&"):[],f=0;f0)try{b[g[0]]=decodeURIComponent(g[1])}catch(a){console.log("Error retireving ad_url setting for ",g[0])}}return b}function f(a,b){j.ad_url_config[a]=b}function g(a,b){h(a)?j.pub_custom_params.push({name:a,value:"object"==typeof b?JSON.stringify(b):b}):j[a]=c(a,b)}function h(a){return a.indexOf("gp")>-1}function i(){return ADG.PlacementHandler.match([2,3,6,10])}var j={includeMobile:!1,filter_referrers:[],is_white_list:!1,referral_categories:[],ad_url:"",skip_time:"",css_path:"",intercept_id:"1001",mobile_intercept_id:"10001",mobile_dock_return:!1,allowed_intercepts:"1, 3, 4, 6, 7, 8",excluded_browsers:[],autoplay_muted:!1,countdown_after_play:!0,placement_id:"",enable_moat_player:!1,volume:"unmuted",elements_blacklist:[],dynamic_skip:!1,frequency_cap:-1,max_skip_time:45,mode:"video",moat_account:"",enableNASA:!1,close_button:!1,pub_custom_params:[],comscore_id:"16170130",comscore_name:"adg",leave_behind:!1,dock_position:"bottom_right",passback_timer:-1,av_opt_out:!1};return{get:a,getAll:b,set:d,setAdUrlConfigProperty:f,isInpage:i}}(),ADG.SetupHandler=function(){function a(){ADG.Performance.record("adgLoaded"),ADG.Logger.log("[SetupHandler] ADG loaded on the page : "+ADG.version),ADG.Logger.log("[SetupHandler] Attaching message listener for windows","debug"),ADG.Browser.addEvent(window,"message",ADG.API.invoke),"function"==typeof onADGReady&&onADGReady()}function b(){ADG.Logger.debug("[SetupHandler] setupPlayer");var a=(ADG.SettingsHandler.get("autoplay_muted"),ADG.SettingsHandler.get("placement"),ADG.SettingsHandler.get("ad_url"));a=c(ADG.Utils.trim(a));var b={parentID:"adgSwfWrapper",flashvars:{retailTag:encodeURIComponent(a),backfillTag:"",legacyMode:!1,locking:3!==ADG.SettingsHandler.get("placement"),timeOut:ADG.SettingsHandler.get("timeOut")||12,pauseOnLoad:ADG.SettingsHandler.isInpage(),volume:"muted"===ADG.SettingsHandler.get("volume")||ADG.SettingsHandler.get("autoplay_muted")?0:.1,muteOnStart:!("muted"!==ADG.SettingsHandler.get("volume")&&!ADG.SettingsHandler.get("autoplay_muted")),enableMoat:ADG.SettingsHandler.get("enable_moat_player"),moatAccount:""!==ADG.SettingsHandler.get("moat_account")?ADG.SettingsHandler.get("moat_account"):"",closeButton:!!ADG.SettingsHandler.get("close_button")},height:"100%"};ADG.PlayerAdapter.setup(b),ADG.Performance.record("playerSetup")}function c(a){var b=ADG.SettingsHandler.getAll(),c=a;c=c.replace(/http:|https:/gi,ADG.protocol);var d,e,f,g=[{macro:/st\%3D__KVST__;/gi,value:""},{macro:/__KVIID__/gi,value:b.placement},{macro:/__KVCAP__/gi,value:b.countdown_after_play},{macro:/__KVAPM__/gi,value:b.autoplay_muted},{macro:/\[timestamp\]/gi,value:(new Date).getTime()},{macro:/ps=./gi,value:"ps=1"},{macro:/pb=./gi,value:"pb=9"},{macro:/vcn=c/gi,value:"vcn=s"}],h={};""!==b.placement_id&&g.push({macro:/_GM_PLACEMENT_ID_/gi,value:b.placement_id});for(var i=0;i=0&&(h.vtr=GMData.PARHandler.get("vtr")),GMData.PARHandler.get("par")>=0&&(h.par=GMData.PARHandler.get("par")),GMData.PARHandler.get("skr")>=0&&(h.skr=GMData.PARHandler.get("skr")),GMData.PARHandler.get("ads")>=0&&(h.ads=GMData.PARHandler.get("ads")),GMData.PARHandler.get("flr")>=0&&(h.flr=GMData.PARHandler.get("flr")),GMData.PARHandler.get("ulr")>=0&&(h.ulr=GMData.PARHandler.get("ulr")),GMData.PARHandler.get("pvw")>=0&&(h.pvw=GMData.PARHandler.get("pvw"))),c=ADG.URL.getUrlWithKV(c,j,h)}function d(a){var b=a.data||a;if(!b)return void ADG.Logger.debug("[SetupHandler] No data passed to ADG. Exiting.");if("string"==typeof b)try{b=JSON.parse(b)}catch(a){return void ADG.Logger.debug("[SetupHandler] Failed to parse JSON")}if("adg"===b.system){if(b.injectionElement&&(p=b.injectionElement),ADG.Logger.info("[SetupHandler] : ADG Invoked"),ADG.Performance.record("configLoaded",b.config_load),ADG.Performance.record("adgInvoked"),ADG.Logger.debug(b),ADG.SettingsHandler.set(b),ADG.PlacementHandler.init(),"gpt"===ADG.SettingsHandler.get("tag_type")){var c=ADG.GPTHandler(ADG.SettingsHandler.get("css_path")).getID();if(c)ADG.SettingsHandler.set("css_path","#"+c);else if(1!==ADG.SettingsHandler.get("placement")&&7!==ADG.SettingsHandler.get("placement"))return void o.notify({event:"freeViewAllowed",reason:"templateError"})}if(cssPath=ADG.SettingsHandler.get("css_path"),!cssPath&&10===ADG.SettingsHandler.get("placement")){cssPath="default_adg_mobile_css_path",ADG.SettingsHandler.set("css_path","#"+cssPath);var d=document.createElement("div");d.id=cssPath,document.body.appendChild(d),ADG.SettingsHandler.set("init_touch_event",!0),ADG.SettingsHandler.set("mobile_dock_return",!1)}ADG.SettingsHandler.set("flash_version",ADG.flash.version.replace(/,/gi,"."));var e=ADG.SettingsHandler.get("placement_id");(!e||e.indexOf("GM")>-1)&&ADG.SettingsHandler.set("placement_id",ADG.URL.urlSearchParams(ADG.SettingsHandler.get("ad_url"),"pgid"));var f=h();ADG.Skip.init(),ADG.Close.init(),void 0!==ADG.SettingsHandler.get("passback_tag")?ADG.PassbackHandler.init(ADG.SettingsHandler.get("passback_tag")):ADG.Logger.info("[PassbackHanlder] Passback not specified. Skipping init."),ADG.FilterHandler.init(),ADG.ExternalInterface.init(),ADG.FreeViewHandler.init(),ADG.VendorAdapter.init(),ADG.PlayerAdapter.init(),"undefined"!=typeof GMData&&GMData.ADGInterface.init(ADG.SettingsHandler.getAll());var g=ADG.SettingsHandler.get("mobile");if((!g||"false"===g||!1===g)&&10===ADG.SettingsHandler.get("placement"))return ADG.Logger.info("[SetupHandler] : Placement 10 not supported on this browser"),void o.notify({event:"freeViewAllowed",reason:"templateError"});if(!f)return void o.notify({event:"interceptsError",reason:"interceptSelectionError"});if(ADG.FeedbackHandler.init(),!ADG.FilterHandler.passesFilters())return ADG.Logger.info("[SetupHandler] User doesn't pass all filters."),void o.notify({event:"filtersNotPassed",reason:ADG.FilterHandler.getReason()});m()}}function e(){-1!==ADG.SettingsHandler.get("passback_timer")&&""!==ADG.SettingsHandler.get("passback_timer")&&Number(ADG.SettingsHandler.get("passback_timer"))>1999&&setTimeout(function(){f()},Number(ADG.SettingsHandler.get("passback_timer")))}function f(){ADG.PlayerEvents.getAdStarted()||(o.notify({event:"passbackTimedOut",reason:"passbackTimeOut"}),"undefined"!=typeof CUPlayerInstance&&ADG.PlayerSingleton.destroyPlayer())}function g(){return o}function h(){ADG.ExternalInterface.setPubAllowedIntercepts(ADG.SettingsHandler.get("allowed_intercepts")),ADG.InterceptChooser.setNASAIntercepts(ADG.ExternalInterface.getPubAllowedIntercepts()),ADG.InterceptChooser.setNASAFeedback(ADG.ExternalInterface.getNASAFeedback()),ADG.ExternalInterface.setNASAEnable();var a=ADG.InterceptChooser.getSelectedIntercept();if(void 0!==a){var b,c,d=ADG.SettingsHandler.get("css_path");if(currentInterceptId=ADG.SettingsHandler.get("intercept_id"),newIntercept=a+currentInterceptId.substr(1,3),""!==d&&(c=ADG.Selector(d)),!("2"!==a&&"3"!==a&&"6"!==a||void 0!==c&&void 0!==c.mainElement&&null!==c.mainElement)){if(ADG.InterceptChooser.cleanNASAIntercepts(),b=ADG.ExternalInterface.getNASAFeedback(),void 0===b?(ADG.InterceptChooser.setNASAIntercepts(ADG.ExternalInterface.getPubAllowedIntercepts()),ADG.InterceptChooser.rollDice()):(ADG.InterceptChooser.setNASAIntercepts(b),ADG.InterceptChooser.rollDice()),void 0===(a=ADG.InterceptChooser.getSelectedIntercept()))return!1;currentInterceptId=ADG.SettingsHandler.get("intercept_id"),newIntercept=a+currentInterceptId.substr(1,3)}ADG.SettingsHandler.set("intercept_id",newIntercept),o.notify({event:"nasaUsed",placementSelected:a,placementWeight:ADG.InterceptChooser.getSelectedWeight()}),ADG.ExternalInterface.hasUsedNASA()}var e=ADG.SettingsHandler.get("intercept_id"),f=Number(e.substring(0,e.length-3));return ADG.SettingsHandler.set("placement",f),7===ADG.SettingsHandler.get("placement")?(ADG.SettingsHandler.set("initialContinueText","Minimize "),ADG.SettingsHandler.set("finalContinueText","Minimize »")):4!==ADG.SettingsHandler.get("placement")?(ADG.SettingsHandler.set("initialContinueText","Continue to site "),ADG.SettingsHandler.set("finalContinueText","Continue to site » ")):(ADG.SettingsHandler.set("initialContinueText","Close "),ADG.SettingsHandler.set("finalContinueText","Close »")),!0}function i(){return p}function j(){ADG.TemplateHandler.init(ADG.SettingsHandler.get("intercept_id"))&&k()}function k(){ADG.UnitWrapper.isAddedToDom()?ADG.PianoHandler.waitForPiano()?setTimeout(k,100):l(ADG.PianoHandler.getStatus()):setTimeout(k,100)}function l(a){if(ADG.Logger.info("[SetupHandler] UI setup finished"),void 0!==a&&"end"===a)return ADG.Logger.debug("[SetupHandler] Piano lightbox shown exiting"),void o.notify({event:"filtersNotPassed",reason:"pianoMedia"});ADG.SetupHandler.setupPlayer()}function m(){var a,b,c=ADG.SettingsHandler.get("placement"),d=ADG.SettingsHandler.get("css_path"),e=ADG.SettingsHandler.get("init_touch_event");ADG.SettingsHandler.isInpage()?""!==d?(b=ADG.Selector(d),a=b.isFound()?b.get():(e||10!==c)&&i()?i().parentElement:void 0):i()&&(a=i().parentElement):a=document.body,a&&"HEAD"===a.nodeName&&(a=void 0);var f="complete"===document.readyState;if(a)j();else{if(!a&&f)return ADG.Logger.info("[SetupHandler] : Parent element not found. Exiting"),void o.notify({event:"freeViewAllowed",reason:"parentElementNotFound"});a||f||setTimeout(m,100)}}function n(a,b){return"id"!==a||null!==document.getElementById(b)||(ADG.Logger.info("[SetupHandler] DOM Elements not loaded"),ADG.PlayerEvents.getSubject().notify({event:"freeViewAllowed",reason:"domElementNotfound"}),o.notify({event:"adStopped",reason:"domElementNotfound"}),!1)}playerVolume={muted:0};var o=new ADG.Subject,p=null;return{run:a,load:d,setupPlayer:b,getSubject:g,checkDOMElement:n,initPassbackTimeout:e,getInjectionElement:i}}(),ADG.Skip=function(){function a(){return 3!==ADG.SettingsHandler.get("placement")&&6!==ADG.SettingsHandler.get("placement")&&8!==ADG.SettingsHandler.get("placement")&&9!==ADG.SettingsHandler.get("placement")&&10!==ADG.SettingsHandler.get("placement")}function b(){return ADG.SettingsHandler.get("finalContinueText")}function c(){return ADG.SettingsHandler.get("initialContinueText")+" in "}function d(){A={enabled:!0,skipTime:0,effectiveSkipTime:-1,calculatedSkipTime:-1,initialSkipMessage:b(),finalSkipMessage:b(),countdownOnStart:!1,countdown:!1,active:!1,skipHasBeenActivated:!1},x=!1,ADG.Logger.debug("[Skip] Initialized"),A.enabled="none"!==ADG.SettingsHandler.get("skip_time")&&a(),y=new ADG.Subject,z=new ADG.Observer,z.notify=m,ADG.PlayerEvents.getSubject().addObserver(z),A.enabled}function e(a){if(A.enabled&&!A.active){var b;f(a),g(),h(),b=A,A.effectiveSkipTime>0&&(b.event=B+"Calculated",b.skipMessage=b.initialSkipMessage,y.notify(b),ADG.Logger.debug("[Skip]- Notifying calculated"))}}function f(a){var b,c=ADG.SettingsHandler.get("skip_time"),d=ADG.SettingsHandler.get("max_skip_time");"none"===c?A.effectiveSkipTime=-1:""===c?A.effectiveSkipTime=Math.min(d,a)||-1:u()&&ADG.ExternalInterface.isParAvailable()?(b=GMData.PARHandler.get("score"),b>=.85?A.effectiveSkipTime=c>a?0===a||void 0===a?c||-1:Math.min(d,a):a>0?Math.min(d,a):c||-1:(A.effectiveSkipTime=void 0!==a&&0!==a?Math.min(d,Math.max(c,a*b)):c,ADG.Logger.debug("[Skip] pubSkipTime : "+c+"\n assetLength : "+a+"\n parValue :"+b+"\n dynamicSkip : "+A.effectiveSkipTime),x=!0)):A.effectiveSkipTime=Math.min(Number(c),Math.round(a)||9999),a&&A.effectiveSkipTime>a&&(A.effectiveSkipTime=a),A.effectiveSkipTime===a&&A.effectiveSkipTime++,A.effectiveSkipTime=Math.round(A.effectiveSkipTime),(A.enabled||A.active)&&(A.calculatedSkipTime=Math.round(A.effectiveSkipTime))}function g(){var a=ADG.SettingsHandler.get("countdown_after_play");a?a&&A.effectiveSkipTime>0?A.countdownOnStart=!1:a&&0===A.effectiveSkipTime&&(A.countdownOnStart=ADG.SettingsHandler.get("autoplay")):A.countdownOnStart=!0}function h(){A.effectiveSkipTime>0&&(A.countdown=!0,A.initialSkipMessage=b())}function i(){if(A.enabled&&!A.active){var a;A.skipHasBeenActivated||(A.skipHasBeenActivated=!0),A.countdown?(skipTime=A.effectiveSkipTime,a=A,a.skipTime=Math.round(skipTime),a.skipMessage=A.initialSkipMessage,a.event=B+"TimeChange",y.notify(a),v=(new Date).getTime(),w&&clearInterval(w),w=setInterval(ADG.Skip.calculateSkipTime,500)):(skipMessage=b(),a=A,a.skipMessage=skipMessage,a.skipTime=0,a.event=B+"Active",a.active=!0,a.effectiveSkipTime=A.effectiveSkipTime,a.muteState=ADG.PlayerSingleton.getMuteState(),y.notify(a),ADG.Logger.debug("[Skip]- Notifying active"))}}function j(){var a=(new Date).getTime(),d=A;a-1;)(f=l[b[j]]||new m(b[j],[])).gsClass?(e[j]=f.gsClass,k--):d&&f.sc.push(this);if(0===k&&c)for(g=("com.greensock."+a).split("."),i=g.pop(),h(g.join("."))[i]=this.gsClass=c.apply(c,e),j=0;j-1;)for(f=j[k],e=d?o("easing."+f,null,!0):i.easing[f]||{},g=l.length;--g>-1;)h=l[g],s[f+"."+h]=s[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(d=r.prototype,d._calcEnd=!1,d.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:a<.5?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:a<.5?d/2:1-d/2},b=["Linear","Quad","Cubic","Quart","Quint,Strong"],c=b.length;--c>-1;)d=b[c]+",Power"+c,t(new r(null,null,1,c),d,"easeOut",!0),t(new r(null,null,2,c),d,"easeIn"+(0===c?",easeNone":"")),t(new r(null,null,3,c),d,"easeInOut");s.linear=i.easing.Linear.easeIn,s.swing=i.easing.Quad.easeInOut;var u=o("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});d=u.prototype,d.addEventListener=function(a,b,c,d,g){g=g||0;var h,i,j=this._listeners[a],k=0;for(null==j&&(this._listeners[a]=j=[]),i=j.length;--i>-1;)h=j[i],h.c===b&&h.s===c?j.splice(i,1):0===k&&h.pr-1;)if(d[c].c===b)return void d.splice(c,1)},d.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,c=this._eventTarget;--b>-1;)d=e[b],d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c)};var v=a.requestAnimationFrame,w=a.cancelAnimationFrame,x=Date.now||function(){return(new Date).getTime()},y=x();for(b=["ms","moz","webkit","o"],c=b.length;--c>-1&&!v;)v=a[b[c]+"RequestAnimationFrame"],w=a[b[c]+"CancelAnimationFrame"]||a[b[c]+"CancelRequestAnimationFrame"];o("Ticker",function(a,b){var c,d,g,h,i,j=this,l=x(),m=!1!==b&&v,n=function(a){y=x(),j.time=(y-l)/1e3;var b,e=j.time-i;(!c||e>0||!0===a)&&(j.frame++,i+=e+(e>=h?.004:h-e),b=!0),!0!==a&&(g=d(n)),b&&j.dispatchEvent("tick")};u.call(j),j.time=j.frame=0,j.tick=function(){n(!0)},j.sleep=function(){null!=g&&(m&&w?w(g):clearTimeout(g),d=k,g=null,j===e&&(f=!1))},j.wake=function(){null!==g&&j.sleep(),d=0===c?k:m&&v?v:function(a){return setTimeout(a,1e3*(i-j.time)+1|0)},j===e&&(f=!0),n(2)},j.fps=function(a){if(!arguments.length)return c;c=a,h=1/(c||60),i=this.time+h,j.wake()},j.useRAF=function(a){if(!arguments.length)return m;j.sleep(),m=a,j.fps(c)},j.fps(a),setTimeout(function(){m&&(!g||j.frame<5)&&j.useRAF(!1)},1500)}),d=i.Ticker.prototype=new i.events.EventDispatcher,d.constructor=i.Ticker;var z=o("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=!0===b.immediateRender,this.data=b.data,this._reversed=!0===b.reversed,M){f||e.wake();var c=this.vars.useFrames?L:M;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});e=z.ticker=new i.Ticker,d=z.prototype,d._dirty=d._gc=d._initted=d._paused=!1,d._totalTime=d._time=0,d._rawPrevTime=-1,d._next=d._last=d._onUpdate=d._timeline=d.timeline=null,d._paused=!1;var A=function(){x()-y>2e3&&e.wake(),setTimeout(A,2e3)};A(),d.play=function(a,b){return arguments.length&&this.seek(a,b),this.reversed(!1).paused(!1)},d.pause=function(a,b){return arguments.length&&this.seek(a,b),this.paused(!0)},d.resume=function(a,b){return arguments.length&&this.seek(a,b),this.paused(!1)},d.seek=function(a,b){return this.totalTime(Number(a),!1!==b)},d.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,!1!==b,!0)},d.reverse=function(a,b){return arguments.length&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},d.render=function(a,b,c){},d.invalidate=function(){return this},d._enabled=function(a,b){return f||e.wake(),this._gc=!a,this._active=a&&!this._paused&&this._totalTime>0&&this._totalTime-1;)"{self}"===a[b]&&(c[b]=this);return c},d.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=c instanceof Array&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},d.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},d.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},d.totalTime=function(a,b,c){if(f||e.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(a<0&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,g=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:g._time)-(this._reversed?d-a:a)/this._timeScale,g._dirty||this._uncache(!1),g._timeline)for(;g._timeline;)g._timeline._time!==(g._startTime+g._totalTime)/g._timeScale&&g.totalTime(g._totalTime,!0),g=g._timeline}this._gc&&this._enabled(!0,!1),this._totalTime!==a&&this.render(a,b,!1)}return this},d.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},d.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||1e-6,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},d.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._totalTime,!0)),this):this._reversed},d.paused=function(a){if(!arguments.length)return this._paused;if(a!=this._paused&&this._timeline){f||a||e.wake();var b=this._timeline,c=b.rawTime(),d=c-this._pauseTime;!a&&b.smoothChildTiming&&(this._startTime+=d,this._uncache(!1)),this._pauseTime=a?c:null,this._paused=a,this._active=!a&&this._totalTime>0&&this._totalTimef;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._timeline&&this._uncache(!0),this},d._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a.timeline=null,a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),this._timeline&&this._uncache(!0)),this},d.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},d.rawTime=function(){return f||e.wake(),this._totalTime};var C=o("TweenLite",function(b,c,d){if(z.call(this,c,d),this.render=C.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:C.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?K[C.defaultOverwrite]:"number"==typeof i?i>>0:K[i],(h||b instanceof Array)&&"number"!=typeof b[0])for(this._targets=g=j.call(b,0),this._propLookup=[],this._siblings=[],e=0;e1&&O(f,this,null,1,this._siblings[e])):"string"==typeof(f=g[e--]=C.selector(f))&&g.splice(e+1,1):g.splice(e--,1);else this._propLookup={},this._siblings=N(b,this,!1),1===i&&this._siblings.length>1&&O(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&!1!==this.vars.immediateRender)&&this.render(-this._delay,!1,!0)},!0),D=function(b){return b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},E=function(a,b){var c,d={};for(c in a)J[c]||c in b&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!G[c]||G[c]&&G[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};d=C.prototype=new z,d.constructor=C,d.kill()._gc=!1,d.ratio=0,d._firstPT=d._targets=d._overwrittenProps=d._startAt=null,d._notifyPluginsOfEnabled=!1,C.version="1.10.3",C.defaultEase=d._ease=new r(null,null,1,1),C.defaultOverwrite="auto",C.ticker=e,C.autoSleep=!0,C.selector=a.$||a.jQuery||function(b){return a.$?(C.selector=a.$,a.$(b)):a.document?a.document.getElementById("#"===b.charAt(0)?b.substr(1):b):b};var F=C._internals={},G=C._plugins={},H=C._tweenLookup={},I=0,J=F.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1},K={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},L=z._rootFramesTimeline=new B,M=z._rootTimeline=new B;M._startTime=e.time,L._startTime=e.frame,M._active=L._active=!0,z._updateRoot=function(){if(M.render((e.time-M._startTime)*M._timeScale,!1,!1),L.render((e.frame-L._startTime)*L._timeScale,!1,!1),!(e.frame%120)){var a,b,c;for(c in H){for(b=H[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete H[c]}if((!(c=M._first)||c._paused)&&C.autoSleep&&!L._first&&1===e._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||e.sleep()}}},e.addEventListener("tick",z._updateRoot);var N=function(a,b,c){var d,e,f=a._gsTweenID;if(H[f||(a._gsTweenID=f="t"+I++)]||(H[f]={target:a,tweens:[]}),b&&(d=H[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return H[f].tweens},O=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;f-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||P(b,0,n),0===P(h,j,n)&&(l[m++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale+1e-10>k&&((n||!h._initted)&&k-h._startTime<=2e-10||(l[m++]=h)));for(f=m;--f>-1;)h=l[f],2===d&&h._kill(c,a)&&(g=!0),(2!==d||!h._firstPT&&h._initted)&&h._enabled(!1,!1)&&(g=!0);return g},P=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100 ;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&f-b<2e-10?1e-10:(f+=a.totalDuration()/a._timeScale/e)>b+1e-10?0:f-b-1e-10};d._init=function(){var a,b,c,d,e=this.vars,f=this._overwrittenProps,g=this._duration,h=e.immediateRender,i=e.ease;if(e.startAt){if(this._startAt&&this._startAt.render(-1,!0),e.startAt.overwrite=0,e.startAt.immediateRender=!0,this._startAt=C.to(this.target,0,e.startAt),h)if(this._time>0)this._startAt=null;else if(0!==g)return}else if(e.runBackwards&&e.immediateRender&&0!==g)if(this._startAt)this._startAt.render(-1,!0),this._startAt=null;else if(0===this._time){c={};for(d in e)J[d]&&"autoCSS"!==d||(c[d]=e[d]);return c.overwrite=0,void(this._startAt=C.to(this.target,0,c))}if(this._ease=i?i instanceof r?e.easeParams instanceof Array?i.config.apply(i,e.easeParams):i:"function"==typeof i?new r(i,e.easeParams):s[i]||C.defaultEase:C.defaultEase,this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(a=this._targets.length;--a>-1;)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],f?f[a]:null)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,f);if(b&&C._onPluginEvent("_onInitAllProps",this),f&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),e.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=e.onUpdate,this._initted=!0},d._initProps=function(b,c,d,e){var f,g,h,i,j,k;if(null==b)return!1;this.vars.css||b.style&&b!==a&&b.nodeType&&G.css&&!1!==this.vars.autoCSS&&E(this.vars,b);for(f in this.vars){if(k=this.vars[f],J[f])k instanceof Array&&-1!==k.join("").indexOf("{self}")&&(this.vars[f]=k=this._swapSelfInParams(k,this));else if(G[f]&&(i=new G[f])._onInitTween(b,this.vars[f],this)){for(this._firstPT=j={_next:this._firstPT,t:i,p:"setRatio",s:0,c:1,f:!0,n:f,pg:!0,pr:i._priority},g=i._overwriteProps.length;--g>-1;)c[i._overwriteProps[g]]=this._firstPT;(i._priority||i._onInitAllProps)&&(h=!0),(i._onDisable||i._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=c[f]=j={_next:this._firstPT,t:b,p:f,f:"function"==typeof b[f],n:f,pg:!1,pr:0},j.s=j.f?b[f.indexOf("set")||"function"!=typeof b["get"+f.substr(3)]?f:"get"+f.substr(3)]():parseFloat(b[f]),j.c="string"==typeof k&&"="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*Number(k.substr(2)):Number(k)-j.s||0;j&&j._next&&(j._next._prev=j)}return e&&this._kill(e,b)?this._initProps(b,c,d,e):this._overwrite>1&&this._firstPT&&d.length>1&&O(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e)):h},d.render=function(a,b,c){var d,e,f,g=this._time;if(a>=this._duration)this._totalTime=this._time=this._duration,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete"),0===this._duration&&((0===a||this._rawPrevTime<0)&&this._rawPrevTime!==a&&(c=!0,this._rawPrevTime>0&&(e="onReverseComplete",b&&(a=-1))),this._rawPrevTime=a);else if(a<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==g||0===this._duration&&this._rawPrevTime>0)&&(e="onReverseComplete",d=this._reversed),a<0?(this._active=!1,0===this._duration&&(this._rawPrevTime>=0&&(c=!0),this._rawPrevTime=a)):this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var h=a/this._duration,i=this._easeType,j=this._easePower;(1===i||3===i&&h>=.5)&&(h=1-h),3===i&&(h*=2),1===j?h*=h:2===j?h*=h*h:3===j?h*=h*h*h:4===j&&(h*=h*h*h*h),1===i?this.ratio=1-h:2===i?this.ratio=h:a/this._duration<.5?this.ratio=h/2:this.ratio=1-h/2}else this.ratio=this._ease.getRatio(a/this._duration);if(this._time!==g||c){if(!this._initted){if(this._init(),!this._initted)return;this._time&&!d?this.ratio=this._ease.getRatio(this._time/this._duration):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._active||!this._paused&&this._time!==g&&a>=0&&(this._active=!0),0===g&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==this._duration||b||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||q))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(a<0&&this._startAt&&this._startAt.render(a,b,c),b||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||q)),e&&(this._gc||(a<0&&this._startAt&&!this._onUpdate&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this.vars[e].apply(this.vars[e+"Scope"]||this,this.vars[e+"Params"]||q)))}},d._kill=function(a,b){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:C.selector(b)||b;var c,d,e,f,g,h,i,j;if((b instanceof Array||D(b))&&"number"!=typeof b[0])for(c=b.length;--c>-1;)this._kill(a,b[c])&&(h=!0);else{if(this._targets){for(c=this._targets.length;--c>-1;)if(b===this._targets[c]){g=this._propLookup[c]||{},this._overwrittenProps=this._overwrittenProps||[],d=this._overwrittenProps[c]=a?this._overwrittenProps[c]||{}:"all";break}}else{if(b!==this.target)return!1;g=this._propLookup,d=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(g){i=a||g,j=a!==d&&"all"!==d&&a!==g&&(null==a||!0!==a._tempKill);for(e in i)(f=g[e])&&(f.pg&&f.t._kill(i)&&(h=!0),f.pg&&0!==f.t._overwriteProps.length||(f._prev?f._prev._next=f._next:f===this._firstPT&&(this._firstPT=f._next),f._next&&(f._next._prev=f._prev),f._next=f._prev=null),delete g[e]),j&&(d[e]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return h},d.invalidate=function(){return this._notifyPluginsOfEnabled&&C._onPluginEvent("_onDisable",this),this._firstPT=null,this._overwrittenProps=null,this._onUpdate=null,this._startAt=null,this._initted=this._active=this._notifyPluginsOfEnabled=!1,this._propLookup=this._targets?{}:[],this},d._enabled=function(a,b){if(f||e.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=N(d[c],this,!0);else this._siblings=N(this.target,this,!0)}return z.prototype._enabled.call(this,a,b),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&C._onPluginEvent(a?"_onEnable":"_onDisable",this)},C.to=function(a,b,c){return new C(a,b,c)},C.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new C(a,b,c)},C.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new C(a,b,d)},C.delayedCall=function(a,b,c,d,e){return new C(b,0,{delay:a,onComplete:b,onCompleteParams:c,onCompleteScope:d,onReverseComplete:b,onReverseCompleteParams:c,onReverseCompleteScope:d,immediateRender:!1,useFrames:e,overwrite:0})},C.set=function(a,b){return new C(a,0,b)},C.killTweensOf=C.killDelayedCallsTo=function(a,b){for(var c=C.getTweensOf(a),d=c.length;--d>-1;)c[d]._kill(b,a)},C.getTweensOf=function(a){if(null==a)return[];a="string"!=typeof a?a:C.selector(a)||a;var b,c,d,e;if((a instanceof Array||D(a))&&"number"!=typeof a[0]){for(b=a.length,c=[];--b>-1;)c=c.concat(C.getTweensOf(a[b]));for(b=c.length;--b>-1;)for(e=c[b],d=b;--d>-1;)e===c[d]&&c.splice(b,1)}else for(c=N(a).concat(),b=c.length;--b>-1;)c[b]._gc&&c.splice(b,1);return c};var Q=o("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=Q.prototype},!0);if(d=Q.prototype,Q.version="1.10.1",Q.API=2,d._firstPT=null,d._addTween=function(a,b,c,d,e,f){var g,h;if(null!=d&&(g="number"==typeof d||"="!==d.charAt(1)?Number(d)-c:parseInt(d.charAt(0)+"1",10)*Number(d.substr(2))))return this._firstPT=h={_next:this._firstPT,t:a,p:b,s:c,c:g,f:"function"==typeof a[b],n:e||b,r:f},h._next&&(h._next._prev=h),h},d.setRatio=function(a){for(var b,c=this._firstPT;c;)b=c.c*a+c.s,c.r?b=b+(b>0?.5:-.5)|0:b<1e-6&&b>-1e-6&&(b=0),c.f?c.t[c.p](b):c.t[c.p]=b,c=c._next},d._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},d._roundProps=function(a,b){for(var c=this._firstPT;c;)(a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")])&&(c.r=b),c=c._next},C._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},Q.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===Q.API&&(G[(new a[b])._propName]=a[b]);return!0},n.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},g=o("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){Q.call(this,c,d),this._overwriteProps=e||[]},!0===a.global),h=g.prototype=new Q(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,Q.activate([g]),g},b=a._gsQueue){for(c=0;c3),n=l&&Number(G.substr(G.indexOf("Version/")+8,1))<6,m=-1!==G.indexOf("Firefox"),/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(G),o=parseFloat(RegExp.$1),c.innerHTML="a",!!(a=c.getElementsByTagName("a")[0])&&/^0.55/.test(a.style.opacity)}(),I=function(a){return t.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},J=function(a){window.console&&console.log(a)},K="",L="",M=function(a,b){b=b||D;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(L=3===d?"ms":c[d],K="-"+L.toLowerCase()+"-",L+a):null},N=C.defaultView?C.defaultView.getComputedStyle:function(){},O=g.getStyle=function(a,b,c,d,e){var f;return H||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||N(a,null))?(a=c.getPropertyValue(b.replace(/([A-Z])/g,"-$1").toLowerCase()),f=a||c.length?a:c[b]):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):I(a)},P=function(a,b,c,d,e){if("px"===d||!d)return c;if("auto"===d||!c)return 0;var f,g=x.test(b),h=a,i=D.style,j=c<0;return j&&(c=-c),"%"===d&&-1!==b.indexOf("border")?f=c/100*(g?a.clientWidth:a.clientHeight):(i.cssText="border-style:solid;border-width:0;position:absolute;line-height:0;","%"!==d&&h.appendChild?i[g?"borderLeftWidth":"borderTopWidth"]=c+d:(h=a.parentNode||C.body,i[g?"width":"height"]=c+d),h.appendChild(D),f=parseFloat(D[g?"offsetWidth":"offsetHeight"]),h.removeChild(D),0!==f||e||(f=P(a,b,c,d,!0))),j?-f:f},Q=function(a,b,c){if("absolute"!==O(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=O(a,"margin"+d,c);return a["offset"+d]-(P(a,b,parseFloat(e),e.replace(s,""))||0)},R=function(a,b){var c,d,e={};if(b=b||N(a,null))if(c=b.length)for(;--c>-1;)e[b[c].replace(/-([a-z])/gi,w)]=b.getPropertyValue(b[c]);else for(c in b)e[c]=b[c];else if(b=a.currentStyle||a.style)for(c in b)e[c.replace(/-([a-z])/gi,w)]=b[c];return H||(e.opacity=I(a)),d=pa(a,b,!1),e.rotation=d.rotation*A,e.skewX=d.skewX*A,e.scaleX=d.scaleX,e.scaleY=d.scaleY,e.x=d.x,e.y=d.y,oa&&(e.z=d.z,e.rotationX=d.rotationX*A,e.rotationY=d.rotationY*A,e.scaleZ=d.scaleZ),e.filters&&delete e.filters,e},S=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"!=typeof f&&"string"!=typeof f||(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(/[^\d\-\.]/g,"")?f:0:Q(a,g),void 0!==j[g]&&(h=new ea(j,g,j[g],h))));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},T={width:["Left","Right"],height:["Top","Bottom"]},U=["marginLeft","marginRight","marginTop","marginBottom"],V=function(a,b,c){var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=T[b],f=e.length;for(c=c||N(a,null);--f>-1;)d-=parseFloat(O(a,"padding"+e[f],c,!0))||0,d-=parseFloat(O(a,"border"+e[f]+"Width",c,!0))||0;return d},W=function(a,b){null!=a&&""!==a&&"auto"!==a&&"auto auto"!==a||(a="0 0");var c=a.split(" "),d=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":c[0],e=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":c[1];return null==e?e="0":"center"===e&&(e="50%"),("center"===d||isNaN(parseFloat(d))&&-1===(d+"").indexOf("="))&&(d="50%"),b&&(b.oxp=-1!==d.indexOf("%"),b.oyp=-1!==e.indexOf("%"),b.oxr="="===d.charAt(1),b.oyr="="===e.charAt(1),b.ox=parseFloat(d.replace(/[^\d\-\.]/g,"")),b.oy=parseFloat(e.replace(/[^\d\-\.]/g,""))),d+" "+e+(c.length>2?" "+c[2]:"")},X=function(a,b){return"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)},Y=function(a,b){return null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*Number(a.substr(2))+b:parseFloat(a)},Z=function(a,b,c,d){var e,f,g,h;return null==a?h=b:"number"==typeof a?h=a*z:(e=2*Math.PI,f=a.split("_"),g=Number(f[0].replace(/[^\d\-\.]/g,""))*(-1===a.indexOf("rad")?z:1)-("="===a.charAt(1)?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e)!==g%(e/2)&&(g=g<0?g+e:g-e),-1!==a.indexOf("_cw")&&g<0?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),h<1e-6&&h>-1e-6&&(h=0),h},$={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},_=function(a,b,c){return a=a<0?a+1:a>1?a-1:a,255*(6*a<1?b+(c-b)*a*6:a<.5?c:3*a<2?b+(c-b)*(2/3-a)*6:b)+.5|0},aa=function(a){var b,c,d,e,f,g;return a&&""!==a?"number"==typeof a?[a>>16,a>>8&255,255&a]:(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),$[a]?$[a]:"#"===a.charAt(0)?(4===a.length&&(b=a.charAt(1),c=a.charAt(2),d=a.charAt(3),a="#"+b+b+c+c+d+d),a=parseInt(a.substr(1),16),[a>>16,a>>8&255,255&a]):"hsl"===a.substr(0,3)?(a=a.match(p),e=Number(a[0])%360/360,f=Number(a[1])/100,g=Number(a[2])/100,c=g<=.5?g*(f+1):g+f-g*f,b=2*g-c,a.length>3&&(a[3]=Number(a[3])),a[0]=_(e+1/3,b,c),a[1]=_(e,b,c),a[2]=_(e-1/3,b,c),a):(a=a.match(p)||$.transparent,a[0]=Number(a[0]),a[1]=Number(a[1]),a[2]=Number(a[2]),a.length>3&&(a[3]=Number(a[3])),a)):$.black},ba="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(i in $)ba+="|"+i+"\\b";ba=new RegExp(ba+")","gi");var ca=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(ba)||[""])[0]:"",g=a.split(f).join("").match(r)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(p,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&y.test(a)){for(o=a.replace(y,"|").split("|"),n=0;nn--)for(;++nm--)for(;++m>0];return e.parse(b,h,f,g)}},ea=(F._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f=this.data,g=f.proxy,h=f.firstMPT;h;)b=g[h.v],h.r?b=b>0?b+.5|0:b-.5|0:b<1e-6&&b>-1e-6&&(b=0),h.t[h.p]=b,h=h._next;if(f.autoRotate&&(f.autoRotate.rotation=g.rotation),1===a)for(h=f.firstMPT;h;){if(c=h.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new ea(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},F.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof fa||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ga=g.parseComplex=function(a,b,c,d,e,f,g,h,i,k){c=c||f||"",g=new fa(a,b,0,0,g,k?2:1,null,!1,h,c,d),d+="";var l,m,n,o,r,s,t,u,w,x,z,A,B=c.split(", ").join(",").split(" "),C=d.split(", ").join(",").split(" "),D=B.length,E=!1!==j;for(-1===d.indexOf(",")&&-1===c.indexOf(",")||(B=B.join(" ").replace(y,", ").split(" "),C=C.join(" ").replace(y,", ").split(" "),D=B.length),D!==C.length&&(B=(f||"").split(" "),D=B.length),g.plugin=i,g.setRatio=k,l=0;l6,w&&!H&&0===r[3]?(g["xs"+g.l]+=g.l?" transparent":"transparent",g.e=g.e.split(C[l]).join("transparent")):(H||(w=!1),g.appendXtra(w?"rgba(":"rgb(",o[0],r[0]-o[0],",",!0,!0).appendXtra("",o[1],r[1]-o[1],",",!0).appendXtra("",o[2],r[2]-o[2],w?",":A,!0),w&&(o=o.length<4?1:o[3],g.appendXtra("",o,(r.length<4?1:r[3])-o,A,!1)));else if(s=o.match(p)){if(!(t=r.match(q))||t.length!==s.length)return g;for(n=0,m=0;m0;)i["xn"+ha]=0,i["xs"+ha]="";i.xs0="",i._next=i._prev=i.xfirst=i.data=i.plugin=i.setRatio=i.rxp=null,i.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&h?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new fa(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var ia=function(a,b){b=b||{},this.p=b.prefix?M(a)||a:a,h[a]=h[this.p]=this,this.format=b.formatter||ca(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ja=F._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e=a.split(","),f=b.defaultValue;for(c=c||[f],d=0;dh.length?i.length:h.length,g=0;g-1;)i=Number(f[h]),f[h]=(j=i-(i|=0))?(1e5*j+(j<0?-.5:.5)|0)/1e5+i:i;if(16===f.length){var x=f[8],y=f[9],z=f[10],A=f[12],B=f[13],C=f[14];if(s.zOrigin&&(C=-s.zOrigin,A=x*C-f[12],B=y*C-f[13],C=z*C+s.zOrigin-f[14]),!c||d||null==s.rotationX){var D,E,F,G,H,I,J,K=f[0],L=f[1],M=f[2],N=f[3],P=f[4],Q=f[5],R=f[6],S=f[7],T=f[11],U=s.rotationX=Math.atan2(R,z),V=Uv;U&&(G=Math.cos(-U),H=Math.sin(-U),D=P*G+x*H,E=Q*G+y*H,F=R*G+z*H,x=P*-H+x*G,y=Q*-H+y*G,z=R*-H+z*G,T=S*-H+T*G,P=D,Q=E,R=F),U=s.rotationY=Math.atan2(x,K),U&&(I=Uv,G=Math.cos(-U),H=Math.sin(-U),D=K*G-x*H,E=L*G-y*H,F=M*G-z*H,y=L*H+y*G,z=M*H+z*G,T=N*H+T*G,K=D,L=E,M=F),U=s.rotation=Math.atan2(L,Q),U&&(J=Uv,G=Math.cos(-U),H=Math.sin(-U),K=K*G+P*H,E=L*G+Q*H,Q=L*-H+Q*G,R=M*-H+R*G,L=E),J&&V?s.rotation=s.rotationX=0:J&&I?s.rotation=s.rotationY=0:I&&V&&(s.rotationY=s.rotationX=0),s.scaleX=(1e5*Math.sqrt(K*K+L*L)+.5|0)/1e5,s.scaleY=(1e5*Math.sqrt(Q*Q+y*y)+.5|0)/1e5,s.scaleZ=(1e5*Math.sqrt(R*R+z*z)+.5|0)/1e5,s.skewX=0,s.perspective=T?1/(T<0?-T:T):0,s.x=A,s.y=B,s.z=C}}else if((!oa||d||!f.length||s.x!==f[4]||s.y!==f[5]||!s.rotationX&&!s.rotationY)&&(void 0===s.x||"none"!==O(a,"display",b))){var W=f.length>=6,X=W?f[0]:1,Y=f[1]||0,Z=f[2]||0,$=W?f[3]:1;s.x=f[4]||0,s.y=f[5]||0,k=Math.sqrt(X*X+Y*Y),l=Math.sqrt($*$+Z*Z),m=X||Y?Math.atan2(Y,X):s.rotation||0,n=Z||$?Math.atan2(Z,$)+m:s.skewX||0,o=k-Math.abs(s.scaleX||0),p=l-Math.abs(s.scaleY||0),Math.abs(n)>Math.PI/2&&Math.abs(n)<1.5*Math.PI&&(t?(k*=-1,n+=m<=0?Math.PI:-Math.PI,m+=m<=0?Math.PI:-Math.PI):(l*=-1,n+=n<=0?Math.PI:-Math.PI)),q=(m-s.rotation)%Math.PI,r=(n-s.skewX)%Math.PI,(void 0===s.skewX||o>2e-5||o<-2e-5||p>2e-5||p<-2e-5||q>u&&qu&&r-2e-5&&(s[h]=0);return c&&(a._gsTransform=s),s},qa=function(a){var b,c,d=this.data,e=-d.rotation,f=e+d.skewX,g=(Math.cos(e)*d.scaleX*1e5|0)/1e5,h=(Math.sin(e)*d.scaleX*1e5|0)/1e5,i=(Math.sin(f)*-d.scaleY*1e5|0)/1e5,j=(Math.cos(f)*d.scaleY*1e5|0)/1e5,k=this.t.style,l=this.t.currentStyle;if(l){c=h,h=-i,i=-c,b=l.filter,k.filter="";var m,n,p=this.t.offsetWidth,q=this.t.offsetHeight,r="absolute"!==l.position,u="progid:DXImageTransform.Microsoft.Matrix(M11="+g+", M12="+h+", M21="+i+", M22="+j,v=d.x,w=d.y;if(null!=d.ox&&(m=(d.oxp?p*d.ox*.01:d.ox)-p/2,n=(d.oyp?q*d.oy*.01:d.oy)-q/2,v+=m-(m*g+n*h),w+=n-(m*i+n*j)),r?(m=p/2,n=q/2,u+=", Dx="+(m-(m*g+n*h)+v)+", Dy="+(n-(m*i+n*j)+w)+")"):u+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?k.filter=b.replace(/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,u):k.filter=u+" "+b,0!==a&&1!==a||1===g&&0===h&&0===i&&1===j&&(r&&-1===u.indexOf("Dx=0, Dy=0")||t.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&k.removeAttribute("filter")),!r){var x,y,z,A=o<8?1:-1;for(m=d.ieOffsetX||0,n=d.ieOffsetY||0,d.ieOffsetX=Math.round((p-((g<0?-g:g)*p+(h<0?-h:h)*q))/2+v),d.ieOffsetY=Math.round((q-((j<0?-j:j)*q+(i<0?-i:i)*p))/2+w),ha=0;ha<4;ha++)y=U[ha],x=l[y],c=-1!==x.indexOf("px")?parseFloat(x):P(this.t,y,parseFloat(x),x.replace(s,""))||0,z=c!==d[y]?ha<2?-d.ieOffsetX:-d.ieOffsetY:ha<2?m-d.ieOffsetX:n-d.ieOffsetY,k[y]=(d[y]=Math.round(c-z*(0===ha||2===ha?1:A)))+"px"}}},ra=function(a){var b,c,d,e,f,g,h,i,j,k,l,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C=this.data,D=this.t.style,E=C.rotation,F=C.scaleX,G=C.scaleY,H=C.scaleZ,I=C.perspective;if(m&&(z=D.top?"top":D.bottom?"bottom":parseFloat(O(this.t,"top",null,!1))?"bottom":"top",v=O(this.t,z,null,!1),A=parseFloat(v)||0,B=v.substr((A+"").length)||"px",C._ffFix=!C._ffFix,D[z]=(C._ffFix?A+.05:A-.05)+B),E||C.skewX)t=Math.cos(E),u=Math.sin(E),b=t,f=u,C.skewX&&(E-=C.skewX,t=Math.cos(E),u=Math.sin(E)),c=-u,g=t;else{if(!(C.rotationY||C.rotationX||1!==H||I))return void(D[la]="translate3d("+C.x+"px,"+C.y+"px,"+C.z+"px)"+(1!==F||1!==G?" scale("+F+","+G+")":""));b=g=1,c=f=0}l=1,d=e=h=i=j=k=n=o=p=0,q=I?-1/I:0,r=C.zOrigin,s=1e5,E=C.rotationY,E&&(t=Math.cos(E),u=Math.sin(E),j=l*-u,o=q*-u,d=b*u,h=f*u,l*=t,q*=t,b*=t,f*=t),E=C.rotationX,E&&(t=Math.cos(E),u=Math.sin(E),v=c*t+d*u,w=g*t+h*u,x=k*t+l*u,y=p*t+q*u,d=c*-u+d*t,h=g*-u+h*t,l=k*-u+l*t,q=p*-u+q*t,c=v,g=w,k=x,p=y),1!==H&&(d*=H,h*=H,l*=H,q*=H),1!==G&&(c*=G,g*=G,k*=G,p*=G),1!==F&&(b*=F,f*=F,j*=F,o*=F),r&&(n-=r,e=d*n,i=h*n,n=l*n+r),e=(v=(e+=C.x)-(e|=0))?(v*s+(v<0?-.5:.5)|0)/s+e:e,i=(v=(i+=C.y)-(i|=0))?(v*s+(v<0?-.5:.5)|0)/s+i:i,n=(v=(n+=C.z)-(n|=0))?(v*s+(v<0?-.5:.5)|0)/s+n:n,D[la]="matrix3d("+[(b*s|0)/s,(f*s|0)/s,(j*s|0)/s,(o*s|0)/s,(c*s|0)/s,(g*s|0)/s,(k*s|0)/s,(p*s|0)/s,(d*s|0)/s,(h*s|0)/s,(l*s|0)/s,(q*s|0)/s,e,i,n,I?1+-n/I:1].join(",")+")"},sa=function(a){var b,c,d,e,f,g,h,i,j,k=this.data,l=this.t,n=l.style;m&&(b=n.top?"top":n.bottom?"bottom":parseFloat(O(l,"top",null,!1))?"bottom":"top",c=O(l,b,null,!1),d=parseFloat(c)||0,e=c.substr((d+"").length)||"px",k._ffFix=!k._ffFix,n[b]=(k._ffFix?d+.05:d-.05)+e),k.rotation||k.skewX?(f=k.rotation,g=f-k.skewX,h=1e5,i=k.scaleX*h,j=k.scaleY*h,n[la]="matrix("+(Math.cos(f)*i|0)/h+","+(Math.sin(f)*i|0)/h+","+(Math.sin(g)*-j|0)/h+","+(Math.cos(g)*j|0)/h+","+k.x+","+k.y+")"):n[la]="matrix("+k.scaleX+",0,0,"+k.scaleY+","+k.x+","+k.y+")"};ja("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D",{parser:function(a,b,c,d,f,g,h){if(d._transform)return f;var i,j,k,l,m,n,o,p=d._transform=pa(a,e,!0,h.parseTransform),q=a.style,r=ka.length,s=h,t={};if("string"==typeof s.transform&&la)k=q.cssText,q[la]=s.transform,q.display="block",i=pa(a,null,!1),q.cssText=k;else if("object"==typeof s){if(i={scaleX:Y(null!=s.scaleX?s.scaleX:s.scale,p.scaleX),scaleY:Y(null!=s.scaleY?s.scaleY:s.scale,p.scaleY),scaleZ:Y(null!=s.scaleZ?s.scaleZ:s.scale,p.scaleZ),x:Y(s.x,p.x),y:Y(s.y,p.y),z:Y(s.z,p.z),perspective:Y(s.transformPerspective,p.perspective)},null!=(o=s.directionalRotation))if("object"==typeof o)for(k in o)s[k]=o[k];else s.rotation=o;i.rotation=Z("rotation"in s?s.rotation:"shortRotation"in s?s.shortRotation+"_short":"rotationZ"in s?s.rotationZ:p.rotation*A,p.rotation,"rotation",t),oa&&(i.rotationX=Z("rotationX"in s?s.rotationX:"shortRotationX"in s?s.shortRotationX+"_short":p.rotationX*A||0,p.rotationX,"rotationX",t),i.rotationY=Z("rotationY"in s?s.rotationY:"shortRotationY"in s?s.shortRotationY+"_short":p.rotationY*A||0,p.rotationY,"rotationY",t)),i.skewX=null==s.skewX?p.skewX:Z(s.skewX,p.skewX),i.skewY=null==s.skewY?p.skewY:Z(s.skewY,p.skewY),(j=i.skewY-p.skewY)&&(i.skewX+=j,i.rotation+=j)}for(null!=s.force3D&&(p.force3D=s.force3D,n=!0),m=p.force3D||p.z||p.rotationX||p.rotationY||i.z||i.rotationX||i.rotationY||i.perspective,m||null==s.scale||(i.scaleZ=1);--r>-1;)c=ka[r],((l=i[c]-p[c])>1e-6||l<-1e-6||null!=B[c])&&(n=!0,f=new fa(p,c,p[c],l,f),c in t&&(f.e=t[c]),f.xs0=0,f.plugin=g,d._overwriteProps.push(f.n));return l=s.transformOrigin,(l||oa&&m&&p.zOrigin)&&(la?(n=!0,c=na,l=(l||O(a,c,e,!1,"50% 50%"))+"",f=new fa(q,c,0,0,f,-1,"transformOrigin"),f.b=q[c],f.plugin=g,oa?(k=p.zOrigin,l=l.split(" "),p.zOrigin=(l.length>2&&(0===k||"0px"!==l[2])?parseFloat(l[2]):k)||0,f.xs0=f.e=q[c]=l[0]+" "+(l[1]||"50%")+" 0px",f=new fa(p,"zOrigin",0,0,f,-1,f.n),f.b=k,f.xs0=f.e=p.zOrigin):f.xs0=f.e=q[c]=l):W(l+"",p)),n&&(d._transformType=m||3===this._transformType?3:2),f},prefix:!0}),ja("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ja("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j-1;)q=h[j],(k=-1!==q.indexOf("%"))!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-E.width:a.offsetHeight-E.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:W}),ja("backgroundSize",{defaultValue:"0 0",formatter:W}),ja("perspective",{defaultValue:"0px",prefix:!0}),ja("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ja("transformStyle",{prefix:!0}),ja("backfaceVisibility",{prefix:!0}),ja("margin",{parser:da("marginTop,marginRight,marginBottom,marginLeft")}), ja("padding",{parser:da("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ja("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return o<9?(i=a.currentStyle,j=o<8?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(O(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ja("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ja("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ja("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){return this.parseComplex(a.style,this.format(O(a,"borderTopWidth",e,!1,"0px")+" "+O(a,"borderTopStyle",e,!1,"solid")+" "+O(a,"borderTopColor",e,!1,"#000")),this.format(b),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(ba)||["#000"])[0]}}),ja("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new fa(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var ta=function(a){var b,c=this.t,d=c.filter||O(this.data,"filter"),e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!O(this.data,"filter")):(c.filter=d.replace(/alpha\(opacity *=.+?\)/i,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("opacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(t,"opacity="+e))};ja("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(O(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return b=parseFloat(b),j&&1===h&&"hidden"===O(a,"visibility",e)&&0!==b&&(h=0),H?f=new fa(i,"opacity",h,b-h,f):(f=new fa(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=ta),j&&(f=new fa(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var ua=function(a,b){b&&(a.removeProperty?a.removeProperty(b.replace(/([A-Z])/g,"-$1").toLowerCase()):a.removeAttribute(b))},va=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.className=0===a?this.b:this.e;for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:ua(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.className!==this.e&&(this.t.className=this.e)};ja("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.className,p=a.style.cssText;if(g=f._classNamePT=new fa(a,d,0,0,g,2),g.setRatio=va,g.pr=-11,c=!0,g.b=o,k=R(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("\\s*\\b"+b.substr(2)+"\\b"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),f._tween._duration&&(a.className=g.e,j=S(a,k,R(a),i,m),a.className=o,g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)),g}});var wa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration){var b,c,d,e,f=this.t.style,g=h.transform.parse;if("all"===this.e)f.cssText="",e=!0;else for(b=this.e.split(","),d=b.length;--d>-1;)c=b[d],h[c]&&(h[c].parse===g?e=!0:c="transformOrigin"===c?na:h[c].p),ua(f,c);e&&(ua(f,la),this.t._gsTransform&&delete this.t._gsTransform)}};for(ja("clearProps",{parser:function(a,b,d,e,f){return f=new fa(a,d,0,0,f,2),f.setRatio=wa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),i="bezier,throwProps,physicsProps,physics2D".split(","),ha=i.length;ha--;)!function(a){if(!h[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ja(a,{parser:function(a,c,d,e,f,g,i){var j=(window.GreenSockGlobals||window).com.greensock.plugins[b];return j?(j._cssRegister(),h[d].parse(a,c,d,e,f,g,i)):(J("Error: "+b+" js file not loaded."),f)}})}}(i[ha]);i=g.prototype,i._firstPT=null,i._onInitTween=function(a,b,h){if(!a.nodeType)return!1;this._target=a,this._tween=h,this._vars=b,j=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=N(a,""),f=this._overwriteProps;var i,m,o,p,q,r,s,t,v,w=a.style;if(k&&""===w.zIndex&&("auto"!==(i=O(a,"zIndex",e))&&""!==i||(w.zIndex=0)),"string"==typeof b&&(p=w.cssText,i=R(a,e),w.cssText=p+";"+b,i=S(a,i,R(a)).difs,!H&&u.test(b)&&(i.opacity=parseFloat(RegExp.$1)),b=i,w.cssText=p),this._firstPT=m=this.parse(a,b,null),this._transformType){for(v=3===this._transformType,la?l&&(k=!0,""===w.zIndex&&("auto"!==(s=O(a,"zIndex",e))&&""!==s||(w.zIndex=0)),n&&(w.WebkitBackfaceVisibility=this._vars.WebkitBackfaceVisibility||(v?"visible":"hidden"))):w.zoom=1,o=m;o&&o._next;)o=o._next;t=new fa(a,"transform",0,0,null,2),this._linkCSSP(t,null,o),t.setRatio=v&&oa?ra:la?sa:qa,t.data=this._transform||pa(a,e,!0),f.pop()}if(c){for(;m;){for(r=m._next,o=p;o&&o.pr>m.pr;)o=o._next;(m._prev=o?o._prev:q)?m._prev._next=m:p=m,(m._next=o)?o._prev=m:q=m,m=r}this._firstPT=p}return!0},i.parse=function(a,b,c,f){var g,i,k,l,m,n,o,p,q,r,t=a.style;for(g in b)n=b[g],i=h[g],i?c=i.parse(a,n,g,this,c,f,b):(m=O(a,g,e)+"",q="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||q&&v.test(n)?(q||(n=aa(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=ga(t,g,m,n,!0,"transparent",c,0,f)):!q||-1===n.indexOf(" ")&&-1===n.indexOf(",")?(k=parseFloat(m),o=k||0===k?m.substr((k+"").length):"",""!==m&&"auto"!==m||("width"===g||"height"===g?(k=V(a,g,e),o="px"):"left"===g||"top"===g?(k=Q(a,g,e),o="px"):(k="opacity"!==g?0:1,o="")),r=q&&"="===n.charAt(1),r?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(s,"")):(l=parseFloat(n),p=q?n.substr((l+"").length)||"":""),""===p&&(p=d[g]||o),n=l||0===l?(r?l+k:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&(k||0===k)&&(k=P(a,g,k,o),"%"===p?(k/=P(a,g,100,"%")/100,k>100&&(k=100),!0!==b.strictUnits&&(m=k+"%")):"em"===p?k/=P(a,g,1,"em"):(l=P(a,g,l,p),p="px"),r&&(l||0===l)&&(n=l+k+p)),r&&(l+=k),!k&&0!==k||!l&&0!==l?void 0!==t[g]&&(n||n+""!="NaN"&&null!=n)?(c=new fa(t,g,l||k||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):J("invalid "+g+" tween value: "+b[g]):(c=new fa(t,g,k,l-k,c,0,g,!1!==j&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p)):c=ga(t,g,m,n,!0,null,c,0,f)),f&&c&&!c.plugin&&(c.plugin=f);return c},i.setRatio=function(a){var b,c,d,e=this._firstPT;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;e;){if(b=e.c*a+e.s,e.r?b=b>0?b+.5|0:b-.5|0:b<1e-6&&b>-1e-6&&(b=0),e.type)if(1===e.type)if(2===(d=e.l))e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d-1;)xa(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(R(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||xa(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h=b.to(a,c,d),i=[h],j=[],k=[],l=[],m=b._internals.reservedProps;for(a=h._targets||h.target,xa(a,j,l),h.render(c,!0),xa(a,k),h.render(0,!0),h._enabled(!0),e=l.length;--e>-1;)if(f=S(l[e],j[e],k[e]),f.firstMPT){f=f.difs;for(g in d)m[g]&&(f[g]=d[g]);i.push(b.to(l[e],c,f))}return i},a.activate([g]),g},!0)}),window._gsDefine&&window._gsQueue.pop()(),window.GreenSockGlobals=clientGSAPglobals||null,window._gsQueue=null,window._gsDefine=null,ADG.flash=function(){function a(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(a){return"6,0,0"}}catch(a){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(a){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(a){}}return""}var b={};return b.version=a(),b.available=!!b.version,b.detect=a,b}(),ADG.HtmlElement=function(){this.template_id="",this.template_data={},this.components_collection=[],this.htmlString="",this.init=function(){},this.render=function(){},this.setTemplateVar=function(a,b){this.template_data[a]&&(this.template_data[a]=""),this.template_data[a]=b},this.bindEvents=function(){for(var a=0;a0)x=!0;else if(0===window.scrollY&&s){var a=new GMData.Event("page");a.fireEvent("PAGE_SCROLL_AD_TO_TOP")}var b=ADG.DomHandler.$("#adgPlayerWrapper");6!==ADG.SettingsHandler.get("placement")&&10!==ADG.SettingsHandler.get("placement")||(k(),b=ADG.DomHandler.$("#leaveBehind"));var c=ADG.DomHandler.isElementFullyVisible(b),d=(ADG.DomHandler.isElementFullyInvisible(b),ADG.DomHandler.isElementBelowScreen(b)),e=ADG.SettingsHandler.get("mobile"),f=ADG.SettingsHandler.get("init_touch_event");if(s&&e&&("true"===e||!0===e))if(d&&!f){var g=ADG.SettingsHandler.get("mobile_dock_return");g&&!0===g&&o()}else l(!0);else if(c)f&&!t||(ADG.Logger.debug("[NonLockingHandler] - Player fully visible."),r||(ADG.UnitWrapper.onPlayerVisible(),r=!0),ADG.PlayerSingleton.isPlayingAd()||(s=!0,b.inited||ADG.PlayerSingleton.resumeAd(),ADG.Logger.debug("[NonLockingHandler] - Player fully visible. Video PLAYED/RESUMED.")));else if(ADG.PlayerSingleton.isPlayingAd())if(6!==ADG.SettingsHandler.get("placement")&&10!==ADG.SettingsHandler.get("placement")||!s)ADG.PlayerSingleton.pauseAd(),ADG.PlayerSingleton.setPlayerPausedOnScroll(!0),ADG.Logger.debug("[NonLockingHandler] - Player not fully visible. Video PAUSED.");else{b.inited=!0,b.style.opacity=1;var h=ADG.DomHandler.$(".adgHeader")[0];h&&h.parentNode.removeChild(h);var i=ADG.DomHandler.$(".adgFooter")[0];i&&i.parentNode.removeChild(i);var j=ADG.DomHandler.$("#adgControls");j&&(j.style.height="0px"),playerWrapperClose=ADG.DomHandler.$("#leaveBehindClose"),playerWrapperClose.onclick=function(){var a=ADG.DomHandler.$("#leaveBehind"),b=ADG.DomHandler.$("#adgSlate");a.style.display="none",b.style.height="0px"},l()}}function j(){var a=ADG.DomHandler.$("#leaveBehind");a.style.display="flex",a.style.opacity=0;var b=ADG.DomHandler.$("#adgWrapper_dock");if(6===ADG.SettingsHandler.get("placement")||7===ADG.SettingsHandler.get("placement")){switch(ADG.SettingsHandler.get("dock_position")){case"top_left":v="adgPlayerWrapper_dock adgPlayerWrapper_top adgPlayerWrapper_left",b.className="adgWrapper adgWrapper_top adgWrapper_left";break;case"top_right":v="adgPlayerWrapper_dock adgPlayerWrapper_top adgPlayerWrapper_right",b.className="adgWrapper adgWrapper_top adgWrapper_right";break;case"bottom_left":v="adgPlayerWrapper_dock adgPlayerWrapper_bottom adgPlayerWrapper_left",b.className="adgWrapper adgWrapper_bottom adgWrapper_left";break;default:v="adgPlayerWrapper_dock adgPlayerWrapper_bottom adgPlayerWrapper_right",b.className="adgWrapper adgWrapper_bottom adgWrapper_right"}}else 10===ADG.SettingsHandler.get("placement")&&(v="adgPlayerWrapper_dock adgPlayerWrapper_mobile",b.className="adgWrapper adgWrapper_mobile")}function k(){if(!u){u=!0,j();var a=ADG.SettingsHandler.get("mobile");if(!a||"true"!==a&&!0!==a){var b=document.getElementById("adgWrapper_dock"),c=b.parentNode;b&&c&&c.parentNode&&(c.removeChild(b),c.parentNode.insertBefore(b,c.children[0]))}else;}}function l(a){if(!(y&&!ADG.SettingsHandler.get("mobile_dock_return")||ADG.SettingsHandler.get("mobile_dock_return")&&z)){document.getElementById("adgWrapper_dock").style.visibility="visible";var b=ADG.DomHandler.$("#adgPlayerWrapper");b.className=v;var c=ADG.SettingsHandler.get("mobile");!c||"true"!==c&&!0!==c||(ADG.DomHandler.$("#leaveBehind").style.opacity=1,ADG.DomHandler.$("#adgHeader").style.visibility="hidden"),ADG.DomHandler.$("#leaveBehind").style.height=b.style.height,ADG.DomHandler.$("#adgSlate").style.height=ADG.DomHandler.$("#leaveBehind").style.height,"function"==typeof resizeOverlay&&resizeOverlay(),!c||"true"!==c&&!0!==c||(A=-1,B=!1,b.addEventListener("touchmove",m,!1),b.addEventListener("touchend",n,!1)),null!=a&&!0===a&&(y=!0,ADG.UnitWrapper.setUnitDocked(!0),w.notify({event:"mobileDocked"})),!ADG.UnitWrapper.getUnitDocked()&&6===ADG.SettingsHandler.get("placement")&&ADG.SettingsHandler.get("close_button")&&(ADG.PlayerEvents.closeActive(),ADG.UnitWrapper.setUnitDocked(!0),ADG.PlayerSingleton.dockToBottom())}}function m(a){var b=a.targetTouches[0],c=ADG.DomHandler.$("#adgPlayerWrapper");-1===A&&(A=b.pageY,C=0,B=!1);var d=b.pageY-A;"top"===F?(d<0&&(d=0),C=d):(d>0&&(d=0),C=Math.abs(d)),!B&&C>D&&(B=!0),B&&("top"===F?c.style.top=C+"px":c.style.bottom=C+"px"),a.preventDefault()}function n(a){if(B){var b=ADG.DomHandler.$("#adgPlayerWrapper");"top"===F&&C>E||"bottom"===F&&C<=E?(b.style.top="auto",b.style.bottom="0px",F="bottom"):(b.style.top="0px",b.style.bottom="auto",F="top")}A=-1,B=!1}function o(){document.getElementById("adgWrapper_dock").style.visibility="hidden";var a=ADG.DomHandler.$("#adgPlayerWrapper");a.className="adgPlayerWrapper_inpage";var b=ADG.SettingsHandler.get("mobile");!b||"true"!==b&&!0!==b||(ADG.DomHandler.$("#leaveBehind").style.opacity=0,ADG.DomHandler.$("#adgHeader").style.visibility="visible",a.removeEventListener("touchmove",m,!1),a.removeEventListener("touchend",n,!1)),"function"==typeof resizeOverlay&&resizeOverlay()}function p(){return w}var q=!1,r=!1,s=!1,t=!1,u=!1,v="adgPlayerWrapper_dock adgPlayerWrapper_bottom adgPlayerWrapper_right",w=new ADG.Subject,x=!1,y=!1,z=!1,A=-1,B=!1,C=0,D=10,E=100,F="top";return{onRetailAdReady:a,onRemoveUnit:g,onAdStarted:c,onAdVideoStart:d,checkUnitVisibility:h,onInitEndSlate:e,getSubject:p}}(),ADG.UnitWrapper=function(){function a(){if(ADG.Logger.debug("[UnitWrapper] Removing unit"),!w){w=!0,x&&(y?ADG.LockingHandler.onRemoveUnit():ADG.NonLockingHandler.onRemoveUnit());var a=ADG.DomHandler.$("#adgWrapper_dock");if(a&&a.parentNode.removeChild(a),y){var b=document.documentElement.className,c=document.body.className;document.documentElement.className=b.replace(/adgLocked/g,""),c=c.replace(/adgLockedBody/g,""),c=c.replace(/adgLocked/g,""),document.body.className=c,ADG.Browser.removeEvent(window,"wheel",l)}n=ADG.DomHandler.$(".adgWrapper")[0],o=ADG.DomHandler.$(".adgOverlay")[0],4===ADG.SettingsHandler.get("placement")?p.TweenLite.to(n,.5,{y:window.innerHeight+window.pageYOffset+ADG.Resize.getHeight,onComplete:function(){f()}},1):f()}}function b(){if(!I){if(I=!0,c(),y){var a=document.documentElement.className,b=document.body.className;document.documentElement.className=a.replace(/adgLocked/g,""),b=b.replace(/adgLockedBody/g,""),b=b.replace(/adgLocked/g,""),document.body.className=b,ADG.Browser.removeEvent(window,"wheel",l)}var d=ADG.DomHandler.$("#adgWrapper_dock");d.style.visibility="visible";var e=ADG.DomHandler.$("#adgWrapper"),f=ADG.SettingsHandler.get("dock_position"),g="adgWrapper_dock adgPlayerWrapper_bottom adgPlayerWrapper_right";switch(d.className="adgWrapper_bottom adgWrapper_right",f){case"top_left":g="adgWrapper_dock adgPlayerWrapper_top adgPlayerWrapper_left",d.className="adgWrapper_top adgWrapper_left";break;case"top_right":g="adgWrapper_dock adgPlayerWrapper_top adgPlayerWrapper_right",d.className="adgWrapper_top adgWrapper_right";break;case"bottom_left":g="adgWrapper_dock adgPlayerWrapper_bottom adgPlayerWrapper_left",d.className="adgWrapper_bottom adgWrapper_left"}ADG.PlacementHandler.match([7])&&ADG.SettingsHandler.get("html5")&&ADG.PlayerEvents.closeActive(),e.className=e.className.replace(/(?:^|\s)adgWrapper(?!\S)/g,g),ADG.DomHandler.$("#adgSlate").className+=" adgSlate_dock",ADG.DomHandler.$("#adgPlayerWrapper").className+=" adgPlayerWrapper_dock",ADG.DomHandler.$("#adgHeader").style.display="none",ADG.DomHandler.$("#adgFooter").style.display="none","function"==typeof resizeOverlay&&resizeOverlay(),ADG.PlayerSingleton.dockToBottom()}}function c(){if(!J){J=!0;var a=ADG.DomHandler.$("#adgWrapper_dock"),b=a.parentNode;a&&b&&b.parentNode&&(b.removeChild(a),b.parentNode.insertBefore(a,b.children[0]))}}function d(a){if(D){var b=ADG.DomHandler.$(".adgWrapper")[0];if(0!==a.clientX&&0!==a.clientY){var c=B+(a.clientX-z),d=C+(a.clientY-A);c<0&&(c=0),c>=window.innerWidth-b.getBoundingClientRect().width&&(c=window.innerWidth-b.getBoundingClientRect().width),d<0&&(d=0),d>=window.innerHeight-b.getBoundingClientRect().height&&(d=window.innerHeight-b.getBoundingClientRect().height),b.style.left=c+"px",b.style.top=d+"px"}}}function e(){var a=ADG.DomHandler.$(".adgWrapper")[0],b=a.getBoundingClientRect().left,c=a.getBoundingClientRect().top;b>=window.innerWidth-a.getBoundingClientRect().width&&(b=window.innerWidth-a.getBoundingClientRect().width),b<0&&(b=0),c>=window.innerHeight-a.getBoundingClientRect().height&&(c=window.innerHeight-a.getBoundingClientRect().height),c<0&&(c=0),a.style.left=b+"px",a.style.top=c+"px"}function f(){if(ADG.PlayerSingleton.destroyPlayer(),r&&n){var a=ADG.SettingsHandler.get("leave_behind");6===ADG.SettingsHandler.get("placement")?ADG.DomHandler.$("#leaveBehind").inited?(ADG.DomHandler.$("#leaveBehind").style.opacity=1,ADG.DomHandler.$("#leaveBehindClose").onclick=function(a){r.removeChild(n)}):r.removeChild(n):10===ADG.SettingsHandler.get("placement")?ADG.DomHandler.$("#leaveBehind").inited||(ADG.DomHandler.$("#leaveBehind").style.opacity=1,ADG.DomHandler.$("#leaveBehindClose").onclick=function(a){r.removeChild(n)}):x&&a?(ADG.DomHandler.$("#leaveBehind").style.display="flex",ADG.DomHandler.$("#leaveBehindClose").onclick=function(a){r.removeChild(n)}):("9001"===ADG.SettingsHandler.get("intercept_id")&&(r=document.getElementById("gm-script-tag").parentElement),r.removeChild(n))}r&&o&&document.body.removeChild(o);var b=ADG.DomHandler.$(".adgHeader")[0];r&&b&&n&&n.removeChild(b);var c=ADG.DomHandler.$("#adgControls");r&&c&&n&&n.removeChild(c);var d=ADG.DomHandler.$(".adgWrapper_dock")[0];r&&d&&r.removeChild(d),ADG.Performance.record("unitRemoved"),M&&N.notify({event:"pageUnlocked"}),ADG.Browser.removeEvent(window,"pagebeforehide",ADG.UnitWrapper.abandonCB),ADG.UserAgent.os.indexOf("iOS")>=0?ADG.Browser.removeEvent(window,"pagehide",ADG.UnitWrapper.abandonCB):ADG.Browser.removeEvent(window,"beforeunload",ADG.UnitWrapper.abandonCB),void 0!==ADG.SettingsHandler.get("click_url")&&(ADG.Browser.removeEvent(ADG.DomHandler.$("#adgHeader"),"click",m),ADG.Browser.removeEvent(ADG.DomHandler.$("#adgFooter"),"click",m))}function g(){if(!ADG.PlayerAdapter.isLiverailMode())if(x&&y)ADG.LockingHandler.onRetailAdLoadReady(!1);else{if(8===ADG.SettingsHandler.get("placement")){var a=ADG.DomHandler.$(".adgWrapper")[0];a&&(a.style.opacity=1)}q.showUnit()}}function h(){x?y?ADG.LockingHandler.onRetailAdReady():ADG.NonLockingHandler.onRetailAdReady():ADG.PlayerSingleton.pageLocked()}function i(){if(!ADG.PlayerAdapter.isLiverailMode())return void ADG.Logger.debug("[Wrapper] - Wrapper onAdStarted Liverail");if(x&&!y)ADG.Logger.info("[Wrapper] - Wrapper onAdStarted inpage not locking"),q.showUnit(),ADG.NonLockingHandler.onAdStarted();else if(x&&y)ADG.Logger.info("[Wrapper] - Wrapper onAdStarted inpage locking"),ADG.LockingHandler.onAdStarted();else if(!x){if(8===ADG.SettingsHandler.get("placement")){var a=ADG.DomHandler.$(".adgWrapper")[0];a&&(a.style.opacity=1)}ADG.Logger.info("[Wrapper] - Wrapper onAdStarted not inpage"),q.showUnit()}}function j(a){ADG.Logger.debug("[Wrapper] - updateClose"),ADG.DomHandler.$("#adgClose")&&(v=ADG.DomHandler.$("#adgClose"));try{v.style.display="block",a.active&&ADG.Browser.addEvent(v,"click",ADG.UnitWrapper.closeCB)}catch(a){}}function k(a){ADG.Logger.debug("[Wrapper] - updateContinue");var b;u||(u=ADG.DomHandler.$(".adgContinue")[0]);try{u.innerHTML=a.skipMessage||"",a.active&&(ADG.Browser.addEvent(u,"click",ADG.UnitWrapper.skipCB),u.className+=" active",b=u.className.replace(/inactive/g,""),u.className=b)}catch(a){}}function l(a){a.preventDefault()}function m(){ADG.Utils.shootPixel(ADG.SettingsHandler.get("click_url"))}var n,o,p=ADG.GSAP.com.greensock,q=new ADG.HtmlElement;q.template_id="adg_wrapper",q.template_data={},q.components_collection=[],q.added_to_dom=!1;var r,s,t,u,v,w,x=!1,y=!0,z=0,A=0,B=0,C=0,D=!1,E=!1,F=!1,G=-1,H=0,I=!1,J=!1,K=!1,L=!1,M=!1;q.playerObserver=new ADG.Observer,q.skipObserver=new ADG.Observer,q.closeObserver=new ADG.Observer,q.setupObserver=new ADG.Observer;var N=new ADG.Subject;return q.playerObserver.notify=function(b){if(b&&b.event)switch(b.event){case"dataReady":break;case"retailAdLoadReady":g();break;case"retailAdReady":h();break;case"adStarted":x&&q.showPlayer(),i();break;case"adVideoStart":x?x&&!y&&(ADG.Logger.debug("[Wrapper] - Wrapper adVideoStart inpage and not locking"),ADG.NonLockingHandler.onAdVideoStart()):(q.showPlayer(),ADG.Logger.debug("[Wrapper] - Wrapper adVideoStart not inpage"),ADG.PlayerSingleton.resumeAd(),void 0!==ADG.SettingsHandler.get("view_url")&&ADG.Utils.shootPixel(ADG.SettingsHandler.get("view_url")));break;case"adStopped":var c=ADG.SettingsHandler.get("mobile");b.mouseClicked||!c||"true"!==c&&!0!==c?!b.mouseClicked||!c||"true"!==c&&!0!==c||I?c||a():a():ADG.NonLockingHandler.onInitEndSlate();break;case"retailDataError":a();break;case"retailAdError":break;case"adResponseFailed":a();break;case"adClickThrough":void 0!==ADG.SettingsHandler.get("click_url")&&m();break;case"adVideoComplete":ADG.DomHandler.$("#tppPlayerWrapper")||c||"false"!==c&&!1!==c||q.hidePlayer()}},q.skipObserver.notify=function(a){if(!s&&a&&a.event)switch(a.event){case"skipCalculated":case"skipTimeChange":case"skipActive":k(a)}},q.closeObserver.notify=function(a){if(!t&&a&&a.event)switch(a.event){case"closeClicked":case"closeActive":j(a)}},q.setupObserver.notify=function(b){if(b&&b.event)switch(b.event){case"filtersNotPassed":case"passbackTimedOut":a()}},q.getSubject=function(){return N},q.setUnitDocked=function(a){I=a},q.getUnitDocked=function(){return I},q.init=function(){ADG.Logger.debug("[Wrapper] - Wrapper init function"),ADG.PlayerEvents.getSubject().addObserver(q.playerObserver),ADG.Skip.get("enabled")&&ADG.Skip.getSubject().addObserver(q.skipObserver),ADG.Close.get("enabled")&&ADG.Close.getSubject().addObserver(q.closeObserver),ADG.SetupHandler.getSubject().addObserver(q.setupObserver),this.render()},q.isAddedToDom=function(){return this.added_to_dom},q.render=function(){ADG.Logger.debug("[Wrapper] - Rendering Wrapper");var a,b;if(y=1!==ADG.SettingsHandler.get("placement")&&3!==ADG.SettingsHandler.get("placement")&&4!==ADG.SettingsHandler.get("placement")&&6!==ADG.SettingsHandler.get("placement")&&7!==ADG.SettingsHandler.get("placement")&&8!==ADG.SettingsHandler.get("placement")&&9!==ADG.SettingsHandler.get("placement")&&10!==ADG.SettingsHandler.get("placement"),s=3===ADG.SettingsHandler.get("placement")||6===ADG.SettingsHandler.get("placement")||8===ADG.SettingsHandler.get("placement")||9===ADG.SettingsHandler.get("placement")||10===ADG.SettingsHandler.get("placement"),t=3!==ADG.SettingsHandler.get("placement")&&!0!==ADG.Close.get("enabled")||6!==ADG.SettingsHandler.get("placement")&&!0!==ADG.Close.get("enabled")||7!==ADG.SettingsHandler.get("placement")&&!0!==ADG.Close.get("enabled")||10!==ADG.SettingsHandler.get("placement")&&!0!==ADG.Close.get("enabled"),ADG.PlacementHandler.match([3,6,9,10])){if(a=ADG.SettingsHandler.get("css_path")){var c=ADG.Selector(a);if(c.isFound())(r=c.get())instanceof HTMLCollection&&(r=r[0]);else{if(a=void 0,!ADG.SetupHandler.getInjectionElement())return void ADG.Logger.warn("[Wrapper] - No CSS path found for in page unit - No Injection Element");r=ADG.SetupHandler.getInjectionElement().parentElement}}else{if(ADG.Logger.info("[Wrapper] - No CSS path defined for in page unit. Moving to auto injection method."),!ADG.SetupHandler.getInjectionElement())return void ADG.Logger.warn("[Wrapper] - No CSS path found for in page unit - No Injection Element");r=ADG.SetupHandler.getInjectionElement().parentElement}x=!0,b="relative"}else b="fixed",r=ADG.DomHandler.$("body")[0];if(r){var f=this.getDOMElement();if(b&&f&&(f.style.position=b,"fixed"===b&&"Internet Explorer"===ADG.UserAgent.name&&(f.style.top=document.documentElement.clientHeight+300+"px")),4===ADG.SettingsHandler.get("placement")&&p.TweenLite.set(f,{y:ADG.Resize.getHeight()/1.5}),ADG.PlacementHandler.match([9])&&!a?(r=document.getElementById("gm-script-tag").parentElement,r.insertBefore(f,document.getElementById("gm-script-tag"))):ADG.PlacementHandler.match([3,9])&&!a&&ADG.SetupHandler.getInjectionElement()?(r=ADG.SetupHandler.getInjectionElement().parentElement,r.insertBefore(f,ADG.SetupHandler.getInjectionElement())):r.insertBefore(f,r.firstChild),8===ADG.SettingsHandler.get("placement")){var g=ADG.DomHandler.$(".adgWrapper")[0];if(g&&!1===E){switch(ADG.SettingsHandler.get("dock_position")){case"top_left":g.style.left="0px",g.style.top="120px",g.style.bottom="inherit",g.style.right="inherit";break;case"top_right":g.style.left="inherit",g.style.top="120px",g.style.bottom="inherit",g.style.right="0px";break;case"bottom_left":g.style.left="0px",g.style.top="inherit",g.style.right="inherit"}}var h=document.getElementById("adgDragger");h&&(h.addEventListener("mousedown",function(a){B=f.getBoundingClientRect().left,C=f.getBoundingClientRect().top,z=a.clientX,A=a.clientY,D=!0,g&&!1===E&&(g.style.left=B+"px",g.style.top=C+"px",g.style.bottom="inherit",g.style.right="inherit",E=!0,eventType.fireEvent("PLAYER_DRAGGED")),document.addEventListener("mousemove",d),a.preventDefault()}),document.addEventListener("mouseup",function(a){D=!1,document.removeEventListener("mousemove",d)},!0),window.addEventListener("resize",function(a){E&&e()}))}ADG.DomHandler.$("#adgResponsiveConstraint")&&ADG.DomHandler.$("#adgResponsiveConstraint").style&&(ADG.DomHandler.$("#adgResponsiveConstraint").style.opacity=0),q.viewCloseButton(),q.viewPrivacyButton(),this.added_to_dom=!0}},q.controlPlayerVisible=function(){ADG.DomHandler.isElementFullyVisible(ADG.DomHandler.$("#adgPlayerWrapper"))&&this.onPlayerVisible()},q.onPlayerVisible=function(){N.notify({event:"playerFullyVisible"})},q.closeCB=function(){ADG.Logger.debug("[Wrapper] Close clicked."),ADG.Close.isActive()&&(N.notify({event:"closeClicked"}),a())},q.skipCB=function(){ADG.Logger.debug("[Wrapper] Skip clicked."),ADG.Skip.isActive()&&(7===ADG.SettingsHandler.get("placement")?b():(ADG.PlayerSingleton.skip(),N.notify({event:"adSkipped"}),a())),"Internet Explorer"===ADG.UserAgent.name&&"8.0"===ADG.UserAgent.version&&void 0!==ADG.SettingsHandler.get("click_url")&&m()},q.viewPrivacyButton=function(){if(!L){var a=document.getElementById("privacyImg");a&&(a.src=ADG.env.get("img_asset_path")+"button-normal.svg",a.addEventListener("mouseover",q.onPrivacyMouseOver,!1),a.addEventListener("mouseout",q.onPrivacyMouseOut,!1),a.addEventListener("click",q.privacyOnClick,!1),L=!0)}},q.onPrivacyMouseOver=function(){document.getElementById("privacyImg").src=ADG.env.get("img_asset_path")+"button-hover.svg"},q.onPrivacyMouseOut=function(){document.getElementById("privacyImg").src=ADG.env.get("img_asset_path")+"button-normal.svg"},q.privacyOnClick=function(){window.open(ADG.env.get("privacy"),"_blank")},q.viewCloseButton=function(){ !K&&ADG.PlacementHandler.match([3,6,7,8,10])&&ADG.SettingsHandler.get("close_button")&&(ADG.SettingsHandler.get("intercept_id").toString().match(/^3.*$/gi)||ADG.DomHandler.$("#adgCloseImg")&&(ADG.DomHandler.$("#adgCloseImg").src=ADG.env.get("img_asset_path")+"close.png",ADG.DomHandler.$("#adgClose").style.opacity=0,ADG.DomHandler.$("#adgClose").style.display="none"),ADG.DomHandler.$("#adgCloseImg")&&(ADG.DomHandler.$("#adgCloseImg").onclick=function(a){ADG.PlayerEvents.closeClicked(),ADG.PlayerEvents.adStopped()}),q.showCloseButton(),ADG.DomHandler.$("#adgPlayerWrapper").addEventListener("mouseover",q.showCloseButton,!1),ADG.DomHandler.$("#adgPlayerWrapper").addEventListener("mouseout",q.hideCloseButton,!1),null!=ADG.DomHandler.$("#tppPlayerWrapper")&&(ADG.DomHandler.$("#tppPlayerWrapper").addEventListener("mouseover",q.showCloseButton,!1),ADG.DomHandler.$("#tppPlayerWrapper").addEventListener("mouseout",q.hideCloseButton,!1)),ADG.DomHandler.$("#adgClose")&&(ADG.DomHandler.$("#adgClose").addEventListener("mouseover",q.showCloseButton,!1),ADG.DomHandler.$("#adgClose").addEventListener("mouseout",q.hideCloseButton,!1),K=!0),G=setTimeout(q.hideCloseButton,2e3))},q.showCloseButton=function(){try{clearTimeout(G)}catch(a){}F=!0,ADG.PlacementHandler.match([3,8,10])&&ADG.SettingsHandler.get("close_button")?ADG.DomHandler.$("#adgClose")&&(ADG.DomHandler.$("#adgClose").style.opacity=1,ADG.DomHandler.$("#adgClose").style.display="inline"):ADG.PlacementHandler.match([6,7])&&I&&ADG.SettingsHandler.get("close_button")&&ADG.DomHandler.$("#adgClose")&&(ADG.DomHandler.$("#adgClose").style.opacity=1,ADG.DomHandler.$("#adgClose").style.display="inline")},q.hideCloseButton=function(){!1!==F&&(F=!1,ADG.PlacementHandler.match([3,6,7,8])&&ADG.SettingsHandler.get("close_button")&&ADG.DomHandler.$("#adgClose")&&(ADG.DomHandler.$("#adgClose").style.opacity=0,ADG.DomHandler.$("#adgClose").style.display="none"))},q.showPlayer=function(){var a=ADG.DomHandler.$(".adgWrapper")[0];a&&(a.className="adgWrapper adgWrapperOpaqueBackground");var b=ADG.DomHandler.$("#adgPlayerWrapper");b&&(b.style.opacity="0"),ADG.DomHandler.$("#adgPlayerWrapper").style.opacity="1";var c=ADG.DomHandler.$(".adgHeader")[0];c&&(c.style.visibility="visible");var d=ADG.DomHandler.$(".adgFooter")[0];d&&(d.style.visibility="visible")},q.hidePlayer=function(){var a=ADG.DomHandler.$(".adgWrapper")[0];a&&(a.style.opacity="0");var b=ADG.DomHandler.$("#adgPlayerWrapper");b&&(b.style.opacity="0");var c=ADG.DomHandler.$(".adgHeader")[0];c&&(c.style.visibility="hidden");var d=ADG.DomHandler.$(".adgFooter")[0];d&&(d.style.visibility="hidden");var e=ADG.DomHandler.$("#adgWrapper_dock");e&&e.parentNode.removeChild(e)},q.showUnit=function(){if(ADG.Logger.info("[UnitWrapper] Showing unit"),"9001"===ADG.SettingsHandler.get("intercept_id")&&(ADG.Logger.info("[UnitWrapper] - Sets Disqus/AdsNative inview listeners"),window.document.addEventListener("adsnative.mrc50.view:in",function(){ADG.Logger.info("[UnitWrapper] - Disqus - Sets Dom unit visibility: true"),ADG.DomHandler.setVisibility(!0),ADG.NonLockingHandler.checkUnitVisibility()}),window.document.addEventListener("adsnative.mrc50.view:out",function(){ADG.Logger.info("[UnitWrapper] - Disqus - Sets Dom unit visibility: false"),ADG.DomHandler.setVisibility(!1),ADG.NonLockingHandler.checkUnitVisibility()})),ADG.DomHandler.$("#adgResponsiveConstraint")&&ADG.DomHandler.$("#adgResponsiveConstraint").style&&(ADG.DomHandler.$("#adgResponsiveConstraint").style.opacity=1),H=(new Date).getTime(),y){var a=document.documentElement.className;document.documentElement.className=a+" adgLocked";var b=document.body.className;document.body.className=b+" adgLockedBody",ADG.Browser.addEvent(window,"wheel",l)}var c=ADG.DomHandler.$(".adgOverlay")[0];c&&(c.style.visibility="visible");var d=ADG.DomHandler.$(".adgWrapper")[0];!0!==x&&(d&&("Internet Explorer"===ADG.UserAgent.name&&(d.style.top="auto"),d.style.pointerEvents="auto"),y&&window.scrollTo(0,0));var e=ADG.DomHandler.$("#adgPlayerWrapper");e&&(e.style.opacity="1",e.style.filter="alpha(opacity=100)"),4===ADG.SettingsHandler.get("placement")&&p.TweenLite.to(d,.5,{y:0},1);var f=ADG.DomHandler.$(".adgHeader")[0];f&&(f.style.height="15px",f.style.paddingBottom="2px",I||(f.style.visibility="visible"));var g=ADG.DomHandler.$(".adgAdText")[0];g&&(g.style.height="15px");var h=ADG.DomHandler.$(".adgFooter")[0];h&&(h.style.height="16px",h.style.paddingTop="2px");var i=ADG.DomHandler.$("#adgSlate");if(i&&(i.style.paddingTop="5px",i.style.paddingBottom="5px"),ADG.Performance.record("unitDisplayed"),N.notify({event:"pageLocked"}),M=!0,ADG.UserAgent.os.indexOf("iOS")>=0?ADG.Browser.addEvent(window,"pagehide",ADG.UnitWrapper.abandonCB):ADG.Browser.addEvent(window,"beforeunload",ADG.UnitWrapper.abandonCB),ADG.Resize.setSize(),ADG.PlayerSingleton.resize(),ADG.Resize.onResize(),void 0!==ADG.SettingsHandler.get("click_url")&&(ADG.Browser.addEvent(ADG.DomHandler.$("#adgHeader"),"click",m),ADG.Browser.addEvent(ADG.DomHandler.$("#adgFooter"),"click",m)),y||!s||t){var j=ADG.Skip.getAll();k(j),j.countdownOnStart&&""!==ADG.SettingsHandler.get("skip_time")?ADG.Skip.activateSkip():u&&(u.className+=" inactive"),this.controlPlayerVisible()}},q.getVisibleDuration=function(){return H>0?(new Date).getTime()-H:0},q.abandonCB=function(a){N.notify({event:"pageAbandoned"})},q.removeUnit=function(){q.hidePlayer(),a()},q}(),ADG.Overlay=function(){var a=new ADG.HtmlElement;return a.adg_overlay="",a.template_id="adg_overlay",a.template_data={},a.components_collection=[],a.added_to_dom=!1,a.init=function(){if(ADG.Logger.debug("[Overlay] - Init function"),2!==ADG.SettingsHandler.get("placement"))return void ADG.Logger.debug("[Overlay] Not rendering overlay because of non locking option");this.render()},a.isAddedToDom=function(){return this.added_to_dom},a.render=function(){ADG.Logger.debug("[Overlay] - Rendering Overlay");var a=ADG.DomHandler.$("body")[0];if(a){var b=this.getDOMElement();b&&a.insertBefore(b,a.firstChild),this.added_to_dom=!0}else ADG.Logger.warn("[Overlay] - Trying to render overlay wrapper but body doesn't exist")},a}(),ADG.TemplateHandler=function(){function a(a){return void 0===a?(ADG.Logger.error("[TemplateHandler] There is no interceptId value."),!1):(d(),ADG.Logger.debug("[TemplateHandler] Loading template. InterceptId: "+a),b("adg_"+a+".min.css"),c("TemplateVars_"+a+".js"),!0)}function b(a){var b=ADG.DomHandler.$("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.media="all",c.href=ADG.root_url+ADG.env.get("style_files")+a,b.appendChild(c)}function c(a){var b,c=document.createElement("script"),d=!1,f=ADG.root_url+ADG.env.get("template");c.src=f+a,c.onload=c.onreadystatechange=function(){if(!(d||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){for(d=!0,ADG.Logger.debug("[TemplateHandler] Attaching template to DOM"),ADG.Performance.record("templatesFetched"),b=0;bo?o:a}function c(a){q=a}function d(a){n=a}function e(a){o=a}function f(){return b()*p}function g(a){var b=f();return a&&(b=a),b*m+parseInt(ADG.PlayerAdapter.getFlashSettings().progressBarThickness,10)}function h(a){m=a,ADG.Resize.setSize()}function i(){return ADG.DomHandler.$("#adgSlate").offsetWidth*m+parseInt(ADG.PlayerAdapter.getFlashSettings().progressBarThickness,10)}function j(){var a,b,c=0,d=0;ADG.DomHandler.$("#adgPlayerWrapper")&&(ADG.DomHandler.$("#adgHeader")&&(a=ADG.DomHandler.$("#adgHeader"),c=4===ADG.SettingsHandler.get("placement")?0:a.clientHeight),ADG.DomHandler.$("#adgFooter")&&(b=ADG.DomHandler.$("#adgFooter"),d=b.clientHeight),1===ADG.SettingsHandler.get("placement")||4===ADG.SettingsHandler.get("placement")||7===ADG.SettingsHandler.get("placement")?(ADG.DomHandler.$("#adgPlayerWrapper").style.height=Math.ceil(g())+"px",ADG.DomHandler.$("#adgSlate").style.width=Math.ceil(f())+"px",ADG.DomHandler.$("#adgSlate").style.height=Math.ceil(g()+c+d)+"px",4===ADG.SettingsHandler.get("placement")&&ADG.DomHandler.$("#adgWrapper")&&(ADG.DomHandler.$("#adgWrapper").style.height=Math.ceil(g())+"px")):(ADG.DomHandler.$("#adgSlate").style.height=Math.ceil(i()+c+d)+"px",ADG.DomHandler.$("#adgPlayerWrapper").style.height=Math.ceil(i())+"px",ADG.DomHandler.$("#adgControls")&&(ADG.DomHandler.$("#adgControls").style.height=Math.ceil(i())+"px")))}function k(a){return Math.ceil(g(a))}function l(){return Math.ceil(f())}var m=9/16,n=600,o=1e3,p=.75,q=0;return{setSize:j,onResize:a,widthWithOffset:f,setAlternateAspectRatio:h,setMinWidth:d,setMaxWidth:e,getHeight:k,getWidth:l,setWidthResizeThreshold:c}}();var ADG=ADG||{};ADG.html5={},ADG.html5.addPackageName=function(a){for(var b=a.split("."),c=this,d=0;d=1?(h=c/f)>c&&(h=c,g=h*f):(g=d*f)>d&&(g=d,h=g/f),{ratio:f,width:g,height:h}},Class.HHSSMMToSecond=function(a){var b=a,c=b.indexOf(".");c>=0&&(b=b.substring(0,c));var d=b.split(":");return 3600*d[0]+60*d[1]+1*d[2]},function(){function a(a){var b=a.__resizeTriggers__,c=b.firstElementChild,d=b.lastElementChild,e=c.firstElementChild;d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,e.style.width=c.offsetWidth+1+"px",e.style.height=c.offsetHeight+1+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight}function b(a){return a.offsetWidth!=a.__resizeLast__.width||a.offsetHeight!=a.__resizeLast__.height}function c(c){var d=this;a(this),this.__resizeRAF__&&h(this.__resizeRAF__),this.__resizeRAF__=g(function(){b(d)&&(d.__resizeLast__.width=d.offsetWidth,d.__resizeLast__.height=d.offsetHeight,d.__resizeListeners__.forEach(function(a){a.call(d,c)}))})}function d(){if(!f){var a=(r||"")+".resize-triggers { "+(s||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',b=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),b.appendChild(c),f=!0}}var e=document.attachEvent,f=!1;if(!e){var g=function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)};return function(b){return a(b)}}(),h=function(){var a=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout;return function(b){return a(b)}}(),i=!1,j="",k="animationstart",l="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),n="",o=document.createElement("fakeelement");if(void 0!==o.style.animationName&&(i=!0),!1===i)for(var p=0;p
',b.appendChild(b.__resizeTriggers__),a(b),b.addEventListener("scroll",c,!0),k&&b.__resizeTriggers__.addEventListener(k,function(c){c.animationName==q&&a(b)})),b.__resizeListeners__.push(f))},window.removeResizeListener=function(a,b){e?a.detachEvent("onresize",b):(a.__resizeListeners__.splice(a.__resizeListeners__.indexOf(b),1),a.__resizeListeners__.length||(a.removeEventListener("scroll",c),a.__resizeTriggers__=!a.removeChild(a.__resizeTriggers__)))}}();var Package=ADG.html5.getPackage("com.genesismedia.cu.utils");Package.StringUtils=function(){this.classConstructor=arguments.callee,this.classConstructor.VALID_URL_REGEX=new RegExp(/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/),this.classConstructor.pUrl=document.location.href,this.classConstructor.pTitle=document.title,this.classConstructor.pReferrer=document.referrer,this.classConstructor.pDomain=window.location.hostname,this.classConstructor.filterAdTag=function(a){var b=a,c=b.indexOf("pgDomain=");return c<=0&&(b=b.replace("ac?","ac?pgDomain=[INSERT_PAGE_URL:double_encode]&")),c=b.indexOf("vpw="),c<=0&&(b=b.replace("ac?","ac?vpw=[PLAYER_WIDTH]&vph=[PLAYER_HEIGHT]&")),this.filterPixel(b)},this.classConstructor.filterPixel=function(a){var b=ADG.html5.com.genesismedia.cu.Player.getInstance(),c=this.pUrl,d=this.pTitle,e=(this.pReferrer,this.trimSubDomain(this.pDomain)),f=a,g=String((new Date).getTime()),h=b.getWidth(),i=b.getHeight();(isNaN(h)||h<=1)&&(h=b.get("domWidth")),(isNaN(i)||i<=1)&&(i=b.get("domHeight")),isNaN(h)&&(h=-1),isNaN(i)&&(i=-1),h=Math.floor(h),i=Math.floor(i);var j=b.get("intercept"),k=b.get("skip_time"),l=b.get("position"),m=b.get("parScore"),n=b.get("vtrScore");return f=f.split("REPLACE_ME_WITH_A_TIMESTAMP").join(g),f=f.split("%%CACHEBUSTER%%").join(g),f=f.split("[CACHE_BUSTER]").join(g),f=f.split("CACHEBUSTER").join(g),f=f.split("INSERT_RANDOM_NUMBER_HERE").join(g),f=f.split("[timestamp]").join(g),f=f.split("[TIMESTAMP]").join(g),f=f.split("[INSERT_PAGE_TITLE]").join(d),f=f.split("[DOMAIN_NAME]").join(e),f=f.split("[INSERT_PAGE_URL]").join(c),f=f.split("[PAGE_URL]").join(c),f=f.split("[Page_URL]").join(c),f=f.split("[SOURCE_PAGE_URL]").join(c),f=f.split("[SOURCE_PAGE_URL:REQUIRED]").join(c),f=f.split("%%REFERRER_URL%%").join(c),f=f.split("[INSERT_PAGE_URL:encode]").join(encodeURIComponent(c)),f=f.split("[INSERT_PAGE_URL:double_encode]").join(encodeURIComponent(encodeURIComponent(c))),f=f.split("%%WIDTH%%").join(h),f=f.split("[VIDEO_WIDTH]").join(h),f=f.split("[PLAYER_WIDTH]").join(h),f=f.split("[PLAYER_WIDTH:REQUIRED]").join(h),f=f.split("%%HEIGHT%%").join(i),f=f.split("[VIDEO_HEIGHT]").join(i),f=f.split("[PLAYER_HEIGHT]").join(i),f=f.split("[PLAYER_HEIGHT:REQUIRED]").join(i),f=f.split("[[GM_CACHE_BUSTER]]").join(g),f=f.split("[[GM_INTERCEPT_ID]]").join(j),f=f.split("[[GM_SKIP_TIME]]").join(k),f=f.split("[[GM_PLAYER_POSITION]]").join(l),f=f.split("[[GM_PLAYER_WIDTH]]").join(h),f=f.split("[[GM_PLAYER_HEIGHT]]").join(i),f=f.split("[[GM_PAGE_TITLE]]").join(d),f=f.split("[[GM_PAGE_URL]]").join(c),f=f.split("[[GM_VAST_VERSION]]").join("2.0"),f=f.split("[[GM_PAR_SCORE]]").join(m),f=f.split("[[GM_VTR_SCORE]]").join(n)},this.classConstructor.evalURL=function(a){return this.VALID_URL_REGEX.test(a)},this.classConstructor.getXMLNodeValue=function(a,b){if(a)if(b){var c=a.getElementsByTagName(b);if(c.length>0&&c[0].firstChild)return c[0].firstChild.wholeText?c[0].firstChild.wholeText.trim():c[0].firstChild.nodeValue}else if(a.firstChild)return a.firstChild.wholeText?a.firstChild.wholeText.trim():a.firstChild.nodeValue;return""},this.classConstructor.toUnderscoreCase=function(a){return a&&""!=a?a.replace(/\.?([A-Z])/g,function(a,b){return"_"+b.toLowerCase()}).replace(/^_/,""):""},this.classConstructor.trimSubDomain=function(a){if(!a)return"";var b=a.length-4;if(a.indexOf(".com")===b||a.indexOf(".org")===b||a.indexOf(".net")===b){var c=a.split(".");return c.length>2?c[c.length-2]+"."+c[c.length-1]:a}return 0===a.indexOf("www.")?a.substring(4,a.length):0===a.indexOf("m.")?a.substring(2,a.length):a},this.classConstructor.getUrlParam=function(a,b){for(var c=a.split("&"),d=0;d=0)return!0}return!1},this.classConstructor.isInIMAWhiteList=function(a){for(var b=0;b0?vastObjectManager.vastObjects[0]:{};if(vastObjectManager.hasWrapper&&!0===vastObjectManager.hasWrapper?obj.type="wrapper":obj.type="inlined",obj.advertiserid=vastObjectManager.advertiserId&&vastObjectManager.advertiserId.length>0?vastObjectManager.advertiserId[0]:vastObject.advertiserId,obj.sequence=vastObjectManager.adIndex,obj.insertionid=vastObjectManager.adId&&""!==vastObjectManager.adId?vastObjectManager.adId:vastObject.adId,obj.campaignid=vastObjectManager.campaignId&&vastObjectManager.campaignId.length>0?vastObjectManager.campaignId[0]:vastObject.campaignId,obj.creativeid=vastObjectManager.creativeId&&vastObjectManager.creativeId.length>0?vastObjectManager.creativeId[0]:vastObject.creativeId,obj.pageid=vastObjectManager.pageId&&vastObjectManager.pageId.length>0?vastObjectManager.pageId[0]:vastObject.pageId,obj.formatid=vastObjectManager.formatId&&vastObjectManager.formatId.length>0?vastObjectManager.formatId[0]:vastObject.formatId,obj.lastRetail=Player.getInstance().isLastAd(),vastObjectManager&&vastObjectManager.rtbData)for(var key in vastObjectManager.rtbData)obj[key]=vastObjectManager.rtbData[key];null!=this.jsFunction&&"string"==typeof this.jsFunction&&(this.jsFunction=eval(this.jsFunction)),null==this.jsFunction&&""==this.jsFunction||this.jsFunction(this.playerId,type.charAt(0).toLowerCase()+type.slice(1),obj)},this.classConstructor.setPixels=function(a){var b=ADG.html5.com.genesismedia.cu.events.PixelTracker;null!=a&&""!=a&&(b.pixels=a)},this.classConstructor.firePixel=function(a){var b=ADG.html5.com.genesismedia.cu.events.PixelTracker;null!=a&&""!=a&&b.fire(a)},this.classConstructor.fireUrl=function(a){var b=ADG.html5.com.genesismedia.cu.events.PixelTracker;null!=a&&""!=a&&b.fireUrl(a)},this.classConstructor.firePlayerPixel=function(a){var b=ADG.html5.com.genesismedia.cu.events.PixelTracker;null!=a&&""!=a&&b.firePlayerPix(a)},this.classConstructor.fireAdOpportunityUrl=function(a){var b=ADG.html5.com.genesismedia.cu.events.PixelTracker;null!=a&&""!=a&&b.fireUrl(a)}},new Package.External;var Package=ADG.html5.getPackage("com.genesismedia.cu.events");Package.PixelTracker=function(){var a=ADG.html5.com.genesismedia.cu.events.External;this.classConstructor=arguments.callee,this.classConstructor.enable=!0,this.classConstructor.pixels=[],this.classConstructor.fireOnce={playerUnmuted:!1,playerMuted:!1},this.classConstructor.fireUrl=function(b){if(this.enable)try{""!=b&&"\\"!=b&&a.report("firePixel",{pixel:b})}catch(a){ADG.Logger.warn("PixelTracker ::: Unable to fire requested url:"+b)}},this.classConstructor.firePlayerPixel=function(a){if(this.enable){var b=new Array;switch(a.type){case"playerMuted":null!=this.pixels.mute&&(b=pixels.mute);break;case"playerUnmuted":null!=this.pixels.unmute&&(b=pixels.unmute)}this.fireOnce[a.type]||(this.fireOnce[a.type]=!0,this.firePixelRequest(b))}},this.classConstructor.firePixelRequest=function(b){if(b){for(var c=b.length;c>0;c--)b.indexOf(b[c-1])!=c-1&&b.splice(c-1,1);for(var d=0;d=w.ads.length&&(a=!0)}else a=!0;return{isLast:a,hasAd:b}}function e(){return!(!w.ads||w.adIndex>=w.ads.length)}function f(){return!(!w.ads||w.adIndex!=w.ads.length)}function g(){k(),e()&&(f()||(ADG.Logger.info("not the last item in waterfall, initAdWaitTimer"),w.adWaitTimerId=setTimeout(h,w.classConstructor.AD_WAIT_TIME)),c())}function h(){ADG.Logger.info("adWaitTimerHandler triggered"),k(),j(),e()?(D.report(G.INNER_AD_LOAD_FAILURE),w.vastObjectManager=null,d()):O[F.RETAIL_DATA_ERROR]||t(F.RETAIL_DATA_ERROR)}function j(){if(clearInterval(L),J=!1,w.VPAIDAd)try{for(var a in w.callbacks)w.VPAIDAd.unsubscribe(a);w.VPAIDAd.stopAd(),w.VPAIDAd=null}catch(a){}if(w.environmentVars.slot&&w.environmentVars.videoSlot)try{w.environmentVars.slot.removeChild(w.environmentVars.videoSlot)}catch(a){}if(w.iframe)try{w.iframe.parentNode.removeChild(w.iframe)}catch(a){}}function k(){if(w.adWaitTimerId>-1)try{ADG.Logger.info("Player :: An an ad wait timer was removed"),clearTimeout(w.adWaitTimerId),w.adWaitTimerId=-1}catch(a){}}function l(){return!(!P.shouldDelayVideoStart||P.artificialVideoStartCalled)}function m(a){var b;b=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),b.onreadystatechange=function(){if(4==b.readyState)if(200==b.status){D.report(F.AD_RESPONSE_SUCCESS);var c=new DOMParser;w.xmlDoc=c.parseFromString(b.responseText,"text/xml"),n(w.xmlDoc)}else 0!=b.status||T?D.report(F.AD_RESPONSE_FAILED):(T=!0,b.abort(),b.open("GET",a,!0),b.withCredentials=!1,b.send())};try{y.evalURL(a)?(b.open("GET",a,!0),b.withCredentials=!0,T=!1,b.send()):D.report(F.AD_RESPONSE_FAILED)}catch(a){D.report(F.AD_RESPONSE_FAILED)}}function n(a){a&&(w.ads=a.getElementsByTagName("Ad"),w.ads.length>0?(w.vastObjectManager=null,d(!0)):D.report(F.RETAIL_DATA_ERROR))}function o(a){if(w.environmentVars={},w.vastObjectManager&&w.vastObjectManager.vastObjects&&w.vastObjectManager.vastObjects[0])if(w.vastObject=w.vastObjectManager.vastObjects[0],D.report(F.RETAIL_DATA_READY),D.setPixels(w.vastObject.pixels),w.vastObject.isVPAID)p();else{var c=B;b.placementSetting.isMobile&&(c=C);var f=new c;w.onVPAIDReady(f)}else j(),e()?(D.report(G.INNER_AD_LOAD_FAILURE),w.vastObjectManager=null,d()):D.report(F.RETAIL_DATA_ERROR)}function p(){var a=w.vastObject.mediaFile,b=w.guid,c=document.createElement("iframe");w.iframe=c,c.id="adloaderframe_"+b,ADG.SetupHandler.checkDOMElement("id",w.slotName)?(document.getElementById(w.slotName).appendChild(c),c.contentWindow.document.write('