function closeAllPopovers(){$(".fixed_skills").slideUp();$(".fixed_footer").slideUp();$(".fixed_search").slideUp();$(".reader_bio").slideUp();$(".call_now_details").fadeOut("fast")}function addGoogleAnalyticsEventTelLink(n){$('a[href^="tel:"]',n).click(function(){typeof ga!="undefined"&&ga("send","event","Links - tel","Click",$(this).attr("href").substring(4))})}function addGoogleAnalyticsEventSmsLink(n){$('a[href^="sms:"]',n).click(function(){typeof ga!="undefined"&&ga("send","event","Links - sms","Click",$(this).attr("href").substring(4))})}function addGoogleAnalyticsEventMailtoLink(n){$('a[href^="mailto:"]',n).click(function(){typeof ga!="undefined"&&ga("send","event","Links - mailto","Click",$(this).attr("href").substring(7))})}function getComputedHeight(n){var i,r,t;if(n){if(i=function(n){var i=window.getComputedStyle(n,null),t,r;return i&&i!==null&&(t=i.getPropertyValue("height"),t&&t!==null&&(r=t.replace("px",""),!isNaN(r)))?parseFloat(r):null},n.jquery){if(window.getComputedStyle&&n.length>0){for(r=0,t=0;t<n.length;t++)r+=i(n[t]);return r}return n.height()}if(window.getComputedStyle)return i(n)}return null}function forceWebkitRedraw(n){n&&(n.jquery?n.is(":visible")&&(n.hide(),n.each(function(){this.offsetHeight}),n.show()):(n.style.display="none",n.offsetHeight,n.style.display="block"))}function elementIsOnScreen(n){var u=$(n),t=$(window).scrollTop(),f=t+$(window).height(),i=$(window).scrollLeft(),e=i+$(window).width(),r=!1;return u.each(function(){var u=$(this),n=u.offset(),o=n===null?null:n.top,h=o+u.outerHeight(),s=n===null?null:n.left,c=s+u.outerWidth();if(o<f&&h>t&&s<e&&c>i)return r=!0,!1}),r}function repositionCallNowPopover(n,t){var i=$(".call_now_details",n);if(t)closeAllPopovers(),i.fadeIn("fast");else if(!i.is(":visible"))return;repositionPopover(i)}function repositionPopover(n){var e;n instanceof jQuery||(n=$(n));e=$("#fixed_nav .nav_menu");n.css("top","");n.css("left","");var a=$(window).scrollTop(),o=a+$(window).height(),v=$(window).scrollLeft(),w=v+$(window).width();e.is(":visible")&&(o=o-e.height());var f=n.offset(),r=f===null?null:f.top,s=r+n.outerHeight(),u=f===null?null:f.left,h=u+n.outerWidth(),c=r-a,y=s-o,l=u-v,p=h-w,t=0,i=0;c<=0?t=c*-1:y>0&&(t=-Math.min(y,c));l<=0?i=l*-1:p>0&&(i=-Math.min(p,l));r+t<0?t=-r:s+t>$(document).height()&&(t=$(document).height()-s);u+i<0?i=-u:h+i>$(document).width()&&(i=$(document).width()-h);(t!==0||i!==0)&&n.offset({top:r+t,left:u+i})}function initialiseCallNowPopovers(n){$(".reader, .reader_detail").each(function(){var i=this,t=$(".call_now_button",i),r=function(){repositionCallNowPopover(t,!1)};t.click(function(){$(".call_now_details",this).is(":visible")||(repositionCallNowPopover(t,!0),$(window).resize(r))});$(".close",this).click(function(){return $(".call_now_details",i).fadeOut("fast"),$(window).off("resize",r),!1});n&&n===!0&&addGoogleAnalyticsEventTelLink(this)})}function readerFilterResize(){$(".skillSelectionHolder, .filterCriteriaHolder, .sms_readers .header").each(function(){$(".filter_trigger",this).is(":visible")||$(".skillSelection, .filterCriteria",this).show()})}function initialiseReaderFilterToggle(){$(".skillSelectionHolder, .filterCriteriaHolder, .sms_readers .header").each(function(){var n=this;$(".filter_trigger",n).click(function(){$(".filter_trigger span",n).toggleClass("open_filter");$(".filterCriteria, .skillSelection",n).toggleClass("open_criteria")})})}function initialiseExpertLoad(){$(".expertLoad").each(function(){var n=this;$(".show_more",this).click(function(){var t=parseInt($(".choose_number select option:selected",n).val());typeof ga!="undefined"&&ga("send","event","Buttons - show more experts","Click",null,t)})})}function setUserDesktopSite(n){var t=n?1:-1;$.cookie("user_accepted_desktop","user_accepted_desktop",{expires:t,path:"/"})}function performExpertSearch(n){window.location=protocol+"//"+currentHostname+searchUrl+n+"/"}function internetExplorerFixes(){$("html.lt-ie9").length>0&&($(".reader:nth-child(even)").addClass("even"),$(".skillSelection ul li:nth-child(5n+5)").addClass("fifth"))}function fixedNavPositionFix(){var n=$("#fixed_nav"),t;n.is(":visible")&&(t=function(t){t===!0&&n.css("position","absolute");var i=window.innerHeight?window.innerHeight:$(window).height(),r=window.pageYOffset?window.pageYOffset:$(window).scrollTop();n.css("top",r+i-52+"px");forceWebkitRedraw(n)},t(!0),$(window).scroll(function(){t(!1)}),$(window).resize(function(){t(!1)}))}function fixedNavPositionFixForForms(){var n=$("#fixed_nav");n.is(":visible")&&($("input").not("#fixed_nav input").focus(function(){n.hide()}),$("input").not("#fixed_nav input").blur(function(){n.show()}))}function iOSversion(){if(/iP(hone|od|ad)/.test(navigator.platform)){var n=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3]||0,10)]}return null}function iOSFixes(){var n=iOSversion();n&&n!==null&&(n[0]<5?fixedNavPositionFix():fixedNavPositionFixForForms())}function androidFixes(){var n=navigator.userAgent,t,i;n&&n!==null&&(t=n.indexOf("Android"),t>=0&&(i=parseFloat(n.slice(t+8)),i<3&&fixedNavPositionFix()))}function ieMobileFixes(){var n=navigator.userAgent,i,r,t,u;n&&n!==null&&(i=n.indexOf("IEMobile"),i>=0&&(r=n.slice(i+8),t=r.match(/\d+\.\d+/),t!==null&&t.length>0&&(u=parseFloat(t[0]),u<10&&fixedNavPositionFix())))}function layoutWidgets(){$(".widget_container_main").each(function(){var n=$(this),s=$(".repeatingSectionContainer",n),h=$(".hideIfNoRoom",n),c=$(".hideIfNoRoomLast",n),r,k,o,f,a,v,nt,tt,y,it,p;if(s.length===1||h.length>0||c.length>0){if(r=n.closest("aside"),!n.is(":visible"))return r.height("auto"),n.height("auto"),!1;var l=r.prev("section"),w=r.offset(),ut=w===null?null:w.left,b=l.offset(),ft=b===null?null:b.left,et=ft+l.outerWidth();if(ut<et)r.height("auto"),n.height("auto"),h.hide(),c.show();else{h.show();c.show();k=getComputedHeight(l);r.height(k);var t=getComputedHeight(n),ot=getComputedHeight(n.siblings()),st=getComputedHeight(r),u=st-ot,e=0;if(s.length===1){var i=s.first(),d=$(".repeatingSection",i),g=d.length;if(g>0){if(n.height("100%"),i.height("100%"),o=d.first(),f=getComputedHeight(o),f>0&&(a=getComputedHeight(i),v=g*f,a>v))for(nt=a-v,tt=Math.ceil(nt/f),y=0;y<tt;y++)o.clone().appendTo(i);if(i.height("auto"),n.height("auto"),t=getComputedHeight(n),t>u&&(it=t-u,p=$(".widget",o).length,p>0)){var rt=f/p,ht=Math.ceil(it/rt),ct=ht*rt;e=getComputedHeight(i);i.height(Math.floor(e-ct))}}e=getComputedHeight(i)}t=getComputedHeight(n);t>u&&e===0&&($($(".hideIfNoRoom",n).get().reverse()).each(function(){return $(this).hide(),t=getComputedHeight(n),t<=u?!1:void 0}),t>u&&$($(".hideIfNoRoomLast",n).get().reverse()).each(function(){return $(this).hide(),t=getComputedHeight(n),t<=u?!1:void 0}))}}});$(window).trigger("layoutWidgetsComplete")}function addToSelect(n,t,i,r){$(n).append($("<option><\/option>").val(t).html(i).attr("selected",r))}var GETADDRESSESBYPOSTCODE,AddressesByPostcode,InitialiseCardDetailsForm;window.Modernizr=function(n,t,i){function l(n){c.cssText=n}function at(n,t){return l(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function ut(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 vt(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+" "+st.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?ut(u,t):(u=(n+" "+ht.join(r+" ")+r).split(" "),vt(u,t,i))}function yt(){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)),ct[n[u]]=!!r;return ct}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ft=t.createElement(e),c=ft.style,o=t.createElement("input"),g=":)",et={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),ot="Webkit Moz O ms",st=ot.split(" "),ht=ot.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ct={},w={},nt=[],tt=nt.slice,b,a=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},pt=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t)&&i(t).matches||!1:(a("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},lt=function(){function n(n,u){u=u||t.createElement(r[n]||"div");n="on"+n;var f=n in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(n,""),f=h(u[n],"function"),h(u[n],"undefined")||(u[n]=i),u.removeAttribute(n))),u=null,f}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n}(),it={}.hasOwnProperty,rt,k;rt=!h(it,"undefined")&&!h(it.call,"undefined")?function(n,t){return it.call(n,t)}:function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")};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.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:a(["@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 lt("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 l("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return l("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return l("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 at("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 l((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&&a("@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 a('@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 a(["#",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(et.call(t.createElementNS(p.svg,"animate")))};r.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(et.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||yt(),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},l(""),ft=o=null,function(n,t){function v(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 s(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function u(n){var t=a[n[l]];return t||(t={},o++,n[l]=o,a[o]=t),t}function h(n,r,f){if(r||(r=t),i)return r.createElement(n);f||(f=u(r));var e;return e=f.cache[n]?f.cache[n].cloneNode():b.test(n)?(f.cache[n]=f.createElem(n)).cloneNode():f.createElem(n),e.canHaveChildren&&!w.test(n)&&!e.tagUrn?f.frag.appendChild(e):e}function y(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||u(n);for(var e=r.frag.cloneNode(),f=0,o=s(),h=o.length;f<h;f++)e.createElement(o[f]);return e}function p(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?h(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+s().join().replace(/[\w\-]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function c(n){n||(n=t);var f=u(n);return r.shivCSS&&!e&&!f.hasCSS&&(f.hasCSS=!!v(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),i||p(n,f),n}var f=n.html5||{},w=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,b=/^(?: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,e,l="_html5shiv",o=0,a={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";e="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){e=!0;i=!0}})();r={elements:f.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:f.shivCSS!==!1,supportsUnknownElements:i,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:h,createDocumentFragment:y};n.html5=r;c(t)}(this,t),u._version="2.8.3",u._prefixes=y,u._domPrefixes=ht,u._cssomPrefixes=st,u.mq=pt,u.hasEvent=lt,u.testProp=function(n){return ut([n])},u.testAllProps=f,u.testStyles=a,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),function(n,t,i){function h(n){return"[object Function]"==y.call(n)}function c(n){return"string"==typeof n}function l(){}function w(n){return!n||"loaded"==n||"complete"==n||"uninitialized"==n}function f(){var n=a.shift();v=1;n?n.t?s(function(){("c"==n.t?u.injectCss:u.injectJs)(n.s,0,n.a,n.x,n.e,1)},0):(n(),f()):v=0}function ut(n,i,o,h,c,l,y){function k(t){if(!nt&&w(p.readyState)&&(tt.r=nt=1,!v&&f(),p.onload=p.onreadystatechange=null,t)){"img"!=n&&s(function(){g.removeChild(p)},50);for(var u in r[i])r[i].hasOwnProperty(u)&&r[i][u].onload()}}var y=y||u.errorTimeout,p=t.createElement(n),nt=0,b=0,tt={t:o,s:i,e:c,a:l,x:y};1===r[i]&&(b=1,r[i]=[]);"object"==n?p.data=i:(p.src=i,p.type=n);p.width=p.height="0";p.onerror=p.onload=p.onreadystatechange=function(){k.call(this,b)};a.splice(h,0,tt);"img"!=n&&(b||2===r[i]?(g.insertBefore(p,d?null:e),s(k,y)):r[i].push(p))}function ft(n,t,i,r,u){return v=0,t=t||"j",c(n)?ut("c"==t?et:nt,n,t,this.i++,i,r,u):(a.splice(this.i++,0,n),1==a.length&&f()),this}function b(){var n=u;return n.loader={load:ft,i:0},n}var o=t.documentElement,s=n.setTimeout,e=t.getElementsByTagName("script")[0],y={}.toString,a=[],v=0,k="MozAppearance"in o.style,d=k&&!!t.createRange().compareNode,g=d?o:e.parentNode,o=n.opera&&"[object Opera]"==y.call(n.opera),o=!!t.attachEvent&&!o,nt=k?"object":o?"script":"img",et=o?"script":nt,tt=Array.isArray||function(n){return"[object Array]"==y.call(n)},p=[],r={},it={timeout:function(n,t){return t.length&&(n.timeout=t[0]),n}},rt,u;u=function(n){function a(n){for(var n=n.split("!"),f=p.length,i=n.pop(),e=n.length,i={url:i,origUrl:i,prefixes:n},u,r,t=0;t<e;t++)r=n[t].split("="),(u=it[r.shift()])&&(i=u(i,r));for(t=0;t<f;t++)i=p[t](i);return i}function f(n,t,u,f,e){var o=a(n),s=o.autoCallback;o.url.split(".").pop().split("?").shift();o.bypass||(t&&(t=h(t)?t:t[n]||t[f]||t[n.split("/").pop().split("?")[0]]),o.instead?o.instead(n,t,u,f,e):(r[o.url]?o.noexec=!0:r[o.url]=1,u.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":i,o.noexec,o.attrs,o.timeout),(h(t)||h(s))&&u.load(function(){b();t&&t(o.origUrl,e,f);s&&s(o.origUrl,e,f);r[o.url]=2})))}function s(n,t){function a(n,o){if(n){if(c(n))o||(i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}),f(n,i,t,0,e);else if(Object(n)===n)for(r in v=function(){var t=0;for(var i in n)n.hasOwnProperty(i)&&t++;return t}(),n)n.hasOwnProperty(r)&&(!o&&!--v&&(h(i)?i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}:i[r]=function(n){return function(){var t=[].slice.call(arguments);n&&n.apply(this,t);u()}}(s[r])),f(n[r],i,t,r,e))}else o||u()}var e=!!n.test,o=n.load||n.both,i=n.callback||l,s=i,u=n.complete||l,v,r;a(e?n.yep:n.nope,!!o);o&&a(o)}var e,t,o=this.yepnope.loader;if(c(n))f(n,0,o,0);else if(tt(n))for(e=0;e<n.length;e++)t=n[e],c(t)?f(t,0,o,0):tt(t)?u(t):Object(t)===t&&s(t,o);else Object(n)===n&&s(n,o)};u.addPrefix=function(n,t){it[n]=t};u.addFilter=function(n){p.push(n)};u.errorTimeout=1e4;null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",rt=function(){t.removeEventListener("DOMContentLoaded",rt,0);t.readyState="complete"},0));n.yepnope=b();n.yepnope.executeStack=f;n.yepnope.injectJs=function(n,i,r,o,h,c){var a=t.createElement("script"),v,y,o=o||u.errorTimeout;a.src=n;for(y in r)a.setAttribute(y,r[y]);i=c?f:i||l;a.onreadystatechange=a.onload=function(){!v&&w(a.readyState)&&(v=1,i(),a.onload=a.onreadystatechange=null)};s(function(){v||(v=1,i(1))},o);h?a.onload():e.parentNode.insertBefore(a,e)};n.yepnope.injectCss=function(n,i,r,u,o,h){var u=t.createElement("link"),c,i=h?f:i||l;u.href=n;u.rel="stylesheet";u.type="text/css";for(c in r)u.setAttribute(c,r[c]);o||(e.parentNode.insertBefore(u,e),s(i,0))}}(this,document);Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};Modernizr.addTest("fileinput",function(){var n=document.createElement("input");return n.type="file",!n.disabled}),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 f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(u," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var y,a,h,v,c,p;if(arguments.length>1&&!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(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=u?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=f(w.shift()),l=w.join("=");if(u&&u===b){h=r(l,o);break}u||(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))}});var currentURL=window.location,host=window.location.host,hostname=window.location.hostname,protocol=window.location.protocol,port=window.location.port,currentHostname=port===80||port===443?hostname:host,searchWatermark="Reader Name/Pin",searchUrl="/Psychic-Reader-Search/Name-Pin/";$(".loginRequired").click(function(){var n=confirm($(this).attr("title"));n===!0&&(window.location="/Login/")});$(".noReading").click(function(){alert($(this).attr("title"))});$("#mast_bottom").length||$(".mast-wrap").addClass("hide-mobile");$(function(){var t,n,i;try{typeof ga!="undefined"&&typeof googleAnalyticsClientId!="undefined"&&googleAnalyticsClientId===""&&ga(function(n){googleAnalyticsClientId=n.get("clientId");var t={clientId:googleAnalyticsClientId};$.ajax({data:JSON.stringify(t),type:"POST",contentType:"application/json; charset=utf-8",url:GOOGLE_ANALYTICS_ENDPOINT?GOOGLE_ANALYTICS_ENDPOINT:"/Wcf/GoogleAnalytics.svc/LogClientId",dataType:"json"})});$(".share-btn").each(function(){$(this).attr("href",$(this).attr("href")+currentURL.href)});$(".fb_like_btn .button").html("<div class='fb-like' data-href='"+currentURL+"' data-send='false' data-layout='box_count' data-width='55' data-show-faces='false'><\/div>");$(".google_plus_btn .button").html("<g:plusone size='tall' href='"+currentURL+"'><\/g:plusone>");$(".blog_archive").each(function(){var u=$(".widget_inside_margin ul",this).css("max-height"),t=$(".widget_container",this).css("padding-bottom"),n=this,i=$(window).width(),r=0;r=i>=960?parseInt(t,10)*1.23:i<=940&&i>=740?parseInt(t,10)*2.3:i<=740&&i>=480?parseInt(t,10)*2.5:parseInt(t,10)*3;$(".show_more",this).click(function(){$(".widget_container",n).css("padding-bottom",r);$(".widget_inside_margin ul",n).css("max-height","none");$(this).hide();$(".show_less",n).show()});$(".show_less",this).click(function(){$(".widget_container",n).css("padding-bottom",t);$(".widget_inside_margin ul",n).css("max-height",u);$(this).hide();$(".show_more",n).show()})});$.cookie("user_accepted_desktop")?($("meta[name=viewport]").attr("content","width=1000,initial-scale=1,maximum-scale=1"),$(".desktop_link").hide(),$(".mobile_link").show(),$(".mobile_footer").hide(),$(".mobile_footer").show(),$(".mobile_link").click(function(){setUserDesktopSite(!1)})):($(".mobile_link").hide(),$(".desktop_link").show(),$(".desktop_link").click(function(){setUserDesktopSite(!0)}));$(".mobile_search, .fixed_search, .search").each(function(){var n=this;$("input",this).each(function(){var t=$(this);t.keypress(function(t){if(t.keyCode===13){var i=$(this).val();if(i===null||i.length<1)$(".error",n).show();else return performExpertSearch(i),!1}})});$(".submit",this).click(function(){var t=$("input",n).val();t===null||t.length<1?$(".error",n).show():performExpertSearch(t)})});$("#fixed_nav .nav_menu li.skillsMenuButton").click(function(){$(".fixed_skills").is(":visible")?$(".fixed_skills").slideUp():(closeAllPopovers(),$(".fixed_skills").slideDown())});$("#fixed_nav .nav_menu li.footerMenuButton").click(function(){$(".fixed_footer").is(":visible")?$(".fixed_footer").slideUp():(closeAllPopovers(),$(".fixed_footer").slideDown())});$("#fixed_nav .nav_menu li.searchMenuButton").click(function(){$(".fixed_search").is(":visible")?$(".fixed_search").slideUp():(closeAllPopovers(),$(".fixed_search").slideDown())});$(".fixed_search input").focus(function(){$(".nav_menu").slideUp()});$(".fixed_search input").blur(function(){$(".nav_menu").slideDown()});$("#onlineChatExpertPanel .reader_bio_toggle").click(function(){return $(".reader_bio").is(":visible")?($(".reader_bio").slideUp(),$(".reader_bio_toggle").addClass("closed"),$(".reader_bio_toggle").removeClass("opened")):(closeAllPopovers(),$(".reader_bio").slideDown(),$(".reader_bio_toggle").addClass("opened"),$(".reader_bio_toggle").removeClass("closed")),!1});t="user_accepted_cookies";n=$("#cookie-notification");$.cookie(t)?n.remove():(i=function(){$.cookie(t,t,{expires:365,path:"/"})},n.slideDown("slow"),n.is(":visible")&&(setTimeout(function(){n.slideUp("slow")},5e3),i()),n.click(function(){n.slideUp();i()}));internetExplorerFixes();iOSFixes();androidFixes();ieMobileFixes();initialiseReaderFilterToggle();$(window).resize(readerFilterResize);initialiseCallNowPopovers(!1);initialiseExpertLoad();layoutWidgets();$(window).resize(layoutWidgets);addGoogleAnalyticsEventTelLink();addGoogleAnalyticsEventSmsLink();addGoogleAnalyticsEventMailtoLink();typeof Sys!="undefined"&&typeof Sys.Application!="undefined"&&typeof Sys.Application.add_load!="undefined"&&Sys.Application.add_load(function(){internetExplorerFixes();initialiseReaderFilterToggle();initialiseCallNowPopovers(!0);initialiseExpertLoad();layoutWidgets()})}catch(r){console.log(r);typeof errorHandler!="undefined"&&errorHandler(r,"FourD.Psychic.WebApp.BaseWebApp.JavaScript.main.js",null)}});$(document).ready(function(){switch(window.location.hash){case"#upgrade":$("#has-phone-account").prop("checked",!0);$(".show-phone-account").show()}$("#has-phone-account").val(this.checked);$("#has-phone-account").change(function(){this.checked?($(".show-phone-account").show(),window.location.hash="upgrade"):($(".show-phone-account").hide(),window.location.hash="")});typeof InitialiseCardDetailsForm=="function"&&$(".CardDetailsForm").length>0&&InitialiseCardDetailsForm()});GETADDRESSESBYPOSTCODE="/Wcf/Controls/Location.svc/GetAddressesByPostcode",function(){var n,t=[].indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(t in this&&this[t]===n)return t;return-1};n=jQuery;n.fn.validateCreditCard=function(i,r){var s,f,u,e,l,a,v,y,o,p,h,w,c;for(e=[{name:"amex",pattern:/^3[47]/,valid_length:[15]},{name:"diners_club_carte_blanche",pattern:/^30[0-5]/,valid_length:[14]},{name:"diners_club_international",pattern:/^36/,valid_length:[14]},{name:"jcb",pattern:/^35(2[89]|[3-8][0-9])/,valid_length:[16]},{name:"laser",pattern:/^(6304|670[69]|6771)/,valid_length:[16,17,18,19]},{name:"visa_electron",pattern:/^(4026|417500|4508|4844|491(3|7))/,valid_length:[16]},{name:"visa",pattern:/^4/,valid_length:[16]},{name:"mastercard",pattern:/^5[1-5]/,valid_length:[16]},{name:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,valid_length:[12,13,14,15,16,17,18,19]},{name:"discover",pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,valid_length:[16]}],s=!1,i&&("object"==typeof i?(r=i,s=!1,i=null):"function"==typeof i&&(s=!0)),null==r&&(r={}),null==r.accept&&(r.accept=function(){var n,i,t;for(t=[],n=0,i=e.length;i>n;n++)f=e[n],t.push(f.name);return t}()),c=r.accept,h=0,w=c.length;w>h;h++)if(u=c[h],t.call(function(){var n,i,t;for(t=[],n=0,i=e.length;i>n;n++)f=e[n],t.push(f.name);return t}(),u)<0)throw"Credit card type '"+u+"' is not supported";return l=function(n){var i,s,o;for(o=function(){var n,u,o,i;for(i=[],n=0,u=e.length;u>n;n++)f=e[n],o=f.name,t.call(r.accept,o)>=0&&i.push(f);return i}(),i=0,s=o.length;s>i;i++)if(u=o[i],n.match(u.pattern))return u;return null},v=function(n){var t,i,r,u,e,f;for(r=0,f=n.split("").reverse(),i=u=0,e=f.length;e>u;i=++u)t=f[i],t=+t,i%2?(t*=2,r+=10>t?t:t-9):r+=t;return r%10==0},a=function(n,i){var r;return r=n.length,t.call(i.valid_length,r)>=0},p=function(){return function(n){var t,i;return u=l(n),i=!1,t=!1,null!=u&&(i=v(n),t=a(n,u)),{card_type:u,valid:i&&t,luhn_valid:i,length_valid:t}}}(this),o=function(t){return function(){var i;return i=y(n(t).val()),p(i)}}(this),y=function(n){return n.replace(/[ -]/g,"")},s?(this.on("input.jccv",function(t){return function(){return n(t).off("keyup.jccv"),i.call(t,o())}}(this)),this.on("keyup.jccv",function(n){return function(){return i.call(n,o())}}(this)),i.call(this,o()),this):o()}}.call(this);AddressesByPostcode={Get:function(n,t,i){var r,u;i||(i=function(){});n=n.toUpperCase();t=t.toUpperCase();r=AddressesByPostcode.GetStoredElement(n,t);r.status==AddressesByPostcode.Status.loaded?i(r.data):(r.status==AddressesByPostcode.Status.empty||r.status==AddressesByPostcode.Status.error)&&(r.status=AddressesByPostcode.Status.waiting,u={postcode:n,countryCode:t},$.ajax({data:JSON.stringify(u),type:"POST",contentType:"application/json; charset=utf-8",url:GETADDRESSESBYPOSTCODE,dataType:"json",success:function(u){var f=AddressesByPostcode.Status.error;u&&(u.ServiceOperationOutcome==10||u.ServiceOperationOutcome==40)&&(f=AddressesByPostcode.Status.loaded);r?r.status!=AddressesByPostcode.Status.loaded&&(r.data=u?u:null,r.status=f):AddressesByPostcode.PostCodeDataStorage.push({id:n+t,data:u?u:null,status:f});i(r.data)},error:function(n,t,i){r.status!=AddressesByPostcode.Status.loaded&&(r.status=AddressesByPostcode.Status.error);i!="abort"&&n.status!=0&&n.readyState!=0&&typeof errorHandler!="undefined"&&errorHandler("AJAXRequest - error callback: "+String(i),"main.js/AJAXRequest/error",null)}}))},GetStoredElement:function(n,t){var i;return i=AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function(n){return n.id}).indexOf(n+t)],i||(AddressesByPostcode.PostCodeDataStorage.push({id:n+t,data:null,status:AddressesByPostcode.Status.empty}),i=AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function(n){return n.id}).indexOf(n+t)]),i},PostCodeDataStorage:[{id:"",data:undefined,status:null}],Status:{empty:0,waiting:1,error:2,loaded:3}};InitialiseCardDetailsForm=function(){function c(){i.data("is-manual-address")?(o=!0,i.text(i.data("list-address")),i.data("is-manual-address",!1),l()):(o=!1,i.text(i.data("manual-address")),i.data("is-manual-address",!0),a())}function a(){t.removeClass("toggleDown");t.addClass("toggleUp");n.removeClass("slide-fade-show");r.show();r.removeClass("hidden");u.show();u.removeClass("hidden");f.show();f.removeClass("hidden");setTimeout(function(){r.addClass("slide-fade-show");u.addClass("slide-fade-show");f.addClass("slide-fade-show");setTimeout(function(){n.hide()},200)},20)}function l(){var i=$("#BillAddress option:selected");i.val()>=0?$("#txtBillToStreet1").val($(i).text()):$("#txtBillToStreet1").val("");r.removeClass("slide-fade-show");u.removeClass("slide-fade-show");f.removeClass("slide-fade-show");$("#BillAddress option").length>0?(t.removeClass("toggleUp"),t.addClass("toggleDown"),n.removeClass("hidden"),n.show()):(t.removeClass("toggleUp"),t.removeClass("toggleDown"));setTimeout(function(){n.addClass("slide-fade-show");setTimeout(function(){r.hide();u.hide();f.hide()},200)},20)}function s(n){$(".ddlBillToState").empty();var t=$(".ddlBillToCountry").val(),i=$("#txtBillToPostalCode"),r=$("#lblBillToPostalCode");t==="CA"?(i.attr("placeholder","A1A 1A1"),r.text("Postal Code"),$(".ddlCA option").each(function(){var t=!1;n===this.value&&(t=!0);addToSelect(".ddlBillToState",this.value,this.text,t)})):t==="US"&&(i.attr("placeholder","00000-0000"),r.text("Zip Code (ZIP+4)"),$(".ddlUS option").each(function(){var t=!1;n===this.value&&(t=!0);addToSelect(".ddlBillToState",this.value,this.text,t)}))}var t=$("#toggleArrow"),n=$("#liBillToStreet"),r=$("#liBillToStreetManual"),u=$("#liBillCity"),f=$("#liBillToState"),i=$("#lblToggleAddress"),o=!0,h,e;$("#txtBillToStreet1").val().length>0&&(t.removeClass("toggleUp"),t.addClass("toggleDown"),n.addClass("slide-fade-show"),n.removeClass("hidden"),n.show());$(".ddlBillToState").length&&($(".ddlBillToState").val()===""?s():(h=$(".ddlBillToState").val(),s(h)));e=function(i,r){var u,f,e;o&&(n.hide(),n.removeClass("slide-fade-show"),t.removeClass("toggleDown"),u=$(".ddlBillToCountry").val(),f=r.replace(/ /g,"").length,f>=10&&u==="US"||f>=6&&u==="CA"?(e=function(n){if($("#txtBillToPostalCode").val().replace(/ /g,"").toUpperCase()==r.toUpperCase()&&($("#BillAddress").empty(),$("#txtBillToStreet1").val(""),$("#txtBillToCity").val(""),$("#ddlBillToState").val(""),n&&n.Addresses)){var t=$("#BillAddress");$(t).append(new Option("Please select an address...",null,!0,!0));n.Addresses.forEach(function(n,i){$(t).append(new Option((n.PropertyName?n.PropertyName:"")+(n.Street1?(n.PropertyName?", ":"")+n.Street1:"")+(n.Street2?(n.Street1?", ":"")+n.Street2:"")+(n.Street3?(n.Street2?", ":"")+n.Street3:""),i,!1,!1))});n.Addresses.length>1&&l();$("#ddlBillToState").val(n.Addresses[0].AdministrativeArea);$("#txtBillToCity").val(n.Addresses[0].City)}$("#liloadingAddresses").hide()},$("#liloadingAddresses").removeClass("hidden"),$("#liloadingAddresses").show(),AddressesByPostcode.Get(r,i,e)):$("#BillAddress option").length>0&&($("#txtBillToStreet1").val(""),$("#txtBillToCity").val(""),$("#ddlBillToState").val(""),$("#BillAddress").empty()))};$(".ddlBillToCountry").on("change",function(){s();e($("#ddlBillToCountry").val(),$("#txtBillToPostalCode").val().replace(/ /g,""))});$("#btnRequestAddressesByPostcode").on("click",function(){e($("#ddlBillToCountry").val(),$("#txtBillToPostalCode").val().replace(/ /g,""))});$("#txtBillToPostalCode").on("keyup",function(){e($("#ddlBillToCountry").val(),$(this).val().replace(/ /g,""))});$("#BillAddress").on("change",function(){var n=$(this).children("option").filter(":selected"),i=$("#txtBillToPostalCode").val(),r=$("#ddlBillToCountry").val(),t=AddressesByPostcode.GetStoredElement(i.replace(/ /g,"").toUpperCase(),r).data;n.val()>=0?($("#txtBillToStreet1").val(n.text()),t&&$("#txtBillToPostalCode").val(t.Addresses[0].PostalCode)):$("#txtBillToStreet1").val("")});i.on("click",c);$("#toggleArrow").on("click",c);$("#txtCardAccountNumber")[0]&&$("#txtCardAccountNumber").validateCreditCard(function(n){if(n)if(n.card_type){$(this).addClass(n.card_type.name);switch(n.card_type.name){case"visa":$("#ddlCreditCardType").val("001");break;case"mastercard":$("#ddlCreditCardType").val("002");break;case"maestro":$("#ddlCreditCardType").val("042");break;default:$("#ddlCreditCardType").val("")}}else $(this).removeClass().addClass("cardnumber"),$("#ddlCreditCardType").val("");else $(this).removeClass().addClass("cardnumber"),$("#ddlCreditCardType").val("")},{accept:["visa","mastercard","maestro"]})}