(function(){[].forEach||(Array.prototype.forEach=function(b,a){var c=this.length||0;if("function"==typeof b)for(var d=-1;++d<c;)b.call(a,this[d],d,this)});Array.indexOf||(Array.prototype.indexOf=function(b){for(var a=-1,c=this.length;++a<c;)if(this[a]==b)return a;return-1});ssc.platformConfig.clientContext||(ssc.platformConfig.clientContext={brand:"betfair",product:"my_account",clientProductName:"my-account",selectedTab:"my_account",jurisdiction:"intl",region:"all_regions",language:"en",channel:"desktop",
isMasterAccount:"false"})})();
(function(){function d(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(console,arguments)}function e(a){return(a||"").replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")}function g(a){var b=c(arguments.callee.caller.toString());"anonymous()"==b&&a&&(b=a);b={name:b,startTime:+new Date,endTime:0};console.group?console.group("SSC: "+b.name):console.log("SSC -\x3e START:",b.name);f.push(b);return b}function h(){var a=f.pop();a&&(d("Finished in "+(+new Date-a.startTime)+
" ms"),console.groupEnd?console.groupEnd():console.log("SSC -\x3e END:",a.name))}function c(a){if(ssc.platform.browser.isIE)return"anonymous()";a=(a=a.toString().match(k))&&e(a[1])?e(a[1]):"anonymous";return a+"()"}function l(){var a=c(arguments.callee.caller.toString()),b=Array.prototype.slice.call(arguments);b.unshift("LOG: "+a);d.apply(null,b)}var f=[],k=/^function(.[^\(]*)\(/;ssc.log=ssc.log||{};try{ssc.platformConfig.page.config&&ssc.platformConfig.page.config.bundle&&!1===ssc.platformConfig.page.config.bundle.enabled?
(ssc.log.getCallerName=c,ssc.log.INFO=l,ssc.log.ENTER=g,ssc.log.EXIT=h):ssc.log.getCallerName=ssc.log.INFO=ssc.log.ENTER=ssc.log.EXIT=function(){}}catch(m){}finally{"undefined"==typeof window.console&&(ssc.log.INFO=ssc.log.ENTER=ssc.log.EXIT=function(){})}})();
(function(){function g(a,b){return a?-1!=a.className.split(" ").indexOf(b):!1}function n(a){return a.replace(/\-[a-z]/g,function(a){return a.charAt(1).toUpperCase()})}function l(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}function p(a,b){this.el=a;this.getPropertyValue=function(b){var e=/(\-([a-z]){1})/g;"float"==b&&(b="styleFloat");e.test(b)&&(b=b.replace(e,function(a,b,c){return c.toUpperCase()}));return a.currentStyle[b]?a.currentStyle[b]:null};return this}function q(a,
b){return document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,"").getPropertyValue(l(b)):p(a,"").getPropertyValue(l(b))}function d(a,b){return new d.prototype.find(a,b)}function r(a){a=(a=a.toString().match(s))&&ssc.trim(a[1])?ssc.trim(a[1]):"anonymous";return a+"()"}var m=window.document,f={},t=1,u=/^#?([\w-]+)$/,s=/^function(.[^\(]*)\(/,v=/^#/,k=function(a){return[].slice.call(a,0)};try{k(document.documentElement.childNodes)}catch(w){k=function(a){for(var b=
[],c=0;a[c];c++)b.push(a[c]);return b}}d.prototype.find=function(a,b){var c=[];if(!a)return this;if(void 0==b&&this.length)this.each(function(b){c=c.concat(k(d(a,b)))});else if("string"===typeof b&&(b=d(b),b=b.length?b[0]:m),b=b||m,"string"===typeof a)u.test(a)&&b.getElementById&&b.getElementsByTagName?(c=v.test(a)?[b.getElementById(a.substr(1))]:b.getElementsByTagName(a),null==c[0]&&(c=[])):document.querySelectorAll&&(b.querySelectorAll||(b.querySelectorAll=document.querySelectorAll),c=b.querySelectorAll(a)),
c=k(c);else if(a instanceof Array)c=a;else if(a.nodeName||a===window)c=[a];else if("undefined"==typeof a.toString||"[object NodeList]"==a.toString()||"[object HTMLCollection]"==a.toString()||"number"==typeof a.length)c=k(a);var e=d();e.length=0;[].push.apply(e,c);return e};d.prototype.each=function(a){for(var b=-1,c=this.length;++b<c&&!1!==a.call(this[b],this[b],b,this););return this};d.prototype.show=function(){return this.each(function(a){a.style.display="block"})};d.prototype.hide=function(){return this.each(function(a){a.style.display=
"none"})};d.prototype.html=function(a){if(0==arguments.length)return this[0]&&this[0].innerHTML||"";this.each(function(b){b&&(b.innerHTML=a)});return this};d.prototype.attr=function(a,b){if(!this.length||!a)return this;var c=this[0],e;if(1==arguments.length){if(c.tagName&&"input"==c.tagName.toLowerCase()&&"value"==a)return c.value;if(c.getAttribute&&c.getAttribute(a))return c.getAttribute(a);for(e=0;e<c.attributes.length;e++)if(c.attributes[e].name===a)return c.attributes[e].value;return""}this.each(function(c){c.tagName&&
"input"==c.tagName.toLowerCase()&&"value"==a?c.value=b:c.setAttribute&&("checked"!=a||""!=b&&!1!=b&&"undefined"!=typeof b?c.setAttribute(a,b):c.removeAttribute(a))});return this};d.prototype.removeAttr=function(a){return this[0].removeAttribute(a)};d.prototype.hasClass=function(a){return g(this[0],a)};d.prototype.isVisible=function(){return this[0]&&0<this[0].offsetWidth&&0<this[0].offsetHeight};d.prototype.removeClass=function(a){var b=ssc.trim(a).split(" ");return this.each(function(a){var e=a&&
a.className.split(" ")||[];1==b.length?g(a,b[0])&&e.splice(e.indexOf(b[0]),1)&&(a.className=ssc.trim(e.join(" "))):b.forEach(function(b){g(a,b)&&e.splice(e.indexOf(b),1)&&(a.className=ssc.trim(e.join(" ")))})})};d.prototype.addClass=function(a){var b=ssc.trim(a).split(" ");return this.each(function(a){1==b.length?!g(a,b[0])&&(a.className=ssc.trim(a.className+" "+b[0])):b.forEach(function(b){!g(a,b)&&(a.className=ssc.trim(a.className+" "+b))})})};d.prototype.toggleClass=function(a){return g(this[0],
a)?this.removeClass(a):this.addClass(a)};d.prototype.css=function(a,b){return 2==arguments.length?(a=n(a),"number"===typeof b&&(b+="px"),this.each(function(c){c.style[a]=b})):this.length?q(this[0],a):""};d.prototype.computedHeight=function(){var a;a=this.attr("id");"Microsoft Internet Explorer"==navigator.appName?a=document.getElementById(a).offsetHeight:(a=document.getElementById(a),a=document.defaultView.getComputedStyle(a,"").getPropertyValue("height"),a=a.split("px"),a=a[0]);return a};d.prototype.obj=
function(){return this[0]};d.prototype.getPosition=function(){for(var a=0,b=0,c=this.obj();c;)a+=c.offsetLeft-c.scrollLeft+c.clientLeft,b+=c.offsetTop-c.scrollTop+c.clientTop,c=c.offsetParent;return{x:a,y:b}};d.prototype.children=function(a){var b=[];a=a||"*";"*"===a?b=this.obj().getElementsByTagName("*"):d(a,this.obj()).each(function(){b.push(this)});return b};d.prototype.on=function(a,b){return this.each(function(c){var e=c._eventuid_&&c._eventuid_||(c._eventuid_=++t),d=function(d){d.target||(d.target=
d.srcElement);ssc.log.ENTER("Event: "+a+" Handler\x3d"+r(b));if(b&&!1===b.call(c,d))return"undefined"!==typeof d.preventDefault?(d.preventDefault(),d.stopPropagation()):d.cancelBubble=!0,!1;ssc.log.EXIT()};d.callback=b;f[e]?f[e][a]||(f[e][a]=[]):(f[e]={},f[e][a]=[]);f[e][a].push(d);c.addEventListener?c.addEventListener(a,d,!1):c.attachEvent("on"+a,d)})};d.prototype.un=function(a,b){return this.each(function(c){var e=c._eventuid_&&c._eventuid_||void 0;if(e&&f[e])if(!a)for(var h in f[e])f[e].hasOwnProperty(h)&&
d(c).un(h);else if(f[e][a]){h=f[e][a];for(var g=h.length;g--;)if(void 0==b||b==h[g].callback)c.removeEventListener?c.removeEventListener(a,h[g],!1):c.detachEvent("on"+a,h[g]),f[e][a].pop()}})};d.prototype.empty=function(){this.each(function(a){d(a.childNodes).remove()})};d.prototype.remove=function(){var a=this;this.un().each(function(b,c){b.parentNode&&b.parentNode.removeChild(b);d(b.childNodes,b).remove();delete a[c]});this.length=0};d.prototype.trigger=function(a,b){this.each(function(c){var d;
c!=document||c.dispatchEvent||(c=document.documentElement);document.createEvent?(d=document.createEvent("HTMLEvents"),d.initEvent(a,!0,!0),d.data=b||{},d.eventName=a,c.dispatchEvent(d)):(d=document.createEventObject(),c.fireEvent("on"+a,d))})};d.prototype.appendChild=function(a){this[0].appendChild(a)};d.prototype.removeChild=function(a){this[0].removeChild(a)};d.prototype.insertBefore=function(a){this[0].parentNode.insertBefore(a,this[0])};d.prototype.insertAfter=function(a){this[0].parentNode.insertBefore(a,
this[0].nextSibling)};d.prototype.parent=function(){return d(this[0].parentNode)};d.prototype.isAChildOf=function(a){var b=this.obj();if(a===b)return!1;for(;b&&b!==a;)b=b.parentNode;return b===a};d.prototype.find.prototype=d.prototype;window.ssc.dom=d})();
(function(){ssc.cache=function(){function e(){if("function"===typeof ssc.dom)for(a=0;a<d.length;a++)(f=ssc.dom(d[a]))&&(b[d[a]]=f)}var d=["#ssc-header-container","#ssc-footer-container"],b={},a,f;e();return{get:function(c){return b[c]},getAll:function(){return b},populateCache:e,add:function(c){var a;"function"!==typeof ssc.dom||b[c]||(a=ssc.dom(c))&&(b[c]=a);return b[c]}}}()})();
(function(){ssc.onReady=function(a){function b(a){for(h=1;a=c.shift();)a()}var c=[],d,e=document,g=e.documentElement,f=g.doScroll,h=/^loade|c/.test(e.readyState);e.addEventListener&&e.addEventListener("DOMContentLoaded",d=function(){e.removeEventListener("DOMContentLoaded",d,!1);b()},!1);f&&e.attachEvent("onreadystatechange",d=function(){/^c/.test(e.readyState)&&(e.detachEvent("onreadystatechange",d),b())});return a=f?function(b){self!=top?h?b():c.push(b):function(){try{g.doScroll("left")}catch(c){return setTimeout(function(){a(b)},
50)}b()}()}:function(a){h?a():c.push(a)}}();ssc.trim=function(a){return(a||"").replace(/^(\s|\u00A0)+|(\s|\u00A0)+$/g,"")};ssc.isDesktop=function(){var a=document.getElementById("ssc-header-container")||document.getElementById("ssc-footer-container");return a?-1!=a.className.indexOf("ssc-cha-desktop"):!1};ssc.isMobile=function(){var a=document.getElementById("ssc-header-container")||document.getElementById("ssc-footer-container");return a?-1!=a.className.indexOf("ssc-cha-mobile"):!1};ssc.isTouch=
function(){var a=document.getElementById("ssc-header-container")||document.getElementById("ssc-footer-container");return a?-1!=a.className.indexOf("ssc-touch"):!1};ssc.iosVersion=function(a){var b=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||!1;return b?b>=a:!1};ssc.androidVersion=function(a){var b;return 0<=navigator.userAgent.indexOf("Android")?(b=parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("Android")+
8)),b>=a):!1};ssc.def=function(a,b){return isDefined(a)?a:b};ssc.isUndefined=function(){for(var a=0;a<arguments.length;a++)if("undefined"===typeof arguments[a]||null===arguments[a])return!0;return!1};ssc.isDefined=function(){return!ssc.isUndefined.apply(this,arguments)};ssc.isFunction=function(a){return"function"===typeof a};ssc.isNumber=function(a){return"number"===typeof a};ssc.isObject=function(a){return"object"===typeof a};ssc.isArray=function(a){return a&&ssc.isFunction(a.push)&&ssc.isFunction(a.slice)};
ssc.isString=function(a){return"string"==typeof a};ssc.isBoolean=function(a){return"boolean"==typeof a};ssc.parseJSON=function(a){var b=/^[\],:{}\s]*$/,c=/(?:^|:|,)(?:\s*\[)+/g,d=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,e=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;if(a&&window.JSON&&window.JSON.parse)return window.JSON.parse(a);if(null===a)return a;if("string"===typeof a&&(a=ssc.trim(a))&&b.test(a.replace(d,"@").replace(e,"]").replace(c,"")))return(new Function("return "+a))()};
ssc.eventStopPropagation=function(a){if("undefined"!==typeof a.stopPropagation)a.stopPropagation();else try{a.cancelBubble=!0}catch(b){}};ssc.eventPreventDefault=function(a){if("undefined"!==typeof a.preventDefault)a.preventDefault();else try{event.returnValue=!1}catch(b){}};ssc.eventOriginalTarget=function(a){var b=a.srcElement;b||(b=a.originalTarget);return b};ssc.formatCurrency=function(a,b,c,d){var e,g,f,h=!1;"string"!==typeof a?a="":3===a.length&&(a+="\x26nbsp;");"number"!==typeof b&&(b=0);e=
b;0>e&&(e=-e);e=e.toFixed(2);e=e.split(".");f="";c=c||!1;for(g=e[0].length;0<=g;g-=3)f=e[0].substring(g-3,g)+f,3<g&&(f=(c?".":",")+f);0==a.indexOf("kr.")&&(h=!0);return(d?"(":"")+(-.01>=b?"-":"")+(h?"":a)+f+(c?",":".")+e[1]+(h?a:"")+(d?")":"")};ssc.concatObjects=function(){var a={},b=arguments.length,c,d;for(c=0;c<b;c++)for(d in arguments[c])arguments[c].hasOwnProperty(d)&&(a[d]=arguments[c][d]);return a};ssc.isEmail=function(a){return/^[A-Za-z0-9_'\-\+]+(\.[A-Za-z0-9_'\-\+]+)*\@([A-Za-z0-9]+(\-[A-Za-z0-9]+)*)+(\.([A-Za-z0-9]+(\-[A-Za-z0-9]+)*)+)*\.([A-Za-z]{2,6})$/.test(a)};
ssc.viewportSize=function(){var a=0,b=0;"number"==typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(a=document.documentElement.clientWidth,b=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(a=document.body.clientWidth,b=document.body.clientHeight);return{width:a,height:b}};ssc.objectSize=function(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&
b++;return b};ssc.stringToObj=function(a,b,c){var d={},e;a=a.replace(/^[^a-z\d]*/gi,"").split(b);for(b=0;b<a.length;b++)e=a[b].split(c),2===e.length&&(d[e[0]]=e[1]);return d};ssc.parseUri=function(a){var b=ssc.parseUri.options;a=b.parser[b.strictMode?"strict":"loose"].exec(a);for(var c={},d=14;d--;)c[b.key[d]]=a[d]||"";c[b.q.name]={};c[b.key[12]].replace(b.q.parser,function(a,d,f){d&&(c[b.q.name][d]=f)});return c};ssc.parseUri.options={strictMode:!1,key:"source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),
q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};ssc.animate=function(a,b,c,d,e,g,f,h){var k="px";"opacity"===b&&(k="");7>arguments.length||
"i"==f&&c>=d||"d"==f&&d>c?ssc.isFunction(h)&&h():(h=h||function(){},a.css(b,c+k),setTimeout(function(){ssc.animate(a,b,c+e,d,e,g,f,h)},g))};ssc.arrayIndexOf=function(a,b,c){a=Object(a);var d=a.length>>>0;if(0===d)return-1;c=+c||0;Infinity===Math.abs(c)&&(c=0);if(c>=d)return-1;for(c=Math.max(0<=c?c:d-Math.abs(c),0);c<d;){if(c in a&&a[c]===b)return c;c++}return-1};ssc.objectCreate=function(a,b){function c(){}if("object"!==typeof a&&"function"!==typeof a)throw new TypeError("Object prototype may only be an Object: "+
a);if(null===a)throw Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.");if("undefined"!=typeof b)throw Error("This browser's implementation of Object.create is a shim and doesn't support a second argument.");c.prototype=a;return new c};(ssc.renderingEngineInfo=function(a){var b=[ssc.dom("#ssc-header-container"),ssc.dom("#ssc-footer-container")];a||(ssc.platform={},ssc.platform.browser={},ssc.platform.os={},ssc.platform.os.name="",ssc.platform.browser.isChrome=
/chrome/.test(navigator.userAgent.toLowerCase()),ssc.platform.browser.isSafari=/webkit/.test(navigator.userAgent.toLowerCase())&&!/chrome/.test(navigator.userAgent.toLowerCase()),ssc.platform.browser.isOpera=/opera/.test(navigator.userAgent.toLowerCase()),ssc.platform.browser.isFF=/firefox/.test(navigator.userAgent.toLowerCase()),ssc.platform.browser.isIE=!1);for(var c in b)(a=b[c])&&"object"===typeof a&&((ssc.platform.browser.isChrome||ssc.platform.browser.isSafari)&&a.addClass("ssc-webkit"),ssc.platform.browser.isOpera&&
a.addClass("ssc-opera"),ssc.platform.browser.isFF&&a.addClass("ssc-gecko"),document.documentMode&&(a.addClass("ssc-ie ssc-ie"+document.documentMode),ssc.platform.browser.isIE=!0));ssc.platform.browser.version=function(){var a=navigator.appName,c=navigator.userAgent,b,f=c.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);f&&null!=(b=c.match(/version\/([\.\d]+)/i))&&(f[2]=b[1]);f=f?[f[1],f[2]]:[a,navigator.appVersion,"-?"];return f[1]}();ssc.platform.browser.name=function(){var a=navigator.appName,
c=navigator.userAgent,b,f=c.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);f&&null!=(b=c.match(/version\/([\.\d]+)/i))&&(f[2]=b[1]);f=f?[f[1],f[2]]:[a,navigator.appVersion,"-?"];return f[0]}();ssc.platform.os.name=function(){var a=navigator.appVersion,c="unknown";-1!=a.indexOf("Win")&&(c="Windows");-1!=a.indexOf("Mac")&&(c="MacOS");-1!=a.indexOf("X11")&&(c="UNIX");-1!=a.indexOf("Linux")&&(c="Linux");return c}()})();(ssc.initPlatformConfig=function(a){function b(a){for(var d in a)ssc.modules.meta[a[d].moduleId]||
(ssc.modules.meta[a[d].moduleId]=a[d],a[d].modules&&0<a[d].modules.length&&b(a[d].modules))}a||(ssc.platform.meta={},ssc.services={},ssc.services.meta={},ssc.plugins={},ssc.modules={},ssc.modules.meta={},ssc.initSSC=function(a){a=a||{};var b={clientConfiguration:{brand:a.brand||"",product:a.product||"",channel:a.channel||"",platform:a.platform||"",selectedTab:a.selectedTab||""},authenticationConfiguration:{loginEndpoint:a.loginEndpoint||"",loginRedirectUrl:a.loginRedirectUrl||"",loginRedirectMethod:a.loginRedirectMethod||
"",logoutEndpoint:a.logoutEndpoint||"",logoutRedirectUrl:a.logoutRedirectUrl||"",logoutRedirectMethod:a.logoutRedirectMethod||""},dimension:{jurisdiction:a.jurisdiction||"",language:a.language||"",region:a.region||""},contentConfiguration:{headerType:a.headerType||"",footerType:a.footerType||"",headerId:a.headerId||"",footerId:a.footerId||""}},e={headersConfiguration:{path:a.path||"",visitorid:a.visitorid||"","X-Authentication":a.ssoid||""}};a=a.domain||"";""!==b.contentConfiguration.headerId&&ssc.services.retrievessc.getHeader(b,
e,a);""!==b.contentConfiguration.footerId&&ssc.services.retrievessc.getFooter(b,e,a)});(function(a){for(var b in a)ssc.platform.meta[b]=a[b]})(ssc.platformConfig.page);(function(a){for(var b in a)ssc.services.meta[a[b].moduleId]=a[b]})(ssc.platformConfig.services);b(ssc.platformConfig.modules)})();ssc.platform.window={};ssc.platform.window.location={};window.location.hash&&0<window.location.hash.length?ssc.platform.window.location.hash=ssc.stringToObj(window.location.hash,"\x26","\x3d"):window.ssc.earlyConfig&&
window.ssc.earlyConfig.hash&&0<window.ssc.earlyConfig.hash.length&&(ssc.platform.window.location.hash=window.ssc.earlyConfig.hash);window.location.search&&0<window.location.search.length?ssc.platform.window.location.search=ssc.stringToObj(window.location.search,"\x26","\x3d"):window.ssc.earlyConfig&&window.ssc.earlyConfig.search&&0<window.ssc.earlyConfig.search.length&&(ssc.platform.window.location.search=window.ssc.earlyConfig.search);(function(){ssc.platform.cookies={};ssc.platform.cookies.betex=
{};var a,b,c,d,e,g,f;try{for(a=document.cookie,b=a.split(";"),g=0;g<b.length;g++)if(c=b[g].trim(),0==c.indexOf("betexPtk")&&0>c.indexOf("betexPtkSess")){d=decodeURIComponent(c.substring(9));e=d.split("~");for(f=0;f<e.length;f++)ssc.platform.cookies.betex[e[f].split("\x3d")[0]]=e[f].split("\x3d")[1];break}}catch(h){}})();ssc.modules.getModuleConfig=function(a,b){for(var c in ssc.modules.meta)if(c==a)return b?ssc.modules.meta[c].config[b]:ssc.modules.meta[c].config};ssc.modules.getModuleTranslation=
function(a,b){for(var c in ssc.modules.meta)if(c==a)return b?ssc.modules.meta[c].translations[b]:ssc.modules.meta[c].translations};ssc.modules.translate=function(a,b){return a.replace(/{\d+}/mg,function(){return b.shift()})};ssc.services.getServiceConfig=function(a,b){for(var c in ssc.services.meta)if(c==a)return b?ssc.services.meta[c].config[b]:ssc.services.meta[c].config};ssc.platform.getPlatformConfig=function(a){for(var b in ssc.platform.meta.config)if(a&&b==a)return ssc.platform.meta.config[a];
if(!a)return ssc.platform.meta.config}})();
(function(){ssc.ajax=function(){function n(){for(var a,b=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.7.0")},function(){return new ActiveXObject("Msxml2.XMLHTTP.6.0")},function(){return new ActiveXObject("Msxml2.XMLHTTP.5.0")},function(){return new ActiveXObject("Msxml2.XMLHTTP.4.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},
function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0;c<b.length;c++){try{a=b[c]()}catch(d){continue}break}return a}function p(a){var b=[],c="";for(c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"\x3d"+a[c]);return b.join("\x26").replace(/%20/g,"+")}function e(a){var b,c,d;if(a&&a.path){b=n();a.method=a.method||"GET";a.contentType=a.contentType||"application/x-www-form-urlencoded";a.responseType=a.responseType||"";a.async=a.async||!0;b.onreadystatechange=function(){if(4===b.readyState)if(200===
b.status){if("function"===typeof a.onSuccess){switch(a.contentType){case "application/json":c="html"==a.responseType?b.responseText:ssc.parseJSON(b.responseText);break;default:c=b.responseText}ssc.log.ENTER("Ajax (OK) -\x3e "+a.method+", URL\x3d"+a.path+", Handler\x3d"+ssc.log.getCallerName(a.onSuccess));a.onSuccess(c,b);ssc.log.EXIT()}}else"function"===typeof a.onError&&(ssc.log.ENTER("Ajax (ERROR) -\x3e "+a.method+", URL\x3d"+a.path+", Handler\x3d"+ssc.log.getCallerName(a.onSuccess)),a.onError(b),
ssc.log.EXIT())};b.open(a.method,a.path,a.async);b.setRequestHeader("Content-Type",a.contentType);if(a.setRequestHeader)for(d in a.setRequestHeader)b.setRequestHeader(d,a.setRequestHeader[d]);a.data?"application/json"==a.contentType?("html"!==a.responseType&&b.setRequestHeader("Accept","application/json"),b.send(JSON.stringify(a.data))):b.send(p(a.data)):b.send(null)}return b}var f={};return{get:function(a){a.method="GET";return e(a)},jsonp:{get:function(a,b,c,d){var e=ssc.dom("#ssc-header-container"),
g=document.createElement("script"),l=[],h,m,k;c||(c=b,b={});d=d||!1;a+=a.indexOf("?")+1?"\x26":"?";h=(new Date).getTime();b.callback=d?"ssc.ajax.jsonp.callbacks.request_"+h:"sscAjaxJsonpCallRequest"+h;m=b.callback;f[b.callback]=function(a){e.removeChild(g);delete f[m];c(a)};window[b.callback]=f[b.callback];for(k in b)l.push(k+"\x3d"+encodeURIComponent(b[k]));a+=l.join("\x26");g.type="text/javascript";g.src=a;e.appendChild(g)},callbacks:f},post:function(a){a.method="POST";return e(a)}}}()})();
(function(){window.ssc=window.ssc||function(){};ssc.cookie=function(){function g(a){var b="",f=a+"\x3d",c=-1,e=!1;a=document.cookie;if(0<a.length){for(;!e;)c=a.indexOf(f),0<c?"; "===a.substring(c-2,c)?e=!0:a=a.substring(c+f.length,a.length):0>=c&&(e=!0);0<=c&&(c+=f.length,b=a.indexOf(";",c),-1==b&&(b=a.length),b=unescape(a.substring(c,b)))}return b}function k(a){var b=new Date;isNaN(parseInt(a,10))?(b.setTime(b.getTime()+31536E6),a="; expires\x3d"+b.toGMTString()):0===a?a="":(b.setTime(b.getTime()+
864E5*a),a="; expires\x3d"+b.toGMTString());return a}function h(a,b,f,c,e){var d=[];c=c||!1;d.push(a,"\x3d");d.push(c?escape(b):b);d.push(k(f),"; path\x3d/");"undefined"===typeof e&&(e=!1);a=document.domain;if(e){try{document.domain.split(".").length===document.location.hostname.split(".").length&&(a=document.location.hostname.match(/\.(.*)$/)[1])}catch(g){}d.push("; domain\x3d."+a)}else 0>f&&d.push("; domain\x3d."+a);d=d.join("");document.cookie=d}return{get:g,set:h,clear:function(a,b){h(a,"",-1,
!0,b)},defend:function(a,b){if(b!=g(a))return h(a,escape(b)),b===g(a)}}}()})();
(function(){window.ssc=window.ssc||function(){};var a;ssc.cookieStorage=function(){function f(b){var c,d=[],e=[];if(0===a.indexOf(b+"\x3d")||0<a.indexOf(";"+b+"\x3d"))for(d=a.split(";"),c=0;c<d.length;c++)if(e=d[c].split("\x3d"),2===e.length&&b===e[0])return e[1]}a=ssc.cookie.get("betfairSSC");document.domain.split(".").length===document.location.hostname.split(".").length&&ssc.cookie.set("betfairSSC","",-1,!0,!1);a?ssc.cookie.set("betfairSSC",a,365,!0,!0):(ssc.cookie.set("betfairSSC","lsSSC\x3d1",
365,!0,!0),a=ssc.cookie.get("betfairSSC"));return{getItem:f,setItem:function(b,c){f(b)||(a=0<a.length?a+(";"+b+"\x3d"+c):a+(b+"\x3d"+c),ssc.cookie.set("betfairSSC",a,365,!0,!0))},getAllItems:function(){var b,c=[],d,e={},c=a.split(";");for(b=0;b<c.length;b++)d=c[b].split("\x3d"),2===d.length&&(e[""+d[0]]=d[1]);return e},removeItem:function(b){if(0===a.indexOf(b+"\x3d")||0<a.indexOf(";"+b+"\x3d"))a=a.replace(b+"\x3d"+f(b),"").replace(";;",";"),";"===a.substr(0,1)&&(a=a.substr(1,a.length-1)),";"===a.substr(a.length-
1,a.length)&&(a=a.substr(0,a.length-1)),ssc.cookie.set("betfairSSC",a,365,!0,!0)},removeAllItems:function(){a="";ssc.cookie.clear("betfairSSC",!0)}}}()})();
(function(){window.ssc=window.ssc||function(){};var a;ssc.localStorage=function(){function f(b){var c,d=[],e=[];if(0===a.indexOf(b+"\x3d")||0<a.indexOf(";"+b+"\x3d"))for(d=a.split(";"),c=0;c<d.length;c++)if(e=d[c].split("\x3d"),2===e.length&&b===e[0])return e[1]}localStorage.getItem("betfairSSC")||localStorage.setItem("betfairSSC","lsSSC\x3d1");a=localStorage.getItem("betfairSSC");return{getItem:f,setItem:function(b,c){f(b)||(a=0<a.length?a+(";"+b+"\x3d"+c):a+(b+"\x3d"+c),localStorage.setItem("betfairSSC",
a))},getAllItems:function(){var b,c=[],d,e={},c=a.split(";");for(b=0;b<c.length;b++)d=c[b].split("\x3d"),2===d.length&&(e[""+d[0]]=d[1]);return e},removeItem:function(b){if(0===a.indexOf(b+"\x3d")||0<a.indexOf(";"+b+"\x3d"))a=a.replace(b+"\x3d"+f(b),"").replace(";;",";"),";"===a.substr(0,1)&&(a=a.substr(1,a.length-1)),";"===a.substr(a.length-1,a.length)&&(a=a.substr(0,a.length-1)),localStorage.setItem("betfairSSC",a)},removeAllItems:function(){a="";localStorage.removeItem("betfairSSC")}}}()})();
(function(t,E){function v(a,c){for(var d=~~((a[h]-1)/2),b=1;b<=d;b++)c(a[2*b-1],a[2*b])}function k(a){var c=t.createElement(a||"div");v(arguments,function(a,b){c[a]=b});return c}function l(a,c,d){d&&!d[w]&&l(a,d);a.insertBefore(c,d||null);return a}function B(a,c){var d=[f,c,~~(100*a)].join("-"),b="{"+f+":"+a+"}",e;if(!z[d]){for(e=0;e<n[h];e++)try{x.insertRule("@"+(n[e]&&"-"+n[e].toLowerCase()+"-"||"")+"keyframes "+d+"{0%{"+f+":1}"+c+"%"+b+"to"+b+"}",x.cssRules[h])}catch(g){}z[d]=1}return d}function y(a,
c){var d=a[p],b,e;if(void 0!==d[c])return c;c=c.charAt(0).toUpperCase()+c.slice(1);for(e=0;e<n[h];e++)if(b=n[e]+c,void 0!==d[b])return b}function m(a){v(arguments,function(c,d){a[p][y(a,c)||c]=d});return a}function C(a){v(arguments,function(c,d){void 0===a[c]&&(a[c]=d)});return a}var h="length",f="opacity",p="style",w="parentNode",s=p+"Sheets",n="webkit0Moz0ms0O".split(0),z={},A;l(t.getElementsByTagName("head")[0],k(p));var x=t[s][t[s][h]-1],s=function(a){this.el=this.lines(this.opts=C(a||{},"lines",
12,"trail",100,h,7,"width",5,"radius",10,"color","#000",f,.25,"speed",1))},u=s.prototype={spin:function(a){var c=this,d=c.el;a&&l(a,m(d,"left",~~(a.offsetWidth/2)+"px","top",~~(a.offsetHeight/2)+"px"),a.firstChild);c.on=1;if(!A){var b=c.opts,e=0,g=20/b.speed,h=(1-b[f])/(g*b.trail/100),k=g/b.lines;(function D(){e++;for(var a=b.lines;a;a--){var l=Math.max(1-(e+a*k)%g*h,b[f]);c[f](d,b.lines-a,l,b)}c.on&&setTimeout(D,50)})()}return c},stop:function(){var a=this.el;this.on=0;a[w]&&a[w].removeChild(a);
return this}};u.lines=function(a){function c(b,c){return m(k(),"position","absolute","width",a[h]+a.width+"px","height",a.width+"px","background",b,"boxShadow",c,"transformOrigin","left","transform","rotate("+~~(360/a.lines*e)+"deg) translate("+a.radius+"px,0)","borderRadius","100em")}for(var d=m(k(),"position","relative"),b=B(a[f],a.trail),e=0,g;e<a.lines;e++)g=m(k(),"position","absolute","top",1+~(a.width/2)+"px","transform","translate3d(0,0,0)","animation",b+" "+1/a.speed+"s linear infinite "+
(1/a.lines/a.speed*e-1/a.speed)+"s"),a.shadow&&l(g,m(c("#000","0 0 4px #000"),"top","2px")),l(d,l(g,c(a.color,"0 0 1px rgba(0,0,0,.1)")));return d};u[f]=function(a,c,d){a.childNodes[c][p][f]=d};var r="group0roundrect0fill0stroke".split(0);(function(){var a=m(k(r[0]),"behavior","url(#default#VML)");if(!y(a,"transform")&&a.adj){for(a=0;a<r[h];a++)x.addRule(r[a],"behavior:url(#default#VML)");u.lines=function(){function a(){return m(k(r[0],"coordsize",g+" "+g,"coordOrigin",-e+" "+-e),"width",g,"height",
g)}function d(d,g,h){l(n,l(m(a(),"rotation",360/b.lines*d+"deg","left",~~g),l(m(k(r[1],"arcsize",1),"width",e,"height",b.width,"left",b.radius,"top",-b.width/2,"filter",h),k(r[2],"color",b.color,f,b[f]),k(r[3],f,0))))}var b=this.opts,e=b[h]+b.width,g=2*e,n=a(),p=~(b[h]+b.radius+b.width)+"px",q;if(b.shadow)for(q=1;q<=b.lines;q++)d(q,-2,"progid:DXImagetransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadow"+f+"\x3d.3)");for(q=1;q<=b.lines;q++)d(q);return l(m(k(),"margin",p+" 0 0 "+p,"position",
"relative"),n)};u[f]=function(a,d,b,e){e=e.shadow&&e.lines||0;a.firstChild.childNodes[d+e].firstChild.firstChild[f]=b}}else A=y(a,"animation")})();ssc.spinner=s})(document);
ssc.plugins.managed_tooltip=function(){var m;function q(e,c,b){function g(d){var b,c,e,g,k,l,h;d||(a.visible=!a.targetObj.toggleClass(a.toggleClass).hasClass(a.toggleClass),a.triggerObj.toggleClass("ssc-ttc"));d?h=ssc.dom(d):(c=a.targetObj,0<a.targetNodeMeasurableReference.length&&(c=ssc.dom(a.targetNodeMeasurableReference,a.targetObj.obj())),h=c);g=h.css("width").replace(/[A-Za-z$-]/g,"");if(0<g.length&&0>=parseInt(g,10))for(c=h.children(),e=0;e<c.length;e++)k=ssc.dom(c[e]),l=k.css("width").replace(/[A-Za-z$-]/g,
""),l.length&&parseInt(l,10)>parseInt(g,10)&&(g=l,h=k);if(!d)for(b in a.targetNodeMeasurableReferenceObj=h,a.positionX=h.getPosition().x,ssc.isFunction(a.callback)&&a.callback(a),f[a.group])f[a.group].hasOwnProperty(b)&&(d=f[a.group][b],d.id!==a.id&&d.visible&&(d.targetObj.toggleClass(d.toggleClass),d.visible=!1,d.triggerObj.removeClass("ssc-ttc"),void 0!==d.callback&&d.callback(d)))}function k(d){var b=d.target||d.srcElement||d.originalTarget,c;if(b){if(a.triggerObj.hasClass(a.triggerExcept)){a.triggerExceptPersist||
a.triggerObj.removeClass(a.triggerExcept);return}if((c=b.getAttribute("data-tooltip"))&&0<=c.indexOf("ssc-ta-"))return;for(b=b.parentNode;b&&0>b.className.indexOf("ssc-container");){if((c=b.getAttribute("data-tooltip"))&&0<=c.indexOf("ssc-ta-"))return;b=b.parentNode}}g();ssc.eventStopPropagation(d)}function l(d){var b;if(a.hideTargetOnEvent)if(0===a.hideTargetOnEventConditionedByTrigger.length)g();else try{b=ssc.eventOriginalTarget(d),0<=b.className.indexOf(a.hideTargetOnEventConditionedByTrigger)&&
g()}catch(c){ssc.log.INFO("Error on modal popup close",c)}ssc.eventStopPropagation(d)}var a;if(!b)return{toggleTooltip:g};a=ssc.concatObjects(p,b);a.visible=!1;a.id=r++;a.triggerObj=ssc.dom(e);a.targetObj=ssc.dom(c);a.triggerObj.attr("data-tooltip","ssc-tr-"+a.id);a.targetObj.attr("data-tooltip","ssc-ta-"+a.id);switch(a.event){case "mouseenter":case "mouseover":a.triggerObj.on("mouseover",function(b){a.targetDisplayDelay.display=!0;clearTimeout(a.targetDisplayDelay.timout);clearTimeout(a.targetHideDelay.timeout);
a.targetDisplayDelay.timout=setTimeout(function(){a.targetDisplayDelay.display&&(m=b.target||b.srcElement,a.visible||!ssc.dom(m).isAChildOf(a.triggerObj.obj())&&a.triggerObj.obj()!=m||k(b))},a.targetDisplayDelay.time)});a.triggerObj.on("mouseleave",function(b){a.targetDisplayDelay.display=!1;clearTimeout(a.targetDisplayDelay.timout);a.visible&&(a.targetHideDelay.timeout=setTimeout(function(){a.targetDisplayDelay.display||(a.targetDisplayDelay.display=!1,l(b))},200))});a.targetObj.on("mouseover",function(b){a.targetDisplayDelay.display=
!0;clearTimeout(a.targetHideDelay.timeout)});if("undefined"===typeof a.triggerObj.obj().onmouseover)a.triggerObj.on("click",function(a){k(a)});break;default:a.triggerObj.on(a.event,function(a){k(a)}),a.targetObj.on(a.event,function(a){l(a)})}f[a.group]||(f[a.group]={});f[a.group][a.id]=a;f[a.group].group||(f[a.group].group=a.group)}function n(e){var c,b;if(ssc.isUndefined(e))for(b in f)f.hasOwnProperty(b)&&n(f[b].group);for(c in f[e])f[e].hasOwnProperty(c)&&(b=f[e][c],b.visible&&(b.targetObj.toggleClass(b.toggleClass),
b.visible=!1,b.triggerObj.removeClass("ssc-ttc"),void 0!==b.callback&&b.callback(b)))}ssc.log.ENTER("Managed Tooltip Plugin");var f={},p={trigger:null,triggerExcept:null,triggerExceptPersist:!0,target:null,toggleClass:"ssc-hdn-js",event:"click",group:"default",hideTargetOnEvent:!1,hideTargetOnEventConditionedByTrigger:"",targetNodeMeasurableReference:"",callback:void 0,callbackOnWindowResize:!1,targetDisplayDelay:{time:300,display:!1,timeout:null},targetHideDelay:{timeout:null}},r=0;m=null;(function(){var e=
ssc.dom("body");if(e)e.on("click",function(){n()})})();ssc.log.EXIT();return{setTooltips:function(e){var c,b,g,f;if(e){e.group=e.group||"default";c=ssc.concatObjects(p,e);g=ssc.dom(c.trigger);f=ssc.dom(c.target);if(g&&f&&g.length===f.length)for(b=0;b<g.length;b++)q(g[b],f[b],e);ssc.dom(window).on("resize",function(){var b,a;b=0<c.targetNodeMeasurableReference.length?ssc.dom(c.targetNodeMeasurableReference):ssc.dom(c.target);0<b.length&&b.each(function(b){a=ssc.dom(b);ssc.isObject(b)&&a.isVisible()&&
(c.targetNodeMeasurableReferenceObj=a,c.positionX=a.getPosition().x,c.callback(c))})})}},closeTooltips:n}}();
ssc.plugins.modal_popup=function(){function q(){e=ssc.platformConfig.clientContext.language.toUpperCase();ssc.platform.window.location.hash&&ssc.platform.window.location.hash.sscpl&&(e=ssc.platform.window.location.hash.sscpl.toUpperCase());(h=ssc.modules.getModuleTranslation("header","COMMON.DO.NOT.SHOW.AGAIN."+e))||(h=ssc.modules.getModuleTranslation("header","COMMON.DO.NOT.SHOW.AGAIN"));(k=ssc.modules.getModuleTranslation("header","COMMON.CANCEL."+e))||(k=ssc.modules.getModuleTranslation("header",
"COMMON.CANCEL"));(l=ssc.modules.getModuleTranslation("header","COMMON.OK."+e))||(l=ssc.modules.getModuleTranslation("header","COMMON.OK"));g={dimensions:{width:"600",height:"600"},position:{type:"absolute",centerHorizontally:!0,centerVertically:!0},parentNode:ssc.cache.get("#ssc-header-container")||ssc.cache.get("#ssc-footer-container")||ssc.dom("body"),content:{showHeader:!0,headerText:"\x26nbsp;",header:'\x3cdiv class\x3d"ssc-modal-header"\x3e\x3ch4\x3e###\x3c/h4\x3e\x3cspan class\x3d"ssc-modal-close"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e',
body:{src:"#noSourceProvided",data:null},showFooter:!1,footer:'\x3cdiv class\x3d"ssc-modal-footer"\x3e\x3cdiv class\x3d"ssc-modal-chkwr"\x3e\x3cdiv\x3e\x3cinput type\x3d"checkbox" id\x3d"ssc-modal-chk"\x3e\x3clabel for\x3d"ssc-modal-chk"\x3e'+h+'\x3c/label\x3e\x3c/div\x3e\x3c/div\x3e\x3cinput type\x3d"button" class\x3d"ssc-cta ssc-cta-primary ssc-modal-cancel" value\x3d"'+k+'"\x3e\x3cinput type\x3d"button" class\x3d"ssc-cta ssc-cta-primary ssc-modal-ok" value\x3d"'+l+'"\x3e\x3cdiv class\x3d"ssc-clear"\x3e\x3c/div\x3e\x3c/div\x3e',
showModalOverlay:!0,closeModalOverlayOnClick:!1,theme:"ssc-modal-theme",showLoadingSpinnerForIframe:!1},controlsToAction:{}}}function r(){if(b){var c=ssc.viewportSize(),d=Math.max(c.width/2-a.dimensions.width/2-s/2,0),c=Math.max(c.height/2-a.dimensions.height/2-s/2,0);a.position.centerHorizontally&&(b.style.left=d+"px");a.position.centerVertically&&(b.style.top=c+"px")}}function t(c){if(a)m.push(c);else if(a=ssc.concatObjects(g,c),c.content&&(a.content=ssc.concatObjects(g.content,c.content)),c.controlsToAction&&
(a.controlsToAction=ssc.concatObjects(g.controlsToAction,c.controlsToAction)),a.content.header=a.content.header.replace("###",a.content.headerText),!a.content.body.data&&a.content.body.src&&(a.content.body.data='\x3ciframe seamless\x3d"true" frameborder\x3d"0" scrolling\x3d"no" class\x3d"ssc-modal-content" width\x3d"'+a.dimensions.width+'" height\x3d"'+a.dimensions.height+'" src\x3d"'+a.content.body.src+'"\x3e\x3c/iframe\x3e'),a.content.body.data&&(a.content.body.data='\x3cdiv class\x3d"ssc-modal-body"\x3e'+
a.content.body.data+"\x3c/div\x3e"),a.parentNode)b=document.createElement("div"),b.id="ssc-modal-container",b.className=a.content.theme,a.content.showLoadingSpinnerForIframe&&(b.className+=" ssc-loading"),b.style.position=a.position.type,b.style.top&&(b.style.top=a.position.top),b.style.right&&(b.style.right=a.position.right),b.style.bottom&&(b.style.bottom=a.position.bottom),b.style.bottom&&(b.style.left=a.position.left),b.style.width=a.dimensions.width+"px",b.style.zIndex="1001",a.content.showHeader&&
(b.innerHTML+=a.content.header),b.innerHTML+=a.content.body.data,a.content.showFooter&&(b.innerHTML+=a.content.footer),a.content.showModalOverlay&&(d=document.createElement("div"),d.className="ssc-modal-overlay",d.style.zIndex="998",a.content.closeModalOverlayOnClick&&(d.onclick=n)),a.parentNode&&(d&&a.parentNode.appendChild(d),a.parentNode.appendChild(b)),r(),u("bind"),a.content.showLoadingSpinnerForIframe&&(v=(new ssc.spinner({lines:12,length:7,width:4,radius:7,color:"#000",speed:1,trail:60,shadow:!1})).spin(b));
else return;return this}function u(c){function d(){e.on(f.event,function(){f.callback.apply(f.callback,f.callbackArgs);n()})}var p,f,e,g;ssc.dom(window).on("resize",r);if(a.controlsToAction)for(p in a.controlsToAction)a.controlsToAction.hasOwnProperty(p)&&(f=a.controlsToAction[p],e=ssc.dom(f.cssSelector),f&&e&&f.event&&ssc.isFunction(f.callback)&&(c&&"bind"==c?d():e.un(f.event)));if(a.content.showLoadingSpinnerForIframe&&(g=ssc.dom(b),c=g.children("iframe"),ssc.isArray(c)&&0<c.length))ssc.dom(c[0]).on("load",
function(){v.stop();g.removeClass("ssc-loading")})}function n(){b.parentNode.removeChild(b);b=null;d&&(d.parentNode.removeChild(d),d=null);u("unbind");a=null;0<m.length&&t(m.pop())}ssc.log.ENTER("Modal Popup Plugin");var a,s=22,b,d,v,h,g,e,l,k,m=[];q();ssc.log.EXIT();return{show:t,initModal:q,close:n,resize:function(a,d){var e=ssc.dom(b).children("iframe");ssc.isArray(e)&&0<e.length&&(a&&-1<a&&ssc.dom(e[0]).css("width",a),d&&-1<d&&ssc.dom(e[0]).css("height",d))}}}();
ssc.plugins.managed_window=function(){function l(){var b=ssc.dom(".sscmw"),c=b.length,a=/(\w+)\(([\w\d]*)\)/gi,d,h,e,f,g;for(d=0;d<c;d+=1){h=b[d].cssProperties={cssProperty:!0};e=b[d].className;if(a.test(e))for(e=e.match(a),f=e.length-1;0<=f;f-=1)g=e[f],a.lastIndex=0,g=a.exec(g),h[""+g[1]]=g[2];ssc.dom(b[d]).on("click",n)}}function n(b){2!==b.which&&(m(this.target,this.href,this.cssProperties),-1==navigator.userAgent.toLowerCase().indexOf("msie")&&b.preventDefault())}function m(b,k,a){if(b&&k&&a){a.position=
{X:a.left&&0<=parseInt(a.left,10)?a.left:-1,Y:a.top&&0<=parseInt(a.top,10)?a.top:-1};a.dimensions={X:a.width?a.width:640,Y:a.height?a.height:480};if(c[b]&&!c[b].closed)return c[b].location=k,c[b].focus(),c[b];try{ssc.isUndefined(a.dimensions)&&(a.height||a.width)&&(a.dimensions={},a.height&&(a.dimensions.Y=a.height),a.width&&(a.dimensions.X=a.width));if(ssc.isUndefined(a.position)||-1===a.position.X||-1===a.position.Y)a.position={X:(screen.availWidth-a.dimensions.X)/2,Y:(screen.availHeight-a.dimensions.Y)/
2};var d=["width\x3d",a.dimensions.X,",height\x3d",a.dimensions.Y,",left\x3d",a.position.X,",top\x3d",a.position.Y,",screenX\x3d",a.position.X,",screenY\x3d",a.position.Y,",scrollbars\x3d",a.autoscroll||a.autoScroll?"yes":"no",",status\x3d",a.statusBar?"yes":"no",",resizable\x3dyes,menubar\x3d",a.menuBar?"yes":"no",",toolbar\x3d",a.toolBar?"yes":"no",",location\x3d",a.locationBar?"yes":"no",",titlebar\x3dyes')"].join("");c[b]=top.window.open(k,b,d);return c[b]}catch(h){return ssc.log.INFO(h),alert(ssc.modules.getModuleTranslation("footer",
"COMMON.MANAGED.WINDOW.ERROR")),null}}}ssc.log.ENTER("Managed Window Plugin");var c={};ssc.onReady(function(){l()});ssc.log.EXIT();return{getWindow:m,close:function(b){c[b]&&c[b].close()},registerManagedWindows:l}}();
ssc.onReady(function(){(function r(){0<ssc.dom("#ssc-footer-container").length?ssc.modules.footer=function(){function r(){function d(){var a=ssc.dom(".ssc-cp"),b;b=document.createElement("div");b.setAttribute("id","cookie-holder");q&&(ssc.dom("#ssc-footer-container"),0<a.length&&b.appendChild(a.obj()),null!==document.body&&document.body.appendChild(b))}function m(){var a=ssc.dom(".ssc-cp-ro"),b;0<a.length&&(a=a.css("height"),b=ssc.dom("#ssc-footer-container")[0].parentNode,(b=ssc.dom(b))&&b.css("padding-bottom",
a))}function w(){var a=ssc.dom(".ssc-cp-ro").obj(),b;b=document.createElement("div");b.setAttribute("id","romania-holder");q&&(ssc.dom("#ssc-footer-container"),b.appendChild(a),null!==document.body&&document.body.appendChild(b))}function g(){var a,b,c,d,e=3E3;d=(new Date).getTime()+n;a=new Date(d);a.setTime(d);b=a.getHours();c=a.getMinutes();a=a.getSeconds();b=(10>b?"0":"")+b;c=(10>c?"0":"")+c;a=(10>a?"0":"")+a;e*=30>a?30-a:60-a;f.each(function(){ssc.dom(this).html(b+":"+c)});setTimeout(function(){g()},
e)}var f,p,k,n,l=ssc.modules.getModuleConfig("footer","showCookiePolicyBanner"),c=ssc.modules.getModuleConfig("footer","showRomaniaBanner"),q,s=ssc.platform.getPlatformConfig("enableGtm"),h=ssc.platform.getPlatformConfig("isLoggedIn"),x=ssc.modules.getModuleConfig("footer","redirectToAusDomain"),t=ssc.modules.getModuleConfig("footer","sourceDomain"),v=!1;ssc.platformConfig.clientContext&&"true"===ssc.platformConfig.clientContext.isMasterAccount&&(v=!0);h&&!v&&x&&window.location.host.match(/\.(.*)$/)[1]==
t&&(window.location="https://identitysso."+t+"/api/moveCookie?actionID\x3d1");0<ssc.dom("#ssc-footer-container").length&&"undefined"!==typeof ssc.dom("#ssc-footer-container")[0]&&(q=!0);"unknown"!=ssc.platform.os.name&&ssc.dom("#ssc-footer-container").addClass("ssc-os-"+ssc.platform.os.name);"mobile"!==ssc.platform.getPlatformConfig("device").channel.toLowerCase()?ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-ftpl",target:".ssc-ftp",targetNodeMeasurableReference:".ssc-ftpc .ssc-ftpi",group:"footer",
callback:function(a){var b,c,d,e;try{if(b=parseInt(a.positionX,10),0>b){for(e=a.targetNodeMeasurableReferenceObj;e;){e.hasClass("ssc-ftp")&&(d=e.css("margin-left").replace("px",""),e.css("margin-left",parseInt(d,10)-b+5));if(e.hasClass("ssc-lw"))break;e=ssc.dom(e[0].parentNode)}(c=ssc.dom(e.children(".ssc-ftpa")[0]))&&e&&c.css("left",b)}}catch(f){ssc.log.INFO(f)}!0===s&&(!1===a.visible?dataLayer.push({event:"ga_event",category:"navigation",action:"closed",label:null!==a.triggerObj.obj().getAttribute("data-gtml")?
a.triggerObj.obj().getAttribute("data-gtml").toLowerCase():"",cd3:"footer"}):dataLayer.push({event:"ga_event",category:"navigation",action:"opened",label:null!==a.triggerObj.obj().getAttribute("data-gtml")?a.triggerObj.obj().getAttribute("data-gtml").toLowerCase():"",cd3:"footer"}))},callbackOnWindowResize:!0}):(window.dataLayer=window.dataLayer||[],ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-ftpl",target:".ssc-ftmt",group:"footer",callback:function(a){!0===s&&(!1===a.visible?dataLayer.push({event:"ga_event",
category:"navigation",action:"closed",label:null!==a.triggerObj.obj().getAttribute("data-gtml")?a.triggerObj.obj().getAttribute("data-gtml").toLowerCase():"",cd3:"footer"}):dataLayer.push({event:"ga_event",category:"navigation",action:"opened",label:null!==a.triggerObj.obj().getAttribute("data-gtml")?a.triggerObj.obj().getAttribute("data-gtml").toLowerCase():"",cd3:"footer"}))}}));h&&c&&(w(),m(),ssc.dom(window).on("resize",function(){m()}));l&&(ssc.dom(".ssc-cp").hasClass("ssc-prod-poker1-com-download")||
ssc.dom(".ssc-cp").hasClass("ssc-prod-poker-it-download")||ssc.dom(".ssc-cp").hasClass("ssc-prod-poker-es-download")||ssc.dom(".ssc-cp").hasClass("ssc-prod-poker-dk-download")||ssc.dom(".ssc-cp").hasClass("ssc-prod-casino-com-download")||ssc.dom(".ssc-cp").hasClass("ssc-prod-casino-it-download")||q&&"undefined"!==typeof ssc.dom("#ssc-footer-container")[0].parentElement&&"none"==ssc.dom("#ssc-footer-container")[0].parentElement.style.display)&&(l=!1);l&&(d(),ssc.cookieStorage.getItem("cookie-policy")||
(ssc.dom(".ssc-cp").removeClass("ssc-hide"),ssc.cookieStorage.setItem("cookie-policy","1")),"1"==ssc.cookieStorage.getItem("cookie-policy")&&ssc.dom(".ssc-cp").removeClass("ssc-hide"),ssc.dom(".ssc-cpgi").on("click",function(a){ssc.dom(this);ssc.eventPreventDefault(a);ssc.dom(".ssc-cp").addClass("ssc-hide");ssc.cookieStorage.removeItem("cookie-policy");ssc.cookieStorage.setItem("cookie-policy","0")}));(function(){var a;if(f=ssc.dom(".ssc-clock"))a=ssc.modules.getModuleConfig("footer","userDateTime").split("-"),
p=(new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])).getTime(),k=(new Date).getTime(),n=p-k,6E4>Math.abs(n)&&(n=0),g()})();!0===ssc.modules.getModuleConfig("footer","GtmOnFirstLogin")&&u();if(!0===s)ssc.dom(".mod-footer a, .ssc-cp a").on("click",function(a){this.getAttribute("data-gtml")&&!this.getAttribute("data-gtmdt")&&null===this.getAttribute("tabindex")&&null===this.getAttribute("data-language")&&dataLayer.push({event:"ga_event",category:"navigation",action:"navigated to",label:this.getAttribute("data-gtml").toLocaleLowerCase().replace("_",
" ").replace(".",""),cd3:"footer",cd34:this.href||""});this.getAttribute("data-gtml")&&this.getAttribute("data-gtmdt")&&dataLayer.push({event:"ga_event",category:"interface",action:"selected "+this.getAttribute("data-gtmdt").toLocaleLowerCase(),label:this.getAttribute("data-gtml").toLocaleLowerCase().replace("_"," ").replace(".",""),cd3:"footer"})})}function h(){var d=ssc.cookie.get("ssoid"),m=ssc.cookie.get("gtmfl"),h,g="rfr pid ttp bid pi mpch pla sid StickyTags TrackingTags".split(" "),f,p="",
k,n=ssc.cookie.get("bfsd"),l,c={event:"ga_event",category:"login",action:"logged in",label:"",acc_id:"acc_id",vertical:"ecommerce",product:"undefined",locale:"undefined",reg_status:"registered",login_status:"logged in",jurisdiction:"undefined",app_id:"undefined",rfr:"undefined",pid:"undefined",ttp:"undefined",bid:"undefined",pi:"undefined",promo_code:"undefined",mpch:"undefined",pla:"undefined",sid:"undefined",StickyTags:"undefined",TrackingTags:"undefined"};for(f in g)p=ssc.cookie.get(g[f]),""!==
p&&(c[g[f]]=p);if(n){g=n.split("|");for(f=0;f<g.length;f++)0<=g[f].indexOf("st\x3d")&&(k=g[f].split("\x3d"));k[1]&&("reg"==k[1]&&(l="returning registered"),"rp"==k[1]&&(l="returning prospect"),"p"==k[1]&&(l="new prospect"))}try{c.promo_code=ssc.cookie.get("promotionCode")||"undefined",c.login_status=ssc.modules.getModuleConfig("footer","loggedIn")?"Logged In":"Logged Out",c.reg_status=l||"undefined",c.acc_id=ssc.modules.getModuleConfig("footer","accountId")||"undefined",c.product=ssc.platformConfig.clientContext.product||
"undefined",c.jurisdiction=ssc.platformConfig.clientContext.jurisdiction||"undefined"}catch(q){}d&&(d=d.replace(/[^a-zA-Z0-9]/gi,"").substring(2,7),m?m!==d&&(h=!0,ssc.cookie.set("gtmfl",d,7,!0)):(h=!0,ssc.cookie.set("gtmfl",d,7,!0)));if(h&&(window.dataLayer=window.dataLayer||[],m={event:"ga_event",category:"login",action:"logged in",cd3:"ssc footer"},dataLayer.push(m),ssc.isMobile())){try{window.top.webkit.messageHandlers.trackTwitterAnalyticsEvent.postMessage({eventName:"LOGIN"})}catch(s){}try{window.top.webkit.messageHandlers.trackAppsFlyerAnalyticsEvent.postMessage({eventName:"af_login",
account_id:ssc.modules.getModuleConfig("footer","accountId")||"undefined"})}catch(r){}try{"undefined"!==typeof window.top.webkit.messageHandlers.trackGTMAnalyticsEvent.postMessage&&window.top.webkit.messageHandlers.trackGTMAnalyticsEvent.postMessage({eventName:"dataLayerPush",dataLayer:c})}catch(u){}try{"undefined"!==typeof window.BFMarketing.trackLoginEvent&&window.BFMarketing.trackLoginEvent(c.rfr,c.pid,c.bid,c.acc_id),"undefined"!==typeof window.BFMarketing.pushTagManagerDataLayer&&window.BFMarketing.pushTagManagerDataLayer(JSON.stringify(c))}catch(t){}}}
function u(){window.addEventListener?window.addEventListener("load",h,!1):window.attachEvent?window.attachEvent("onload",h):window.onload?window.onload=h:setTimeout(function(){u()},50)}ssc.log.ENTER("Footer Module");ssc&&ssc.isFooterLoaded&&r();ssc.log.EXIT();return{getCountryByIp:function(){return ssc.modules.getModuleConfig("footer","countryByIp")?ssc.modules.getModuleConfig("footer","countryByIp"):!1}}}():setTimeout(r,300)})()});
ssc.onReady(function(){(function g(){var d=ssc.dom("#ssc-header-container");0<d.length&&!d.hasClass("ssc-static-header")?ssc.modules.header=function(){function d(){var c=ssc.modules.getModuleConfig("header","headerchangelocale");ssc.platform.getPlatformConfig("isLoggedIn");var a,e=ssc.platform.getPlatformConfig("enableGtm");"unknown"!=ssc.platform.os.name&&ssc.dom("#ssc-header-container").addClass("ssc-os-"+ssc.platform.os.name);window.dataLayer=window.dataLayer||[];ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-ud",
target:".ssc-md",targetNodeMeasurableReference:".ssc-tlpc",group:"header",callback:function(b){var f=b.targetNodeMeasurableReferenceObj.css("right").replace("px",""),a=parseInt(b.positionX,10);try{0>a&&b.targetNodeMeasurableReferenceObj.css("right",parseInt(f,10)+parseInt(b.positionX,10)-5)}catch(c){}b.visible?!0===e&&dataLayer.push({event:"ga_event",category:"navigation",action:"opened",label:"my account",cd3:"header"}):!0===e&&dataLayer.push({event:"ga_event",category:"navigation",action:"closed",
label:"my account",cd3:"header"})},hideTargetOnEvent:!0});ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-wl",triggerExcept:"ssc-wlh",triggerExceptPersist:!1,target:".ssc-bd",group:"header",hideTargetOnEvent:!0,hideTargetOnEventConditionedByTrigger:"ssc-wlcp",targetNodeMeasurableReference:".ssc-tlpc",callback:function(b){var f,a,c;if(b.triggerObj)try{c=b.triggerObj.obj().offsetHeight,b.visible&&ssc.modules.login.refreshWallets(!0),f=b.targetNodeMeasurableReferenceObj.getPosition().y-(b.triggerObj.getPosition().y+
c),a=parseInt(b.targetNodeMeasurableReferenceObj.css("top").replace("px",""),10),b.targetNodeMeasurableReferenceObj.css("top",a-f-1+"px")}catch(d){ssc.log.INFO(d)}b.visible?!0===e&&dataLayer.push({event:"ga_event",category:"navigation",action:"opened",label:"main wallet",cd3:"header"}):!0===e&&dataLayer.push({event:"ga_event",category:"navigation",action:"closed",label:"main wallet",cd3:"header"})}});ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-hls",target:".ssc-hlsd",group:"header",hideTargetOnEvent:!0,
callback:function(b){!0===e&&(b.visible?dataLayer.push({event:"ga_event",category:"navigation",action:"opened",label:"language selector",cd3:"header"}):dataLayer.push({event:"ga_event",category:"navigation",action:"closed",label:"language selector",cd3:"header"}))}});a=ssc.dom(".ssc-hlsd a");if(0<a.length)if("POST"==c.method)a.on("click",function(b){var a=ssc.dom(this),c=ssc.dom("#ssc-hclf").obj();b=ssc.dom('#ssc-hclf [name\x3d"language"]');var d=ssc.dom('#ssc-hclf [name\x3d"region"]'),h=a.attr("data-region"),
a=a.attr("data-language"),g=a+" "+h;d.attr("value",h);b.attr("value",a);!0===e&&dataLayer.push({event:"ga_event",category:"interface",action:"selected language selector",label:g.toLocaleLowerCase(),cd3:"header"});setTimeout(function(){c.submit()},300);return!1});else a.on("click",function(b){var a=ssc.dom(this);b=a.attr("data-region");b=a.attr("data-language")+" "+b;!0===e&&dataLayer.push({event:"ga_event",category:"interface",action:"selected language selector",label:b.toLocaleLowerCase(),cd3:"header"});
setTimeout(function(){window.location=a.attr("href")},300);return!1});ssc.platform.cookies.betex&&ssc.platform.cookies.betex.betexRegion&&(a=ssc.platform.cookies.betex.betexRegion.replace(" ","_"),c=ssc.dom(".ssc-lsf"),("AUS_NZL"===a||"IRL"===a)&&0<c.length&&(a="ssc-f"+a.toLowerCase(),c.hasClass("ssc-fGB")&&c.removeClass("ssc-fGB"),c.addClass(a)));if(!0===e)ssc.dom(".ssc-hc a").on("click",function(a){this.getAttribute("data-gtml")&&!this.getAttribute("data-gtmdt")&&null===this.getAttribute("tabindex")&&
null===this.getAttribute("data-language")&&dataLayer.push({event:"ga_event",category:"navigation",action:"navigated to",label:this.getAttribute("data-gtml").toLocaleLowerCase().replace("_"," ").replace(".",""),cd3:"header",cd34:this.href||""});this.getAttribute("data-gtml")&&this.getAttribute("data-gtmdt")&&dataLayer.push({event:"ga_event",category:"interface",action:"selected "+this.getAttribute("data-gtmdt"),label:this.getAttribute("data-gtml").toLocaleLowerCase().replace("_"," ").replace(".",""),
cd3:"header"})})}ssc.log.ENTER("Header Module");ssc&&ssc.isHeaderLoaded&&d();ssc.log.EXIT()}():setTimeout(g,300)})()});
ssc.services.wallets=function(){function b(a,b){ssc.isFunction(b)&&ssc.ajax.get({path:ssc.services.getServiceConfig("wallets",a),contentType:"application/json",setRequestHeader:{"X-Brand":ssc.services.getServiceConfig("wallets","X-Brand"),"X-BF-Jurisdiction":ssc.services.getServiceConfig("wallets","X-BF-Jurisdiction"),"X-Application":"SharedSiteComponent"},onSuccess:function(a){b(a)},onError:function(a){b({error:!0})}})}ssc.log.ENTER("Wallets Service");ssc.log.EXIT();return{retrieveAggregatedWallets:function(a){b("WASUrlAggregated",
a)},retrieveCasinoBonusWallet:function(a){b("WASUrlCasino",a)},retrieveCasinoFunBonusWallet:function(a){b("WASUrlCasinoFunBonus",a)},retrieveReducedNumberOfWallets:function(a){b("WASUrlReduced",a)}}}();
ssc.services.webmessaging=function(){function g(){return a={messageViewType:{autoPopup:1,clickPopup:2,clickNewWindow:3,noFull:4,sameWindow:5},previewType:{largeThumb:1,noThumb:2,smallThumb:3},service:{baseUrl:ssc.services.getServiceConfig("webmessaging","baseUrl"),serviceFragment:ssc.services.getServiceConfig("webmessaging","serviceFragment"),tailFragment:ssc.services.getServiceConfig("webmessaging","tailFragment"),templateBaseUrl:ssc.services.getServiceConfig("webmessaging","templateBaseUrl"),pageLoadTimeout:1E3,
serviceRefreshRate:1E4,isFirstRetrieval:!0},monthNames:"January February March April May June July August September October November December".split(" "),messages:{all:[],totalMessages:0,totalUnreadMessages:0,oldestAutoPopupMessage:null}}}function e(b){setTimeout(function(){ssc.ajax.jsonp.get(a.service.baseUrl+a.service.serviceFragment+"getMessages"+a.service.tailFragment+(new Date).getTime(),{},function(a){a=a.getMessagesResponse["return"].data;ssc.isObject(a)?b&&b(a):ssc.log.INFO("Response Content-Type probably not set correctly; suggested value 'application/json'")},
!1)},a.service.pageLoadTimeout)}ssc.log.ENTER("Web Messaging Service");var a;g();ssc.log.EXIT();return{config:a,initWebmessaging:g,getMessagesData:e,setReadMessage:function(b,d){var c;if(b.broadcast){c={messageId:b.messageId};try{ssc.ajax.jsonp.get(a.service.baseUrl+a.service.serviceFragment+"readBroadcastMessage"+a.service.tailFragment+(new Date).getTime(),c,function(a){e(d)},!1)}catch(h){ssc.log.INFO(h)}}else{c={customerMessageId:b.customerMessageId};try{ssc.ajax.jsonp.get(a.service.baseUrl+a.service.serviceFragment+
"readMessage"+a.service.tailFragment+(new Date).getTime(),c,function(a){e(d)},!1)}catch(f){ssc.log.INFO(f)}}},recordAction:function(b,d){var c;if(b.broadcast){if(0<d.length){c={messageId:b.messageId,action:d};try{ssc.ajax.jsonp.get(a.service.baseUrl+a.service.serviceFragment+"recordBroadcastAction"+a.service.tailFragment+(new Date).getTime(),c,function(a){},!1)}catch(e){ssc.log.INFO(e)}}}else if(-1<b.customerMessageId&&0<d.length){c={customerMessageId:b.customerMessageId,action:d};try{ssc.ajax.jsonp.get(a.service.baseUrl+
a.service.serviceFragment+"recordAction"+a.service.tailFragment+(new Date).getTime(),c,function(a){},!1)}catch(f){ssc.log.INFO(f)}}}}}();
ssc.services.retrievessc=function(){ssc.log.ENTER("Client Side Content");ssc.imediateScript=ssc.imediateScript||function(b){var a=document.getElementById(b);a&&"object"===typeof a&&(a.className=a.className.replace("ssc-no-js","").replace("  "," "),a.className+=" ssc-js");"ssc-header-container"===b&&(window.ssc.earlyConfig={windowLocSearch:window.location.search,windowLocHash:window.location.hash})};ssc.log.EXIT();return{getHeader:function(b,a,e){if(""!==b.contentConfiguration.headerId){var c=ssc.dom("#"+
b.contentConfiguration.headerId),d=ssc.dom("#"+b.contentConfiguration.headerId+" .ssc-static-header"),f;""!==e&&(f=e+"/api/v1.0/header/json");f&&(0<c.length&&""===c[0].innerHTML||0<d.length)&&(""===a.headersConfiguration["X-Authentication"]&&delete a.headersConfiguration["X-Authentication"],""===a.headersConfiguration.path&&delete a.headersConfiguration.path,ssc.ajax.post({path:f,contentType:"application/json",setRequestHeader:a.headersConfiguration,data:b,onSuccess:function(a){"undefined"!==typeof a&&
(window.ssc.isHeaderLoaded=!0,ssc.platformConfig=ssc.parseJSON(a.platfomConfig),ssc.platformConfig.page.config.bundle={enabled:!0},ssc.platformConfig.clientContext=a.clientContext,ssc.testConf=!0,ssc.platformConfig.page.config.isLoggedIn&&(ssc.isLoggedIn=ssc.platformConfig.page.config.isLoggedIn),ssc.initPlatformConfig(!0),c.removeClass("ssc-static-header"),c[0].innerHTML=a.header,ssc.cache.populateCache(),ssc.plugins.modal_popup.initModal(),ssc.renderingEngineInfo(!0),ssc.imediateScript("ssc-header-container"),
ssc.log.INFO("Ajax getHeader (header) -\x3e "+a.header))},onError:function(a){ssc.log.INFO("Ajax getHeader (ERROR) -\x3e "+a.header)}}))}},getFooter:function(b,a,e){var c,d;""!==e&&(c=e+"/api/v1.0/footer/json");c&&""!==b.contentConfiguration.footerId&&(d=ssc.dom("#"+b.contentConfiguration.footerId),0<d.length&&""===d[0].innerHTML&&(""===a.headersConfiguration["X-Authentication"]&&delete a.headersConfiguration["X-Authentication"],""===a.headersConfiguration.path&&delete a.headersConfiguration.path,
ssc.ajax.post({path:c,contentType:"application/json",setRequestHeader:a.headersConfiguration,data:b,onSuccess:function(a){"undefined"!==typeof a&&(window.ssc.isFooterLoaded=!0,ssc.platformConfig=ssc.parseJSON(a.platfomConfig),ssc.platformConfig.page.config.bundle={enabled:!0},ssc.platformConfig.page.config.isLoggedIn&&(ssc.isLoggedIn=ssc.platformConfig.page.config.isLoggedIn),ssc.platformConfig.clientContext=a.clientContext,ssc.initPlatformConfig(!0),d[0].innerHTML=a.footer,ssc.cache.populateCache(),
ssc.plugins.modal_popup.initModal(),ssc.renderingEngineInfo(!0),ssc.imediateScript("ssc-footer-container"))},onError:function(a){ssc.log.ENTER("Ajax getFooter (ERROR) -\x3e "+a.footer)}})))}}}();
ssc.onReady(function(){(function u(){0<ssc.dom("#ssc-lsec").length?ssc.modules.login=function(){var s;function u(){function c(){return 0<f.length&&0<f.attr("value").length&&f.attr("value")!=l?!0:!1}function d(){x&&0<e.length&&(e.hasClass("ssc-cta-primary")&&(e.removeClass("ssc-cta-primary"),h.removeClass("ssc-lock")),e.addClass("ssc-cta-simple"),h.addClass("ssc-lock"),x=!1,0<a.length&&(a.hasClass("ssc-cta-simple")&&a.removeClass("ssc-cta-simple"),a.addClass("ssc-cta-primary")))}var f=ssc.dom("#ssc-liu"),
a=ssc.dom("#ssc-lis"),n=ssc.dom("#ssc-lipw"),e=ssc.dom(".ssc-lij"),h=ssc.dom(".ssc-lkh"),g=ssc.dom("#ssc-rmb"),k=ssc.dom(".ssc-wlcgb a"),l=ssc.modules.getModuleTranslation("login","SSC.LOGIN.EMAIL.AS.USERNAME"),w=!1,m;window.dataLayer=window.dataLayer||[];if(0<f.length)f.on("focus",function(){d()});if(0<n.length)n.on("focus",function(){d()});if(ssc.platform.getPlatformConfig("isLoggedIn")){if(y=ssc.dom(".ssc-bd"),a.on("click",function(a){a.preventDefault();setTimeout(function(){ssc.dom(".ssc-lof").obj().submit()},
300)}),ssc.localStorage.getItem("hidden-balance")&&(t(!0),ssc.dom(".ssc-wl").toggleClass("ssc-wlh")),ssc.dom(".ssc-wl").removeClass("ssc-inv-js"),ssc.dom(".ssc-hb").on("click",function(){t(!0);ssc.dom(".ssc-wl").toggleClass("ssc-wlh")}),ssc.dom(".ssc-sb").on("click",function(){t(!1)}),b.countDomContainers={},ssc.dom(".ssc-wla").each(function(){var a=ssc.dom(this);0<a.attr("rel").length&&(b.countDomContainers[a.attr("rel")]?b.countDomContainers[a.attr("rel")]+=1:b.countDomContainers[a.attr("rel")]=
1);b.domContainers.push(a)}),ssc.dom(".ssc-rl").on("click",function(){var a=ssc.dom(this);!1===w&&(a.hasClass("dissable-refresh")||(p(),w=!0,a.addClass("dissable-refresh"),!0===r&&dataLayer.push({event:"ga_event",category:"interface",action:"refreshed balance",cd3:"login"})),m=setTimeout(function(){w=!1;a.removeClass("dissable-refresh");clearTimeout(m)},1E4))}),p(),0<k.length)k.on("click",function(a){var c=ssc.dom(ssc.dom(this).parent().parent().children(".ssc-wla")).attr("rel").toLowerCase();if(c&&
0<c.length)switch(s=!1,c){case "casino_bonus":ssc.services.wallets.retrieveCasinoBonusWallet(q);break;case "casino_fun_bonus":ssc.services.wallets.retrieveCasinoFunBonusWallet(q);break;default:ssc.services.wallets.retrieveAggregatedWallets(q)}a.preventDefault();return!1})}else{if(0<a.length)a.on("click",function(a){a.preventDefault();ssc.modules.getModuleConfig("login","quickDepositEnabled")&&ssc.localStorage.setItem("displayQuickDeposit","1");r&&(c()&&dataLayer.push({event:"ga_event",category:"login",
action:"field complete",label:"username complete",cd3:"login"}),ssc.dom("#ssc-lipw")&&0<ssc.dom("#ssc-lipw").attr("value").length&&dataLayer.push({event:"ga_event",category:"login",action:"field complete",label:"password complete",cd3:"login"}));setTimeout(function(){try{0<g.length&&ssc.localStorage.getItem("remember-me")&&c()&&(ssc.localStorage.removeItem("remember-me"),ssc.localStorage.setItem("remember-me",f.attr("value")))}catch(a){ssc.log.INFO(a)}ssc.dom(".ssc-lif").obj().submit()},300)});0<
g.length&&(ssc.localStorage.getItem("remember-me")&&("1"!=ssc.localStorage.getItem("remember-me")?f.attr("value",ssc.localStorage.getItem("remember-me")):ssc.localStorage.removeItem("remember-me")),ssc.localStorage.getItem("remember-me")&&"1"!=ssc.localStorage.getItem("remember-me")?g.attr("checked","checked"):(g[0].checked=!1,g.attr("checked","")),g.on("click",function(){g[0].checked?(ssc.localStorage.getItem("remember-me")||ssc.localStorage.setItem("remember-me","1"),r&&dataLayer.push({event:"ga_event",
category:"login",action:"selected remember me",label:"true",cd3:"login"})):(ssc.localStorage.removeItem("remember-me"),r&&dataLayer.push({event:"ga_event",category:"login",action:"deselected remember me",label:"false",cd3:"login"}))}))}}function p(c){if(ssc&&ssc.isHeaderLoaded&&!l)try{l=!0,b.available=[],b.funds=[],s=!1,s=!0,"it_reg"!==ssc.platformConfig.clientContext.jurisdiction?ssc.isBoolean(c)&&c?ssc.services.wallets.retrieveAggregatedWallets(q):ssc.services.wallets.retrieveReducedNumberOfWallets(q):
ssc.isBoolean(c)&&c?ssc.services.wallets.retrieveAggregatedWallets(z):ssc.services.wallets.retrieveReducedNumberOfWallets(z)}catch(d){l=!1,ssc.log.INFO("Error during the wallet refresh",d)}}function z(c){var d={walletName:"ITALY_BONUS",details:{amount:0},status:"UNKNOWN_ERROR"},f={walletName:"ITALY_WINNINGS",details:{amount:0},status:"UNKNOWN_ERROR"},a={walletName:"ITALY_DEPOSITS",details:{amount:0},status:"UNKNOWN_ERROR"},n={walletName:"MAIN",details:{amount:0},status:"UNKNOWN_ERROR"},e={walletName:"TOTAL",
details:{amount:0},status:"UNKNOWN_ERROR"},h,g;l=!0;if(ssc.isArray(c)&&0<c.length)for(h=0;h<c.length;h++)"ITA"!=c[h].walletName?b.available.push(c[h]):g=c[h];else g=c;ssc.isObject(g)?("SUCCESS"===g.status&&(d=ssc.concatObjects(d,{details:{amount:parseFloat(g.details.bonuses)},status:g.status}),f=ssc.concatObjects(f,{details:{amount:parseFloat(g.details.winnings)},status:g.status}),a=ssc.concatObjects(a,{details:{amount:parseFloat(g.details.deposits)},status:g.status}),n=ssc.concatObjects(n,{details:{amount:parseFloat((parseFloat(g.details.deposits)+
parseFloat(g.details.winnings)).toFixed(2))},status:g.status}),e=ssc.concatObjects(e,{details:{amount:parseFloat(g.details.availabletobet)},status:g.status})),b.available.push(d),b.available.push(n),b.available.push(f),b.available.push(a)):ssc.log.INFO("Response Content-Type probably not set correctly; suggested value 'application/json'");s=!1;q([e])}function q(c){var d,f,a,n="",e,h=2,g=!1;d={walletName:"TOTAL",details:{amount:0},status:"LOADING"};var k="ARCADE_BONUS CASINO_BONUS CASINO_BONUS_CASH CASINO_FUN_BONUS GAMES_BONUS XG_BONUS SPORTSBOOK_BONUS SPORTSBOOK_BONUS_WAGERING SPORTSBOOK_BONUS_CASH FROZEN VEGAS_BONUS".split(" "),
m=["XG_BONUS"],p=["SPORTSBOOK_BONUS","SPORTSBOOK_BONUS_WAGERING","SPORTSBOOK_BONUS_CASH","FROZEN"],q=["SPORTSBOOK_BONUS_WAGERING","SPORTSBOOK_BONUS_CASH"],t=["FROZEN"];e=!1;var r=0;l=!0;if(ssc.isObject(c)){ssc.log.INFO("data",c);if(c&&c.error){l=!1;return}for(e=0;e<c.length;e++)if(b.available.push(c[e]),s){if("SUCCESS"===d.status||"LOADING"===d.status)"SUCCESS"===c[e].status?0>ssc.arrayIndexOf(k,c[e].walletName)&&(a=parseFloat(c[e].details.amount),isNaN(a)||(d.details.amount+=a)):d.status=c[e].status}else d.status=
"UNKNOWN_ERROR";!s||y.hasClass("ssc-hdn-js")||"SUCCESS"!==d.status&&"LOADING"!==d.status||(d.status="SUCCESS",b.available.push(d));for(a=0;a<b.available.length;a++)b.funds[b.available[a].walletName]=b.available[a],"intl"===ssc.platformConfig.clientContext.jurisdiction&&"SUCCESS"===b.available[a].status&&0>ssc.arrayIndexOf(k,b.available[a].walletName)&&b.available[a].details.bonus&&(b.funds[b.available[a].walletName+"_BONUS"]=ssc.objectCreate(b.available[a]),b.funds[b.available[a].walletName+"_BONUS"].walletName=
b.available[a].walletName+"_BONUS"),ssc.modules.getModuleConfig("login","quickDepositEnabled")&&"MAIN"===b.available[a].walletName&&ssc.localStorage.getItem("displayQuickDeposit")&&(A(b,a),ssc.localStorage.removeItem("displayQuickDeposit"));for(c=0;c<b.domContainers.length;c++)if(d=b.domContainers[c],(f=b.funds[d.attr("rel").toUpperCase()])&&"SUCCESS"===f.status){e=-1<ssc.arrayIndexOf(t,f.walletName);ssc.modules.getModuleConfig("login","showSportsbookBonus")&&-1<ssc.arrayIndexOf(p,f.walletName)&&
(a=isNaN(parseFloat(f.details.amount))?!1:parseFloat(f.details.amount),!1!==a&&("SPORTSBOOK_BONUS"===f.walletName?(r=a,d.parent().removeClass("ssc-hdn")):-1<ssc.arrayIndexOf(q,f.walletName)?0>=r?d.parent().addClass("ssc-hdn"):d.parent().removeClass("ssc-hdn"):"FROZEN"===f.walletName&&(0>=a?d.parent().addClass("ssc-hdn"):d.parent().removeClass("ssc-hdn"))));"CASINO_BONUS"===f.walletName&&(a=parseFloat(f.details.real)+parseFloat(f.details.bonus)+parseFloat(f.details.winnings),isNaN(a)||(f.details.amount=
a));if(ssc.platform.getPlatformConfig("isDisaster"))a=0>ssc.arrayIndexOf(m,f.walletName)?parseFloat(f.details.amount):parseFloat(f.details.bonus),isNaN(a)||d.html(ssc.formatCurrency("",a,B,e));else{try{n=ssc.modules.getModuleTranslation("header","COMMON.SYMBOL."+ssc.modules.getModuleConfig("header","currencyCode"))}catch(u){ssc.log.INFO(u)}a=0>ssc.arrayIndexOf(m,f.walletName)?parseFloat(f.details.amount):parseFloat(f.details.bonus);isNaN(a)||d.html(ssc.formatCurrency(n,a,B,e))}if(0<=ssc.arrayIndexOf(k,
f.walletName)){if(a=ssc.dom(d.parent().children(".ssc-wlcgb")))a.addClass("ssc-hdn"),d.removeClass("ssc-hdn")}else{try{h=parseInt(b.countDomContainers[d.attr("rel")],10)}catch(v){ssc.log.INFO("Can't retrieve the DOM info to count it",v)}a=parseFloat(f.details.amount);"MAIN"==f.walletName&&0===a&&(g=!0);e=d.parent();0===a?(2>h&&e.hasClass("ssc-wlddr")&&!e.hasClass("ssc-hdn")&&e.addClass("ssc-hdn"),g&&e&&e.hasClass("ssc-wlrmw")?e.addClass("ssc-wlhtl"):e.removeClass("ssc-wlhtl")):e.removeClass("ssc-wlhtl")}}}else ssc.log.INFO("Response Content-Type probably not set correctly; suggested value 'application/json'");
l=!1}function A(c,d){var f=arguments.length,a=ssc.modules.getModuleConfig("login","accountStatus")?ssc.modules.getModuleConfig("login","accountStatus"):"";if(ssc.platform.getPlatformConfig("isLoggedIn")&&"active"==a.toLowerCase())ssc.onReady(function(){var a=0,e=ssc.modules.getModuleConfig("login","quickDepositWindowWidth"),b,g,k;try{if(b=ssc.modules.getModuleConfig("header","language").toUpperCase()+"-"+ssc.modules.getModuleConfig("header","currencyCode").toUpperCase()){switch(!0){case /^EL/.test(b):e=
420;break;case /^ES|^PT/.test(b):e=435;break;case /^DE|^RU/.test(b):e=450;break;case /^IT/.test(b):e=455}/.*AUD$|.*CAD$|.*SGD$/.test(b)&&(e+=65);/.*DKK$|.*NOK$|.*SEK$|.*HKD$/.test(b)&&(e+=80)}2===f&&(a=parseFloat(c.available[d].details.amount));if(a<ssc.modules.getModuleConfig("login","walletLimitToQuickDeposit")){switch(ssc.platformConfig.clientContext.jurisdiction){case "intl":k="23";break;case "it_reg":k="20";break;case "es_reg":k="21";break;case "dk_reg":k="24"}g="https://myfunds."+window.location.hostname.match(/\.(.*)$/)[1]+
"/quickdeposit?prod\x3d"+k+"\x26showHeader\x3d1\x26amp;lt\x3d"+ssc.modules.getModuleConfig("login","walletLimitToQuickDeposit");e=ssc.modules.getModuleConfig("login","quickDepositWindowWidth");m=ssc.plugins.modal_popup.show({dimensions:{width:e,height:ssc.modules.getModuleConfig("login","quickDepositWindowHeight")},content:{body:{src:g},theme:"ssc-modal-theme2",showLoadingSpinnerForIframe:!0},controlsToAction:{closeButton:{cssSelector:".ssc-modal-close",event:"click",callback:function(){p();C();return!0},
callbackArgs:[]}}})}}catch(l){ssc.log.INFO(l)}})}function C(){try{"function"==typeof sscQuickDepositCloseHandler&&window.top.sscQuickDepositCloseHandler()}catch(c){}}function t(c){ssc.dom(".ssc-wlc table.ssc-wldw").toggleClass("ssc-hdn");ssc.dom(".ssc-hb").toggleClass("ssc-hdn");ssc.dom(".ssc-sb").toggleClass("ssc-hdn");ssc.dom(".ssc-wl .ssc-aru").toggleClass("ssc-hdn");ssc.dom(".ssc-rl").toggleClass("ssc-hdn");c?ssc.localStorage.setItem("hidden-balance","1"):ssc.localStorage.removeItem("hidden-balance")}
ssc.log.ENTER("Login Module");var b={available:[],funds:[],domContainers:[]},v,l=!1,m,x=!0,y,B=ssc.modules.getModuleConfig("login","formatCurrencyBackwards"),r=ssc.platform.getPlatformConfig("enableGtm");ssc&&ssc.isHeaderLoaded&&u();ssc.log.EXIT();return{refreshWallets:p,autoRefreshWallets:function(c){var d;try{if(ssc&&ssc.isHeaderLoaded&&(d=parseInt(c,10),v&&clearInterval(v),d&&0<d))return v=setInterval(p,d)}catch(f){ssc.log.INFO("Wallet auto refresh setup error",f)}},openQuickDeposit:A,closeQuickDeposit:function(){m&&
(m.close(),p(),C())},resizeQuickDeposit:function(c,d){m.resize(c,d)},updateLoginLogoutReturnUrl:function(c,d){var f,a=c||"",b,e;d=d||!0;f=ssc.platform.getPlatformConfig("isLoggedIn")?ssc.dom("#ssc-loru"):ssc.dom("#ssc-liru");return 0<f.length&&ssc.isString(c)&&0<c.length&&(d&&0<=a.indexOf("rurl\x3d")&&(b=a.indexOf("rurl\x3d")+5,a=a.substr(0,b-5)+"rurl\x3d"+a.substr(b,a.length).replace(/:/g,"%3A").replace(/&/g,"%26").replace(/\//g,"%2F").replace(/\?/g,"%3F").replace(/=/g,"%3D")),b=ssc.parseUri(a),
a=ssc.parseUri(f.attr("value")),window.location.host.match(/\.(.*)$/)[1]===a.host.match(/\.(.*)$/)[1]&&window.location.host.match(/\.(.*)$/)[1]===b.host.match(/\.(.*)$/)[1])?(ssc.isDefined(b.queryKey.rurl)&&ssc.isDefined(a.queryKey.rurl)?(e=b.queryKey.rurl.replace(/%3A/g,":").replace(/%26/g,"\x26").replace(/%2F/g,"/").replace(/%3F/g,"?").replace(/%3D/g,"\x3d"),e=ssc.parseUri(e),window.location.host.match(/\.(.*)$/)[1]===e.host.match(/\.(.*)$/)[1]&&(a.newSource=b.source)):a.newSource=b.source,f.attr("value",
a.newSource),!0):!1},toggleWalletInformation:t,toggleWalletStatus:function(){return"1"===ssc.localStorage.getItem("hidden-balance")?!0:!1},logoutHandler:function(){var b=ssc.dom(".ssc-lof");return ssc.platform.getPlatformConfig("isLoggedIn")?(0<b.length&&b.obj().submit(),!0):!1}}}():setTimeout(u,300)})()});
ssc.onReady(function(){(function g(){1===ssc.dom("#ssc-pn").length?ssc.modules.main_navigation=function(){function g(){var c,d,h,k,e,l=!1,f,m,a,n,b,p;if(ssc.modules.getModuleConfig("main-navigation","showSbkLanguagePopup")){m=ssc.modules.getModuleConfig("main-navigation","supportedLocales");p=0<ssc.dom(".ssc-ltp").length?ssc.dom(".ssc-ltp"):ssc.dom(".ssc-hlsd");try{if(m){f=m.replace(/ /g,"");-1!==f.indexOf("UK_ENGLISH")&&-1!==f.indexOf("IRELAND_ENGLISH")&&(f=f.replace("IRELAND_ENGLISH,",""));a=f.split(",");
for(b=0;b<a.length;b++)switch(n=a[b],n){case "UK_ENGLISH":a[b]="EN";break;case "IRELAND_ENGLISH":a[b]="EN";break;case "BULGARIAN":a[b]="BG";break;case "DANISH":a[b]="DA";break;case "GERMAN":a[b]="DE";break;case "GREEK":a[b]="EL";break;case "SPANISH":a[b]="ES";break;case "ITALIAN":a[b]="IT";break;case "PORTUGUESE":a[b]="PT";break;case "ROMANIAN":a[b]="RO";break;case "RUSSIAN":a[b]="RU";break;case "SWEDISH":a[b]="SV"}!ssc.localStorage.getItem("hide-sbk-popup")&&0<p.length&&(l=!0);if(l&&"sportsbook"===
ssc.platformConfig.clientContext.selectedTab){e=ssc.platformConfig.clientContext.language.toUpperCase();ssc.platform.window.location.hash&&ssc.platform.window.location.hash.sscpl&&(e=ssc.platform.window.location.hash.sscpl.toUpperCase());if(0<a.length&&-1!==ssc.arrayIndexOf(a,e))return;(k=ssc.modules.getModuleTranslation("main-navigation","MAIN.NAVIGATION.HEADER.TITLE."+e))||(k=ssc.modules.getModuleTranslation("main-navigation","MAIN.NAVIGATION.HEADER.TITLE"));(d=ssc.modules.getModuleTranslation("main-navigation",
"MAIN.NAVIGATION.BODY.LINE1."+e))||(d=ssc.modules.getModuleTranslation("main-navigation","MAIN.NAVIGATION.BODY.LINE1"));(h=ssc.modules.getModuleTranslation("main-navigation","MAIN.NAVIGATION.BODY.LINE2."+e))||(h=ssc.modules.getModuleTranslation("main-navigation","MAIN.NAVIGATION.BODY.LINE2"));c="\x3cp\x3e"+d+"\x3c/p\x3e";ssc.plugins.modal_popup.show({dimensions:{width:400,height:170},content:{headerText:k,body:{data:c+("\x3cp\x3e"+h+"\x3c/p\x3e")},showFooter:!0,theme:"ssc-modal-theme3"},controlsToAction:{okCloseButtons:{cssSelector:".ssc-modal-close, .ssc-modal-ok",
event:"click",callback:function(){var a=ssc.dom("#ssc-modal-chk");a&&a.obj().checked&&!ssc.localStorage.getItem("hide-sbk-popup")&&ssc.localStorage.setItem("hide-sbk-popup","1");return!0},callbackArgs:[]}}})}}}catch(q){ssc.log.INFO(q)}l&&(c=ssc.dom("#ssc-pn #SPORTSBOOK"),0<c.length&&(d=c.attr("href"),0>d.indexOf("#")?c.attr("href",d+"#sscpl\x3d"+ssc.platformConfig.clientContext.language):c.attr("href",d+"\x26sscpl\x3d"+ssc.platformConfig.clientContext.language)))}}ssc.log.ENTER("Main Navigation Module");
ssc&&ssc.isHeaderLoaded&&g();ssc.log.EXIT()}():setTimeout(g,300)})()});
ssc.onReady(function(){(function a(){0<ssc.dom("#ssc-ssec").length?ssc.modules.search=function(){ssc.log.ENTER("Search Module");ssc&&ssc.isHeaderLoaded&&(ssc.dom("#ssc-hm").addClass("ssc-hdn"),ssc.dom(".ssc-si").on("click",function(){ssc.dom("#ssc-hm").toggleClass("ssc-hdn")}));ssc.log.EXIT()}():setTimeout(a,300)})()});
ssc.onReady(function(){(function t(){0<ssc.dom(".ssc-wm").length?ssc.modules.web_messaging=function(){function u(a,b,k,e,c,g,f,l,h,s,m,n,p,q){this.customerMessageId=a;this.messageViewTypeId=b;this.previewTypeId=k;this.subject=e;this.description=c;this.templateUrl=g;this.thumbnailUrl=f;this.fromDate=l;this.readDate=h;this.templateWidth=s;this.templateHeight=m;this.displayableDate=n;this.broadcast=p;this.messageId=q}function h(a){var d=1,k,e,c,g,f,l,h,s,m,n,p,q,r,z,A,B,v,w,x,y;if(!ssc.isUndefined(a)&&
!ssc.isUndefined(a.array)){a=a.array;b.messages.all.length=0;ssc.isDefined(a[0])&&null!==a[0]&&(d=a.length);for(k=0;k<d;k++)(c=1==d?a:a[k],g=c.id,f=c.message.messageViewTypeId,l=c.message.previewTypeId,h=c.message.subject,s=c.message.description,m=c.message.templateUrl,n=c.message.thumbnailUrl,p=c.message.fromDateTime,q="true"==c.readDateTime["@nil"]?null:c.readDateTime,r=1600<c.message.templateWidth?1600:c.message.templateWidth,z=1200<c.message.templateHeight?1200:c.message.templateHeight,A=c.message.broadcast,
B=c.message.id,null!==m&&0!==m.length||f==b.messageViewType.noFull)?null!==n&&0!==n.length||l==b.previewType.noThumb?-1===h.search("POKER_CLIENT ")&&("http"!=m.substr(0,4)&&(m=b.service.templateBaseUrl+m),"http"!=n.substr(0,4)&&(n=b.service.templateBaseUrl+n),c=new Date(p),e=new Date,v=c.getDate(),w=c.getMonth(),x=c.getFullYear(),y=v+" "+b.monthNames[w]+", "+x,e.getDate()==v&&e.getMonth()==w&&e.getFullYear()==x&&(y="Today"),e=new u(g,f,l,h,s,m,n,p,q,r,z,y,A,B),b.messages.all.push(e),b.service.isFirstRetrieval&&
f==b.messageViewType.autoPopup&&null===q&&(null===b.messages.oldestAutoPopupMessage?b.messages.oldestAutoPopupMessage=e:(g=new Date(b.messages.oldestAutoPopupMessage.fromDate),c.getTime()<g.getTime()&&(b.messages.oldestAutoPopupMessage=e)))):ssc.log.INFO("No thumbnailUrl supplied for message: "+e.subject+"; ignoring message..."):ssc.log.INFO("No templateUrl supplied for message: "+e.subject+"; ignoring message...");if(0<b.messages.all.length){d=0;b.messages.totalMessages=b.messages.all.length;b.service.isFirstRetrieval||
ssc.cache.get(".ssc-tlpc ul").empty();for(a=0;a<b.messages.totalMessages;a++)t(b.messages.all[a]),null===b.messages.all[a].readDate&&d++;b.service.isFirstRetrieval&&null!==b.messages.oldestAutoPopupMessage&&C(b.messages.oldestAutoPopupMessage);b.messages.totalUnreadMessages=d;ssc.cache.get(".ssc-mc").innerHTML="";0===b.messages.totalMessages?ssc.cache.get(".ssc-wmc").addClass("ssc-hdn"):0===b.messages.totalUnreadMessages?ssc.cache.get(".ssc-mc").addClass("ssc-hdn"):(ssc.cache.get(".ssc-mc").removeClass("ssc-hdn"),
ssc.cache.get(".ssc-mc").html(b.messages.totalUnreadMessages));ssc.cache.get(".ssc-wmc").removeClass("ssc-hdn");ssc.cache.get(".ssc-wmd").hasClass("ssc-hdn")||ssc.cache.get(".ssc-wmd").addClass("ssc-hdn")}b.service.isFirstRetrieval=!1}}function t(a){var d,k,e,c,g,f,l;d=document.createElement("li");d.message=a;d.className="messagePreviewType"+a.previewTypeId;f=document.createElement("div");f.className="messageContainer";l=document.createElement("div");l.className="ssc-clear";2!==a.previewTypeId&&(k=
document.createElement("img"),k.src=a.thumbnailUrl);if(2===a.previewTypeId||3===a.previewTypeId)c=document.createElement("p"),c.className="ssc-wm-subject",c.innerHTML=a.subject,g=document.createElement("p"),g.className="ssc-wm-detail",g.innerHTML=a.description;e=document.createElement("p");e.className="ssc-wm-date";e.innerHTML=a.displayableDate;d.appendChild(e);2!==a.previewTypeId&&f.appendChild(k);if(2===a.previewTypeId||3===a.previewTypeId)f.appendChild(c),f.appendChild(g);f.appendChild(l);d.appendChild(f);
d.onclick=function(){switch(d.message.messageViewTypeId){case b.messageViewType.autoPopup:case b.messageViewType.clickPopup:C(d.message);break;case b.messageViewType.clickNewWindow:r(d.message,"_newtab");break;case b.messageViewType.sameWindow:r(d.message,"_self");break;case b.messageViewType.noFull:null===d.message.readDate&&ssc.services.webmessaging.setReadMessage(d.message,h)}};ssc.cache.get(".ssc-tlpc ul").appendChild(d)}function r(a,b){null===a.readDate&&ssc.services.webmessaging.setReadMessage(a,
h);window.open(a.templateUrl,b)}function C(a){ssc.cache.get("#ssc-modal-container").isVisible()&&ssc.services.webmessaging.recordAction(a,"close");var b="",b=-1==a.templateUrl.indexOf("?")?"?customerMessageId\x3d"+a.customerMessageId:"\x26customerMessageId\x3d"+a.customerMessageId;ssc.plugins.modal_popup.show({dimensions:{width:a.templateWidth,height:a.templateHeight},content:{body:{src:a.templateUrl+b}},controlsToAction:{closeButton:{cssSelector:".ssc-modal-close",event:"click",callback:D,callbackArgs:[a]}}});
null===a.readDate&&ssc.services.webmessaging.setReadMessage(a,h)}function D(a){null===a.readDate&&ssc.services.webmessaging.setReadMessage(a,h);ssc.services.webmessaging.recordAction(a,"close")}ssc.log.ENTER("Web Messaging Module");var b;ssc&&ssc.isHeaderLoaded&&(ssc.platform.getPlatformConfig("isLoggedIn")&&(u.prototype={constructor:u},b=ssc.services.webmessaging.initWebmessaging(),ssc.services.webmessaging.getMessagesData(h),ssc.cache.add(".ssc-wmc"),ssc.cache.add(".ssc-wm"),ssc.cache.add(".ssc-mc"),
ssc.cache.add(".ssc-wmd"),ssc.cache.add(".ssc-tlpc ul"),ssc.cache.add("#ssc-modal-container")),ssc.plugins.managed_tooltip.setTooltips({trigger:".ssc-wm",target:".ssc-wmd",toggleClass:"ssc-hdn",group:"header",hideTargetOnEvent:!0}));ssc.log.EXIT()}():setTimeout(t,300)})()});