/*
 -*- Engage Auth Widget -*-
 Copyright (c) 2012, Janrain, Inc. All rights reserved.
 Version: 2013.1_ws_widgets_rc9
*/
"object"!==typeof window.janrain&&(window.janrain={});janrain.apps={};
janrain.apps=function(){var $a,Ca,ja,Pa;function Eb(){var a;a="http:"===document.location.protocol?"http://cdn.quilt.janrain.com/2.1.4/":"https://d3hmp0045zy3cs.cloudfront.net/2.1.4/";if(janrain.settings.capture&&janrain.settings.capture.quiltVersion){a=a.split("/");if("cdn.quilt.janrain.com"===a[2]||"d3hmp0045zy3cs.cloudfront.net"===a[2])a[a.length-2]=janrain.settings.capture.quiltVersion;a=a.join("/")}return a}function Pb(a,e,b){var c;if(document.getElementById(a))return!1;if(f){c="";var d=document.createElement("div");
d.innerHTML=c+"<iframe "+('name="'+a+'" ')+('id="'+a+'" ')+('src="'+e+'" ')+'style="display: none;"></iframe>';document.body&&document.body.appendChild(d);c=document.getElementById(a)}else c=document.createElement("iframe"),c.setAttribute("name",a),c.id=a,c.setAttribute("src",e),c.style.display="none",document.body&&document.body.appendChild(c);"function"===typeof b&&b();return c}function W(a){for(var e="",b=0;b<a;)e+=W.possible[Math.floor(Math.random()*W.possible.length)],b++;return e}function Da(){function a(a,
c,b,e){c={action:a,key:c,messageId:b};"set"===a&&(c.value=e);return"janrainCapture:"+R.stringify(c)}function e(a,c){function b(){e++;if(10<e)return!1;if("undefined"!==typeof G[a])return clearTimeout(g),"get"===G[a].action&&"function"===typeof c&&c(G[a].storedValue),!0;var g=setTimeout(b,50)}var e=0;b()}function b(c,b){var g=W(40);window.setTimeout(function(){f.contentWindow.postMessage(a("get",c,g),q)});e(g,b)}function c(a,e){if(g)bb?b(a,e):setTimeout(function(){c(a,e)},50);else return window.localStorage.getItem(a)}
function d(a){var c;if(!(c=0!==a.data.indexOf("janrainCapture:"))){c=A;var b=a.origin.replace(/^https?:\/\/|:\d{1,4}$/g,"").toLowerCase();c=!(!T(c)?0:-1<c.indexOf(b))}if(c)return!1;a=R.parse(a.data.replace("janrainCapture:",""));G[a.messageId]=a}var g=!1,G={},f,q,A=janrain.settings&&janrain.settings.whiteListedDomains?janrain.settings.whiteListedDomains:[];return{setItem:function(c,b){if(g){var d=W(40);window.setTimeout(function(){f.contentWindow.postMessage(a("set",c,d,b),q)});return e(d)}return window.localStorage.setItem(c,
b)},removeItem:function(c){if(g){var b=W(40);window.setTimeout(function(){f.contentWindow.postMessage(a("remove",c,b),q)});return e(b)}return window.localStorage.removeItem(c)},getItem:c,setMultiDomain:function(a){if(g=a)window.addEventListener?window.addEventListener("message",d,!1):window.attachEvent?window.attachEvent("onmessage",d):document.attachEvent&&document.attachEvent("onmessage",d),f=document.getElementById("xDomainLocalStorageJanrain"),q=janrain.settings.storageServerDomain}}}function O(){function a(){if(d&&
Fa){var a=new Da;a.setMultiDomain(janrain.settings.multiDomainLocalStorage);a.removeItem(c);a.removeItem(c+"_Expires")}else{var a=G?"; domain="+G:"",b=new Date;b.setTime(b.getTime()+-864E6);document.cookie=c+"="+g+";expires="+b.toUTCString()+a+"; path="+f}}function e(b,e){var g,f,G,H,t;if(d&&Fa)if(t=new Da,janrain.settings.multiDomainLocalStorage)t.setMultiDomain(!0),t.getItem(b,function(g){g?t.getItem(b+"_Expires",function(d){d?Math.round((new Date).getTime()/1E3)>Math.round((new Date(d)).getTime()/
1E3)?(c=b,a(),"function"===typeof e&&e(!1)):"function"===typeof e&&e(g):(new O).getCookie(b+"_session")?"function"===typeof e&&e(g):(c=b,a())}):"function"===typeof e&&e(!1)});else if(H=t.getItem(b),g=t.getItem(b+"_Expires"),H){if(!(g&&Math.round((new Date).getTime()/1E3)>Math.round((new Date(g)).getTime()/1E3))&&(g||(new O).getCookie(b+"_session")))return H;c=b;a()}else return!1;else{g=document.cookie.split(";");f=g.length;for(var i=0;i<f;i++)if(G=g.pop(),H=G.split("="),G=H[0],H=H[1],G.trim()===b)return H;
return!1}}var b,c,d=!1,g,G,f="/";return{create:function(){if(d&&Fa){var a=new Da;a.setMultiDomain(janrain.settings.multiDomainLocalStorage);a.setItem(c,g);b?a.setItem(c+"_Expires",b):(new O).setName(c+"_session").setValue("session").create()}else document.cookie=c+"="+g+(b?"; expires="+b:"")+(G?"; domain="+G:"")+"; path="+f},remove:a,setExpirationDirectly:function(a){a&&(b=a);return this},setExpiration:function(a){if(a){var c=new Date;c.setTime(c.getTime()+864E5*a);b=c.toUTCString()}return this},
setName:function(a){a&&(c=a);return this},setValue:function(a){"undefined"!==typeof a&&(g=a);return this},setUseLocalStorage:function(a){d=a;return this},setPath:function(a){a&&(f=a);return this},setDomain:function(a){a&&(G=a);return this},getCookie:function(a,b){return e(a,b)}}}function eb(a,e){a=a||navigator.appName;e=e||K;return"Microsoft Internet Explorer"===a&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(e)?parseFloat(RegExp.$1):!1}function Qa(){return!/Chrome\//.test(K)&&/Safari\//.test(K)}function Ra(a){a=
a||K;return-1<a.indexOf("iPod")?"iPod":-1<a.indexOf("iPhone")?"iPhone":-1<a.indexOf("iPad")?"iPad":0}function L(a,e,b,c,d,g){"number"===typeof b&&"number"===typeof c&&"number"===typeof d&&"number"===typeof g?("undefined"!==typeof a.style.borderRadius&&(a.style.borderRadius=b+"px "+c+"px "+d+"px "+g+"px"),"undefined"!==typeof a.style.MozBorderRadius&&(a.style.MozBorderRadius=b+"px "+c+"px "+d+"px "+g+"px"),"undefined"!==typeof a.style.webkitBorderRadius&&(a.style.webkitBorderRadius=b+"px "+c+"px "+
d+"px "+g+"px")):("undefined"!==typeof a.style.borderRadius&&(a.style.borderRadius=e+"px"),"undefined"!==typeof a.style.MozBorderRadius&&(a.style.MozBorderRadius=e+"px"),"undefined"!==typeof a.style.webkitBorderRadius&&(a.style.webkitBorderRadius=e+"px"));return a}function Va(a,e){if("undefined"===typeof a||"undefined"===typeof e)return!1;var b=a-e;0>b&&(b=0);b>a&&(b=a);return b}function Fb(a,e){if(f&&9>=f)return a.style.backgroundImage="url('"+vb("rel/img/c7a91677d94f4a79e1b26c8ceb31af82.png")+"')",
!0;var b;if(b=Qa()){a:{if(K&&(b=K.match(/(\d)[\d.]+ Safari/))&&b[1]){b=1*b[1];break a}b=0}b=4>=b}if(b||ca.getMobileDevice()){var c=b="",d="",g=e.split(","),G={top:"left top, left bottom",right:"right top, right bottom",bottom:"left bottom, left top",left:"left top, left bottom"};g[0]&&G[g[0]]&&(b=G[g[0]]);g[1]&&(c="from("+g[1]+")");g[g.length-1]&&(d="to("+g[g.length-1]+")");a.style.backgroundImage="-webkit-gradient(linear,"+b+","+c+","+d+")"}a.style.backgroundImage="-moz-linear-gradient("+e+")";a.style.backgroundImage=
"-webkit-linear-gradient("+e+")";a.style.backgroundImage="-ms-linear-gradient("+e+")";a.style.backgroundImage="-o-linear-gradient("+e+")";a.style.backgroundImage="linear-gradient("+e+")"}function da(a,e,b,c){var d=Gb(b),g=Gb(b,c);if(b=Rb(b))b.a=c,g="rgba("+b.r+", "+b.g+", "+b.b+", "+b.a+")";if(0<e){a.style.backgroundColor=d;a.style.padding=e+"px";if(0<f&&8>=f||f&&v)return!1;a.style.backgroundColor=g;a.style.padding=e+"px"}else a.style.backgroundColor="",a.style.padding="0px"}function Rb(a){var e=
{};if("string"!==typeof a||!a)return!1;a=a.replace(/\s+/g,"");a=a.replace(/,{2,}/g,",");a=a.replace(/[^\d.,]/g,"");a=a.split(",");if(3>a.length||4<a.length)return!1;e.r=a[0];e.g=a[1];e.b=a[2];e.a=a[3]?a[3]:1;return e}function Gb(a,e){var b=a.split("");if("#"!==b[0])return a;4===a.length&&(a=b[0]+b[1]+b[1]+b[2]+b[2]+b[3]+b[3]);var a=a.substring(1,7),b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16);return isNaN(e)?"rgb("+b+","+c+","+d+")":"rgba("+b+","+
c+","+d+","+e+")"}function X(a,e,b){if(null==a)return!1;"object"===typeof window.attachEvent?a.attachEvent("on"+e,b):a.addEventListener(e,b,!1)}function wa(a,e,b){"object"===typeof window.detachEvent?a.detachEvent("on"+e,b):a.removeEventListener(e,b,!1)}function Hb(){var a,e,b,c,d,g,f,t;e=document.documentElement?document.documentElement:{clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,offsetWidth:0,offsetHeight:0};f=e.scrollWidth?e.scrollWidth:0;t=e.scrollHeight?e.scrollHeight:0;d=e.offsetWidth?
e.offsetWidth:0;g=e.offsetHeight?e.offsetHeight:0;b=document.body.scrollWidth?document.body.scrollWidth:0;c=document.body.scrollHeight?document.body.scrollHeight:0;a=document.body.offsetWidth?document.body.offsetWidth:0;e=document.body.offsetHeight?document.body.offsetHeight:0;d=Math.max(b,f,a,d);return{height:Math.max(c,t,e,g),width:d}}function r(a,e,b,c,d){var g=/^(?:[^\u0000-\u0080]|[-0-9a-z?,.!&\s#()])+$/i,f=/(?:^rgb\s*\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$)|(?:^#[a-f0-9]{1,6}$)/i;if("array"===a){if(!T(c))return d||
p.log(c+" is wrong type, must be array, using default value instead"),b;if(e&&T(e))for(var t=0;t<c.length;t++)if(0>e.indexOf(c[t]))return d||p.log(c+" is not within the valid range, using default value instead"),b;return c}if("url"===a){if("string"!==typeof c)return b;c&&(c=c.trim());if(/^http(?:s)?:\/\/[-a-z0-9._~@:!$&'()*+,;=\s/?#]+$/i.test(c))return c;d||p.log(c+" is not the valid format, using default value instead");return b}if("text"===a){if(e){if(0<=e.indexOf(c))return c;d||p.log('Value of "'+
c+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}return g.test(c)?c:b}if("usertext"===a){if("string"!==typeof c&&"number"!==typeof c)return b;if(T(e)){if(1===e.length){if(c.length<=e[0])return c;d||p.log(c+" is too long, using default value instead");return b}if(2===e.length){if(c.length<=e[1]&&c.length>=e[0])return c;d||p.log(c+" is not within the valid range, using default value instead");return b}d||p.log("usertext range is invalid, using default value instead");
return b}return c}"string"===typeof c&&0==c.length&&(c=" ");if(!g.test(c))return d||p.log(c+" contains invalid character(s)"),b;if("boolean"===a){if("boolean"===typeof c)return c;d||p.log(c+" is wrong type, must be boolean, using default value instead");return b}if("text"===a)return c;if("number"===a){if(isNaN(parseInt(c)))return d||p.log(c+" is wrong type, must be a valid number"),b;c=parseFloat(c)}if("color"===a){c&&(c=c.trim());if("transparent"===c||f.test(c))return c;d||p.log('Value of "'+c+'" for '+
arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}if(typeof c!=a&&"color"!=a)return d||p.log(c+" for "+arguments.callee.caller.name+" is "+typeof c+" expected "+a),b;if("object"===typeof e&&"string"===a){if(0<=e.indexOf(c))return c;d||p.log('Value of "'+c+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}if("object"===typeof e&&"number"===a){2===e.length?(g=e[0],f=e[1]):(g=e.shift(),
f=e.pop(),t=e);if(c<g)return d||p.log("Value of "+c+" for "+arguments.callee.caller.name+" is below minimum of "+g+", using minimum value of "+g+" instead"),g;if(c>f)return d||p.log("Value of "+c+" for "+arguments.callee.caller.name+" is above maximum of "+f+", using maximum value of "+f+" instead"),f;if(t&&"number"===typeof t.indexOf(c)||c==g||c==f)return c;return t?(d||p.log("Value of "+c+" for "+arguments.callee.caller.name+" is not a valid value, using default value of "+b+" instead"),b):c}return 0!=
c&&!c?b:c}function fb(a){for(var e=fb.options,a=e.parser[e.strictMode?"strict":"loose"].exec(a),b={},c=14;c--;)b[e.key[c]]=a[c]||"";b[e.q.name]={};b[e.key[12]].replace(e.q.parser,function(a,c,d){c&&(b[e.q.name][c]=d)});return b}function Sb(a,e){function b(a){p=!0;"undefined"!==typeof A&&clearTimeout(A);if("string"===typeof a)return"function"===typeof t&&t(a),!0;if("object"===typeof a||"undefined"===typeof a)return"object"===typeof a&&"error"===a.type?"function"===typeof t&&t(a):"function"===typeof d&&
d(),!0}function c(){q++;if(p)return!0;q<g?A=setTimeout(c,50):b("Load Timeout Error")}var d=e,g=200,f=!1,t,q=0,A,i=document.createElement("script"),Q=document.getElementsByTagName("script")[0],p=!1;i.src=a;i.setAttribute("type","text/javascript");i.onload=i.onerror=i.onreadystatechange=function(a){!p&&(!this.readyState||"loaded"===this.readyState||"complete"===this.readyState)&&b(a)};return{setTimeoutCallback:function(a){f=!0;t=a;return this},setCallback:function(a){d=a;return this},setTimeoutLimit:function(a){g=
a;return this},load:function(){Q.parentNode.insertBefore(i,Q);f&&c()}}}function Y(a,e){Sb(a,e).load()}function Ib(a,e){function b(c){i=!1;"function"===typeof e&&e();janrain.events.onCssLoad.fire({source:a,noload:c,save:!0})}function c(){if(i){for(A=q.length;0<=--A;)if(q[A].href===g.href){b();break}f+=1;i&&(200>f?setTimeout(c,50):b(!0))}}function d(){var a;try{a=!!g.sheet.cssRules}catch(c){f+=1;200>f?setTimeout(d,50):a&&b(!0);return}b()}if(!(!T(ea)?0:-1<ea.indexOf(a))){ea.push(a);var g,f=0,i=!0,q=
document.styleSheets,A;"undefined"===typeof janrain.events.onCssLoad&&(janrain.events.onCssLoad=new Ga);Z?(g=document.createElement("style"),g.innerHTML='@import "'+a+'";'):(g=document.createElement("link"),g.rel="stylesheet",g.href=a,g.type="text/css");Jb||Z?(Jb&&c(),Z&&d()):(g.onload=function(){b()},g.onerror=function(){b(!0)});document.getElementsByTagName("head")[0].appendChild(g)}}function T(a){return"[object Array]"===Object.prototype.toString.call(a)}function xa(a){return!!a&&"[object Object]"===
Object.prototype.toString.call(a)}function fa(a,e){if("undefined"===typeof e||0===e.length||!xa(a)&&!T(a))return a;for(var b=e.split("."),c=a,d=0,g=b.length;d<g&&!(c=c[b[d]],void 0===c||null===c);++d);return c}function wb(a,e,b){for(var c=0,d=a.length;c<d;c++)e.call(b,a[c],c,a)}function Kb(a){a&&a.parentNode&&a.parentNode.removeChild(a);return a}function ya(a){var e=T(a)?[]:{},b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(e[b]=ya.isCloneable(a[b])?ya(a[b]):a[b]);return e}function xb(a){var e=
"",b;for(b in a)e+="&"+encodeURIComponent(b)+"="+encodeURIComponent(a[b]);return e="?"+e.substr(1)}function ka(a){if(!a)return!1;if(a.preventDefault)a.preventDefault();else try{a.returnValue=!1}catch(e){}}function la(a){if(!a)return!1;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Tb(a,e){for(var b=e,c=/\{\|(.*?)\|\}/,d;d=c.exec(b);)try{var g=d[1].trim(),b=b.replace(d[0],"undefined"!==typeof a[g]?a[g]:"")}catch(f){return window.console&&window.console.log&&console.log(f.name+": "+
f.message,"error"),!1}return b}function Lb(){function a(a){var a=a||"img",b=document.createElement(a);b.style.position="absolute";b.style.cursor="pointer";b.style.zIndex=1E3;"a"===a?(b.setAttribute("href","#"),b.className="janrain_modal_closebutton",O&&(b.innerHTML=O)):(b.src=R,K||(b.style.right="-6px",b.style.top="-7px",b.style.height="31px",b.style.width="28px"));b.onclick=ma?c:e;return b}function e(a){z||(k.style.display="none",na.style.display="none",E.style.display="none");$&&ca.deactivate();
("object"===typeof a||!a)&&janrain.events.onModalClose.fire();("object"===typeof a||!a)&&W.fire();"object"===typeof a&&ka(a)}function b(){var a=document.createElement("div"),b=document.createElement("div"),c=document.createElement("a"),d=document.createElement("a"),g=document.createElement("h3");c.innerHTML=T;d.innerHTML=Y;g.innerHTML=ia;c.setAttribute("href","#");d.setAttribute("href","#");a.className="janrain_close_confirm_container";b.className="janrain_close_confirm";c.className="janrain_modal_confirm";
d.className="janrain_modal_cancel";X(c,"click",function(a){e();k.removeChild(Ha);Ha=null;ka(a)});X(d,"click",function(a){k.removeChild(Ha);Ha=null;ka(a)});b.appendChild(g);b.appendChild(d);b.appendChild(c);a.appendChild(b);return a}function c(a){Ha||(Ha=b(),k.appendChild(Ha));ka(a)}function d(a){var b,c,e=document.documentElement.scrollTop>=document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,g=document.documentElement.scrollLeft>=document.body.scrollLeft?document.documentElement.scrollLeft:
document.body.scrollLeft;"undefined"!=typeof window.innerWidth?(b=window.innerWidth,c=window.innerHeight):(b=document.documentElement.offsetWidth,c=document.documentElement.offsetHeight);var f=a.style&&a.style.width?parseInt(a.style.width):a.offsetWidth?parseInt(a.offsetWidth):0,k=a.style&&a.style.height?parseInt(a.style.height):a.offsetHeight?parseInt(a.offsetHeight):0;c-=k;b-=f;e+=c/2;g+=b/2;0>c&&(document.documentElement.scrollTop=0,document.body.scrollTop=0,e=10);0>b&&(document.documentElement.scrollLeft=
0,g=document.body.scrollLeft=0);a.style.top=e+"px";a.style.left=g+"px";"absolute"!==a.style.position&&(a.style.position="absolute")}function g(){if(z){var a=document.getElementById("previewMode");a.style.position="relative";a.appendChild(k)}else d(k);z||p.show()}function G(a){ga||(M=r("number",[0,20],10,a),oa.fire({radius:Va(V,M)}))}function t(a){ga||(F=r("color",null,"#000000",a))}function q(a){ga||(V=r("number",[0,20],10,a),aa.fire({radius:Va(V,M),refresh:!0}))}function A(a){ga||(pa=r("number",
[0,1],0.5,a),"object"==typeof k&&da(k,M,F,pa))}function Ea(a){if("portrait"===a){ba="portrait";var b="one column"}"landscape"===a&&(ba="landscape",b="two column");Ia.fire({orientation:ba,format:b,width:Ua,height:D});setTimeout(va,100);g()}function Q(a){a&&(za=a);f&&v&&(za+=M-2);"object"==typeof k&&(k.style.width=za+"px");return this}function Qb(a){a&&(u=a);f&&v&&(u=u+2*M-4);a&&"object"==typeof k&&(k.style.height=u+"px");return this}function H(){ja>=Pa&&"undefined"===typeof window.orientation?"landscape"!==
ba&&Ea("landscape"):90===window.orientation||-90===window.orientation?"landscape"!==ba&&Ea("landscape"):"portrait"!==ba&&Ea("portrait");g()}function va(){var a=Hb();E.style.height=a.height+"px";E.style.width=a.width+"px"}function U(){return"object"===typeof k&&"none"!==k.style.display}var Ua=380,D=131,k,Mb="janrainModal",na,E,S,za=Ua,u=D,M=10,F="#000000",V=10,pa=0.5,ma=!1,R=vb("rel/img/b573cd6e318034fa17bb7e9690552ca1.png"),O="",ga=janrain.settings&&janrain.settings.capture&&janrain.settings.capture.noModalBorderInlineCss,
K=!1,ia="Are you sure you want to quit?",T="Yes, quit",Y="No, stay",Ha,ba="landscape",Aa=!0,$="boolean"===typeof $?$:"number"===typeof window.orientation?!0:!1,Ma="boolean"===typeof Ma?Ma:janrain.settings.previewMode,z=Ma,ha=ha||!1,qa=!1;janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseImage&&(R=janrain.settings.capture.modalCloseImage,K=!0);janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseHtml&&(O=janrain.settings.capture.modalCloseHtml);
window.janrain.events.onModalClose||(window.janrain.events.onModalClose=I());window.janrain.events.onModalOpen||(window.janrain.events.onModalOpen=I());var W=I(),Ya=I(),aa=I(),oa=I(),Ia=I();ca&&ca.onOrientationChange&&ca.onViewportChange&&(ca.onOrientationChange.addHandler(function(a){Ea(a.orientation)}),ca.onViewportChange.addHandler(function(){d(k)}));"undefined"!==typeof janrain.events.onCaptureRenderComplete&&(janrain.events.onCaptureRenderComplete.addHandler(function(){U()&&(qa=!0)}),janrain.events.onCaptureContentChange.addHandler(function(){U()&&
qa&&(g(),setTimeout(va,500),qa=!1)}));return{isOpen:function(){return U()},setWidth:function(a){Q(a);return this},setHeight:function(a){Qb(a);return this},setBorder:function(a){("string"==typeof a||"number"==typeof a)&&G(a);ga||"object"==typeof k&&da(k,M,F,pa);return this},setBorderColor:function(a){a&&t(a);ga||"object"==typeof k&&da(k,M,F,pa);return this},setBorderRadius:function(a){("string"==typeof a||"number"==typeof a)&&q(a);ga||"object"==typeof k&&L(k,V);return this},setBorderOpacity:function(a){("number"===
typeof a||"string"===typeof a)&&A(a);return this},setZIndex:function(a){E.style.zIndex=a},setPreviewMode:function(a){"boolean"===typeof a&&(z=a);return this},setId:function(a){Mb=a;k&&(k.id=a);return this},show:function(){$||(k.style.display="block");"object"==typeof na&&Aa&&(na.style.display="block");z?$&&(k.style.display="block"):(E.style.display="block",$?(ca.setElement(k).activate(),k.style.display="block"):(X(window,"resize",H),X(window,"resize",va),H(),va()));ga||aa.fire({radius:Va(V,M),refresh:!1});
Ya.fire();janrain.events.onModalOpen.fire();k.focus()},close:function(a){e(a)},closeConfirm:function(){c()},refresh:function(a){ha||k.appendChild(S);a&&a.center&&g()},remove:function(){if(z){var a=document.getElementById("previewMode");"object"===typeof S&&k.removeChild(S);"object"===typeof k&&a.removeChild(k);"object"===typeof E&&document.body.removeChild(E);if(a=document.getElementById("janrainEngageEmbed_old"))a.id="janrainEngageEmbed";E=k=""}else"object"===typeof S&&k.removeChild(S),"object"===
typeof E&&document.body.removeChild(E),"object"===typeof k&&document.body.removeChild(k)},addContent:function(b){janrain.events.onAuthWidgetContentPlaced.fire();na=b;if(!k){k=document.createElement("div");k.id=Mb;if("number"===typeof za||"string"===typeof za)k.style.width=za+"px";k.style.height=u+"px";k.style.position="absolute";ga||(k.style.padding=M+"px",L(k,V),da(k,M,F,pa));k.style.zIndex=1E3;k.style.display="none";b=Hb();E=document.createElement("div");janrain.settings&&janrain.settings.capture&&
janrain.settings.capture.captureServer&&(E.id="janrainModalOverlay");E.style.width=b.width+"px";E.style.height=b.height+"px";E.style.left=0;E.style.top=0;E.style.backgroundColor="#000000";E.style.position="absolute";b=E;"undefined"!==typeof b.style.filter&&(b.style.filter="alpha(opacity=40)");"undefined"!==typeof b.style.opacity&&(b.style.opacity="0.4");"undefined"!==typeof b.style.KhtmlOpacity&&(b.style.KhtmlOpacity="0.4");"undefined"!==typeof b.style.MozOpacity&&(b.style.MozOpacity="0.4");E.style.display=
"none";E.style.zIndex=1E3;S=O?a("a"):a();k.appendChild(S);document.body.appendChild(E);document.body.appendChild(k)}k.appendChild(na);setTimeout(va,500);z&&g();return this},getContent:function(){return na},getBorderWidth:function(){return M},getState:function(){return{width:za,borderWidth:M,borderColor:F,borderRadius:V,borderOpacity:pa,orientation:ba}},setState:function(a){i("customizable_auth_widget_styling")&&("undefined"!==typeof a.borderWidth&&G(a.borderWidth),"undefined"!==typeof a.borderColor&&
t(a.borderColor),"undefined"!==typeof a.borderOpacity&&A(a.borderOpacity),"undefined"!==typeof a.orientation&&Ea(a.orientation),"undefined"!==typeof a.borderRadius&&(("string"==typeof a.borderRadius||"number"==typeof a.borderRadius)&&q(a.borderRadius),"object"==typeof k&&L(k,V)))},setConfirmClose:function(a){ma=a;return this},setShowContentOnLoad:function(a){Aa=a;return this},setConfirmMessageText:function(a){ia=a},setConfirmLinkText:function(a){T=a},setCancelLinkText:function(a){Y=a},onClose:W,onShow:Ya,
onOrientationChange:Ia,onBorderRadiusChange:aa,onBorderWidthChange:oa}}function Ub(a){function e(a){"janrainReadyToClose:True"===a.data&&(window.focus(),f=!0,wa(window,"message",e))}function b(){var a=window.open(c,"","width="+d+", height="+g+", status=1, location=1, resizable=yes");("iPod"===Nb||"iPhone"===Nb)&&6<=Vb&&X(window,"message",e);var b=window.setInterval(function(){f&&a&&(a.close(),f=!1);if(a&&a.closed||a&&"undefined"===typeof a.closed||"undefined"===typeof a)window.clearInterval(b),"function"===
typeof i&&i()},500)}var c=a,d=400,g=400,f=!1,i;return{show:function(){b()},setWidth:function(a){a&&(d=a);return this},setHeight:function(a){a&&(g=a);return this},setCallback:function(a){a&&(i=a);return this}}}function Wb(){function a(){r=(new Date).getTime()-d;if(r<c){var a=Math.round(e()*p+i);g.style[A]=a+"px"}else clearInterval(Q),g.style[A]=q+"px",v()}function e(){if("flat"==H)return r*(1/c);if("sinusoidal"==H)return Math.abs(Math.sin(r*(Math.PI/(2*c))))}function b(a){return{x:function(){var b,
c=a.event.clientX;var e=a.boundary,d=curtop=0;if(e.offsetParent){do d+=e.offsetLeft,curtop+=e.offsetTop;while(e=e.offsetParent);b=d}b=c-b;b=b<this.boundary_x()?b:this.boundary_x();return 0<b?b:0},boundary_x:function(){var b=a.boundary.getBoundingClientRect();return b.width||b.right-b.left}}}var c="1000",d,g,f=document,i,q,A="left",p,Q,r,H="flat",v,U;return{setAcceleration:function(a){H=a;return this},setCallback:function(a){v=a;return this},setDuration:function(a){c=a;return this},setDirection:function(a){"horizontal"===
a&&(A="left");"vertical"===a&&(A="top");return this},setElement:function(a){g=a;return this},setElementBoundary:function(a){f=a;return this},startPosition:function(a){i=a;return this},endPosition:function(a){q=a;return this},animate:function(){p=q-i;d=(new Date).getTime();Q=setInterval(a,10);return this},drag:function(a){var c=this;this.moveHandler=function(a){var c=b({event:a.targetTouches&&a.targetTouches.length?a.targetTouches[0]:a,boundary:f}).x();g.style.left=c+"px";la(a);ka(a);U&&clearTimeout(U);
U=setTimeout(function(){v({pos_x:c})},500)};this.upHandler=function(a){c.unbindDragHandlers();la(a);ka(a)};X(document,$a,this.moveHandler);X(document,Ca,this.upHandler);la(a);ka(a)},unbindDragHandlers:function(){wa(document,Ca,this.upHandler);wa(document,$a,this.moveHandler);return this}}}function I(){return new Ga}function Ga(){this.eventHandlers=[];this.firedEvents=[]}function Ob(){if(function(){if("object"!==typeof janrain.events||"object"!==typeof janrain.apps.engage||"object"!==typeof janrain.apps.engage.signin)return!1;
if(!0===janrain.settings.custom)return!0;for(var a="onAuthWidgetLoad,onAuthWidgetContentPlaced,onCustomizationChange,onProviderLoginComplete,onProviderLoginCancel,onProviderLoginError,onProviderLoginStart,onProviderLoginSuccess,onProviderLoginToken,onReturnExperienceFound,onModalWidgetReady".split(","),b=0;b<a.length;b++)if("object"!==typeof janrain.events[a[b]])return!1;return!0}())clearTimeout(a),janrain.events.onAuthWidgetLoad.fire();else var a=setTimeout(Ob,5)}Array.prototype.indexOf||(Array.prototype.indexOf=
function(a){if(null==this)throw new TypeError;var e=Object(this),b=e.length>>>0;if(0===b)return-1;var c=0;0<arguments.length&&(c=Number(arguments[1]),c!=c?c=0:0!=c&&Infinity!=c&&-Infinity!=c&&(c=(0<c||-1)*Math.floor(Math.abs(c))));if(c>=b)return-1;for(c=0<=c?c:Math.max(b-Math.abs(c),0);c<b;c++)if(c in e&&e[c]===a)return c;return-1});Array.prototype.map||(Array.prototype.map=function(a,e){if(null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!==typeof a)throw new TypeError;
for(var d=Array(c),g=0;g<c;g++)g in b&&(d[g]=a.call(e,b[g],g,b));return d});Array.prototype.filter||(Array.prototype.filter=function(a,d){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var f=[],g=0;g<c;g++)if(g in b){var i=b[g];a.call(d,i,g,b)&&f.push(i)}return f});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var F=window.innerWidth?window.innerWidth:document.body&&document.body.clientWidth?
document.body.clientWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:0;Pa=window.innerHeight?window.innerHeight:document.body&&document.body.clientHeight?document.body.clientHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:0;ja=F;var Fa=window.localStorage&&window.localStorage.getItem&&window.localStorage.removeItem&&window.localStorage.setItem,ea=[],bb=!1,v="CSS1Compat"!==document.compatMode,
cb=!1,u=!1,d=[],F=navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad|blackberry|rim tablet|android|htc|lg|midp|mmp|mobile|nokia|opera mini|palm|pocket|psp|sgh|smartphone|symbian|treo mini|playstation portable|sonyericsson|samsung|mobileexplorer|palmsource|benq|windows phone|windows mobile|iemobile|windows ce|nintendo wii|\Wsilk\W)/i),yb=null!==F?F[0]:!1,Xb="number"===typeof window.orientation||null!==F,F="ontouchstart"in window;Ca=F?"touchend":"mouseup";$a=F?"touchmove":"mousemove";janrain.settings&&
janrain.settings.storageServer&&Pb("xDomainLocalStorageJanrain",janrain.settings.storageServer,function(){X(document.getElementById("xDomainLocalStorageJanrain"),"load",function(){bb=!0})});W.possible="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9".split(",");var K=navigator.userAgent,f=eb(),Z=/Gecko\//.test(K),Jb=/AppleWebKit\//.test(K);/Chrome\//.test(K);Qa();var Nb=Ra(),Vb=function(a){var a=a||K,d=a.indexOf("OS "),b=0;Ra(a)&&-1<d&&(b=Number(a.substr(d+3).split(" ")[0].split("_")[0]));
return b}(),i=function(){var a=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);return c},d={};janrain.settings&&janrain.settings.permissions&&(d.login=a(janrain.settings.permissions));janrain.settings&&janrain.settings.share&&janrain.settings.share.permissions&&(d.share=a(janrain.settings.share.permissions));return function(a,c){c=c||"login";return!d[c]?!1:0<=d[c].indexOf(a)}}();fb.options={strictMode:!1,key:"source,protocol,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(","),
q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};ya.isCloneable=function(a){return a&&(xa(a)||T(a))};for(var ca=function(){function a(){if("undefined"===
typeof window.orientation)return!1;var a;c(document.body,Q);r=i().content;p();q();document.body.style.padding="0px";document.body.style.margin="0px";"object"===typeof window.onresize&&(a="resize");"object"===typeof window.onorientationchange&&(a="orientationchange");a&&(window.addEventListener(a,function(){Ua(window.orientation,{height:screen?screen.height:0,width:screen?screen.width:0},{height:window.innerHeight,width:window.innerWidth});g()},!1),setTimeout(g,30),window.addEventListener("beforeunload",
function(){window.removeEventListener(a,g,!1)},!1));u.addHandler(function(){d({height:window.innerHeight,width:window.innerWidth},0)});U.addHandler(function(a){Pa=a.height;ja=a.width});window.addEventListener("beforeunload",function(){window.removeEventListener(eventName,g,!1)},!1)}function d(a,b){var c=window.innerHeight,g=window.innerWidth,f=!0,i=!0;c!=a.height&&(f=!1);g!=a.width&&(i=!1);f&&i?20>b?setTimeout(function(){d({height:c,width:g},++b)},100):U.fire({height:c,width:g}):setTimeout(function(){d({height:c,
width:g},0)},100)}function b(){setTimeout(function(){A(r)},20);c(Q,document.body)}function c(a,b){for(var c=0;c<a.style.length;c++){var d=a.style[c];b.style.setProperty(d,a.style.getPropertyValue(d),a.style.getPropertyPriority(d))}}function f(){var a;a=(0===window.orientation||180===window.orientation)&&ja>Pa||(90===window.orientation||-90===window.orientation)&&Pa>ja?!1:!0;var b="landscape";if(a&&(0===window.orientation||180===window.orientation))b="portrait";if(!a&&(90===window.orientation||-90===
window.orientation))b="portrait";return b}function g(){var a=f();A("width=device-width, initial-scale=1, maximum-scale=1");u.fire({orientation:a})}function i(){var a=document.getElementsByTagName("meta"),b;for(b in a)if("viewport"===a[b].name)return a[b];return!1}function p(){if("undefined"===typeof document.getElementsByTagName||i())return!1;var a=document.getElementsByTagName("head")[0],b=document.createElement("meta");b.setAttribute("name","viewport");a.appendChild(b);return!0}function q(){if("undefined"===
typeof document.getElementsByTagName)return!1;document.getElementsByTagName("head");var a=document.createElement("meta");a.setAttribute("name","HandheldFriendly");a.content="true"}function A(a){var b=i();if(!b||b.content==a)return!1;if("undefined"===typeof a){var c=i();document.getElementsByTagName("head")[0].removeChild(c)}b.content=a;return!0}var r,Q=document.createElement("div"),v=navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad|blackberry|rim tablet|android|htc|lg|midp|mmp|mobile|nokia|opera mini|palm|pocket|psp|sgh|smartphone|symbian|treo mini|playstation portable|sonyericsson|samsung|mobileexplorer|palmsource|benq|windows phone|windows mobile|iemobile|windows ce|nintendo wii|\Wsilk\W)/i),
H=null!==v?v[0]:!1,u=I(),U=I();H&&H[0].match(/android|\Wsilk\W/);var Ua=function(){var a=window.orientation,b={height:screen?screen.height:0,width:screen?screen.width:0},c={height:window.innerHeight,width:window.innerWidth},d=!1;return function(e,g,f){var i=!1,A=function(a,b){return a.height>=a.width&&b.height>=b.width||a.width>a.height&&b.width>b.height?!0:!1},p=a===e,q=A(g,b),Q=A(f,c);if(!p&&(!q||!Q))i=!0;!p&&!q&&(d=!0);i&&(d&&!A(g,f)&&(i=f.height,f.height=f.width,f.width=i),Pa=f.height,ja=f.width);
a=e;b={height:g.height,width:g.width};c={height:f.height,width:f.width}}}();return{setElement:function(){return this},onOrientationChange:u,onViewportChange:U,getMobileDevice:function(){return H},getOrientation:function(){return f()},activate:function(){a()},deactivate:function(){b()}}}(),vb=function(a){var d;d="https:"===document.location.protocol?"https://docj27ko03fnu.cloudfront.net/":"http://cdn.rpxnow.com/";d=d.replace(/\/$/,"");return d+"/"+a},F={openId:{aol:{identifier:"aol",flow:"openid1",
width:514,height:550,color:"#0FD6FF",friendlyName:"AOL"},blogger:{identifier:"blogger",flow:"openid1",width:800,height:600,color:"#FF6600",friendlyName:"Blogger"},livejournal:{identifier:"livejournal",flow:"openid1",width:800,height:600,color:"##213368",friendlyName:"LiveJournal"},netlog:{identifier:"netlog",flow:"openid1",width:800,height:600,color:"#000000",friendlyName:"Netlog"},wordpress:{identifier:"wordpress",flow:"openid1",width:800,height:600,color:"#21759b",friendlyName:"WordPress"},openid:{identifier:"openid",
flow:"openid1",width:800,height:600,color:"#f79311",friendlyName:"OpenID"}},openId2:{flickr:{identifier:"https://me.yahoo.com/id",flow:"openid",width:500,height:500,color:"#FF0084",friendlyName:"Flickr"},google:{identifier:"https://www.google.com/accounts/o8/id",flow:"openid",width:500,height:450,color:"#1C69F5",friendlyName:"Google"},hyves:{identifier:"http://hyves.nl/",flow:"openid",width:800,height:600,color:"#659BC8",friendlyName:"Hyves"},myopenid:{identifier:"http://myopenid.com/",flow:"openid",
width:800,height:600,color:"#8cc63f",friendlyName:"MyOpenID"},paypal:{identifier:"https://www.paypal.com/webapps/auth/server",flow:"openid",width:800,height:600,color:"#1A3665",friendlyName:"PayPal"},verisign:{identifier:"http://pip.verisignlabs.com/",flow:"openid",width:945,height:600,color:"#B8004D",friendlyName:"VeriSign"},yahoo:{identifier:"https://me.yahoo.com/id",flow:"openid",width:500,height:500,color:"#650065",friendlyName:"Yahoo!",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},
features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}}},oauth:{facebook:{flow:"facebook",width:1050,height:550,color:"#3B5998",friendlyName:"Facebook",publishSettings:{},shareSettings:{broadcast:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!0,actionLink:!0}},contact:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!0,actionLink:!0}}}},myspace:{flow:"myspace",width:800,height:500,color:"#000000",
friendlyName:"Myspace",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},twitter:{flow:"twitter",width:800,height:500,color:"#35CCFF",friendlyName:"Twitter",shareSettings:{broadcast:{counter:{max:140,urlRegex:/\b(?:[a-z]{1}[-a-z0-9+.]+:(?:\/\/)?)?[-a-z0-9._~@:!$&'()*+,;=]+(?:\.[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\.(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx))(?::\d+)?(?:\/[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\?[-a-z0-9._~@:!$&'()*+,;=%]+)?(?:#[-a-z0-9._~@:!$&'()*+,;=%]+)?\b/ig,
urlLength:23},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}},contact:{counter:{max:140,urlRegex:/\b(?:[a-z]{1}[-a-z0-9+\.]+:(?:\/\/)?)?[-a-z0-9._~@:!$&'()*+,;=]+(?:\.[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\.(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx))(?::\d+)?(?:\/[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\?[-a-z0-9._~@:!$&'()*+,;=%]+)?(?:#[-a-z0-9._~@:!$&'()*+,;=%]+)?\b/ig,urlLength:23},
format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},linkedin:{flow:"linkedin",width:550,height:750,color:"#006699",friendlyName:"LinkedIn",shareSettings:{broadcast:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!1,actionLink:!1}},contact:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},live_id:{flow:"liveid",
width:900,height:600,color:"#666666",friendlyName:"Windows Live ID"},salesforce:{flow:"salesforce",width:800,height:500,color:"#333333",friendlyName:"Salesforce"},orkut:{flow:"orkut",width:800,height:600,color:"#333",friendlyName:"Orkut"},vzn:{flow:"vzn",width:600,height:450,color:"#333",friendlyName:"VZnet"},foursquare:{flow:"foursquare",width:950,height:550,color:"#333",friendlyName:"Foursquare"},sinaweibo:{flow:"sinaweibo",width:950,height:550,color:"#333",friendlyName:"Sina Weibo"},tumblr:{flow:"tumblr",
width:950,height:550,color:"#333",friendlyName:"Tumblr"},microsoft_live_connect:{flow:"microsoft_live_connect",width:950,height:550,color:"#333",friendlyName:"Microsoft Live Connect"},renren:{flow:"renren",width:950,height:550,color:"#333",friendlyName:"Renren"},disqus:{flow:"disqus",width:950,height:550,color:"#333",friendlyName:"Disqus"},soundcloud:{flow:"soundcloud",width:950,height:550,color:"#333",friendlyName:"SoundCloud"},vk:{flow:"vk",width:950,height:550,color:"#333",friendlyName:"VK"},mixi:{flow:"mixi",
width:950,height:550,color:"#333",friendlyName:"Mixi",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}},contact:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},email:{color:"#009ddc",shareSettings:{email:{providers:{google:!0,yahoo:!0},counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,
title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}}}},ia={},ra=["openId","openId2","oauth"];0<ra.length;){var Na=ra.pop(),Ba;for(Ba in F[Na])ia[Ba]=F[Na][Ba]}var p=function(){var a=[];return{log:function(d){var b={};b.id=a.length+1;b.message=d;a.push(b);return this},show:function(){if(0!=a.length){for(var d in a)if("undefined"!==typeof a[d].id){var b=a[d];"object"===typeof console&&("function"===typeof console.error?console.error("WARNING ID:"+b.id+" MESSAGE: "+b.message):"function"===
typeof console.log&&console.log("WARNING ID:"+b.id+" MESSAGE: "+b.message))}a=[]}}}}();_debugAllFiredEvents=!1;Ga.prototype.addHandler=function(a){this.eventHandlers.push(a);return this.eventHandlers.length-1};Ga.prototype.removeHandler=function(a){return this.eventHandlers[a]?(this.eventHandlers[a]=null,!0):!1};Ga.prototype.fire=function(a){for(var d=this.eventHandlers.length,b=0;b<d;b++)try{if("function"===typeof this.eventHandlers[b])this.eventHandlers[b](a)}catch(c){p.log(c),p.show()}if(a&&(_debugAllFiredEvents||
xa(a)&&"save"in a&&!0===a.save))delete a.save,this.firedEvents.push({event:this,args:a})};"undefined"===typeof janrain.events&&(janrain.events={});var R;R||(R={});(function(){function a(a){return 10>a?"0"+a:a}function d(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var b=p[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(a,c){var f,p,r,v,t=g,u,D=c[a];D&&"object"===typeof D&&"function"===typeof D.toJSON&&(D=D.toJSON(a));
"function"===typeof q&&(D=q.call(c,a,D));switch(typeof D){case "string":return d(D);case "number":return isFinite(D)?""+D:"null";case "boolean":case "null":return""+D;case "object":if(!D)return"null";g+=i;u=[];if("[object Array]"===Object.prototype.toString.apply(D)){v=D.length;for(f=0;f<v;f+=1)u[f]=b(f,D)||"null";r=0===u.length?"[]":g?"[\n"+g+u.join(",\n"+g)+"\n"+t+"]":"["+u.join(",")+"]";g=t;return r}if(q&&"object"===typeof q){v=q.length;for(f=0;f<v;f+=1)"string"===typeof q[f]&&(p=q[f],(r=b(p,D))&&
u.push(d(p)+(g?": ":":")+r))}else for(p in D)Object.prototype.hasOwnProperty.call(D,p)&&(r=b(p,D))&&u.push(d(p)+(g?": ":":")+r);r=0===u.length?"{}":g?"{\n"+g+u.join(",\n"+g)+"\n"+t+"}":"{"+u.join(",")+"}";g=t;return r}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=
Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var c=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,i,p={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},q;"function"!==typeof R.stringify&&(R.stringify=function(a,c,d){var e;i=g="";if("number"===
typeof d)for(e=0;e<d;e+=1)i+=" ";else"string"===typeof d&&(i=d);if((q=c)&&"function"!==typeof c&&("object"!==typeof c||"number"!==typeof c.length))throw Error("JSON.stringify");return b("",{"":a})});"function"!==typeof R.parse&&(R.parse=function(a,b){function d(a,c){var e,g,f=a[c];if(f&&"object"===typeof f)for(e in f)Object.prototype.hasOwnProperty.call(f,e)&&(g=d(f,e),void 0!==g?f[e]=g:delete f[e]);return b.call(a,c,f)}var e,a=""+a;c.lastIndex=0;c.test(a)&&(a=a.replace(c,function(a){return"\\u"+
("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?d({"":e},""):e;throw new SyntaxError("JSON.parse");})})();janrain.events.onCustomizationChange||(janrain.events.onCustomizationChange=I());janrain.events.onProviderLoginStart||(janrain.events.onProviderLoginStart=
I());janrain.events.onProviderLoginComplete||(janrain.events.onProviderLoginComplete=I());janrain.events.onProviderLoginError||(janrain.events.onProviderLoginError=I());janrain.events.onProviderLoginSuccess||(janrain.events.onProviderLoginSuccess=I());janrain.events.onProviderLoginToken||(janrain.events.onProviderLoginToken=I());janrain.events.onProviderLogoutStart||(janrain.events.onProviderLogoutStart=I());janrain.events.onProviderLogoutComplete||(janrain.events.onProviderLogoutComplete=I());Ob();
Ba=new function(){function a(){function a(){return{twoColumn:{actionText:"Sign in using your account with",providersPerPage:6},oneColumn:{actionText:"Sign in with",width:200},oneRow:{actionText:"Sign in with"},footerHeight:10,headerHeight:20}}function b(){if(sa){var a=document.createElement("div");a.style.backgroundColor=da?"aqua":Oa;a.style.width=C+"px";a.style.height=Ga+"px";a.style.position="absolute";a.style.left="0px";a.style.paddingLeft=n+"px";a.style.paddingRight=n+"px";a.style.paddingBottom=
n+"px";a.style.bottom="0px";a.style.fontSize="10px";a.style.textAlign="left";a.style.color=Z;a.style.fontFamily=Sa;L(a,null,0,0,y,y);var d=document.createElement("div");d.appendChild(document.createTextNode(janrain.settings.translate.POWERED_BY_PREFIX||"Powered by "));d.style.paddingLeft="1px";var h=document.createElement("a");h.setAttribute("href","http://www.janrain.com/products/engage/engage-introduction?utm_source="+fb(janrain.settings.appUrl).host+"&utm_medium=partner&utm_campaign=attribution");
h.setAttribute("target","_blank");h.appendChild(document.createTextNode("Janrain"));d.appendChild(h);a.appendChild(d);Va=a}w=g();a=document.createElement("div");a.style.backgroundColor=da?"orange":Oa;a.className="janrainHeader";a.style.fontSize=ea+"px";a.style.color=Z;a.style.position="relative";a.style.height=ta+"px";40===ua&&(a.style.cssFloat="left");a.style.left=40===ua?"-6px":"-5px";a.style.paddingLeft=n+"px";a.style.paddingRight=n+"px";a.style.paddingTop=n+"px";a.style.paddingBottom="0px";a.style.whiteSpace=
"nowrap";a.style.width=40===ua?"81px":C+"px";a.style.zIndex="100";40===ua?L(a,null,y,0,0,y):L(a,null,y,y,0,0);40===ua&&(a.style.marginTop="-3px");a.style.textAlign="one column"===m?"center":"left";d=e();fa=document.createElement("div");fa.style.paddingLeft="1px";fa.style.fontFamily=Sa;" "!==d&&fa.appendChild(document.createTextNode(d));a.appendChild(fa);Ua=a;s=document.createElement("div");s.className="janrainContent";s.style.width=C+"px";s.style.height=j()+"px";s.style.paddingLeft=n+"px";s.style.paddingRight=
n+"px";s.style.boxSizing="content-box";40===ua&&(s.style.paddingTop=n-1+"px");u||(s.style.backgroundColor=Oa);u||(s.style.border=ya?"1px solid "+xa:"1px solid "+Oa);s=L(s,y);u||(s.style.overflow="hidden");s.style.position=ya?"relative":"absolute";ab=D();2==w||0==w?(Ja=(new t).setSide("right").create(),Ka=(new t).setSide("left").create()):(Ja=(new t).setSide("top").create(),Ka=(new t).setSide("bottom").create());a=document.createElement("div");a.id="janrainView";" "!==e()&&a.appendChild(Ua);u&&(d=
H("blank"),d.style.display="none",a.appendChild(d));a.appendChild(ab);!u&&Ja&&Ka&&(a.appendChild(Ja),a.appendChild(Ka));0<w&&sa&&a.appendChild(Va);s.appendChild(a);i("customizable_auth_widget_styling")||c(s);cb||p.show()}function c(a){function b(a){var c="string"===typeof a.getAttribute("style")?a.getAttribute("style"):null;c&&(c.cssText&&(c=c.cssText),a.style.setAttribute?a.style.setAttribute("cssText",c.replace(/(((?!!important).)+?);/g,"$1 !important;")):a.setAttribute("style",c.replace(/(((?!!important).)+?);/g,
"$1 !important;")))}for(var d=a.getElementsByTagName("*"),h=0,e=d.length;h<e;h++)"janrainProviderPages"===d[h].id||"janrainSlideControl"===d[h].className||"janrainSlideControl"===d[h].parentNode.className||b(d[h]);b(a)}function e(){if(J&&(J==a().twoColumn.actionText||J==a().oneColumn.actionText||J==a().oneRow.actionText))wa=!1;return wa&&J?J:d.translate.HEADER?d.translate.HEADER:"two column"===m?a().twoColumn.actionText:"one column"===m?a().oneColumn.actionText:"one row"===m?a().oneRow.actionText:
J}function g(){var a=m;if("default"==a||"two column"==a)return 2;if("one column"==a)return 1;if("one row"==a)return 0}function j(){var a=" "===J?0:ta+n,b=sa&&"one row"!==m?Ga+n:0;return q()+a+b}function k(){var a=parseInt(ab.style.left),b=parseInt(ab.style.top),c;1==w?parseInt(ab.style.height):parseInt(ab.style.width);2==w&&(c=(C-3*n-(2==w?10:0))/w);if("one column"===m){if(" "===J&&(b+=11,0<b||-9<=b))return 0;if(9>b)return 1;if(0<b||b>=-(ta-(n+1)))return 0}0==w&&(c=C-100);if(0>a&&a<-c)return 1;if(0<
a||a>=-n)return 0}function q(){if("two column"===m)var a=N/2;"one column"===m&&(a=N);"one row"===m&&(a=1);var b="one row"===m?0:2*a,c="one column"===m?3*n:0;if(7===f||6===f||f&&v){if("two column"===m&&(c=n,7===f||6===f))c=2*n;if("one column"===m&&(c=3*n,(7===f||6===f)&&!v))c+=n;if("one row"===m&&(7===f||6===f))c=n}"one column"===m&&La<=N&&(c=f&&v?c+2*n:c-2*n);return x*a+n*(a+1)+b+c}function t(){function a(){var b;j="over";var Za=k();if(0==Za&&"left"===h||0==Za&&"top"===h||1==Za&&"right"===h||1==Za&&
"bottom"===h)return this.style.cursor="default",B.onclick="",!1;var e=this;setTimeout(function(){if(1===i){if("over"!==j)return!1;f&&(d.style.display="block");g.style.display="block";B.onclick=c;e.style.cursor="pointer";var a=document.getElementById("janrainProviderPages");b="top"==h||"bottom"==h?parseInt(a.style.top):parseInt(a.style.left);var Za="right"===h||"bottom"===h?b-Ea:b+Ea;"top"===h||"bottom"===h?a.style.top=Za+"px":a.style.left=Za+"px";i=2}},f?50:100)}function b(){var a;j="out";var c=k();
if(1==c&&"right"===h||0==c&&"left"===h||0==c&&"top"===h||1==c&&"bottom"===h)return!1;setTimeout(function(){if(2===i){if("out"!==j)return!1;f&&(d.style.display="none");g.style.display="none";var b=document.getElementById("janrainProviderPages");a="top"==h||"bottom"==h?parseInt(b.style.top):parseInt(b.style.left);var c="right"===h||"bottom"===h?a+Ea:a-Ea;"top"===h||"bottom"===h?b.style.top=c+"px":b.style.left=c+"px";i=1}},f?200:400)}function c(){g.style.display="none";B.style.cursor="default";A(h,function(a){E(a);
i=1})}var d,h,e,g,o={left:"-33px -16px",right:"0px -16px",top:"-16px -33px",bottom:"-16px 0px"},j="",i=1,B;return{setSide:function(a){h=a;return this},create:function(){var f;if(La<=N)f=!1;else{f=document.createElement("div");f.setAttribute("id","janrainShim_"+h);f.style.background="black";"top"===h||"bottom"===h?(f.style.height="19px",f.style.width="100%"):(f.style.height="100%",f.style.width="17px");da?(f.style.filter="alpha(opacity=100)",f.style.opacity=100):(f.style.filter="alpha(opacity=0)",
f.style.opacity=0);f.style.position="absolute";f.style.zindex="99";if("top"===h||"bottom"===h)f.style.left="0";f.style[h]=n+"px";f.style.top="one column"!==m?n+1+"px":"top"===h?"10px":"0px";f.style.display="none";d=f;f=document.createElement("div");f.style.backgroundColor=da?"green":Oa;f.className="janrainSlideControllerMask";f.style.position="absolute";"one column"!==m&&(f.style.width=n+"px",f.style.height="100%",f.style.top="0px",f.style[h]="0px",f.style.borderWidth="1px","right"===h&&(!sa||"one row"===
m)&&L(f,null,0,0,y,0),"left"===h&&(!sa||"one row"===m)&&L(f,null,0,0,0,y),"right"===h&&" "===J&&L(f,null,0,y,y,0),"left"===h&&" "===J&&L(f,null,y,0,0,y));"one column"===m&&(f.style.height=n+"px",f.style.fontSize="0px",f.style.width="100%",f.style.padding="0px",f.style[h]="0px","top"===h&&" "===J?L(f,null,y,y,0,0):"bottom"===h&&!sa&&L(f,null,0,0,y,y));"one row"===m&&(f.style.height="105.5%");e=f;f=document.createElement("div");f.setAttribute("id","janrainArrow_"+h);f.style.background="url("+vb("rel/img/ee9d3aa7c5896c69488b5941ef31c7bc.png")+
") no-repeat scroll "+o[h]+" transparent";f.style.height="19px";f.style.width="17px";f.style.position="absolute";if("top"===h||"bottom"===h)f.style.left=C/2+"px";f.style[h]=n+"px";f.style.top="one column"!==m?q()/2-2*n+1+"px":"top"===h?"10px":"0px";f.style.display="none";g=f;f=document.createElement("div");f.className="janrainSlideControl";f.style.backgroundColor=da?"purple":"transparent";"one column"===m?(f.style.width=C+4+"px",f.style.left="3px","top"==h?(f.style.height=n+"px",f.style.top=ta+n+
"px"," "===J&&(f.style.left="0px",f.style.width=C+10+"px")):(f.style.height="20px",f.style.bottom=(sa?Ga+n:0)+"px",L(f,null,0,0,y,y))):(f.style.width="right"===h?"20px":"0px",f.style[h]="0px",f.style.height=q()-(n*(" "===J)?1:2)+"px",40===ua&&"one row"===m&&"left"===h&&(f.style.left=ra+"px"),"right"===h&&!sa&&L(f,null,0,0,y,0),"left"===h&&!sa&&L(f,null,0,0,0,y));f.style.position="absolute";f.style.zIndex="100";f.style.cursor="pointer";f.onmouseover=a;f.onmouseout=b;f.onclick=c;B=f;B.appendChild(e);
B.appendChild(d);B.appendChild(g);f=B}return f}}}function A(a,b){var c=document.getElementById("janrainProviderPages"),h=new Wb;if("top"===a||"bottom"===a){if(" "===J)var d=-(q()-x),e=0;else d=-(q()-x-ta-n),e=ta+n;50===x&&(d-=20);f&&v&&(d+=n," "!==J&&(e+=n));h.setElement(c).setAcceleration("sinusoidal").setDuration(100*N).startPosition(parseInt(c.style.top)).endPosition("bottom"===a?d:e).setDirection("vertical").setCallback(function(){b(a)}).animate()}else f&&v?(d=-(C-2*n-39),"one row"===m&&(d=-(ra-
1*n))):(d=-(C-32),"one row"===m&&(d=-(C-24))),h.setElement(c).setAcceleration("sinusoidal").setDuration(800).startPosition(parseInt(c.style.left)).endPosition("right"==a?d:n).setDirection("horizontal").setCallback(function(){b(a)}).animate()}function D(){var a,b;function c(h){h=h.touches[0];"one column"===m?a=h.pageY:b=h.pageX}function h(c){c.preventDefault();c=c.touches[0];c="one column"===m?a-c.pageY:b-c.pageX;if(35<c||-35>c){var d;d="one column"===m?0<c?"bottom":"top":0<c?"right":"left";var f=
k(),e=!0;"bottom"===d&&f+1==i&&(e=!1);"top"===d&&0==f&&(e=!1);"left"===d&&0==f&&(e=!1);"right"===d&&f+1==i&&(e=!1);e&&("one column"===m?g.style.top=parseInt(g.style.top)-c+"px":g.style.left=parseInt(g.style.left)-c+"px",A(d,function(){E()}),g.ontouchmove="")}}function d(){g.ontouchmove=h}var e,g,o,j,i,B=w,l=[];j=G();i=u?1:Math.ceil(La/N);2<i&&p.log("Either reduce the number of providers, or increase the setting for providersPerPage.");g=document.createElement("div");g.setAttribute("id","janrainProviderPages");
u&&(g.className="janrainConfigureMode");g.style.paddingTop=(6===f||7===f)&&f&&v?2*n:n+"px";if((6===f||7===f)&&!v)g.style.paddingTop=n+4+"px";1<i&&(g.ontouchstart=c,g.ontouchmove=h,g.ontouchend=d);40===ua&&"one row"===m?g.style.left=ra+n+"px":f&&v?"one column"!==m&&(g.style.left=n+"px"):g.style.left=n+"px";40===ua&&"one row"===m&&(g.style.cssFloat="left");40===ua&&"one row"===m&&(g.style.marginTop="1px");"one column"===m&&(g.style.top=(f&&v?1:0)+ta+n+"px");"one row"!==m&&" "===J&&(g.style.top="0px");
"one column"===m&&" "===J&&(g.style.top="0px");e=C*i;g.style.position=f&&v&&"one column"===m?"relative":"absolute";"two column"===m&&!(La<=N)&&(g.style.width=e+"px");"one row"===m&&(g.style.width=(!0===u?C+n:2*C)+"px");u&&(B=0);b=0;a=0;for(var zb=0;zb<i;zb++){for(o=0;o<=B;o++)l[o]=document.createElement("ul"),l[o].className="providers",l[o].id="janrainProviders_"+o,1<B&&(l[o].style.cssFloat="left"),1<B&&(l[o].style.styleFloat="left"),l[o].style.listStyleType="none",l[o].style.marginTop="0px",l[o].style.marginLeft=
"0px",l[o].style.marginRight="0px",l[o].style.marginBottom="0px",l[o].style.padding="0px";e=document.createElement("div");e.className="janrainPage";e.setAttribute("pageIndex",zb);f&&v&&1===i&&(e.style.width="110%");for(o=0;o<B;o++)e.appendChild(l[o]);if(u||1>w)for(o=0;o<=B;o++)e.appendChild(l[o]);for(var q=j.length%2,r=u?La:N,s=0;s<r&&!(0==j.length);s++){if(2==B)var t=1==q?l[j.length%2?0:1]:l[j.length%2];if(1==B||0==B)t=l[0];o=j.shift();t.appendChild(o)}g.appendChild(e)}return g}function E(a){0==
k()?("left"===a&&(Ka.style.width=n+"px",Ja.style.display="block",Ja.style.width="20px"),"top"===a&&(Ja.style.height=n+"px",Ka.style.display="block",Ka.style.height="20px")):("right"===a&&(Ja.style.width=n+"px",Ka.style.display="block",Ka.style.width="20px"),"bottom"===a&&(Ka.style.height=n+"px",Ja.style.display="block",Ja.style.height="20px"))}function G(){for(var a=[],b=0;b<La;b++){var c=H(la[b],b+1);a.push(c)}if("one column"==m){var h=a.slice(0),b=function(){var a=-Infinity,b,c,d=function(){b=h[c].children[0].children[1];
return void 0!==b};for(c=0;c<h.length;c++)d()&&(a=Math.max(a,b.offsetWidth));for(c=0;c<h.length;c++)d()&&(b.style.width=a+"px")};janrain.events.onModalOpen?janrain.events.onModalOpen.addHandler(b):janrain.events.onAuthWidgetContentPlaced.addHandler(b);janrain.events.onCustomizationChange.addHandler(b)}return a}function F(a,b){b.style.cursor="pointer";b.setAttribute("id","janrain-"+a);b.setAttribute("role","button");"one row"===m?b.style.background="transparent":("gradient"===Ta&&Fb(b,"bottom, #eeeeee, #ffffff"),
"gray"===Ta&&(b.style.backgroundColor="#eeeeee"),"white"===Ta&&(b.style.backgroundColor="#ffffff"));X(b,"mouseover",function(){eb();"one row"===m?b.style.background="transparent":(b.style.backgroundColor="#E3E3E3",b.style.backgroundImage="")});X(b,"mouseout",function(){eb();"one row"===m?b.style.background="transparent":("gradient"===Ta&&Fb(b,"bottom, #eeeeee, #ffffff"),"gray"===Ta&&(b.style.backgroundColor="#eeeeee"),"white"===Ta&&(b.style.backgroundColor="#ffffff"))});cb||M(b,a);return b}function H(a,
b){function c(b){if(ia&&ia[a])return ia[a][b]}var h=document.createElement("li");h.style.listStyle="none";0==w&&!1===u&&(h.style.cssFloat="left");0==w&&!1===u&&(h.style.styleFloat="left");h.style.height=f&&v?x+2:x+"px";if("two column"==m){var d=u?3*n:La<=N?0:3*n;h.style.width=6===f||eb&&v?(C-d-4*n)/w+"px":(C-d-(2==w?10:0))/w+"px"}h.style.marginTop="0px";if("one column"==m){if(7==f||6==f)h.style.marginTop="-1px";f&&v?h.style.marginRight="0px":h.style.width=C-n/2+"px";h.style.marginLeft="0px"}else h.style.marginRight=
n+"px";0==w&&(h.style.width=x+"px");h.style.marginBottom=(7===f||6===f||f&&v?3:n)+"px";h.style.position="relative";0!=w&&(h.style.border="1px solid "+ma);0!=w&&L(h,ha);var d=document.createElement("a"),e=document.createElement("span"),g=document.createElement("span");"undefined"!==typeof b&&(d.tabIndex=b);d.style.fontFamily="Helvetica, lucida grande, Verdana, sans-serif";d.style.fontSize="12px";d.style.lineHeight="14px";d.style.marginLeft="auto";d.style.marginRight="auto";d.href="javascript:void(0);";
d.style.textDecoration="none";d.style.display="block";d.style.paddingLeft="5px";d.style.paddingRight="5px";d.style.textAlign="left";g.className="janrain-provider-text-color-"+a;g.style.fontFamily=Sa;g.style.cursor="pointer";g.style.marginLeft="7px";g.style.textAlign="left";30==x&&(e.className="janrain-provider-icon-24 janrain-provider-icon-"+a,e.style.marginTop="3px",g.style.marginTop="9px",g.style.verticalAlign="top",g.style.display="inline-block");50==x&&(e.className="janrain-provider-icon-32 janrain-provider-icon-"+
a,e.style.marginTop="9px",e.style.backgroundColor="transparent",g.style.marginTop="16px",g.style.fontSize="16px",g.style.lineHeight="20px",g.style.verticalAlign="top",g.style.display="inline-block");"one column"==m&&(d.style.textAlign="center");"two column"==m&&275>C&&(g.style.textIndent="-9999px",g.style.marginLeft=0,d.style.textAlign="center");2==w&&(30==x&&(d.style.width="auto"),50==x&&(e.style.marginLeft="5px"));if(0==w&&(30==x||50==x)){var e=document.createElement("a"),o=document.createElement("span"),
j=document.createTextNode(a);"undefined"!==typeof b&&(e.tabIndex=b);e.className="janrain-provider-icon-32 janrain-provider-icon-bg janrain-provider-icon-"+a;e.style.marginTop="0px";e.href="javascript:void(0);";e.style.textDecoration="none";e.style.display="block";o.style.display="inline-block";o.style.textIndent="-9999px"}if(c("customSAML")||c("customOpenid")){var i=c("friendlyName")||"Sign In",B=document.createTextNode(i);if(1==w||2==w){if(30==x||50==x)e.style.backgroundImage="url("+c("largeIcon")+
")",g.appendChild(B),g.style.color=c("color")||"#000000";15<=B.length&&(B.textContent=B.textContent.substr(0,15))}if(0==w&&(30==x||50==x))j=document.createTextNode(i),e.style.backgroundImage="url("+c("largeIcon")+")";f&&10>f&&(e.style.backgroundImage="none",e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+c("largeIcon")+"')")}else if("blank"!==a&&(1==w||2==w))30==x&&(e.style.backgroundColor="transparent",g.innerHTML=ia[a].friendlyName),50==x&&
(e.style.backgroundColor="transparent",g.innerHTML=ia[a].friendlyName);6===f&&"one row"!==m&&(i=document.createElement("div"),i.style.height=e.style.height,i.style.width="90px",i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=crop,src='"+e.src+"')",e.style.filter="alpha(opacity=0)",i.appendChild(e),h.appendChild(i));0==w?(h.appendChild(e),e.appendChild(o),o.appendChild(j)):(h.appendChild(d),d.appendChild(e),d.appendChild(g));return F(a,h)}function I(a,b){var c=
document.createElement("a"),h=d.translate.SIGN_IN_AS||"Sign in as {name}",h=h.replace("{name}",b),e=document.createElement("span"),h=document.createTextNode(h),g=document.createElement("span");e.className="janrain-provider-text-color-"+a;c.href="javascript:void(0);";c.style.textDecoration="none";c.style.display="block";if("customopenid"===a){var o=document.createElement("span");document.createElement("span");o.className="janrain-provider-icon-32 janrain-provider-icon-"+a;o.style.backgroundImage="url("+
Ia.largeIcon+")";e.style.color=Ia.customOpenIdProviderColor||"#000000";10>f&&(o.style.backgroundImage="none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ia.largeIcon+"')")}else"customsaml"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-32 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Wa.largeIcon+")",e.style.color=Wa.customSAMLProviderColor||"#000000",10>f&&(o.style.backgroundImage=
"none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Wa.largeIcon+"')")):(o=document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a);g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily=Sa;var i=document.createElement("div"),B=7.5*h.length+30,l=j();i.style.fontSize="16px";i.style.height="100%";i.style.position="relative";if(0==w||120>l)15<=h.length&&(i.style.fontSize="14px",B=
7*h.length+30),20<=h.length&&(i.style.fontSize="12px",B=6*h.length+30),24<=h.length&&(i.style.fontSize="10px",B=5*h.length+50),30<=h.length&&(h.textContent=h.textContent.substr(0,26)+"...",B=162);i.style.width=B+"px";if(0==w||116>l)"customopenid"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Ia.largeIcon+")",e.style.color=Ia.customOpenIdProviderColor||"#000000",f&&10>f&&(o.style.backgroundImage=
"none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ia.largeIcon+"')")):"SAML"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Wa.largeIcon+")",e.style.color=Wa.customSAMLProviderColor||"#000000",f&&10>f&&(o.style.backgroundImage="none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+
Wa.largeIcon+"')")):(o=document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a);30===x&&(g.style.marginTop="9px",g.style.fontSize="12px",o.style.marginTop="3px");50===x&&(g.style.marginTop="16px",o.className="janrain-provider-icon-32 janrain-provider-icon-"+a,o.style.marginTop="9px");"one row"===m&&30===x&&(o.style.marginTop="-1px");g.appendChild(e);e.appendChild(h);o.style.marginRight="10px";o.style.verticalAlign="top";c.style.overflow="hidden";c.style.position=
"relative";c.style.height=("one row"!==m?x:25)+"px";c.style.marginBottom="one row"===m?"-4px":"4px";"one row"===m&&(c.style.top="-4px");c.style.left="0px";f&&v&&(c.style.marginRight="5px");f&&v&&(c.style.marginLeft="3px");c.style.border="1px solid "+ma;L(c,ha);"customopenid"===a&&(c.style.color=ia[a].color);6===f||7===f||f&&v?i.style.left="10px":i.style.margin="0 auto";i.appendChild(o);i.appendChild(g);0==w&&(i.style.paddingTop="2px",g.style.marginTop="6px");0==w||116>l?(c.appendChild(i),i.style.width=
"auto"):(50===x&&parseInt(c.style.height),g.style.cssFloat="none",g.style.styleFloat="none",c.appendChild(o),c.appendChild(g));return F(a,c)}function M(a,b){X(a,"click",function(){O(b)})}function O(a){var b=ia[a],c={appUrl:d.appUrl,mobileDevice:yb,language:d.language,popup:Ya,tokenUrl:Ma||d.tokenUrl||window.location.href,facebookPermissions:ga,forceReauth:ba,widgetType:"auth",tokenAction:Aa,bpChannel:Na,customOpenid:$a,customSAML:Ha,customOpenidOpxblob:d.customOpenidOpxblob};b.name=a;new Pa(b,c,function(){aa||
(db=setTimeout(function(){Fa(b)},300))})}function K(){var a=document.createElement("div");a.style.position="absolute";a.style.top="0px";a.style.left="0px";a.style.width=C+"px";a.style.zIndex="102";a.style.textAlign="center";a.style.padding=n+"px";a.style.backgroundColor="transparent"===Oa?"#ffffff":Oa;a.style.height=j()-(f&&v?0:2*n)+"px";L(a,y);return a}function P(a){var b=document.createElement("a"),c=document.createTextNode(d.translate.USE_ANOTHER_ACCOUNT||"switch accounts");b.setAttribute("class",
"janrainSwitchAccountLink");b.setAttribute("href","");b.style.fontSize="12px";b.style.fontFamily=Sa;b.style.color=Z;b.onclick=a;b.appendChild(c);return b}function Q(){return"modal"===z?document.getElementById("janrainModal"):"embed"===z?document.getElementById("janrainEngageEmbed"):!1}function R(){var a=parseInt(s.style.width);return a=a+2*n+2}function T(){var a=Q();null!==a&&"object"===typeof s&&s.parentNode===a&&a.removeChild(s);janrain.events.onProviderLoginStart.removeHandler(Xa)}function U(){var a=
"";"object"===typeof l&&(a=l.getState());return{type:z,width:R(),fontFamily:Sa,fontSize:ea,fontColor:Z,backgroundColor:Oa,borderColor:xa,borderRadius:y,format:m,providersPerPage:N,providers:la,buttonBackgroundStyle:Ta,buttonBorderColor:ma,buttonBorderRadius:ha,actionText:e(),showAttribution:sa,modalState:a}}function V(a){m=r("string",["default","two column","one column","one row"],"two column",a);"default"===m&&(m="two column");"one row"==a&&(y=r("number",[0,10],5,y));na()}function W(a){"two column"===
m&&(C=r("number",[225,600],380,a));"one column"===m&&(C=r("number",[160,600],200,a));"one row"===m&&(x=30,a=La<=N?n*(parseInt(N)-1):n*(parseInt(N)+2),40===ua&&(a+=ra-n),C=x*N+a);if(("two column"===m||"one column"===m)&&!u)C=C-2*n-2;f&&v&&(C=C+2*n+2);"one row"!==m&&(x=380<C?50:30)}function Y(b){"string"===typeof b&&(wa=!0,J=r("text",null,J,b)," "===J?y=r("number",[0,5],5,y,!0):ta="two column"!==m?a().headerHeight-5:a().headerHeight)}function $(a){Ta=r("string",["gray","white","gradient"],"gradient",
a)}function ca(a){ma=r("color",null,"#CCCCCC",a)}function ja(a){Oa=r("color",null,"#ffffff",a)}function ka(a){"undefined"===typeof a&&(a=5);y=" "===J||!sa||"one row"===m?r("number",[0,5],5,a,!0):r("number",[0,10],10,a)}function oa(a){sa=r("boolean",null,!0,a);j();y=a?r("number",[0,10],5,y,!0):r("number",[0,5],5,y,!0)}function qa(a){xa=r("color",null,"#C0C0C0",a)}function na(){"two column"===m&&(ea=18);if("one column"===m||"one row"===m)ea=14}function Ba(a){Z=r("color",null,"#333333",a)}function Ca(a){if("object"==
typeof a){w=g();for(var b=0,c=a.length;b<c;b++)ia[a[b]]||(p.log(a[b]+" is not a valid provider: removing."),a.splice(b,1),--b,--c);la=a;La=a.length;"object"===typeof l&&l.setHeight(j()-2*n).refresh()}}function Da(a){"two column"===m&&(N=r("number",[4,6,8],6,a));"one column"===m&&(N=r("number",[1,6],6,a));"one row"===m&&(N=Ab?La:r("number",[4,8],6,a),W(C))}function Fa(a){var b=document.createTextNode(d.translate&&d.translate.SIGNING_IN?d.translate.SIGNING_IN:"Signing in ..."),c=document.createElement("div");
va=K(a.name);c.appendChild(b);c.style.position="absolute";c.style.marginTop="-8px";c.style.top="50%";c.style.textAlign="center";c.style.width="100%";va.appendChild(c);s&&s.appendChild(va)}var da=!1,C=380,wa=!1,Sa="Helvetica, lucida grande, Verdana, sans-serif",ea=18,Z="#666666",Oa="#ffffff",xa="#C0C0C0",y=10,s,fa,m="two column",w,ya,N=6,la=["aol","google","yahoo","openid"],La=4,ma="#CCCCCC",ha=5,Ta="gradient",x=30,ta=a().headerHeight,ua=60,ra=89,Ga=a().footerHeight,n=5,Ea=10,J="Sign in using your account with",
va,ab,Ja,Ka,sa=!0,Qa=!1,Ra=!1,Ua,Va,Xa;Xa=janrain.events.onProviderLoginStart.addHandler(function(a){za("login_tab",a.provider,1)});return{build:b,setFormat:function(b){b&&V(b);"two column"!==m&&(ta=a().headerHeight-5);"two column"===m&&(N=a().twoColumn.providersPerPage,ta=a().headerHeight);return this},setActionText:function(a){"string"===typeof a&&Y(a);return this},setFontSize:function(a){a&&na(a);return this},setFontFamily:function(a){a&&a&&(Sa=a);return this},setFontColor:function(a){a&&Ba(a);
return this},setButtonBorderColor:function(a){a&&ca(a);return this},setButtonBorderRadius:function(a){if("string"==typeof a||"number"==typeof a)ha=r("number",[0,20],5,a);return this},setButtonBackgroundStyle:function(a){a&&$(a);return this},setWidth:function(a){("string"==typeof a||"number"==typeof a)&&W(a);return this},refresh:function(){T();var a=Q();b();var c=S("expected_tab");c&&!bb?pa("expected_tab",c):(null!==a&&"object"===typeof s&&a.appendChild(s),"object"===typeof l&&l.setHeight(parseInt(s.style.height)+
2).refresh());cb&&"object"===typeof l&&l.setHeight(parseInt(s.style.height)+2).refresh();janrain.events.onCustomizationChange.fire(U());return this},remove:function(){T();return this},setRowHeight:function(a){if(0!==g())return this;a||(a=60);oneRowHeaderHeight=r("number",[40,60,90],60,a);40===oneRowHeaderHeight&&(x=30,ua=40);60===oneRowHeaderHeight&&(x=30);90===oneRowHeaderHeight&&(x=50);return this},setHeight:function(a){"object"==typeof s&&(s.style.height=a+"px");return this},setBackgroundColor:function(a){a&&
ja(a);return this},setBorderColor:function(a){a&&qa(a);return this},setBorderRadius:function(a){("string"==typeof a||"number"==typeof a)&&ka(a);return this},setProviders:function(a){"object"==typeof a&&Ca(a);return this},setProvidersPerPage:function(a){if("string"==typeof a||"number"==typeof a)Da(a),"object"===typeof l&&l.setHeight(j()).refresh("janrainModal");return this},setShowAttribution:function(a){"boolean"===typeof a&&oa(a);return this},setPreviewMode:function(a){"boolean"===typeof a&&(cb=
a);return this},setProviderFlow:function(a,b){return M(a,b)},triggerFlow:function(a){return O(a)},setNoReturnExperience:function(a){"boolean"===typeof a&&(Qa=a);return this},setNoReturnExperienceSwitchAccountLink:function(a){"boolean"===typeof a&&(Ra=a);return this},setConfigureMode:function(a){"boolean"===typeof a&&(u=a,w=g());return this},embed:function(a){if((ya=a)&&"object"==typeof s)s.style.position="relative";return this},getContentsDiv:function(){return s},getErrorPage:function(a,b){var c=
document.createTextNode(b.msg),h=document.createElement("div");h.appendChild(c);h.style.color=Z;h.style.fontSize=ea+"px";h.style.width="100%";var d=K(a);d.appendChild(h);d.appendChild(P(function(){s.removeChild(d);s.removeChild(va);ba=!0;return!1},a));s.appendChild(d);return s},getReturnExperience:function(a,b){if(cb||Qa||-1===la.indexOf(a))return s;var c=I(a,b),h=K(a),d=document.createElement("div"),e=function(){ba=bb=!0;s.removeChild(h);return!1};d.style.position="relative";d.style.top="50%";30===
x&&(d.style.marginTop="-25px");50===x&&(d.style.marginTop="-35px");0==w&&(d.style.top="0",d.style.marginTop="0");h.id="janrainAuthReturnExperience";h.appendChild(d);d.appendChild(c);Ra||d.appendChild(P(e,a));s.appendChild(h);return s},getWidth:function(){return R()},getActualHeight:function(){return parseInt(s.style.height)+2},getHeight:function(){return j()-2*n},getState:function(){return U()},setState:function(b){if(i("customizable_auth_widget_styling")){var c=b.fontFamily;c&&(Sa=c);na(b.fontSize);
Ba(b.fontColor);ja(b.backgroundColor);qa(b.borderColor);"embed"===z&&b.format&&(b.format&&V(b.format),"two column"!==m&&(ta=a().headerHeight-5),"two column"===m&&(N=a().twoColumn.providersPerPage,ta=a().headerHeight));if("string"==typeof b.providersPerPage||"number"==typeof b.providersPerPage)Da(b.providersPerPage),"object"===typeof l&&l.setHeight(j()).refresh("janrainModal");$(b.buttonBackgroundStyle);ca(b.buttonBorderColor);ha=r("number",[0,20],5,b.buttonBorderRadius);Y(b.actionText);oa(b.showAttribution);
ka(b.borderRadius);"embed"===z&&("string"==typeof width||"number"==typeof width)&&W(b.width)}Ca(b.providers)},showNotice:function(){Fa()},removeNotice:function(){Kb(va)},removeReturnExperience:function(){var a=document.getElementById("janrainAuthReturnExperience");Kb(a)}}}function e(){var a=document.createElement("div");a.id="fb-root";document.body.insertBefore(a,document.body.firstChild);window.fbAsyncInit=function(){FB.init({appId:janrain.settings.facebookAppId,status:!0,cookie:!1,xfbml:!1,channelUrl:"/channel.html"});
FB.getLoginStatus(function(a){var b=(new O).setName(ra);a.authResponse&&window.janrain&&window.janrain.engage&&window.janrain.engage.signin&&(janrain.engage.signin.facebookAutoLoginCallback=function(a){"ok"===a.stat&&(janrain.events.onProviderLoginToken.fire({engageToken:a.token}),b.setValue("true").create())},Y(d.appUrl+"/signin/oauth_token?provider=facebook&callback=janrain.engage.signin.facebookAutoLoginCallback&token="+a.authResponse.accessToken+"&origin_domain="+window.location.hostname))})};
Y("//connect.facebook.net/en_US/all.js")}function b(){if("object"===typeof j)if("object"===typeof P){var a=j.getState();a.width=P.width;P=a}else P=j.getState();"object"===typeof j&&j.remove();"object"===typeof l&&l.remove();z="modal";t();"object"===typeof j&&P&&i("customizable_auth_widget_styling")&&j.setState(P);"object"===typeof l&&Xa&&i("customizable_auth_widget_styling")&&l.setState(Xa);"object"===typeof l&&l.show();"object"===typeof j&&j.refresh()}function c(){if("object"===typeof j){if("object"===
typeof P){var a=j.getState();a.borderRadius=P.borderRadius;a.format=P.format;a.width=P.width;P=a}else P=j.getState();Xa=P.modalState;delete Xa.orientation}"object"===typeof j&&j.remove();"object"===typeof l&&l.remove();"object"===typeof l&&(l="");z="embed";g();"object"===typeof j&&P&&i("customizable_auth_widget_styling")&&j.setState(P);"object"===typeof j&&j.refresh()}function F(){var a,b;t();b=document.getElementsByTagName("a");var c=RegExp("(\\s|^)"+d.linkClass+"(\\s|$)");for(a in b)c.test(b[a].className)&&
(b[a].onclick=G)}function g(){var b=S("expected_tab");j=new a;j.setBackgroundColor(ib).embed(!0).setPreviewMode(jb).setShowAttribution(kb).setNoReturnExperience(lb).setNoReturnExperienceSwitchAccountLink(Bb).setFormat(ya).setRowHeight(xa).setFontSize(mb).setFontFamily(nb).setFontColor(ob).setActionText(pb).setProviders(la).setProvidersPerPage(qb).setWidth(Z).setBorderColor(ea).setBorderRadius(wa).setButtonBorderColor(rb).setButtonBorderRadius(sb).setButtonBackgroundStyle(tb).build();var c=document.getElementById("janrainEngageEmbed");
null===c&&(c=document.getElementById("janrainModal"));qa||(b?(V("welcome_info_name",unescape(S("welcome_info_name"))),pa("expected_tab",b)):ma(c,j.getContentsDiv()))}function G(){"object"===typeof l&&l.show();return!1}function t(){var b=Va(hb,gb),c=S("expected_tab");if("undefined"===typeof b||0>b)b=5;j=new a;j.setBackgroundColor(ib).setPreviewMode(jb).setShowAttribution(kb).setNoReturnExperience(lb).setNoReturnExperienceSwitchAccountLink(Bb).setFontSize(mb).setFontFamily(nb).setFontColor(ob).setActionText(pb).setProviders(la).setProvidersPerPage(qb).setBorderRadius(b).setButtonBorderColor(rb).setButtonBorderRadius(sb).setButtonBackgroundStyle(tb).build();
if("object"!==typeof l){l=new Lb;l.ready=!1;var d=l.addContent;l.addContent=function(a){l.ready=!0;d(a);janrain.events.onModalWidgetReady.fire()}}l.setHeight(j.getActualHeight()).setWidth(j.getWidth()).setPreviewMode(jb).setBorderColor(Da).setBorder(gb).setBorderOpacity(Fa).setBorderRadius(hb);qa||(c?(V("welcome_info_name",unescape(S("welcome_info_name"))),pa("expected_tab",c)):l.addContent(j.getContentsDiv()));l.onOrientationChange.addHandler(function(a){"portrait"===a.orientation&&j.setFormat(a.format).setWidth(200).refresh({center:!0});
"landscape"===a.orientation&&j.setHeight(a.height).setWidth(a.width).setFormat(a.format).refresh({center:!0});l.setHeight(j.getActualHeight());l.setWidth(j.getWidth())});l.onShow.addHandler(function(){"object"==typeof j&&l.setWidth(j.getWidth())});l.onBorderWidthChange.addHandler(function(a){"object"===typeof l&&"object"===typeof j&&(j.setBorderRadius(a.radius).refresh(),a=j.getState(),a.borderRadius<a.modalState.borderRadius-a.modalState.borderWidth&&l.setBorderRadius(a.borderRadius+a.modalState.borderWidth))});
l.onBorderRadiusChange.addHandler(function(a){"object"===typeof j&&(j.setBorderRadius(a.radius).refresh(),a=j.getState(),a.borderRadius<a.modalState.borderRadius-a.modalState.borderWidth&&l.setBorderRadius(a.borderRadius+a.modalState.borderWidth))})}function q(a,b){if(!i("customizable_auth_widget_styling"))return!1;if("object"===typeof j)return b(a),!0}function A(a){return q(a,function(a){j.setBackgroundColor(a).refresh()})}function K(a){return q(a,function(a){j.setBorderRadius(a).refresh()})}function Q(a){return q(a,
function(a){j.setBorderColor(a).refresh()})}function T(a){return"modal"===z?!1:q(a,function(a){j.setWidth(a).refresh({center:!0})})}function H(a){return q(a,function(a){j.setActionText(a).refresh()})}function W(a){return q(a,function(a){j.setButtonBorderColor(a).refresh()})}function U(a){return q(a,function(a){j.setButtonBorderRadius(a).refresh()})}function ca(a){return q(a,function(a){j.setButtonBackgroundStyle(a).refresh()})}function D(a){return"modal"==z?!1:q(a,function(a){j.setFormat(a).refresh()})}
function k(a){return q(a,function(a){j.setProvidersPerPage(a).refresh()})}function ka(a){return q(a,function(a){j.setFontFamily(a).refresh()})}function na(a){return q(a,function(a){j.setFontSize(a).refresh()})}function E(a){return q(a,function(a){j.setFontColor(a).refresh()})}function S(a){var b;if("single cookie"===oa){b=O().getCookie("janrain_engage_login_data");if(!b)return;b=R.parse(b);return!b[a]?void 0:a=b[a]}if("default"===oa)return a=O().getCookie(a),!a?void 0:a}function za(a,b,c){var d;if(!a||
!b)return!1;c||(c=1);if("single cookie"===oa)return(oldCookieJSON=O().getCookie("janrain_engage_login_data"))||(oldCookieJSON="{}"),c=R.parse(oldCookieJSON),c[a]=b,d=new O,d.setName("janrain_engage_login_data").setValue(R.stringify(c)).setExpiration(1826).create(),!0;return"default"===oa?(d=new O,d.setName(a).setValue(b).setExpiration(c).create(),!0):!1}function ja(a,b){if(lb)return!1;if("expected_tab"===a&&!b){var c=S("login_tab");c&&ja("expected_tab",c);return!1}if(!b||"undefined"===b||"expected_tab"!==
a&&"expected_user_input"!==a&&"welcome_info_name"!==a)return!1;b="welcome_info_name"===a?escape(b):b;za(a,b,1826)}function M(a,b){var c={};a||(a=Cb);b||(b=Cb.appUrl);if(f&&3>Ra)return c.widget_type=a.widget_type,c.provider=a.provider,c.time=(new Date).getTime(),c=xb(c),Y(b+"/signin/get_login_info"+c),Ra++,!0;"object"===typeof janrain.events.onProviderLoginCancel&&janrain.events.onProviderLoginCancel.fire(a);"undefined"!==typeof db&&clearTimeout(db);return!1}function Pa(a,b,c){var d=b.appUrl,e=janrain.settings.customSAML&&
a.customSAML,f=janrain.settings.customOpenid&&a.customOpenid,d=e?d+"/saml2/sso/start":d+("/"+a.flow+"/start"),g=window.location.href;b.mobileDevice&&(g="mobile");var i=b.language||"en",j=b.popup?"xdr":"xdrsw",l=b.tokenUrl||window.location.href,k={};Cb={appUrl:b.appUrl,provider:a.name,widget_type:b.widgetType};k.language_preference=i;k.token_url=l;k.display="popup";k.widget=!0;"object"===typeof b.facebookPermissions&&(k.ext_perm=b.facebookPermissions.toString());e?k.saml_provider=a.identifier:k.openid_identifier=
a.identifier;k.origin_url=g;k.provider_name=a.name;k.force_reauth=b.forceReauth;k.xdReceiver=b.appUrl+"/"+j;k.callback="none";k.widget_type=b.widgetType;k.token_action="url";if("event"===b.tokenAction||"hybrid"===b.tokenAction)k.token_action="event";b.mobileDevice&&"hybrid"===b.tokenAction&&(k.token_action="url");b.bpChannel&&(k.bp_channel=b.bpChannel);g=function(b){var c=janrain.settings[b],b=a[b],c="object"===typeof c?c[a.name]:c;return c!==b?c:b}("customOpenidOpxblob");b.customOpenid&&"string"===
typeof g&&(k.opx_blob=g);d+=xb(k);(function(){janrain.events.onProviderLoginStart.fire({provider:a.name,width:a.width,height:a.height});var g;b.mobileDevice&&"event"!==b.tokenAction||!b.popup?Y(b.appUrl+"/signin/set_login_tab?login_tab="+a.name+"&origin_url="+encodeURIComponent(window.location.href),function(){janrain.settings.customProviderInIFrame&&(f||e)?window.location.href=d:window.top.location.href=d}):(g=new Ub(d),g.setWidth(a.width).setHeight(a.height).setCallback(function(){var d={},e="";
d.widget_type=b.widgetType;d.provider=a.name||"";d.time=(new Date).getTime();e=xb(d);"function"===typeof c&&c();Y(b.appUrl+"/signin/get_login_info"+e);janrain.events.onProviderLoginComplete.fire({provider:a.name})}).show())})()}function V(a,b){if(!b||"undefined"===b||"welcome_info_name"!==a)return!1;b&&(ha=b)}function pa(a,b){function c(){janrain.events.onReturnExperienceFound.fire({returnProvider:b,welcomeName:ha})}var d=function(a){var c=function(){600>a&&setTimeout(function(){d(++a)},50)};if("object"!==
typeof j)return c(),!1;"modal"===z?l.addContent(j.getReturnExperience(b,ha)):"embed"===z&&ma(document.getElementById("janrainEngageEmbed"),j.getReturnExperience(b,ha));"modal"===z&&janrain.events.onModalWidgetReady.fire()};if("expected_tab"!==a||!b)return!1;"object"===typeof j&&j.removeReturnExperience();Qa?c():janrain.events.onAuthWidgetLoad.addHandler(c);d(0)}function ma(a,b){a&&(a.innerHTML="");janrain.settings.capture&&(a?(a.innerHTML="",a.appendChild(b)):(a=document.createElement("div"),a.id=
"janrainEngageEmbed",a.style.display="none",document.body.appendChild(a)));a?(a.appendChild(b),janrain.events.onAuthWidgetContentPlaced.fire()):(p.log('Missing container div, please place this div where you wantthe embedded widget to be displayed on your page- <div id="janrainEngageEmbed"></div>.'),p.show());return a}function Ba(a,b){Ma=Ma||$;tokenUrl=b?Ma:$;var c="";if(!fb(tokenUrl).query)var c=c+"?",d=!0;for(var e in a)d?(c+=e+"="+a[e],d=!1):c+="&"+e+"="+a[e];Ma=tokenUrl+c}function da(){function a(b){if(!("customsaml"===
b&&!d.customSAML||"customopenid"===b&&!d.customOpenid)){var c,e;if("customsaml"===b)c="customSAMLProviderId",e=["customSAMLProviderName","customSAMLProviderColor","customSAMLLargeIcon"];else if("customopenid"===b)c="customOpenidProviderId",e="customOpenIdProviderName,customOpenIdProviderColor,customOpenidLargeIcon,customOpenidIdentifier,customOpenidFlow,customOpenidOpxblob".split(",");else{p.log("Bad provider: "+b);p.show();return}var h=typeof d[c];if("undefined"===h||"string"===h){var f=d[c]||b;
d[c]=[f];wb(e,function(a){if("object"!==typeof d[a]){var b=d[a];d[a]={};d[a][f]=b}})}}}function e(a,b){var c=Tb,h={customopenid:["customOpenidFlow","customOpenidIdentifier"],customsaml:["customSAMLProviderId"]};if(d[{customopenid:"customOpenid",customsaml:"customSAML"}[a]]&&i("customizable_auth_widget_styling")){"customopenid"===a?$a=!0:"customsaml"===a&&(Ha=!0);for(var h=h[a],f=0,g=h.length;f<g;f++)if(!d[h[f]])return p.log(c({provider:a,setting:h[f]},"Missing {| setting |}. {| setting |} is required when adding a {| provider |} provider")),
p.show(),!1;var j={customsaml:{providerColor:"customSAMLProviderColor",friendlyName:"customSAMLProviderName",modalHeight:"customSAMLModalHeight",modalWidth:"customSAMLModalWidth",largeIcon:"customSAMLLargeIcon"},customopenid:{providerColor:"customOpenIdProviderColor",friendlyName:"customOpenIdProviderName",modalHeight:"customOpenidModalHeight",modalWidth:"customOpenidModalWidth",customOpenidOpxblob:"customOpenidOpxblob",largeIcon:"customOpenidLargeIcon",flow:"customOpenidFlow",identifier:"customOpenidIdentifier"}},
c=function(c){c=d[j[a][c]];return"object"===typeof c?c[b]:c},h={width:c("modalWidth")||800,height:c("modalHeight")||600,friendlyName:c("friendlyName"),color:c("providerColor"),largeIcon:c("largeIcon"),identifier:c("identifier")};"customopenid"===a?(h.flow=c("flow"),h.customOpenid=!0,h.customOpenidOpxblob=c("customOpenidOpxblob")):"customsaml"===a&&(h.customSAML=!0,h.identifier=b);ia[b]=h}}d=janrain.settings;if("en"!==janrain.settings.language&&"undefined"===typeof janrain.settings.translate)return setTimeout(da,
5),!1;Ib(Eb()+"providers.css");f&&9>=f&&Ib(Eb()+"providers-ie.css");if(d.stop)return!0;Xb&&Y(d.appUrl+"/signin/establish_session");Aa=d.tokenAction?d.tokenAction:Aa;if(!d.tokenUrl&&"event"===Aa)$=window.location.href;else if(d.tokenUrl)$=d.tokenUrl;else return p.log("Missing tokenUrl.  tokenUrl is required."),p.show(),!1;z=r("string",["modal","embed"],"embed",d.type?d.type:z);qa=d.multi?d.multi:yb?!0:qa;aa=d.custom?d.custom:aa;ba=d.forceReauth?d.forceReauth:ba;Na=d.bpChannel?d.bpChannel:Na;ga=d.facebookPermissions?
d.facebookPermissions:ga;fa=!!d.facebookAutoLogin;oa=d.storageType?r("string",["default","single cookie"],"default",d.storageType):oa;Ya="boolean"===typeof d.popup?d.popup:Ya;yb&&"event"!==Aa&&(Ya=!1);Ca=d.returnExperienceTimeout?d.returnExperienceTimeout:Ca;qa&&(setTimeout(function(){var a=S("expected_tab");a?(V("welcome_info_name",unescape(S("welcome_info_name"))),pa("expected_tab",a)):"modal"===z?l.addContent(j.getContentsDiv()):"embed"===z&&(a=document.getElementById("janrainEngageEmbed"),ma(a,
j.getContentsDiv()))},Ca),Y(d.appUrl+"/signin/get_cookies"));a("customopenid");a("customsaml");d.customOpenid&&wb(d.customOpenidProviderId,function(a){e("customopenid",a)});d.customSAML&&wb(d.customSAMLProviderId,function(a){e("customsaml",a)});if(aa)return!0;Aa=d.tokenAction?d.tokenAction:Aa;gb=i("customizable_auth_widget_styling")?d.modalBorderWidth:gb;Da=i("customizable_auth_widget_styling")?d.modalBorderColor:Da;hb=i("customizable_auth_widget_styling")?d.modalBorderRadius:hb;Fa=i("customizable_auth_widget_styling")?
d.modalBorderOpacity:Fa;ib=i("customizable_auth_widget_styling")?d.backgroundColor:ib;wa=i("customizable_auth_widget_styling")?d.borderRadius:wa;ea=i("customizable_auth_widget_styling")?d.borderColor:ea;ya=i("customizable_auth_widget_styling")?d.format:ya;ob=i("customizable_auth_widget_styling")?d.fontColor:ob;mb=i("customizable_auth_widget_styling")?d.fontSize:mb;nb=i("customizable_auth_widget_styling")?d.fontFamily:nb;Z=i("customizable_auth_widget_styling")?d.width:Z;xa=i("customizable_auth_widget_styling")?
d.rowHeight:xa;qb=i("customizable_auth_widget_styling")?d.providersPerPage:qb;Ab=i("customizable_auth_widget_styling")?d.providersNotPaged:Ab;pb=i("customizable_auth_widget_styling")?d.actionText:pb;rb=i("customizable_auth_widget_styling")?d.buttonBorderColor:rb;sb=i("customizable_auth_widget_styling")?d.buttonBorderRadius:sb;tb=i("customizable_auth_widget_styling")?d.buttonBackgroundStyle:tb;kb=i("customizable_auth_widget_hide_attribution")?d.showAttribution:kb;jb=d.previewMode;lb=d.noReturnExperience;
Bb=d.noReturnExperienceSwitchAccountLink;la=d.providers;"undefined"===typeof janrain.settings.translate&&(janrain.settings.translate=d.translate={});if(d.customOpenid&&i("customizable_auth_widget_styling")){if(!d.customOpenidLargeIcon)return p.log("Missing customOpenidLargeIcon.  customOpenidLargeIcon is required and should be the full path to an image that is 50px x 50px."),p.show(),!1;Ia={largeIcon:d.customOpenidLargeIcon,customOpenIdProviderName:d.customOpenIdProviderName||janrain.settings.translate.SIGN_IN||
"Sign in",customOpenIdProviderColor:d.customOpenIdProviderColor}}if(d.customSAML&&i("customizable_auth_widget_styling")){if(!d.customSAMLLargeIcon)return p.log("Missing customSAMLLargeIcon.  customSAMLLargeIcon is required and should be the full path to an image that is 50px x 50px."),p.show(),!1;Wa={largeIcon:d.customSAMLLargeIcon,customSAMLProviderName:d.customSAMLProviderName||janrain.settings.translate.SIGN_IN||"Sign in",customSAMLProviderColor:d.customSAMLProviderColor}}d.previewMode?("modal"===
z&&(janrain.ready?b():X(window,"load",b)),"embed"===z&&(janrain.ready?c():X(window,"load",c))):("modal"===z&&(janrain.ready?F():X(window,"load",F)),"embed"===z&&(janrain.ready?g():X(window,"load",g)))}var ga,fa=!1,ra="janrain_engage_facebook_auto_login",Na,$a=!1,Ha=!1,ba=!1,Aa="url",$,Ma,z="embed",ha="unknown",qa=!1,Ca=300,ba=!1,Ya=!0,aa=!1,oa="default",Ia,Wa,Xa,l,gb,Da,hb,Fa,j,P,ib,wa,ea,Z,xa,ya,la=[],Ab=!1,qb,pb,mb,nb,ob,rb,sb,tb,jb,lb,Bb,kb,bb=!1,Qa=!1;janrain.events.onAuthWidgetLoad||(janrain.events.onAuthWidgetLoad=
I());janrain.events.onModalWidgetReady||(janrain.events.onModalWidgetReady=I());janrain.events.onReturnExperienceFound||(janrain.events.onReturnExperienceFound=I());janrain.events.onAuthWidgetLoad.addHandler(function(){Qa=!0;var a=(new O).getCookie(ra);fa&&!a&&e()});janrain.events.onAuthWidgetLoad.addHandler(function(){"function"===typeof janrainWidgetOnload&&(aa?janrainWidgetOnload():j?janrainWidgetOnload(j.getState()):janrainWidgetOnload())});for(var db,Ra=0,Cb,Db="onAuthWidgetContentPlaced,onProviderLoginStart,onProviderLoginError,onProviderLoginToken,onProviderLoginCancel,onProviderLoginSuccess,onProviderLoginComplete,onProviderLogoutStart,onProviderLogoutComplete".split(","),
ub=0;ub<Db.length;ub++)"undefined"===typeof janrain.events[Db[ub]]&&(janrain.events[Db[ub]]=new Ga);janrain.events.onProviderLoginError.addHandler(function(a){if(aa)return!0;var b=S("login_tab");if("modal"===z){var c=document.getElementById("janrainModal");c&&c.appendChild(j.getErrorPage(b,a.err))}"embed"===z&&(c=document.getElementById("janrainEngageEmbed"))&&ma(c,j.getErrorPage(b,a.err))});da();return{status:"loaded",appendTokenParams:function(a,b){Ba(a,b)},appendTokenParamsCumulative:function(a){Ba(a,
!0)},setBackplaneChannel:function(a){Na=a},setLoginCookie:function(a,b){ja(a,b)},loginHandler:function(a){var b=Aa;a?("ok"===a.stat&&("event"===b||"hybrid"===b?Y(a.redirectUrl):(b=document.createElement("form"),b.action=a.redirectUrl,b.method="POST",janrain.settings.targetTop&&(b.target="_top"),document.body.appendChild(b),b.submit())),"fail"===a.stat&&(a.err&&160===a.err.code?janrain.events.onProviderLoginCancel.fire(a):janrain.events.onProviderLoginError.fire(a),"undefined"!==typeof db&&clearTimeout(db))):
M()},cancelLogin:function(a){M(a,d.appUrl);aa||j.removeNotice()},removeNotice:function(){j.removeNotice()},setWelcomeInfoName:function(a,b){V(a,b)},setReturnExperience:function(a,b){pa(a,b)},setNoReturnExperience:function(a,b){var c;"boolean"===typeof a&&j?(j.setNoReturnExperience(a),b||j.refresh(),c=!0):c=!1;return c},setNoReturnExperienceSwitchAccountLink:function(a){"boolean"===typeof a&&j?(j.setNoReturnExperienceSwitchAccountLink(a).refresh(),a=!0):a=!1;return a},setPreviewMode:function(a){"boolean"===
typeof a&&j?(j.setPreviewMode(a).refresh(),a=!0):a=!1;return a},setConfigureMode:function(a){"boolean"===typeof a&&j?(j.setConfigureMode(a).refresh(),a=!0):a=!1;return a},setCustom:function(a){aa=a},getState:function(){return"object"===typeof j?j.getState():!1},setProviderFlow:function(b,c){var d;d=!i("customizable_auth_widget_styling")||!aa?!1:a().setProviderFlow(b,c);return d},triggerFlow:function(b){b=!i("customizable_auth_widget_styling")||!aa?!1:a().triggerFlow(b);return b},debugDump:function(){if("undefined"!==
typeof console){console.log("-------------START---------------");null!==document.doctype?(console.log("DOCTYPE Name: "+document.doctype.name),console.log("DOCTYPE NodeType: "+document.doctype.nodeType)):console.log("DOCTYPE name: not available (probably quirks mode)");console.log("User Agent: "+navigator.userAgent);console.log("App Version: "+navigator.appVersion);console.log("Platform: "+navigator.platform);console.log("OS CPU: "+navigator.oscpu);console.log("Language: "+navigator.language);console.log("Release: ");
console.log("Web Address: "+location.href);console.log("Cookies Enabled: "+navigator.cookieEnabled);console.log("COOKIES::: "+document.cookie);console.log("AUTH SETTINGS:::");for(var a in janrain.settings)if(console.log(" ---- "+a+": "+janrain.settings[a]),"object"===typeof janrain.settings[a])for(var b in janrain.settings[a])"function"!==typeof janrain.settings[a][b]&&console.log(" --- --- "+b+": "+janrain.settings[a][b]);console.log("-------------END---------------")}},version:"not sure",widget:{init:function(){c()},
setBackgroundColor:function(a){return A(a)},setBorderColor:function(a){return Q(a)},setBorderRadius:function(a){return K(a)},setWidth:function(a){return T(a)},setActionText:function(a){return H(a)},setFontFamily:function(a){return ka(a)},setFontSize:function(a){return na(a)},setFontColor:function(a){return E(a)},setFormat:function(a){return D(a)},setButtonBorderColor:function(a){return W(a)},setButtonBorderRadius:function(a){return U(a)},setButtonBackgroundStyle:function(a){return ca(a)},setProviders:function(a){var b;
"object"===typeof j&&(u?j.setProviders(a):j.setProviders(a).refresh(),b=!0);return b},setProvidersPerPage:function(a){return k(a)},setShowAttribution:function(a){var b;i("customizable_auth_widget_hide_attribution")?"object"===typeof j&&j.setShowAttribution(a).refresh():b=!1;return b},refresh:function(){return j.refresh()},getWidth:function(){return j.getWidth()}},modal:{init:function(){b()},close:function(){"object"==typeof l&&l.close()},create:function(){return new Lb},setBorder:function(a){i("customizable_auth_widget_styling")?
("object"===typeof l&&(l.setBorder(a),l.refresh({center:!0})),a=!0):a=!1;return a},setBorderColor:function(a){i("customizable_auth_widget_styling")?("object"===typeof l&&(l.setBorderColor(a),l.refresh()),a=!0):a=!1;return a},setBorderOpacity:function(a){i("customizable_auth_widget_styling")?("object"===typeof l&&(l.setBorderOpacity(a),l.refresh()),a=!0):a=!1;return a},setBorderRadius:function(a){i("customizable_auth_widget_styling")?("object"==typeof l&&(l.setBorderRadius(a),l.refresh()),a=!0):a=
!1;return a}}}};var F=new function(){return{status:"not loaded"}},ra=new function(){return{status:"not loaded"}},Na=new function(){return{status:"not loaded"}},Yb=new function(){return{status:"not loaded"}};return{engage:{signin:"loaded"===fa(janrain,"engage.signin.status")?janrain.engage.signin:Ba,share:"loaded"===fa(janrain,"engage.share.status")?janrain.engage.share:F,publish:"loaded"===fa(janrain,"engage.publish.status")?janrain.engage.publish:ra,simpleshare:"loaded"===fa(janrain,"engage.simpleshare.status")?
janrain.engage.simpleshare:Na},capture:{ui:Yb}}}();janrain.engage=janrain.apps.engage;janrain.capture=janrain.apps.capture;