function getIFObj(obj){var objRef;return document.all&&(objRef=eval("document.all."+obj)),document.getElementById&&(objRef=document.getElementById(obj)),objRef}function PmButtonHandler(){}function GameLobbyLaunchData(){this.dataElement=$("#pageContainer").data("GameLobbyLaunch")}function ExOvlControl(){this.shortGraphicMsg=null;this.longGraphicMsg=null;this.expOverlaySelector="#ovlMsg";this.expOverlayControl=$(this.expOverlaySelector);this.buttonHandler=new PmButtonHandler;this.isShortMsg=!0;this.overlayFadeDuration=750;this.closeGadget=null}function expandableOverlayInit(){thisExpControl===undefined&&(thisExpControl=new ExOvlControl,thisExpControl.closeGadget=thisExpControl.getExpOverlayElement("#dismiss"),thisExpControl.getExpOverlayElement(".baseButton").hover(thisExpControl.hoverHandlerIn,thisExpControl.hoverHandlerOut),thisExpControl.closeGadget.hover(thisExpControl.hoverHandlerIn,thisExpControl.hoverHandlerOut))}function OvlControl(){this.message=null;this.buttonHandler=new PmButtonHandler;this.overlaySelector="#ovlMsg";this.overlayControl=$(this.overlaySelector);this.layoutStyle={photo:"Photo",icon:"Icon",basic:"Basic",photoRegEx:/photo/i,iconRegEx:/icon/i};this.isWebMsgAlert=!1;this.defaultBodyHeight=118;this.defaultBodyTextHeight="auto";this.cssStyle={backgroundPosition:"background-position",height:"height",margin:"margin",marginTop:"margin-top",marginLeft:"margin-left",left:"left",top:"top",px:"px",minHeight:"min-height",envelopeHeightOffset:6};this.overlayFadeDuration=750;this.closeGadget=null;this.isPhoto=!1}function overlayControlInit(){thisOvlControl===undefined&&(thisOvlControl=new OvlControl)}function PmKeyValueCollection(){this.notExistIndex=-1;this.collection=[]}function PmPageProfile(){this.loginOrSession=0;this.areas=["0","10","11"];this.positions=new PmKeyValueCollection;this.gameGroupId="";this.gameId="";this.headerDropDownAvailable=!1}function PmMessageSchedule(n){var t=new Date;this.scheduledMessages=[];this.nextMsgDate=t.setHours(t.getHours()+24);this.nextMsg=null;this.timeoutID=-1;this.clearListener();this.positionId=n}function PmMessageCache(n){this.globalMessages=[];this.userMessages=[];this.scheduledMessages=new PmMessageSchedule(n);this.positionId=n}function PmPositionCache(){this.positions=[];this.positionPrefix="position_";this.scheduledMsgExpiredCallback="pmFramework.onScheduledMessage('{0}')"}function TbControl(){this.topLevelCtl="div[pmpositionid="+pmFramework.positionId.topBanner+"]";this.slideSpeed="slow"}function tbInitialise(){thisTbControl===undefined&&(thisTbControl=new TbControl,$("#TopBannerClose",thisTbControl.topLevelCtl).click(thisTbControl.closeUp))}function PmMessagingFramework(){this.pagePmPositionCache=new PmPositionCache;this.pageProfile=new PmPageProfile;this.pageProfileDiscovered=!1;this.pmData=null;this.positionId={overlay:1,overlayShort:2,overlayLong:3,topBanner:9,gameWindow:10,lobbyWindow:11,headerDropDown:12,overlayExpandable:13};this.areaId={all:0,home:1,section:2,selectedGame:3,allSections:8,promotionalPage:9,lobbyLaunch:10};this.customAttribs={positionId:"pmPositionId",areaId:"pmAreaId",gameSection:"pmGamesSectionId",gameId:"pmGameId",msgId:"pmmsgid",pushGraphicId:"pmpushgraphicid",isGlobal:"pmmsgisglobal",msgExpiry:"pmmsgexpiry"};this.gatewayApiTimeout=4e3;this.displayingExistingPopup=!1;this.impactId={na:0,normal:1,important:2,highImportance:3};this.headerType={fullLoad:"F",delta:"D"};this.messageAction={add:"A",update:"U",Delete:"D"};this.msgHandlerSelector="div["+this.customAttribs.positionId+"~='{0}']";this.mhrValues={global:1,highImportanceWebOnly:5,importantAnnouncement:6,pushGraphic:7,normalImportantWebOnly:8};this.gatewayServiceName={getGlobal:"getGlobalMessage.ashx",getUser:"getTargetedMessage.ashx",readUser:"updateMessage.ashx"};this.renderFailCode=-1;this.onPushMessageDataCalled=!1;this.additionalDataAttribs={highImportance:1,game:2,gameShown:3};this.showMsgDropDown=!1;this.isFirstLoadAfterLogin=!1;this.loginStatusChecked=!1;this.allowedLoggedInMessages=null;this.isDebug=!1;this.ttDebugInfo=!1;this.duringPageLoad=!1}function raiseError(n){typeof console=="object"&&console.log(n);pmFramework.isDebug&&(n.message!==undefined?$("#timeouts").append("Error Raised: "+n.message+"<br />line:"+n.lineNo+"<br />source:"+n.source+"<br />"):$("#timeouts").append("Error Raised: "+n+"<br />"))}function isNullOrUndefined(n){return n===undefined||n===null}function hasValue(n){return!isNullOrUndefined(n)&&(n.length!==undefined?n.length>0:!0)}function hasNonZeroValue(n){return hasValue(n)&&!isNaN(n)&&parseInt(n,10)!==0}function stringToInt(n){return typeof n=="string"?parseInt(n,10):n}function convertTimeSecsToMs(n){return hasNonZeroValue(n)?n*=1e3:n}function onPushMessageError(){raiseError("push messaging connection error - check service availability")}function onPushMessageData(n){var t,r,i,u,f;if(iboData===undefined){setTimeout(function(){onPushMessageData(n)},200);return}if(pmFramework.pmData=n,pmFramework.onPushMessageDataCalled=!0,pmFramework.duringPageLoad=!0,!pmFramework.loginStatusChecked&&(pmFramework.isFirstLoadAfterLogin=$("body").data("pageAttributes").IsFirstLoadAfterLogin=="True",pmFramework.isFirstLoadAfterLogin)){if(t="",pmFramework.pmData.messages!=null&&pmFramework.pmData.messages.length>0)for(r=0;r<pmFramework.pmData.messages.length;r++)i=pmFramework.pmData.messages[r],i.templates!=null&&i.templates.length>0&&(u=i.templates[0],u.rules!=null&&u.rules.length>0&&(f=u.rules[0],f.LS==0&&(t.length>0&&(t+=","),t+=i.MI)));t.length>0&&(pmFramework.allowedLoggedInMessages=t.split(","))}pmFramework.isDebug&&($("body").find("div#pmReceived").remove(),$("body").append('<div id="pmReceived"><span>Push Message(s) received:{0}<\/span><\/div>'.format(n.messages.length)));try{pmFramework.hasDataFlag()?setTimeout(function(){onPushMessageData(n)},6e3):(n.messages.length>0?pmFramework.processMessages(n):(pmFramework.discoverPositionsOnPage(),pmFramework.pageProfile.headerDropDownAvailable&&iboData.setMessageCount(0)),pmFramework.duringPageLoad=!1)}catch(e){raiseError(e)}pmFramework.loginStatusChecked=!0;bet365.PushMessageFramework.set(pmFramework)}function NewIboData(){this.messageHolder=$("#iboMessageHolder");this.messages=[];this.maxMessageCount=99;this.mailGlowIntervalId=0;this.notFoundIndex=-1;this.maxMsgChars=this.GetMaxMsgChars();this.effectDuration=250;this.mailGlowInterval=3e3}function newMessagesInitialise(){iboData===undefined&&(iboData=new NewIboData,$("#iboDismissImage").click(function(){$("#iboAnchor").fadeOut(this.effectDuration)}),iboData.setupMessageHover(),$("#iboSummary").hover(function(){$(this).removeClass("iboSummaryInactive").addClass("iboSummaryActive")},function(){$(this).removeClass("iboSummaryActive").addClass("iboSummaryInactive")}),$("#iboSummary").unbind("click").click(function(){$("#iboAnchor .RML").click()}),iboData.isIe6()&&($(".pngBackGround").each(function(){iboData.fixPngBack(this)}),$(".pngImage").each(function(){iboData.fixPng(this)})))}var bet365=bet365===undefined?{}:bet365,persistantExtraWindow=null,persistantSportsWindow=null,persistantHelpWindow=null,persistantGameWindow=null,persistantBingoWindow=null,persistantCasinoWindow=null,persistantAffWindow=null,persistantChatWindow=null,pmResolver,thisExpControl,thisOvlControl,thisTbControl,format,pmFramework,iboData,swfobject,__extends,ns_lo_event,ns_lo_core_event,ns_loReadit,ns_loReadit_message,ns_loReadit_details,ns_loReadit_events,ns_loReadit_util,ns_loReadit_methods,ns_loReadit_clients,PushMessaging,thirdPartyCookieCheckModalInfo;bet365.Navigation={};bet365.Navigation={PerformNavigation:function(n,t,i,r,u,f,e,o,s,h,c){"use strict";var y,p,w,v,l,a;if(y=!1,c!==null&&c.length>0){p=20;w=0;switch(u){case 4:v="height="+o+",width="+e+",status=yes,toolbar=yes,menubar=yes,location=yes,left="+p+",top="+w+",scrollbars=yes,resizable=yes";break;default:v="height="+o+",width="+e+",status=yes,toolbar=no,menubar=no,location=no,left="+p+",top="+w+",scrollbars=yes,resizable=yes"}if(u===1)window.location=c;else if(u===3)RedirectParentWindow(s,c,e,o);else switch(r){case 2:case 11:case 18:if(r===11?(l=persistantExtraWindow,a="persistantExtraWindow"):i==="MMM"?(l=persistantSportsWindow,a="persistantSportsWindow"):i==="AAA"?(l=persistantAffWindow,a="persistantAffWindow"):i==="CCC"?(l=persistantChatWindow,a="persistantChatWindow"):(l=persistantHelpWindow,a="persistantHelpWindow"),l!==null)try{l.close()}catch(b){}try{l=window.open(c,i,v)}catch(b){l=window.open(c,"_blank",v)}l!==null&&(r===11?persistantExtraWindow=l:i==="MMM"?persistantSportsWindow=l:i==="AAA"?persistantAffWindow=l:i==="CCC"?persistantChatWindow=l:persistantHelpWindow=l,setTimeout(a+".blur(); "+a+".focus();",500));break;case 5:case 6:bet365.games.CheckFlashAvailableAndLaunchGame(h,c,i,o,e,t);break;default:window.open(c,i,v)}}else y=!0;return y}},function(n,t){"use strict";function yt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||"function"!==r&&(0===t||"number"==typeof t&&t>0&&t-1 in n)}function rf(n){var t=ii[n]={};return i.each(n.match(o)||[],function(n,i){t[i]=!0}),t}function pi(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a="string"==typeof r,l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=w.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),("object"==typeof r||"function"==typeof r)&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],null==h&&(h=s[i.camelCase(r)])):h=s,h}}function wi(n,t,r){if(i.acceptData(n)){var e,o,h,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=(t in e)?[t]:t.split(" ")),o=0,h=t.length;h>o;o++)delete e[t[o]];if(!(r?pt:i.isEmptyObject)(e))return}(r||(delete u[f].data,pt(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function bi(n,r,u){if(u===t&&1===n.nodeType){var f="data-"+r.replace(nu,"-$1").toLowerCase();if(u=n.getAttribute(f),"string"==typeof u){try{u="true"===u?!0:"false"===u?!1:"null"===u?null:+u+""===u?+u:gr.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function pt(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function rt(){return!0}function p(){return!1}function ki(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function di(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if("string"==typeof t){var u=i.grep(n,function(n){return 1===n.nodeType});if(ae.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function gi(n){var i=eu.split("|"),t=n.createDocumentFragment();if(t.createElement)for(;i.length;)t.createElement(i.pop());return t}function uf(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function nr(n){var t=n.getAttributeNode("type");return n.type=(t&&t.specified)+"/"+n.type,n}function tr(n){var t=ke.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function wt(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function ir(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ff(n,t){var r,u,f;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}"script"===r&&t.text!==n.text?(nr(t).text=n.text,tr(t)):"object"===r?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===r&&si.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===r?t.defaultSelected=t.selected=n.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=n.defaultValue)}}function u(n,r){var o,e,s=0,f=n.getElementsByTagName!==t?n.getElementsByTagName(r||"*"):n.querySelectorAll!==t?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],o=n.childNodes||n;null!=(e=o[s]);s++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function ef(n){si.test(n.type)&&(n.defaultChecked=n.checked)}function rr(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=pu.length;i--;)if(t=pu[i]+r,t in n)return t;return u}function nt(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)}function ur(n,t){for(var r,f=[],u=0,e=n.length;e>u;u++)r=n[u],r.style&&(f[u]=i._data(r,"olddisplay"),t?(f[u]||"none"!==r.style.display||(r.style.display=""),""===r.style.display&&nt(r)&&(f[u]=i._data(r,"olddisplay",sr(r.nodeName)))):f[u]||nt(r)||i._data(r,"olddisplay",i.css(r,"display")));for(u=0;e>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?f[u]||"":"none"));return n}function fr(n,t,i){var r=ro.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function er(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+v[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+v[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+v[e]+"Width",!0,f))):(o+=i.css(n,"padding"+v[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+v[e]+"Width",!0,f)));return o}function or(n,t,r){var e=!0,u="width"===t?n.offsetWidth:n.offsetHeight,f=a(n),o=i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f);if(0>=u||null==u){if(u=l(n,t,f),(0>u||null==u)&&(u=n.style[t]),ht.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]);u=parseFloat(u)||0}return u+er(n,t,r||(o?"border":"content"),e,f)+"px"}function sr(n){var u=r,t=vu[n];return t||(t=hr(n,u),"none"!==t&&t||(tt=(tt||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(tt[0].contentWindow||tt[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=hr(n,u),tt.detach()),vu[n]=t),t}function hr(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function bt(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||oo.test(n)?u(n,i):bt(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)bt(n+"["+f+"]",t[f],r,u)}function cr(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(o)||[];if(i.isFunction(r))for(;u=e[f++];)"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function lr(n,r,u,f){function e(h){var c;return o[h]=!0,i.each(n[h]||[],function(n,i){var h=i(r,u,f);return"string"!=typeof h||s||o[h]?s?!(c=h):t:(r.dataTypes.unshift(h),e(h),!1)}),c}var o={},s=n===vi;return e(r.dataTypes[0])||!o["*"]&&e("*")}function kt(n,r){var u,f,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function of(n,i,r){var o,u,e,s,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);for(;"*"===f[0];)f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}return e?(e!==f[0]&&f.unshift(e),r[e]):t}function sf(n,t){var i,o,r,e,u={},h=0,s=n.dataTypes.slice(),f=s[0];if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if("*"!==r){if("*"!==f&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]])){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function ar(){try{return new n.XMLHttpRequest}catch(t){}}function hf(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function vr(){return setTimeout(function(){g=t}),g=i.now()}function cf(n,t){i.each(t,function(t,i){for(var u=(it[t]||[]).concat(it["*"]),r=0,f=u.length;f>r;r++)if(u[r].call(n,t,i))return})}function yr(n,t,r){var h,e,o=0,l=vt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=g||vr(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:g||vr(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(lf(s,u.opts.specialEasing);l>o;o++)if(h=vt[o].call(u,n,s,u.opts))return h;return cf(u,s),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function lf(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function af(n,t,r){var o,u,a,w,s,v,l,f,b,h=this,e=n.style,y={},p=[],c=n.nodeType&&nt(n);r.queue||(f=i._queueHooks(n,"fx"),null==f.unqueued&&(f.unqueued=0,b=f.empty.fire,f.empty.fire=function(){f.unqueued||b()}),f.unqueued++,h.always(function(){h.always(function(){f.unqueued--;i.queue(n,"fx").length||f.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(r.overflow=[e.overflow,e.overflowX,e.overflowY],"inline"===i.css(n,"display")&&"none"===i.css(n,"float")&&(i.support.inlineBlockNeedsLayout&&"inline"!==sr(n.nodeName)?e.zoom=1:e.display="inline-block"));r.overflow&&(e.overflow="hidden",i.support.shrinkWrapBlocks||h.done(function(){e.overflow=r.overflow[0];e.overflowX=r.overflow[1];e.overflowY=r.overflow[2]}));for(o in t)if(a=t[o],yo.exec(a)){if(delete t[o],v=v||"toggle"===a,a===(c?"hide":"show"))continue;p.push(o)}if(w=p.length)for(s=i._data(n,"fxshow")||i._data(n,"fxshow",{}),("hidden"in s)&&(c=s.hidden),v&&(s.hidden=!c),c?i(n).show():h.done(function(){i(n).hide()}),h.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])}),o=0;w>o;o++)u=p[o],l=h.createTween(u,c?s[u]:0),y[u]=s[u]||i.style(n,u),u in s||(s[u]=l.start,c&&(l.end=l.start,l.start="width"===u||"height"===u?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function ut(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=v[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function pr(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var wr,ft,r=n.document,vf=n.location,yf=n.jQuery,pf=n.$,et={},w=[],dt="1.9.0",br=w.concat,gt=w.push,h=w.slice,kr=w.indexOf,wf=et.toString,ni=et.hasOwnProperty,ti=dt.trim,i=function(n,t){return new i.fn.init(n,t,wr)},ot=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,o=/\S+/g,bf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,kf=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,dr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,df=/^[\],:{}\s]*$/,gf=/(?:^|:|,)(?:\s*\[)+/g,ne=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,te=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ie=/^-ms-/,re=/-([\da-z])/gi,ue=function(n,t){return t.toUpperCase()},st=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",st,!1),i.ready()):"complete"===r.readyState&&(r.detachEvent("onreadystatechange",st),i.ready())},ii,gr,nu,yi,ct,k,d,tf,lt;i.fn=i.prototype={jquery:dt,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if("string"==typeof n){if(e="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:kf.exec(n),!e||!e[1]&&u)return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n);if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),dr.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(n){return null==n?this.toArray():0>n?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:gt,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var o,e,u,r,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for("boolean"==typeof n&&(c=n,n=arguments[1]||{},f=2),"object"==typeof n||i.isFunction(n)||(n={}),l===f&&(n=this,--f);l>f;f++)if(null!=(o=arguments[f]))for(e in o)u=n[e],r=o[e],n!==r&&(c&&r&&(i.isPlainObject(r)||(s=i.isArray(r)))?(s?(s=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({noConflict:function(t){return n.$===i&&(n.$=pf),t&&n.jQuery===i&&(n.jQuery=yf),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(ft.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?et[wf.call(n)]||"object":typeof n},isPlainObject:function(n){if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!ni.call(n,"constructor")&&!ni.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}for(var r in n);return r===t||ni.call(n,r)},isEmptyObject:function(n){for(var t in n)return!1;return!0},error:function(n){throw Error(n);},parseHTML:function(n,t,u){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(u=t,t=!1);t=t||r;var f=dr.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(r){return n.JSON&&n.JSON.parse?n.JSON.parse(r):null===r?r:"string"==typeof r&&(r=i.trim(r),r&&df.test(r.replace(ne,"@").replace(te,"]").replace(gf,"")))?Function("return "+r)():(i.error("Invalid JSON: "+r),t)},parseXML:function(r){var u,f;if(!r||"string"!=typeof r)return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ie,"ms-").replace(re,ue)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=yt(n);if(i){if(e)for(;f>r&&(u=t.apply(n[r],i),u!==!1);r++);else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e)for(;f>r&&(u=t.call(n[r],r,n[r]),u!==!1);r++);else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:ti&&!ti.call("﻿ ")?function(n){return null==n?"":ti.call(n)}:function(n){return null==n?"":(n+"").replace(bf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(yt(Object(n))?i.merge(r,"string"==typeof n?[n]:n):gt.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(kr)return kr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if("number"==typeof f)for(;f>r;r++)n[u++]=i[r];else for(;i[r]!==t;)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;e>r;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=yt(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),null!=u&&(f[f.length]=u);return br.apply([],f)},guid:1,proxy:function(n,r){var f,e,u;return"string"==typeof r&&(f=n[r],r=n,n=f),i.isFunction(n)?(e=h.call(arguments,2),u=function(){return n.apply(r||this,e.concat(h.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u):t},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=null==u;if("object"===i.type(u)){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;l>h;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return(new Date).getTime()}});i.ready.promise=function(t){if(!ft)if(ft=i.Deferred(),"complete"===r.readyState)setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",st,!1),n.addEventListener("load",i.ready,!1);else{r.attachEvent("onreadystatechange",st);n.attachEvent("onload",i.ready);var u=!1;try{u=null==n.frameElement&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}i.ready()}}()}return ft.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){et["[object "+t+"]"]=t.toLowerCase()});wr=i(r);ii={};i.Callbacks=function(n){n="string"==typeof n?ii[n]||rf(n):i.extend({},n);var f,c,o,l,s,e,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,e=l||0,l=0,s=r.length,o=!0;r&&s>e;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}o=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);"function"===e?n.unique&&h.has(f)||r.push(f):f&&f.length&&"string"!==e&&u(f)})})(arguments);o?s=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),o&&(s>=u&&s--,e>=u&&e--)}),this},has:function(n){return i.inArray(n,r)>-1},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],!r||c&&!u||(o?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var o,c,s,t=0,u=h.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),l=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?h.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}};if(r>1)for(o=Array(r),c=Array(r),s=Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(l(t,s,u)).fail(f.reject).progress(l(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.support=function(){var f,s,o,h,c,e,l,a,y,v,u=r.createElement("div");if(u.setAttribute("className","t"),u.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",s=u.getElementsByTagName("*"),o=u.getElementsByTagName("a")[0],!s||!o||!s.length)return{};h=r.createElement("select");c=h.appendChild(r.createElement("option"));e=u.getElementsByTagName("input")[0];o.style.cssText="top:1px;float:left;opacity:.5";f={getSetAttribute:"t"!==u.className,leadingWhitespace:3===u.firstChild.nodeType,tbody:!u.getElementsByTagName("tbody").length,htmlSerialize:!!u.getElementsByTagName("link").length,style:/top/.test(o.getAttribute("style")),hrefNormalized:"/a"===o.getAttribute("href"),opacity:/^0.5/.test(o.style.opacity),cssFloat:!!o.style.cssFloat,checkOn:!!e.value,optSelected:c.selected,enctype:!!r.createElement("form").enctype,html5Clone:"<:nav><\/:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===r.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};e.checked=!0;f.noCloneChecked=e.cloneNode(!0).checked;h.disabled=!0;f.optDisabled=!c.disabled;try{delete u.test}catch(p){f.deleteExpando=!1}e=r.createElement("input");e.setAttribute("value","");f.input=""===e.getAttribute("value");e.value="t";e.setAttribute("type","radio");f.radioValue="t"===e.value;e.setAttribute("checked","t");e.setAttribute("name","t");l=r.createDocumentFragment();l.appendChild(e);f.appendChecked=e.checked;f.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked;u.attachEvent&&(u.attachEvent("onclick",function(){f.noCloneEvent=!1}),u.cloneNode(!0).click());for(v in{submit:!0,change:!0,focusin:!0})u.setAttribute(a="on"+v,"t"),f[v+"Bubbles"]=a in n||u.attributes[a].expando===!1;return u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,i(function(){var o,e,i,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(o=r.createElement("div"),o.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(o).appendChild(u),u.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",i=u.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",y=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",f.reliableHiddenOffsets=y&&0===i[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",f.boxSizing=4===u.offsetWidth,f.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,n.getComputedStyle&&(f.pixelPosition="1%"!==(n.getComputedStyle(u,null)||{}).top,f.boxSizingReliable="4px"===(n.getComputedStyle(u,null)||{width:"4px"}).width,e=u.appendChild(r.createElement("div")),e.style.cssText=u.style.cssText=h,e.style.marginRight=e.style.width="0",u.style.width="1px",f.reliableMarginRight=!parseFloat((n.getComputedStyle(e,null)||{}).marginRight)),u.style.zoom!==t&&(u.innerHTML="",u.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",f.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="<div><\/div>",u.firstChild.style.width="5px",f.shrinkWrapBlocks=3!==u.offsetWidth,s.style.zoom=1),s.removeChild(o),o=u=i=e=null)}),s=h=l=c=o=e=null,f}();gr=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;nu=/([A-Z])/g;i.extend({cache:{},expando:"jQuery"+(dt+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!pt(n)},data:function(n,t,i){return pi(n,t,i,!1)},removeData:function(n,t){return wi(n,t,!1)},_data:function(n,t,i){return pi(n,t,i,!0)},_removeData:function(n,t){return wi(n,t,!0)},acceptData:function(n){var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var e,f,u=this[0],o=0,s=null;if(n===t){if(this.length&&(s=i.data(u),1===u.nodeType&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;e.length>o;o++)f=e[o].name,f.indexOf("data-")||(f=i.camelCase(f.substring(5)),bi(u,f,s[f]));i._data(u,"parsedAttrs",!0)}return s}return"object"==typeof n?this.each(function(){i.data(this,n)}):i.access(this,function(r){return r===t?u?bi(u,n,i.data(u,n)):null:(this.each(function(){i.data(this,n,r)}),t)},null,r,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,r,u){var f;return n?(r=(r||"fx")+"queue",f=i._data(n,r),u&&(!f||i.isArray(u)?f=i._data(n,r,i.makeArray(u)):f.push(u)),f||[]):t},dequeue:function(n,t){t=t||"fx";var f=i.queue(n,t),e=f.length,r=f.shift(),u=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===r&&(r=f.shift(),e--);u.cur=r;r&&("fx"===t&&f.unshift("inprogress"),delete u.stop,r.call(n,o,u));!e&&u&&u.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,r){var u=2;return"string"!=typeof n&&(r=n,n="fx",u--),u>arguments.length?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);"fx"===n&&"inprogress"!==t[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var b,tu,ri=/[\t\r\n]/g,fe=/\r/g,ee=/^(?:input|select|textarea|button|object)$/i,oe=/^(?:a|area)$/i,iu=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ui=/^(?:checked|selected)$/i,c=i.support.getSetAttribute,fi=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,s,f=0,h=this.length,c="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(o)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ri," "):" ")){for(s=0;u=e[s++];)0>r.indexOf(" "+u+" ")&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,t,r,u,s,f=0,h=this.length,c=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(o)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ri," "):"")){for(s=0;u=e[s++];)for(;r.indexOf(" "+u+" ")>=0;)r=r.replace(" "+u+" "," ");t.className=n?i.trim(r):""}return this},toggleClass:function(n,t){var r=typeof n,u="boolean"==typeof t;return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if("string"===r)for(var f,h=0,s=i(this),e=t,c=n.match(o)||[];f=c[h++];)e=u?e:!s.hasClass(f),s[e?"addClass":"removeClass"](f);else("undefined"===r||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(ri," ").indexOf(i)>=0)return!0;return!1},val:function(n){var r,u,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);1===this.nodeType&&(f=e?n.call(this,u,o.val()):n,null==f?f="":"number"==typeof f?f+="":i.isArray(f)&&(f=i.map(f,function(n){return null==n?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t?u:(u=f.value,"string"==typeof u?u.replace(fe,""):null==u?"":u)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u="select-one"===n.type||0>r,s=u?null:[],h=u?r+1:o.length,f=0>r?h:u?r:0;h>f;f++)if(t=o[f],!(!t.selected&&f!==r||(i.support.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attr:function(n,r,u){var f,e,o,s=n.nodeType;if(n&&3!==s&&8!==s&&2!==s)return n.getAttribute===t?i.prop(n,r,u):(o=1!==s||!i.isXMLDoc(n),o&&(r=r.toLowerCase(),e=i.attrHooks[r]||(iu.test(r)?tu:b)),u===t?e&&o&&"get"in e&&null!==(f=e.get(n,r))?f:(n.getAttribute!==t&&(f=n.getAttribute(r)),null==f?t:f):null!==u?e&&o&&"set"in e&&(f=e.set(n,u,r))!==t?f:(n.setAttribute(r,u+""),u):(i.removeAttr(n,r),t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(o);if(f&&1===n.nodeType)for(;r=f[e++];)u=i.propFix[r]||r,iu.test(r)?!c&&ui.test(r)?n[i.camelCase("default-"+r)]=n[u]=!1:n[u]=!1:i.attr(n,r,""),n.removeAttribute(c?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&"radio"===t&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&3!==o&&8!==o&&2!==o)return s=1!==o||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&null!==(e=f.get(n,r))?e:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):ee.test(n.nodeName)||oe.test(n.nodeName)&&n.href?0:t}}}});tu={get:function(n,r){var u=i.prop(n,r),f="boolean"==typeof u&&n.getAttribute(r),e="boolean"==typeof u?fi&&c?null!=f:ui.test(r)?n[i.camelCase("default-"+r)]:!!f:n.getAttributeNode(r);return e&&e.value!==!1?r.toLowerCase():t},set:function(n,t,r){return t===!1?i.removeAttr(n,r):fi&&c||!ui.test(r)?n.setAttribute(!c&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};fi&&c||(i.attrHooks.value={get:function(n,r){var u=n.getAttributeNode(r);return i.nodeName(n,"input")?n.defaultValue:u&&u.specified?u.value:t},set:function(n,r,u){return i.nodeName(n,"input")?(n.defaultValue=r,t):b&&b.set(n,r,u)}});c||(b=i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&("id"===i||"name"===i||"coords"===i?""!==r.value:r.specified)?r.value:t},set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="","value"===r||i===n.getAttribute(r)?i:t}},i.attrHooks.contenteditable={get:b.get,set:function(n,t,i){b.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{set:function(n,i){return""===i?(n.setAttribute(r,"auto"),i):t}})}));i.support.hrefNormalized||(i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return null==i?t:i}})}),i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}}));i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}));i.support.enctype||(i.propFix.enctype="encoding");i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return null===n.getAttribute("value")?"on":n.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,r){return i.isArray(r)?n.checked=i.inArray(i(n).val(),r)>=0:t}})});var ei=/^(?:input|select|textarea)$/i,se=/^key/,he=/^(?:mouse|contextmenu)|click/,ru=/^(?:focusinfocus|focusoutblur)$/,uu=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var y,c,w,p,b,l,h,a,s,k,d,v=3!==n.nodeType&&8!==n.nodeType&&i._data(n);if(v){for(u.handler&&(y=u,u=y.handler,e=y.selector),u.guid||(u.guid=i.guid++),(p=v.events)||(p=v.events={}),(c=v.handle)||(c=v.handle=function(n){return i===t||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(c.elem,arguments)},c.elem=n),r=(r||"").match(o)||[""],b=r.length;b--;)w=uu.exec(r[b])||[],s=d=w[1],k=(w[2]||"").split(".").sort(),h=i.event.special[s]||{},s=(e?h.delegateType:h.bindType)||s,h=i.event.special[s]||{},l=i.extend({type:s,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},y),(a=p[s])||(a=p[s]=[],a.delegateCount=0,h.setup&&h.setup.call(n,f,k,c)!==!1||(n.addEventListener?n.addEventListener(s,c,!1):n.attachEvent&&n.attachEvent("on"+s,c))),h.add&&(h.add.call(n,l),l.handler.guid||(l.handler.guid=u.guid)),e?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[s]=!0;n=null}},remove:function(n,t,r,u,f){var y,b,h,a,p,s,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(o)||[""],p=t.length;p--;)if(h=uu.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)s=l[y],!f&&k!==s.origType||r&&r.guid!==s.guid||h&&!h.test(s.namespace)||u&&u!==s.selector&&("**"!==u||!s.selector)||(l.splice(y,1),s.selector&&l.delegateCount--,c.remove&&c.remove.call(n,s));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var p,h,c,w,a,v,l,b=[e||r],s=u.type||u,y=u.namespace?u.namespace.split("."):[];if(h=c=e=e||r,3!==e.nodeType&&8!==e.nodeType&&!ru.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(y=s.split("."),s=y.shift(),y.sort()),a=0>s.indexOf(":")&&"on"+s,u=u[i.expando]?u:new i.Event(s,"object"==typeof u&&u),u.isTrigger=!0,u.namespace=y.join("."),u.namespace_re=u.namespace?RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=null==f?[u]:i.makeArray(f,[u]),l=i.event.special[s]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(w=l.delegateType||s,ru.test(w+s)||(h=h.parentNode);h;h=h.parentNode)b.push(h),c=h;c===(e.ownerDocument||r)&&b.push(c.defaultView||c.parentWindow||n)}for(p=0;(h=b[p++])&&!u.isPropagationStopped();)u.type=p>1?w:l.bindType||s,v=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),v&&v.apply(h,f),v=a&&h[a],v&&i.acceptData(h)&&v.apply&&v.apply(h,f)===!1&&u.preventDefault();if(u.type=s,!(o||u.isDefaultPrevented()||l._default&&l._default.apply(e.ownerDocument,f)!==!1||"click"===s&&i.nodeName(e,"a")||!i.acceptData(e)||!a||!e[s]||i.isWindow(e))){c=e[a];c&&(e[a]=null);i.event.triggered=s;try{e[s]()}catch(k){}i.event.triggered=t;c&&(e[a]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,s,e,u,r,c=[],l=h.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(l[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(c=i.event.handlers.call(this,n,a),o=0;(u=c[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,l),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var o,f,e,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||"click"!==n.type))for(;u!=this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==n.type){for(f=[],o=0;h>o;o++)s=r[o],e=s.selector+" ",f[e]===t&&(f[e]=s.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(s);f.length&&c.push({elem:u,handlers:f})}return r.length>h&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var f,e,t=n,u=i.event.fixHooks[n.type]||{},o=u.props?this.props.concat(u.props):this.props;for(n=new i.Event(t),f=o.length;f--;)e=o[f],n[e]=t[e];return n.target||(n.target=t.srcElement||r),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,u.filter?u.filter(n,t):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var o,u,f,e=i.button,s=i.fromElement;return null==n.pageX&&null!=i.clientX&&(o=n.target.ownerDocument||r,u=o.documentElement,f=o.body,n.pageX=i.clientX+(u&&u.scrollLeft||f&&f.scrollLeft||0)-(u&&u.clientLeft||f&&f.clientLeft||0),n.pageY=i.clientY+(u&&u.scrollTop||f&&f.scrollTop||0)-(u&&u.clientTop||f&&f.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=1&e?1:2&e?3:4&e?2:0),n}},special:{load:{noBubble:!0},click:{trigger:function(){return i.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){return this===r.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,i,r){var u="on"+i;n.detachEvent&&(n[u]===t&&(n[u]=null),n.detachEvent(u,r))};i.Event=function(n,r){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?rt:p):this.type=n,r&&i.extend(this,r),this.timeStamp=n&&n.timeStamp||i.now(),this[i.expando]=!0,t):new i.Event(n,r)};i.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=rt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=rt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=rt;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:(i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))}),t)},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:(i.event.remove(this,"._submit"),t)}});i.support.changeBubbles||(i.event.special.change={setup:function(){return ei.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):(i.event.add(this,"beforeactivate._change",function(n){var t=n.target;ei.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))}),t)},handle:function(n){var i=n.target;return this!==i||n.isSimulated||n.isTrigger||"radio"!==i.type&&"checkbox"!==i.type?n.handleObj.handler.apply(this,arguments):t},teardown:function(){return i.event.remove(this,"._change"),!ei.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){0==u++&&r.addEventListener(n,f,!0)},teardown:function(){0==--u&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var o,s;if("object"==typeof n){"string"!=typeof r&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(null==u&&null==f?(f=r,u=r=t):null==f&&("string"==typeof r?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=p;else if(!f)return this;return 1===e&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"==typeof n){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||"function"==typeof r)&&(u=r,r=t),u===!1&&(u=p),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,r){var u=this[0];return u?i.event.trigger(n,r,u,!0):t},hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)};se.test(t)&&(i.event.fixHooks[t]=i.event.keyHooks);he.test(t)&&(i.event.fixHooks[t]=i.event.mouseHooks)}),function(n,t){function bt(n){return er.test(n+"")}function kt(){var n,t=[];return n=function(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}}function c(n){return n[f]=!0,n}function p(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}}function u(n,t,i,r){var y,u,e,c,p,v,w,h,k,b;if((t?t.ownerDocument||t:d)!==s&&it(t),t=t||s,i=i||[],!n||"string"!=typeof n)return i;if(1!==(c=t.nodeType)&&9!==c)return[];if(!l&&!r){if(y=or.exec(n))if(e=y[1]){if(9===c){if(u=t.getElementById(e),!u||!u.parentNode)return i;if(u.id===e)return i.push(u),i}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(e))&&ut(t,u)&&u.id===e)return i.push(u),i}else{if(y[2])return ft.apply(i,et.call(t.getElementsByTagName(n),0)),i;if((e=y[3])&&o.getByClassName&&t.getElementsByClassName)return ft.apply(i,et.call(t.getElementsByClassName(e),0)),i}if(o.qsa&&!a.test(n)){if(w=!0,h=f,k=t,b=9===c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(v=ot(n),(w=t.getAttribute("id"))?h=w.replace(cr,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",p=v.length;p--;)v[p]=h+st(v[p]);k=ei.test(n)&&t.parentNode||t;b=v.join(",")}if(b)try{return ft.apply(i,et.call(k.querySelectorAll(b),0)),i}catch(g){}finally{w||t.removeAttribute("id")}}}return gi(n.replace(pt,"$1"),t,i,r)}function oi(n,t){for(var i=n&&t&&n.nextSibling;i;i=i.nextSibling)if(i===t)return-1;return n?1:-1}function wi(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function bi(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function k(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ot(n,t){var e,f,s,o,i,h,c,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ir.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[]));e=!1;(f=rr.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(pt," ")}),i=i.slice(e.length));for(o in r.filter)(f=wt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function st(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function dt(n,t,i){var r=t.dir,u=i&&"parentNode"===t.dir,e=nr++;return t.first?function(t,i,f){for(;t=t[r];)if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var h,s,c,l=v+" "+e;if(o){for(;t=t[r];)if((1===t.nodeType||u)&&n(t,i,o))return!0}else for(;t=t[r];)if(1===t.nodeType||u)if(c=t[f]||(t[f]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ct)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,o)||ct,s[1]===!0)return!0}}function gt(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ht(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ni(n,t,i,r,u,e){return r&&!r[f]&&(r=ni(r)),u&&!u[f]&&(u=ni(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||di(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?b:ht(b,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=ht(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?ui.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=ht(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):ft.apply(e,h)})}function ti(n){for(var s,u,i,o=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=dt(function(n){return n===s},c,!0),a=dt(function(n){return ui.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==at)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>t;t++)if(u=r.relative[n[t].type])e=[dt(gt(e),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[f]){for(i=++t;o>i&&!r.relative[n[i].type];i++);return ni(t>1&&gt(e),t>1&&st(n.slice(0,t-1)).replace(pt,"$1"),u,i>t&&ti(n.slice(t,i)),o>i&&ti(n=n.slice(i)),o>i&&st(n))}e.push(u)}return gt(e)}function ki(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var p,b,k,w=[],d=0,y="0",g=o&&[],nt=null!=a,tt=at,rt=o||e&&r.find.TAG("*",a&&h.parentNode||h),it=v+=null==tt?1:Math.E;for(nt&&(at=h!==s&&h,ct=f);null!=(p=rt[y]);y++){if(e&&p){for(b=0;k=n[b];b++)if(k(p,h,c)){l.push(p);break}nt&&(v=it,ct=++f)}i&&((p=!k&&p)&&d--,o&&g.push(p))}if(d+=y,i&&y!==d){for(b=0;k=t[b];b++)k(g,w,h,c);if(o){if(d>0)for(;y--;)g[y]||w[y]||(w[y]=tr.call(l));w=ht(w)}ft.apply(l,w);nt&&!o&&w.length>0&&d+t.length>1&&u.uniqueSort(l)}return nt&&(v=it,at=tt),g};return i?c(o):o}function di(n,t,i){for(var r=0,f=t.length;f>r;r++)u(n,t[r],i);return i}function gi(n,t,i,u){var e,f,o,h,c,s=ot(n);if(!u&&1===s.length){if(f=s[0]=s[0].slice(0),f.length>2&&"ID"===(o=f[0]).type&&9===t.nodeType&&!l&&r.relative[f[1].type]){if(t=r.find.ID(o.matches[0].replace(w,b),t)[0],!t)return i;n=n.slice(f.shift().value.length)}for(e=wt.needsContext.test(n)?-1:f.length-1;e>=0&&(o=f[e],!r.relative[h=o.type]);e--)if((c=r.find[h])&&(u=c(o.matches[0].replace(w,b),ei.test(f[0].type)&&t.parentNode||t))){if(f.splice(e,1),n=u.length&&st(f),!n)return ft.apply(i,et.call(u,0)),i;break}}return ii(n,s)(u,t,l,i,ei.test(n)),i}function si(){}var nt,ct,r,lt,hi,ii,tt,at,it,s,h,l,a,rt,vt,ut,ri,f="sizzle"+-new Date,d=n.document,o={},v=0,nr=0,ci=kt(),li=kt(),ai=kt(),y=typeof t,vi=-2147483648,yt=[],tr=yt.pop,ft=yt.push,et=yt.slice,ui=yt.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},e="[\\x20\\t\\r\\n\\f]",g="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=g.replace("w","w#"),pi="\\["+e+"*("+g+")"+e+"*(?:([*^$|!~]?=)"+e+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+yi+")|)|)"+e+"*\\]",fi=":("+g+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+pi.replace(3,8)+")*)|.*)\\)|)",pt=RegExp("^"+e+"+|((?:^|[^\\\\])(?:\\\\.)*)"+e+"+$","g"),ir=RegExp("^"+e+"*,"+e+"*"),rr=RegExp("^"+e+"*([\\x20\\t\\r\\n\\f>+~])"+e+"*"),ur=RegExp(fi),fr=RegExp("^"+yi+"$"),wt={ID:RegExp("^#("+g+")"),CLASS:RegExp("^\\.("+g+")"),NAME:RegExp("^\\[name=['\"]?("+g+")['\"]?\\]"),TAG:RegExp("^("+g.replace("w","w*")+")"),ATTR:RegExp("^"+pi),PSEUDO:RegExp("^"+fi),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+e+"*(even|odd|(([+-]|)(\\d*)n|)"+e+"*(?:([+-]|)"+e+"*(\\d+)|))"+e+"*\\)|)","i"),needsContext:RegExp("^"+e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+e+"*((?:-\\d)?\\d*)"+e+"*\\)|)(?=[^-]|$)","i")},ei=/[\x20\t\r\n\f]*[+~]/,er=/\{\s*\[native code\]\s*\}/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,cr=/'|\\/g,lr=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,w=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,b=function(n,t){var i="0x"+t-65536;return i!==i?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(55296|i>>10,56320|1023&i)};try{et.call(h.childNodes,0)[0].nodeType}catch(ar){et=function(n){for(var t,i=[];t=this[n];n++)i.push(t);return i}}hi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};it=u.setDocument=function(n){var i=n?n.ownerDocument||n:d;return i!==s&&9===i.nodeType&&i.documentElement?(s=i,h=i.documentElement,l=hi(i),o.tagNameNoComments=p(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),o.attributes=p(function(n){n.innerHTML="<select><\/select>";var t=typeof n.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),o.getByClassName=p(function(n){return n.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",n.getElementsByClassName&&n.getElementsByClassName("e").length?(n.lastChild.className="e",2===n.getElementsByClassName("e").length):!1}),o.getByName=p(function(n){n.id=f+0;n.innerHTML="<a name='"+f+"'><\/a><div name='"+f+"'><\/div>";h.insertBefore(n,h.firstChild);var t=i.getElementsByName&&i.getElementsByName(f).length===2+i.getElementsByName(f+0).length;return o.getIdNotName=!i.getElementById(f),h.removeChild(n),t}),r.attrHandle=p(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild&&typeof n.firstChild.getAttribute!==y&&"#"===n.firstChild.getAttribute("href")})?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},o.getIdNotName?(r.find.ID=function(n,t){if(typeof t.getElementById!==y&&!l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){return n.getAttribute("id")===t}}):(r.find.ID=function(n,i){if(typeof i.getElementById!==y&&!l){var r=i.getElementById(n);return r?r.id===n||typeof r.getAttributeNode!==y&&r.getAttributeNode("id").value===n?[r]:t:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){var i=typeof n.getAttributeNode!==y&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=o.tagNameNoComments?function(n,i){return typeof i.getElementsByTagName!==y?i.getElementsByTagName(n):t}:function(n,t){var i,r=[],u=0,f=t.getElementsByTagName(n);if("*"===n){for(;i=f[u];u++)1===i.nodeType&&r.push(i);return r}return f},r.find.NAME=o.getByName&&function(n,i){return typeof i.getElementsByName!==y?i.getElementsByName(name):t},r.find.CLASS=o.getByClassName&&function(n,i){return typeof i.getElementsByClassName===y||l?t:i.getElementsByClassName(n)},rt=[],a=[":focus"],(o.qsa=bt(i.querySelectorAll))&&(p(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||a.push("\\["+e+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");n.querySelectorAll(":checked").length||a.push(":checked")}),p(function(n){n.innerHTML="<input type='hidden' i=''/>";n.querySelectorAll("[i^='']").length&&a.push("[*^$]="+e+"*(?:\"\"|'')");n.querySelectorAll(":enabled").length||a.push(":enabled",":disabled");n.querySelectorAll("*,:x");a.push(",.*:")})),(o.matchesSelector=bt(vt=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&p(function(n){o.disconnectedMatch=vt.call(n,"div");vt.call(n,"[s!='']:x");rt.push("!=",fi)}),a=RegExp(a.join("|")),rt=RegExp(rt.join("|")),ut=bt(h.contains)||h.compareDocumentPosition?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)for(;t=t.parentNode;)if(t===n)return!0;return!1},ri=h.compareDocumentPosition?function(n,t){var r;return n===t?(tt=!0,0):(r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t))?1&r||n.parentNode&&11===n.parentNode.nodeType?n===i||ut(d,n)?-1:t===i||ut(d,t)?1:0:4&r?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(n===t)return tt=!0,0;if(n.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||vi)-(ut(d,n)&&~n.sourceIndex||vi);if(!o||!s)return n===i?-1:t===i?1:o?-1:s?1:0;if(o===s)return oi(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);for(;f[u]===e[u];)u++;return u?oi(f[u],e[u]):f[u]===d?-1:e[u]===d?1:0},tt=!1,[0,0].sort(ri),o.detectDuplicates=tt,s):s};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&it(n),t=t.replace(lr,"='$1']"),!(!o.matchesSelector||l||rt&&rt.test(t)||a.test(t)))try{var i=vt.call(n,t);if(i||o.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(r){}return u(t,s,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==s&&it(n),ut(n,t)};u.attr=function(n,t){var i;return(n.ownerDocument||n)!==s&&it(n),l||(t=t.toLowerCase()),(i=r.attrHandle[t])?i(n):l||o.attributes?n.getAttribute(t):((i=n.getAttributeNode(t))||n.getAttribute(t))&&n[t]===!0?t:i&&i.specified?i.value:null};u.error=function(n){throw Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=1,i=0;if(tt=!o.detectDuplicates,n.sort(ri),tt){for(;r=n[t];t++)r===n[t-1]&&(i=u.push(t));for(;i--;)n.splice(u[i],1)}return n};lt=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=lt(n)}else if(3===t||4===t)return n.nodeValue}else for(;r=n[u];u++)i+=lt(r);return i};r=u.selectors={cacheLength:50,createPseudo:c,match:wt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(w,b),n[3]=(n[4]||n[5]||"").replace(w,b),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return wt.CHILD.test(n[0])?null:(n[4]?n[2]=n[4]:t&&ur.test(t)&&(i=ot(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){return"*"===n?function(){return!0}:(n=n.replace(w,b).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=ci[n+" "];return t||(t=RegExp("(^|"+e+")"+n+"("+e+"|$)"))&&ci(n,function(n){return t.test(n.className||typeof n.getAttribute!==y&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.substr(f.length-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.substr(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){for(;b;){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else for(;(c=++y&&c&&c[b]||(l=y=0)||w.pop())&&((e?c.nodeName.toLowerCase()!==g:1!==c.nodeType)||!++l||(d&&((c[f]||(c[f]={}))[n]=[v,l]),c!==t)););return l-=u,l===r||0==l%r&&l/r>=0}}},PSEUDO:function(n,t){var e,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[f]?i(t):i.length>1?(e=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=ui.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,e)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=ii(n.replace(pt,"$1"));return t[f]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||lt(t)).indexOf(n)>-1}}),lang:c(function(n){return fr.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(w,b).toLowerCase(),function(t){var i;do if(i=l?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===h},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||3===n.nodeType||4===n.nodeType)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||t.toLowerCase()===n.type)},first:k(function(){return[0]}),last:k(function(n,t){return[t-1]}),eq:k(function(n,t,i){return[0>i?i+t:i]}),even:k(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:k(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:k(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:k(function(n,t,i){for(var r=0>i?i+t:i;t>++r;)n.push(r);return n})}};for(nt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[nt]=wi(nt);for(nt in{submit:!0,reset:!0})r.pseudos[nt]=bi(nt);ii=u.compile=function(n,t){var r,u=[],e=[],i=ai[n+" "];if(!i){for(t||(t=ot(n)),r=t.length;r--;)i=ti(t[r]),i[f]?u.push(i):e.push(i);i=ai(n,ki(e,u))}return i};r.pseudos.nth=r.pseudos.eq;r.filters=si.prototype=r.pseudos;r.setFilters=new si;it();u.attr=i.attr;i.find=u;i.expr=u.selectors;i.expr[":"]=i.expr.pseudos;i.unique=u.uniqueSort;i.text=u.getText;i.isXMLDoc=u.isXML;i.contains=u.contains}(n);var ce=/Until$/,le=/^(?:parents|prev(?:Until|All))/,ae=/^.[^:#\[\.,]*$/,fu=i.expr.match.needsContext,ve={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r,u;if("string"!=typeof n)return u=this,this.pushStack(i(n).filter(function(){for(t=0;u.length>t;t++)if(i.contains(u[t],this))return!0}));for(r=[],t=0;this.length>t;t++)i.find(n,this[t],r);return r=this.pushStack(i.unique(r)),r.selector=(this.selector?this.selector+" ":"")+n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(di(this,n,!1))},filter:function(n){return this.pushStack(di(this,n,!0))},is:function(n){return!!n&&("string"==typeof n?fu.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fu.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&11!==r.nodeType;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r="string"==typeof n?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.fn.andSelf=i.fn.addBack;i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ki(n,"nextSibling")},prev:function(n){return ki(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return ce.test(n)||(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),f=this.length>1&&!ve[n]?i.unique(f):f,this.length>1&&le.test(n)&&(f=f.reverse()),this.pushStack(f)}});i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),1===t.length?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&9!==f.nodeType&&(u===t||1!==f.nodeType||!i(f).is(u));)1===f.nodeType&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});var eu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ye=/ jQuery\d+="(?:null|\d+)"/g,ou=RegExp("<(?:"+eu+")[\\s/>]","i"),oi=/^\s+/,su=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,hu=/<([\w:]+)/,cu=/<tbody/i,pe=/<|&#?\w+;/,we=/<(?:script|style|link)/i,si=/^(?:checkbox|radio)$/i,be=/checked\s*(?:[^=]|=\s*.checked.)/i,lu=/^$|\/(?:java|ecma)script/i,ke=/^true\/(.*)/,de=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ge=gi(r),hi=ge.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(n,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=0;null!=(r=this[f]);f++)(!n||i.filter(n,[r]).length>0)&&(t||1!==r.nodeType||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&wt(u(r,"script")),r.parentNode.removeChild(r)));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return 1===r.nodeType?r.innerHTML.replace(ye,""):t;if(!("string"!=typeof n||we.test(n)||!i.support.htmlSerialize&&ou.test(n)||!i.support.leadingWhitespace&&oi.test(n)||e[(hu.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(su,"<$1><\/$2>");try{for(;o>f;f++)r=this[f]||{},1===r.nodeType&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){var t=i.isFunction(n);return t||"string"==typeof n||(n=i(n).not(this).detach()),this.domManip([n],!0,function(n){var t=this.nextSibling,r=this.parentNode;(r&&1===this.nodeType||11===this.nodeType)&&(i(this).remove(),t?t.parentNode.insertBefore(n,t):r.appendChild(n))})},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,f){n=br.apply([],n);var s,c,h,l,e,y,o=0,a=this.length,w=this,b=a-1,v=n[0],p=i.isFunction(v);if(p||!(1>=a||"string"!=typeof v||i.support.checkClone)&&be.test(v))return this.each(function(i){var u=w.eq(i);p&&(n[0]=v.call(this,i,r?u.html():t));u.domManip(n,r,f)});if(a&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),c=s.firstChild,1===s.childNodes.length&&(s=c),c)){for(r=r&&i.nodeName(c,"tr"),h=i.map(u(s,"script"),nr),l=h.length;a>o;o++)e=s,o!==b&&(e=i.clone(e,!0,!0),l&&i.merge(h,u(e,"script"))),f.call(r&&i.nodeName(this[o],"table")?uf(this[o],"tbody"):this[o],e,o);if(l)for(y=h[h.length-1].ownerDocument,i.map(h,tr),o=0;l>o;o++)e=h[o],lu.test(e.type||"")&&!i._data(e,"globalEval")&&i.contains(y,e)&&(e.src?i.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.globalEval((e.text||e.textContent||e.innerHTML||"").replace(de,"")));s=c=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),gt.apply(f,u.get());return this.pushStack(f)}});i.extend({clone:function(n,t,r){var f,s,h,e,o,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!ou.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(hi.innerHTML=n.outerHTML,hi.removeChild(o=hi.firstChild)),!(i.support.noCloneEvent&&i.support.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=u(o),s=u(n),e=0;null!=(h=s[e]);++e)f[e]&&ff(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;null!=(h=s[e]);e++)ir(h,f[e]);else ir(n,o);return f=u(o,"script"),f.length>0&&wt(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var w,o,y,s,l,p,h,b=n.length,a=gi(t),c=[],v=0;b>v;v++)if(o=n[v],o||0===o)if("object"===i.type(o))i.merge(c,o.nodeType?[o]:o);else if(pe.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(hu.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(su,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&oi.test(o)&&c.push(t.createTextNode(oi.exec(o)[0])),!i.support.tbody)for(o="table"!==y||cu.test(o)?"<table>"!==l[1]||cu.test(o)?0:s:s.firstChild,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),ef),v=0;o=c[v++];)if((!f||-1===i.inArray(o,f))&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&wt(s),r))for(h=0;o=s[h++];)lu.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,r){for(var e,f,u,o,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;null!=(u=n[c]);c++)if((r||i.acceptData(u))&&(f=u[s],e=f&&h[f])){if(e.events)for(o in e.events)a[o]?i.event.remove(u,o):i.removeEvent(u,o,e.handle);h[f]&&(delete h[f],l?delete u[s]:u.removeAttribute!==t?u.removeAttribute(s):u[s]=null,w.push(f))}}});var l,a,tt,ci=/alpha\([^)]*\)/i,no=/opacity\s*=\s*([^)]*)/,to=/^(top|right|bottom|left)$/,io=/^(none|table(?!-c[ea]).+)/,au=/^margin/,ro=RegExp("^("+ot+")(.*)$","i"),ht=RegExp("^("+ot+")(?!px)[a-z%]+$","i"),uo=RegExp("^([+-])=("+ot+")","i"),vu={BODY:"block"},fo={position:"absolute",visibility:"hidden",display:"block"},yu={letterSpacing:0,fontWeight:400},v=["Top","Right","Bottom","Left"],pu=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(e=a(n),o=r.length;o>f;f++)s[r[f]]=i.css(n,r[f],!1,e);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return ur(this,!0)},hide:function(){return ur(this)},toggle:function(n){var t="boolean"==typeof n;return this.each(function(){(t?n:nt(this))?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=l(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=rr(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u===t)return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r];if(s=typeof u,"string"===s&&(o=uo.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),!(null==u||"number"===s&&isNaN(u)||("number"!==s||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||""!==u||0!==r.indexOf("background")||(c[r]="inherit"),e&&"set"in e&&(u=e.set(n,u,f))===t)))try{c[r]=u}catch(l){}}},css:function(n,r,u,f){var e,h,o,s=i.camelCase(r);return r=i.cssProps[s]||(i.cssProps[s]=rr(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=l(n,r,f)),"normal"===e&&r in yu&&(e=yu[r]),u?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}});n.getComputedStyle?(a=function(t){return n.getComputedStyle(t,null)},l=function(n,r,u){var s,h,c,o=u||a(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(""!==e||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),ht.test(e)&&au.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(a=function(n){return n.currentStyle},l=function(n,i,r){var s,e,o,h=r||a(n),u=h?h[i]:t,f=n.style;return null==u&&f&&f[i]&&(u=f[i]),ht.test(u)&&!to.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left="fontSize"===i?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),""===u?"auto":u});i.each(["height","width"],function(n,r){i.cssHooks[r]={get:function(n,u,f){return u?0===n.offsetWidth&&io.test(i.css(n,"display"))?i.swap(n,fo,function(){return or(n,r,f)}):or(n,r,f):t},set:function(n,t,u){var f=u&&a(n);return fr(n,t,u?er(n,r,u,i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f),f):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return no.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(ci,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=ci.test(f)?f.replace(ci,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,r){return r?i.swap(n,{display:"inline-block"},l,[n,"marginRight"]):t}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,r){i.cssHooks[r]={get:function(n,u){return u?(u=l(n,r),ht.test(u)?i(n).position()[r]+"px":u):t}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return 0===n.offsetWidth&&0===n.offsetHeight||!i.support.reliableHiddenOffsets&&"none"===(n.style&&n.style.display||i.css(n,"display"))},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+v[r]+t]=u[r]||u[r-2]||u[0];return f}};au.test(n)||(i.cssHooks[n+t].set=fr)});var eo=/%20/g,oo=/\[\]$/,wu=/\r?\n/g,so=/^(?:submit|button|image|reset)$/i,ho=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&ho.test(this.nodeName)&&!so.test(n)&&(this.checked||!si.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(wu,"\r\n")}}):{name:t.name,value:r.replace(wu,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():null==t?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)bt(u,n[u],r,e);return f.join("&").replace(eo,"+")};var y,s,li=i.now(),ai=/\?/,co=/#.*$/,bu=/([?&])_=[^&]*/,lo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ao=/^(?:GET|HEAD)$/,vo=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,du=i.fn.load,gu={},vi={},nf="*/".concat("*");try{s=vf.href}catch(bo){s=r.createElement("a");s.href="";s=s.href}y=ku.exec(s.toLowerCase())||[];i.fn.load=function(n,r,u){if("string"!=typeof n&&du)return du.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&"object"==typeof r&&(s="POST"),e.length>0&&i.ajax({url:n,type:s,dataType:"html",data:r}).done(function(n){h=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,h||[n.responseText,t,n])}),this};i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}});i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:s,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(y[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?kt(kt(n,i.ajaxSettings),t):kt(i.ajaxSettings,n)},ajaxPrefilter:cr(gu),ajaxTransport:cr(vi),ajax:function(n,r){function w(n,r,o,s){var l,b,w,rt,y,a=r;2!==h&&(h=2,g&&clearTimeout(g),v=t,d=s||"",f.readyState=n>0?4:0,o&&(rt=of(u,f,o)),n>=200&&300>n||304===n?(u.ifModified&&(y=f.getResponseHeader("Last-Modified"),y&&(i.lastModified[e]=y),y=f.getResponseHeader("etag"),y&&(i.etag[e]=y)),304===n?(l=!0,a="notmodified"):(l=sf(u,rt),a=l.state,b=l.data,w=l.error,l=!w)):(w=a,(n||!a)&&(a="error",0>n&&(n=0))),f.status=n,f.statusText=(r||a)+"",l?tt.resolveWith(c,[b,a,f]):tt.rejectWith(c,[f,a,w]),f.statusCode(k),k=t,p&&nt.trigger(l?"ajaxSuccess":"ajaxError",[f,u,l?b:w]),it.fireWith(c,[f,a]),p&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(r=n,n=t);r=r||{};var v,e,d,b,g,l,p,a,u=i.ajaxSetup({},r),c=u.context||u,nt=u.context&&(c.nodeType||c.jquery)?i(c):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),k=u.statusCode||{},rt={},ut={},h=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(2===h){if(!b)for(b={};t=lo.exec(d);)b[t[1].toLowerCase()]=t[2];t=b[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===h?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return h||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return h||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>h)for(t in n)k[t]=[k[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return v&&v.abort(t),w(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||s)+"").replace(co,"").replace(vo,y[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(o)||[""],null==u.crossDomain&&(l=ku.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===y[1]&&l[2]===y[2]&&(l[3]||("http:"===l[1]?80:443))==(y[3]||("http:"===y[1]?80:443)))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),lr(gu,u,r,f),2===h)return f;p=u.global;p&&0==i.active++&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!ao.test(u.type);e=u.url;u.hasContent||(u.data&&(e=u.url+=(ai.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=bu.test(e)?e.replace(bu,"$1_="+li++):e+(ai.test(e)?"&":"?")+"_="+li++));u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e]));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+nf+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(c,f,u)===!1||2===h))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(v=lr(vi,u,r,f)){f.readyState=1;p&&nt.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{h=1;v.send(rt,w)}catch(et){if(!(2>h))throw et;w(-1,et)}}else w(-1,"No Transport");return f},getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script");u.async=!0;n.scriptCharset&&(u.charset=n.scriptCharset);u.src=n.url;u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))};f.insertBefore(u,f.firstChild)},abort:function(){u&&u.onload(t,!0)}}}});yi=[];ct=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=yi.pop()||i.expando+"_"+li++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(ct.test(r.url)?"url":"string"==typeof r.data&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&ct.test(r.data)&&"data");return h||"jsonp"===r.dataTypes[0]?(e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(ct,"$1"+e):r.jsonp!==!1&&(r.url+=(ai.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,yi.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"):t});tf=0;lt=n.ActiveXObject&&function(){for(var n in k)k[n](t,!0)};i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&ar()||hf()}:ar;d=i.ajaxSettings.xhr();i.support.cors=!!d&&"withCredentials"in d;d=i.support.ajax=!!d;d&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,v,c,l;try{if(u&&(f||4===o.readyState))if(u=t,h&&(o.onreadystatechange=i.noop,lt&&delete k[h]),f)4!==o.readyState&&o.abort();else{c={};s=o.status;l=o.responseXML;v=o.getAllResponseHeaders();l&&l.documentElement&&(c.xml=l);"string"==typeof o.responseText&&(c.text=o.responseText);try{a=o.statusText}catch(p){a=""}s||!r.isLocal||r.crossDomain?1223===s&&(s=204):s=c.text?200:404}}catch(y){f||e(-1,y)}c&&e(s,a,c,v)};r.async?4===o.readyState?setTimeout(u):(h=++tf,lt&&(k||(k={},i(n).unload(lt)),k[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var g,at,yo=/^(?:toggle|show|hide)$/,po=RegExp("^(?:([+-])=|)("+ot+")([a-z%]*)$","i"),wo=/queueHooks$/,vt=[af],it={"*":[function(n,t){var o,s,r=this.createTween(n,t),e=po.exec(t),h=r.cur(),u=+h||0,f=1,c=20;if(e){if(o=+e[2],s=e[3]||(i.cssNumber[n]?"":"px"),"px"!==s&&u){u=i.css(r.elem,n,!0)||o||1;do f=f||".5",u/=f,i.style(r.elem,n,u+s);while(f!==(f=r.cur()/h)&&1!==f&&--c)}r.unit=s;r.start=u;r.end=e[1]?u+(e[1]+1)*o:o}return r}]};i.Animation=i.extend(yr,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],it[r]=it[r]||[],it[r].unshift(t)},prefilter:function(n,t){t?vt.unshift(n):vt.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var r,t=f.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,"auto"),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ut(t,!0),n,i,u)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(nt).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=yr(this,i.extend({},n),e);f.finish=function(){t.stop(!0)};(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&wo.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){var u,n=i.timers,r=0;for(g=i.now();n.length>r;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop();g=t};i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()};i.fx.interval=13;i.fx.start=function(){at||(at=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(at);at=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],o=u&&u.ownerDocument;if(o)return r=o.documentElement,i.contains(r,u)?(u.getBoundingClientRect!==t&&(f=u.getBoundingClientRect()),e=pr(o),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}):f};i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");"static"===f&&(n.style.position="relative");var e,o,s=i(n),h=s.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=("absolute"===f||"fixed"===f)&&i.inArray("auto",[l,a])>-1,u={},c={};v?(c=s.position(),e=c.top,o=c.left):(e=parseFloat(l)||0,o=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,h));null!=t.top&&(u.top=t.top-h.top+e);null!=t.left&&(u.left=t.left-h.left+o);"using"in t?t.using.call(n,u):s.css(u)}};i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.documentElement;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||r.documentElement})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=pr(n);return e===t?o?r in o?o[r]:o.document.documentElement[f]:n[f]:(o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e,t)},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||"boolean"!=typeof f),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:9===r.nodeType?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});n.jQuery=n.$=i;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})}(window);bet365=bet365||{};bet365.Page=bet365.Page||{};bet365.games=bet365.games||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.flash=bet365.cmsCore.flash||{};bet365.cmsCore.leaderboards=bet365.cmsCore.leaderboards||{};bet365.cmsCore.Login=bet365.cmsCore.Login||{};bet365.cmsCore.Optin=bet365.cmsCore.Optin||{};bet365.cmsCore.AnchorLinks=bet365.cmsCore.AnchorLinks||{};$(document).ready(function(){"use strict";function t(){bet365.cmsCore.popups.showDialog("div.realitycheck","#000000");bet365.cmsCore.buttons.ApplyConsistentButtonsWidths($("div.realitycheck .buttons-container a"));$("#popupmask").unbind("click")}function i(){bet365.cmsCore.popups.hideDialog("div.realitycheck")}bet365.cmsCore.Session.LogoutIfRequired();var n=bet365.cmsCore.getPageAttributes($);bet365.cmsCore.enableLoggingIfRequired(n);bet365.cmsCore.ImportantAnnouncement.SetupLinks($);bet365.cmsCore.InactivityWarning.SetupLinks($);bet365.cmsCore.InactivityWarning.PollInactivityTime($);n&&n.handleLogout||bet365.cmsCore.Session.SetupLogOutLink();bet365.cmsCore.Session.SessionMonitor.start();bet365.cmsCore.Login.SetupPasswordFieldToggle();bet365.cmsCore.Login.SetupLoginSubmitOnEnterKeypress();$(".responsive-header").length===0&&(bet365.cmsCore.DropDowns.SetupLanguageSelector(),bet365.cmsCore.DropDowns.SetupServicesSelector(),bet365.cmsCore.DropDowns.SetupBalanceSelector());bet365.cmsCore.SlidingPanel.SetupLinks($);setInterval(function(){bet365.cmsCore.UpdateClock()},1e3);bet365.cmsCore.Optin.ConfigureOptin();bet365.cmsCore.sessionPoller&&bet365.cmsCore.sessionPoller.start($);bet365.cmsCore.RealityCheck&&bet365.cmsCore.RealityCheck.SetupRealityCheck&&(bet365.cmsCore.RealityCheck.GetTimeWhenPageLoaded(),bet365.cmsCore.RealityCheck.SetupRealityCheck(null,t,i));bet365.cmsCore.AnchorLinks.SetupLinks($);bet365.cmsCore.Optin.processAutomaticOptIn(window.location.href)});$(window).load(function(){bet365.cmsCore.overlayBanners.setupBanner()});bet365.games={CheckFlashAvailableAndLaunchGame:function(n,t,i,r,u,f){var o=bet365.Screen.GetScreenWidth(),s=bet365.Screen.GetScreenTop(),e,h;if(f=="False"){if(persistantGameWindow!=null)try{persistantGameWindow.close()}catch(c){}e=null;try{e=window.open(t,i,"height="+r+",width="+u+",status=yes,toolbar=no,menubar=no,location=no,left="+o+",top="+s+",scrollbars=yes,resizable=yes")}catch(c){e=window.open(t,"_blank","height="+r+",width="+u+",status=yes,toolbar=no,menubar=no,location=no,left="+o+",top="+s+",scrollbars=yes,resizable=yes")}persistantGameWindow=e;persistantGameWindow!=null&&(h=bet365.cmsCore.GetBrowser(),h=="IE8"?setTimeout(function(){persistantGameWindow.focus()},500):setTimeout(function(){persistantGameWindow.blur();persistantGameWindow.focus()},500))}else window.open(t,i,"height="+r+",width="+u+",status=yes,toolbar=no,menubar=no,location=no,left="+o+",top="+s+",scrollbars=yes,resizable=yes");return!1}};bet365.GetBrowser=function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("chrome")!=-1?"CHROME":n.indexOf("opera")!=-1?"OPERA":n.indexOf("netscape")!=-1?n.indexOf("msie")!=-1?"IE":"NETSCAPE":n.indexOf("firefox")!=-1?"FIREFOX":n.indexOf("chrome")!=-1?"CHROME":n.indexOf("safari")!=-1?"SAFARI":n.indexOf("msie 6")!=-1?"IE6":n.indexOf("msie 8.")!=-1?"IE8":n.indexOf("msie 10.")!=-1?"IE10":n.indexOf("trident")!==-1&&n.indexOf("rv:11")!==-1?"IE11":n.indexOf("msie 7")!=-1?"IE7":n.indexOf("msie")!=-1?"IE":"IE*"};bet365.Screen={Top:function(n){return screen.height/2-n.height()},Left:function(n){return($(document).width()-n.width())/2},VerticalCentre:function(n){n.css("left",bet365.Screen.Left(n)+"px");n.css("top",bet365.Screen.Top(n)+"px")},GetScreenRes:function(){var n=screen.height;switch(bet365.GetBrowser()){case"OPERA":return n*.7;case"NETSCAPE":return n-200;case"IE":return n-250;case"IE6":return n-250;case"FIREFOX":return n-250;case"IE8":return n-250}},GetScreenWidth:function(){var n=screen.width;return n=n-n*.9,Math.round(n)},GetScreenTop:function(){var n=screen.height;return n=n-n*.88,Math.round(n)},ResizeCurrentWindowForGame:function(n,t){var f=bet365.GetBrowser(),u,r,e,i;try{f=="CHROME"?window.resizeTo(n+10,t+63):(window.resizeTo(n,t),u=0,r=0,typeof innerWidth=="number"?(u=window.innerWidth,r=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(u=document.documentElement.clientWidth,r=document.documentElement.clientHeight,r=r+16):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(u=document.body.clientWidth,r=document.body.clientHeight),e=n-u,i=t-r,f=="IE7"?(i=i+15,window.resizeTo(n+e-18,t+i)):f=="IE"||f=="IE6"?(i=i+14,window.resizeTo(n+e,t+i+2)):window.resizeTo(n+e,t+i))}catch(o){return!1}}};bet365.PushMessageFramework=function(){var n;return{set:function(t){n=t},get:function(){return n},isAvailable:function(){return n!=undefined}}}();bet365.CheckType=function(n){var t="";if(n!=undefined)switch(n.constructor){case String:t="String";break;case Object:t="Object";break;case Array:t="Array";break;case Function:t="Function";break;case Number:t="Number";break;case Boolean:t="Boolean"}return t};bet365.Page.LogTrackingEvent=function(){};bet365.cmsCore.getPageAttributes=function(n){"use strict";return n("body").data("pageAttributes")};bet365.cmsCore.enableLoggingIfRequired=function(n){"use strict";bet365.cmsCore.log&&n&&n.enableJavascriptLogging&&bet365.cmsCore.log.enable()};bet365.cmsCore.getQueryString=function(n){var i,r,t,u;if(n.indexOf("?")>=0){for(i=n.split("?")[1].split("&"),r=[],t=0;t<i.length;t++)u=i[t].split("="),r.push({name:u[0],value:u[1]});return r}return[]};bet365.cmsCore.getValueFromQueryString=function(n,t){for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i].value;return""};bet365.cmsCore.AnchorLinks={SetupLinks:function(n){"use strict";n(".AnchorLink").click(function(){var t=this.getAttribute("data-target");n("html, body").animate({scrollTop:n("*[data-anchor-target="+t+"]").offset().top},1e3)})}};bet365.cmsCore.ImportantAnnouncement={SetupLinks:function(n){"use strict";n("div.AnnouncementText a").click(function(n){var t,f,r,u,i,e;return n.preventDefault(),t=this.getAttribute("href"),f=this.getAttribute("ia-popup"),r=this.getAttribute("ia-width"),u=this.getAttribute("ia-height"),i=this.getAttribute("ia-language"),i&&!isNaN(parseInt(i,10))&&(t=t.indexOf("?")>-1?t+"&lng="+parseInt(i):t+"?lng="+parseInt(i)),f&&r&&u?(e="height="+u+",width="+r+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes",window.open(t,"ImportantAnnouncementPopup",e)):window.location=t,!1});n("a.CloseAnnouncements").click(function(t){return t.preventDefault(),n.ajax({type:"POST",url:"/ImportantAnnouncement/SetAsViewed",contentType:"application/json; charset=utf-8",dataType:"json",data:"",async:!0,success:function(t){t===!0&&n("div.ImportantAnnouncementOuterContainer").slideUp(800)}}),!1})}};bet365.cmsCore.InactivityWarning={SetupLinks:function(n){"use strict";n("input#InactivitySessionExpiry").length>0&&(n("div.InactivityWarningDialog a.RemainLoggedInButton").click(function(t){return t.preventDefault(),bet365.cmsCore.Session.KeepSessionAlive(n,n("input#InactivitySessionTimestamp")[0].value,n("input#InactivitySessionHashValue")[0].value,n("input#InactivitySessionTimeoutDuration")[0].value),!1}),n("div.InactivityWarningDialog a.LogOutButton").click(function(n){return n.preventDefault(),bet365.cmsCore.InactivityWarning.LogOut(),!1}),n("div.InactivityWarningDialog div.ChangeSettingLink a").click(function(){bet365.cmsCore.Session.KeepSessionAlive(n,n("input#InactivitySessionTimestamp")[0].value,n("input#InactivitySessionHashValue")[0].value,n("input#InactivitySessionTimeoutDuration")[0].value)}))},PollInactivityTime:function(n){"use strict";if(n("input#InactivitySessionExpiry").length>0)var t=n.Deferred(),i=setInterval(function(){if(t.done(function(){clearInterval(i)}),n("input#InactivitySessionExpiry").length>0){var u=new Date(n("input#InactivitySessionExpiry")[0].value),r=new Date(n(".clock-container .time").data("date"));r>u-6e4&&bet365.cmsCore.Session.CheckSessionValid(n,n("input#InactivitySessionTimestamp")[0].value,n("input#InactivitySessionHashValue")[0].value,n("input#InactivitySessionTimeoutDuration")[0].value,r,t)}},1e3)},ShowAlert:function(n,t){"use strict";n("div.realitycheck").is(":visible")&&bet365.cmsCore.RealityCheck.HideRealityCheck();bet365.cmsCore.popups.showDialog("div.InactivityWarningDialog",null,null,null,null,2e4);t.resolve();setTimeout(function(){n("div.InactivityWarningDialog").is(":visible")&&window.location.reload()},63e3)},HideAlert:function(n){"use strict";bet365.cmsCore.popups.hideDialog("div.InactivityWarningDialog");bet365.cmsCore.InactivityWarning.PollInactivityTime(n)},LogOut:function(){"use strict";bet365.cmsCore.Session.LogOut()}};bet365.cmsCore.Session={KeepSessionAlive:function(n,t,i,r){"use strict";var u={timeStamp:t.toString(),hashValue:i.toString(),timeoutDuration:parseInt(r)};n.ajax({type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,url:"/SessionActivity/KeepAlive",data:JSON.stringify(u),success:function(t){t!=null?(n("input#InactivitySessionExpiry").val(t.newExpiryTime),n("input#InactivitySessionTimestamp").val(t.newTimestamp),n("input#InactivitySessionHashValue").val(t.newHash),n("input#InactivitySessionTimeoutDuration").val(t.newTimeoutDuration),bet365.cmsCore.InactivityWarning.HideAlert(n)):bet365.cmsCore.Session.LogOut()},error:function(){bet365.cmsCore.Session.LogOut()}})},CheckSessionValid:function(n,t,i,r,u,f){"use strict";var e={timeStamp:t.toString(),hashValue:i.toString(),timeoutDuration:parseInt(r)};n.ajax({type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,url:"/SessionActivity/CheckSessionValid",data:JSON.stringify(e),success:function(t){if(t!=null)if(t.showMessage){var i,r,e,o=new Date(u.valueOf()+6e4);i=o.getHours();r=o.getMinutes();e=o.getSeconds();n("span#InactivityLogoutTime").text((i<10?"0"+i:i)+":"+(r<10?"0"+r:r)+":"+(e<10?"0"+e:e));bet365.cmsCore.InactivityWarning.ShowAlert(n,f)}else t.lastActivity<0?(f.resolve(),bet365.cmsCore.Session.OnLoggedOutSession()):(n("input#InactivitySessionExpiry")[0].value=t.newExpiryTime,n("input#InactivitySessionTimestamp")[0].value=t.newTimestamp,n("input#InactivitySessionHashValue")[0].value=t.newHash)},error:function(){return!1}})},OnLoggedOutSession:function(){window.location.reload()},LogoutIfRequired:function(){window.location.href.indexOf("logout=1")>0&&bet365.cmsCore.Session.LogOut()},LogOut:function(){bet365.cmsCore.Session.LogOutHandler(function(){for(var r,u,t=window.location.search.replace("?","").split("&"),i=[],n=0;n<t.length;n++)t[n]!==""&&t[n].toLowerCase()!=="logout=1"&&i.push(t[n]);r=window.location.protocol+"//"+window.location.hostname+window.location.pathname;u=i.length>0?"?"+i.join("&"):"";window.location=r+u},!0)},LogOutWithoutRefresh:function(){bet365.cmsCore.Session.LogOutHandler(null,!0)},LogOutHandler:function(n,t){var i=bet365.cmsCore.getPageAttributes($);i&&i.enableManualMembersLogOut&&$("<iframe>",{src:i.membersLogOutUrl,style:"display:none"}).appendTo("body");$.ajax({type:"POST",url:"/SessionActivity/LogOut",contentType:"application/json; charset=utf-8",dataType:"json",async:t||!0,complete:function(){n&&n()}})},SetupLogOutLink:function(){$("div.HeaderWrapper a.LogOut").click(function(n){return n.preventDefault(),bet365.cmsCore.Session.LogOut(),!1})},SessionMonitor:{cookieName:"bet365_OpenAccount_Session",interval:null,cookiePattern:null,start:function(){var t=new Date,n,i;t=new Date(t.getTime()+108e5);n=this.cookieName+"=True;";n+="expires="+t.toGMTString()+";";n+="path=/";document.cookie=n;this.cookiePattern=new RegExp("(^|; )"+this.cookieName+"=True");i=this;this.interval=setInterval(function(){i.check()},1e3)},check:function(){var n=document.cookie;this.cookiePattern.test(n)||(clearInterval(this.interval),document.cookie=this.cookieName+"=;expires="+(new Date).toGMTString()+";path=/",window.location.reload())}}};bet365.cmsCore.Login={InProgress:function(n){var t,i=$(n),r=i.data("inprogressspinnerurl");i.addClass("logging-in");r&&(t=$('<img class="spinner" />'),t.attr("src",r),t.appendTo(i))},CreateLoginProcess:function(n,t,i,r,u,f){var o,e;return e=$(f).closest("form"),$.ajax({type:"POST",data:{TargetUrl:t.toString(),AdditionalItems:i.toString(),Validate:r.toString(),SourceId:u.toString()},async:!1,url:n,success:function(n){o=bet365.cmsCore.Login.ProcessAjaxData(n,e);bet365.cmsCore.Login.SubmitCredentials(e)},error:function(){}}),o},ProcessAjaxData:function(n,t){var r,i;if(n!==null&&n.length>0){if(r=t.find(".txtSTKN").get(0),r!==null&&n.indexOf(",")===-1)return r.value=n,!0;if(r!==null&&n.indexOf(",")!==-1&&(r.value=n.substring(0,n.indexOf(",")),t.find(".txtTKN")!==null)){if(t.find(".txtTKN").value=n.substring(n.indexOf(",")+1),i=t.find(".txtType"),i!==null)switch(i.val()){case"2":i.val("21");break;case"3":i.val("22");break;case"4":i.val("24");break;case"5":i.val("25");break;case"6":i.val("23")}return!0}}return!1},ConcatenateOriginalAndAdditionalQueryStringParameters:function(n,t){var i=$(".txtAdditionalItems",$(n).closest("form")).val();return!i||!i.length?t:!t||!t.length?i:t+"&"+i},SetupPasswordFieldToggle:function(){$(".LoginPanel, .LoginBox").each(function(){var n=this;$(".passwordTogglefocus",n).show();$(".passwordToggle",n).hide();$(".passwordTogglefocus",n).focus(function(){$(this).hide();$(".passwordToggle",n).show().focus()});$(".passwordToggle",n).blur(function(){$(this).val()===""?($(this).hide(),$(".passwordTogglefocus",n).show(),$(this).removeClass("hasValue")):$(this).addClass("hasValue")});$(".textToggle").each(function(){bet365.cmsCore.Login.TextBoxTextToggle($(this),$(this).val())})})},TextBoxTextToggle:function(n,t){n.focus(function(){n.val()===t&&n.val("")}).blur(function(){n.val()===""?(n.val(t),n.removeClass("hasValue")):n.val()!==""&&n.val()!==t&&n.addClass("hasValue")})},SetupLoginSubmitOnEnterKeypress:function(){$(".LoginPanel:not(.LoginPanelNoSubmit)").on("keypress",'input[type!="hidden"]',function(n){n.which===13&&$("a.aGo",n.delegateTarget).click()})},SetPasswordHiddenField:function(n){var i=n.find(".protectedP").val(),t=encodeURIComponent(i);n.find(".protectedP").val(t);n.find(".txtPassword").val(t)},SubmitCredentials:function(n){return bet365.cmsCore.Login.SetPasswordHiddenField(n),n.find(".loginSubmit, .submitButton").click()}};bet365.cmsCore.popups={previousBackgroundColour:"",showDialog:function(n,t,i,r,u,f){var s=bet365.GetBrowser(),e,o,h,c;t==undefined&&(t="white");i==undefined&&(i=.4);r==undefined&&(r=700);u==undefined&&(u="#popupmask");f==undefined&&(f=9999);bet365.cmsCore.popups.previousBackgroundColour=$(u).css("background-color");e=$(n);o=$(document).height();u=="#popupmask"?(s=="IE6"||s=="IE7"?(e.css("position","absolute"),$(u).css("position","absolute")):(e.css("position","fixed"),$(u).css("position","fixed")),h="100%",$(u).css({width:h,height:o,"background-color":t,"z-index":f,top:"0px",left:"0px"})):$(u).css({height:o,"background-color":t,"z-index":f});bet365.cmsCore.popups.centreDialog(n);$(window).resize(function(){bet365.cmsCore.popups.centreDialog(n)});e.resize(function(){bet365.cmsCore.popups.centreDialog(n)});e.css("z-index",1e4);e.stop(!0,!0).fadeTo(r,1,function(){e.css("opacity","");$("input[type!='hidden'][tabindex='1']:not(.nojs)",n).focus()});c=$(u);$(u).fadeTo(r,i)},keepTabWithinPopup:function(n,t){$(t).keydown(function(t){t.which===9&&(t.preventDefault(),$(n).focus())})},showDialogWithFocus:function(n,t,i,r,u){bet365.cmsCore.popups.showDialog(n,t,i,r,u);var f=1;$("input[type!='hidden'], a",n).each(function(){$(this).attr("tabindex",f);f++});$(".divLoggedPanel input[type!='hidden']",".aGo").each(function(){$(this).attr("tabindex",$(this).attr("tabindex")+10)})},hideDialog:function(n,t,i){t==undefined&&(t="slow");i==undefined&&(i="#popupmask");$(i).css("background-color",bet365.cmsCore.popups.previousBackgroundColour);$(n).hide();$(i).stop(!0,!0).fadeTo(t,0).css("display","none");n=="#KYCIFrame"&&bet365.cmsCore.overlayBanners.setupBanner()},hideDialogWithFocus:function(n,t,i){bet365.popups.hideDialog(n,t,i);$(".divLoggedPanel input[type!='hidden']").each(function(){$(this).attr("tabindex",$(this).attr("tabindex")-10)})},setFocus:function(){setTimeout(function(){this.focus()},500)},centreDialog:function(n){var i=bet365.GetBrowser(),t=$(n),r,u,f,e,o;t!=null&&(r=$(window).height(),u=$(window).width(),t.css("left",Math.floor(u/2-t.width()/2)),i=="IE6"||i=="IE7"?(f=$(document).scrollTop(),e=t.css("height")=="auto"?$(t).height():parseInt(t.css("height")),o=($(window).height()-e)/2,$(t).css("top",Math.floor(f+o)+"px")):t.css("top",Math.floor(r/2-t.height()/2)))},ReloadParent:function(){window.opener.location.reload()}};bet365.cmsCore.leaderboards.poll=function(n,t){setTimeout(function(){var i="{ 'contentPath': '"+n+"', 'userName': '"+t+"' }";$.ajax({type:"POST",data:i,contentType:"application/json; charset=utf-8",dataType:"json",url:"/CustomContentPod/PollLeaderboard",success:function(n){bet365.cmsCore.leaderboards.refreshLeaderboards(n.Leaderboards)},error:function(){}});bet365.cmsCore.leaderboards.poll(n,t)},42e4)};bet365.cmsCore.leaderboards.refreshLeaderboards=function(n){for(var t=0;t<n.length;++t)n[t].LData!=null&&n[t].LDataFID!=null&&$("#"+n[t].LDataFID).html(n[t].LData),n[t].LDet!=null&&n[0].LDetFID!=null&&$("#"+n[t].LDetFID).html(n[t].LDet),n[t].TWData!=null&&n[t].TWFID!=null&&$("#"+n[t].TWFID).html(n[t].TWData),n[t].GWData!=null&&n[t].GWFID!=null&&$("#"+n[t].GWFID).html(n[t].GWData),n[t].SurroundingDataData!=null&&n[t].SDFID!=null&&$("#"+n[t].SDFID).html(n[t].SDData)};bet365.cmsCore.DropDowns={SetupLanguageSelector:function(){$(".LanguageSelector dt").click(function(){$(".LanguageSelector dt").hasClass("active")?$(".LanguageSelector dt").removeClass("active"):$(".LanguageSelector dt").addClass("active");$(".LanguageSelector dd ul").toggle()});$(document).bind("click",function(n){var t=$(n.target);t.parents().hasClass("LanguageSelector")||($(".LanguageSelector dt").removeClass("active"),$(".LanguageSelector dd ul").hide(),$(".LanguageSelector .LanguageSelectorTitle").removeClass("Hover"),$(".LanguageSelector .LanguageSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(t.hasClass("DownloadPopupContainer")||t.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});$(".LanguageSelector li ").click(function(){$(".header-version-7").length>0&&$(this).find("a").length>0&&(window.location.href=$(this).attr("data-languageurl"))});$(".LanguageSelector").hover(function(){$(this).find(".LanguageSelectorTitle").addClass("Hover");$(this).find(".LanguageSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".LanguageSelectorTitle").removeClass("Hover"),$(this).find(".LanguageSelectorHeaderIcon").removeClass("Hover"))});$(".firstRowendOfRow",".LanguageSelector").hover(function(){$(this).parents(".LanguageSelector").find(".LanguageSelectorListIcon").removeClass("LanguageSelectorListIconInactive").addClass("LanguageSelectorListIconActive")},function(){$(this).parents(".LanguageSelector").find(".LanguageSelectorListIcon").removeClass("LanguageSelectorListIconActive").addClass("LanguageSelectorListIcon")})},PopulateBalances:function(n){n.ajax({dataType:"json",url:"/balance/balance",cache:!1,success:function(t){n("span.BonusValue").text(t.Bonus);n("span.WithdrawableValue").text(t.Withdrawable);n("span.NonWithdrawableValue").text(t.NonWithdrawable);n("span.TotalValue").text(t.Total);bet365.cmsCore.DropDowns.OverwriteBalanceSelectorTitleWithSportsAndGamesTotalBalance(t)}})},SetupRefreshBalance:function(n){bet365.cmsCore.DropDowns.PopulateBalances($);$(n).unbind("click");$(n).addClass("refreshClicked");setTimeout(function(){$(n).removeClass("refreshClicked");$(n).click(function(){bet365.cmsCore.DropDowns.SetupRefreshBalance(n)})},5e3)},SetupBalanceSelector:function(){bet365.cmsCore.DropDowns.RecordOriginalBalanceSelectorTitle();$(".BalanceSelector dt").click(function(){$(".BalanceSelector dt").hasClass("active")?$(".BalanceSelector dt").removeClass("active"):($(".BalanceSelector dt").addClass("active"),bet365.cmsCore.DropDowns.PopulateBalances($));$(".BalanceSelector dd ul").toggle();$(".BalanceSelector dd ul").is(":hidden")&&bet365.cmsCore.DropDowns.RestoreOriginalBalanceSelectorTitle()});$(".BalanceSelector .firstRow").click(function(){$(".header-version-7").length>0?bet365.cmsCore.DropDowns.SetupRefreshBalance(this):bet365.cmsCore.DropDowns.PopulateBalances($)});$(document).bind("click",function(n){var t=$(n.target);t.parents().hasClass("BalanceSelector")||($(".BalanceSelector dt").removeClass("active"),$(".BalanceSelector dd ul").hide(),bet365.cmsCore.DropDowns.RestoreOriginalBalanceSelectorTitle(),$(".BalanceSelector .BalanceSelectorTitle").removeClass("Hover"),$(".BalanceSelector .BalanceSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(t.hasClass("DownloadPopupContainer")||t.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});$(".BalanceSelector").hover(function(){$(this).find(".BalanceSelectorTitle").addClass("Hover");$(this).find(".BalanceSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".BalanceSelectorTitle").removeClass("Hover"),$(this).find(".BalanceSelectorHeaderIcon").removeClass("Hover"))});$(".firstRow",".BalanceSelector").hover(function(){$(this).parents(".BalanceSelector").find(".BalanceSelectorListIcon").removeClass("BalanceSelectorListIconInactive").addClass("BalanceSelectorListIconActive")},function(){$(this).parents(".BalanceSelector").find(".BalanceSelectorListIcon").removeClass("BalanceSelectorListIconActive").addClass("BalanceSelectorListIcon")})},RecordOriginalBalanceSelectorTitle:function(){$(".BalanceSelectorTitle .BalanceSelectorHeader").data("origBalanceTitle",$(".BalanceSelectorTitle .BalanceSelectorHeader").text())},RestoreOriginalBalanceSelectorTitle:function(){$(".BalanceSelectorTitle .BalanceSelectorHeader").text($(".BalanceSelectorTitle .BalanceSelectorHeader").data("origBalanceTitle"))},OverwriteBalanceSelectorTitleWithSportsAndGamesTotalBalance:function(n){n.SportsAndGamesTotalBalance!==null&&$("span.BalanceSelectorHeader").text(n.SportsAndGamesTotalBalance)},SetupServicesSelector:function(){$(".ServicesSelector dt").click(function(){$(".ServicesSelector dt").hasClass("active")?$(".ServicesSelector dt").removeClass("active"):$(".ServicesSelector dt").addClass("active");$(".ServicesSelector dd ul").toggle();$(".ServicesSelectorTitle",$(this)).addClass("Hover");$(".ServicesSelectorHeaderIcon",$(this)).addClass("Hover")});$(document).bind("click",function(n){var t=$(n.target);t.parents().hasClass("ServicesSelector")||($(".ServicesSelector dt").removeClass("active"),$(".ServicesSelector dd ul").hide(),$(".ServicesSelector .ServicesSelectorTitle").removeClass("Hover"),$(".ServicesSelector .ServicesSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(t.hasClass("DownloadPopupContainer")||t.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});$(".ServicesSelector ul li a").click(function(){$(".ServicesSelector dt").removeClass("active");$(".ServicesSelector dd ul").hide()});$(".ServicesSelector ul li:first").addClass("firstRow");$(".ServicesSelector ul li:last").addClass("lastRow");var n=$(".ServicesSelector ul").width()-20;$(".ServicesSelector ul li a").css("width",n+"px");$(".ServicesSelector").hover(function(){$(this).find(".ServicesSelectorTitle").addClass("Hover");$(this).find(".ServicesSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".ServicesSelectorTitle").removeClass("Hover"),$(this).find(".ServicesSelectorHeaderIcon").removeClass("Hover"))});$(".firstRow",".ServicesSelector").hover(function(){$(this).parents(".ServicesSelector").find(".ServicesSelectorListIcon").removeClass("ServicesSelectorListIconInactive").addClass("ServicesSelectorListIconActive")},function(){$(this).parents(".ServicesSelector").find(".ServicesSelectorListIcon").removeClass("ServicesSelectorListIconActive").addClass("ServicesSelectorListIcon")})}};bet365.cmsCore.GetBrowser=function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("chrome")!=-1?"CHROME":n.indexOf("opera")!=-1?"OPERA":n.indexOf("netscape")!=-1?n.indexOf("msie")!=-1?"IE":"NETSCAPE":n.indexOf("firefox")!=-1?"FIREFOX":n.indexOf("chrome")!=-1?"CHROME":n.indexOf("safari")!=-1?"SAFARI":n.indexOf("msie 6")!=-1?"IE6":n.indexOf("msie 8.")!=-1?"IE8":n.indexOf("msie 10.")!=-1?"IE10":n.indexOf("msie 7")!=-1?"IE7":n.indexOf("msie")!=-1?"IE":"IE*"};bet365.cmsCore.GetCookie=function(n){if(document.cookie.length>0){var t=document.cookie.indexOf(n+"="),i;if(t!=-1)return t=t+n.length+1,i=document.cookie.indexOf(";",t),i==-1&&(i=document.cookie.length),unescape(document.cookie.substring(t,i))}return""};bet365.cmsCore.flash={EmbedFlashObject:function(n,t,i,r,u,f,e,o,s){var h=function(){var n=document.getElementById(s),i=document.getElementById(t);n&&(n.style.display="inline");i&&(i.style.display="none")};swfobject.hasFlashPlayerVersion(n)?swfobject.embedSWF(i,t,r,u,n,!1,f,e,o,function(n){n.success?$("#"+s).hide():h()}):h()},shouldShowMsg:function(){var n=document.getElementById("flshckie"),i,t;return(n==null&&(n=document.getElementById("flshckie2")),n==null)?!1:(typeof n.getCookie=="function"&&typeof n.getCookie("fts")!="undefined"&&!0&&(i=n.getCookie("fts")),t=bet365.cmsCore.GetCookie("ft"),typeof i!="undefined"&&i!==null&&i.length>0&&Number(i)==1)?(document.cookie="ft=1; expires=Wed, 1 Jan 2070 23:59:00 UTC; path=/",!1):typeof t!="undefined"&&t!==null&&t.length>0&&Number(t)==1?(typeof n.setCookie=="function"&&n.setCookie("fts",t),!1):!0},showNoFlashPrompt:function(n){n(document).ready(function(){bet365.cmsCore.flash.noFlashSetup(n);bet365.cmsCore.flash.shouldShowMsg()&&bet365.cmsCore.popups.showDialog(".NoFlashLogoContainer")})},hideNoFlashPrompt:function(n){bet365.cmsCore.popups.hideDialog(".NoFlashLogoContainer");n(".NoFlashLauncherContainer").hide();n("#mask").stop(!0,!0).fadeTo("slow",0).css("display","none")},attachNoFlashCloseEvent:function(n){n(".Close, .NoFlashCloseIcon").click(function(t){bet365.cmsCore.flash.hideNoFlashPrompt(n);t.preventDefault()})},checkHaveFlash:function(n){swfobject.hasFlashPlayerVersion("1.0.0.0")||bet365.cmsCore.flash.showNoFlashPrompt(n)},noFlashSetup:function(n){n(".butLeft").click(function(t){bet365.cmsCore.flash.canSeeFlashLogo();bet365.cmsCore.flash.hideNoFlashPrompt(n);t.preventDefault()})},canSeeFlashLogo:function(){var n=document.getElementById("flshckie");n==null&&(n=document.getElementById("flshckie2"));typeof n.setCookie=="function"&&n.setCookie("fts","1");document.cookie="ft=1; expires=Wed, 1 Jan 2070 23:59:00 UTC; path=/"},showNoFlashLauncherPrompt:function(n){var t=n(".NoFlashLauncherContainer"),i,r;n("#mask").after(t);i=n(document).height();r=n(document).width();n("#mask").css({width:r,height:i});n("#mask").stop(!0,!0).fadeTo(2e3,.3);bet365.cmsCore.popups.showDialog(t)}};bet365.cmsCore.SlidingPanel={SetupLinks:function(n){"use strict";var t,i;n(".CollapsibleSectionHeader").first().addClass("first");n(".CollapsibleSectionHeader").length>0&&n(".CollapsibleSectionHeader").click(function(t){var i,r;return t.preventDefault(),n(this).hasClass("viewSection")&&(n(this).hasClass("CollapsibleSectionHeaderGroup")?(n(".CollapsibleSectionGroup").stop(!1,!0).slideUp(400),n(".CollapsibleSectionHeaderGroup").removeClass("hideSection").addClass("viewSection")):(n(".CollapsibleSection").stop(!1,!0).slideUp(400),n(".CollapsibleSectionHeader").removeClass("hideSection").addClass("viewSection"))),n(this).hasClass("viewSection")?(n(this).removeClass("viewSection"),n(this).addClass("hideSection")):(n(this).removeClass("hideSection"),n(this).addClass("viewSection")),i=n(this).html(),n(this).html(n(this).attr("rel")),n(this).attr("rel",i),r=this.id.replace("slider",""),n("#"+r).slideToggle(400),!1});t=n("a.CollapsibleSectionHeader[JumpTo='true']");t.length>0&&(i=n(t[0]).offset(),window.scrollTo(0,i.top-10))}};bet365.cmsCore.UpdateClock=function(){var n,t,i,r,u,f;n=new Date($(".clock-container .time").data("date"));n.setTime(n.getTime()+1e3);t=n.getHours();i=n.getMinutes();r=n.getSeconds();$("#clock").text((t<10?"0"+t:t)+":"+(i<10?"0"+i:i)+":"+(r<10?"0"+r:r));$(".clock-container .time").data("date",n);$(".hidLoginTime").length>0&&($("#popupmask").length>0&&$("#popupmask").is(":visible")&&$("#popupmask").height()!==0&&$(".hidLoginTime").text(n),u=new Date($(".hidLoginTime")[0].innerText),f=n-u,f>6e4&&($(".hidLoginTime").remove(),$(".spanLastLoginText").fadeOut(1e3),$(".spanLastLogin").fadeOut(1e3)))};bet365.cmsCore.Optin={ShowOptinLightbox:function(n,t){var i,r;i=$("div.OptinDetailContainer[optinId='"+t+"']");bet365.cmsCore.Optin.DisplayOptinMessage(n,t,i);bet365.cmsCore.popups.showDialogWithFocus(i,"#000000",.7);r=1;$("input[type!='hidden']",i).each(function(){$(this).attr("tabindex",r);r++});$("a.ConfirmControl",i).attr("tabindex",r);r++;$("a.CancelControl",i).attr("tabindex",r);bet365.cmsCore.popups.keepTabWithinPopup($("input.OptinInput",i).first(),$("a.ConfirmControl",i))},CloseOptinLightbox:function(){$("div.OptinDetailContainer").stop(!0,!0).fadeOut(1e3);$("#popupmask").stop(!0,!0).fadeOut(1e3);$("input.OptinEmail").val("");$("input.OptinPassword:not(.nojs)").val("");$("input.OptinUsername:not(.nojs)").val("");setTimeout(function(){$("[id $=SuccessMessage], [id $=AlreadyOptedInMessage], [id $=ErrorMessage], [id $=InvalidCredentials]",".OptinDetailContainer").hide()},1e3);$(window).unbind("resize")},IsValidEmail:function(n){return/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(n)},ValidateOptin:function(n){return($("div.GeneralError, div.InvalidDetailsPart1, div.InvalidDetailsPart2, div.InvalidEmail",n).hide(),!$("input.OptinUsername",n).val())?($("div.InvalidDetailsPart1",n).show(),$("div.InvalidDetailsPart2",n).show(),$("input.OptinUsername",n).focus(),!1):$("input.OptinPassword",n).val()?!0:($("div.InvalidDetailsPart1",n).show(),$("div.InvalidDetailsPart2",n).show(),$("input.OptinPassword",n).focus(),!1)},SubmitOptin:function(n){var t,r,i,u,f;t=$("#"+n).parents("div.OptinDetailContainer");r=bet365.cmsCore.Optin.ValidateOptin(t);r&&(i=bet365.cmsCore.Optin.CreateOptinLoginProcess(n),i&&(u=$("input.OptinUsername",t).val(),f=$("input.OptinPassword",t).val(),bet365.cmsCore.Optin.SetLoginFieldsFromOptInPopup(u,f,i)))},DisplayOptinMessage:function(n,t,i){t>0&&(n===""&&(n=bet365.cmsCore.Optin.GetOptinResponse(t)),bet365.cmsCore.Optin.ProcessOptinResponse(n,i))},GetOptinResponse:function(n){var t="",i="{ 'offerId': '"+n+"' }";return $.ajax({type:"POST",async:!1,data:i,contentType:"application/json; charset=utf-8",dataType:"json",url:"/OptIn/OptIn",success:function(n){t=n.Status}}),t},ProcessOptinResponse:function(n,t){$("div.UserDetailsWrapper",t).show();$("div.Success",t).hide();$("div.GeneralError",t).hide();$("div.InvalidEmail",t).hide();$("div.InvalidDetailsPart1",t).hide();$("div.InvalidDetailsPart2",t).hide();$("a.CloseControl",t).hide();$("a.CancelControl",t).show();$("a.ConfirmControl",t).show();$("div.OptinSubHeaderText",t).hide();$("div.MustLogInMessage",t).hide();switch(n){case"UserHasTriedToOptInButWasAlreadyOptedInToThisOffer":$(t).removeClass("displayLogin");$("div.UserDetailsWrapper",t).hide();$("div.AlreadyEntered",t).show();$("a.CloseControl",t).show();$("a.CancelControl",t).hide();$("a.ConfirmControl",t).hide();break;case"UserHasJustSuccessfullyOptedIn":$(t).removeClass("displayLogin");$("div.Success, div.Confirmation",t).show();$("div.UserDetailsWrapper",t).hide();$("div.AlreadyEntered",t).hide();$("a.CloseControl",t).show();$("a.CancelControl",t).hide();$("a.ConfirmControl",t).hide();break;case"UserHasTriedToLogInToOptInButAuthenticationFailed":$(t).addClass("displayLogin");$("div.OptinHeaderText, div.FillInDetails:not(.nojs), div.OptinDetailHeader").show();$("div.Success, div.AlreadyEntered, div.GeneralError, div.Confirmation",t).hide();$("div.UserDetailsWrapper",t).show();$("div.UserDetailsWrapper, a.CloseX",t).show();$("div.InvalidDetailsPart1",t).show();$("div.InvalidDetailsPart2",t).show();break;case"UserIsNotCurrentlyLoggedIn":var i=$("div.MustLogInMessage",t);i[0]&&i[0].innerHTML!==""?($(t).removeClass("displayLogin"),$("div.Success, div.AlreadyEntered, div.GeneralError, div.Confirmation, div.FillInDetails:not(.nojs)",t).hide(),$("div.DetailsContent",t).hide(),$("div.AlreadyEntered",t).hide(),$("a.CancelControl",t).hide(),$("a.ConfirmControl",t).hide(),$("div.OptinHeaderText:not(.nojs), div.OptinDetailHeader:not(.nojs)").show(),$("div.MustLogInMessage",t).show(),$("a.CloseControl",t).show()):($(t).addClass("displayLogin"),$("div.OptinHeaderText:not(.nojs), div.FillInDetails:not(.nojs), div.OptinDetailHeader:not(.nojs)").show(),$("div.Success, div.AlreadyEntered, div.GeneralError, div.Confirmation",t).hide(),$("div.UserDetailsWrapper",t).show(),$("div.UserDetailsWrapper, a.CloseX",t).show());break;case"UserIsLoggedInAndCanAttemptToOptInNow":$(t).addClass("displayLogin");$("div.OptinHeaderText:not(.nojs), div.FillInDetails:not(.nojs), div.OptinDetailHeader:not(.nojs)").show();$("div.Success, div.AlreadyEntered, div.GeneralError, div.Confirmation",t).hide();$("div.UserDetailsWrapper",t).show();$("div.UserDetailsWrapper, a.CloseX",t).show()}},CreateOptinLoginProcess:function(n){var t;return $.ajax({type:"POST",data:{TargetUrl:location.pathname,AdditionalItems:"",Validate:"true",SourceId:n.toString()},async:!1,url:"/Login/GenerateProcess",success:function(n){t=n},error:function(){}}),t},SetLoginFieldsFromOptInPopup:function(n,t,i){var r=$("form.LoginPanel"),u=$("input.loginSubmit",r);$("input.txtUserName",r).val(n);$("input.txtPassword",r).val(encodeURIComponent(t));$("input.txtSTKN",r).val(i);u.click()},ConfigureOptin:function(){$("a.OptInLink").click(function(n){return n.preventDefault(),bet365.cmsCore.Optin.ShowOptinLightbox("",$(this).attr("optInOfferId")),!1});$("div.OptinDetailContainer input[type!='hidden']").keypress(function(n){if(n.which===13)return n.preventDefault(),$("a.ConfirmControl",$(this).parents("div.OptinDetailContainer")).focus().click(),!1});$("div.OptinDetailContainer a.CloseX, div.OptinDetailContainer a.CancelControl, div.OptinDetailContainer a.CloseControl").click(function(n){return n.preventDefault(),bet365.cmsCore.Optin.CloseOptinLightbox(),!1});$("a.ConfirmControl").click(function(n){return n.preventDefault(),bet365.cmsCore.Optin.SubmitOptin(this.id),!1});$("div.OptinDetailContainer").each(function(){var t=$(this),n=$("input.InitialShowStatus",t).val(),i;n!=="UserIsNotCurrentlyLoggedIn"&&n!=="UserIsLoggedInAndCanAttemptToOptInNow"&&(i=t.attr("optinid"),setTimeout(function(){bet365.cmsCore.Optin.ShowOptinLightbox(n,i)},0))})},processAutomaticOptIn:function(n){var t=bet365.cmsCore.getQueryString(n),i=bet365.cmsCore.getValueFromQueryString(t,"AutoOptIn");i!==""&&$("a.OptInLink").first().click()}};bet365.cmsCore.buttons={ApplyConsistentButtonsWidths:function(n){var t,i,u,r,f;if(n&&n.length>0){for(t=null,i=0;i<n.length;i++)u=$(n[i]),(t==null||u.width()>t.width())&&(t=u);if(t)for(r=0;r<n.length;r++)f=$(n[r]),t[0]!=f[0]&&f.css("width",t.css("width"))}}};bet365.cmsCore.antiForgery={CreateAjaxPostHeadersWithAntiForgeryToken:function(n){"use strict";var t={};return t.__RequestVerificationToken=bet365.cmsCore.antiForgery.GetAntiForgeryToken(n),t},GetAntiForgeryToken:function(n){"use strict";return n("[name=__RequestVerificationToken]").val()}};bet365.cmsCore.currency={isDecimalFormat:function(n){"use strict";return/^\d+([\.,\,]\d{1,2})?$/.test(n)},round:function(n,t){"use strict";return Math.round(n*Math.pow(10,t))/Math.pow(10,t)},globaliseParseFloat:function(n){"use strict";return parseFloat(n.replace(",","."),10)},periodSymbol:function(){"use strict";return $("body").data("pageAttributes")&&$("body").data("pageAttributes").UserCurrencyPeriodSymbol?$("body").data("pageAttributes").UserCurrencyPeriodSymbol:"."}};bet365.cmsCore.overlayBanners={setupBanner:function(){var t,n,i;$("#KYCIFrame, .modal.responsible-gambling-modal, .modal.session-setup-modal, #OverlayBannerContainer").is(":visible")||(n=bet365.cmsCore.getPageAttributes($),n&&n.IsGameLaunch)||(i=bet365.cmsCore.GetBrowser(),bet365.cmsCore.DataStorage&&bet365.cmsCore.DataStorage.IsSupported()&&i!="IE8"&&(t=bet365.cmsCore.overlayBanners.getNextBanner(),bet365.cmsCore.overlayBanners.showBanner(t)))},bannerShouldNotBeShownOnPage:function(){var n=window.location.pathname.toLowerCase(),i=n.indexOf("/play")===0,t;return i?!0:(t=n.indexOf("/slots-giveaway")>=0||n.indexOf("/one-million-spectacular")>=0,t)?!0:!1},getNextBanner:function(){var n,t;return bet365.cmsCore.overlayBanners.bannerShouldNotBeShownOnPage()||!bet365.cmsCore.DataStorage.IsSupported()?null:(t=bet365.cmsCore.overlayBanners.getPreviousBannerIds(),$.ajax({type:"GET",data:{},async:!1,url:"/Overlays/GetNext?ids="+t,cache:!1,success:function(t){t&&(n=t)}}),n)},getPreviousBannerIds:function(){var f,e,n,t,i,o,r,u;if(f=[],e=Date.now()-1296e5,n=bet365.cmsCore.DataStorage.Get(bet365.cmsCore.DataStorage.Keys.OverlayBannerIds),n){for(t=[],r=0;r<n.overlayBanners.length;r++)i=n.overlayBanners[r],e<i.interactedTime?f.push(i.id):t.push(i);for(u=0;u<t.length;u++)o=n.overlayBanners.indexOf(t[u]),n.overlayBanners.splice(o,1);bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.OverlayBannerIds,{overlayBanners:n.overlayBanners})}return f},showBanner:function(n){var t,i,r;n&&n.length!==0&&(t=$(n),$("body").append(t),$("#OverlayBannerPopupMask").length==0&&$("body").append('<div id="OverlayBannerPopupMask"><\/div>'),bet365.cmsCore.overlayBanners.bindClicks(t),r=t.find(".PodJackpot").length>0,r&&bet365.cmsCore.jackpots!==undefined&&bet365.cmsCore.jackpots.startFromElement($),i="#"+t.get(0).id,bet365.cmsCore.gameLaunchMechanism.bindClickEvents($,i),bet365.cmsCore.popups.showDialog(t,"#000000",.7,null,"#OverlayBannerPopupMask"))},bindClicks:function(n){var t=$(".OverlayBannerCallToAction, #OverlayBannerImage, #OverlayBannerCloseButton, #OverlayBannerPopupMask");t.on("click",function(){bet365.cmsCore.overlayBanners.acknowledgeBanner(n);bet365.cmsCore.popups.hideDialog(n,null,"#OverlayBannerPopupMask")})},acknowledgeBanner:function(n){var i,t,r,u;i=n.attr("data-overlaybanner-id");i&&(t=bet365.cmsCore.DataStorage.Get(bet365.cmsCore.DataStorage.Keys.OverlayBannerIds),r=t&&t.overlayBanners?t.overlayBanners:[],u={id:i,interactedTime:Date.now()},r.push(u),bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.OverlayBannerIds,{overlayBanners:r}))}};bet365=bet365||{};bet365.Navigation=bet365.Navigation||{};bet365.product=bet365.product||{};bet365.product.bingo=bet365.product.bingo||{};$(document).ready(function(){"use strict";bet365.product.bingo.pods.bindPodHover($);bet365.product.bingo.pastwinners.bindPodHover($);bet365.product.bingo.popups.bindPopupMaskClick($);bet365.product.bingo.popups.bindModalCloseClick($);bet365.product.bingo.pods.threeColumnLayout($);bet365.product.bingo.popups.setupInactivityWarning($);bet365.product.bingo.promopods.bindClickablePodHoverBehaviour($);bet365.product.bingo.headerbanner.bindClickableBannerItemBehaviour($)});bet365.product.bingo.promopods={bindClickablePodHoverBehaviour:function(n){"use strict";n("div.BingoPod").filter(function(){return n(".purpleRolloverButton2",n(this)).size()==1}).hover(function(){n(this).addClass("clickablePodHover")},function(){n(this).removeClass("clickablePodHover")}).click(function(){var t=n(this).find(".purpleRolloverButton2 a").first();t&&t.click()}).find(".purpleRolloverButton2 a").click(function(n){n.stopPropagation()}).end().find(".ShareDropDown").click(function(n){n.stopPropagation()}).hover(function(){n(this).parent().parent().removeClass("clickablePodHover")},function(){n(this).parent().parent().addClass("clickablePodHover")});n(".gameLaunch div.BingoPod .purpleRolloverButton2 a").click(function(){return n(this).parent().click(),!1})}};bet365.product.bingo.headerbanner={bindClickableBannerItemBehaviour:function(n){"use strict";n("div.BingoHeaderBannerItem").filter(function(){return n(".YellowButton, .PinkButton",n(this)).size()==1}).find("a").hover(function(){n("div.BingoHeaderBannerItem").removeClass("clickablePodHover")},function(){n("div.BingoHeaderBannerItem").addClass("clickablePodHover")}).click(function(n){n.stopPropagation()}).end();n("div.BingoHeaderBannerItem").filter(function(){return n(".YellowButton, .PinkButton",n(this)).size()==1}).hover(function(){n(this).addClass("clickablePodHover")},function(){n(this).removeClass("clickablePodHover")}).click(function(){n(this).find(".YellowButton, .PinkButton").first().click()}).end()}};bet365.product.bingo.pods={bindPodHover:function(n){"use strict";n("div.BingoPod").hover(function(){n(this).addClass("Active")},function(){n(this).removeClass("Active")})},threeColumnLayout:function(n){"use strict";var f=n(".row-pre-footer .row-inner").children(".BingoPod")[1],i,t,r;n(f).addClass("BingoHomePodWide");var u=n(".BottomPromoPods").children().length,e=Math.ceil(u/3)*3,o=e-u;for(t=0;t<o;t++)n(".BottomPromoPods").append("<div class='BingoPod BingoPodEmpty'>");for(n(".BottomPromoPods").children().slice(-3).addClass("BingoPodLastRow"),i=n(".BottomPromoPods").children(),t=0;t<i.length;t++)t%3==1&&(n(i[t]).hasClass("BingoPodEmpty")&&n(i[t]).addClass("BingoPodWideEmpty"),n(i[t]).addClass("BingoPodWide"));for(i=n(".MiddlePods").children(),t=0;t<i.length;t++)t%3==1&&n(i[t]).addClass("BingoPodWide");r=100;n(".BingoPod").each(function(){r=r-1;n(this).css("z-index",r)})}};bet365.product.bingo.pastwinners={bindPodHover:function(n){"use strict";n("div.PastWinner").hover(function(){n(this).addClass("Active")},function(){n(this).removeClass("Active")})}};bet365.product.bingo.gamepods={bindPodHover:function(n){"use strict";bet365.product.bingo.gamepods.bindSpecificChildrenPodHover(n,"html")},bindSpecificChildrenPodHover:function(n,t){"use strict";n(t).find("div.GamesPod").hover(function(){n(this).find(".PodDetailsWrapper").stop(!0,!0).fadeIn(150)},function(){n(this).find(".PodDetailsWrapper").stop(!0,!0).fadeOut(150)})}};bet365.product.bingo.popups={bindPopupMaskClick:function(n){"use strict";n("#popupmask").click(function(){n(".modal:visible").length>0&&bet365.cmsCore.popups.hideDialog(".modal:visible")})},bindModalCloseClick:function(n){"use strict";n(".modal .close").click(function(){n(".modal:visible").length>0&&bet365.cmsCore.popups.hideDialog(".modal:visible")})},setupInactivityWarning:function(n){n(".InactivityWarningDialog").show();n(".LogOutButton").outerWidth(n(".RemainLoggedInButton").outerWidth());n(".InactivityWarningDialog").hide();n(".InactivityWarningDialog").css("visibility","visible")}};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.gameLaunchMechanism=bet365.cmsCore.gameLaunchMechanism||{};bet365.cmsCore.handleError=bet365.cmsCore.handleError||{};bet365.cmsCore.LoginOverlay=bet365.cmsCore.LoginOverlay||{};bet365.cmsCore.showInsufficientFunds=bet365.cmsCore.showInsufficientFunds||{};bet365.cmsCore.showGameNotAllowed=bet365.cmsCore.showGameNotAllowed||{};var persistantGameWindow=persistantGameWindow||{},unloadInterval=unloadInterval||{},pod=pod||{};bet365.cmsCore.gameLaunchMechanism.setupGameLaunch=function(n){bet365.cmsCore.gameLaunchMechanism.bindClickEvents(n,"html")};bet365.cmsCore.gameLaunchMechanism.thirdPartyCookiesRestrictedCheck=null;bet365.cmsCore.gameLaunchMechanism.bindClickEvents=function(n,t){"use strict";n("[href^='Gaming://Launch']").length==0&&(n(t+" [data-launchmechanismid=1]").click(function(t){return t.preventDefault(),bet365.cmsCore.gameLaunchMechanism.isThirdPartyCookieCheckAllowsLaunching(n,t)&&bet365.cmsCore.gameLaunchMechanism.popupWindow(n,t),!1}),n(t+" [data-launchmechanismid=2]").click(function(t){return t.preventDefault(),bet365.cmsCore.gameLaunchMechanism.isThirdPartyCookieCheckAllowsLaunching(n,t)&&bet365.cmsCore.gameLaunchMechanism.ajaxRedirect(n,t),!1}))};bet365.cmsCore.gameLaunchMechanism.isThirdPartyCookieCheckAllowsLaunching=function(n,t){return!bet365.cmsCore.gameLaunchMechanism.thirdPartyCookiesRestrictedCheck||!bet365.cmsCore.gameLaunchMechanism.thirdPartyCookiesRestrictedCheck(n(t.currentTarget).data("gameid"))};bet365.cmsCore.gameLaunchMechanism.bindClickEventsToElement=function(n,t){"use strict";t&&t.length&&(t.filter(function(){return n(this).data("launchmechanismid")==1}).click(function(t){return t.preventDefault(),bet365.cmsCore.gameLaunchMechanism.popupWindow(n,t),!1}),t.filter(function(){return n(this).data("launchmechanismid")==2}).click(function(t){return t.preventDefault(),bet365.cmsCore.gameLaunchMechanism.ajaxRedirect(n,t),!1}))};bet365.cmsCore.gameLaunchMechanism.launchPopupWindow=function(n,t,i,r){var c,o,y,u,a,f,s,h,v,l,e;for(e=$("body").data("pageAttributes"),c="/LaunchGame/"+t+"/"+n,i&&(c+="/"+i),o="",r!==undefined&&(o=r.split(",")),y={},u={height:596,width:792,toolbar:0,scrollbars:1,status:0,resizable:1,left:0,top:0,center:1,createNew:1,location:0,menubar:0,onUnload:null,requiredFlashVersion:e.flashVersion,g:null},h=0;h<o.length;h+=1)f=o[h].split(":"),u[f[0]]!=="undefined"&&f.length===2&&(u[f[0]]=f[1]);u.center===1&&(u.top=(screen.height-(u.height+110))/2,u.left=(screen.width-u.width)/2);a="location="+u.location+",menubar="+u.menubar+",height="+u.height+",width="+u.width+",toolbar="+u.toolbar+",scrollbars="+u.scrollbars+",status="+u.status+",resizable="+u.resizable+",left="+u.left+",screenX="+u.left+",top="+u.top+",screenY="+u.top;l=!1;e&&e.skipGameLaunchFlashCheck&&e.skipGameLaunchFlashCheck==="true"&&(l=!0);swfobject.hasFlashPlayerVersion(u.requiredFlashVersion)||l?(u.createNew===0&&persistantGameWindow.close!==undefined&&persistantGameWindow.close(),v=u.createNew===1?"_blank":u.createNew===0?"GGG":u.createNew,s=window.open(c,v,a),persistantGameWindow=s,s&&s.focus()):bet365.cmsCore.flash.showNoFlashLauncherPrompt($)};bet365.cmsCore.gameLaunchMechanism.popupWindow=function(n,t){t.preventDefault();bet365.cmsCore.overlayBanners&&bet365.cmsCore.overlayBanners.setupBanner();var r,i,u,f;r=n(t.currentTarget).data("gameid");i=n(t.currentTarget).data("playmode");u=n(t.currentTarget).data("product");i===undefined&&(i="real");f=n(t.currentTarget).data("overrideSettings");bet365.cmsCore.gameLaunchMechanism.launchPopupWindow(r,i,u,f)};bet365.cmsCore.gameLaunchMechanism.ajaxRedirect=function(n,t){t.preventDefault();bet365.cmsCore.gameLaunchMechanism.doAjaxRedirect(n,n(t.currentTarget).attr("data-gameId"),"real")};bet365.cmsCore.gameLaunchMechanism.doAjaxRedirect=function(n,t,i){var r,u,e,f,o;r=bet365.cmsCore.log;e=bet365.cmsCore.getPageAttributes(n);f=new URI(window.location.href);o=f.path()+f.search();u="selectedGameId="+t+"&mode="+i+"&currentUrl="+escape(o);r.write("Retrieving launch url for: "+u);n.ajax({type:"GET",url:e.appPath+"AjaxGameLaunch/GetLaunchInfo",data:u,contentType:"application/json; charset=utf-8",dataType:"json",complete:function(n,t){r.write("...web service call complete. Status: "+t)},success:function(t){bet365.cmsCore.gameLaunchMechanism.processLaunchInfo(n,t);r.write("...web service call success: "+t)},error:function(n){r.write("...web service call failed: "+n)},async:!1})};bet365.cmsCore.gameLaunchMechanism.processLaunchInfo=function(n,t){if(t&&t.Result)switch(t.Result){case 1:case 6:window.location=t.RedirectUri;break;case 8:bet365.cmsCore.MembersFrame.LoadInFrame(t.RedirectUri);break;case 3:if(bet365.cmsCore.Login.UserShouldBeKeptLoggedIn())window.location.reload();else{var i=n("#login");i.removeClass("slide-login");i.addClass("overlay-login");bet365.cmsCore.LoginOverlay.Show(t)}break;case 4:n("#InsufficientFundsDepositLink").click(function(n){return n.preventDefault(),window.location=t.DepositLocation,!1});n("#InsufficientFundsTransferLink").click(function(n){return n.preventDefault(),window.location=t.TransferLocation,!1});bet365.cmsCore.Overlays.showInsufficientFundsOverlay();break;case 5:bet365.cmsCore.Overlays.showUnsupportedCurrencyOverlay()}};bet365=bet365||{};bet365.product=bet365.product||{};$(document).ready(function(){"use strict";bet365.cmsCore.gameLaunchMechanism.setupGameLaunch($)});bet365=bet365||{};jQuery.fn.supersleight=function(n){"use strict";return n=jQuery.extend({imgs:!0,backgrounds:!0,shim:"/Images/x.gif",apply_positioning:!0},n),this.each(function(){navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1&&jQuery(this).find("*").andSelf().each(function(t,i){var r,e,o,s,u,f;r=jQuery(i);n.backgrounds&&r.css("background-image").match(/\.png/i)!==null&&(e=r.css("background-image"),o=e.substring(5,e.length-2),s=r.css("background-repeat")==="no-repeat"?"crop":"scale",u={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+o+"', sizingMethod='"+s+"')","background-image":"url("+n.shim+")"},r.css(u));n.imgs&&r.is("img[src$=png]")&&(f=new Image,f.src=r.attr("src"),u={width:f.width+"px",height:f.height+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+r.attr("src")+"', sizingMethod='scale')"},r.css(u).attr("src",n.shim));n.apply_positioning&&r.is("a, input")&&(r.css("position")===""||r.css("position")==="static")&&r.css("position","relative")})})};$(document).ready(function(){"use strict";$("body").supersleight()});bet365=bet365||{};bet365.pushMessaging=bet365.pushMessaging||{};bet365.pushMessaging.pushMessenger=function(){function t(t,i,r,u,f){n=new PushMessaging.PushMessagingProxy(t,u,r,f);n.addEventListener(PushMessaging.PushMessageEvent.PUSH_MESSAGE,function(n){i(n.getMessageCollection())})}function i(t){n.setAdditionalData(t)}function r(){return n.getAdditionalData()}function u(t,i){n.setMessageAsRead(t,i)}var n;return{init:t,setAdditionalData:i,setMessageAsRead:u,getAdditionalData:r}}();pmResolver=pmResolver||{};pmResolver.instance=function(){return($("#pmConnObj")[0]==undefined)?bet365.pushMessaging.pushMessenger:$("#pmConnObj")[0]}();PmButtonHandler.prototype.getAction=function(n,t){var i;return n!==null&&n.length>0?(i=n.split("]"),t===undefined||t===!1?i[0]+"]":i.length===2?i[1]:null):"[Close]"};PmButtonHandler.prototype.getActionValue=function(n){return this.getAction(n,!0)};PmButtonHandler.prototype.setupButtonAction=function(n,t,i){var u,r=!1;u=this.getAction(t.action);$(n).css("display","");switch(u){case"[Play Now]":case"[Download Now]":case"[Chat Now]":case"[Deposit Now]":this.applyButtonAction(n,t,i);r=!0;break;case"[Read Messages]":this.applyButtonAction(n,t,i);r=!0;break;case"[Close]":if(isNullOrUndefined(i)){r=!1;break}else{bet365.Tracking!==undefined&&(i=bet365.Tracking.SetupTrackingElement($(n))+i);$(n).unbind("click").click(new Function(i+"; return false;"));r=!0;break}case"[More Details]":case"[Go To Game]":case"[Opt In]":r=!1;break;case"[Bet Now]":raiseError("[Bet Now] button action is not supported for CGPB");break;case"[No Button]":$(n).css("display","none");r=!0;break;default:bet365.Tracking!==undefined&&(i=bet365.Tracking.SetupTrackingElement($(n))+i);r=this.customAction(n,t,i);$(n).attr("id")=="topBannerLink"&&i&&$(n).click(new Function(i))}return r};PmButtonHandler.prototype.customAction=function(n,t,i){var f=0,r=t.action,u="";return r.indexOf("{")>-1&&r.indexOf("}")&&(u=r.substring(r.indexOf("{")+1,r.length-1),r=r.substring(0,r.indexOf("{")),f=1,u+=u.length>0?", ":"",u+="resizable=yes"),f==1?($(n).attr("target","_pushCustom"),$(n).click(function(event){event.preventDefault();window.open(r,"_pushCustom",u);eval(i)})):$(n).click(function(event){event.preventDefault();eval(i);setTimeout(function(){window.location=r},1e3)}),$(n).attr("href",r),!0};PmButtonHandler.prototype.getButtonHandlerAttribs=function(n){var t={},i,r;return i=this.getAction(n.action),r=this.getActionValue(n.action),$.ajax({type:"POST",url:"{0}{1}ButtonHandler.aspx".format([pmFramework.baseUrl(),pmConfigParams.pushMessagePath]),data:"action="+i+"&actionValue="+escape(r),async:!1,timeout:2e3,dataType:"xml",success:function(n){t.onclick=unescape($(n.documentElement).find("onclick").text());t.href=unescape($(n.documentElement).find("href").text());t.launchmechanismid=$(n.documentElement).find("launchmechanismid").text();t.gameid=$(n.documentElement).find("gameid").text();t.playmode=$(n.documentElement).find("playmode").text();t.product=$(n.documentElement).find("product").text()},error:function(n){n.status===200?(t.onclick=unescape($(n.responseText).find("onclick").text().toString()),t.href=unescape($(n.responseText).find("href").text().toString()),t.launchmechanismid=$(n.responseText).find("launchmechanismid").text().toString(),t.gameid=$(n.responseText).find("gameid").text().toString(),t.playmode=$(n.responseText).find("playmode").text().toString(),t.product=$(n.responseText).find("product").text().toString()):t=null}}),t};PmButtonHandler.prototype.applyButtonAction=function(n,t,i){var r,l,f,v,e,u,a,o,s,h,c;(f="return false;",v="return true;",u=this.getButtonHandlerAttribs(t),u!==null)&&(r=u.onclick.toString(),l=u.href.toString(),o=u.launchmechanismid.toString(),s=u.gameid.toString(),h=u.playmode.toString(),c=u.product.toString(),r.length>0&&($(n)[0].attributes.onclick!==undefined||$(n)[0].attributes.href!==undefined)&&($(n).removeAttr("onclick"),$(n).removeAttr("href")),bet365.Tracking!==undefined&&(r=bet365.Tracking.SetupTrackingElement(n)+r),isNullOrUndefined(i)||(e=r.lastIndexOf(f)>-1?f:"",r=r.replace(e,i+" "+e)),$(n).unbind("click"),a=new Function(r),$(n).click(a),$(n).attr("href",l.toString()),o.length>0&&s.length>0&&h.length>0&&bet365.cmsCore.gameLaunchMechanism.bindClickEvents&&($(n).attr("data-launchmechanismid",o),$(n).attr("data-gameid",s),$(n).attr("data-playmode",h),c.length>0&&$(n).attr("data-product",c),bet365.cmsCore.gameLaunchMechanism.bindClickEvents($,"#buttons")))};GameLobbyLaunchData.prototype.setData=function(n,t,i){var r="";$("#pageContainer").data("GameLobbyLaunch")&&(r=$("#pageContainer").data("GameLobbyLaunch"));r=r+(hasValue(r)?"|":"")+(hasValue(n)?n:"")+"-"+(hasValue(t)?t:"")+"-"+(hasValue(i)?i:"");$("#pageContainer").data("GameLobbyLaunch",r)};GameLobbyLaunchData.prototype.clearData=function(n,t){var i="",u,r,f,e;if(window.opener?window.opener.$("#pageContainer").data("GameLobbyLaunch")&&(i=window.opener.$("#pageContainer").data("GameLobbyLaunch")):$("#pageContainer").data("GameLobbyLaunch")&&(i=$("#pageContainer").data("GameLobbyLaunch")),hasValue(i)){for(u=i.split("|"),r=0;r<u.length;r++)for(e=u[r].split("-"),f=0;f<e.length;f++)if(e[1]===t){u.splice(r,1);r--;break}if(i="",u.length>0){for(r=0;r<u.length;r++)i=i+u[r]+"|";i.length>0&&(i=i.substring(0,i.length-1),window.opener?window.opener.$("#pageContainer").data("GameLobbyLaunch",i):$("#pageContainer").data("GameLobbyLaunch",i))}}};ExOvlControl.prototype.doRender=function(n,t,i){this.clearDownControl();this.expOverlayControl.removeClass("Overlay ImportantMessageOverlay").addClass("ExpandableOverlay GraphicalMessageOverlay");var r;if(n.shortText.length!=undefined&&n.shortText.length!=0){if(this.shortGraphicMsg=n,r=pmFramework.getLayoutForPosition(pmFramework.positionId.overlayLong,i),r===null)return pmFramework.renderFailCode;if(1)pmFramework.getPushGraphicData(r,i,thisExpControl.onGetPushGraphicData,"longGraphicMsg");else{if(this.longGraphicMsg=pmFramework.getPushGraphicData(pmFramework.positionId.overlayLong,i),this.shortGraphicMsg===undefined||this.longGraphicMsg===undefined)return pmFramework.renderFailCode;this.isShortMsg=!0;this.showMessage(this.shortGraphicMsg)}pmFramework.renderOverlayBackground(this.expOverlaySelector);this.centreOverlay()}};ExOvlControl.prototype.getExpOverlayElement=function(n){return n!==undefined?$(n,this.expOverlaySelector):this.expOverlayControl};ExOvlControl.prototype.centreOverlay=function(){var i,n,t;i=$(window).width();n=(i-this.expOverlayControl.width())/2;n<0&&(n=0);this.expOverlayControl.css("left",n+"px");this.isShortMsg&&(t=($(window).height()-this.expOverlayControl.height())/2,t<0&&(t=0),this.expOverlayControl.css("top",t+"px"))};ExOvlControl.prototype.clearDownControl=function(){this.clearDownImage();this.getExpOverlayElement("#webMsgCount").remove();$("ul","#bodytext").remove();this.getExpOverlayElement("#ovlOutBord").removeClass("Photo Icon Basic").css("height","");this.getExpOverlayElement("#contentContainer").css("height","");this.getExpOverlayElement("#imageContainer").css("height","");this.getExpOverlayElement("#imageDiv").css("height","");this.getExpOverlayElement("#image").css({position:"",bottom:"",width:"",height:""});this.getExpOverlayElement("#bodyContainer").css("height","");this.getExpOverlayElement("#bodytext").css("height","");this.getExpOverlayElement(".baseButton").css("width","")};ExOvlControl.prototype.clearDownImage=function(){var n=this.getExpOverlayElement("#image");n.unbind("load");n.unbind("readystatechange");n.attr("src","");n.css("margin","")};ExOvlControl.prototype.shortToLongMsgAnimation=function(n){var t=this.getExpOverlayElement("#bodyContainer");if(n===1)return t.slideToggle(thisExpControl.overlayFadeDuration),thisExpControl.overlayFadeDuration;n===2&&t.slideDown(thisExpControl.overlayFadeDuration/2)};ExOvlControl.prototype.setupButton=function(n,t){var r,i,u;$(n).unbind("click").removeAttr("href");i="$('"+this.expOverlaySelector+"').fadeOut(thisExpControl.overlayFadeDuration, function() {pmFramework.closeMessageAndOverlay($('.ovlMsgAnc'));});";r=this.buttonHandler.setupButtonAction(n,t[n.id],i);!r&&this.isShortMsg&&$(n).click(function(){bet365.Tracking!==undefined&&(bet365.Tracking.TrackEvent(n),bet365.Tracking.ReBuildTrackPostions(thisExpControl.expOverlayControl));u=thisExpControl.shortToLongMsgAnimation(1);setTimeout(thisExpControl.showLongMessage,u)});$._data(thisExpControl.closeGadget[0],"events").click===undefined&&(bet365.Tracking!==undefined&&(i=bet365.Tracking.SetupTrackingElement(thisExpControl.closeGadget)+i),thisExpControl.closeGadget.click(new Function(i)),thisExpControl.closeGadget.data("track-id",t.id));$(n).data("track-id",t.id)};ExOvlControl.prototype.showMessage=function(n){this.getExpOverlayElement("#image").attr("src",pmFramework.getMsgImagePath(n.image));this.getExpOverlayElement("#subject").html(n.shortTextH2);this.getExpOverlayElement("#title").html(n.shortTextH1);this.getExpOverlayElement("#bodytext").html(n.longText);this.getExpOverlayElement("#buttons #button1").html(n.button1.text);this.getExpOverlayElement("#buttons #button2").html(n.button2.text);this.getExpOverlayElement("#buttons .baseButton").each(function(){thisExpControl.setupButton(this,n)});this.isShortMsg?(this.centreOverlay(),this.expOverlayControl.fadeIn(thisExpControl.overlayFadeDuration)):thisExpControl.shortToLongMsgAnimation(2)};ExOvlControl.prototype.showLongMessage=function(){thisExpControl.isShortMsg=!1;thisExpControl.showMessage(thisExpControl.longGraphicMsg)};ExOvlControl.prototype.onGetPushGraphicData=function(n){n.graphicMsg!==undefined?(thisExpControl[n.callbackContextInfo]=n.graphicMsg.message,thisExpControl.shortGraphicMsg!==undefined&&thisExpControl.longGraphicMsg!==undefined&&(thisExpControl.isShortMsg=!0,thisExpControl.showMessage(thisExpControl.shortGraphicMsg))):pmFramework.setMsgIdShown($("div .ovlMsgAnc"),null)};ExOvlControl.prototype.hoverHandlerIn=function(){$(this).css("background-position","0px -20px")};ExOvlControl.prototype.hoverHandlerOut=function(){$(this).css("background-position","0px 0px")};OvlControl.prototype.doRender=function(n){if(this.initialise(),this.isWebMsgAlert=n.isWebAlert!==undefined&&n.isWebAlert===!0,this.isWebMsgAlert)this.overlayControl.removeClass("GraphicalMessageOverlay").addClass("ImportantMessageOverlay"),this.showWebAlert(n);else{if(n.shortText.length==undefined||n.shortText.length==0)return;this.overlayControl.removeClass("ImportantMessageOverlay").addClass("GraphicalMessageOverlay");this.showMessage(n)}pmFramework.renderOverlayBackground(this.overlaySelector);this.centreOverlay()};OvlControl.prototype.getOverlayElement=function(n){return $(n,this.overlaySelector)};OvlControl.prototype.doResize=function(n){this.getOverlayElement("#contentContainer").height(n);this.getOverlayElement("#imageContainer").height(n);this.getOverlayElement("#bodyContainer").height(n);this.isPhoto||this.getOverlayElement("#imageDiv").height(n);this.getOverlayElement("#bodytext").height(this.defaultBodyTextHeight)};OvlControl.prototype.resizeOverlay=function(){this.isWebMsgAlert||this.imagePositioning()};OvlControl.prototype.heightAboveBelowImage=function(){var t=this.getOverlayElement("#contentContainer").height(),n=$("#image","#ovlMsg").height();return(!n||n<=0)&&(n=$("body").data("NewMessagesImageHeight")),(t-n)/2};OvlControl.prototype.containerHeight=function(){var n;return n=this.getOverlayElement("#bodyContainer").outerHeight(!0)>this.getOverlayElement("#image").height()?this.getOverlayElement("#bodyContainer").outerHeight(!0):this.getOverlayElement("#image").height(),n=n+this.getOverlayElement("ul").height(),n-23};OvlControl.prototype.imagePositioning=function(){var t,n=this.getOverlayElement("#image").attr("src").substring(1);this.getOverlayElement("#image").width()>140&&!this.isPhoto?this.getOverlayElement("#image").css("width","140px"):this.isPhoto&&this.getOverlayElement("#image").css("width","185px");n=n.substring(n.indexOf("/")+1);t=n.substring(0,n.indexOf(".")).split("_");t[3]!==undefined&&t[3].indexOf("B")>-1&&this.getOverlayElement("#image").css({position:"absolute",bottom:"0px"})};OvlControl.prototype.centreOverlay=function(){var i,r=0,n,t;i=$(window).width();n=(i-20-this.getOverlayElement("#contentContainer").width())/2;n<0&&(n=0);r=$(window).height();t=r/2-this.getOverlayElement("#contentContainer").height()/2;t<0&&(t=0);this.overlayControl.css(this.cssStyle.left,n+this.cssStyle.px).css(this.cssStyle.top,t+this.cssStyle.px)};OvlControl.prototype.clearDownControl=function(){this.clearDownImage();this.getOverlayElement("#webMsgCount").remove();$("ul",this.getOverlayElement("#bodytext")).remove();this.getOverlayElement("#ovlOutBord").removeClass("Photo Icon Basic").css("height","");this.getOverlayElement("#contentContainer").css("height","");this.getOverlayElement("#imageContainer").css("height","");this.getOverlayElement("#imageDiv").css("height","");this.getOverlayElement("#image").css({position:"",bottom:"",width:"",height:""});this.getOverlayElement("#bodyContainer").css("height","");this.getOverlayElement("#bodytext").css("height","")};OvlControl.prototype.clearDownImage=function(){var n=this.getOverlayElement("#image");n.unbind("load");n.unbind("readystatechange");n.attr("src","");n.css(this.cssStyle.margin,"")};OvlControl.prototype.showWebAlert=function(n){var u,o,f,h,t,i,s,e,r;for(this.clearDownControl(),f={image:$("body").data("NewMessagesImage"),shortTextH1:$("body").data("NewMessagesTranslation"),shortTextH2:"",longText:"",button1:{text:$("body").data("ReadMessagesTranslation"),action:"[Read Messages]"},button2:{text:$("body").data("CloseTranslation"),action:"[Close]"}},this.message=f,this.setImage(f.image,!1,null),o=this.layoutStyle.icon,this.getOverlayElement("#ovlOutBord").addClass(o),this.showMsgDetails(f),r=$("<ul />"),r.append("<li>"+n.SU+(n.IM===pmFramework.impactId.highImportance||n.IM===pmFramework.impactId.important?'<span class="highImportanceExclaim">&nbsp;!<\/span><\/li>':"")),t=0;t<4;t++)isNullOrUndefined(n.otherWebMessages[t])||(n.otherWebMessages[t].IM===pmFramework.impactId.highImportance||n.otherWebMessages[t].IM===pmFramework.impactId.important?r.append("<li>"+n.otherWebMessages[t].SU+'<span class="highImportanceExclaim">&nbsp;!<\/span><\/li>'):r.append("<li>"+n.otherWebMessages[t].SU+"<\/li>"));r.appendTo($("#bodytext","#ovlMsg"));this.resizeOverlay();this.centreOverlay();u=1;n.otherWebMessages!==undefined&&(u+=n.otherWebMessages.length);h=this.getOverlayElement("#image");setTimeout(function(){i=$(".aEmails").html();i=i.replace("(","");i=i.replace(")","");s=/^\d+$/;s.test(i)&&(u=parseInt(i,10))},500);this.doResize(this.containerHeight());this.getOverlayElement("#imageDiv").append('<div id="webMsgCount">'+u+"<\/div>");this.getOverlayElement("#title").css("margin-top","10px");e=this.heightAboveBelowImage();this.getOverlayElement("#webMsgCount").css("top",e+1+this.cssStyle.px);this.getOverlayElement("#image").css("margin-top",e-3+this.cssStyle.px);this.getOverlayElement("#image").css("margin-bottom",e+3+this.cssStyle.px)};OvlControl.prototype.realignImage=function(){var i=this.getOverlayElement("#bodyContainer").outerHeight(!0),n=this.getOverlayElement("#image").height(),t;(!n||n<=0)&&(n=$("body").data("NewMessagesImageHeight"));t=(i-n)/2;this.getOverlayElement("#webMsgCount").css("top",t+1+this.cssStyle.px);this.getOverlayElement("#image").css("margin-top",t-3+this.cssStyle.px);this.getOverlayElement("#image").css("margin-bottom",t+3+this.cssStyle.px);this.centreOverlay()};OvlControl.prototype.showMessage=function(n){this.clearDownControl();this.message=n;this.setImage(n.image,!0,n)};OvlControl.prototype.showMessageRemainingItems=function(n){var t;n.image.match(this.layoutStyle.iconRegEx)?t=this.layoutStyle.icon:n.image.match(this.layoutStyle.photoRegEx)?(t=this.layoutStyle.photo,this.isPhoto=!0):t=this.layoutStyle.basic;this.getOverlayElement("#ovlOutBord").addClass(t);this.showMsgDetails(n);this.resizeOverlay();this.centreOverlay()};OvlControl.prototype.setImage=function(n,t,i){n=this.isWebMsgAlert?pmFramework.getCtlImagePath(n):pmFramework.getMsgImagePath(n);t?this.getOverlayElement("#image").bind("load readystatechange",function(){thisOvlControl.showMessageRemainingItems(i)}).attr("src",n):this.getOverlayElement("#image").bind("load readystatechange",function(){thisOvlControl.realignImage()}).attr("src",n)};OvlControl.prototype.showMsgDetails=function(n){this.showSubHeaderAndTitle(n);this.getOverlayElement("#bodytext").html(n.longText);this.getOverlayElement("#button1").html(n.button1.text);this.getOverlayElement("#button2").html(n.button2.text);this.getOverlayElement(".baseButton").each(function(){thisOvlControl.setupButton(this,n)});this.overlayControl.fadeIn(thisOvlControl.overlayFadeDuration);bet365.cmsCore.buttons.ApplyConsistentButtonsWidths(this.getOverlayElement(".baseButton"))};OvlControl.prototype.showSubHeaderAndTitle=function(n){n.shortTextH2!==""?(this.getOverlayElement("#subject").show().html(n.shortTextH2),this.getOverlayElement("#subject").css("margin-top","5px"),this.getOverlayElement("#title").css("margin-top","3px"),this.getOverlayElement("#title").html(n.shortTextH1)):(this.getOverlayElement("#subject").hide().html(""),this.getOverlayElement("#title").html(n.shortTextH1))};OvlControl.prototype.setupButton=function(n,t){var r,i;$(n).unbind("click").removeAttr("href");i='$("'+this.overlaySelector+'").fadeOut(thisOvlControl.overlayFadeDuration, function() {pmFramework.closeMessageAndOverlay($(".ovlMsgAnc"));});';r=this.buttonHandler.setupButtonAction(n,this.message[n.id],i);$._data(thisOvlControl.closeGadget[0],"events").click===undefined&&(bet365.Tracking!==undefined&&(i=bet365.Tracking.SetupTrackingElement(thisExpControl.closeGadget)+i),thisOvlControl.closeGadget.click(new Function(i)),$(thisOvlControl.closeGadget).data("track-id",t.id));$(n).data("track-id",t.id)};OvlControl.prototype.hoverHandlerIn=function(){$(this).css(thisOvlControl.cssStyle.backgroundPosition,"0px -20px")};OvlControl.prototype.hoverHandlerOut=function(){$(this).css(thisOvlControl.cssStyle.backgroundPosition,"0px 0px")};OvlControl.prototype.initialise=function(){this.overlayControl.removeClass("ExpandableOverlay").addClass("Overlay");this.getOverlayElement(".baseButton").hover(this.hoverHandlerIn,this.hoverHandlerOut);this.closeGadget=this.getOverlayElement("#dismiss");this.closeGadget.hover(this.hoverHandlerIn,this.hoverHandlerOut)};PmKeyValueCollection.prototype.addItem=function(n,t){return this.indexOf(n)===this.notExistIndex?(this.collection.push({key:n,value:t}),!0):!1};PmKeyValueCollection.prototype.containsKey=function(n){return this.indexOf(n)>this.notExistIndex};PmKeyValueCollection.prototype.containsValue=function(n){return this.indexOfValue(n)>this.notExistIndex};PmKeyValueCollection.prototype.indexOfCheck=function(n,t){for(var i=0;i<this.collection.length;i++)if(t&&this.collection[i].key==n||!t&&this.collection[i].name===n)return i;return this.notExistIndex};PmKeyValueCollection.prototype.indexOf=function(n){return this.indexOfCheck(n,!0)};PmKeyValueCollection.prototype.indexOfValue=function(n){return this.indexOfCheck(n,!1)};PmKeyValueCollection.prototype.removeItem=function(n){var t=this.indexOf(n);t!==this.notExistIndex&&this.collection.splice(t,1)};PmKeyValueCollection.prototype.clear=function(){this.collection=[]};PmPageProfile.prototype.isNullOrEmpty=function(n){return undefined===n||null===n||n.length===0};PmPageProfile.prototype.scoreRule=function(n,t){var i=0,r,f,u,e;if(!t&&(r=$("body").data("pageAttributes"),r&&r.pushWebMessagingRestrictToWebAlertsOnly&&r.pushWebMessagingRestrictToWebAlertsOnly==="true")||!this.positions.containsKey(n.PI)||!this.isNullOrEmpty(n.LS)&&n.LS===0&&0===this.loginOrSession)return 0;if(!this.isNullOrEmpty(n.AI))if(this.areas.contains(String(n.AI)))i+=1;else return 0;if(!this.isNullOrEmpty(n.GG))if(n.GG.toLowerCase()===this.gameGroupId.toLowerCase())i+=5;else return 0;if(!this.isNullOrEmpty(n.GI)){for(f=n.GI.split(","),e=!1,u=0;u<f.length;u++)if(f[u].toLowerCase()===this.gameId.toLowerCase()){i+=10;e=!0;break}if(!e)return 0}return i};PmMessageSchedule.prototype.scheduleMessage=function(n){this.scheduledMessages.push(n);this.setNextMessageDate()};PmMessageSchedule.prototype.getTimeUTC=function(n){return n.getTime()+n.getTimezoneOffset()*6e4};PmMessageSchedule.prototype.resetListener=function(){var n;null!==this.listenerMethod&&this.scheduledMessages.length>0&&this.nextMsgDate!==0&&(pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append("nextMessageDate: "+this.nextMsgDate+" - syncdTimeUTC: "+pmConfigParams.getSyncdTimeUTC()+"<br/>"),n=this.nextMsgDate-pmConfigParams.getSyncdTimeUTC(),n>1e3?(this.timeoutID=setTimeout(this.listenerMethod.toString(),n),pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append(this.nextMsg.MI+" ("+this.positionId+") set for "+n+"ms<br/>")):(this.nextMsg.SR.TT=0,this.nextMsg.SR.TD=0,this.nextMsg.SR.TTDelayExpired=!0,n=pmFramework.isHandlerControlAvailable(this.positionId)?1e3:5e3,pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append(this.nextMsg.MI+" ("+this.positionId+") display "+n+"ms<br/>"),this.timeoutID=setTimeout(this.listenerMethod.toString(),n)))};PmMessageSchedule.prototype.setNextMessageDate=function(){var n,t=new Date;for(t.setHours(t.getHours()+24),this.nextMsgDate=this.getTimeUTC(t),n=0;n<this.scheduledMessages.length;n++)this.scheduledMessages[n].SR.TT<this.nextMsgDate&&(this.nextMsgDate=this.scheduledMessages[n].SR.TT,this.nextMsg=this.scheduledMessages[n]);this.resetListener()};PmMessageSchedule.prototype.clearListener=function(){this.listenerMethod=null;this.timeoutID!==-1&&clearTimeout(this.timeoutID)};PmMessageSchedule.prototype.setListener=function(n){this.listenerMethod=n;this.resetListener()};PmMessageSchedule.prototype.isMessagePending=function(n){var t;for(n=n+1e3,t=0;t<this.scheduledMessages.length;t++)if(this.scheduledMessages[t].SR.TT<n)return!0;return!1};PmMessageSchedule.prototype.removeMessage=function(n){for(var i=!1,t=this.scheduledMessages.length-1;t>=0;t--)if(this.scheduledMessages[t].MI===n){this.scheduledMessages.splice(t,1);i=!0;break}i&&this.setNextMessageDate()};PmMessageSchedule.prototype.getPendingMessage=function(){$("#timeouts").append("getPendingMessage: "+this.scheduledMessages.length+"<br/>");var i,t,r,n;for(t=new Date,r=-1,n=0,t.setFullYear(2200,12,12),t=t.getTime(),n=0;n<this.scheduledMessages.length;n++)this.scheduledMessages[n].SR.TT<t&&(i=this.scheduledMessages[n],t=i.SR.TT,r=n);return r>=0&&(this.scheduledMessages.splice(r,1),this.setNextMessageDate(),i.SR.TT=0,i.SR.TD=0),i};PmMessageSchedule.prototype.clearAll=function(){var n=new Date;this.scheduledMessages.clear();this.nextMsgDate=n.setHours(n.getHours()+24);this.nextMsg=null;this.clearListener()};PmMessageCache.prototype.cacheMessage=function(n){var t;if(pmFramework.isDebug&&pmFramework.ttDebugInfo&&(isNullOrUndefined(n.SR)||(t=hasNonZeroValue(n.SR.TT)?"S":n.isGlobal?"G":"U",$("#timeouts").append("queuing msg: "+n.MI+" ("+n.SR.PI+") to queue: "+t+"<br/>"))),n.SR!==undefined&&hasNonZeroValue(n.SR.TT)){this.scheduledMessages.scheduleMessage(n);return}if(n.isGlobal){this.globalMessages.push(n);return}this.userMessages.push(n)};PmMessageCache.prototype.getNextMessage=function(){if(hasValue(this.globalMessages))return this.globalMessages.pop();if($("#timeouts").append("scheduledMessages.scheduledMessages : "+this.scheduledMessages.scheduledMessages+"<br/>"),$("#timeouts").append("this.scheduledMessages.isMessagePending : "+this.scheduledMessages.isMessagePending(pmConfigParams.getSyncdTimeUTC())+"<br/>"),$("#timeouts").append("pmConfigParams.getSyncdTimeUTC : "+pmConfigParams.getSyncdTimeUTC()+"<br/>"),$("#timeouts").append("get time : "+((new Date).getTime()+pmConfigParams.localTimeOffset)+"<br/>"),hasValue(this.scheduledMessages.scheduledMessages)&&this.scheduledMessages.isMessagePending(pmConfigParams.getSyncdTimeUTC()))return this.scheduledMessages.getPendingMessage();if(hasValue(this.userMessages)){var n=this.userMessages[0];return this.userMessages.splice(0,1),n}return null};PmMessageCache.prototype.removeMessage=function(n){this.deleteMessageFromCache(n,this.globalMessages);this.scheduledMessages.removeMessage(n);this.deleteMessageFromCache(n,this.userMessages)};PmMessageCache.prototype.deleteMessageFromCache=function(n,t){for(var i=t.length-1;i>=0;i--)if(t[i].MI===n){t.splice(i,1);break}};PmMessageCache.prototype.updateMessage=function(n){this.deleteMessage(n.MI);this.queueMessage(n)};PmMessageCache.prototype.clear=function(){this.globalMessages.clear();this.userMessages.clear();this.scheduledMessages.clearAll()};PmPositionCache.prototype.internalPositionId=function(n){return this.positionPrefix+n};PmPositionCache.prototype.addPosition=function(n){var i,t;t=this.internalPositionId(n);undefined===this[t]&&(this[t]=new PmMessageCache(n),this.positions.push(t),i=this.scheduledMsgExpiredCallback.replace("{0}",n),this[t].scheduledMessages.setListener(i))};PmPositionCache.prototype.getPosition=function(n){var t=this.internalPositionId(n);return this[t]};PmPositionCache.prototype.queueMessage=function(n,t){var i;n!==null&&t!==null&&(i=this.getPosition(t.PI),i!==null&&i.cacheMessage(n))};PmPositionCache.prototype.removeMessage=function(n){for(var t=0;t<this.positions.length;t++)this[this.positions[t]].removeMessage(n)};PmPositionCache.prototype.updateMessage=function(n){for(var t=0;t<this.positions.length;t++)this[this.positions[t]].updateMessage(n)};PmPositionCache.prototype.getNextMessage=function(n){var t,i;return(i=this.internalPositionId(n),this[i]!==undefined)?(t=this[i].getNextMessage(),$("#timeouts").append("getNextMessage: "+t+"<br/>"),null!==t&&this.removeMessage(t.MI),pmFramework.isDebug&&pmFramework.reportDebugInfo(1),t):null};Array.prototype.add=function(n){this.indexOf(n)===-1&&this.push(n)};Array.prototype.clear=function(){this.splice(0,this.length)};Array.prototype.contains=function(n){return this.indexOf(n)!==-1};Array.prototype.removeItem=function(n){var t=this.indexOf(n);this[t]>-1&&this.splice(t,1)};Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var r=this.length,t,i;for(t=Number(arguments[1])||0,t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r),i=t;i<r;i++)if(i in this&&this[i]===n)return i;return-1});TbControl.prototype.doRender=function(n){var t,r,u,f,e,i;n.shortText.length!=undefined&&n.shortText.length!=0&&(t=$(this.topLevelCtl),e=t.attr("id"),r=n.image.indexOf("x94")===-1?"TopBannerImageWithBorder":"",$("#TopBannerImage",this.topLevelCtl).attr("src",pmFramework.getMsgImagePath(n.image)).attr("class",r),$("span.headerText",this.topLevelCtl).text(n.shortTextH1),$("span.bodyText",this.topLevelCtl).text(n.longText),$("span.linkText",this.topLevelCtl).text(n.button1.text),u=new PmButtonHandler,f='var pmTBCtl = $("#'+e+'");pmTBCtl.slideUp("'+this.slideSpeed+'", function(){pmFramework.closeMessage(pmTBCtl)});',i=$("a#topBannerLink",this.topLevelCtl),i.data("track-id",n.id),$("#TopBannerClose",this.topLevelCtl).data("track-id",n.id),u.setupButtonAction(i,n.button1,f),t.slideDown(this.slideSpeed,function(){PmMessagingFramework.prototype.resizeOverlayBackground()}))};TbControl.prototype.closeUp=function(){var n=$(thisTbControl.topLevelCtl);bet365.Tracking!==undefined&&bet365.Tracking.TrackEvent(this);n.slideUp(thisTbControl.slideSpeed,function(){pmFramework.closeMessage(n)})};format=function(n,t){var i=1;return t=typeof t=="object"?t:Array.prototype.slice.call(arguments,1),n.replace(/\{([^}]+)\}/gm,function(){return t[arguments[i]]})};String.prototype.format=function(n){return format(this,n)};String.prototype.startsWith=function(n){return this.match("^"+n)===n};pmFramework=new PmMessagingFramework;PmMessagingFramework.prototype.pmEmbedConnectionSWF=function(n,t,i){var e,o,r,s="<div/>",u="pmSWFdiv",f;if(typeof $===undefined)throw new Error("jQuery not in page - PushMessaging pre-requisite");if(swfobject===undefined)throw new Error("swfobject.js not in page - PushMessaging pre-requisite");e=window.location.protocol+"//"+window.location.host+i;o={allowscriptaccess:"always",allownetworking:"all",base:e};r={id:"pmConnObj"};swfobject&&swfobject.removeSWF(r.id);f=$(s);f.attr("id","pmSWFparentDiv");f.appendTo(document.body);$("#"+u).length===0&&$(s).attr("id",u).appendTo("#pmSWFparentDiv");swfobject.embedSWF(n.Path,u,1,1,n.FlashVer,!1,t,o,r,function(){$("#pmSWFparentDiv").css("position","absolute");$("#pmSWFparentDiv").css("left","-500px");$("#pmSWFparentDiv").css("top","-500px");setTimeout(function(){pmFramework.onPushMessageDataCalled||onPushMessageError()},5e3)})};PmMessagingFramework.prototype.triggerRepost=function(){this.pageProfileDiscovered=!1;addConnectionSWF()};PmMessagingFramework.prototype.discoverPageProfile=function(){this.pageProfileDiscovered||(this.discoverAreasOnPage(),this.discoverPositionsOnPage(),this.discoverGameGroupOnPage(),this.discoverGameOnPage(),this.discoverLoginOrSession(),this.pageProfileDiscovered=!0,this.isDebug&&this.reportDebugInfo(0))};PmMessagingFramework.prototype.reportPageProfileInfo=function(n,t){var i=t!==undefined?t:"";return $("div["+n+"]").each(function(){i+=(i.length>0?", ":"")+$(this).attr(n)}),i.toString()};PmMessagingFramework.prototype.reportAreasOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.areaId,"0")};PmMessagingFramework.prototype.reportPositionsOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.positionId)};PmMessagingFramework.prototype.reportGameSectionOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.gameSection)};PmMessagingFramework.prototype.reportQueued=function(){var t="<br/>",n,i=t;return $.each(pmFramework.pagePmPositionCache.positions,function(r,u){n=pmFramework.pagePmPositionCache[u];i+="{0}{1}{0}G:{2}{0}S:{3}{0}U:{4}{0}".format([t,u,n.globalMessages.length,n.scheduledMessages.scheduledMessages.length,n.userMessages.length])}),i};PmMessagingFramework.prototype.reportDebugInfo=function(n){if(this.isDebug){var i=$("body"),t='<div id="pmDebugInfo"><span>Areas: {0}<\/span><br/><span>Positions: {1}<\/span><br/><span>GameSection: {2}<\/span><br/><span>LoginSessionFlag: {3}<\/span><br/><br/><span>Queues: {4}<\/span><\/div>';t=t.format([this.reportAreasOnPage(),this.reportPositionsOnPage(),this.reportGameSectionOnPage(),pmConfigParams.loginSession,this.reportQueued()]);i.find("div#pmDebugInfo").remove();i.append(t+(n===0?'<div id="timeouts"><\/div>':""));setTimeout(function(){pmFramework.reportDebugInfo(1)},6e3)}};PmMessagingFramework.prototype.domElementDisplayed=function(n){var t=!1;return $(n).each(function(){if($(this).css("display")!=="none")return t=!0}),t};PmMessagingFramework.prototype.renderOverlayBackground=function(n){var t=$("<div />").attr("id","overlayBackground").css({position:"absolute",top:"0px",left:"0px",backgroundColor:"#000",zIndex:"9999"}),i=$(document).height();t.css({width:"100%",height:i}).fadeTo(700,.7).appendTo("body");$(n).css("z-index","10001").appendTo("body")};PmMessagingFramework.prototype.resizeOverlayBackground=function(){var n=$(document).height();$("#overlayBackground").css({height:n})};PmMessagingFramework.prototype.removeOverlayBackground=function(){$("#overlayBackground").remove()};PmMessagingFramework.prototype.hasDataFlag=function(){var n=!1;return $("body").data!==null&&($("body").data("DownloadPrompt")?(n=!0,$("body").removeData("DownloadPrompt")):pmFramework.canDisplayMessage()||(n=!0)),n};PmMessagingFramework.prototype.isDisplayingExistingPopUp=function(n){var i,t;if(this.domElementDisplayed("[id$=_PopupPromptPanel]")||this.domElementDisplayed("[id$=_NoFlashPopupPromptPanel]")||this.domElementDisplayed("[id$=_ImportantAnnouncementBorder]")||this.domElementDisplayed("[id$=_FailLoginUpdatePanel]")||this.domElementDisplayed("[id$=_KYCPopupPanel]")||this.domElementDisplayed("[id$=KYCIFrame]")||this.domElementDisplayed("[id$=MembersIFrame]")||this.domElementDisplayed("[id$=DownloadPopupContainer]"))this.displayingExistingPopup=!0,n&&setTimeout(function(){pmFramework.isDisplayingExistingPopUp(!0)},5e3);else{if(this.displayingExistingPopup)for(t=0;t<pmFramework.pageProfile.positions.collection.length;t++)i=this.pagePmPositionCache.getNextMessage(t),null!==i&&this.processMessage(i);this.displayingExistingPopup=!1}return this.displayingExistingPopup};PmMessagingFramework.prototype.canDisplayMessage=function(){return!this.isDisplayingExistingPopUp(!1)};PmMessagingFramework.prototype.setMsgIdShown=function(n,t){t?$(n).attr({pmmsgid:t.MI,pmmsgisglobal:t.isGlobal,pmmsgexpiry:t.ET,pmpushgraphicid:isNullOrUndefined(t.graphicMsg)?"0":t.graphicMsg.message.id}):n.removeAttr(this.customAttribs.msgId).removeAttr(this.customAttribs.isGlobal).removeAttr(this.customAttribs.msgExpiry).removeAttr(this.customAttribs.pushGraphicId)};PmMessagingFramework.prototype.getMsgIdShown=function(n){return $(n).attr(pmFramework.customAttribs.msgId)};PmMessagingFramework.prototype.isMsgShownAtPosition=function(n){var t,i;return t=$(this.msgHandlerSelector.format(n)),hasValue(t)&&(i=this.getMsgIdShown(t)),i!==undefined};PmMessagingFramework.prototype.getDoRenderFunction=function(n){var i,t;return($.each(this.positionId,function(t,r){if(r===n)return i="doRender_"+t,!1}),t=window[i],t===undefined||typeof t!="function")?(raiseError("push message error - cannot find: "+i+"()"),null):t};PmMessagingFramework.prototype.sendMsgToHandlerControl=function(n,t){var i,u,r;if(r=this.getDoRenderFunction(t.SR.PI),n.length>0&&null!==r){i=n[0];try{this.isDebug&&$("#timeouts").append("Render msg: "+t.MI+" ("+String(t.SR.PI)+")<br/>");u=isNullOrUndefined(t.graphicMsg)?r(t,i):r(t.graphicMsg.message,i,t);(u===undefined||u!==this.renderFailCode)&&this.setMsgIdShown(i,t)}catch(f){raiseError(f)}}};PmMessagingFramework.prototype.processNextQueuedMessage=function(n){var t=null,i,r=0;for(typeof n=="string"&&(n=parseInt(n,10)),i=this.getConflictingControlPositions(n),$("#timeouts").append("processNextQueuedMessage position  called pos: "+i.length+"<br/>");null===t&&r<i.length;)t=this.pagePmPositionCache.getNextMessage(i[r]),$("#timeouts").append("inside loop pos: "+r+" swf msg: "+t+"<br/>"),r++;$("#timeouts").append("processNextQueuedMessage called pos: "+t+"<br/>");null!==t&&this.processMessage(t)};PmMessagingFramework.prototype.onScheduledMessage=function(n){this.isDebug&&this.ttDebugInfo&&$("#timeouts").append("onScheduledMsg called pos: "+n+"<br/>");this.processNextQueuedMessage(n)};PmMessagingFramework.prototype.getConflictingControlPositions=function(n){switch(n){case this.positionId.overlay:case this.positionId.overlayExpandable:return[this.positionId.overlay,this.positionId.overlayExpandable];default:return[n]}};PmMessagingFramework.prototype.isHandlerControlAvailable=function(n){for(var t=!0,r=0,i=this.getConflictingControlPositions(n);t&&r<i.length;)t=!this.isMsgShownAtPosition(i[r]),r++;return t};PmMessagingFramework.prototype.processGameLobbyWindowRules=function(n){var r=0,o=!1,u,t,f,i,e;$("div["+this.customAttribs.positionId+"]").each(function(){return r=parseInt($(this).attr(pmFramework.customAttribs.positionId),0),r===pmFramework.positionId.gameWindow||r===pmFramework.positionId.lobbyWindow?(o=!0,!1):void 0});o||(n.rules=$.grep(n.rules,function(r){return r.PI===pmFramework.positionId.gameWindow||r.PI===pmFramework.positionId.lobbyWindow?(t=!1,hasValue(r.GI)?(u=r.GI,t=!0):hasValue(r.GG)?t=!0:(r.AI===0||r.AI===1||r.AI===9||r.AI===10)&&(t=pmFramework.pageProfile.areas.contains(String(r.AI))),t&&(e=pmResolver.instance.getAdditionalData(),e&&e!=""&&(f=$.parseJSON(pmResolver.instance.getAdditionalData())),i=f&&hasValue(n.MI)?f.seenLobbyMessages.indexOf(n.MI)==-1?!0:!1:!0,i&&pmFramework.setAdditionalData(pmFramework.additionalDataAttribs.game,(hasValue(r.AI)?r.AI:"")+"-"+(hasValue(u)?u:"")+"-"+(hasValue(n.MI)?n.MI:"")+"-"+(hasValue(r.GG)?r.GG:"")+"-"+(hasValue(n.TY)?n.TY:"")+"-"+(hasValue(n.layouts[0].LI)?n.layouts[0].LI:""))),!1):!0}))};PmMessagingFramework.prototype.selectRule=function(n){for(var i,u,f=0,r=n.rules,t=0;t<r.length;t++)i=this.pageProfile.scoreRule(r[t],n.isWebAlert),i>f&&(f=i,u=r[t]);return u};PmMessagingFramework.prototype.parseShortText=function(n){var f,o,t,i,r,e,u;if(!isNullOrUndefined(n.message)&&n.message.shortText.length>0){if(o=n.message.shortText.match("\\|\\|"),o){for(i="",r=n.message.shortText.split("||"),t=0;t<=r.length-1;t++)if(r[t]!=="")if(r[t].indexOf("|")>-1)for(e=r[t].split("|"),u=0;u<e.length;u++)i="{0}<h{1}>{2}<\/h{1}>".format([i,t+1+u,e[u]]);else i="{0}<h{1}>{2}<\/h{1}>".format([i,t+1,r[t]]);i="<s>{0}<\/s>".format(i)}else i="<s><h1>"+n.message.shortText+"<\/h1><\/s>";for(t=1;t<=3;t++)f=String(t),n.message["shortTextH"+f]=$(i).find("h"+f).text()}return n};PmMessagingFramework.prototype.hasMsgHighImportance=function(n){for(var t=0;t<n.length;t++)if(this.isMsgHighImportance(n[t]))return!0;return!1};PmMessagingFramework.prototype.isMsgImportantAnnouncement=function(n){return this.isMsgHighImportance(n)&&this.ispushGraphic(n)};PmMessagingFramework.prototype.isMsgHighImportance=function(n){return n.IM===this.impactId.highImportance};PmMessagingFramework.prototype.displayDropdown=function(n){for(var i,r,t=0;t<n.length;t++)if(i=n[t],r=!isNullOrUndefined(i.templates)&&i.templates.length>0,i.isWebAlert||r)return!1;return!0};PmMessagingFramework.prototype.isValidForWebAlert=function(n){var t=$("body").data("pageAttributes"),r,i;if(t===null||t===undefined||!isNullOrUndefined(n.templates)&&n.templates.length>0)return!1;r=t.pushWebMessagingDuringSession==="True";i=!1;switch(n.IM){case this.impactId.highImportance:i=t.pushWebMessagingHighImportance==="True";break;case this.impactId.important:i=t.pushWebMessagingImportant==="True";break;case this.impactId.normal:i=t.pushWebMessagingNormal==="True"}return i&&(pmFramework.isFirstLoadAfterLogin||r)};PmMessagingFramework.prototype.isMsgImportant=function(n){return n.IM===this.impactId.important};PmMessagingFramework.prototype.isMsgPushGraphic=function(n){return hasValue(n.templates)&&n.templates[0].layouts.length>0};PmMessagingFramework.prototype.simplifyMsgData=function(n,t){var r,i=jQuery.extend(!0,{},n);if(i.lngId=t,i.isGlobal=i.TY==="G",hasValue(i.templates)&&(i.rules=i.templates[0].rules,i.layouts=i.templates[0].layouts,delete i.templates),i.hasPushGraphic=hasValue(i.layouts),i.ET=convertTimeSecsToMs(i.ET),hasValue(i.rules))for(r=0;r<i.rules.length;r++)i.rules[r].TT=convertTimeSecsToMs(i.rules[r].TT),hasNonZeroValue(i.rules[r].TD)&&(i.rules[r].TT=pmConfigParams.getSyncdTimeUTC()+convertTimeSecsToMs(i.rules[r].TD),this.isDebug&&this.ttDebugInfo&&($("#timeouts").append(i.MI+" - TT calcd as "+i.rules[r].TT+"<br/>"),$("#timeouts").append(i.MI+" - Time now without offset "+(new Date).getTime()+"<br/>"),$("#timeouts").append(i.MI+" - Synched time UTC "+pmConfigParams.getSyncdTimeUTC()+"<br/>")));return i};PmMessagingFramework.prototype.removePopup=function(n){this.domElementDisplayed(n)&&$(n).fadeOut(500)};PmMessagingFramework.prototype.removeOtherPopupsForGlobalMsg=function(n){n.isGlobal&&this.removePopup("[id$=_ImportantAnnouncementBorder]")};PmMessagingFramework.prototype.getGraphicMsgStatusCode=function(n){return hasValue(n)?parseInt(n.status.code,0):-1};PmMessagingFramework.prototype.onGetPushGraphicData=function(n){var t;try{t=this.xmlToJSON($(n).find("pushMessageResponse")[0]);t=this.parseShortText(t)}catch(i){raiseError("error converting xml to json: "+i)}return t};PmMessagingFramework.prototype.isIE6=function(){var n=bet365.GetBrowser();return n=="IE6"};PmMessagingFramework.prototype.beforeAjaxSend=function(n,t,i){n.callbackContextInfo=i};PmMessagingFramework.prototype.getPushGraphicData=function(n,t,i,r){var f,h="",e,u,o,s=null,c;o="GET";isNullOrUndefined(t.isTestMessage)||t.isTestMessage!==!0?(t.isGlobal?(u=this.gatewayServiceName.getGlobal,h="?GI={0}&LI={1}".format([n,t.lngId]),s="{ }"):(u=this.gatewayServiceName.getUser,o="POST",s="GI={0}&LI={1}".format([n,t.lngId])),f=pmConfigParams.gatewayAPIPath+u):(u="GetMessage.aspx",f=window.location.protocol+"//"+window.location.host+(window.location.host.indexOf("localhost")>-1?"/"+window.location.pathname.split("/")[1]:"")+"/PushMessaging/GatewayAPI/"+u);try{return $.ajax({type:o,url:f+h,async:i!==undefined,data:s,timeout:this.gatewayApiTimeout,success:function(t,i,r){c=parseInt($(t).find("pushMessageResponse status code").text(),0);c===0?(e=pmFramework.onGetPushGraphicData(t),r.graphicMsg=e):raiseError("Response status code error from "+u+"("+f+"): "+$(t).find("pushMessageResponse status").text()+" for GraphicId:"+n)},error:function(n,t){raiseError("Error calling PushMessaging-"+u+"("+f+") service: "+t+"-"+n.status+":"+n.responseText)},beforeSend:function(n,t){pmFramework.beforeAjaxSend(n,t,r)},complete:i}),e}catch(l){raiseError("Error calling PushMessaging-"+u+" service: "+l)}};PmMessagingFramework.prototype.getPushGraphicFromLayout=function(n,t){var u,r,i;if(u=n===this.positionId.overlayExpandable?this.positionId.overlayShort:n,r=this.getLayoutForPosition(u,t),!r||(i=this.getPushGraphicData(r,t),i!==undefined&&!hasNonZeroValue(this.getGraphicMsgStatusCode(i))))return i};PmMessagingFramework.prototype.processSwfMessage=function(n){var t,i,r;if(this.processGameLobbyWindowRules(n),t=this.selectRule(n),isNullOrUndefined(t)){for(i in n.rules)if(n.rules[i]!==null&&n.rules[i].AI===2){r=this.pagePmPositionCache.getPosition(9);isNullOrUndefined(r)||r.cacheMessage(n);break}return}return n.SR=t,n};PmMessagingFramework.prototype.processMessage=function(n){var t,o,i,u,f,s,e,r;if(($("#timeouts").append("processMessage called pos: "+n+"<br/>"),n.hasPushGraphic)&&(n=pmFramework.processSwfMessage(n),n!=undefined)&&(t=n.SR,r=!1,t.LS==1?r=!0:t.LS==0&&pmFramework.isFirstLoadAfterLogin&&pmFramework.allowedLoggedInMessages!=null&&$.inArray(n.MI,pmFramework.allowedLoggedInMessages)&&(r=!0),r))if(s=hasNonZeroValue(t.TT)&&t.TT>pmConfigParams.getSyncdTimeUTC()||hasNonZeroValue(t.TD),i=s?!0:!1,o=!i,u=this.msgHandlerSelector.format(t.PI),f=$(u),hasValue(f)){if(o)if(this.isHandlerControlAvailable(t.PI)&&(n.MHR>this.mhrValues.global?this.canDisplayMessage():!0)){if(e=n.isWebAlert!==undefined&&n.isWebAlert===!0,e&&!this.highImportanceMessageCanBeShown(n.MI))return;if(!e){if(n.graphicMsg=this.getPushGraphicFromLayout(t.PI,n),isNullOrUndefined(n.graphicMsg))return;n.isGlobal&&this.removeOtherPopupsForGlobalMsg(n)}pmFramework.isDisplayingExistingPopUp(!0)?i=!0:this.sendMsgToHandlerControl(f,n)}else i=!0;i&&(this.pagePmPositionCache.queueMessage(n,t),this.isDebug&&pmFramework.reportDebugInfo(1))}else raiseError("no msgHandler control(s) matched selector: "+u)};PmMessagingFramework.prototype.xmlToJSON=function(n){var u={},t,r;if(!isNullOrUndefined(n.attributes))for(t=0;t<n.attributes.length;t++)u[n.attributes[t].nodeName]=n.attributes[t].value;for(t=0;t<n.childNodes.length;t++){var i=n.childNodes[t],f=i.childNodes!==null,e=!0;if(f)for(r=0;r<i.childNodes.length;r++)if(i.childNodes[r].nodeType!==3){e=!1;break}u[i.nodeName]=f&&e?$(i).text():this.xmlToJSON(i)}return u};PmMessagingFramework.prototype.determineMHR=function(n){return n.isGlobal?this.mhrValues.global:this.isMsgHighImportance(n)?this.mhrValues.highImportanceWebOnly:hasValue(n.templates)&&n.templates[0].layouts.length>0?this.mhrValues.pushGraphic:this.mhrValues.normalImportantWebOnly};PmMessagingFramework.prototype.mhrSort=function(n,t){return n.MHR-t.MHR};PmMessagingFramework.prototype.prioritiseMessages=function(n){if(n.messages.length===0)return n.messages;for(var t=0;t<n.messages.length;t++)n.messages[t].MHR=this.determineMHR(n.messages[t]);return n.messages.sort(PmMessagingFramework.prototype.mhrSort),this.configureOverlayMessages(n)};PmMessagingFramework.prototype.configureOverlayMessages=function(n){var r,t,u,f;if(n.messages.length===0)return n.messages;var i=[],e=[],o=[],s=[];for(r=0;r<n.messages.length;r++)t=n.messages[r],t.AC!==null&&(t.isGlobal=t.TY==="G",t.isWebAlert=!1,!t.isGlobal&&this.isValidForWebAlert(t)?i.push(t):PmMessagingFramework.prototype.IsPushGraphic(t)?o.push(t):e.push(t));return i.length>0&&(u=i[0],u.isWebAlert=!0,i.splice(0,1),f=i.concat(e),f.sort(PmMessagingFramework.prototype.mhrSort),f.reverse(),u.otherWebMessages=f,s.push(this.addWebAlertOverlayPushGraphic(u))),o.concat(e,s)};PmMessagingFramework.prototype.IsPushGraphic=function(n){return!isNullOrUndefined(n.templates)&&n.templates.length>0};PmMessagingFramework.prototype.addWebAlertOverlayPushGraphic=function(n){var i,t;if(!isNullOrUndefined(n.templates)&&n.templates.length>0?(i=jQuery.extend(!0,{},n),i.IM=0,i.isCloned=!0,pmFramework.pmData.messages.push(i),delete n.templates.rules,delete n.templates.layouts):n.templates=[{GI:0,NR:1}],n.templates[0].rules=[{LS:1,AI:0,PI:1,TD:0,TT:0,GI:"",GG:""}],n.templates[0].layouts=[{ST:"",LI:0,PI:1}],n.hasPushGraphic=!0,n.isWebAlert=!0,n.otherWebMessages===undefined)n.otherWebMessages=[];else for(t=0;t<n.otherWebMessages.length;t++)n.otherWebMessages[t].MHR===this.mhrValues.pushGraphic&&this.addWebAlertOverlayPushGraphic(n.otherWebMessages[t]);return n};PmMessagingFramework.prototype.processMessages=function(n){var t,i,r=!1;for(this.discoverPageProfile(),n.messages=this.prioritiseMessages(n),n.HT===this.headerType.fullLoad?this.showMsgDropDown=this.displayDropdown(n.messages):this.hasMsgHighImportance(n.messages)&&this.isMsgHighImportance(n.messages[0])&&(n.messages[0].otherWebMessages===undefined&&(n.messages[0].otherWebMessages=[]),n.messages[0].otherWebMessages=n.messages[0].otherWebMessages.concat(iboData.messages)),t=0;t<n.messages.length;t++)i=this.simplifyMsgData(n.messages[t],n.LI),i.AC===this.messageAction.add?(i.isGlobal||i.isCloned||this.pageProfile.headerDropDownAvailable&&(iboData.addMessage(i),r=!0,(n.messages[t].otherWebMessages==null||n.messages[t].otherWebMessages.length>0)&&(this.addOtherWebMessages(n,t),n.messages[t].otherWebMessages==null&&(this.showMsgDropDown=this.displayDropdown(n.messages)))),this.processMessage(i)):i.AC===this.messageAction.Delete&&this.pageProfile.headerDropDownAvailable&&(iboData.removeMessage(i),r=!0,iboData.messages.length==0&&(this.showMsgDropDown=!1));r?this.showMsgDropDown&&this.isHandlerControlAvailable(pmFramework.positionId.overlay)&&$("#iboAnchor").show(iboData.effectDuration):iboData.renderMessages()};PmMessagingFramework.prototype.addOtherWebMessages=function(n,t){for(var r,u=n.messages[t].otherWebMessages==null?1:n.messages[t].otherWebMessages.length,i=0;i<u;i++)r=this.simplifyMsgData(n.messages[t].otherWebMessages==null?n.messages[t]:n.messages[t].otherWebMessages[i],n.LI),r.AC===this.messageAction.add&&(r.isGlobal||this.pageProfile.headerDropDownAvailable&&iboData.addMessage(r))};PmMessagingFramework.prototype.discoverAreasOnPage=function(){var n;$("["+this.customAttribs.areaId+"]").each(function(){n=$(this).attr(pmFramework.customAttribs.areaId).split(" ");for(var t=0;t<n.length;t++)pmFramework.pageProfile.areas.add(n[t])})};PmMessagingFramework.prototype.discoverPositionsOnPage=function(){var n;$("["+this.customAttribs.positionId+"]").each(function(){var t,i;for(n=$(this).attr(pmFramework.customAttribs.positionId).split(" "),t=0;t<n.length;t++)i=parseInt(n[t],0),i!==pmFramework.positionId.headerDropDown?(pmFramework.pagePmPositionCache.addPosition(i),pmFramework.pageProfile.positions.addItem(i,null)):pmFramework.pageProfile.headerDropDownAvailable=!isNullOrUndefined(iboData)})};PmMessagingFramework.prototype.discoverGameGroupOnPage=function(){$("["+this.customAttribs.gameSection+"]").each(function(){pmFramework.pageProfile.gameGroupId=$(this).attr(pmFramework.customAttribs.gameSection)})};PmMessagingFramework.prototype.discoverGameOnPage=function(){$("["+this.customAttribs.gameId+"]").each(function(){pmFramework.pageProfile.gameId=$(this).attr(pmFramework.customAttribs.gameId)})};PmMessagingFramework.prototype.discoverLoginOrSession=function(){pmFramework.pageProfile.loginOrSession=pmConfigParams.loginSession};PmMessagingFramework.prototype.onUpdatePushGraphicStatusResponse=function(n){try{return this.xmlToJSON($(n).find("pushMessageResponse")[0])}catch(t){raiseError("error converting xml to json: "+t)}};PmMessagingFramework.prototype.updatePushGraphicStatus=function(n){var i,r,t,u,f;if(n===undefined){raiseError("error in PmMessagingFramework.updatePushGraphicStatus - pushGraphicId undefined");return}t=this.gatewayServiceName.readUser;i=pmConfigParams.gatewayAPIPath+t;u="GI={0}&ST=2".format([n]);try{return $.ajax({type:"POST",url:i,data:u,async:!0,timeout:this.gatewayApiTimeout,success:function(u){f=parseInt($(u).find("pushMessageResponse status code").text(),0);f===0?r=pmFramework.onUpdatePushGraphicStatusResponse(u):raiseError("Response status code error from "+t+"("+i+"): "+$(u).find("pushMessageResponse status").text()+" for push graphicId:"+n)},error:function(i,r){raiseError("Error calling PushMessaging-"+t+" service: "+r+"-"+i.status+":"+i.responseText+" graphicId: "+n)}}),r}catch(e){raiseError("Error calling PushMessaging-UpdateMessage service: "+e)}};PmMessagingFramework.prototype.setAdditionalData=function(n,t){var u=new Date,i,f,e,r,o;if(o=$("body").data("HideMessageForHours")!=undefined?$("body").data("HideMessageForHours"):12,u.setHours((new Date).getHours()+o),i=pmFramework.getAdditionalData(),i===""&&(i={highImportanceMsgs:[],seenLobbyMessages:[]}),n===pmFramework.additionalDataAttribs.highImportance)for(f={msgId:t,expires:u.valueOf()},i.highImportanceMsgs.push(f),r=0;r<i.highImportanceMsgs.length;r++)e=i.highImportanceMsgs[r],new Date(e.expires).valueOf()<(new Date).valueOf()&&i.highImportanceMsgs.splice(r,1);pmResolver.instance.setAdditionalData(JSON.stringify(i))};PmMessagingFramework.prototype.getAdditionalData=function(){var n=pmResolver.instance.getAdditionalData(),t="";return n&&n!=""&&(t=$.parseJSON(pmResolver.instance.getAdditionalData())),t};PmMessagingFramework.prototype.highImportanceMessageCanBeShown=function(n){var i=pmFramework.getAdditionalData(),t,r=!0;if(i!=="")for(t=0;t<i.highImportanceMsgs.length;t++)if(i.highImportanceMsgs[t].msgId==n){new Date(i.highImportanceMsgs[t].expires).valueOf()>(new Date).valueOf()&&(r=!1);break}return r};PmMessagingFramework.prototype.baseUrl=function(){return"{0}//{1}/".format([document.location.protocol,document.location.hostname])};PmMessagingFramework.prototype.closeMessageAndOverlay=function(n){var t=this;setTimeout(function(){t.closeMessage(n);t.removeOverlayBackground()},100)};PmMessagingFramework.prototype.closeMessage=function(n){var t={};$.each(n[0].attributes,function(){t[this.name.toLowerCase()]=this.value});this.setMsgIdShown(n,null);n.attr(this.customAttribs.msgId)!==undefined&&raiseError("pmmsgid attribute not removed!");t.pmmsgisglobal===undefined&&raiseError("closeMessage - pmmsgisglobal undefined!");t.pmmsgisglobal===(!0).toString()?pmFramework.closeGlobalMessage(t.pmmsgid,t.pmmsgexpiry):hasNonZeroValue(t.pmpushgraphicid)?pmFramework.closeTargetedMessage(t.pmpushgraphicid):this.setAdditionalData(this.additionalDataAttribs.highImportance,t.pmmsgid);pmFramework.processNextQueuedMessage(t.pmpositionid)};PmMessagingFramework.prototype.closeGlobalMessage=function(n,t){pmResolver.instance.setMessageAsRead(n,t)};PmMessagingFramework.prototype.closeTargetedMessage=function(n){this.updatePushGraphicStatus(n)};PmMessagingFramework.prototype.getLayoutForPosition=function(n,t){var i,r;if(hasValue(t.layouts))for(i=0;i<t.layouts.length;i++)if(stringToInt(t.layouts[i].PI)===n)return t.layouts[i].LI;return raiseError("layout missing from received data for msgId:"+t.MI),t.isGlobal&&(r=pmResolver.instance,r.setMessageAsRead(t.MI,t.ET)),null};PmMessagingFramework.prototype.getMsgImagePath=function(n){return pmConfigParams.messageImagePath+n};PmMessagingFramework.prototype.getCtlImagePath=function(n){return typeof pmConfigParams!="undefined"?pmConfigParams.controlImagePath+n:null};PmMessagingFramework.prototype.createTestLayout=function(n,t){return{LI:n,PI:t}};PmMessagingFramework.prototype.createTestRule=function(n,t,i,r,u,f,e){return{LS:n,AI:t,PI:i,TD:r,TT:u,GI:f,GG:e}};PmMessagingFramework.prototype.createTestMessage=function(n,t,i,r,u,f,e,o){var s={MI:n,AC:t,IM:i,ST:r,TY:u,SU:f,ET:e,NG:o,isTestMessage:!0};return s.rules=[],s.layouts=[],s};PmMessagingFramework.prototype.createTestHeader=function(n,t,i,r,u){var f={HT:n,HR:t,UI:i,PC:r,LI:u};return f.messages=[],f};PmMessagingFramework.prototype.getTestScenarioNames=function(){return["WebAlert","NormalImportWebMsgs","Expandable","Overlay","TopBanner","GameWindow","OptInButton","PlayNowTest"]};PmMessagingFramework.prototype.createTestScenario=function(n){var i,t;i=this.createTestHeader("F",1,"123",pmConfigParams.productCode,1);switch(n){case 1:t=this.createTestMessage(0,"A",3,"","","High importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",2,"","","Important importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",1,"","","Normal importance web message",null,0);i.messages.push(t);break;case 2:t=this.createTestMessage(0,"A",2,"","","Important importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",1,"","","Normal importance web message",null,0);i.messages.push(t);break;case 3:t=this.createTestMessage(0,"A",1,"","G","Message 3",null,0);t.rules.push(this.createTestRule(1,0,13,null,null,null,null));t.layouts.push(this.createTestLayout(302,2));t.layouts.push(this.createTestLayout(303,3));i.messages.push(t);break;case 4:t=this.createTestMessage(0,"A",1,"","G","Message 4",null,0);t.rules.push(this.createTestRule(1,0,1,null,null,null,null));t.layouts.push(this.createTestLayout(303,1));i.messages.push(t);break;case 5:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,0,9,null,null,null,null));t.layouts.push(this.createTestLayout(301,9));i.messages.push(t);break;case 6:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,2,10,null,null,null,"FeaturedGames"));t.layouts.push(this.createTestLayout(300,10));t.rules.push(this.createTestRule(1,3,10,null,null,"fbr",null));t.layouts.push(this.createTestLayout(301,10));i.messages.push(t);break;case 7:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,1,1,null,null,null,null));t.layouts.push(this.createTestLayout(300,1));i.messages.push(t);break;case 8:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,1,1,null,null,null,null));t.layouts.push(this.createTestLayout(300,1));i.messages.push(t)}return i};PmMessagingFramework.prototype.pushTestScenario=function(n){onPushMessageData(this.createTestScenario(n))};PmMessagingFramework.prototype.onPushMessageDataInternal=function(){this.pmData!==null&&pmFramework.processMessages(data)};PmMessagingFramework.prototype.setGamesGroupAttributes=function(n){n!==undefined&&($("[pmgamessectionid]",n.context).removeAttr("pmgamessectionid").removeAttr("pmareaid"),$(n.activeCssClass,n.context).attr("pmgamessectionid",n.sectionName).attr("pmareaid",2),this.pageProfile.gameGroupId=n.sectionName,this.processNextQueuedMessage(9))};$(document).ready(function(){if(pmFramework.isDebug){var r,n,t,i;for($("span.spanTime").click(function(){i.slideDown("slow")}),r='<a id="pmTestLink{0}" onclick="pmFramework.pushTestScenario({0})">{1}<\/a><span>&nbsp;|&nbsp;<\/span>',t=pmFramework.getTestScenarioNames(),i=$("span.spanTime").append('<div id="testmessages"/>').find("div#testmessages"),n=1;n<=t.length;n++)i.append(r.format([n,t[n-1]]))}});NewIboData.prototype.GetMaxMsgChars=function(){var n=$("body").data("pageAttributes"),t=38;return n!==null&&n!==undefined&&n.pushWebMessagingDropdownMaxChars!==null&&n.pushWebMessagingDropdownMaxChars!==undefined&&(t=n.pushWebMessagingDropdownMaxChars),t};NewIboData.prototype.removeMessage=function(n){this.contains(n)&&(this.messages.splice(this.indexOf(n),1),this.renderMessages())};NewIboData.prototype.getMessageId=function(n){return"msg_"+n.MI};NewIboData.prototype.indexOf=function(n){for(var t=0;t<this.messages.length;t++)if(this.messages[t].MI==n.MI)return t;return this.notFoundIndex};NewIboData.prototype.contains=function(n){return this.indexOf(n)>this.notFoundIndex};NewIboData.prototype.addMessage=function(n){if(!this.contains(n)){for(var t=0,t=0;t<this.messages.length;t++)if(!(this.messages[t].MHR<n.MHR)&&!(this.messages[t].IM>=n.IM))break;t===this.messages.length?this.messages.push(n):this.messages.splice(t,0,n);this.renderMessages()}};NewIboData.prototype.renderMessage=function(n){var i=this.getMessageId(n),r,t,u;$("li",this.messageHolder).length>4||(u="height=600,width=800,status=yes,toolbar=no,menubar=no,location=no,left=20,top=20,scrollbars=yes,resizable=yes",r=(n.SU.length>this.maxMsgChars?n.SU.substring(0,this.maxMsgChars)+"...":n.SU)+(n.MHR===5||pmFramework.isMsgHighImportance(n)?' <span class="highImportanceExclaim">!<\/span>':""),t=$("body").data("DirectPushUrl")+n.MI,$(this.messageHolder).append($("<li />").addClass("Message").css("display","none").attr("id",i).html($("<a />").attr("target","_blank").attr("href",t).html(r)).click(function(n){n.preventDefault();window.open(t,"MMM",u)})),$("#"+i).slideDown(this.effectDuration,"swing"),this.setupMessageHover())};NewIboData.prototype.clearMessages=function(){$(this.messageHolder).children().remove()};NewIboData.prototype.renderMessages=function(){var n;if($(".responsive-header").length>0){this.setMessageCount(this.messages.length);return}for(this.clearMessages(),n=0;n<this.messages.length&&n<this.maxMessageCount;n++)this.renderMessage(this.messages[n]);this.setMessageCount(this.messages.length)};NewIboData.prototype.insertMessage=function(n,t){n.append('<li class="Message">'+t.shortText+"<\/li>");this.setupMessageHover()};NewIboData.prototype.setupMessageHover=function(){$(".ibo .Message").unbind("mouseenter mouseleave");$(".ibo .Message").hover(function(){iboData.backgroundPositionHoverHandlerInOut("0px -33px")},function(){iboData.backgroundPositionHoverHandlerInOut("0px 0px")})};NewIboData.prototype.iboDoRender=function(n){var t=$("#iboMessageHolder");this.insertMessage(t,n);$("a#Messages","#iboSummary").fadeOut(this.effectDuration,this.setMessageCount)};NewIboData.prototype.mailIconGlow=function(){var n=this.mailGlowInterval/3;$("#iboMailIconHighlight").fadeIn(n).delay(n/2).fadeOut(n)};NewIboData.prototype.setMailGlow=function(n){this.mailGlowIntervalId!==0&&clearInterval(this.mailGlowIntervalId);n>0?this.mailGlowIntervalId=setInterval(iboData.mailIconGlow,this.mailGlowInterval):clearInterval(this.mailGlowIntervalId)};NewIboData.prototype.setMessageCount=function(n){var t;if($(".responsive-header").length>0){this.UpdateResponsiveHeaderEnvelope(n);return}t=n;$(".aEmailsReskin","#iboSummary").length>0?($(".aEmailsReskin","#iboSummary").html(t<=this.maxMessageCount?t:"&sect;"),$(".aEmailsReskin","#iboSummary").fadeIn(this.effectDuration)):($("a#Messages","#iboSummary").html("("+(t<=this.maxMessageCount?t:"&sect;")+")"),$("a#Messages","#iboSummary").fadeIn(this.effectDuration));t>0?$("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").length>0?($("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").hover(function(){$("#iboAnchor").show()},function(){$("#iboAnchor").hide()}),this.showMsgDropDown&&$("#iboSummary").removeClass("iboSummaryInactive").addClass("iboSummaryActive")):($("#iboMailIconHighlight").css("display","block"),this.setMailGlow(t)):$("#iboMailIconHighlight").css("display","none");t>0?$("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").length==0&&($("#iboSummary").unbind("click").unbind("mouseenter mouseleave"),$("#iboSummary").parents("td").hover(function(){$("#iboAnchor").show()},function(){$("#iboAnchor").hide()})):($("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").unbind("mouseenter mouseleave"),$("#iboAnchor").fadeOut(iboData.effectDuration),$("#iboSummary").unbind("click").click(function(){$("#iboAnchor .RML").click()}).parents("td").unbind("mouseenter mouseleave"))};NewIboData.prototype.isIe6=function(){return/MSIE ((5\.5)|6)/.test(navigator.userAgent)&&navigator.platform==="Win32"};NewIboData.prototype.fixPng=function(n){var t=n.src;n.style.width||(n.style.width=$(n).width());n.style.height||(n.style.height=$(n).height());n.src="";$(n).css("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"',sizingMethod='scale')")};NewIboData.prototype.setBackgroundImg=function(n,t){this.isIe6()?$(n).css({backgroundImage:"none",filter:filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='"+t+"')"}):$(n).css("background-image","url('"+t+"')")};NewIboData.prototype.UpdateResponsiveHeaderEnvelope=function(n){var t=$(".responsive-header .user-links .envelope");n>0?(t.addClass("envelope-icon-unread-messages"),t.removeClass("envelope-icon-all-messages-read")):(t.addClass("envelope-icon-all-messages-read"),t.removeClass("envelope-icon-unread-messages"))};NewIboData.prototype.fixPngBack=function(n){var t=$(n).css("background-image");t.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)&&(t=RegExp.$1,this.setBackgroundImg(n,t))};NewIboData.prototype.backgroundPositionHoverHandlerInOut=function(n){$(this).css("background-position",n)};$(document).ready(function(){var n=bet365.GetBrowser();n.match(/IE/ig)!=null?(setTimeout(tbInitialise,100),setTimeout(expandableOverlayInit,200),setTimeout(newMessagesInitialise,500),setTimeout(overlayControlInit,100)):(tbInitialise(),expandableOverlayInit(),newMessagesInitialise(),overlayControlInit())});window.Modernizr=function(n,t,i){function a(n){c.cssText=n}function vt(n,t){return a(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function lt(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function yt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+ot.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?lt(u,t):(u=(n+" "+st.join(r+" ")+r).split(" "),yt(u,t,i))}function pt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=!!(i[r]in o);return w.list&&(w.list=!!(t.createElement("datalist")&&n.HTMLDataListElement)),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ht[n[u]]=!!r;return ht}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ut=t.createElement(e),c=ut.style,o=t.createElement("input"),g=":)",ft={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),et="Webkit Moz O ms",ot=et.split(" "),st=et.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ht={},w={},nt=[],tt=nt.slice,b,l=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},at=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t)&&i(t).matches||!1:(l("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},ct=function(){function r(r,u){u=u||t.createElement(n[r]||"div");r="on"+r;var f=r in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(r,""),f=h(u[r],"function"),h(u[r],"undefined")||(u[r]=i),u.removeAttribute(r))),u=null,f}var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),it={}.hasOwnProperty,rt,k;rt=h(it,"undefined")||h(it.call,"undefined")?function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")}:function(n,t){return it.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.flexboxlegacy=function(){return f("boxDirection")};r.canvas=function(){var n=t.createElement("canvas");return!!(n.getContext&&n.getContext("2d"))};r.canvastext=function(){return!!(u.canvas&&h(t.createElement("canvas").getContext("2d").fillText,"function"))};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:l(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return ct("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!(n.history&&history.pushState)};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return a("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return a("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return a("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){return f("borderImage")};r.borderradius=function(){return f("borderRadius")};r.boxshadow=function(){return f("boxShadow")};r.textshadow=function(){return t.createElement("div").style.textShadow===""};r.opacity=function(){return vt("opacity:.55"),/^0.55$/.test(c.opacity)};r.cssanimations=function(){return f("animationName")};r.csscolumns=function(){return f("columnCount")};r.cssgradients=function(){var n="background-image:";return a((n+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+n)+y.join("linear-gradient(left top,#9f9, white);"+n)).slice(0,-n.length)),v(c.backgroundImage,"gradient")};r.cssreflections=function(){return f("boxReflect")};r.csstransforms=function(){return!!f("transform")};r.csstransforms3d=function(){var n=!!f("perspective");return n&&"webkitPerspective"in s.style&&l("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){n=t.offsetLeft===9&&t.offsetHeight===3}),n};r.csstransitions=function(){return f("transition")};r.fontface=function(){var n;return l('@font-face {font-family:"font";src:url("https://")}',function(i,r){var f=t.getElementById("smodernizr"),u=f.sheet||f.styleSheet,e=u?u.cssRules&&u.cssRules[0]?u.cssRules[0].cssText:u.cssText||"":"";n=/src/i.test(e)&&e.indexOf(r.split(" ")[0])===0}),n};r.generatedcontent=function(){var n;return l(["#",e,"{font:0/0 a}#",e,':after{content:"',g,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){n=t.offsetHeight>=3}),n};r.video=function(){var i=t.createElement("video"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=i.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n};r.audio=function(){var i=t.createElement("audio"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=i.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=i.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n};r.localstorage=function(){try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(n){return!1}};r.sessionstorage=function(){try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(n){return!1}};r.webworkers=function(){return!!n.Worker};r.applicationcache=function(){return!!n.applicationCache};r.svg=function(){return!!t.createElementNS&&!!t.createElementNS(p.svg,"svg").createSVGRect};r.inlinesvg=function(){var n=t.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==p.svg};r.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(ft.call(t.createElementNS(p.svg,"animate")))};r.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(ft.call(t.createElementNS(p.svg,"clipPath")))};for(k in r)rt(r,k)&&(b=k.toLowerCase(),u[b]=r[k](),nt.push((u[b]?"":"no-")+b));return u.input||pt(),u.addTest=function(n,t){if(typeof n=="object")for(var r in n)rt(n,r)&&u.addTest(r,n[r]);else{if(n=n.toLowerCase(),u[n]!==i)return u;t=typeof t=="function"?t():t;typeof d!="undefined"&&d&&(s.className+=" "+(t?"":"no-")+n);u[n]=t}return u},a(""),ut=o=null,function(n,t){function p(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function c(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function o(n){var t=h[n[s]];return t||(t={},e++,n[s]=e,h[e]=t),t}function l(n,r,u){if(r||(r=t),i)return r.createElement(n);u||(u=o(r));var f;return f=u.cache[n]?u.cache[n].cloneNode():y.test(n)?(u.cache[n]=u.createElem(n)).cloneNode():u.createElem(n),f.canHaveChildren&&!v.test(n)&&!f.tagUrn?u.frag.appendChild(f):f}function w(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||o(n);for(var f=r.frag.cloneNode(),u=0,e=c(),s=e.length;u<s;u++)f.createElement(e[u]);return f}function b(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?l(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+c().join().replace(/[\w\-]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function a(n){n||(n=t);var u=o(n);return!r.shivCSS||f||u.hasCSS||(u.hasCSS=!!p(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),i||b(n,u),n}var u=n.html5||{},v=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,s="_html5shiv",e=0,h={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";f="hidden"in n;i=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(r){f=!0;i=!0}})();r={elements:u.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:u.shivCSS!==!1,supportsUnknownElements:i,shivMethods:u.shivMethods!==!1,type:"default",shivDocument:a,createElement:l,createDocumentFragment:w};n.html5=r;a(t)}(this,t),u._version="2.8.2",u._prefixes=y,u._domPrefixes=st,u._cssomPrefixes=ot,u.mq=at,u.hasEvent=ct,u.testProp=function(n){return lt([n])},u.testAllProps=f,u.testStyles=l,u.prefixed=function(n,t,i){return t?f(n,t,i):f(n,"pfx")},s.className=s.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+nt.join(" "):""),u}(this,this.document);swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span"));i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u();n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p);r=o.appendChild(u);r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++;setTimeout(arguments.callee,10);return}o.removeChild(u);r=null;it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={};h.data=s[r].expressInstall;h.width=t.getAttribute("width")||"0";h.height=t.getAttribute("height")||"0";t.getAttribute("class")&&(h.styleclass=t.getAttribute("class"));t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0;nt=s||null;at={success:!1,id:o};c=u(o);c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t);i.parentNode.replaceChild(et(t),i);t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>";b[b.length]=t.id;v=u(t.id)}else{c=h(f);c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y);v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i);a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/.exec(n)!=null;return t&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt);c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var r,i,u,f,e=a.length,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t;f.swfVersion=i;f.expressInstall=r;f.callbackFn=u;s[s.length]=f;l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s;ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at));d=!1}}}}();bet365.cmsCore.CCP=bet365.cmsCore.CCP||{};bet365.cmsCore.CCP={SubmitPromotionalResult:function(n){"use strict";var i,t,r;return i="{ 'result': '"+n+"' }",t="",r=bet365.cmsCore.getPageAttributes($),$.ajax({type:"POST",async:!1,data:i,contentType:"application/json; charset=utf-8",dataType:"json",url:r.appPath+"CustomContentPod/SubmitPromotionalResult",success:function(n){t=n},error:function(){t=!1}}),t},HasPromotionalResult:function(){"use strict";var n,t;return n="",t=bet365.cmsCore.getPageAttributes($),$.ajax({type:"POST",async:!1,contentType:"application/json; charset=utf-8",dataType:"json",url:t.appPath+"CustomContentPod/HasPromotionalResult",success:function(t){n=t},error:function(){n=!1}}),n}};bet365.cmsCore.CCP.Initialise=bet365.cmsCore.CCP.Initialise||{};bet365.cmsCore.CCP.Instances=bet365.cmsCore.CCP.Instances||{};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.RealityCheck={TimeWhenPageLoaded:+new Date,TotalSessionTime:null,SessionTimer:null,NextRealityCheckTimer:null,LogoutCallback:null,ShowRealityCheckHandler:null,HideRealityCheckHandler:null,SetupRealityCheck:function(n,t,i){"use strict";function u(){window.location.reload()}bet365.cmsCore.RealityCheck.LogoutCallback=n||u;bet365.cmsCore.RealityCheck.ShowRealityCheckHandler=t;bet365.cmsCore.RealityCheck.HideRealityCheckHandler=i;var r=$(".realitycheck").data("time-until-next");r&&(bet365.cmsCore.RealityCheck.NextRealityCheckTimer=setTimeout(function(){bet365.cmsCore.RealityCheck.ShowRealityCheck()},r));r===0&&bet365.cmsCore.RealityCheck.ShowRealityCheck();$("div.realitycheck .log-out").click(function(n){n.preventDefault();return $.ajax({type:"POST",data:"{ 'eventType': 'Logout' }",contentType:"application/json; charset=utf-8",dataType:"json",url:"/RealityCheck/Audit",success:function(n){n===!0?bet365.cmsCore.RealityCheck.LogOut():window.location.reload()}}),!1});$("div.realitycheck .stay-logged-in").click(function(n){return n.preventDefault(),$.ajax({type:"POST",data:"",contentType:"application/json; charset=utf-8",dataType:"json",url:"/RealityCheck/ResetRealityCheckTimer",success:function(n){n>0?bet365.cmsCore.RealityCheck.ResetRealityCheck(n):window.location.reload()}}),!1})},ResetRealityCheck:function(n){"use strict";bet365.cmsCore.RealityCheck.HideRealityCheck();clearTimeout(bet365.cmsCore.RealityCheck.NextRealityCheckTimer);bet365.cmsCore.RealityCheck.NextRealityCheckTimer=setTimeout(function(){bet365.cmsCore.RealityCheck.ShowRealityCheck()},n)},ShowRealityCheck:function(){"use strict";$(".InactivityWarningDialog").is(":visible")||$.ajax({type:"POST",data:"{ 'eventType': 'Popup Displayed' }",contentType:"application/json; charset=utf-8",dataType:"json",url:"/RealityCheck/Audit",success:function(n){n===!0?(bet365.cmsCore.RealityCheck.StartSessionTimer(),bet365.cmsCore.RealityCheck.ShowRealityCheckHandler()):window.location.reload()}})},HideRealityCheck:function(){"use strict";bet365.cmsCore.RealityCheck.StopSessionTimer();bet365.cmsCore.RealityCheck.HideRealityCheckHandler()},StartSessionTimer:function(){"use strict";var n=$(".realitycheck .total-session-time"),t=bet365.cmsCore.RealityCheck.TotalSessionTime+(+new Date-bet365.cmsCore.RealityCheck.TimeWhenPageLoaded);bet365.cmsCore.RealityCheck.SessionTimerTimeout(n,t)},SessionTimerTimeout:function(n,t){"use strict";bet365.cmsCore.RealityCheck.SessionTimer=setTimeout(function(){t=t+1e3;n[0].innerHTML=bet365.cmsCore.RealityCheck.MsToFormattedTime(parseInt(t));bet365.cmsCore.RealityCheck.SessionTimerTimeout(n,t)},1e3)},StopSessionTimer:function(){"use strict";clearTimeout(bet365.cmsCore.RealityCheck.SessionTimer)},GetTimeWhenPageLoaded:function(){"use strict";bet365.cmsCore.RealityCheck.TimeWhenPageLoaded=+new Date;bet365.cmsCore.RealityCheck.TotalSessionTime=parseInt($(".realitycheck").data("total-session-time"))},MsToFormattedTime:function(n){"use strict";var t=parseInt((n/1e3%60).toString()),i=parseInt((n/6e4%60).toString()),r=parseInt((n/36e5%24).toString()),u=r<10?"0"+r:r,f=i<10?"0"+i:i,e=t<10?"0"+t:t;return u+":"+f+":"+e},LogOut:function(){"use strict";bet365.cmsCore.Session.LogOutWithoutRefresh();$(".session-message-container").hide();$(".cooloff-message-container").show();$(".cooloff-message-container a.realitychecks-close").click(function(){bet365.cmsCore.RealityCheck.LogoutCallback()})}};bet365=bet365||{};bet365.product=bet365.product||{};$(document).ready(function(){if($(".bingoLobbyChoiceWrapper").length&&$(".html5LobbyButton").length&&Modernizr.localstorage){bet365.product.bingo.lobbyChoice.initDomVariables();var n=bet365.product.bingo.lobbyChoice.checkForSavedPreference();n!==null?bet365.product.bingo.lobbyChoice.bindLobbyClicksToSavedPreference(n):bet365.product.bingo.lobbyChoice.setUpLobbyModal()}});bet365.product.bingo.lobbyChoice={homepageLobbyLinks:null,flashLobbyLink:null,html5LobbyLink:null,initDomVariables:function(){this.flashLobbyLink=$(".flashLobbyButton");this.html5LobbyLink=$(".html5LobbyButton");this.homepageLobbyLinks=$('html [data-gameid="8908"]');$(".bingoLobbyChoiceWrapper").after('<div class="bingoLobbyChoiceMask"><\/div>');$('<input type="checkbox" id="rememberLobbyChoice" value=""/>').insertBefore(".bingoLobbyChoiceWrapper .rememberChoiceTickBoxText")},bindClickEvents:function(){this.html5LobbyLink.click(function(){bet365.product.bingo.lobbyChoice.savePreferenceTicked()&&bet365.product.bingo.lobbyChoice.storeUsersChoice("HTML5");bet365.product.bingo.lobbyChoice.hide()});this.flashLobbyLink.click(function(){bet365.product.bingo.lobbyChoice.savePreferenceTicked()&&bet365.product.bingo.lobbyChoice.storeUsersChoice("Flash");bet365.product.bingo.lobbyChoice.hide()});bet365.cmsCore.gameLaunchMechanism.bindClickEvents($,".bingoLobbyChoiceWrapper");$(".bingoLobbyChoiceMask").click(function(){bet365.product.bingo.lobbyChoice.hide()})},setUpLobbyModal:function(){this.homepageLobbyLinks.unbind().click(function(n){return n.preventDefault(),bet365.product.bingo.lobbyChoice.show(),!1});this.html5LobbyLink.unbind().click();this.bindClickEvents()},bindLobbyClicksToSavedPreference:function(n){this.homepageLobbyLinks.unbind().click(function(n){return n.preventDefault(),!1});n==="Flash"?this.homepageLobbyLinks.attr("data-gameid",this.flashLobbyLink.attr("data-gameid")):n==="HTML5"&&this.homepageLobbyLinks.attr("data-gameid",this.html5LobbyLink.attr("data-gameid"));bet365.cmsCore.gameLaunchMechanism.setupGameLaunch($)},show:function(){$(".bingoLobbyChoiceWrapper").show();$(".bingoLobbyChoiceMask").show()},hide:function(){$(".bingoLobbyChoiceWrapper").hide();$(".bingoLobbyChoiceMask").hide()},savePreferenceTicked:function(){return $("#rememberLobbyChoice").is(":checked")===!0},storeUsersChoice:function(n){localStorage.setItem("LobbyChoice",n);this.bindLobbyClicksToSavedPreference(n)},checkForSavedPreference:function(){var n=localStorage.getItem("LobbyChoice");return n==="Flash"||n==="HTML5"?n:null}};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.sessionPoller=bet365.cmsCore.sessionPoller||{};bet365.cmsCore.sessionPoller.start=function(n){"use strict";var t=function(){bet365.cmsCore.Session.LogOut()},i=function(n){bet365.cmsCore.RealityCheck.ResetRealityCheck(n)},r=bet365.cmsCore.getPageAttributes(n),u=new bet365.cmsCore.sessionPoller.Poller(n,r,t,i);u.loop()};bet365.cmsCore.sessionPoller.Poller=bet365.cmsCore.sessionPoller.Poller||function(n,t,i,r,u){"use strict";var e=this,o=!1,s=!1,f=0,h=0,c=!1;return this.getSessionData=function(){h++;n.ajax({type:"GET",dataType:"json",url:t.appPath+"RealityCheck/PollSessionState",async:!1,success:function(n){e.updatePage(n);u&&u(n)}})},this.isCoolOffDiaglogVisible=function(){var t=n(".realitycheck .cooloff-message-container");return t.length>0&&t.is(":visible")},e.updatePage=function(n){n.T<0?(s&&(e.isCoolOffDiaglogVisible()||i()),o=!1):n.T===0?(c=!0,s=!0,e.calculatePollInterval(h),o=f>0?!0:!1):(f=n.T,s=!0,o=!0,h=0,c&&(c=!1,r(f)))},e.calculatePollInterval=function(n){switch(!0){case n<11:f=2e3;break;case n<21:f=5e3;break;case n<31:f=1e4;break;case n<41:f=6e4;break;default:f=-1}},{loop:function(){var n=this;setTimeout(function(){e.getSessionData();o&&n.loop()},f)}}};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.DataStorage=bet365.cmsCore.DataStorage||{};bet365.cmsCore.DataStorage=function(){function e(i){return!n()||!t(i)?null:JSON.parse(localStorage.getItem(i))}function o(i,r){return!n()||!t(i)||!u(r)?!1:(localStorage.setItem(i,JSON.stringify(r)),!0)}function s(i){return!n()||!t(i)?!1:(localStorage.removeItem(i),!0)}function h(u,f){return!n()||!t(f)||!r(u)?null:JSON.parse(localStorage.getItem(i(u,f)))}function c(f,e,o){return!n()||!t(e)||!u(o)||!r(f)?!1:(localStorage.setItem(i(f,e),JSON.stringify(o)),!0)}function l(u,f){return!n()||!t(f)||!r(u)?!1:(localStorage.removeItem(i(u,f)),!0)}function a(u,f){return!n()||!t(f)||!r(u)?null:JSON.parse(sessionStorage.getItem(i(u,f)))}function v(f,e,o){return!n()||!t(e)||!u(o)||!r(f)?!1:(sessionStorage.setItem(i(f,e),JSON.stringify(o)),!0)}function y(u,f){return!n()||!t(f)||!r(u)?!1:(sessionStorage.removeItem(i(u,f)),!0)}function i(n,t){return t+"_"+n}function u(n){return typeof n=="object"?!0:(bet365.cmsCore.log.write("Value that is stored must be of type object"),!1)}function n(){if(typeof Storage!="undefined")try{return localStorage.setItem("enabled","true"),localStorage.removeItem("enabled"),!0}catch(n){bet365.cmsCore.log.write("Local Storage is not available for this browser")}return!1}function t(n){return n&&bet365.cmsCore.DataStorage.Keys.hasOwnProperty(n)?!0:(bet365.cmsCore.log.write("The key used is not allowed"),!1)}function r(n){return n&&f.indexOf(n)>=0?!0:(bet365.cmsCore.log.write("The product used is not allowed"),!1)}var f=["bingo","poker","slots","vegas"];return{Get:e,GetProductData:h,GetProductSessionData:a,Set:o,SetProductData:c,SetProductSessionData:v,Remove:s,RemoveProductData:l,RemoveProductSessionData:y,Keys:{HideBalance:"HideBalance",HideProductNav:"HideProductNav",OverlayBannerIds:"OverlayBannerIds",PinAuthData:"PinAuthData",UsernameVisibility:"UsernameVisibility",DropDownMenuUpdated:"DropDownMenuUpdated",SmartPanel:"SmartPanel"},IsSupported:n}}();__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){t===void 0&&(t=!0);this.type=n;this.bubbles=t}return n.COMPLETE="COMPLETE",n.ERROR="ERROR",n}();n.Event365=t}(ns_lo_event||(ns_lo_event={})),function(n){var t=function(){function n(){this._eventList={}}return n.prototype.addEventListener=function(n,t,i){this._eventList[n]||(this._eventList[n]=[]);this._eventList[n].push([t,i||window])},n.prototype.dispatchEvent=function(n){var i=n.bubbles,t;if(n.target||(n.target=this),this._eventList[n.type])for(t=0,t;t<this._eventList[n.type].length;t++)this._eventList[n.type][t][0].call(this._eventList[n.type][t][1],n);i&&this.parent&&this.parent.bubbleEvent(n)},n.prototype.bubbleEvent=function(n){this.dispatchEvent(n);for(var t=this.parent;t;){if(t.bubbleEvent){t.bubbleEvent(n);break}t=t.parent}},n.prototype.removeEventListener=function(n,t){var r=this._eventList[n],i,u;if(r)for(i=0,u=r.length,i;i<u;i++)r[i][0]==t&&(r.splice(i,1),u=r.length,i>-1&&i--)},n.prototype.hasEventListener=function(n){var t=this._eventList[n];return t&&t.length>0},n.prototype.toString=function(){return"[EventDispatcher]"},n}();n.EventDispatcher=t}(ns_lo_event||(ns_lo_event={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i){n.call(this,t);this.message=i}return __extends(t,n),t.prototype.toString=function(){return"[MessageEvent type="+this.type+" message="+this.message+"]"},t.MESSAGE_RECEIVED="messageReceived",t}(t);n.MessageEvent=i}(ns_lo_core_event||(ns_lo_core_event={})),function(n){var t;(function(n){var t=function(){function t(){}return t.init=function(){this.instance=new n.LogService;t.status=this.getCookie("debugLogger")==="true"?!0:!1},t.prototype.write=function(n){t.status&&this.writeToConsole(n)},t.prototype.writeToConsole=function(n){"console"in self&&"log"in console&&n&&n.length>=1&&typeof console=="object"&&console.log(n)},t.getCookie=function(n){var i=document.cookie,t,r;return i.length>0&&(t=i.indexOf(n+"="),t!==-1)?(t=t+n.length+1,r=i.indexOf(";",t),r==-1&&(r=i.length),decodeURIComponent(i.substring(t,r))):""},t.status=!1,t}();n.LogService=t})(t=n.Logging||(n.Logging={}))}(PushMessaging||(PushMessaging={})),function(n){n.ReaditConnectionStatus={DISCONNECTED:0,PENDING:1,CONNECTED:2};n.StandardProtocolConstants={RECORD_DELIM:"\x01",FIELD_DELIM:"\x02",HANDSHAKE_MESSAGE_DELIM:"\x03",MESSAGE_DELIM:"\b",CLIENT_CONNECT:0,CLIENT_POLL:1,CLIENT_SEND:2,CLIENT_CONNECT_FAST:3,INITIAL_TOPIC_LOAD:20,DELTA:21,CLIENT_SUBSCRIBE:22,CLIENT_UNSUBSCRIBE:23,CLIENT_SWAP_SUBSCRIPTIONS:26,NONE_ENCODING:0,ENCRYPTED_ENCODING:17,COMPRESSED_ENCODING:18,BASE64_ENCODING:19,SERVER_PING:24,CLIENT_PING:25,CLIENT_ABORT:28,CLIENT_CLOSE:29,ACK_ITL:30,ACK_DELTA:31,ACK_RESPONSE:32}}(ns_loReadit||(ns_loReadit={})),function(n){var t=function(){function n(n,t,i,r){this.messageType=n;this.topic=t;this.message=i;this.userHeaders=r}return n.prototype.toString=function(){return"[ReaditMessage messageType="+this.messageType+" message="+this.message+" topic="+this.topic+"]"},n}();n.ReaditMessage=t}(ns_loReadit_message||(ns_loReadit_message={})),function(n){var t=function(){function n(n,t,i){this.host=n;this.port=t;this.defaultTopic=i}return n.prototype.toString=function(){return"[host:"+this.host+", port:"+this.port+", topic:"+this.defaultTopic+"]"},n}();n.ReaditConnectionDetails=t}(ns_loReadit_details||(ns_loReadit_details={})),function(n){var t=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.CONNECTED="connected",t.DISCONNECTED="disconnected",t.CONNECTION_FAILED="connectionFailed",t}(ns_lo_event.Event365);n.TransportConnectionEvent=t}(ns_loReadit_events||(ns_loReadit_events={})),function(n){var i=0,r=1,u=3,t=4,f=function(){function n(){this.xdr=new XDomainRequest;this.xdr.timeout=6e4;this.status=0;this.readyState=i;this.responseText=null;this.contentType=null;this.onreadystatechange=null}return n.TryCreate=function(t){return!("withCredentials"in t)&&XDomainRequest?new n:t},n.prototype._progress=function(){this.readyState=u;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._timeout=function(){this.readyState=t;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._onerror=function(){this.readyState=t;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._onload=function(){this.readyState=t;this.status=200;this.responseText=this.xdr.responseText;this.contentType=this.xdr.contentType;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype.open=function(n,t){var i=this,u=this.xdr.open(n,t);return this.xdr.onprogress=function(){i._progress()},this.xdr.ontimeout=function(){i._timeout()},this.xdr.onerror=function(){i._onerror()},this.xdr.onload=function(){i._onload()},this.readyState=r,this.onreadystatechange&&this.onreadystatechange.call(this),u},n.prototype.send=function(n){this.xdr.send(n)},n.prototype.abort=function(){return this.readyState=i,this.onreadystatechange=null,this.xdr.abort()},n}();n.XDomainXMLHttpRequest=f}(ns_loReadit_util||(ns_loReadit_util={})),function(n){var t=ns_loReadit.StandardProtocolConstants,i=ns_loReadit_events.TransportConnectionEvent,f=ns_loReadit_util.XDomainXMLHttpRequest,u=ns_lo_core_event.MessageEvent,e=ns_loReadit_message.ReaditMessage,r=PushMessaging.Logging,o=function(n){function o(){n.apply(this,arguments);this._poller=null;this._messageDispatcher=null;this._connectionTimeout=0;this._url="";this._requestActive=!1;this._requestQueue=[];this._connectionID="";this._sID="";this._sequence=0;this._connected=!1;this._hasNativeXmlHttp=!1;this._transportIsSupported=this.checkXmlHttpAvailable();this._activeXVersion=null;this.siteIdLookup={L:"1",M:"2",I:"3"}}return __extends(o,n),o.prototype.connect=function(){var i=this,n;this._connectionTimeout=setTimeout(function(){i.connectionFailed("timeout after "+o.CONNECTION_TIMEOUT_LIMIT+"ms")},o.CONNECTION_TIMEOUT_LIMIT);try{this._url=this._connectionDetails.host+":"+this._connectionDetails.port+o.TRAILING;r.LogService.instance.write("Attempting connection to "+this._url);n=this.getRequest({method:t.CLIENT_CONNECT,transporttimeout:o.TRANSPORT_TIMEOUT,type:"F",topic:this._connectionDetails.defaultTopic});r.LogService.instance.write("Connecting with:"+n);n.onreadystatechange=function(){if(n.readyState==4){if(clearTimeout(i._connectionTimeout),n.status==200){var u=n.responseText.split(t.HANDSHAKE_MESSAGE_DELIM),f=u[0],r=f.split("\x02");r[0]=="100"&&i.handshakeHandler(r[1]);r[0]=="111"&&i.connectionFailed("connection rejected 111")}else i.connectionFailed("Connection Rejected - Invalid response status:"+n.status);n.onreadystatechange=null}};r.LogService.instance.write("Sending request...");n.send(n.params||"")}catch(u){clearTimeout(this._connectionTimeout);this.connectionFailed("Unable to open Socket.")}},o.prototype.send=function(n,i){this.put(this.getRequest({method:t.CLIENT_SEND,data:encodeURIComponent(i),topic:n,s:this._sequence++}))},o.prototype.close=function(){this.dispose();this.dispatchEvent(new i(i.DISCONNECTED))},o.prototype.setMessageDispatcher=function(n){this._messageDispatcher=n},o.prototype.setConnectionDetails=function(n){this._connectionDetails=n},o.prototype.connectionFailed=function(){var n=this._connected;this.dispose();n?this.dispatchEvent(new i(i.DISCONNECTED)):this.dispatchEvent(new i(i.CONNECTION_FAILED))},o.prototype.getRequest=function(n){var t,i,u;t=this._hasNativeXmlHttp?f.TryCreate(new XMLHttpRequest):new ActiveXObject(this._activeXVersion);try{t.open("POST",this._url+(this._connectionID?"?id="+this._connectionID:""));this._connectionID&&(n.clientid=this._connectionID);i="";t.setRequestHeader&&t.setRequestHeader("Content-Type","text/plain");for(u in n)i+=(i.length>0?"&":"")+u+"="+encodeURIComponent(n[u]);return t.params=i,t}catch(e){r.LogService.instance.write(e)}return null},o.prototype.put=function(n){var i=this,t;if(n!==null&&this._requestQueue.push(n),!this._requestActive&&this._connectionID!==""){if(this._requestQueue.length>0)t=this._requestQueue.shift();else return;this._requestActive=!0;t.onreadystatechange=function(){t.readyState==4&&(t.status==200&&t.responseText?i.processMessage(t.responseText):t.status!=200&&i.connectionFailed("Connection lost during put."),i.queuedRequestCompleteHandler(),t.onreadystatechange=null)};"params"in t?t.send(t.params||""):t.send("")}},o.prototype.poll=function(){var n=this;this._connected&&(this._poller=this.getRequest({method:t.CLIENT_POLL,s:this._sequence++,topic:""}),this._poller.complete=!1,this._poller.onreadystatechange=function(){n._poller.readyState!=4||n._poller.complete||(n._poller.complete=!0,n._poller.onreadystatechange=null,n._poller.status==200?n.pollerCompleteHandler(n._poller.responseText):n._connected&&n.connectionFailed('Connection lost during poll statusCode:"'+n._poller.status+'" statusText:"'+n._poller.statusText+'"'))},"params"in this._poller?this._poller.send(this._poller.params||""):this._poller.send(""))},o.prototype.dispose=function(){if(this._connected=!1,this._connectionID=null,this._poller){try{this._poller.abort()}catch(n){}this._poller.onreadystatechange=null;this._poller=null}this._messageDispatcher=null;clearTimeout(this._connectionTimeout)},o.prototype.checkXmlHttpAvailable=function(){try{return new XMLHttpRequest,this._hasNativeXmlHttp=!0,!0}catch(n){}return!1},o.prototype.handshakeHandler=function(n){this._requestActive=!1;this._connectionID=n;this._sID=n?this.siteIdLookup[n.charAt(0).toUpperCase()]||"0":"0";this._connected=!0;r.LogService.instance.write("connected as "+this._connectionID+". "+this._connectionDetails);this.poll();this.dispatchEvent(new i(i.CONNECTED))},o.prototype.processMessage=function(n){var r,i,f;if(n){r=n.split(t.MESSAGE_DELIM);do{i=r.shift();f=i.charCodeAt(0);switch(f){case t.INITIAL_TOPIC_LOAD:case t.DELTA:var o=i.split(t.RECORD_DELIM),s=o[0].split(t.FIELD_DELIM),h=s.shift(),c=h.substr(1,h.length),l=i.substr(o[0].length+1);this._messageDispatcher!==null&&this._messageDispatcher.dispatchEvent(new u(u.MESSAGE_RECEIVED,new e(String(f),c,l,s)));break;case t.CLIENT_ABORT:case t.CLIENT_CLOSE:this.connectionFailed("Connection close/abort during poll.")}}while(r.length)}},o.prototype.pollerCompleteHandler=function(n){if(this.processMessage(n),this._connected){var t=this;setTimeout(function(){t.poll()},o.pollDelay)}},o.prototype.queuedRequestCompleteHandler=function(){this._requestActive=!1;this._requestQueue.length&&this.put(null)},o.prototype.toString=function(){return"[HttpTransportMethod]"},o.CONNECTION_TIMEOUT_LIMIT=15e3,o.TRANSPORT_TIMEOUT=20,o.TRAILING="/pow2/",o.pollDelay=10,o}(ns_lo_event.EventDispatcher);n.HttpTransportMethod=o}(ns_loReadit_methods||(ns_loReadit_methods={})),function(n){var t=ns_loReadit_events.TransportConnectionEvent,i=ns_loReadit.ReaditConnectionStatus,u=ns_loReadit_methods.HttpTransportMethod,r=PushMessaging.Logging,f=function(n){function f(t,r){n.call(this);this._maxRetryConnectionAttempts=1;this._retryConnectionIntervalMilliseconds=5e3;this._connectionRetryCount=0;this._currentConnectionDetails=null;this._currentTransportMethod=null;this._connectionStatus=i.DISCONNECTED;this._maxRetryConnectionAttempts=t;this._retryConnectionIntervalMilliseconds=r}return __extends(f,n),f.prototype.connect=function(n){this._connectionStatus==i.DISCONNECTED&&(this._connectionStatus=i.PENDING,this._currentConnectionDetails=n,this.connectToNext())},f.prototype.send=function(n,t){this._currentTransportMethod.send(n,t)},f.prototype.close=function(){this._currentTransportMethod&&(this.disposeCurrentTransportMethod(),this._currentTransportMethod.close());this._connectionStatus=i.DISCONNECTED},f.prototype.connectToNext=function(){this.disposeCurrentTransportMethod();this._currentTransportMethod=new u;this._currentTransportMethod.addEventListener(t.CONNECTED,this.transportConnectedHandler,this);this._currentTransportMethod.addEventListener(t.CONNECTION_FAILED,this.transportConnectionFailedHandler,this);this._currentTransportMethod.addEventListener(t.DISCONNECTED,this.transportDisconnectedHandler,this);this._currentTransportMethod.setConnectionDetails(this._currentConnectionDetails);this._currentTransportMethod.setMessageDispatcher(this);this._currentTransportMethod.connect()},f.prototype.disposeCurrentTransportMethod=function(){this._currentTransportMethod&&(this._currentTransportMethod.removeEventListener(t.CONNECTED,this.transportConnectedHandler),this._currentTransportMethod.removeEventListener(t.CONNECTION_FAILED,this.transportConnectionFailedHandler),this._currentTransportMethod.removeEventListener(t.DISCONNECTED,this.transportDisconnectedHandler))},f.prototype.transportConnectedHandler=function(n){this._connectionStatus=i.CONNECTED;this._connectionRetryCount=0;this.dispatchEvent(n)},f.prototype.transportConnectionFailedHandler=function(){var n=this;this.disconnectTimer=setTimeout(function(){n.retryConnect();clearTimeout(n.disconnectTimer)},this._retryConnectionIntervalMilliseconds)},f.prototype.transportDisconnectedHandler=function(n){var t=this;this.close();this.dispatchEvent(n);this.disconnectTimer=setTimeout(function(){t.retryConnect();clearTimeout(t.disconnectTimer)},this._retryConnectionIntervalMilliseconds)},f.prototype.retryConnect=function(){this._connectionRetryCount++;this._connectionRetryCount<=this._maxRetryConnectionAttempts?(r.LogService.instance.write("Retry connect attempt "+this._connectionRetryCount+" of "+this._maxRetryConnectionAttempts),this.connectToNext()):(this._connectionRetryCount=0,r.LogService.instance.write("Max Retry Attempts exceeded. Aborting retry connect."))},f.prototype.toString=function(){return"[ReaditClient]"},f}(ns_lo_event.EventDispatcher);n.ReadItClient=f}(ns_loReadit_clients||(ns_loReadit_clients={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i){n.call(this,t);this._config=i}return __extends(t,n),t.prototype.getConfig=function(){return this._config},t.prototype.getHttpPort=function(){return this._httpPort},t.prototype.getHttpHost=function(){return this._httpHost},t.prototype.setHttpPort=function(n){this._httpPort=n},t.prototype.setHttpHost=function(n){this._httpHost=n},t.CONFIG_LOADED="ConfigLoaded",t.CONFIG_FAILED="ConfigFailed",t}(t);n.ConfigEvent=i}(PushMessaging||(PushMessaging={})),function(n){var i=ns_lo_event.EventDispatcher,r=ns_loReadit_util.XDomainXMLHttpRequest,t=n.Logging,u=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),u.prototype.load=function(i){var f=this,u;u=r.TryCreate(new XMLHttpRequest);u.open("GET",i);u.onreadystatechange=function(){var i,r;u.readyState!=4||u.complete||(u.complete=!0,u.onreadystatechange=null,u.status==200?(t.LogService.instance.write("Config::load - "+u.responseText),i=new n.ConfigEvent(n.ConfigEvent.CONFIG_LOADED,u.responseText),r=JSON.parse(u.responseText),i.setHttpHost(r.HttpHost),i.setHttpPort(r.HttpPorts)):(t.LogService.instance.write("Config::load - Failed with response status "+u.status),i=new n.ConfigEvent(n.ConfigEvent.CONFIG_FAILED,"")),f.dispatchEvent(i))};u.send("")},u}(i);n.Config=u}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.LOAD_FULL="F",n.LOAD_DELTA="D",n.ACTION_ADD="A",n.ACTION_UPDATE="U",n.ACTION_DELETE="D",n.HEADER_TYPE="HT",n.HEADER_NUM_RECORDS="HR",n.HEADER_USER_ID="UI",n.HEADER_PRODUCT_CODE="PC",n.HEADER_LANGUAGE_ID="LI",n.MESSAGE_ID="MI",n.MESSAGE_ACTION="AC",n.MESSAGE_IMPACT_ID="IM",n.MESSAGE_TYPE="TY",n.MESSAGE_SUBJECT="SU",n.MESSAGE_EXPIRY_TIME="ET",n.MESSAGE_NUM_TEMPLATES="NT",n.TEMPLATE_NUM_RULES="NR",n.TEMPLATE_NUM_LAYOUTS="NL",n.RULE_LOGIN_OR_SESSION="LS",n.RULE_AREA_ID="AI",n.RULE_CLASSIFICATION_ID="CI",n.RULE_POSITION_ID="PI",n.RULE_TIME_DELAY="TD",n.RULE_TIME_TRIGGER="TT",n.RULE_FIXTURE_ID="FI",n.RULE_BET_CONFIRMATION="BC",n.RULE_GAME_ID="GI",n.RULE_GAME_GROUP_ID="GG",n.LAYOUT_ID="LI",n.LAYOUT_STATUS="ST",n.LAYOUT_POSITION_ID="PI",n}();n.FieldDefinitions=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.LENGTH_MESSAGE_ADD_UPDATE=7,n.LENGTH_MESSAGE_DELETE=2,n.LENGTH_TEMPLATE=1,n.LENGTH_RULE=10,n.LENGTH_LAYOUT=3,n.MESSAGE_ID=0,n.MESSAGE_ACTION=1,n.MESSAGE_IMPACT_ID=2,n.MESSAGE_TYPE=3,n.MESSAGE_SUBJECT=4,n.MESSAGE_EXPIRY_TIME=5,n.MESSAGE_NUM_TEMPLATES=6,n.TEMPLATE_NUM_RULES=0,n.TEMPLATE_NUM_LAYOUTS=1,n.RULE_LOGIN_OR_SESSION=0,n.RULE_AREA_ID=1,n.RULE_CLASSIFICATION_ID=2,n.RULE_POSITION_ID=3,n.RULE_TIME_DELAY=4,n.RULE_TIME_TRIGGER=5,n.RULE_FIXTURE_ID=6,n.RULE_BET_CONFIRMATION=7,n.RULE_GAME_ID=8,n.RULE_GAME_GROUP_ID=9,n.LAYOUT_ID=0,n.LAYOUT_STATUS=1,n.LAYOUT_POSITION_ID=2,n}();n.FieldIndexes=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.prototype.toString=function(){return"LI = "+this.LI+", ST = "+this.ST+", PI = "+this.PI},n}();n.GraphicLayout=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.prototype.toString=function(){return"LS = "+this.LS+", AI = "+this.AI+", CI = "+this.CI+", PI = "+this.PI+", TD = "+this.TD+", TT = "+this.TT+", FI = "+this.FI+", BC = "+this.BC+", GI = "+this.GI+", GG = "+this.GG},n}();n.GraphicRule=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.rules=[];this.layouts=[]}return n}();n.GraphicTemplate=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.templates=[]}return n.prototype.toString=function(){return"MI = "+this.MI+", AC = "+this.AC+", IM = "+this.IM+", TY = "+this.TY+", SU = "+this.SU+", ET = "+this.ET+", NT = "+this.NT},n}();n.PushMessage=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.messages=[]}return n.prototype.toString=function(){return"HR = "+this.HR+", HT = "+this.HT+", UI = "+this.UI+", PC = "+this.PC+", LI = "+this.LI},n}();n.PushMessageCollection=t}(PushMessaging||(PushMessaging={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i,r){n.call(this,t);this.theTopic=i;this.theMessageCollection=r}return __extends(t,n),t.prototype.getTopic=function(){return this.theTopic},t.prototype.getMessageCollection=function(){return this.theMessageCollection},t.prototype.getHeaderType=function(){return this.theMessageCollection.HT},t.prototype.getNumberOfMessages=function(){return this.theMessageCollection.HR},t.prototype.getProductCode=function(){return this.theMessageCollection.PC},t.PUSH_MESSAGE="push_message",t.UNREAD_MESSAGE_COUNT_CHANGE="message_count_change",t.DISPLAY_HEADER_DROPDOWN="display_header_dropdown",t}(t);n.PushMessageEvent=i}(PushMessaging||(PushMessaging={})),function(n){function i(){try{var n="test";return localStorage.setItem(n,n),localStorage.removeItem(n),!0}catch(t){}return!1}var t=i(),r=function(){function n(){}return n.Add=function(n,i){t&&localStorage.setItem(n,i)},n.Get=function(n){return t?localStorage.getItem(n):null},n.Remove=function(n){t&&localStorage.removeItem(n)},n}();n.LocalStorage=r}(PushMessaging||(PushMessaging={})),function(n){var i=function(){function n(){}return n}(),t=function(){function t(){}return t.prototype.init=function(i){i===void 0&&(i=0);this.messages=JSON.parse(n.LocalStorage.Get(t.STORAGE_NAME));this.messages?i>0&&this.removeExpiredMessages(i):this.messages=[]},t.prototype.setMessageAsRead=function(i,r){this.messages[this.messages.length]={id:i,expiry:r};n.LocalStorage.Add(t.STORAGE_NAME,JSON.stringify(this.messages))},t.prototype.isMessageRead=function(n){for(var t=0;t<this.messages.length;t++)if(this.messages[t].id==n)return!0;return!1},t.prototype.removeExpiredMessages=function(i){for(var o,f,e=this.messages.length,u,r=0;r<e;r++)u=this.messages[r].expiry*1e3,i>u&&(o=new Date,o.setTime(u),this.messages.splice(r,1),f=!0,r--,e--);f&&n.LocalStorage.Add(t.STORAGE_NAME,JSON.stringify(this.messages))},t.prototype.setAdditionalData=function(i){n.LocalStorage.Add(t.ADDITIONAL_DATA_KEY,i)},t.prototype.getAdditionalData=function(){return n.LocalStorage.Get(t.ADDITIONAL_DATA_KEY)},t.STORAGE_NAME="b365push",t.ADDITIONAL_DATA_KEY="b365AD",t}();n.PushMessageStorage=t}(PushMessaging||(PushMessaging={})),function(n){var u=ns_loReadit_clients.ReadItClient,r=ns_loReadit_events.TransportConnectionEvent,t=ns_loReadit.StandardProtocolConstants,f=ns_lo_event.EventDispatcher,e=n.PushMessageCollection,o=ns_loReadit_details.ReaditConnectionDetails,s=ns_lo_core_event,i=n.Logging,h=function(f){function h(t,e,o,h){f.call(this);this.topic="__time";this.retryCount=3;this.retryIntervalMilliseconds=5e3;this.idleTimerIntervalMilliseconds=9e4;this.sessionToken=e;this.languageId=o;this.productCode=h;this.storage=new n.PushMessageStorage;this.storage.init();n.Logging.LogService.init();this.readItClient=new u(this.retryCount,this.retryIntervalMilliseconds);this.readItClient.addEventListener(r.CONNECTED,this.connected,this);this.readItClient.addEventListener(r.CONNECTION_FAILED,this.connectionFailed,this);this.readItClient.addEventListener(r.DISCONNECTED,this.disconnected,this);this.readItClient.addEventListener(s.MessageEvent.MESSAGE_RECEIVED,this.receiveMessages,this);var c=new n.Config;c.addEventListener(n.ConfigEvent.CONFIG_LOADED,function(n){i.LogService.instance.write("ConfigLoaded");this.publisherAddress=n.getHttpHost();this.publisherPort=n.getHttpPort();this.connect(this.topic)},this);c.load(t)}return __extends(h,f),h.prototype.connect=function(){i.LogService.instance.write("Connecting to topic "+this.topic);this.readItClient.close();this.readItClient.connect(new o(this.publisherAddress,this.publisherPort,this.topic))},h.prototype.disconnect=function(){i.LogService.instance.write("Disconnecting...");this.readItClient.close()},h.prototype.setAdditionalData=function(n){this.storage.setAdditionalData(n)},h.prototype.setMessageAsRead=function(n,t){this.storage.setMessageAsRead(n,t)},h.prototype.getAdditionalData=function(){return this.storage.getAdditionalData()},h.prototype.getMessages=function(n,i,r){var u="getMessage";u+=t.RECORD_DELIM+n+t.FIELD_DELIM+i+t.FIELD_DELIM+r;this.readItClient.send("command",u)},h.prototype.receiveMessages=function(n){i.LogService.instance.write("message received - "+n.message.message);this.resetConnectionIdleTimer();var u=n.message.topic,r=n.message.message,f=u.substr(u.lastIndexOf("_")+1);switch(f){case"MSG":r.lastIndexOf(t.RECORD_DELIM)==r.length-t.RECORD_DELIM.length&&(r=r.substr(0,r.lastIndexOf(t.RECORD_DELIM)));this.handleServerData(u,r);this.dispatchEvent(n);break;default:this.dispatchEvent(n)}},h.prototype.handleServerData=function(r,u){var a=u.split(t.RECORD_DELIM),y=r.split("_"),g=a.shift(),k=a.length>0&&a[0].length>0?a.length:0,c=new e,d=0,p,f,o,w,b,h,l,s,v;for(c.HR=k,c.HT=g,c.UI=y[0],c.PC=y[1],c.LI=y.length>2?Number(y[2]):1,i.LogService.instance.write(c.toString()),p=0;p<k;p++)if(f=a[p].split(t.FIELD_DELIM),o=new n.PushMessage,o.MI=Number(f[n.FieldIndexes.MESSAGE_ID]),o.AC=f[n.FieldIndexes.MESSAGE_ACTION],!this.storage.isMessageRead(o.MI)||o.AC==n.FieldDefinitions.ACTION_DELETE){if(o.AC==n.FieldDefinitions.ACTION_ADD||o.AC==n.FieldDefinitions.ACTION_UPDATE)for(o.IM=Number(f[n.FieldIndexes.MESSAGE_IMPACT_ID]),o.TY=f[n.FieldIndexes.MESSAGE_TYPE],o.SU=f[n.FieldIndexes.MESSAGE_SUBJECT],o.ET=Number(f[n.FieldIndexes.MESSAGE_EXPIRY_TIME]),o.NT=d=Number(f[n.FieldIndexes.MESSAGE_NUM_TEMPLATES]),o.templates=[],f=f.splice(n.FieldIndexes.LENGTH_MESSAGE_ADD_UPDATE,f.length-n.FieldIndexes.LENGTH_MESSAGE_ADD_UPDATE),w=0;w<d;w++){for(b=0,h=new n.GraphicTemplate,h.NR=b=Number(f[n.FieldIndexes.TEMPLATE_NUM_RULES]),h.rules=[],h.layouts=[],f=f.splice(n.FieldIndexes.LENGTH_TEMPLATE,f.length-n.FieldIndexes.LENGTH_TEMPLATE),l=0;l<b;l++)s=new n.GraphicRule,s.LS=Number(f[n.FieldIndexes.RULE_LOGIN_OR_SESSION]),s.AI=Number(f[n.FieldIndexes.RULE_AREA_ID]),s.CI=Number(f[n.FieldIndexes.RULE_CLASSIFICATION_ID]),s.PI=Number(f[n.FieldIndexes.RULE_POSITION_ID]),s.TD=Number(f[n.FieldIndexes.RULE_TIME_DELAY]),s.TT=Number(f[n.FieldIndexes.RULE_TIME_TRIGGER]),s.FI=Number(f[n.FieldIndexes.RULE_FIXTURE_ID]),s.BC=Number(f[n.FieldIndexes.RULE_BET_CONFIRMATION]),s.GI=f[n.FieldIndexes.RULE_GAME_ID],s.GG=f[n.FieldIndexes.RULE_GAME_GROUP_ID],h.rules.push(s),f=f.splice(n.FieldIndexes.LENGTH_RULE,f.length-n.FieldIndexes.LENGTH_RULE);for(h.NL=parseInt(f[0]),f=f.splice(1,f.length-1),l=0;l<h.NL;l++)v=new n.GraphicLayout,v.LI=Number(f[n.FieldIndexes.LAYOUT_ID]),v.ST=f[n.FieldIndexes.LAYOUT_STATUS],v.PI=Number(f[n.FieldIndexes.LAYOUT_POSITION_ID]),h.layouts.push(v),f=f.splice(n.FieldIndexes.LENGTH_LAYOUT,f.length-n.FieldIndexes.LENGTH_LAYOUT);o.templates.push(h)}c.messages.push(o)}this.dispatchMessageData(r,c)},h.prototype.dispatchMessageData=function(t,i){this.dispatchEvent(new n.PushMessageEvent(n.PushMessageEvent.PUSH_MESSAGE,t,i))},h.prototype.connected=function(){this.resetConnectionIdleTimer();this.getMessages(this.sessionToken,this.productCode,this.languageId)},h.prototype.connectionFailed=function(n){i.LogService.instance.write("Connection failed");this.dispatchEvent(n)},h.prototype.disconnected=function(n){i.LogService.instance.write("Disconnecting");this.dispatchEvent(n)},h.prototype.resetConnectionIdleTimer=function(){var n=this,t=this;clearTimeout(this.connectionIdleTimer);this.connectionIdleTimer=setTimeout(function(){i.LogService.instance.write("Connection appears idle, re-connecting...");clearTimeout(n.connectionIdleTimer);t.connect()},this.idleTimerIntervalMilliseconds)},h}(f);n.PushMessagingProxy=h}(PushMessaging||(PushMessaging={}));bet365=bet365||{};bet365.product=bet365.product||{};bet365.product.bingo=bet365.product.bingo||{};bet365.product.bingo.ThirdPartyCookieCheckModal=bet365.product.bingo.ThirdPartyCookieCheckModal||{};$(document).ready(function(){"use strict";thirdPartyCookieCheckModalInfo={cookieRestricted:!1,cookieCheckAttempts:0,thirdPartyCookieCheckModalElement:undefined,thirdPartyCookieCheckModalButton:undefined};bet365.cmsCore.getPageAttributes($).ThirdPartyCookieBaseUrl&&(bet365.cmsCore.gameLaunchMechanism.thirdPartyCookiesRestrictedCheck=bet365.product.bingo.ThirdPartyCookieCheckModal.thirdPartyCookiesRestrictedCheck,bet365.product.bingo.ThirdPartyCookieCheckModal.initialize($))});bet365.product.bingo.ThirdPartyCookieCheckModal={initialize:function(n){"use strict";thirdPartyCookieCheckModalInfo.thirdPartyCookieCheckModalElement=n(".thirdPartyCookieCheckModal.modal");thirdPartyCookieCheckModalInfo.thirdPartyCookieCheckModalButton=thirdPartyCookieCheckModalInfo.thirdPartyCookieCheckModalElement.find(".button");bet365.product.bingo.ThirdPartyCookieCheckModal.bindButtonClick();bet365.product.bingo.ThirdPartyCookieCheckModal.startupCookieRestrictionCheck(n)},bindButtonClick:function(){"use strict";thirdPartyCookieCheckModalInfo.thirdPartyCookieCheckModalButton.click(function(){bet365.cmsCore.popups.hideDialog("div.thirdPartyCookieCheckModal.modal")})},startupCookieRestrictionCheck:function(n){"use strict";var t=window.location;if(bet365.product.bingo.ThirdPartyCookieCheckModal.isBrowserIE()){thirdPartyCookieCheckModalInfo.cookieRestricted=!1;return}if(bet365.product.bingo.ThirdPartyCookieCheckModal.getCookie("ce")===""){var i=[bet365.cmsCore.getPageAttributes(n).ThirdPartyCookieBaseUrl,"/CookieCheck","?BaseUrl="].join(""),r=t.origin?t.origin:[window.location.protocol,"//",window.location.hostname].join(""),u=[i,r].join("");n('<iframe id="ck" src="'+u+'" height="0" width="0"/>').appendTo("body");setTimeout(function(){bet365.product.bingo.ThirdPartyCookieCheckModal.thirdPartyCookieCheckRepeat()},500)}else thirdPartyCookieCheckModalInfo.cookieRestricted=!1},thirdPartyCookieCheckRepeat:function(){"use strict";try{if(thirdPartyCookieCheckModalInfo.cookieCheckAttempts>=5)return;thirdPartyCookieCheckModalInfo.cookieCheckAttempts++;bet365.product.bingo.ThirdPartyCookieCheckModal.checkIFrameForThirdPartyCookieCheck()||setTimeout(function(){bet365.product.bingo.ThirdPartyCookieCheckModal.thirdPartyCookieCheckRepeat()},500)}catch(n){setTimeout(function(){bet365.product.bingo.ThirdPartyCookieCheckModal.thirdPartyCookieCheckRepeat()},500)}},checkIFrameForThirdPartyCookieCheck:function(){"use strict";try{var n=$("#ck").contents().find("#success").text().toLowerCase();return n==="true"?(thirdPartyCookieCheckModalInfo.cookieRestricted=!1,bet365.product.bingo.ThirdPartyCookieCheckModal.setCookie("ce","1",1e4),!0):n==="false"?(thirdPartyCookieCheckModalInfo.cookieRestricted=!0,!0):!1}catch(t){return!1}},areThirdPartyCookiesRestricted:function(){"use strict";var n=$("body").data("pageAttributes").mobile;return n==="true"?!1:(thirdPartyCookieCheckModalInfo.cookieRestricted&&bet365.product.bingo.ThirdPartyCookieCheckModal.checkIFrameForThirdPartyCookieCheck(),thirdPartyCookieCheckModalInfo.cookieRestricted)},thirdPartyCookiesRestrictedCheck:function(n){"use strict";var i=bet365.product.bingo.ThirdPartyCookieCheckModal.areThirdPartyCookiesRestricted(),t=!1;return i&&(t=bet365.product.bingo.ThirdPartyCookieCheckModal.getGameLaunchInformationByGameId(n).isRestricted),t&&bet365.product.bingo.ThirdPartyCookieCheckModal.showThirdPartyCookieCheckModal(),t},showThirdPartyCookieCheckModal:function(){"use strict";bet365.cmsCore.popups.showDialog(".modals .thirdPartyCookieCheckModal.modal")},getGameLaunchInformationByGameId:function(n){"use strict";var t={gameId:n,isRestricted:!1};return $.ajax({type:"POST",dataType:"json",url:"/GamePod/GamePlayInformationByGameId/",data:{gameId:n},cache:!1,async:!1}).done(function(n){n&&(t.isRestricted=n.r)}),t},isBrowserIE:function(){"use strict";var n=navigator.userAgent.toLocaleLowerCase();return n.indexOf("opr")===-1&&n.indexOf("chrome")===-1&&n.indexOf("firefox")===-1&&n.indexOf("android")===-1&&n.indexOf("safari")===-1},getCookie:function(n){"use strict";var i=document.cookie,t,r;return i.length>0&&(t=i.indexOf(n+"="),t!==-1)?(t=t+n.length+1,r=i.indexOf(";",t),r===-1&&(r=i.length),decodeURIComponent(i.substring(t,r))):""},setCookie:function(n,t,i,r){"use strict";var u="",f;i&&(f=new Date,f.setMilliseconds(f.getMilliseconds()+i*864e5),u=f.toUTCString(),u="; expires="+u);r&&(r="; domain="+r);document.cookie=[n,"=",t,u,";path=/",r].join("")}};bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.Header=bet365.cmsCore.Header||{};$(document).ready(function(){"use strict";$(".responsive-header").length!==0&&(bet365.cmsCore.Header.ResponsiveHeader.init(),bet365.cmsCore.Header.ResponsiveHeader.Clock.init())});bet365.cmsCore.Header.ResponsiveHeader=function(){"use strict";function g(){var f;if(i=$(".responsive-header"),t=i.find(".LanguageSelector"),a=i.find(".LanguageSelector li"),s=i.find(".service-selector"),v=i.find(".services-text"),e=i.find(".right-hand-side-container"),r=e.find(".icon"),n=e.find(".large-header-menu-container"),y=e.find(".log-out"),u=e.find(".user-information"),l=n.find(".message-number"),h=n.find(".row.services a"),c=n.find(".cog-wrapper"),p=n.find(".scrollable"),w=n.find(".row-expand"),f=r.length>0,et(),!f){o=i.find(".aGo");b=i.find(".JoinNow");nt();return}k()&&$("body").addClass("old-ie");it();tt();st();bet365.cmsCore.Header.ResponsiveHeader.Balance.init();ot();ht();bet365.cmsCore.Header.ResponsiveHeader.UserPreference.Init(n);bet365.cmsCore.Header.ResponsiveHeader.ContainerScroll.Init(p)}function k(){var n=navigator.userAgent.toLowerCase();return n.indexOf("msie 8.")!==-1||n.indexOf("msie 9.")!==-1?!0:!1}function nt(){o.focus(function(){o.addClass("focused")});o.blur(function(){o.removeClass("focused")});b.attr("tabindex","-1");o.attr("tabindex","0")}function tt(){e.mouseleave(function(){r.removeClass(f);n.removeClass(f)})}function it(){r.click(function(){rt()})}function rt(){r.hasClass(f)?(r.removeClass(f),n.removeClass(f)):(r.addClass(f),n.addClass(f),ut(),ft())}function ut(){l.length!==0&&$.ajax({url:"/AccountMessages/UnreadMessages",type:"POST"}).done(function(n){n?l.html(n.toString()):l.html("0")})}function ft(){var t="selected";n.removeClass("services-submenu");h.addClass(t);c.removeClass(t);bet365.cmsCore.Header.ResponsiveHeader.UserPreference.ResetUserPreferenceMenu()}function et(){var n="active";v.click(function(){s.toggleClass(n);t.removeClass(n)});s.mouseleave(function(){s.removeClass(n)});t.mouseleave(function(){t.removeClass(n)});t.click(function(){t.toggleClass(n);s.removeClass(n)});a.click(function(){$(this).find("a").length>0&&(window.location.href=$(this).attr("data-languageurl"))});t.hover(function(){t.addClass("hover")},function(){t.removeClass("hover")})}function ot(){y.click(function(){bet365.cmsCore.Session.LogOut()})}function st(){var n="username-hidden",t="username-visible",i=bet365.cmsCore.DataStorage.Get(bet365.cmsCore.DataStorage.Keys.UsernameVisibility);i&&i.hideUsername?u.addClass(n):u.addClass(t);u.find(".show-username").click(function(){u.addClass(t).removeClass(n);bet365.cmsCore.DataStorage.Remove(bet365.cmsCore.DataStorage.Keys.UsernameVisibility)});u.find(".hide-username").click(function(){u.addClass(n).removeClass(t);bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.UsernameVisibility,{hideUsername:!0})})}function ht(){var t="selected";h.click(function(){n.removeClass("services-submenu");h.addClass(t);c.removeClass(t)});c.click(function(){n.addClass("services-submenu");h.removeClass(t);c.addClass(t)});d()}function d(){w.width(n.width())}var i,t,a,s,v,e,n,r,y,u,h,c,p,w,l,o,b,f="show-menu";return{init:g,IsOldInternetExplorer:k,UpdateUserPreferenceMenuSize:d}}();bet365.cmsCore.Header.ResponsiveHeader.Clock=function(){"use strict";function s(){n=$(".clock-container");i=n.find(".clock");r=n.find(".time");t=n.find(".hide-login-time");u=n.find(".last-login-text");f=n.find(".last-login");h();setTimeout(function(){o()},1e3)}function h(){var n=new Date,t=n.getTime(),i=r.data("date").toString(),u=new Date(i),f=u.getTime();e=f-t}function o(){var f=(new Date).getTime(),s=f+e,n=new Date(s),t=n.getHours(),r=n.getMinutes(),u=n.getSeconds(),h=(t<10?"0"+t:t)+":"+(r<10?"0"+r:r)+":"+(u<10?"0"+u:u);i.text(h);c(n);setTimeout(function(){o()},1e3)}function c(n){var i,r;t.length>0&&(i=new Date(t[0].innerText),r=n.getTime()-i.getTime(),r>6e4&&l())}function l(){var n=1e3;t.remove();t=[];u.fadeOut(n);f.fadeOut(n)}var n,i,r,t,u,f,e;return{init:s}}();bet365.cmsCore.Header.ResponsiveHeader.Balance=function(){"use strict";function l(){n=$(".balance-container");t=$(".balance-expand-container");e=n.find(".chevron-icon");o=n.find(".visibility-icon");r=n.find(".refresh-icon");s=n.find(".balance-amount");a();y()}function a(){e.click(function(){t.toggleClass("balance-expanded")});o.click(function(){var t=!n.hasClass(f);bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.HideBalance,{hideBalance:t});h()});h();c()}function h(){var t=bet365.cmsCore.DataStorage.Get(bet365.cmsCore.DataStorage.Keys.HideBalance),i=n.find(".visibility-icon").length>0;t&&t.hideBalance&&i?n.addClass(f):n.removeClass(f)}function v(n){var u=n.SportsAndGamesTotalBalance?n.SportsAndGamesTotalBalance:n.Total,r;(s.html(i(u,n.ISOCode)),t.find(".bonus-balance-container .balance-value").html(i(n.Bonus,n.ISOCode)),t.find(".withdrawable-balance-container .balance-value").html(i(n.Withdrawable,n.ISOCode)),r=t.find(".non-withdrawable-balance-container .balance-value"),r.length!==0)&&(r.html(i(n.NonWithdrawable,n.ISOCode)),t.find(".total-balance-container .balance-value").html(i(n.Total,n.ISOCode)))}function i(n,t){return n.replace(t,'<span class="balance-currency">'+t+"<\/span>")}function y(){r.click(function(){if(!u){var n="spinning";u=!0;r.addClass(n);c();setTimeout(function(){r.removeClass(n);u=!1},2e3)}})}function c(){$.ajax({dataType:"json",url:"/balance/balance",cache:!1,success:function(n){n!==undefined&&n!==null&&(v(n),bet365.cmsCore.Header.ResponsiveHeader.UpdateUserPreferenceMenuSize())}})}var n,t,e,o,r,s,u,f="hide-balance";return{init:l}}();bet365.cmsCore.Header.ResponsiveHeader.UserPreference=function(){function v(u){n=u;f=n.find(".row.services a");e=n.find(".cog-wrapper");t=n.find(".row.language");o=n.find(".row-expand.language ul li");i=n.find(".row.timezone");s=n.find(".row-expand.timezone ul li");r=n.find(".row.inactivity");h=n.find(".row-expand.inactivity ul li");w();c(t,o,"services-language","data-language-id",function(n){b(n)});c(i,s,"services-timezone","data-time-zone-id",function(n){k(n)});y(r,h,"services-inactivity","data-inactivity-id","data-inactivity-amount",function(n,t){d(n,t)})}function c(n,t,i,r,u){l(n,i);t.click(function(f){var e=a(f,t,n,i),o=e.attr(r);u(o)})}function y(n,t,i,r,u,f){l(n,i);t.click(function(e){var o=a(e,t,n,i),s=o.attr(r),h=o.attr(u);f(s,h)})}function l(t,i){t.click(function(t){n.toggleClass(i);var r=$(t.currentTarget);r.toggleClass("user-preference-menu-selected");bet365.cmsCore.Header.ResponsiveHeader.ContainerScroll.SetupScrollbar()})}function a(t,i,r,u){var e="selected",f=$(t.currentTarget);return i.removeClass(e),f.addClass(e),r.find(".setting-value").text(f.text()),n.removeClass(u),f}function p(){n.removeClass("services-language services-timezone services-inactivity");n.find(".user-preference-menu-selected").removeClass("user-preference-menu-selected")}function w(){var o=bet365.cmsCore.DataStorage.Get(bet365.cmsCore.DataStorage.Keys.DropDownMenuUpdated),s="selected";o&&(o.inactivityUpdated||o.languageUpdated||o.timeZoneUpdated)&&(n.addClass("show-menu services-submenu"),f.removeClass(s),e.addClass(s),o.languageUpdated&&u(t),o.timeZoneUpdated&&u(i),o.inactivityUpdated&&u(r),bet365.cmsCore.DataStorage.Remove(bet365.cmsCore.DataStorage.Keys.DropDownMenuUpdated))}function u(n){n.addClass("updated");setTimeout(function(){n.removeClass("updated")},6e3)}function b(n){bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.DropDownMenuUpdated,{languageUpdated:!0});$.ajax({type:"POST",url:"/UserData/SetLanguage/",data:{languageId:n}}).done(function(){window.location.reload()})}function k(n){bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.DropDownMenuUpdated,{timeZoneUpdated:!0});$.ajax({type:"POST",url:"/UserData/SetTimeZone/",data:{timeZoneId:n}}).done(function(){window.location.reload()})}function d(n,t){bet365.cmsCore.DataStorage.Set(bet365.cmsCore.DataStorage.Keys.DropDownMenuUpdated,{inactivityUpdated:!0});$.ajax({type:"POST",url:"/UserData/SetInactivity/",data:{inactivityId:n,inactivityAmount:t}}).done(function(){window.location.reload()})}var n,f,e,t,o,i,s,r,h;return{Init:v,ResetUserPreferenceMenu:p}}();bet365.cmsCore.Header.ResponsiveHeader.ContainerScroll=function(){function v(i){if(i.length!==0&&!bet365.cmsCore.Header.ResponsiveHeader.IsOldInternetExplorer()){window.animationFrame=window.requestAnimationFrame||window.setImmediate||function(n){return setTimeout(n,0)};e=i.get(0);n=i.find(".user-preference-scrollable-content").get(0);t=i.find(".scrollbar").get(0);t.addEventListener("mousedown",function(n){p(n)});n.addEventListener("scroll",l.bind(this));n.addEventListener("mouseenter",l.bind(this));var r=window.getComputedStyle(n);r.height==="0px"&&r["max-height"]!=="0px"&&(n.style.height=r["max-height"])}}function y(){e&&!bet365.cmsCore.Header.ResponsiveHeader.IsOldInternetExplorer()&&(c(),a())}function c(){var t=n.scrollHeight,r=n.clientHeight;i=r/t}function l(){c();window.animationFrame(function(){a()})}function a(){var r,u,f;i>=1?t.classList.add(s):(r=4,u=i*100-r,t.classList.remove(s),f=n.scrollTop/n.scrollHeight*100,t.style.cssText="height:"+u+"%; top:"+f+"%;")}function p(n){return r=n.pageY,t.classList.add(o),$("body").addClass(h),u=function(n){w(n)},f=function(){k()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",f),!1}function w(n){var t=n.pageY-r;r=n.pageY;window.animationFrame(function(){b(t)})}function b(t){n.scrollTop+=t/i}function k(){t.classList.remove(o);$("body").removeClass(h);document.removeEventListener("mousemove",u);document.removeEventListener("mouseup",f)}var e,n,t,i,r,u,f,o="custom-scrollbar-selected",s="scrollbar-hidden",h="custom-scrollbar-selected";return{Init:v,SetupScrollbar:y}}()