function setSearch(n,t,i){$(t).val(n);$(i).submit()}function setBestBet(n){window.location=n}var __extends,EC;typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var s,l,h,a,v=n,c,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,s=0;s<a;s+=1)c[s]=r(s,o)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",u="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),e.lastIndex=0,e.test(text)&&(text=text.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(n,t){"use strict";var i=n.History=n.History||{},r=n.jQuery;if(typeof i.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");i.Adapter={bind:function(n,t,i){r(n).bind(t,i)},trigger:function(n,t,i){r(n).trigger(t,i)},extractEventData:function(n,i,r){return i&&i.originalEvent&&i.originalEvent[n]||r&&r[n]||t},onDomLoad:function(n){r(n)}};typeof i.init!="undefined"&&i.init()}(window),function(n){"use strict";var i=n.document,u=n.setTimeout||u,f=n.clearTimeout||f,r=n.setInterval||r,t=n.History=n.History||{};if(typeof t.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");t.initHtml4=function(){if(typeof t.initHtml4.initialized!="undefined")return!1;if(t.initHtml4.initialized=!0,t.enabled=!0,t.savedHashes=[],t.isLastHash=function(n){var i=t.getHashByIndex();return n===i},t.isHashEqual=function(n,t){return n=encodeURIComponent(n).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),n===t},t.saveHash=function(n){return t.isLastHash(n)?!1:(t.savedHashes.push(n),!0)},t.getHashByIndex=function(n){return typeof n=="undefined"?t.savedHashes[t.savedHashes.length-1]:n<0?t.savedHashes[t.savedHashes.length+n]:t.savedHashes[n]},t.discardedHashes={},t.discardedStates={},t.discardState=function(n,i,r){var f=t.getHashByState(n),u;return u={discardedState:n,backState:r,forwardState:i},t.discardedStates[f]=u,!0},t.discardHash=function(n,i,r){var u={discardedHash:n,backState:r,forwardState:i};return t.discardedHashes[n]=u,!0},t.discardedState=function(n){var i=t.getHashByState(n);return t.discardedStates[i]||!1},t.discardedHash=function(n){return t.discardedHashes[n]||!1},t.recycleState=function(n){var i=t.getHashByState(n);return t.discardedState(n)&&delete t.discardedStates[i],!0},t.emulated.hashChange){t.hashChangeInit=function(){t.checkerFunction=null;var f="",s,u,e,o,h=Boolean(t.getHash());return t.isInternetExplorer()?(s="historyjs-iframe",u=i.createElement("iframe"),u.setAttribute("id",s),u.setAttribute("src","#"),u.style.display="none",i.body.appendChild(u),u.contentWindow.document.open(),u.contentWindow.document.close(),e="",o=!1,t.checkerFunction=function(){if(o)return!1;o=!0;var r=t.getHash(),i=t.getHash(u.contentWindow.document);return r!==f?(f=r,i!==r&&(e=i=r,u.contentWindow.document.open(),u.contentWindow.document.close(),u.contentWindow.document.location.hash=t.escapeHash(r)),t.Adapter.trigger(n,"hashchange")):i!==e&&(e=i,h&&i===""?t.back():t.setHash(i,!1)),o=!1,!0}):t.checkerFunction=function(){var i=t.getHash()||"";return i!==f&&(f=i,t.Adapter.trigger(n,"hashchange")),!0},t.intervalList.push(r(t.checkerFunction,t.options.hashChangeInterval)),!0};t.Adapter.onDomLoad(t.hashChangeInit)}if(t.emulated.pushState&&(t.onHashChange=function(i){var e=i&&i.newURL||t.getLocationHref(),u=t.getHashByUrl(e),r=null,o=null,f;return t.isLastHash(u)?(t.busy(!1),!1):(t.doubleCheckComplete(),t.saveHash(u),u&&t.isTraditionalAnchor(u))?(t.Adapter.trigger(n,"anchorchange"),t.busy(!1),!1):(r=t.extractState(t.getFullUrl(u||t.getLocationHref()),!0),t.isLastSavedState(r))?(t.busy(!1),!1):(o=t.getHashByState(r),f=t.discardedState(r),f)?(t.getHashByIndex(-2)===t.getHashByState(f.forwardState)?t.back(!1):t.forward(!1),!1):(t.pushState(r.data,r.title,encodeURI(r.url),!1),!0)},t.Adapter.bind(n,"hashchange",t.onHashChange),t.pushState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.pushState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),o=t.getHashByState(e),s=t.getState(!1),h=t.getHashByState(s),c=t.getHash(),l=t.expectedStateId==e.id;return(t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),o===h)?(t.busy(!1),!1):(t.saveState(e),l||t.Adapter.trigger(n,"statechange"),t.isHashEqual(o,c)||t.isHashEqual(o,t.getShortUrl(t.getLocationHref()))||t.setHash(o,!1),t.busy(!1),!0)},t.replaceState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.replaceState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),s=t.getHashByState(e),o=t.getState(!1),h=t.getHashByState(o),c=t.getStateByIndex(-2);return t.discardState(o,e,c),s===h?(t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),t.saveState(e),t.Adapter.trigger(n,"statechange"),t.busy(!1)):t.pushState(e.data,e.title,e.url,!1),!0}),t.emulated.pushState&&t.getHash()&&!t.emulated.hashChange)t.Adapter.onDomLoad(function(){t.Adapter.trigger(n,"hashchange")})};typeof t.init!="undefined"&&t.init()}(window),function(n,t){"use strict";var e=n.console||t,r=n.document,o=n.navigator,f=n.sessionStorage||!1,h=n.setTimeout,c=n.clearTimeout,l=n.setInterval,a=n.clearInterval,u=n.JSON,v=n.alert,i=n.History=n.History||{},s=n.history;try{f.setItem("TEST","1");f.removeItem("TEST")}catch(y){f=!1}if(u.stringify=u.stringify||u.encode,u.parse=u.parse||u.decode,typeof i.init!="undefined")throw new Error("History.js Core has already been loaded...");i.init=function(){return typeof i.Adapter=="undefined"?!1:(typeof i.initCore!="undefined"&&i.initCore(),typeof i.initHtml4!="undefined"&&i.initHtml4(),!0)};i.initCore=function(){if(typeof i.initCore.initialized!="undefined")return!1;if(i.initCore.initialized=!0,i.options=i.options||{},i.options.hashChangeInterval=i.options.hashChangeInterval||100,i.options.safariPollInterval=i.options.safariPollInterval||500,i.options.doubleCheckInterval=i.options.doubleCheckInterval||500,i.options.disableSuid=i.options.disableSuid||!1,i.options.storeInterval=i.options.storeInterval||1e3,i.options.busyDelay=i.options.busyDelay||250,i.options.debug=i.options.debug||!1,i.options.initialTitle=i.options.initialTitle||r.title,i.options.html4Mode=i.options.html4Mode||!1,i.options.delayInit=i.options.delayInit||!1,i.intervalList=[],i.clearAllIntervals=function(){var n,t=i.intervalList;if(typeof t!="undefined"&&t!==null){for(n=0;n<t.length;n++)a(t[n]);i.intervalList=null}},i.debug=function(){(i.options.debug||!1)&&i.log.apply(i,arguments)},i.log=function(){var s=!(typeof e=="undefined"||typeof e.log=="undefined"||typeof e.log.apply=="undefined"),t=r.getElementById("log"),n,f,h,o,i;for(s?(o=Array.prototype.slice.call(arguments),n=o.shift(),typeof e.debug!="undefined"?e.debug.apply(e,[n,o]):e.log.apply(e,[n,o])):n="\n"+arguments[0]+"\n",f=1,h=arguments.length;f<h;++f){if(i=arguments[f],typeof i=="object"&&typeof u!="undefined")try{i=u.stringify(i)}catch(c){}n+="\n"+i+"\n"}return t?(t.value+=n+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):s||v(n),!0},i.getInternetExplorerMajorVersion=function(){return i.getInternetExplorerMajorVersion.cached=typeof i.getInternetExplorerMajorVersion.cached!="undefined"?i.getInternetExplorerMajorVersion.cached:function(){for(var n=3,t=r.createElement("div"),i=t.getElementsByTagName("i");(t.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->")&&i[0];);return n>4?n:!1}()},i.isInternetExplorer=function(){return i.isInternetExplorer.cached=typeof i.isInternetExplorer.cached!="undefined"?i.isInternetExplorer.cached:Boolean(i.getInternetExplorerMajorVersion())},i.emulated=i.options.html4Mode?{pushState:!0,hashChange:!0}:{pushState:!Boolean(n.history&&n.history.pushState&&n.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(o.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(o.userAgent))),hashChange:Boolean(!("onhashchange"in n||"onhashchange"in r)||i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8)},i.enabled=!i.emulated.pushState,i.bugs={setHash:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),safariPoll:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),ieDoubleCheck:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<7)},i.isEmptyObject=function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},i.cloneObject=function(n){var i,t;return n?(i=u.stringify(n),t=u.parse(i)):t={},t},i.getRootUrl=function(){var n=r.location.protocol+"//"+(r.location.hostname||r.location.host);return(r.location.port||!1)&&(n+=":"+r.location.port),n+"/"},i.getBaseHref=function(){var t=r.getElementsByTagName("base"),i=null,n="";return t.length===1&&(i=t[0],n=i.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},i.getBaseUrl=function(){return i.getBaseHref()||i.getBasePageUrl()||i.getRootUrl()},i.getPageUrl=function(){var n=i.getState(!1,!1),t=(n||{}).url||i.getLocationHref();return t.replace(/\/+$/,"").replace(/[^\/]+$/,function(n){return/\./.test(n)?n:n+"/"})},i.getBasePageUrl=function(){return i.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(n){return/[^\/]$/.test(n)?"":n}).replace(/\/+$/,"")+"/"},i.getFullUrl=function(n,t){var u=n,r=n.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(n)||(u=r==="/"?i.getRootUrl()+n.replace(/^\/+/,""):r==="#"?i.getPageUrl().replace(/#.*/,"")+n:r==="?"?i.getPageUrl().replace(/[\?#].*/,"")+n:t?i.getBaseUrl()+n.replace(/^(\.\/)+/,""):i.getBasePageUrl()+n.replace(/^(\.\/)+/,"")),u.replace(/\#$/,"")},i.getShortUrl=function(n){var t=n,r=i.getBaseUrl(),u=i.getRootUrl();return i.emulated.pushState&&(t=t.replace(r,"")),t=t.replace(u,"/"),i.isTraditionalAnchor(t)&&(t="./"+t),t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},i.getLocationHref=function(n){return(n=n||r,n.URL===n.location.href)?n.location.href:n.location.href===decodeURIComponent(n.URL)?n.URL:n.location.hash&&decodeURIComponent(n.location.href.replace(/^[^#]+/,""))===n.location.hash?n.location.href:n.URL.indexOf("#")==-1&&n.location.href.indexOf("#")!=-1?n.location.href:n.URL||n.location.href},i.store={},i.idToState=i.idToState||{},i.stateToId=i.stateToId||{},i.urlToId=i.urlToId||{},i.storedStates=i.storedStates||[],i.savedStates=i.savedStates||[],i.normalizeStore=function(){i.store.idToState=i.store.idToState||{};i.store.urlToId=i.store.urlToId||{};i.store.stateToId=i.store.stateToId||{}},i.getState=function(n,t){typeof n=="undefined"&&(n=!0);typeof t=="undefined"&&(t=!0);var r=i.getLastSavedState();return!r&&t&&(r=i.createStateObject()),n&&(r=i.cloneObject(r),r.url=r.cleanUrl||r.url),r},i.getIdByState=function(n){var t=i.extractId(n.url),r;if(!t)if(r=i.getStateString(n),typeof i.stateToId[r]!="undefined")t=i.stateToId[r];else if(typeof i.store.stateToId[r]!="undefined")t=i.store.stateToId[r];else{for(;;)if(t=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),typeof i.idToState[t]=="undefined"&&typeof i.store.idToState[t]=="undefined")break;i.stateToId[r]=t;i.idToState[t]=n}return t},i.normalizeState=function(n){var t,r;return(n&&typeof n=="object"||(n={}),typeof n.normalized!="undefined")?n:(n.data&&typeof n.data=="object"||(n.data={}),t={},t.normalized=!0,t.title=n.title||"",t.url=i.getFullUrl(n.url?n.url:i.getLocationHref()),t.hash=i.getShortUrl(t.url),t.data=i.cloneObject(n.data),t.id=i.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,r=!i.isEmptyObject(t.data),(t.title||r)&&i.options.disableSuid!==!0&&(t.hash=i.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=i.getFullUrl(t.hash),(i.emulated.pushState||i.bugs.safariPoll)&&i.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},i.createStateObject=function(n,t,r){var u={data:n,title:t,url:r};return i.normalizeState(u)},i.getStateById=function(n){return n=String(n),i.idToState[n]||i.store.idToState[n]||t},i.getStateString=function(n){var t,r;return t=i.normalizeState(n),r={data:t.data,title:n.title,url:n.url},u.stringify(r)},i.getStateId=function(n){var t;return t=i.normalizeState(n),t.id},i.getHashByState=function(n){var t;return t=i.normalizeState(n),t.hash},i.extractId=function(n){var i,t,u,r;return r=n.indexOf("#")!=-1?n.split("#")[0]:n,t=/(.*)\&_suid=([0-9]+)$/.exec(r),u=t?t[1]||n:n,i=t?String(t[2]||""):"",i||!1},i.isTraditionalAnchor=function(n){return!/[\/\?\.]/.test(n)},i.extractState=function(n,t){var r=null,u,f;return t=t||!1,u=i.extractId(n),u&&(r=i.getStateById(u)),r||(f=i.getFullUrl(n),u=i.getIdByUrl(f)||!1,u&&(r=i.getStateById(u)),r||!t||i.isTraditionalAnchor(n)||(r=i.createStateObject(null,null,f))),r},i.getIdByUrl=function(n){return i.urlToId[n]||i.store.urlToId[n]||t},i.getLastSavedState=function(){return i.savedStates[i.savedStates.length-1]||t},i.getLastStoredState=function(){return i.storedStates[i.storedStates.length-1]||t},i.hasUrlDuplicate=function(n){var t;return t=i.extractState(n.url),t&&t.id!==n.id},i.storeState=function(n){return i.urlToId[n.url]=n.id,i.storedStates.push(i.cloneObject(n)),n},i.isLastSavedState=function(n){var t=!1,r,u,f;return i.savedStates.length&&(r=n.id,u=i.getLastSavedState(),f=u.id,t=r===f),t},i.saveState=function(n){return i.isLastSavedState(n)?!1:(i.savedStates.push(i.cloneObject(n)),!0)},i.getStateByIndex=function(n){return typeof n=="undefined"?i.savedStates[i.savedStates.length-1]:n<0?i.savedStates[i.savedStates.length+n]:i.savedStates[n]},i.getCurrentIndex=function(){return i.savedStates.length<1?0:i.savedStates.length-1},i.getHash=function(n){var t=i.getLocationHref(n);return i.getHashByUrl(t)},i.unescapeHash=function(n){var t=i.normalizeHash(n);return decodeURIComponent(t)},i.normalizeHash=function(n){return n.replace(/[^#]*#/,"").replace(/#.*/,"")},i.setHash=function(n,t){var u,f;return t!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.setHash,args:arguments,queue:t}),!1):(i.busy(!0),u=i.extractState(n,!0),u&&!i.emulated.pushState?i.pushState(u.data,u.title,u.url,!1):i.getHash()!==n&&(i.bugs.setHash?(f=i.getPageUrl(),i.pushState(null,null,f+"#"+n,!1)):r.location.hash=n),i)},i.escapeHash=function(t){var r=i.normalizeHash(t);return r=n.encodeURIComponent(r),i.bugs.hashEscape||(r=r.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),r},i.getHashByUrl=function(n){var t=String(n).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return i.unescapeHash(t)},i.setTitle=function(n){var t=n.title,u;t||(u=i.getStateByIndex(0),u&&u.url===n.url&&(t=u.title||i.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(f){}return r.title=t,i},i.queues=[],i.busy=function(n){if(typeof n!="undefined"?i.busy.flag=n:typeof i.busy.flag=="undefined"&&(i.busy.flag=!1),!i.busy.flag){c(i.busy.timeout);var t=function(){var n,r,u;if(!i.busy.flag)for(n=i.queues.length-1;n>=0;--n)(r=i.queues[n],r.length!==0)&&(u=r.shift(),i.fireQueueItem(u),i.busy.timeout=h(t,i.options.busyDelay))};i.busy.timeout=h(t,i.options.busyDelay)}return i.busy.flag},i.busy.flag=!1,i.fireQueueItem=function(n){return n.callback.apply(n.scope||i,n.args||[])},i.pushQueue=function(n){return i.queues[n.queue||0]=i.queues[n.queue||0]||[],i.queues[n.queue||0].push(n),i},i.queue=function(n,t){return typeof n=="function"&&(n={callback:n}),typeof t!="undefined"&&(n.queue=t),i.busy()?i.pushQueue(n):i.fireQueueItem(n),i},i.clearQueue=function(){return i.busy.flag=!1,i.queues=[],i},i.stateChanged=!1,i.doubleChecker=!1,i.doubleCheckComplete=function(){return i.stateChanged=!0,i.doubleCheckClear(),i},i.doubleCheckClear=function(){return i.doubleChecker&&(c(i.doubleChecker),i.doubleChecker=!1),i},i.doubleCheck=function(n){return i.stateChanged=!1,i.doubleCheckClear(),i.bugs.ieDoubleCheck&&(i.doubleChecker=h(function(){return i.doubleCheckClear(),i.stateChanged||n(),!0},i.options.doubleCheckInterval)),i},i.safariStatePoll=function(){var r=i.extractState(i.getLocationHref()),t;if(!i.isLastSavedState(r))return t=r,t||(t=i.createStateObject()),i.Adapter.trigger(n,"popstate"),i},i.back=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.back,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.back(!1)}),s.go(-1),!0)},i.forward=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.forward,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.forward(!1)}),s.go(1),!0)},i.go=function(n,t){var r;if(n>0)for(r=1;r<=n;++r)i.forward(t);else if(n<0)for(r=-1;r>=n;--r)i.back(t);else throw new Error("History.go: History.go requires a positive or negative integer passed.");return i},i.emulated.pushState){var y=function(){};i.pushState=i.pushState||y;i.replaceState=i.replaceState||y}else i.onPopState=function(t,r){var e=!1,u=!1,o,f;return(i.doubleCheckComplete(),o=i.getHash(),o)?(f=i.extractState(o||i.getLocationHref(),!0),f?i.replaceState(f.data,f.title,f.url,!1):(i.Adapter.trigger(n,"anchorchange"),i.busy(!1)),i.expectedStateId=!1,!1):(e=i.Adapter.extractEventData("state",t,r)||!1,u=e?i.getStateById(e):i.expectedStateId?i.getStateById(i.expectedStateId):i.extractState(i.getLocationHref()),u||(u=i.createStateObject(null,null,i.getLocationHref())),i.expectedStateId=!1,i.isLastSavedState(u))?(i.busy(!1),!1):(i.storeState(u),i.saveState(u),i.setTitle(u),i.Adapter.trigger(n,"statechange"),i.busy(!1),!0)},i.Adapter.bind(n,"popstate",i.onPopState),i.pushState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.pushState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.pushState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0},i.replaceState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.replaceState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.replaceState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0};if(f){try{i.store=u.parse(f.getItem("History.store"))||{}}catch(p){i.store={}}i.normalizeStore()}else i.store={},i.normalizeStore();if(i.Adapter.bind(n,"unload",i.clearAllIntervals),i.saveState(i.storeState(i.extractState(i.getLocationHref(),!0))),f&&(i.onUnload=function(){var n,t,r;try{n=u.parse(f.getItem("History.store"))||{}}catch(o){n={}}n.idToState=n.idToState||{};n.urlToId=n.urlToId||{};n.stateToId=n.stateToId||{};for(t in i.idToState)i.idToState.hasOwnProperty(t)&&(n.idToState[t]=i.idToState[t]);for(t in i.urlToId)i.urlToId.hasOwnProperty(t)&&(n.urlToId[t]=i.urlToId[t]);for(t in i.stateToId)i.stateToId.hasOwnProperty(t)&&(n.stateToId[t]=i.stateToId[t]);i.store=n;i.normalizeStore();r=u.stringify(n);try{f.setItem("History.store",r)}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR)f.length&&(f.removeItem("History.store"),f.setItem("History.store",r));else throw e;}},i.intervalList.push(l(i.onUnload,i.options.storeInterval)),i.Adapter.bind(n,"beforeunload",i.onUnload),i.Adapter.bind(n,"unload",i.onUnload)),!i.emulated.pushState&&(i.bugs.safariPoll&&i.intervalList.push(l(i.safariStatePoll,i.options.safariPollInterval)),(o.vendor==="Apple Computer, Inc."||(o.appCodeName||"")==="Mozilla")&&(i.Adapter.bind(n,"hashchange",function(){i.Adapter.trigger(n,"popstate")}),i.getHash())))i.Adapter.onDomLoad(function(){i.Adapter.trigger(n,"hashchange")})};i.options&&i.options.delayInit||i.init()}(window),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function i(t){return n.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:parseFloat(n.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(){return n(window)._scrollable()},n.fn._scrollable=function(){return this.map(function(){var t=this,r=!t.nodeName||n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1,i;return r?(i=(t.contentWindow||t).document||t.ownerDocument||t,/webkit/i.test(navigator.userAgent)||i.compatMode=="BackCompat"?i.body:i.documentElement):t})},n.fn.scrollTo=function(r,u,f){return typeof u=="object"&&(f=u,u=0),typeof f=="function"&&(f={onAfter:f}),r=="max"&&(r=9e9),f=n.extend({},t.defaults,f),u=u||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(u/=2),f.offset=i(f.offset),f.over=i(f.over),this._scrollable().each(function(){function l(n){h.animate(o,u,f.easing,n&&function(){n.call(this,e,f)})}var a;if(r!=null){var s=this,h=n(s),e=r,c,o={},v=h.is("html,body");switch(typeof e){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=i(e);break}if(e=n(e,this),!e.length)return;case"object":(e.is||e.style)&&(c=(e=n(e)).offset())}a=n.isFunction(f.offset)&&f.offset(s,e)||f.offset;n.each(f.axis.split(""),function(n,i){var p=i=="x"?"Left":"Top",u=p.toLowerCase(),r="scroll"+p,w=s[r],b=t.max(s,i),y;c?(o[r]=c[u]+(v?0:w-h.offset()[u]),f.margin&&(o[r]-=parseInt(e.css("margin"+p))||0,o[r]-=parseInt(e.css("border"+p+"Width"))||0),o[r]+=a[u]||0,f.over[u]&&(o[r]+=e[i=="x"?"width":"height"]()*f.over[u])):(y=e[u],o[r]=y.slice&&y.slice(-1)=="%"?parseFloat(y)/100*b:y);f.limit&&/^\d+$/.test(o[r])&&(o[r]=o[r]<=0?0:Math.min(o[r],b));!n&&f.queue&&(w!=o[r]&&l(f.onAfterFirst),delete o[r])});l(f.onAfter)}}).end()},t.max=function(t,i){var r=i=="x"?"Width":"Height",u="scroll"+r;if(!n(t).is("html,body"))return t[u]-n(t)[r.toLowerCase()]();var f="client"+r,e=t.ownerDocument.documentElement,o=t.ownerDocument.body;return Math.max(e[u],o[u])-Math.min(e[f],o[f])},t}),function(n){var t;(function(t){var i;(function(t){"use strict";var o=function(){function n(n){this.component=$("div[data-js-guid='"+n+"']");this.guid=n}return n}(),r,i,u,f,e;t.BaseComponent=o;r=function(){function n(){}return n.openModal=function(n){$("<a/>").addClass("js-popup").attr("href",n).attr("data-popup-modal","true").modal().click()},n}();t.SppHelper=r;i=function(){function n(){}return n.logToConsole=function(n,t,i){if(t===void 0&&(t=!1),i===void 0&&(i=null),window.console&&console!==undefined&&console.log!==undefined&&console.log(n),this.isDebugEnabled){var r=$("#sppDebugConsole"),u=$("#sppDebugCounter"),f=parseInt(u.text()),e='<span class="line">'+ ++f+"&gt; <\/span>";u.text(f);t===!0&&(n='<span class="error">'+n+"<\/span>",r.addClass("has-error"));i?r.append("<div data-selector="+i+">"+e+n+"<\/div>"):r.append("<div>"+e+n+"<\/div>")}},n.registerJavascrviptHandler=function(){if($("meta[name=developerMode]").length==0){this.isDebugEnabled=!1;return}this.isDebugEnabled=!0;window.onerror=this.handleJavascriptError},n.handleJavascriptError=function(n,t,i,r){var u="JS ERROR: "+n+"<br />@ "+t+" (line: "+i;return r&&(u+=", col: "+r),u+=")",!1},n.startProfile=function(){return new Date},n.endProfile=function(n,t){if(this.isDebugEnabled)var r=(new Date).getTime()-n.getTime(),i=new Date(r),u=t==null?"":t+": ",f=u+(i.getSeconds()+i.getMilliseconds()/1e3)+"s"},n.isDebugEnabled=!1,n}();t.Debug=i;n.SmartPhonePortal.TypeScript.Debug.registerJavascrviptHandler();u=function(){function n(){}return n.count=function(){return this._count},n.increment=function(){(this._count++,this._count>1)||$.publish("spinner.open",[$("body")])},n.decrement=function(){(this._count--,this._count>0)||(this._count<0,$.publish("spinner.close",[$("body")]))},n.show=function(n){$.publish("spinner.open",[n])},n.hide=function(n){$.publish("spinner.close",[n])},n._count=0,n}();t.WaitPanel=u;f=function(){function t(){}return t.submitFormAndUpdate=function(n,i){var r={url:n.action,type:n.method,data:$(n).serialize(),traditional:!0},u=$.extend(r,i);t.update(u,i)},t.submitFormAndGetData=function(n,i){var r={url:n.action,type:n.method,data:$(n).serialize(),traditional:!0},u=$.extend(r,i);t.getData(u,i)},t.getDataFromAction=function(n,i,r,u,f,e){var o=t.getApiUrl(n,i,r),s=$.extend({url:o,data:u},f);t.doGeneric(s,e,t.doGetData)},t.sendDataToActionAndUpdate=function(n,i,r,u,f,e){var o=t.getApiUrl(n,i,r),s=$.extend({url:o,data:u},f);t.update(s,e)},t.getData=function(n,i){t.doGeneric(n,i,t.doGetData)},t.update=function(n,i){t.doGeneric(n,i,t.doUpdate)},t.getApiUrl=function(n,t,i){var f=$("meta[name='scID']").attr("content"),r="/SmartPhonePortalApi/"+n+"/"+t+"/"+f,u;return i!=null&&i.length>0&&(u=i.replace("?",""),r=r+"?"+u),r},t.doGeneric=function(n,t,i){var r={onError:jQuery.noop,onSuccess:jQuery.noop,onValidationFailed:jQuery.noop,useErrorWindow:!0,useWaitPanel:!0,waitPanelElement:null},u=$.extend({type:"POST",data:{},dataType:"json"},n),f=$.extend(r,t);i(u,f)},t.doUpdate=function(r,u){u.useWaitPanel&&n.SmartPhonePortal.TypeScript.WaitPanel.increment();var f=i.startProfile();$.ajax(r).done(function(n){if(n.Updates!=null)for(var i=0;i<n.Updates.length;i++)$("#"+n.Updates[i].Id).html(n.Updates[i].Html);if(n.Valid){u.onSuccess(null);t.addEvents(n.Events)}else u.onValidationFailed(null)}).fail(function(n,i,r){t.handleAjaxFail(n,i,r,u)}).always(function(){u.useWaitPanel&&n.SmartPhonePortal.TypeScript.WaitPanel.decrement()})},t.doGetData=function(r,u){var e=this,f;u.useWaitPanel&&(u.waitPanelElement?n.SmartPhonePortal.TypeScript.WaitPanel.show(u.waitPanelElement):n.SmartPhonePortal.TypeScript.WaitPanel.increment());f=i.startProfile();$.ajax(r).done(function(n){if(n.Valid){u.onSuccess(n.Data);t.addEvents(n.Events)}else u.onValidationFailed(n.ValidationErrors)}).fail(function(n,i,r){t.handleAjaxFail(n,i,r,u)}).always(function(){u.useWaitPanel&&(u.waitPanelElement?n.SmartPhonePortal.TypeScript.WaitPanel.hide(u.waitPanelElement):n.SmartPhonePortal.TypeScript.WaitPanel.decrement())})},t.addEvents=function(t){for(var i=0;i<t.length;i++)n.SmartPhonePortal.TypeScript.Debug.logToConsole(t[i],null,"selectorRegisteredEvent")},t.handleAjaxFail=function(t,i,r,u){var s,e,f,h,c,o;(t.status!==0||t.abort.length!==1)&&(s="Ajax update ended with status "+t.status+" ("+r+")",n.SmartPhonePortal.TypeScript.Debug.logToConsole(s,!0),u.useErrorWindow&&(e=$("#ServerErrorDebugMessage"),e.length>0?(f=t.responseText.indexOf("<body"),f+=t.responseText.substring(f).indexOf(">")+1,h=t.responseText.indexOf("<\/body>"),c=t.responseText.substring(f,h),$("#ServerErrorDebugMessageContent .data-block").html(c),e.click()):(o=$("#ServerErrorMessage"),o.length>0&&o.click())),u.onError())},t}();t.Ajax=f;e=function(){function n(){}return n.storeInSession=function(n,t){this.getSessionStorageAvailability&&sessionStorage.setItem(n,JSON.stringify(t))},n.removeFromSession=function(n){this.getSessionStorageAvailability&&sessionStorage.setItem(n,null)},n.getFromSession=function(n){if(!this.getSessionStorageAvailability)return null;var t=sessionStorage.getItem(n);return JSON.parse(t)},n.getSessionStorageAvailability=function(){if(!this.isChecked){sessionStorage||(this.sessionStorageIsAvailable=!1);try{sessionStorage.setItem(this.testStorageKey,this.testStorageValue);var n=sessionStorage.getItem(this.testStorageKey);n!==this.testStorageValue&&(this.sessionStorageIsAvailable=!1);sessionStorage.removeItem(this.testStorageKey);this.sessionStorageIsAvailable=!0}catch(t){this.sessionStorageIsAvailable=!1}this.isChecked=!0}return this.sessionStorageIsAvailable},n.isChecked=!1,n.sessionStorageIsAvailable=!0,n.testStorageKey="teststore",n.testStorageValue="testme",n}();t.SessionStore=e})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){var t={options:{autoRevalidate:!1,showSummary:!1,showValidationMessages:!1,summarySelector:"",includeHiddenFields:!1},_create:function(){this._isValidated=!1;this._fieldDefinitions=[];this._ruleDefinitions=[];this.addRule("required",this._checkRequiredField,"#ValidationError_MissingFields");this.addRule("requiredgroup",this._checkRequiredGroupField,"#ValidationError_MissingFieldsGroup");this.addRule("email",this._checkEmailField,"#ValidationError_Email");this.addRule("number",this._checkNumberField,"#ValidationError_Number");this.addRule("decimal",this._checkDecimalField,"#ValidationError_Number");this.addRule("date",this._checkIsDateField,"#ValidationError_Date");this.addRule("futuredate",this._checkFutureDateField,"#ValidationError_FutureDate");this.addRule("phonenr",this._checkPhoneNrField,"#ValidationError_PhoneNumber");this.addRule("checked",this._checkIsChecked,"#ValidationError_IsChecked");this.addRule("dateday",this._checkDateDay,"#ValidationError_DateDay");this.addRule("datemonth",this._checkDateMonth,"#ValidationError_DateMonth");this.addRule("dateyear",this._checkDateYear,"#ValidationError_DateYear");this.addRule("BEphone",this._checkBEphone,"#ValidationError_BEphone");this.addRule("BEbank",this._checkBEbank,"#ValidationError_BEbank");this.addRule("range",this._checkRange,"#ValidationError_Range");this.addRule("iban",n.proxy(this._checkIBAN,this),"#ValidationError_IBAN");this.addRule("becardidentitynumber",n.proxy(this._checkBeIdentityCardNumber,this),"#ValidationError_BECardIdentityNumber");this.addRule("benationalnumber",n.proxy(this._checkBeNationalNumber,this),"#ValidationError_BENationalNumber");this.addRule("regex",n.proxy(this._checkRegex,this),"#ValidationError_BENationalNumber");this._bindRevalidation()},addRule:function(t,i,r){var u=null;r&&(u=this.element.find(r).text(),u||(u=n(r).text()));this._ruleDefinitions.push({fieldSelector:t,func:i,message:u});this._processRule(t,i,u)},_processRule:function(t,i,r){for(var h=[],c=this.element.find('[data-validation~="'+t+'"]'),o,u,f,e,s=0;s<c.length;s++){if(o=c.eq(s),u=o.attr("name"),n.inArray(u,h)!==-1)continue;else h.push(u);for(f=null,e=0;e<this._fieldDefinitions.length;e++)if(this._fieldDefinitions[e].name==u){f=this._fieldDefinitions[e];break}f||(f={field:o,name:u,placeholder:this.element.find('[data-validation-placeholder="'+u+'"]'),rules:[]},this._fieldDefinitions.push(f));f.rules.push({func:i,message:r})}},_bindRevalidation:function(){var t,r,i;if(this.options.autoRevalidate)for(t=0;t<this._fieldDefinitions.length;t++)r=this._fieldDefinitions[t],i=this.element.find("[name='"+r.name+"']"),i.filter("input:not([type=radio], [type=checkbox]), textarea").blur(n.proxy(this.revalidate,this)),i.filter("select").change(n.proxy(this.revalidate,this)),i.filter("input:checkbox, input:radio").change(n.proxy(this.revalidate,this))},_checkIsChecked:function(n,t){return t.is(":checked")?!0:!1},_checkRequiredField:function(n){var t=n===undefined||n==null||n=="";return!t},_checkRequiredGroupField:function(t,i,r){var u=!1,f=i.data("requiredgroup"),e=r.find('[data-requiredgroup="'+f+'"]');return n(e).each(function(){var t=n(this).val(),i;return(n(this).is(":radio")||n(this).is(":checkbox"))&&(t=n(this).is(":checked")?n(this).val():null),i=t===undefined||t==null||t=="",i?void 0:(u=!0,!1)}),u},_checkNumberField:function(n){if(n=="")return!0;var t=parseInt(n);return!isNaN(t)&&t>0&&n.match(/\D+/)==null},_checkDecimalField:function(n){if(!n.length>0)return!0;if(isNaN(n.replace(",",".")||n.indexOf(".")!==-1))return!1;var t=parseFloat(n);return!isNaN(t)&&t>0},_checkRange:function(n,t){var i=t.data("min"),r=t.data("max"),u=parseInt(n);return i!==""&&i>u?!1:r!==""&&r<u?!1:!0},_checkDateDay:function(n){if(n=="")return!0;try{var t=parseInt(n);return t>0&&t<=31}catch(i){return!1}},_checkDateMonth:function(n){if(n=="")return!0;try{var t=parseInt(n);return t>0&&t<=12}catch(i){return!1}},_checkDateYear:function(n,t){var i,u,f,r;if(n=="")return!0;try{return i=parseInt(n),u=t.data("validation").indexOf("datepast")>-1,u?(r=(new Date).getFullYear(),i.toString().length==4&&r>=i):(f=t.data("validation").indexOf("datefuture")>-1,f?(r=(new Date).getFullYear(),r<=i):i.toString().length==4)}catch(e){return!1}},_checkBEphone:function(n){return n==""?!0:n.indexOf("+32")==0&&n.length>=10},_checkBEbank:function(n){return n===""?!0:n.match("[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}")!=null},_checkIsDateField:function(t){if(t=="")return!0;try{return window.Modernizr.inputtypes.date?n.datepicker.parseDate("yy-mm-dd",t):n.datepicker.parseDate(n.datepicker.regional[n("html").attr("lang")].dateFormat,t),!0}catch(i){}return!1},_checkFutureDateField:function(t){try{if(t=="")return!0;var r=window.Modernizr.inputtypes.date?n.datepicker.parseDate("yy-mm-dd",t):n.datepicker.parseDate(n.datepicker.regional[n("html").attr("lang")].dateFormat,t),i=new Date,u=new Date(i.getFullYear(),i.getMonth(),i.getDate());return r>u}catch(f){return!1}},_checkEmailField:function(n){return n?n.match(new RegExp("^[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?"))!=null:!0},_checkPhoneNrField:function(n){return n.match(new RegExp("^\\+[1-9]{1}[0-9]{10}$"))!=null},_hideValidationErrors:function(n,t){this.options.showValidationMessages&&(n.closest(".form__item").removeClass("form__item--has-errors"),this.options.showSummary||t.slideUp({complete:function(){t.text("")}}))},_removeDuplicates:function(n){var i=[],t,u,r,f;n:for(t=0,u=n.length;t<u;t++){for(r=0,f=i.length;r<f;r++)if(i[r]==n[t])continue n;i.push(n[t])}return i},reset:function(){var n,t;for(this._isValidated=!1,n=0;n<this._fieldDefinitions.length;n++)t=this._fieldDefinitions[n],this._hideValidationErrors(t.field,t.placeholder)},restart:function(n){var t,i;for(this.reset();this._fieldDefinitions.length;)this._fieldDefinitions.pop();for(t=0;t<this._ruleDefinitions.length;t++)i=this._ruleDefinitions[t],this._processRule(i.fieldSelector,i.func,i.message);n===!0&&this.validate()},revalidate:function(){return this._isValidated?this.validate():!1},_showValidationErrors:function(n,t,i){this.options.showValidationMessages&&(n.closest(".form__item").addClass("form__item--has-errors"),this.options.showSummary||t.text(i).slideDown())},validate:function(){var t,i,f,e,o,s,r,h,c;this._isValidated=!0;var a=new Date,u=!0,l=[];for(t=0;t<this._fieldDefinitions.length;t++)i=this._fieldDefinitions[t],f=this._validateField(i.field,i.rules,i.placeholder),f.success||(u=!1,l.push(f.message));if(this.options.showSummary)if(e=this.element.find(this.options.summarySelector),u)e.empty();else{for(o=n("<ul>"),s=this._removeDuplicates(l),r=0;r<s.length;r++)n("<li><\/li>").text(s[r]).appendTo(o);e.html(o)}return h=new Date-a,c="Form validated: "+(u?"Success":"Failure")+" ("+h+"ms)",EC.SmartPhonePortal.TypeScript.Debug.logToConsole(c),u},_validateField:function(n,t,i){var s=this,u,e,f,o,r;if(!n.is(":visible")&&!n.is('[data-validation~="hidden"]')&&!s.options.includeHiddenFields)return{success:!0};for(u=null,n.is(":radio")||n.is(":checkbox")?(e=n.attr("name"),e?u=this.element.find("[name='"+e+"']:checked").val():n.is(":checked")&&(u=n.val())):u=n.val(),f=0;f<t.length;f++)if(o=t[f],!o.func(u,n,this.element))return r=n.data("validation-message"),r||(r=o.message),r||(r="No validation message found!"),this._showValidationErrors(n,i,r),{success:!1,message:r};return this._hideValidationErrors(n,i),{success:!0}},longModulo:function(n,t){for(var i="",f=n.length,u,r=0;r<f;r++)i+=n.charAt(r),u=+i%t,i=u.toString(10);return+i},_checkBeIdentityCardNumber:function(n){var t;if(n.length==0)return!0;if(t=n.replace(/[\s-,.]+/g,""),!/^[0-9]{12}$/.test(t))return!1;var r=+t.substr(10,2),u=t.substr(0,10),i=this.longModulo(u,97);return i===r||i===0},_checkBeNationalNumber:function(n){var t;if(n.length==0)return!0;if(t=n.replace(/[\s-,.]+/g,""),!/^[0-9]{11}$/.test(t))return!1;var i=+t.substr(9,2),r=t.substr(0,9),u=97-this.longModulo(r,97);return u===i?!0:97-this.longModulo("2"+r,97)===i},_checkIBAN:function(n){var i,t;if(n.length==0)return!0;if(i=n.toUpperCase().replace(/[\s-,.]+/g,""),!/^[A-Z0-9]{5,}$/.test(i))return!1;var r=i.substr(4)+i.substr(0,4),f=r.length,u="";for(t=0;t<f;t++)u+=isNaN(+r[t])?(r[t].charCodeAt(0)-55).toString():r[t];return this.longModulo(u,97)===1},_checkRegex:function(n,t){if(n.length==0)return!0;var i=t.data("valRegexPattern"),r=t.data("valRegexFlags"),u=new RegExp(i,r);return n.match(u)!=null}},i;n.widget("EC.smartphonevalidator",t);i={addRule:function(n,t){this._ruleDefinitions.push({fieldSelector:n,func:t});this._processRule(n,t)},_processRule:function(t,i){for(var s=[],h=this.element.find("[data-val-"+t+"]"),r,u,e=0;e<h.length;e++){var o=h.eq(e),f=o.attr("name"),c=o.attr("data-val-"+t);if(n.inArray(f,s)!==-1)continue;else s.push(f);for(r=null,u=0;u<this._fieldDefinitions.length;u++)if(this._fieldDefinitions[u].name==f){r=this._fieldDefinitions[u];break}r||(r={field:o,name:f,placeholder:this.element.find('[data-validation-placeholder="'+f+'"]'),rules:[]},this._fieldDefinitions.push(r));r.rules.push({func:i,message:c})}}};n.widget("EC.smartphonevalidatorUnobstrusive",n.extend(!0,t,i))}(jQuery),function(n){var t;(function(n){var t;(function(n){var i=function(){function n(){}return n.subscribe=function(i,r,u){var f=new t(i,r,u);n.handlers.push(f)},n.unsubscribe=function(t,i){n.handlers=$.grep(n.handlers,function(n){return n.event===t&&n.scope===i?!0:!1},!0)},n.fire=function(t,i,r){r===void 0&&(r=null);var u=r||window;n.handlers.forEach(function(n){n.event===t&&n.funct.call(u,i)})},n.resubscribe=function(t,i,r){n.unsubscribe(t,r);n.subscribe(t,i,r)},n.handlers=[],n}(),t;n.Observer=i;t=function(){function n(n,t,i){this.event=n;this.scope=i;this.funct=t}return n}();n.Handle=t})(t=n.TypeScript||(n.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){"use strict";var i=function(){function t(n){this.options=$.extend({},n);this.itemsToCompare=this.getItems();this.compareTable=$(".compare-table");this.bindDeleteFromCompare();this.bindShowHideAddMore()}return t.prototype.bindShowHideAddMore=function(){this.itemsToCompare.length>=this.options.maxItemsToCompare?$(".js-addmore-link").hide():$(".js-addmore-link").show()},t.prototype.bindDeleteFromCompare=function(){var t=this;this.itemsToCompare.on("click",function(i){var r=$(i.currentTarget),u=r.data("remove-id"),f={onSuccess:function(){t.removeColumnsAndAddemptyAnimation(r)}};n.SmartPhonePortal.TypeScript.Ajax.getDataFromAction(t.options.controllerName,t.options.removeItemAction,null,{itemId:u},null,f)})},t.prototype.removeColumnsAndAddemptyAnimation=function(n){var t=this,u;this.itemsToCompare.length-1==1&&(u=this.itemsToCompare.not(n),window.location.href=u.first().data("redirect-url"));var f=this.itemsToCompare.index(n),r=this.compareTable.find("tr"),i=0;r.each(function(n,u){i++;var e=$(u).find("td:eq("+f+")"),o=i;i==r.length&&(o="last");e.hide(400,function(){e.remove();$(u).append(t.options.emptyRowTemplates[o]||"<td><\/td>");i==r.length&&(t.itemsToCompare=t.getItems(),t.removeEnabledClassFromColumnGroup(),t.bindShowHideAddMore())})})},t.prototype.removeEnabledClassFromColumnGroup=function(){var n=this;this.compareTable.find("tr:first td").each(function(t,i){$(i).hasClass("compare-table__top-row--placeholder")&&n.compareTable.find("colgroup col:eq("+(t+1)+")").removeClass("compare-table__column--panel")})},t.prototype.getItems=function(){return $(".compare-remove")},t}();t.Compare=i})(i=t.SppCommon||(t.SppCommon={}))})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){var t;(function(t){var i;(function(t){var i;(function(i){var r=function(){function i(n){this.$compare_mobile_version=$(".js-listing--mobile");this.$compare_desktop_version=$(".js-listing--desktop");this.$gotoComparePageLink=$(".compare-bar__button__action");this.$gotoCompareMobileButton=$(".js-btn--compare");this.component=$("[data-selector='compare-bar']");this.settings=n;this.initialize();this.bindEvents();this.bindAjaxEvents();this.bindGoToComparePage();this.fetchCompareItemsInSession()}return i.prototype.initializeCxCompareBar=function(n,t){n.compare_desktop(t)},i.prototype.initialize=function(){n.SmartPhonePortal.TypeScript.SessionStore.getFromSession("compareIsCollapsed")?this.component.addClass("compare-bar--is-collapsed"):this.component.removeClass("compare-bar--is-collapsed")},i.prototype.bindEvents=function(){this.component.on("click","[data-selector='state-toggle']",$.proxy(this.setCompareBarStateInSession,this))},i.prototype.bindGoToComparePage=function(){var n=this;this.$gotoComparePageLink.click(function(t){t.preventDefault();window.location=n.$gotoComparePageLink.data("url")});this.$gotoCompareMobileButton.on("click",function(t){(t.preventDefault(),$(t.currentTarget).hasClass("is-disabled"))||(window.location=n.$gotoComparePageLink.data("url"))})},i.prototype.fetchCompareItemsInSession=function(){var i=this,n={useWaitPanel:!1,onSuccess:function(n){n.length&&$(document.body).trigger("compareitems-updated",[n])}};t.Ajax.getDataFromAction(this.settings.controllerName,this.settings.getItemsAction,null,null,null,n)},i.prototype.bindAjaxEvents=function(){var t=this;this.$compare_mobile_version.on("compare_mobile_remove",function(n,i){t.executeCompareRequest(i,t.settings.removeItemAction)});this.$compare_mobile_version.on("compare_mobile_add",function(n,i){t.executeCompareRequest(i,t.settings.addItemAction)});this.$compare_desktop_version.on("compare_desktop_remove",function(n,i){t.executeCompareRequest(i,t.settings.removeItemAction)});this.$compare_desktop_version.on("compare_desktop_add",function(n,i){t.executeCompareRequest(i,t.settings.addItemAction,function(n){$(document.body).find("[data-compare-id='"+n+"']").addClass("listing__item__compare--checked")})});this.$compare_desktop_version.on("compare_desktop_remove_all",function(i,r){var u={onSuccess:function(n){r.complete(n)}};n.SmartPhonePortal.TypeScript.Ajax.getDataFromAction(t.settings.controllerName,t.settings.clearItemsAction,null,null,null,u)})},i.prototype.executeCompareRequest=function(t,i,r){var f=this,e,u;r===void 0&&(r=null);e=this;u={useWaitPanel:!1,onSuccess:function(n){var i={status:n.Succes?"success":"failure",fail_message:n.ErrorMessage,data:f.createCxDataObject(n.AffectedItem)};t.complete(i);r!==null&&r(n.AffectedItem.Id)}};n.SmartPhonePortal.TypeScript.Ajax.getDataFromAction(this.settings.controllerName,i,null,{itemId:t.id.id},null,u)},i.prototype.createCxDataObject=function(n){return n?{id:{id:n.Id,href:n.Href,title:n.Name,img:n.ImageUrl}}:null},i.prototype.setCompareBarStateInSession=function(){n.SmartPhonePortal.TypeScript.SessionStore.storeInSession("compareIsCollapsed",!this.component.hasClass("compare-bar--is-collapsed"))},i}();i.CompareBar=r})(i=t.SppCommon||(t.SppCommon={}))})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(n){function t(t){n.call(this,t);this.key="debugConsole";this.bindEvents();this.initialize()}return __extends(t,n),t.prototype.bindEvents=function(){this.component.on("click",".selectorToggle",$.proxy(this.toggle,this))},t.prototype.initialize=function(){this.getState()===!0&&this.toggle(null)},t.prototype.toggle=function(n){var t,i;n!=null&&n.preventDefault();t=this.component.find("#sppDebugConsole");t.toggleClass("docked").toggleClass("undocked");i=t.is(".undocked");this.setState(i);this.component.find("button.selectorToggle").text(i?"Close":"Open")},t.prototype.getState=function(){return localStorage!==undefined?localStorage.getItem(this.key)=="undocked":!1},t.prototype.setState=function(n){localStorage!==undefined&&(n?localStorage.setItem(this.key,"undocked"):localStorage.removeItem(this.key))},t}(n.SmartPhonePortal.TypeScript.BaseComponent);t.Component=i})(i=t.SppDebug||(t.SppDebug={}))})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){var t;(function(n){var t;(function(n){var t;(function(t){var i=function(){function t(){this.alreadyCancelled=!1;this.alreadyAnnoyed=!1;this.timeToWait=3e3;this.lightSurveyContainerId="#lsv2";this.extendedTooltip=$(this.lightSurveyContainerId+" .LSV2_tooltip.extended");this.defaultTooltip=$(this.lightSurveyContainerId+" .LSV2_tooltip");this.surveyIsopen=!1;this.bindEvents()}return t.prototype.bindEvents=function(){var n=this;this.userIsIdle($.proxy(this.showLightSurvey,n))},t.prototype.showLightSurvey=function(){var n=this,t=this,i;t.resetIdleEvents();t.bindExtendedTooltipEvents();i={onClosed:function(){n.surveyIsopen=!1;n.showExtendedTooltip()},onOpened:function(){n.surveyIsopen=!0;n.defaultTooltip.hide()},processAnswer:function(n){var t=$(".LSV2_wrapper .LSV2_contentPane.active"),r=t.data("question-type"),i=t.find("[data-selector='answer']").val();$(n.target).hasClass("testAround")&&i!==""||(r==="rating10"?(i=$(n.currentTarget).data("value"),t.find(".LSV2_ratingselect").is(":visible")&&(i=t.find(".LSV2_ratingselect select").val())):r==="checkbox"&&(i=$(n.currentTarget).data("value")));r==="text"&&(i=t.find("[data-selector='comments']").val());t.find("[data-selector='answer']").val(i)},isAnswerValid:function(){var n=$(".LSV2_wrapper .LSV2_contentPane.active");if(n.data("selector")==="lsv2-confirmation")return!0;var i=n.parents(".js-questionwrapper"),r=n.find("[data-selector='answer']").val().length!==0,t=i.find(".js-validation-text");return!r&&n.data("mandatory")?(t.show(),!1):(t.hide(),!0)}};$(this.lightSurveyContainerId).lightsurvey(i);$("#SendResults").click($.proxy(this.sendResults,this));$("a[href]").each(function(n,i){t.bindExtendedTooltipToLinks(i)})},t.prototype.destroyLightSurvey=function(){$(this.lightSurveyContainerId).hide()},t.prototype.bindExtendedTooltipToLinks=function(n){var t=this;if(!this.alreadyAnnoyed&&$(n).attr("href").length>2)$(n).on("click.lsv","",function(n){if(!t.surveyIsopen)return n.preventDefault(),t.alreadyAnnoyed=!0,t.showExtendedTooltip(),$("a[href]").each(function(n,t){$(t).off("click.lsv")}),!1})},t.prototype.showExtendedTooltip=function(){this.extendedTooltip.show().effect("bounce",100);this.defaultTooltip.hide()},t.prototype.sendResults=function(){var i=[],t,r;$("[data-selector='lsv2-questionpane']").each(function(){var n=$(this).data("question-type"),t=$(this).data("question-title"),r=$(this).find("[data-selector='answer']").val();i.push({questionType:n,title:t,answer:r})});t=this;r={dataSourceId:$(t.lightSurveyContainerId).data("lightsurvey-id"),answers:i,url:window.location.href,pageTitle:document.title};n.Ajax.getDataFromAction("LightSurvey","ProcessResults",null,JSON.stringify(r),{traditional:!0,contentType:"application/json"},{onSuccess:function(){t.destroyLightSurvey()}})},t.prototype.cancelLightSurvey=function(){if(!this.alreadyCancelled){var t=this;n.Ajax.getDataFromAction("LightSurvey","CancelLightSurvey",null,null,null,{useWaitPanel:!1,onSuccess:function(){t.alreadyCancelled=!0}})}},t.prototype.userIsIdle=function(){var n=this;$(document).on("ready.lsv mousemove.lsv mousedown.lsv click.lsv scroll.lsv keypress.lsv",function(){n.resetTimer()})},t.prototype.resetTimer=function(){var n=this;clearTimeout(this.timer);this.timer=setTimeout(function(){n.showLightSurvey()},this.timeToWait)},t.prototype.resetIdleEvents=function(){$(document).off("ready.lsv mousemove.lsv mousedown.lsv click.lsv scroll.lsv keypress.lsv")},t.prototype.bindExtendedTooltipEvents=function(){var n=this;this.extendedTooltip.find(".LSV2_button").click(function(){$(n.lightSurveyContainerId+" .LSV2_maxify").trigger("click");n.extendedTooltip.fadeIn()});this.extendedTooltip.find("[data-selector='lsv2-cancel-on-exit']").click(function(t){t.preventDefault();n.cancelLightSurvey(t);n.extendedTooltip.fadeOut()});this.extendedTooltip.find("[data-selector='lsv2-close-extended']").show().click(function(){n.extendedTooltip.fadeOut()})},t}();t.LightSurvey=i})(t=n.LightSurvey||(n.LightSurvey={}))})(t=n.TypeScript||(n.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n);this.bindEvents()}return __extends(i,t),i.prototype.bindEvents=function(){$("[data-selector='email-pdf-form']").on("submit","form",$.proxy(this.sendPdf,this));$("[data-selector='pdf-form-close']").on("click",$.proxy(this.togglePdfForm,this))},i.prototype.sendPdf=function(t){t.preventDefault();var r=t.currentTarget,i=$(t.currentTarget);(i.data("smartphonevalidator")||i.smartphonevalidator({autoRevalidate:!0,showValidationMessages:!0}),i.smartphonevalidator("validate"))&&n.SmartPhonePortal.TypeScript.Ajax.submitFormAndGetData(r,{onSuccess:function(n){n&&$(i).hide().parent().find("[data-selector='sendpdf-confirmation']").show();i.smartphonevalidator("destroy")},useWaitPanel:!0})},i.prototype.togglePdfForm=function(){var n=$("form","[data-selector='email-pdf-form']");n.is(":hidden")&&(n[0].reset(),n.show(),$("[data-selector='sendpdf-confirmation']").hide())},i}(n.SmartPhonePortal.TypeScript.BaseComponent);t.SppPrintOrSendPdf=i})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={}));var oKeywordsSuggestions=null,oBestbetsSuggestions=null,bKeywordsLoaded=!1,bBestbetLoaded=!1,bSuggestLoaded=!1;(function(n){function t(t,i,r,u,f){var h=new RegExp(n.trim(n(u).val()),"i"),c=new RegExp("^"+n.trim(n(u).val()),"i"),e,o,s;n("#autocomplete").empty();n("#autocomplete").hide();e=0;o=0;oBestbetsSuggestions!=null&&n.trim(n(u).val()).length>t&&(s="",n(oBestbetsSuggestions).each(function(t,r){var u,f;o<i&&h.test(r.Keywords)&&s!=r.ItemSummary&&(u="<img src='"+r.ItemThumbnail+"'/>",r.ItemThumbnail==""&&(u=""),f=n('<div class="autocompleteLine" onclick="setBestBet(\''+r.ItemFullUrl+"')\" >"+u+'<div class="serpThumbnail"><strong>'+r.ItemTitle+"<\/strong><p>"+r.ItemSummary+"<\/p><\/div><\/div>"),n("#autocomplete").append(f),o++,s=r.ItemSummary)}));oKeywordsSuggestions!=null&&n.trim(n(".search-box").val()).length>t&&n(oKeywordsSuggestions).each(function(t,i){if(e<r&&c.test(i.Keyword)){var o=n('<div class="autocompleteLine oneLine" onclick="setSearch(\''+i.Keyword+"','"+u+"','"+f+"')\">"+i.Keyword+"<\/div>");n("#autocomplete").append(o);e++}});(e>0||o>0)&&n("#autocomplete").show()}n.fn.extend({configureSerp:function(i){var i=n.extend({iMinChars:2,iMaxKeywordsSuggestions:3,iMaxBestbetsSuggestions:3,textboxClass:".search-box",searchFormID:"#site-search"},i);n("html").click(function(){n("#autocomplete").empty();n("#autocomplete").hide()});n(this).keyup(function(){n(this).val().length>=i.iMinChars&&(n.ajax({url:"/Serp/AX_LoadKeywordSuggestions",async:!0,type:"POST",data:{keyword:n(this).val()}}).done(function(n){oKeywordsSuggestions=n}),n.ajax({url:"/Serp/AX_LoadBestBestSuggestions",async:!0,type:"POST",data:{keyword:n(this).val()}}).done(function(n){oBestbetsSuggestions=n}),t(i.iMinChars,i.iMaxBestbetsSuggestions,i.iMaxKeywordsSuggestions,i.textboxClass,i.searchFormID))})}})})(jQuery),function(n){n.fn.extend({ConfigureSerpShowMoreFamiliesToggle:function(t){var t=n.extend({expandText:"expand",collapseText:"collapse"},t);n("#ShowMoreFamilies")&&(n("#ShowMoreFamilies").click(function(){n(".brand-content.toggle").slideToggle("slow");n("#ShowMoreFamilies i").toggleClass("iconset-arrow-b-up")}),n("#ShowMoreFamilies").toggle(function(){n("#ShowMoreFamilies p span").text(t.collapseText)},function(){n("#ShowMoreFamilies p span").text(t.expandText)}))}})}(jQuery),function(n){n.fn.extend({psautocomplete:function(t,i){var r=typeof t=="string";return i=n.extend({},n.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?n.Autocompleter.defaults.delay:10,max:i&&!i.scroll?10:150},i),i.highlight=i.highlight||function(n){return n},i.formatMatch=i.formatMatch||i.formatItem,this.each(function(){new n.Autocompleter(this,i)})},result:function(n){return this.bind("result",n)},search:function(n){return this.trigger("search",[n])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(n){return this.trigger("setOptions",[n])},unautocomplete:function(){return this.trigger("unautocomplete")}});n.Autocompleter=function(t,i){function b(){var h=r.selected(),f,e;if(!h)return!1;if(f=h.result,s=f,i.multiple){if(e=o(u.val()),e.length>1){var v=i.multipleSeparator.length,y=n(t).selection().start,l,c=0;n.each(e,function(n,t){if(c+=t.length,y<=c)return l=n,!1;c+=v});e[l]=f;f=e.join(i.multipleSeparator)}f+=i.multipleSeparator}return u.val(f),a(),u.trigger("result",[h.data,h.value]),!0}function e(n,t){if(p==f.DEL){r.hide();return}var e=u.val();(t||e!=s)&&(s=e,e=l(e),e.length>=i.minChars?(u.addClass(i.loadingClass),i.matchCase||(e=e.toLowerCase()),k(e,tt,a)):(y(),r.hide()))}function o(t){return t?i.multiple?n.map(t.split(i.multipleSeparator),function(i){return n.trim(t).length?n.trim(i):null}):[n.trim(t)]:[""]}function l(r){var u,f;return i.multiple?(u=o(r),u.length==1)?u[0]:(f=n(t).selection().start,u=f==r.length?o(r):o(r.replace(r.substring(f),"")),u[u.length-1]):r}function g(r,e){i.autoFill&&l(u.val()).toLowerCase()==r.toLowerCase()&&p!=f.BACKSPACE&&(u.val(u.val()+e.substring(l(s).length)),n(t).selection(s.length,s.length+e.length))}function nt(){clearTimeout(h);h=setTimeout(a,200)}function a(){var n=r.visible();r.hide();clearTimeout(h);y();i.mustMatch&&u.search(function(n){if(!n)if(i.multiple){var t=o(u.val()).slice(0,-1);u.val(t.join(i.multipleSeparator)+(t.length?i.multipleSeparator:""))}else u.val(""),u.trigger("result",null)})}function tt(n,t){t&&t.length&&c?(y(),r.display(t,n),g(n,t[0].value),r.show()):a()}function k(u,f,e){var o,s;i.matchCase||(u=u.toLowerCase());o=v.load(u);o&&o.length?f(u,o):typeof i.url=="string"&&i.url.length>0?(s={timestamp:+new Date},n.each(i.extraParams,function(n,t){s[n]=typeof t=="function"?t():t}),n.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:i.dataType,url:i.url,data:n.extend({q:l(u),limit:i.max},s),success:function(n){var t=i.parse&&i.parse(n)||it(n);v.add(u,t);f(u,t)}})):(r.emptyList(),e(u))}function it(t){for(var u=[],e=t.split("\n"),r,f=0;f<e.length;f++)r=n.trim(e[f]),r&&(r=r.split("|"),u[u.length]={data:r,value:r[0],result:i.formatResult&&i.formatResult(r,r[0])||r[0]});return u}function y(){u.removeClass(i.loadingClass)}var f={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},u=n(t).attr("autocomplete","off").addClass(i.inputClass),h,s="",v=n.Autocompleter.Cache(i),c=0,p,d={mouseDownOnSelect:!1},r=n.Autocompleter.Select(i,t,b,d),w;n.browser.opera&&n(t.form).bind("submit.autocomplete",function(){if(w)return w=!1,!1});u.bind((n.browser.opera?"keypress":"keydown")+".autocomplete",function(t){c=1;p=t.keyCode;switch(t.keyCode){case f.UP:t.preventDefault();r.visible()?r.prev():e(0,!0);break;case f.DOWN:t.preventDefault();r.visible()?r.next():e(0,!0);break;case f.PAGEUP:t.preventDefault();r.visible()?r.pageUp():e(0,!0);break;case f.PAGEDOWN:t.preventDefault();r.visible()?r.pageDown():e(0,!0);break;case i.multiple&&n.trim(i.multipleSeparator)==","&&f.COMMA:case f.TAB:case f.RETURN:if(b())return t.preventDefault(),w=!0,!1;break;case f.ESC:r.hide();break;default:clearTimeout(h);h=setTimeout(e,i.delay)}}).focus(function(){c++}).blur(function(){c=0;d.mouseDownOnSelect||nt()}).click(function(){c++>1&&!r.visible()&&e(0,!0)}).bind("search",function(){function t(n,t){var r,f;if(t&&t.length)for(f=0;f<t.length;f++)if(t[f].result.toLowerCase()==n.toLowerCase()){r=t[f];break}typeof i=="function"?i(r):u.trigger("result",r&&[r.data,r.value])}var i=arguments.length>1?arguments[1]:null;n.each(o(u.val()),function(n,i){k(i,t,t)})}).bind("flushCache",function(){v.flush()}).bind("setOptions",function(){n.extend(i,arguments[1]);"data"in arguments[1]&&v.populate()}).bind("unautocomplete",function(){r.unbind();u.unbind();n(t.form).unbind(".autocomplete")})};n.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(n){return n[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(n,t){return n.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1<\/strong>")},scroll:!0,scrollHeight:180};n.Autocompleter.Cache=function(t){function u(n,i){t.matchCase||(n=n.toLowerCase());var r=n.indexOf(i);return(t.matchContains=="word"&&(r=n.toLowerCase().search("\\b"+i.toLowerCase())),r==-1)?!1:r==0||t.matchContains}function f(n,u){r>t.cacheLength&&o();i[n]||r++;i[n]=u}function e(){var r,h,u,c,i,e,o,s;if(!t.data)return!1;for(r={},h=0,t.url||(t.cacheLength=1),r[""]=[],u=0,c=t.data.length;u<c;u++)(i=t.data[u],i=typeof i=="string"?[i]:i,e=t.formatMatch(i,u+1,t.data.length),e!==!1)&&(o=e.charAt(0).toLowerCase(),r[o]||(r[o]=[]),s={value:e,data:i,result:t.formatResult&&t.formatResult(i)||e},r[o].push(s),h++<t.max&&r[""].push(s));n.each(r,function(n,i){t.cacheLength++;f(n,i)})}function o(){i={};r=0}var i={},r=0;return setTimeout(e,25),{flush:o,add:f,populate:e,load:function(f){var h,s,o,e;if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){e=[];for(h in i)h.length>0&&(o=i[h],n.each(o,function(n,t){u(t.value,f)&&e.push(t)}));return e}if(i[f])return i[f];if(t.matchSubset)for(s=f.length-1;s>=t.minChars;s--)if(o=i[f.substr(0,s)],o)return e=[],n.each(o,function(n,t){u(t.value,f)&&(e[e.length]=t)}),e;return null}}};n.Autocompleter.Select=function(t,i,r,u){function p(){y&&(h=n("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),o=n("<ul/>").appendTo(h).mouseover(function(t){a(t).nodeName&&a(t).nodeName.toUpperCase()=="LI"&&(e=n("li",o).removeClass(s.ACTIVE).index(a(t)),n(a(t)).addClass(s.ACTIVE))}).click(function(t){return n(a(t)).addClass(s.ACTIVE),r(),i.focus(),!1}).mousedown(function(){u.mouseDownOnSelect=!0}).mouseup(function(){u.mouseDownOnSelect=!1}),t.width>0&&h.css("width",t.width),y=!1)}function a(n){for(var t=n.target;t&&t.tagName!="LI";)t=t.parentNode;return t?t:[]}function c(n){var r,i;f.slice(e,e+1).removeClass(s.ACTIVE);w(n);r=f.slice(e,e+1).addClass(s.ACTIVE);t.scroll&&(i=0,f.slice(0,e).each(function(){i+=this.offsetHeight}),i+r[0].offsetHeight-o.scrollTop()>o[0].clientHeight?o.scrollTop(i+r[0].offsetHeight-o.innerHeight()):i<o.scrollTop()&&o.scrollTop(i))}function w(n){e+=n;e<0?e=f.size()-1:e>=f.size()&&(e=0)}function b(n){return t.max&&t.max<n?t.max:n}function k(){var r,i,u,h;for(o.empty(),r=b(l.length),i=0;i<r;i++)l[i]&&(u=t.formatItem(l[i].data,i+1,r,l[i].value,v),u!==!1)&&(h=n("<li/>").html(t.highlight(u,v)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(o)[0],n.data(h,"ac_data",l[i]));f=o.find("li");t.selectFirst&&(f.slice(0,1).addClass(s.ACTIVE),e=0);n.fn.bgiframe&&o.bgiframe()}var s={ACTIVE:"ac_over"},f,e=-1,l,v="",y=!0,h,o;return{display:function(n,t){p();l=n;v=t;k()},next:function(){c(1)},prev:function(){c(-1)},pageUp:function(){e!=0&&e-8<0?c(-e):c(-8)},pageDown:function(){e!=f.size()-1&&e+8>f.size()?c(f.size()-1-e):c(8)},hide:function(){h&&h.hide();f&&f.removeClass(s.ACTIVE);e=-1},visible:function(){return h&&h.is(":visible")},current:function(){return this.visible()&&(f.filter("."+s.ACTIVE)[0]||t.selectFirst&&f[0])},show:function(){var e=n(i).offset(),r,u;h.css({width:typeof t.width=="string"||t.width>0?t.width:n(i).width(),top:e.top+i.offsetHeight,left:e.left}).show();t.scroll&&(o.scrollTop(0),o.css({maxHeight:t.scrollHeight,overflow:"auto"}),n.browser.msie&&typeof document.body.style.maxHeight=="undefined"&&(r=0,f.each(function(){r+=this.offsetHeight}),u=r>t.scrollHeight,o.css("height",u?t.scrollHeight:r),u||f.width(o.width()-parseInt(f.css("padding-left"))-parseInt(f.css("padding-right")))))},selected:function(){var t=f&&f.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&n.data(t[0],"ac_data")},emptyList:function(){o&&o.empty()},unbind:function(){h&&h.remove()}}};n.fn.selection=function(n,t){var i,r;if(n!==undefined)return this.each(function(){if(this.createTextRange){var i=this.createTextRange();t===undefined||n==t?(i.move("character",n),i.select()):(i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",t),i.select())}else this.setSelectionRange?this.setSelectionRange(n,t):this.selectionStart&&(this.selectionStart=n,this.selectionEnd=t)});if(i=this[0],i.createTextRange){var u=document.selection.createRange(),o=i.value,f="<->",e=u.text.length;return u.text=f,r=i.value.indexOf(f),i.value=o,this.selection(r,r+e),{start:r,end:r+e}}if(i.selectionStart!==undefined)return{start:i.selectionStart,end:i.selectionEnd}}}(jQuery),function(n){var t;(function(n){var t;(function(n){var t;(function(t){var i=function(){function t(){}return t.track=function(i){var r,u;try{if(r=$("[data-selector='comscore-url']").val(),!r||r.length==0)return;i&&i.length>0&&(r.slice(-1)!="&"&&(r+="&"),$.each(i,function(){r=t.updateQueryStringParameter(r,this.Key,this.Value)}));u=$("<img />").attr("src",r).attr("style","display:none");$("[data-selector='comscore-placeholder']").append(u);n.Debug.logToConsole("Track: "+r,!1,"selectorTrackEvent")}catch(f){n.Debug.logToConsole(f,!0)}},t.updateQueryStringParameter=function(n,t,i){var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i"),u=n.indexOf("?")!==-1?n.slice(-1)!="&"?"&":"":"?";return n.match(r)?n.replace(r,"$1"+t+"="+i+"$2"):n+u+t+"="+i},t}();t.TrackingModule=i})(t=n.Tracking||(n.Tracking={}))})(t=n.TypeScript||(n.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(t){function i(n,i){t.call(this,n);this.options=$.extend({enabled:!1},i);this.initialize()}return __extends(i,t),i.prototype.initialize=function(){this.options.enabled&&n.SmartPhonePortal.TypeScript.Tracking.TrackingModule.track(n.SmartPhonePortal.SppTracking.TrackingContext.trackingContext)},i}(n.SmartPhonePortal.TypeScript.BaseComponent);t.Component=i})(i=t.SppTracking||(t.SppTracking={}))})(i=t.TypeScript||(t.TypeScript={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.addContext=function(n){this.trackingContext=this.trackingContext&&this.trackingContext.length>0?this.trackingContext.concat(n):n},n}();n.TrackingContext=t})(t=n.SppTracking||(n.SppTracking={}))})(t=n.SmartPhonePortal||(n.SmartPhonePortal={}))}(EC||(EC={})),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function u(n){return t.raw?n:decodeURIComponent(n)}function f(n){return i(t.json?JSON.stringify(n):String(n))}function e(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(o," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:e(i);return n.isFunction(r)?r(u):u}var o=/\+/g,t=n.cookie=function(e,o,s){var y,a,h,v,c,p;if(o!==undefined&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(y=s.expires,a=s.expires=new Date,a.setTime(+a+y*864e5)),document.cookie=[i(e),"=",f(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=e?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=u(w.shift()),l=w.join("=");if(e&&e===b){h=r(l,o);break}e||(l=r(l))===undefined||(h[b]=l)}return h};t.defaults={};n.removeCookie=function(t,i){return n.cookie(t)===undefined?!1:(n.cookie(t,"",n.extend({},i,{expires:-1})),!n.cookie(t))}});window.EC=function(n,t){"use strict";var i={modules:{},singleton:{},widgets:{}};return t.SmartPhonePortal=t.SmartPhonePortal||{},t.SmartPhonePortal.load={singleton:function(){var n=i.singleton;EC.SmartPhonePortal.HeaderMobile.init()},modules:function(){var n=i.modules},widgets:function(){var n=i.widgets}},n(function(){EC.SmartPhonePortal.load.widgets();EC.SmartPhonePortal.load.modules();EC.SmartPhonePortal.load.singleton()}),t}(window.jQuery,window.EC||{});window.EC=function(n,t){"use strict";var i={cache:{selector:".carousel.header",wheel:".wheel",pager:".pager",pagerItem:"li"},classes:{active:"active"},events:{pager:"click",resize:"resize"}};return t.SmartPhonePortal=t.SmartPhonePortal||{},t.SmartPhonePortal.HeaderMobile={version:.1,init:function(){var t=this;this.cacheItems();n.each(this.selector,function(){t.activate(n(this))})},cacheItems:function(){this.selector=n(i.cache.selector)},activate:function(n){this.centerPager(n);this.pagination(n,0);this.bindEvents(n)},bindEvents:function(t){var r=this;t.find(i.cache.pager).on(i.events.pager,i.cache.pagerItem,function(){r.pagination(n(this).closest(i.cache.selector),n(this).index())});n(window).on(i.events.resize,n.proxy(function(){r.centerPager(this)},t))},centerPager:function(t){var r=t.find(i.cache.pager);r.length&&r.css({left:n(document.body).width()/2-r.width()/2})},pagination:function(n,t){var r,u;n.length&&t!==undefined&&(r=n.find(i.cache.wheel).children(),u=n.find(i.cache.pager).children(),r.hide(),r.eq(t).fadeIn(),u.toggleClass(i.classes.active,!1),u.eq(t).toggleClass(i.classes.active,!0))}},t}(window.jQuery,window.EC||{})