/*
 -*- Engage Auth Widget -*-
 Copyright (c) 2012, Janrain, Inc. All rights reserved.
 Version: v1.102.2_widgets_434
*/
"object"!==typeof window.janrain&&(window.janrain={});janrain.apps={};
janrain.apps=function(){var ia,Ta,za,Ia,cb,Ja,Ka;function kb(a){janrain.ready?a():document.addEventListener?document.addEventListener("DOMContentLoaded",a,!1):window.attachEvent("onload",a)}function Wa(a){H().setUseLocalStorage(!1).setDomain("."+document.location.host).setName(a).setValue("").remove();H().setUseLocalStorage(!1).setName(a).setValue("").remove()}function Ob(){var a;a="http:"===document.location.protocol?"http://cdn.quilt.janrain.com/2.2.17/":"https://d3hmp0045zy3cs.cloudfront.net/2.2.17/";
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("/")}janrain.settings.capture&&janrain.settings.capture.quiltUrl&&(a=janrain.settings.capture.quiltUrl+"/2.2.17/");return a}function La(a){function b(w){var r=a(w);g&&0===w%g&&s.error(e);r||(w<B?c=setTimeout(function(){b(w+1)},d):(s.warn("A poll operation failed."),f()))}var c,d=100,
B=1,g=0,e="",f=function(){},a="function"===typeof a?a:function(){return!0};return{start:function(){b(1);return this},stop:function(){clearTimeout(c);return this},setDelay:function(a){"number"===typeof a&&0<a&&(d=a);return this},setMaxAttempts:function(a){"number"===typeof a&&0<a&&(B=a);return this},setFailCallback:function(a){"function"===typeof a&&(f=a);return this},errorEvery:function(a,b){"number"===typeof a&&0<a&&"string"===typeof b&&(g=a,e=b);return this}}}function Cb(a,b,c){var d;if(document.getElementById(a))return!1;
if(f){d="";var B=document.createElement("div");B.innerHTML=d+"<iframe "+('name="'+a+'" ')+('id="'+a+'" ')+('src="'+b+'" ')+'style="display: none;"></iframe>';document.body&&document.body.appendChild(B);d=document.getElementById(a)}else d=document.createElement("iframe"),d.setAttribute("name",a),d.id=a,d.setAttribute("src",b),d.style.display="none",document.body&&document.body.appendChild(d);"function"===typeof c&&c();return d}function V(a){for(var b="",c=0;c<a;)b+=V.possible[Math.floor(Math.random()*
V.possible.length)],c++;return b}function Aa(){function a(a,b,c,d){b={action:a,key:b,messageId:c};"set"===a&&(b.value=d);return"janrainCapture:"+O.stringify(b)}function b(a,b){La(function(){return"undefined"!==typeof e[a]?("get"===e[a].action&&"function"===typeof b&&b(e[a].storedValue),!0):!1}).setDelay(50).setMaxAttempts(10).setFailCallback(function(){s.warn("Poll that checks message queue for request failed. requestId: "+a)}).start()}function c(c,d){var g=V(40);window.setTimeout(function(){f.contentWindow.postMessage(a("get",
c,g),w)});b(g,d)}function d(a,b){if(g)fb?c(a,b):setTimeout(function(){d(a,b)},50);else return window.localStorage.getItem(a)}function B(a){var b;if(!(b=0!==a.data.indexOf("janrainCapture:"))){b=r;var c=a.origin.replace(/^https?:\/\/|:\d{1,4}$/g,"").toLowerCase();b=!(!R(b)?0:-1<b.indexOf(c))}if(b)return!1;a=O.parse(a.data.replace("janrainCapture:",""));e[a.messageId]=a}var g=!1,e={},f,w,r=janrain.settings&&janrain.settings.whiteListedDomains?janrain.settings.whiteListedDomains:[];return{setItem:function(c,
d){if(g){var B=V(40);window.setTimeout(function(){f.contentWindow.postMessage(a("set",c,B,d),w)});return b(B)}return window.localStorage.setItem(c,d)},removeItem:function(c){if(g){var d=V(40);window.setTimeout(function(){f.contentWindow.postMessage(a("remove",c,d),w)});return b(d)}return window.localStorage.removeItem(c)},getItem:d,setMultiDomain:function(a){if(g=a)window.addEventListener?window.addEventListener("message",B,!1):window.attachEvent?window.attachEvent("onmessage",B):document.attachEvent&&
document.attachEvent("onmessage",B),f=document.getElementById("xDomainLocalStorageJanrain"),w=janrain.settings.storageServerDomain}}}function H(){function a(){if(B&&la){var a=new Aa;a.setMultiDomain(janrain.settings.multiDomainLocalStorage);a.removeItem(d);a.removeItem(d+"_Expires")}else{var a=e?"; domain="+e:"",b=new Date;b.setTime(b.getTime()+-864E6);document.cookie=d+"="+g+";expires="+b.toUTCString()+a+"; path="+f}}function b(b,c,g){var e,f,T,j,i,g="undefined"===typeof g?!0:g;if(B&&la)if(i=new Aa,
janrain.settings.multiDomainLocalStorage)i.setMultiDomain(!0),i.getItem(b,function(e){e?g?i.getItem(b+"_Expires",function(g){g?Math.round((new Date).getTime()/1E3)>Math.round((new Date(g)).getTime()/1E3)?(d=b,a(),"function"===typeof c&&c(!1)):"function"===typeof c&&c(e):(new H).getCookie(b+"_session")?"function"===typeof c&&c(e):(d=b,a())}):"function"===typeof c&&c(e):"function"===typeof c&&c(!1)});else if(j=i.getItem(b),e=i.getItem(b+"_Expires"),j){if(!g||!(e&&Math.round((new Date).getTime()/1E3)>
Math.round((new Date(e)).getTime()/1E3))&&(e||(new H).getCookie(b+"_session")))return j;d=b;a()}else return!1;else{e=document.cookie.split(";");f=e.length;for(var Ma=0;Ma<f;Ma++)if(T=e.pop(),j=T.split("="),T=j[0],j=j[1],T.trim()===b)return j;return!1}}var c,d,B=!1,g,e,f="/";return{create:function(){if(B&&la){var a=new Aa;a.setMultiDomain(janrain.settings.multiDomainLocalStorage);a.setItem(d,g);c?a.setItem(d+"_Expires",c):(new H).setName(d+"_session").setValue("session").create()}else document.cookie=
d+"="+g+(c?"; expires="+c:"")+(e?"; domain="+e:"")+"; path="+f},remove:a,setExpirationDirectly:function(a){a&&(c=a);return this},setExpiration:function(a){if(a){var b=new Date;b.setTime(b.getTime()+864E5*a);c=b.toUTCString()}return this},setName:function(a){a&&(d=a);return this},setValue:function(a){"undefined"!==typeof a&&(g=a);return this},setUseLocalStorage:function(a){B=a;return this},setPath:function(a){a&&(f=a);return this},setDomain:function(a){a&&(e=a);return this},getCookie:function(a,c,
d){return b(a,c,d)}}}function lb(a,b){a=a||navigator.appName;b=b||K;return"Microsoft Internet Explorer"===a&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(b)?parseFloat(RegExp.$1):!1}function ca(a){a=a||K;return!/CriOS\//.test(a||K)&&!/Chrome\//.test(a||K)&&/Safari\//.test(a)}function Xa(a){a=a||K;return-1<a.indexOf("iPod")?"iPod":-1<a.indexOf("iPhone")?"iPhone":-1<a.indexOf("iPad")?"iPad":0}function L(a,b,c,d,e,g){"number"===typeof c&&"number"===typeof d&&"number"===typeof e&&"number"===typeof g?("undefined"!==
typeof a.style.borderRadius&&(a.style.borderRadius=c+"px "+d+"px "+e+"px "+g+"px"),"undefined"!==typeof a.style.MozBorderRadius&&(a.style.MozBorderRadius=c+"px "+d+"px "+e+"px "+g+"px"),"undefined"!==typeof a.style.webkitBorderRadius&&(a.style.webkitBorderRadius=c+"px "+d+"px "+e+"px "+g+"px")):("undefined"!==typeof a.style.borderRadius&&(a.style.borderRadius=b+"px"),"undefined"!==typeof a.style.MozBorderRadius&&(a.style.MozBorderRadius=b+"px"),"undefined"!==typeof a.style.webkitBorderRadius&&(a.style.webkitBorderRadius=
b+"px"));return a}function mb(a,b){if("undefined"===typeof a||"undefined"===typeof b)return!1;var c=a-b;0>c&&(c=0);c>a&&(c=a);return c}function bc(a,b){"undefined"!==typeof a.style.filter&&(a.style.filter="alpha(opacity="+100*b+")");"undefined"!==typeof a.style.opacity&&(a.style.opacity=b);"undefined"!==typeof a.style.KhtmlOpacity&&(a.style.KhtmlOpacity=b);"undefined"!==typeof a.style.MozOpacity&&(a.style.MozOpacity=b)}function Rb(a,b){if(f&&(9>=f||document.documentMode&&9>=document.documentMode))return a.style.backgroundImage=
"url('"+Db("rel/img/c7a91677d94f4a79e1b26c8ceb31af82.png")+"')",!0;var c;if(c=ca()){a:{if((c=K)&&ca(c))if((c=c.match(/ Version\/(\d)[\d\.]+ /))&&c[1]){c=1*c[1];break a}c=0}c=4>=c}if(c||ma.getMobileDevice()){var d=c="",e="",g=b.split(","),T={top:"left top, left bottom",right:"right top, right bottom",bottom:"left bottom, left top",left:"left top, left bottom"};g[0]&&T[g[0]]&&(c=T[g[0]]);g[1]&&(d="from("+g[1]+")");g[g.length-1]&&(e="to("+g[g.length-1]+")");a.style.backgroundImage="-webkit-gradient(linear,"+
c+","+d+","+e+")"}a.style.backgroundImage="-moz-linear-gradient("+b+")";a.style.backgroundImage="-webkit-linear-gradient("+b+")";a.style.backgroundImage="-ms-linear-gradient("+b+")";a.style.backgroundImage="-o-linear-gradient("+b+")";a.style.backgroundImage="linear-gradient("+b+")"}function Ba(a,b,c,d){var e=gb(c),g=gb(c,d);if(c=cc(c))c.a=d,g="rgba("+c.r+", "+c.g+", "+c.b+", "+c.a+")";if(0<b){a.style.backgroundColor=e;a.style.padding=b+"px";if(0<f&&8>=f||f&&F)return!1;a.style.backgroundColor=g;a.style.padding=
b+"px"}else a.style.backgroundColor="",a.style.padding="0px"}function cc(a){var b={};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;b.r=a[0];b.g=a[1];b.b=a[2];b.a=a[3]?a[3]:1;return b}function gb(a,b){var c=a.split("");if("#"!==c[0])return a;4===a.length&&(a=c[0]+c[1]+c[1]+c[2]+c[2]+c[3]+c[3]);var a=a.substring(1,7),c=parseInt(a.substring(0,2),16),d=parseInt(a.substring(2,4),16),e=parseInt(a.substring(4,
6),16);return isNaN(b)?"rgb("+c+","+d+","+e+")":"rgba("+c+","+d+","+e+","+b+")"}function W(a,b,c){if(null==a)return!1;a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function na(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)}function eb(){var a,b;"undefined"!=typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):(a=document.documentElement.offsetWidth,b=document.documentElement.offsetHeight);return{width:a,height:b}}function dc(a){var b,
c,d,e;if("string"!==typeof a)return!1;a=a.trim();if(0===a.length)return!1;b=document.createElement("a");-1===a.indexOf("//")?a="http://"+a:0===a.indexOf("//")&&(a="http:"+a);"#"===a.charAt(a.length-1)&&(a=a.slice(0,a.length-1));b.href=a;if(2>b.protocol.length||""===b.host||0===b.hostname.length)return!1;e=""!==b.port&&"0"!==b.port&&"21"!==b.port&&"80"!==b.port&&"443"!==b.port;d="/"!==b.pathname.charAt(0);c=-1<a.indexOf(b.hostname+(e?":"+b.port:"")+(d?"/":"")+b.pathname+b.search+b.hash);b=b.protocol+
"//"+b.hostname+(e?":"+b.port:"")+(c?(d?"/":"")+b.pathname:"")+b.search+b.hash;c=encodeURI(a);return 0===b.indexOf(a)||0===b.indexOf(c)?b:!1}function q(a,b,c,d,e){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(!R(d))return e||t.log(d+" is wrong type, must be array, using default value instead"),c;if(b&&R(b))for(var j=0;j<d.length;j++)if(0>b.indexOf(d[j]))return e||t.log(d+" is not within the valid range, using default value instead"),
c;return d}if("url"===a){if("string"!==typeof d)return c;d=d.trim();if(0===d.length)return c;if(j=dc(d))return j;e||t.log(d+" failed url validation, please double check the url.");return d}if("text"===a){if(b){if(0<=b.indexOf(d))return d;e||t.log('Value of "'+d+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+c+'" instead');return c}return g.test(d)?d:c}if("usertext"===a){if("string"!==typeof d&&"number"!==typeof d)return c;if(R(b)){if(1===b.length){if(d.length<=
b[0])return d;e||t.log(d+" is too long, using default value instead");return c}if(2===b.length){if(d.length<=b[1]&&d.length>=b[0])return d;e||t.log(d+" is not within the valid range, using default value instead");return c}e||t.log("usertext range is invalid, using default value instead");return c}return d}"string"===typeof d&&0==d.length&&(d=" ");if(!g.test(d))return e||t.log(d+" contains invalid character(s)"),c;if("boolean"===a){if("boolean"===typeof d)return d;e||t.log(d+" is wrong type, must be boolean, using default value instead");
return c}if("text"===a)return d;if("number"===a){if(isNaN(parseInt(d)))return e||t.log(d+" is wrong type, must be a valid number"),c;d=parseFloat(d)}if("color"===a){d&&(d=d.trim());if("transparent"===d||f.test(d))return d;e||t.log('Value of "'+d+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+c+'" instead');return c}if(typeof d!=a&&"color"!=a)return e||t.log(d+" for "+arguments.callee.caller.name+" is "+typeof d+" expected "+a),c;if("object"===typeof b&&"string"===
a){if(0<=b.indexOf(d))return d;e||t.log('Value of "'+d+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+c+'" instead');return c}if("object"===typeof b&&"number"===a){2===b.length?(g=b[0],f=b[1]):(g=b.shift(),f=b.pop(),j=b);if(d<g)return e||t.log("Value of "+d+" for "+arguments.callee.caller.name+" is below minimum of "+g+", using minimum value of "+g+" instead"),g;if(d>f)return e||t.log("Value of "+d+" for "+arguments.callee.caller.name+" is above maximum of "+
f+", using maximum value of "+f+" instead"),f;if(j&&"number"===typeof j.indexOf(d)||d==g||d==f)return d;return j?(e||t.log("Value of "+d+" for "+arguments.callee.caller.name+" is not a valid value, using default value of "+c+" instead"),c):d}return 0!=d&&!d?c:d}function Ua(a){for(var b=Ua.options,a=b.parser[b.strictMode?"strict":"loose"].exec(a),c={},d=14;d--;)c[b.key[d]]=a[d]||"";c[b.q.name]={};c[b.key[12]].replace(b.q.parser,function(a,d,e){d&&(c[b.q.name][d]=e)});return c}function ec(a,b){function c(a){ka=
!0;"undefined"!==typeof w&&clearTimeout(w);if("string"===typeof a)return"function"===typeof j&&j(a),!0;if("object"===typeof a||"undefined"===typeof a)return"object"===typeof a&&"error"===a.type?"function"===typeof j&&j(a):"function"===typeof e&&e(),!0}function d(){La(function(){return ka}).setDelay(50).setMaxAttempts(g).setFailCallback(function(){s.warn("Polling for script loader failed. src: "+a);c("Load Timeout Error")}).start()}var e=b,g=200,f=!1,j,w,r=document.createElement("script"),ja=document.getElementsByTagName("script")[0],
ka=!1;r.src=a;r.setAttribute("type","text/javascript");r.onload=r.onerror=r.onreadystatechange=function(a){!ka&&(!this.readyState||"loaded"===this.readyState||"complete"===this.readyState)&&c(a)};return{setTimeoutCallback:function(a){f=!0;j=a;return this},setCallback:function(a){e=a;return this},setTimeoutLimit:function(a){g=a;return this},load:function(){ja.parentNode.insertBefore(r,ja);f&&d()}}}function X(a,b){ec(a,b).load()}function Sb(a,b,c){function d(c){cssNotFound=!1;"function"===typeof b&&
b();var d=janrain.events.onCssLoad,c={source:a,noload:c,save:!0};d.fire(c);d.permaArgs||(d.permaArgs=[]);d.permaArgs.push(c)}function e(){La(function(){for(w=j.length;0<=--w;)if(j[w].href===f.href)return d(),!0;return!1}).setDelay(50).setMaxAttempts(200).setFailCallback(function(){s.warn("Dynamic stylesheet poll check failed.");d(!0)}).start()}function g(){La(function(){d();return!0}).setDelay(50).setMaxAttempts(200).setFailCallback(function(){s.warn("Dynamic stylesheet poll check failed.")}).start()}
if(!R(da)?0:-1<da.indexOf(a))c&&"function"===typeof b&&b();else{da.push(a);var f,j=document.styleSheets,w;"undefined"===typeof janrain.events.onCssLoad&&(janrain.events.onCssLoad=new Va);Y?(f=document.createElement("style"),f.innerHTML='@import "'+a+'";'):(f=document.createElement("link"),f.rel="stylesheet",f.href=a,f.type="text/css");hb||Y?(hb&&e(),Y&&g()):(f.onload=function(){d()},f.onerror=function(){d(!0)});document.getElementsByTagName("head")[0].appendChild(f)}}function R(a){return"[object Array]"===
Object.prototype.toString.call(a)}function Ya(a){return!!a&&"[object Object]"===Object.prototype.toString.call(a)}function oa(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(a[c],c,a[c]);return a}function Z(a,b){if("undefined"===typeof b||0===b.length||!Ya(a)&&!R(a))return a;for(var c=b.split("."),d=a,e=0,g=c.length;e<g&&!(d=d[c[e]],void 0===d||null===d);++e);return d}function U(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c,a[d],d,a)}function Tb(a){a()}function Ub(a){a&&a.parentNode&&
a.parentNode.removeChild(a);return a}function Ca(a){var b=R(a)?[]:{},c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=Ca.isCloneable(a[c])?Ca(a[c]):a[c]);return b}function nb(a,b){var c=[],d=!(b&&!1===b.encode),e=b&&!0===b.allowDupes;oa(a,function(a,b){var f=e&&R(b)?b:[b];c.push.apply(c,f.map(function(b){return d?encodeURIComponent(a)+"="+encodeURIComponent(b):a+"="+b}))});return(c.length?"?":"")+c.join("&")}function fc(a,b,c){if(!a)return"";if(!b)return a;var d=Ua(a),a=d.protocol+"://"+
d.authority+d.path,e=d.anchor?"#"+d.anchor:"",g={};oa(b,function(a,b){var d=c&&R(b)?b:[b];g[encodeURIComponent(a)]=d.map(encodeURIComponent)});b=nb(Eb(d.queryKey,g),{encode:!1,allowDupes:c});return a+b+e}function gc(a,b){oa(b,function(b,d){Object.prototype.hasOwnProperty.call(a,b)?R(a[b])?a[b].push(d):a[b]=[a[b],d]:a[b]=d});return a}function pa(a){if(!a)return!1;if(a.preventDefault)a.preventDefault();else try{a.returnValue=!1}catch(b){}}function ea(a){if(!a)return!1;a.stopPropagation?a.stopPropagation():
a.cancelBubble=!0}function Eb(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a}function hc(a,b){for(var c=b,d=/\{\|(.*?)\|\}/,e;e=d.exec(c);)try{var g=e[1].trim(),f=Z(a,g),f="undefined"!==typeof f?f:"",c=c.replace(e[0],f)}catch(j){return window.console&&window.console.log&&console.log(j.name+": "+j.message,"error"),!1}return c}function Vb(){function a(a){var a=a||"img",c=document.createElement(a);c.style.position="absolute";c.style.cursor="pointer";c.style.zIndex=
1E3;"a"===a?(c.setAttribute("href","#"),c.className="janrain_modal_closebutton",qa&&(c.innerHTML=qa)):(c.src=ha,X||(c.style.right="-6px",c.style.top="-7px",c.style.height="31px",c.style.width="28px"));c.onclick=U?d:b;return c}function b(a){S||(p.style.display="none",G.style.display="none",y.style.display="none");Na&&ma.deactivate();("object"===typeof a||!a)&&janrain.events.onModalClose.fire();("object"===typeof a||!a)&&Ua.fire();"object"===typeof a&&pa(a)}function c(){var a=document.createElement("div"),
c=document.createElement("div"),d=document.createElement("a"),e=document.createElement("a"),g=document.createElement("h3");d.innerHTML=V;e.innerHTML=db;g.innerHTML=Ta;d.setAttribute("href","#");e.setAttribute("href","#");a.className="janrain_close_confirm_container";c.className="janrain_close_confirm";d.className="janrain_modal_confirm";e.className="janrain_modal_cancel";W(d,"click",function(a){b();p.removeChild(Oa);Oa=null;pa(a)});W(e,"click",function(a){p.removeChild(Oa);Oa=null;pa(a)});c.appendChild(g);
c.appendChild(e);c.appendChild(d);a.appendChild(c);return a}function d(a){Oa||(Oa=c(),p.appendChild(Oa));pa(a)}function e(){function a(){var b,c,d,e,k,g,f,r;d=document.documentElement?document.documentElement:{clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0,offsetWidth:0,offsetHeight:0};r=d.scrollWidth?d.scrollWidth:0;b=d.scrollHeight?d.scrollHeight:0;g=d.offsetWidth?d.offsetWidth:0;f=d.offsetHeight?d.offsetHeight:0;e=document.body.scrollWidth?document.body.scrollWidth:0;k=document.body.scrollHeight?
document.body.scrollHeight:0;c=document.body.offsetWidth?document.body.offsetWidth:0;d=document.body.offsetHeight?document.body.offsetHeight:0;g=Math.max(e,r,c,g);b=Math.max(k,b,d,f);d=y.style;d.width=g+"px";d.height=b+"px";d.position="absolute"}y=document.createElement("div");y.id=O;var b=y.style;b.left="0px";b.top="0px";ic?(a(),W(window,"resize",a)):(b.bottom="0px",b.right="0px",b.position="fixed");b.backgroundColor="#000000";bc(y,"0.4");b.display="none";b.zIndex=R;return y}function g(a){var b=
document.documentElement.scrollTop>=document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,c=document.documentElement.scrollLeft>=document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,d=eb(),e=a.style&&a.style.width?parseInt(a.style.width):a.offsetWidth?parseInt(a.offsetWidth):0,g=a.style&&a.style.height?parseInt(a.style.height):a.offsetHeight?parseInt(a.offsetHeight):0,g=d.height-g,d=d.width-e,b=b+g/2,c=c+d/2;C()&&(0>g&&(document.documentElement.scrollTop=
0,document.body.scrollTop=0,b=10),0>d&&(document.documentElement.scrollLeft=0,c=document.body.scrollLeft=0),a.style.top=b+"px",a.style.left=c+"px");"absolute"!==a.style.position&&(a.style.position="absolute")}function T(){if(S){var a=document.getElementById("previewMode");a.style.position="relative";a.appendChild(p)}else g(p);S||t.show()}function j(a){fa||(N=q("number",[0,20],10,a),Pa.fire({radius:mb($,N)}))}function w(a){fa||(Da=q("color",null,"#000000",a))}function r(a){fa||($=q("number",[0,20],
10,a),Ea.fire({radius:mb($,N),refresh:!0}))}function ja(a){fa||(ra=q("number",[0,1],0.5,a),"object"==typeof p&&Ba(p,N,Da,ra))}function ka(){if("undefined"===typeof Za)return!0;var a=eb();return!!Math.floor(Za)!==!!Math.floor(a.width/a.height)}function Pb(){var a=eb();Za=a.width/a.height}function s(a){if("portrait"===a){sa="portrait";var b="one column"}"landscape"===a&&(sa="landscape",b="two column");Fa.fire({orientation:sa,format:b,width:Qb,height:Wb});ka()&&T();Pb()}function $b(a){a&&(aa=a);f&&F&&
(aa+=N-2);"object"==typeof p&&(p.style.width=aa+"px");return this}function ac(a){a&&(K=a);f&&F&&(K=K+2*N-4);a&&"object"==typeof p&&(p.style.height=K+"px");return this}function Ma(){var a=eb(),a=a.width>=a.height,b="undefined"===typeof window.orientation,a=90===window.orientation||-90===window.orientation||b&&a?"landscape":"portrait";sa!==a&&s(a);T()}function C(){return"object"===typeof p&&"none"!==p.style.display}var Qb=380,Wb=131,p,H="janrainModal",G,y,O="janrainModalOverlay",z,aa=Qb,K=Wb,N=10,Da=
"#000000",$=10,ra=0.5,R=1E3,U=!1,ha=Db("rel/img/17c96fc4b9c8464d1c95cd785dd3120b.png"),qa="",fa=janrain.settings&&janrain.settings.capture&&janrain.settings.capture.noModalBorderInlineCss,X=!1,Ta="Are you sure you want to quit?",V="Yes, quit",db="No, stay",Oa,sa="landscape",Ga=!0,Na="boolean"===typeof Na?Na:"number"===typeof window.orientation?!0:!1,I="boolean"===typeof I?I:janrain.settings.previewMode,S=I,na=na||!1,Za,ta=!1;janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseImage&&
(ha=janrain.settings.capture.modalCloseImage,X=!0);janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseHtml&&(qa=janrain.settings.capture.modalCloseHtml);window.janrain.events.onModalClose||(window.janrain.events.onModalClose=J());window.janrain.events.onModalOpen||(window.janrain.events.onModalOpen=J());var Ua=J(),ua=J(),Ea=J(),Pa=J(),Fa=J();ma&&ma.onOrientationChange&&ma.onViewportChange&&(ma.onOrientationChange.addHandler(function(a){s(a.orientation)},!0),ma.onViewportChange.addHandler(function(){ka()&&
g(p);Pb()},!0));"undefined"!==typeof janrain.events.onCaptureRenderComplete&&(janrain.events.onCaptureRenderComplete.addHandler(function(){C()&&(ta=!0)},!0),janrain.events.onCaptureContentChange.addHandler(function(){C()&&ta&&(T(),ta=!1)},!0));return{isOpen:function(){return C()},setWidth:function(a){$b(a);return this},setHeight:function(a){ac(a);return this},setBorder:function(a){("string"==typeof a||"number"==typeof a)&&j(a);fa||"object"==typeof p&&Ba(p,N,Da,ra);return this},setBorderColor:function(a){a&&
w(a);fa||"object"==typeof p&&Ba(p,N,Da,ra);return this},setBorderRadius:function(a){("string"==typeof a||"number"==typeof a)&&r(a);fa||"object"==typeof p&&L(p,$);return this},setBorderOpacity:function(a){("number"===typeof a||"string"===typeof a)&&ja(a);return this},setZIndex:function(a){y.style.zIndex=a},setPreviewMode:function(a){"boolean"===typeof a&&(S=a);return this},setId:function(a){H=a;p&&(p.id=a);return this},show:function(){Na||(p.style.display="block");"object"==typeof G&&Ga&&(G.style.display=
"block");S?Na&&(p.style.display="block"):(y.style.display="block",Na?(ma.setElement(p).activate(),p.style.display="block"):(W(window,"resize",Ma),Ma()));fa||Ea.fire({radius:mb($,N),refresh:!1});ua.fire();janrain.events.onModalOpen.fire();ia.fire();p.focus()},close:function(a){b(a)},closeConfirm:function(){d()},refresh:function(a){na||p.appendChild(z);a&&a.center&&T()},remove:function(){if(S){var a=document.getElementById("previewMode");"object"===typeof z&&p.removeChild(z);"object"===typeof p&&a.removeChild(p);
"object"===typeof y&&document.body.removeChild(y);if(a=document.getElementById("janrainEngageEmbed_old"))a.id="janrainEngageEmbed";y=p=""}else"object"===typeof z&&p.removeChild(z),"object"===typeof y&&document.body.removeChild(y),"object"===typeof p&&document.body.removeChild(p)},addContent:function(b){var c=janrain.events.onAuthWidgetContentPlaced;c&&c.fire();G=b;if(!p){p=document.createElement("div");p.id=H;if("number"===typeof aa||"string"===typeof aa)p.style.width=aa+"px";p.style.height=K+"px";
p.style.position="absolute";fa||(p.style.padding=N+"px",L(p,$),Ba(p,N,Da,ra));p.style.zIndex=1E3;p.style.display="none";y=e();z=qa?a("a"):a();p.appendChild(z);document.body.appendChild(y);document.body.appendChild(p)}p.appendChild(G);S&&T();return this},getContent:function(){return G},getBorderWidth:function(){return N},getState:function(){return{width:aa,borderWidth:N,borderColor:Da,borderRadius:$,borderOpacity:ra,orientation:sa}},setState:function(a){i("customizable_auth_widget_styling")&&("undefined"!==
typeof a.borderWidth&&j(a.borderWidth),"undefined"!==typeof a.borderColor&&w(a.borderColor),"undefined"!==typeof a.borderOpacity&&ja(a.borderOpacity),"undefined"!==typeof a.orientation&&s(a.orientation),"undefined"!==typeof a.borderRadius&&(("string"==typeof a.borderRadius||"number"==typeof a.borderRadius)&&r(a.borderRadius),"object"==typeof p&&L(p,$)))},setConfirmClose:function(a){U=a;return this},setShowContentOnLoad:function(a){Ga=a;return this},setConfirmMessageText:function(a){Ta=a},setConfirmLinkText:function(a){V=
a},setCancelLinkText:function(a){db=a},onClose:Ua,onShow:ua,onOrientationChange:Fa,onBorderRadiusChange:Ea,onBorderWidthChange:Pa}}function jc(a){function b(a){"janrainReadyToClose:True"===a.data&&(top.focus(),j=!0,na(window,"message",b))}function c(a){"janrainPopupHasClosed"===a.data&&(na(window,"message",c),w&&w.parentNode&&w.parentNode.removeChild(w),"function"===typeof r&&r())}function d(){var a=window.open(e,"","top="+((window.screen.availHeight||window.screen.height)/2-f/2)+",left="+((window.screen.availWidth||
window.screen.width)/2-g/2)+",width="+g+",height="+f+",status=1,location=1,resizable=1,scrollbars=1");kc&&W(window,"message",b);if(lc)W(window,"message",c),w=Cb("janrain-xdr-iframe",janrain.settings.appUrl+"/xdr_iframe");else var d=window.setInterval(function(){j&&a&&(a.close(),j=!1);if(!a||a.closed||void 0===a.closed)window.clearInterval(d),"function"===typeof r&&r()},500)}var e=a,g=400,f=400,j=!1,w,r;return{show:function(){d()},setWidth:function(a){a&&(g=a);return this},setHeight:function(a){a&&
(f=a);return this},setCallback:function(a){a&&(r=a);return this}}}function mc(){function a(){i=(new Date).getTime()-e;if(i<d){var a=Math.round(b()*ja+j);g.style[r]=a+"px"}else clearInterval(ka),g.style[r]=w+"px",s()}function b(){if("flat"==t)return i*(1/d);if("sinusoidal"==t)return Math.abs(Math.sin(i*(Math.PI/(2*d))))}function c(a){return{x:function(){var b,c=a.event.clientX;var d=a.boundary,e=curtop=0;if(d.offsetParent){do e+=d.offsetLeft,curtop+=d.offsetTop;while(d=d.offsetParent);b=e}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 d="1000",e,g,f=document,j,w,r="left",ja,ka,i,t="flat",s,q;return{setAcceleration:function(a){t=a;return this},setCallback:function(a){s=a;return this},setDuration:function(a){d=a;return this},setDirection:function(a){"horizontal"===a&&(r="left");"vertical"===a&&(r="top");return this},setElement:function(a){g=a;return this},setElementBoundary:function(a){f=
a;return this},startPosition:function(a){j=a;return this},endPosition:function(a){w=a;return this},animate:function(){ja=w-j;e=(new Date).getTime();ka=setInterval(a,10);return this},drag:function(a){var b=this;this.moveHandler=function(a){var b=c({event:a.targetTouches&&a.targetTouches.length?a.targetTouches[0]:a,boundary:f}).x();g.style.left=b+"px";ea(a);pa(a);q&&clearTimeout(q);q=setTimeout(function(){s({pos_x:b})},500)};this.upHandler=function(a){b.unbindDragHandlers();ea(a);pa(a)};W(document,
Ia,this.moveHandler);W(document,cb,this.upHandler);ea(a);pa(a)},unbindDragHandlers:function(){na(document,cb,this.upHandler);na(document,Ia,this.moveHandler);return this}}}function J(){return new Va}function Va(){this.eventHandlers=[];this.firedEvents=[];this.fireCount=0}function Xb(){oa(janrain.events,function(a,b){b.eventName=a})}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;0<arguments.length&&
(d=Number(arguments[1]),d!=d?d=0:0!=d&&Infinity!=d&&-Infinity!=d&&(d=(0<d||-1)*Math.floor(Math.abs(d))));if(d>=c)return-1;for(d=0<=d?d:Math.max(c-Math.abs(d),0);d<c;d++)if(d in b&&b[d]===a)return d;return-1});Array.prototype.map||(Array.prototype.map=function(a,b){if(null===this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!==typeof a)throw new TypeError;for(var e=Array(d),g=0;g<d;g++)g in c&&(e[g]=a.call(b,c[g],g,c));return e});Array.prototype.filter||(Array.prototype.filter=
function(a,b){if(null==this)throw new TypeError;var c=Object(this),d=c.length>>>0;if("function"!=typeof a)throw new TypeError;for(var e=[],g=0;g<d;g++)if(g in c){var f=c[g];a.call(b,f,g,c)&&e.push(f)}return e});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var O;O||(O={});(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=j[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+
'"':'"'+a+'"'}function c(a,d){var e,j,B,t,s=g,q,C=d[a];C&&"object"===typeof C&&"function"===typeof C.toJSON&&(C=C.toJSON(a));"function"===typeof i&&(C=i.call(d,a,C));switch(typeof C){case "string":return b(C);case "number":return isFinite(C)?""+C:"null";case "boolean":case "null":return""+C;case "object":if(!C)return"null";g+=f;q=[];if("[object Array]"===Object.prototype.toString.apply(C)){t=C.length;for(e=0;e<t;e+=1)q[e]=c(e,C)||"null";B=0===q.length?"[]":g?"[\n"+g+q.join(",\n"+g)+"\n"+s+"]":"["+
q.join(",")+"]";g=s;return B}if(i&&"object"===typeof i){t=i.length;for(e=0;e<t;e+=1)"string"===typeof i[e]&&(j=i[e],(B=c(j,C))&&q.push(b(j)+(g?": ":":")+B))}else for(j in C)Object.prototype.hasOwnProperty.call(C,j)&&(B=c(j,C))&&q.push(b(j)+(g?": ":":")+B);B=0===q.length?"{}":g?"{\n"+g+q.join(",\n"+g)+"\n"+s+"}":"{"+q.join(",")+"}";g=s;return B}}"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 d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,f,j={"\u0008":"\\b","\t":"\\t","\n":"\\n",
"\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},i;"function"!==typeof O.stringify&&(O.stringify=function(a,b,d){var e;f=g="";if("number"===typeof d)for(e=0;e<d;e+=1)f+=" ";else"string"===typeof d&&(f=d);if((i=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});"function"!==typeof O.parse&&(O.parse=function(a,b){function c(a,d){var e,g,f=a[d];if(f&&"object"===typeof f)for(e in f)Object.prototype.hasOwnProperty.call(f,e)&&
(g=c(f,e),void 0!==g?f[e]=g:delete f[e]);return b.call(a,d,f)}var e,a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,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?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var s;(function(){function a(a){return function(b){if("boolean"!==
typeof b)throw Error("argument must be true or false");janrain.settings.debug.tagFilter[a]=b;window.localStorage&&(localStorage.janrainDebugTagFilter=O.stringify(janrain.settings.debug.tagFilter))}}janrain.settings.debug=janrain.settings.debug||{};var b={enabled:!1,logLevel:"log",logEvents:!1,tagFilter:{untagged:!0}};if(window.localStorage&&("true"===localStorage.janrainDebugEnabled&&(janrain.settings.debug.enabled=!0),localStorage.janrainDebugLogLevel&&(janrain.settings.debug.logLevel=localStorage.janrainDebugLogLevel),
localStorage.janrainDebugTagFilter))try{janrain.settings.debug.tagFilter=O.parse(localStorage.janrainDebugTagFilter)}catch(c){}Eb(b,janrain.settings.debug);janrain.settings.debug=b;var d=function(){return function(a){if(!a||1>a.length)a="";var b=Error(a),a="Error: "+a+" at:\n";return"string"===typeof b.stack?0===b.stack.indexOf("Error:")?b.stack:a+b.stack:"[stack trace unavailable]"}}();s=function(){function a(b){var d=b.level>=f[janrain.settings.debug.logLevel]&&janrain.settings.debug.tagFilter[b.tag];
if(window.console&&d){d="#"+b.id+" "+b.message;"untagged"!==b.tag&&(d="["+b.tag+"] "+d);try{console[b.type](d)}catch(c){console[b.type](d)}}}function b(g,i){return function(){var b,q;1===arguments.length?(b="untagged",q=arguments[0]):2===arguments.length?(b=arguments[0],q=arguments[1]):s.forceError("debug logging functions must be called with exactly 1 or 2 arguments");if(janrain.settings.debug.enabled||i)e++,q={stack:d(q),level:f[g],tag:b,id:e,type:g,date:new Date,message:q},c.push(q),a(q)}}var c=
[],e=0,f={};U(["log","info","warn","error"],function(a,b){f[a]=b});return{log:b("log"),info:b("info"),warn:b("warn"),error:b("error"),forceWarn:b("warn",!0),forceError:b("error",!0),logEvents:function(){for(var a in janrain.events)"function"===typeof janrain.events[a].addHandler&&janrain.events[a].addHandler(function(a){return function(b){s.log(a+": "+b)}}(a))},trace:function(a){var b=c[a-1];b?console.log(b.stack):console.error("No such log entry #"+a)},dump:function(){U(c,a)}}}();janrain.debug={dump:s.dump,
trace:s.trace,enable:function(){window.localStorage&&(localStorage.janrainDebugEnabled="true")},disable:function(){window.localStorage&&(localStorage.janrainDebugEnabled="false")},$__UNSUPPORTED_MODULE__$:"This module is not provided for customer use, but is intended only for debugging purposes."};U(["jtl","event","untagged"],function(b){janrain.debug["show"+(b.charAt(0).toUpperCase()+b.substring(1))]=a(b)})})();var z=window.innerWidth?window.innerWidth:document.body&&document.body.clientWidth?document.body.clientWidth:
document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:0;Ja=window.innerHeight?window.innerHeight:document.body&&document.body.clientHeight?document.body.clientHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:0;Ka=z;var la=window.localStorage&&window.localStorage.getItem&&window.localStorage.removeItem&&window.localStorage.setItem,da=[],fb=!1,F="CSS1Compat"!==document.compatMode,ib=!1,G=!1,e=[];
document.createElement("input");var z=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!==z?z[0]:!1,z="ontouchstart"in window;cb=z?"touchend":"mouseup";Ia=z?"touchmove":"mousemove";janrain.settings&&janrain.settings.storageServer&&
Cb("xDomainLocalStorageJanrain",janrain.settings.storageServer,function(){W(document.getElementById("xDomainLocalStorageJanrain"),"load",function(){fb=!0})});V.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=lb(),z=document.documentMode,Y=/Gecko\//.test(K),hb=/AppleWebKit\//.test(K);/Chrome\//.test(K);var lc=/CriOS\//.test(K),Zb=ca(),Ha=Xa(),ga=function(a){var a=a||K,b=a.indexOf("OS "),c=0;Xa(a)&&-1<b&&(c=Number(a.substr(b+
3).split(" ")[0].split("_")[0]));return c}(),kc=Ha&&6===ga&&Zb,ic=function(a){a=a||K;return/android/i.test(a)&&/linux/i.test(a)&&!/chrome/i.test(a)&&!/opera/i.test(a)&&!/firefox/i.test(a)}(),i=function(){var a=function(a){for(var b=[],e=0;e<a.length;e++)b.push(a[e]);return b},b={};janrain.settings&&janrain.settings.permissions&&(b.login=a(janrain.settings.permissions));janrain.settings&&janrain.settings.share&&janrain.settings.share.permissions&&(b.share=a(janrain.settings.share.permissions));return function(a,
d){d=d||"login";return!b[d]?!1:0<=b[d].indexOf(a)}}();Ua.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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
Ca.isCloneable=function(a){return a&&(Ya(a)||R(a))};(function(){var a=document.createElement("div");return function(b){b&&"string"===typeof b&&(b=b.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),b=b.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,""),a.innerHTML=b,b=a.textContent||a.innerText,a.innerHTML="");return b}})();s.info("Debugging mode is on. Run: \nlocalStorage.janrainDebugEnabled = false; \nin the console to turn it off.");window.localStorage&&"true"===localStorage.janrainLocalWidgetCodeEnabled&&
s.forceWarn("Local code mode is on. Run: \nlocalStorage.janrainLocalWidgetCodeEnabled = false; \nin the console to turn it off.");f&&(s.info("[ Internet Explorer ]\nVersion       : "+f+"\nDocument Mode : "+z),f!==z&&s.warn("IE version and document mode do not match! This could cause issues."));30<function(){var a=document.getElementsByTagName("style"),b=document.getElementsByTagName("link"),c=a.length;U(b,function(a){"stylesheet"===a.rel&&c++});return c}()&&s.warn("The page has more than 30 stylsheets. IE 8 and 9 cannot load more than 32 stylesheets.");
window.top!==window.self&&s.warn("The widget might be running inside a frame. Watch out for cross origin issues.");janrain.settings.custom&&s.warn("janrain.settings.custom is true. Customer must provide their own UI.");setTimeout(function(){janrain.ready||s.warn("janrain.ready is still not true after waiting for 10 seconds. The widget will not load until this is true. Check your widget loading code block.")},1E4);for(var ma=function(){function a(){if("undefined"===typeof window.orientation)return!1;
var a;d(document.body,s);t=i().content;j();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(){C(window.orientation,{height:screen?screen.height:0,width:screen?screen.width:0},{height:window.innerHeight,width:window.innerWidth});f()},!1),setTimeout(f,30),window.addEventListener("beforeunload",function(){window.removeEventListener(a,
f,!1)},!1));z.addHandler(function(){b({height:window.innerHeight,width:window.innerWidth},0)},!0);H.addHandler(function(a){Ja=a.height;Ka=a.width},!0);window.addEventListener("beforeunload",function(){window.removeEventListener(eventName,f,!1)},!1)}function b(a,d){var c=window.innerHeight,e=window.innerWidth,f=!0,g=!0;c!=a.height&&(f=!1);e!=a.width&&(g=!1);f&&g?20>d?setTimeout(function(){b({height:c,width:e},++d)},100):H.fire({height:c,width:e}):setTimeout(function(){b({height:c,width:e},0)},100)}
function c(){setTimeout(function(){r(t)},20);d(s,document.body)}function d(a,b){for(var d=0;d<a.style.length;d++){var c=a.style[d];b.style.setProperty(c,a.style.getPropertyValue(c),a.style.getPropertyPriority(c))}}function e(){var a;a=(0===window.orientation||180===window.orientation)&&Ka>Ja||(90===window.orientation||-90===window.orientation)&&Ja>Ka?!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 f(){var a=e();L||r("width=device-width, initial-scale=1, maximum-scale=1");z.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 j(){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 r(a){var b=i();if(!b||b.content==a)return!1;if("undefined"===typeof a){var d=i();document.getElementsByTagName("head")[0].removeChild(d)}b.content=a;return!0}var t,s=document.createElement("div"),G=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),
F=null!==G?G[0]:!1,z=J(),H=J(),L=F?F.match(/android|\Wsilk\W/):!1,C=function(){var a=window.orientation,b={height:screen?screen.height:0,width:screen?screen.width:0},d={height:window.innerHeight,width:window.innerWidth},c=!1;return function(e,f,g){var i=!1,j=function(a,b){return a.height>=a.width&&b.height>=b.width||a.width>a.height&&b.width>b.height?!0:!1},q=a===e,r=j(f,b),t=j(g,d);if(!q&&(!r||!t))i=!0;!q&&!r&&(c=!0);i&&(c&&!j(f,g)&&(i=g.height,g.height=g.width,g.width=i),Ja=g.height,Ka=g.width);
a=e;b={height:f.height,width:f.width};d={height:g.height,width:g.width}}}();return{setElement:function(){return this},onOrientationChange:z,onViewportChange:H,getMobileDevice:function(){return F},getOrientation:function(){return e()},activate:function(){a()},deactivate:function(){c()},isAndroid:function(){return L}}}(),Db=function(a){var b;b="https:"===document.location.protocol?"https://docj27ko03fnu.cloudfront.net/":"http://cdn.rpxnow.com/";b=b.replace(/\/$/,"");return b+"/"+a},z={openId:{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:{aol:{flow:"aol",width:514,height:550,color:"#0FD6FF",friendlyName:"AOL"},flickr:{flow:"flickr",width:500,height:500,color:"#FF0084",friendlyName:"Flickr"},google:{flow:"google",width:500,height:450,color:"#1C69F5",friendlyName:"Google"},hyves:{flow:"hyves",width:800,height:600,color:"#659BC8",friendlyName:"Hyves"},myopenid:{flow:"myopenid",width:800,height:600,color:"#8cc63f",friendlyName:"MyOpenID"},paypal:{flow:"paypal",width:800,height:600,color:"#1A3665",friendlyName:"PayPal"},verisign:{flow:"verisign",
width:945,height:600,color:"#B8004D",friendlyName:"VeriSign"},yahoo:{flow:"yahoo",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:640,height:480,color:"#3B5998",friendlyName:"Facebook",shareSettings:{broadcast:{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:"microsoftaccount",
width:950,height:550,color:"#3E73B4",friendlyName:"Microsoft Account"},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"},tencentweibo:{flow:"tencentweibo",
width:800,height:650,color:"#93C5EA",friendlyName:"Tencent Weibo",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,url:!0,image:!0,media:!0}}}},qq:{flow:"qq",width:800,height:650,color:"#4BB6EE",friendlyName:"QQ",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,url:!0}}}},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"},amazon:{flow:"amazon",width:950,height:550,color:"#FF9900",friendlyName:"Amazon"},microsoftaccount:{flow:"microsoftaccount",
width:950,height:550,color:"#3E73B4",friendlyName:"Microsoft Account"},instagram:{flow:"instagram",width:950,height:550,color:"#FFFFFF",friendlyName:"Instagram"},googleplus:{flow:"googleplus",width:445,height:665,color:"#D34836",friendlyName:"Google"},mydigipass:{flow:"mydigipass",width:900,height:650,color:"#D34836",friendlyName:"MYDIGIPASS.COM"},doccheck:{flow:"doccheck",width:850,height:600,color:"#D34836",friendlyName:"DocCheck"},medikey:{flow:"medikey",width:850,height:650,color:"#D34836",friendlyName:"Medikey"},
paypal_openidconnect:{flow:"paypal_openidconnect",width:600,height:600,color:"#1A3665",friendlyName:"PayPal"},xing:{flow:"xing",width:950,height:550,color:"#006567",friendlyName:"XING",shareSettings:{broadcast:{counter:{max:420,urlLength:23},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}},contact:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},
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,googleplus:!0,yahoo:!0},counter:{},format:{message:"#{MESSAGE} #{URL}"},
features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}}},fimnet:{fimnet:{flow:"fimnet",width:514,height:550,color:"#336699",friendlyName:"FiMnet"}},saml2:{samltest:{flow:"saml2",width:514,height:550,color:"#336699",friendlyName:"SAML Test"},lilly:{flow:"saml2",width:910,height:565,color:"#ED1D23",friendlyName:"Lilly"},jnj:{flow:"saml2",width:514,height:550,color:"#336699",friendlyName:"J&J"}}},ha={},Ha=["openId","openId2","oauth","fimnet","saml2"];0<Ha.length;){var ga=
Ha.pop(),va;for(va in z[ga])ha[va]=z[ga][va]}var t=function(){var a=[];return{log:function(b){var c={};c.id=a.length+1;c.message=b;a.push(c);return this},show:function(){if(0!=a.length){for(var b in a)if("undefined"!==typeof a[b].id){var c=a[b];"object"===typeof console&&("function"===typeof console.error?console.error("WARNING ID:"+c.id+" MESSAGE: "+c.message):"function"===typeof console.log&&console.log("WARNING ID:"+c.id+" MESSAGE: "+c.message))}a=[]}}}}();Va.prototype.addHandler=function(a,b){var b=
b||!1,c=this.eventName?this.eventName:"???";0<this.fireCount&&s.warn("Adding handler for event "+c+" but it has already been fired "+this.fireCount+" time(s).");"???"!==c&&0<za.fireCount&&!1===b&&s.warn("Adding handler for event "+c+" but janrain.capture.ui.start() has already been called.");this.eventHandlers.push(a);return this.eventHandlers.length-1};Va.prototype.removeHandler=function(a){return this.eventHandlers[a]?(this.eventHandlers[a]=null,!0):!1};Va.prototype.fire=function(a){var b=this;
this.fireCount++;this.eventName&&s.log("event",this.eventName);U(this.eventHandlers,function(c){try{"function"===typeof c&&c(a)}catch(d){setTimeout(function(){s.forceError("Error in event handler for '"+b.eventName+"'");throw d;},0)}});a&&!0===a.save&&(delete a.save,this.firedEvents.push({event:this,args:a}))};"undefined"===typeof janrain.events&&(janrain.events={});ia=void 0;Ta=void 0;za=void 0;Ta||(Ta=J());ia||(ia=J());za||(za=J());janrain.events.onCustomizationChange||(janrain.events.onCustomizationChange=
J());janrain.events.onProviderLoginStart||(janrain.events.onProviderLoginStart=J());janrain.events.onProviderLoginComplete||(janrain.events.onProviderLoginComplete=J());janrain.events.onProviderLoginError||(janrain.events.onProviderLoginError=J());janrain.events.onProviderLoginSuccess||(janrain.events.onProviderLoginSuccess=J());janrain.events.onProviderLoginToken||(janrain.events.onProviderLoginToken=J());janrain.events.onProviderLogoutStart||(janrain.events.onProviderLogoutStart=J());janrain.events.onProviderLogoutComplete||
(janrain.events.onProviderLogoutComplete=J());(function(){function a(){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(","),
c=0;c<a.length;c++)if("object"!==typeof janrain.events[a[c]])return!1;return!0}La(function(){return a()?(janrain.events.onAuthWidgetLoad.fire(),!0):!1}).setDelay(5).setMaxAttempts(Infinity).errorEvery(2E3,"Auth widget loaded poll failing. Is the auth widget loading?").start()})();Xb();va=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(){var a;wa&&(Ya=w());x=g();Xa=y();u=document.createElement("div");u.className="janrainContent";u.style.width=E+"px";u.style.height=h()+"px";u.style.paddingLeft=n+"px";u.style.paddingRight=n+"px";u.style.boxSizing="content-box";40===xa&&(u.style.paddingTop=n-1+"px");G||(u.style.backgroundColor=$a);G||(u.style.border=Fa?"1px solid "+Ca:"1px solid "+$a);u=L(u,D);G||(u.style.overflow="hidden");u.style.position=Fa?"relative":"absolute";da=C();2==x||0==x?(Qa=(new r).setSide("right").create(),
Ra=(new r).setSide("left").create()):(Qa=(new r).setSide("top").create(),Ra=(new r).setSide("bottom").create());a=z();" "!==c()&&a.appendChild(Xa);if(G){var e=K("blank");e.style.display="none";a.appendChild(e)}a.appendChild(da);!G&&Qa&&Ra&&(a.appendChild(Qa),a.appendChild(Ra));0<x&&wa&&a.appendChild(Ya);u.appendChild(a);i("customizable_auth_widget_styling")||d(u);ib||t.show();setTimeout(function(){Ta.fire()},0)}function d(a){function b(a){var ba="string"===typeof a.getAttribute("style")?a.getAttribute("style"):
null;ba&&(ba.cssText&&(ba=ba.cssText),a.style.setAttribute?a.style.setAttribute("cssText",ba.replace(/(((?!!important).)+?);/g,"$1 !important;")):a.setAttribute("style",ba.replace(/(((?!!important).)+?);/g,"$1 !important;")))}for(var c=a.getElementsByTagName("*"),e=0,o=c.length;e<o;e++)"janrainProviderPages"===c[e].id||"janrainSlideControl"===c[e].className||"janrainSlideControl"===c[e].parentNode.className||b(c[e]);b(a)}function c(){if(M&&(M==a().twoColumn.actionText||M==a().oneColumn.actionText||
M==a().oneRow.actionText))Ba=!1;return Ba&&M?M:e.translate.HEADER?e.translate.HEADER:"two column"===l?a().twoColumn.actionText:"one column"===l?a().oneColumn.actionText:"one row"===l?a().oneRow.actionText:M}function g(){var a=l;if("default"==a||"two column"==a)return 2;if("one column"==a)return 1;if("one row"==a)return 0}function h(){var a=" "===M?0:ya+n,b=wa&&"one row"!==l?Ia+n:0;return p()+a+b}function j(){var a=parseInt(da.style.left),b=parseInt(da.style.top),c;1==x?parseInt(da.style.height):parseInt(da.style.width);
2==x&&(c=(E-3*n-(2==x?10:0))/x);if("one column"===l){if(" "===M&&(b+=11,0<b||-9<=b))return 0;if(9>b)return 1;if(0<b||b>=-(ya-(n+1)))return 0}0==x&&(c=E-100);if(0>a&&a<-c)return 1;if(0<a||a>=-n)return 0}function p(){if("two column"===l)var a=Q/2;"one column"===l&&(a=Q);"one row"===l&&(a=1);var b="one row"===l?0:2*a,c="one column"===l?3*n:0;if(7===f||6===f||f&&F){if("two column"===l&&(c=n,7===f||6===f))c=2*n;if("one column"===l&&(c=3*n,(7===f||6===f)&&!F))c+=n;if("one row"===l&&(7===f||6===f))c=n}"one column"===
l&&Sa<=Q&&(c=f&&F?c+2*n:c-2*n);return A*a+n*(a+1)+b+c}function r(){function a(){var b;h="over";var ba=j();if(0==ba&&"left"===e||0==ba&&"top"===e||1==ba&&"right"===e||1==ba&&"bottom"===e)return this.style.cursor="default",i.onclick="",!1;var o=this;setTimeout(function(){if(1===v){if("over"!==h)return!1;f&&(d.style.display="block");m.style.display="block";i.onclick=c;o.style.cursor="pointer";var a=document.getElementById("janrainProviderPages");b="top"==e||"bottom"==e?parseInt(a.style.top):parseInt(a.style.left);
var ba="right"===e||"bottom"===e?b-Aa:b+Aa;"top"===e||"bottom"===e?a.style.top=ba+"px":a.style.left=ba+"px";v=2}},f?50:100)}function b(){var a;h="out";var c=j();if(1==c&&"right"===e||0==c&&"left"===e||0==c&&"top"===e||1==c&&"bottom"===e)return!1;setTimeout(function(){if(2===v){if("out"!==h)return!1;f&&(d.style.display="none");m.style.display="none";var b=document.getElementById("janrainProviderPages");a="top"==e||"bottom"==e?parseInt(b.style.top):parseInt(b.style.left);var c="right"===e||"bottom"===
e?a+Aa:a-Aa;"top"===e||"bottom"===e?b.style.top=c+"px":b.style.left=c+"px";v=1}},f?200:400)}function c(){m.style.display="none";i.style.cursor="default";s(e,function(a){B(a);v=1})}var d,e,o,m,g={left:"-33px -16px",right:"0px -16px",top:"-16px -33px",bottom:"-16px 0px"},h="",v=1,i;return{setSide:function(a){e=a;return this},create:function(){var f;if(Sa<=Q)f=!1;else{f=document.createElement("div");f.setAttribute("id","janrainShim_"+e);f.style.background="black";"top"===e||"bottom"===e?(f.style.height=
"19px",f.style.width="100%"):(f.style.height="100%",f.style.width="17px");ca?(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"===e||"bottom"===e)f.style.left="0";f.style[e]=n+"px";f.style.top="one column"!==l?n+1+"px":"top"===e?"10px":"0px";f.style.display="none";d=f;f=document.createElement("div");f.style.backgroundColor=ca?"green":$a;f.className="janrainSlideControllerMask";f.style.position=
"absolute";"one column"!==l&&(f.style.width=n+"px",f.style.height="100%",f.style.top="0px",f.style[e]="0px",f.style.borderWidth="1px","right"===e&&(!wa||"one row"===l)&&L(f,null,0,0,D,0),"left"===e&&(!wa||"one row"===l)&&L(f,null,0,0,0,D),"right"===e&&" "===M&&L(f,null,0,D,D,0),"left"===e&&" "===M&&L(f,null,D,0,0,D));"one column"===l&&(f.style.height=n+"px",f.style.fontSize="0px",f.style.width="100%",f.style.padding="0px",f.style[e]="0px","top"===e&&" "===M?L(f,null,D,D,0,0):"bottom"===e&&!wa&&L(f,
null,0,0,D,D));"one row"===l&&(f.style.height="105.5%");o=f;f=document.createElement("div");f.setAttribute("id","janrainArrow_"+e);f.style.background="url("+Db("rel/img/ee9d3aa7c5896c69488b5941ef31c7bc.png")+") no-repeat scroll "+g[e]+" transparent";f.style.height="19px";f.style.width="17px";f.style.position="absolute";if("top"===e||"bottom"===e)f.style.left=E/2+"px";f.style[e]=n+"px";f.style.top="one column"!==l?p()/2-2*n+1+"px":"top"===e?"10px":"0px";f.style.display="none";m=f;f=document.createElement("div");
f.className="janrainSlideControl";f.style.backgroundColor=ca?"purple":"transparent";"one column"===l?(f.style.width=E+4+"px",f.style.left="3px","top"==e?(f.style.height=n+"px",f.style.top=ya+n+"px"," "===M&&(f.style.left="0px",f.style.top="0px",f.style.width=E+10+"px")):(f.style.height="20px",f.style.bottom=(wa?Ia+n:0)+"px",L(f,null,0,0,D,D))):(f.style.width="right"===e?"20px":"0px",f.style[e]="0px",f.style.height=p()-(n*(" "===M)?1:2)+"px",40===xa&&"one row"===l&&"left"===e&&(f.style.left=za+"px"),
"right"===e&&!wa&&L(f,null,0,0,D,0),"left"===e&&!wa&&L(f,null,0,0,0,D));f.style.position="absolute";f.style.zIndex="100";f.style.cursor="pointer";f.onmouseover=a;f.onmouseout=b;f.onclick=c;i=f;i.appendChild(o);i.appendChild(d);i.appendChild(m);f=i}return f}}}function s(a,b){var c=document.getElementById("janrainProviderPages"),e=new mc;if("top"===a||"bottom"===a){if(" "===M)var d=-(p()-A),o=0;else d=-(p()-A-ya-n),o=ya+n;50===A&&(d-=20);f&&F&&(d+=n," "!==M&&(o+=n));e.setElement(c).setAcceleration("sinusoidal").setDuration(100*
Q).startPosition(parseInt(c.style.top)).endPosition("bottom"===a?d:o).setDirection("vertical").setCallback(function(){b(a)}).animate()}else f&&F?(d=-(E-2*n-39),"one row"===l&&(d=-(za-1*n))):(d=-(E-32),"one row"===l&&(d=-(E-24))),e.setElement(c).setAcceleration("sinusoidal").setDuration(800).startPosition(parseInt(c.style.left)).endPosition("right"==a?d:n).setDirection("horizontal").setCallback(function(){b(a)}).animate()}function w(){var a=document.createElement("div");a.style.backgroundColor=ca?
"aqua":$a;a.style.width=E+"px";a.style.height=Ia+"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=ab;L(a,null,0,0,D,D);var b=document.createElement("div"),c=janrain.settings.translate.POWERED_BY_PREFIX&&"en"!==janrain.settings.language?janrain.settings.translate.POWERED_BY_PREFIX:"Social Login",e=janrain.settings.translate.POWERED_BY_SUFFIX&&
"en"!==janrain.settings.language?janrain.settings.translate.POWERED_BY_SUFFIX:" by Janrain";b.style.paddingLeft="1px";var d=document.createElement("a");d.setAttribute("href","http://janrain.com/products/engage/social-login?utm_source="+Ua(janrain.settings.appUrl).host+"&utm_medium=Partner&utm_campaign=attribution");d.setAttribute("target","_blank");d.appendChild(document.createTextNode(c+e));b.appendChild(d);a.appendChild(b);return a}function y(){var a=document.createElement("div");a.style.backgroundColor=
ca?"orange":$a;a.className="janrainHeader";a.style.fontSize=Y+"px";a.style.color=Z;a.style.position="relative";a.style.height=ya+"px";40===xa&&(a.style.cssFloat="left");a.style.left=40===xa?"-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===xa?"81px":E+"px";a.style.zIndex="100";40===xa?L(a,null,D,0,0,D):L(a,null,D,D,0,0);40===xa&&(a.style.marginTop="-3px");a.style.textAlign="one column"===
l?"center":"left";var b=c();ea=document.createElement("div");ea.style.paddingLeft="1px";ea.style.fontFamily=ab;" "!==b&&ea.appendChild(document.createTextNode(b));a.appendChild(ea);return a}function z(){var a=document.createElement("div");a.id="janrainView";return a}function C(){var a,b;function c(e){e=e.touches[0];"one column"===l?a=e.pageY:b=e.pageX}function e(c){c.preventDefault();c=c.touches[0];c="one column"===l?a-c.pageY:b-c.pageX;if(35<c||-35>c){var d;d="one column"===l?0<c?"bottom":"top":
0<c?"right":"left";var o=j(),f=!0;"bottom"===d&&o+1==v&&(f=!1);"top"===d&&0==o&&(f=!1);"left"===d&&0==o&&(f=!1);"right"===d&&o+1==v&&(f=!1);f&&("one column"===l?m.style.top=parseInt(m.style.top)-c+"px":m.style.left=parseInt(m.style.left)-c+"px",s(d,function(){B()}),m.ontouchmove="")}}function d(){m.ontouchmove=e}var o,m,g,h,v,i=x,k=[];h=H();v=G?1:Math.ceil(Sa/Q);2<v&&t.log("Either reduce the number of providers, or increase the setting for providersPerPage.");m=document.createElement("div");m.setAttribute("id",
"janrainProviderPages");G&&(m.className="janrainConfigureMode");m.style.paddingTop=(6===f||7===f)&&f&&F?2*n:n+"px";if((6===f||7===f)&&!F)m.style.paddingTop=n+4+"px";1<v&&(m.ontouchstart=c,m.ontouchmove=e,m.ontouchend=d);40===xa&&"one row"===l?m.style.left=za+n+"px":f&&F?"one column"!==l&&(m.style.left=n+"px"):m.style.left=n+"px";40===xa&&"one row"===l&&(m.style.cssFloat="left");40===xa&&"one row"===l&&(m.style.marginTop="1px");"one column"===l&&(m.style.top=(f&&F?1:0)+ya+n+"px");"one row"!==l&&" "===
M&&(m.style.top="0px");"one column"===l&&" "===M&&(m.style.top="0px");o=E*v;m.style.position=f&&F&&"one column"===l?"relative":"absolute";"two column"===l&&!(Sa<=Q)&&(m.style.width=o+"px");"one row"===l&&(m.style.width=(!0===G?E+n:2*E)+"px");G&&(i=0);b=0;a=0;for(var p=0;p<v;p++){for(g=0;g<=i;g++)k[g]=document.createElement("ul"),k[g].className="providers",k[g].id="janrainProviders_"+g,1<i&&(k[g].style.cssFloat="left"),1<i&&(k[g].style.styleFloat="left"),k[g].style.listStyleType="none",k[g].style.marginTop=
"0px",k[g].style.marginLeft="0px",k[g].style.marginRight="0px",k[g].style.marginBottom="0px",k[g].style.padding="0px";o=document.createElement("div");o.className="janrainPage";o.setAttribute("pageIndex",p);f&&F&&1===v&&(o.style.width="110%");for(g=0;g<i;g++)o.appendChild(k[g]);if(G||1>x)for(g=0;g<=i;g++)o.appendChild(k[g]);for(var nc=h.length%2,q=G?Sa:Q,r=0;r<q&&!(0==h.length);r++){if(2==i)var u=1==nc?k[h.length%2?0:1]:k[h.length%2];if(1==i||0==i)u=k[0];g=h.shift();u.appendChild(g)}m.appendChild(o)}return m}
function B(a){0==j()?("left"===a&&(Ra.style.width=n+"px",Qa.style.display="block",Qa.style.width="20px"),"top"===a&&(Qa.style.height=n+"px",Ra.style.display="block",Ra.style.height="20px")):("right"===a&&(Qa.style.width=n+"px",Ra.style.display="block",Ra.style.width="20px"),"bottom"===a&&(Ra.style.height=n+"px",Qa.style.display="block",Qa.style.height="20px"))}function H(){for(var a=[],b=0;b<Sa;b++){var c=K(ga[b],b+1);a.push(c)}if("one column"==l){var e=a.slice(0),b=function(){var a=-Infinity,b,c,
d=function(){b=e[c].children[0].children[1];return void 0!==b};for(c=0;c<e.length;c++)d()&&(a=Math.max(a,b.offsetWidth));for(c=0;c<e.length;c++)d()&&(b.style.width=a+"px")};janrain.events.onModalOpen?janrain.events.onModalOpen.addHandler(b,!0):janrain.events.onAuthWidgetContentPlaced.addHandler(b,!0);janrain.events.onCustomizationChange.addHandler(b,!0)}return a}function J(a,b){b.style.cursor="pointer";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.setAttribute("id","janrain-"+a);b.setAttribute("role",
"button");"one row"===l?b.style.background="transparent":("gradient"===bb&&Rb(b,"bottom, #eeeeee, #ffffff"),"gray"===bb&&(b.style.backgroundColor="#eeeeee"),"white"===bb&&(b.style.backgroundColor="#ffffff"));W(b,"mouseover",function(){lb();"one row"===l?b.style.background="transparent":(b.style.backgroundColor="#E3E3E3",b.style.backgroundImage="")});W(b,"mouseout",function(){lb();"one row"===l?b.style.background="transparent":("gradient"===bb&&Rb(b,"bottom, #eeeeee, #ffffff"),"gray"===bb&&(b.style.backgroundColor=
"#eeeeee"),"white"===bb&&(b.style.backgroundColor="#ffffff"))});ib||N(b,a);return b}function K(a,b){function c(b){if(ha&&ha[a])return ha[a][b]}var e=document.createElement("li");e.style.listStyle="none";0==x&&!1===G&&(e.style.cssFloat="left");0==x&&!1===G&&(e.style.styleFloat="left");e.style.height=f&&F?A+2:A+"px";if("two column"==l){var d=G?3*n:Sa<=Q?0:3*n;e.style.width=6===f||lb&&F?(E-d-4*n)/x+"px":(E-d-(2==x?10:0))/x+"px"}e.style.marginTop="0px";if("one column"==l){if(7==f||6==f)e.style.marginTop=
"-1px";f&&F?e.style.marginRight="0px":e.style.width=E-n/2+"px";e.style.marginLeft="0px"}else e.style.marginRight=n+"px";0==x&&(e.style.width=A+"px");e.style.marginBottom=(7===f||6===f||f&&F?3:n)+"px";e.style.position="relative";0!=x&&(e.style.border="1px solid "+va);0!=x&&L(e,ia);var d=document.createElement("a"),o=document.createElement("span"),m=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";m.className="janrain-provider-text-color-"+a;m.style.fontFamily=ab;m.style.cursor="pointer";m.style.marginLeft="7px";m.style.textAlign="left";30==A&&(o.className="janrain-provider-icon-24 janrain-provider-icon-"+a,o.style.marginTop="3px",m.style.marginTop=
"9px",m.style.verticalAlign="top",m.style.display="inline-block");50==A&&(o.className="janrain-provider-icon-32 janrain-provider-icon-"+a,o.style.marginTop="9px",o.style.backgroundColor="transparent",m.style.marginTop="16px",m.style.fontSize="16px",m.style.lineHeight="20px",m.style.verticalAlign="top",m.style.display="inline-block");"one column"==l&&(d.style.textAlign="center");"two column"==l&&275>E&&(m.style.textIndent="-9999px",m.style.fontSize="0",m.style.marginLeft=0,d.style.textAlign="center");
2==x&&(30==A&&(d.style.width="auto"),50==A&&(o.style.marginLeft="5px"));if(0==x&&(30==A||50==A)){var o=document.createElement("a"),g=document.createElement("span"),h=document.createTextNode(a);"undefined"!==typeof b&&(o.tabIndex=b);o.className="janrain-provider-icon-32 janrain-provider-icon-bg janrain-provider-icon-"+a;o.style.marginTop="0px";o.href="javascript:void(0);";o.style.textDecoration="none";o.style.display="block";g.style.display="inline-block";g.style.textIndent="-9999px"}if(c("customSAML")||
c("customOpenid")){var v=c("friendlyName")||"Sign In",i=document.createTextNode(v);if(1==x||2==x){if(30==A||50==A)o.style.backgroundImage="url("+c("largeIcon")+")",m.appendChild(i),m.style.color=c("color")||"#000000";if(15<=i.length){var k="undefined"!==typeof i.textContent?"textContent":"nodeValue";i[k]=i[k].substr(0,15)}}if(0==x&&(30==A||50==A))h=document.createTextNode(v),o.style.backgroundImage="url("+c("largeIcon")+")";f&&10>f&&(o.style.backgroundImage="none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+
c("largeIcon")+"')")}else if("blank"!==a&&(1==x||2==x))30==A&&(o.style.backgroundColor="transparent",m.innerHTML=ha[a].friendlyName),50==A&&(o.style.backgroundColor="transparent",m.innerHTML=ha[a].friendlyName);6===f&&"one row"!==l&&(v=document.createElement("div"),v.style.height=o.style.height,v.style.width="90px",v.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=crop,src='"+o.src+"')",o.style.filter="alpha(opacity=0)",v.appendChild(o),e.appendChild(v));
0==x?(e.appendChild(o),o.appendChild(g),g.appendChild(h)):(e.appendChild(d),d.appendChild(o),d.appendChild(m));return J(a,e)}function O(a,b){var c=document.createElement("a"),d=e.translate.SIGN_IN_AS||"Sign in as {name}",d=d.replace("{name}",b),o=document.createElement("span"),d=document.createTextNode(d),m=document.createElement("span");o.className="janrain-provider-text-color-"+a;c.href="javascript:void(0);";c.style.textDecoration="none";c.style.display="block";if("customopenid"===a){var g=document.createElement("span");
document.createElement("span");g.className="janrain-provider-icon-32 janrain-provider-icon-"+a;g.style.backgroundImage="url("+Ea.largeIcon+")";o.style.color=Ea.customOpenIdProviderColor||"#000000";10>f&&(g.style.backgroundImage="none",g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ea.largeIcon+"')")}else"customsaml"===a?(g=document.createElement("span"),document.createElement("span"),g.className="janrain-provider-icon-32 janrain-provider-icon-"+
a,g.style.backgroundImage="url("+Pa.largeIcon+")",o.style.color=Pa.customSAMLProviderColor||"#000000",10>f&&(g.style.backgroundImage="none",g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Pa.largeIcon+"')")):(g=document.createElement("span"),g.className="janrain-provider-icon-24 janrain-provider-icon-"+a);m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontFamily=ab;var v=document.createElement("div"),i=7.5*d.length+30,k=
h();v.style.fontSize="16px";v.style.height="100%";v.style.position="relative";if(0==x||120>k)15<=d.length&&(v.style.fontSize="14px",i=7*d.length+30),20<=d.length&&(v.style.fontSize="12px",i=6*d.length+30),24<=d.length&&(v.style.fontSize="10px",i=5*d.length+50),30<=d.length&&(i="undefined"!==typeof d.textContent?"textContent":"nodeValue",d[i]=d[i].substr(0,26)+"...",i=162);v.style.width=i+"px";if(0==x||116>k)"customopenid"===a?(g=document.createElement("span"),document.createElement("span"),g.className=
"janrain-provider-icon-24 janrain-provider-icon-"+a,g.style.backgroundImage="url("+Ea.largeIcon+")",o.style.color=Ea.customOpenIdProviderColor||"#000000",f&&10>f&&(g.style.backgroundImage="none",g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ea.largeIcon+"')")):"SAML"===a?(g=document.createElement("span"),document.createElement("span"),g.className="janrain-provider-icon-24 janrain-provider-icon-"+a,g.style.backgroundImage="url("+Pa.largeIcon+
")",o.style.color=Pa.customSAMLProviderColor||"#000000",f&&10>f&&(g.style.backgroundImage="none",g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Pa.largeIcon+"')")):(g=document.createElement("span"),g.className="janrain-provider-icon-24 janrain-provider-icon-"+a);30===A&&(m.style.marginTop="9px",m.style.fontSize="12px",g.style.marginTop="3px");50===A&&(m.style.marginTop="16px",g.className="janrain-provider-icon-32 janrain-provider-icon-"+a,
g.style.marginTop="9px");"one row"===l&&30===A&&(g.style.marginTop="-1px");m.appendChild(o);o.appendChild(d);g.style.marginRight="10px";g.style.verticalAlign="top";c.style.overflow="hidden";c.style.position="relative";c.style.height=("one row"!==l?A:25)+"px";c.style.marginBottom="one row"===l?"-4px":"4px";"one row"===l&&(c.style.top="-4px");c.style.left="0px";f&&F&&(c.style.marginRight="5px");f&&F&&(c.style.marginLeft="3px");c.style.border="1px solid "+va;L(c,ia);"customopenid"===a&&(c.style.color=
ha[a].color);6===f||7===f||f&&F?v.style.left="10px":v.style.margin="0 auto";v.appendChild(g);v.appendChild(m);0==x&&(v.style.paddingTop="2px",m.style.marginTop="6px");0==x||116>k?(c.appendChild(v),v.style.width="auto"):(50===A&&parseInt(c.style.height),m.style.cssFloat="none",m.style.styleFloat="none",c.appendChild(g),c.appendChild(m));return J(a,c)}function N(a,b){W(a,"click",function(){R(b)})}function R(a){var b=ha[a],c={appUrl:e.appUrl,mobileDevice:Yb,language:e.language,popup:Za,tokenUrl:fc(e.tokenUrl||
location.href,Na)||location.href,facebookPermissions:fa,forceReauth:sa,widgetType:"auth",tokenAction:Ga,bpChannel:db,customOpenid:Oa,customOpenidOpxblob:e.customOpenidOpxblob,extParams:e.extParams,scopes:cb};b.name=a;new eb(b,c,function(){ta||(jb=setTimeout(function(){La(b)},300))})}function P(){var a=document.createElement("div");a.style.position="absolute";a.style.top="0px";a.style.left="0px";a.style.width=E+"px";a.style.zIndex="102";a.style.textAlign="center";a.style.padding=n+"px";a.style.backgroundColor=
$a;a.style.height=h()-(f&&F?0:2*n)+"px";L(a,D);return a}function S(a){var b=document.createElement("a"),c=document.createTextNode(e.translate.USE_ANOTHER_ACCOUNT||"switch accounts");b.setAttribute("class","janrainSwitchAccountLink");b.setAttribute("href","");b.style.fontSize="12px";b.style.fontFamily=ab;b.style.color=Z;b.onclick=a;b.appendChild(c);return b}function T(){return"modal"===I?document.getElementById("janrainModal"):"embed"===I?document.getElementById("janrainEngageEmbed"):!1}function U(){var a=
parseInt(u.style.width);return a=a+2*n+2}function V(){var a=T();null!==a&&"object"===typeof u&&u.parentNode===a&&a.removeChild(u)}function $(){var a="";"object"===typeof k&&(a=k.getState());return{type:I,width:U(),fontFamily:ab,fontSize:Y,fontColor:Z,backgroundColor:$a,borderColor:Ca,borderRadius:D,format:l,providersPerPage:Q,providers:ga,buttonBackgroundStyle:bb,buttonBorderColor:va,buttonBorderRadius:ia,actionText:c(),showAttribution:wa,modalState:a}}function aa(a){l=q("string",["default","two column",
"one column","one row"],"two column",a);"default"===l&&(l="two column");"one row"==a&&(D=q("number",[0,10],5,D));ja(Y)}function X(a){"two column"===l&&(E=q("number",[225,600],380,a));"one column"===l&&(E=q("number",[160,600],200,a));"one row"===l&&(A=30,a=Sa<=Q?n*(parseInt(Q)-1):n*(parseInt(Q)+2),40===xa&&(a+=za-n),E=A*Q+a);if(("two column"===l||"one column"===l)&&!G)E=E-2*n-2;f&&F&&(E=E+2*n+2);"one row"!==l&&(A=380<E?50:30)}function ka(b){"string"===typeof b&&(Ba=!0,M=q("text",null,M,b)," "===M?
D=q("number",[0,5],5,D,!0):ya="two column"!==l?a().headerHeight-5:a().headerHeight)}function ma(a){bb=q("string",["gray","white","gradient"],"gradient",a)}function na(a){va=q("color",null,"#CCCCCC",a)}function oa(a){$a=q("color",null,"#ffffff",a)}function pa(a){"undefined"===typeof a&&(a=5);D=" "===M||!wa||"one row"===l?q("number",[0,5],5,a,!0):q("number",[0,10],10,a)}function qa(a){wa=q("boolean",null,!0,a);h();D=a?q("number",[0,10],5,D,!0):q("number",[0,5],5,D,!0)}function ua(a){Ca=q("color",null,
"#C0C0C0",a)}function ja(a){if("two column"===l)Y=q("number",[8,30],gb,a);else if("one column"===l||"one row"===l)Y=q("number",[8,20],hb,a)}function Ha(a){Z=q("color",null,"#333333",a)}function Ja(a){if("object"==typeof a){x=g();for(var b=0,c=a.length;b<c;b++)ha[a[b]]||(t.log(a[b]+" is not a valid provider: removing."),a.splice(b,1),--b,--c);ga=a;Sa=a.length;"object"===typeof k&&k.setHeight(h()-2*n).refresh()}}function Ka(a){"two column"===l&&(Q=q("number",[4,6,8],6,a));"one column"===l&&(Q=q("number",
[1,6],6,a));"one row"===l&&(Q=Fb?Sa:q("number",[4,8],6,a),X(E))}function La(a){var b=document.createTextNode(e.translate&&e.translate.SIGNING_IN?e.translate.SIGNING_IN:"Signing in ..."),c=document.createElement("div");la=P(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%";la.appendChild(c);u&&u.appendChild(la)}function Ma(a){return!(ib||Va||-1===ga.indexOf(a))}var ca=!1,E=380,Ba=!1,ab="Helvetica, lucida grande, Verdana, sans-serif",
Y=0,Z="#666666",$a="#ffffff",Ca="#C0C0C0",D=10,u,ea,l="two column",x,Fa,Q=6,ga=["aol","yahoo","openid"],Sa=ga.length,va="#CCCCCC",ia=5,bb="gradient",A=30,ya=a().headerHeight,xa=60,za=89,Ia=a().footerHeight,n=5,Aa=10,M="Sign in using your account with",la,da,Qa,Ra,wa=!0,Va=!1,Wa=!1,Xa,Ya;return{build:b,setFormat:function(b){b&&aa(b);"two column"!==l&&(ya=a().headerHeight-5);"two column"===l&&(Q=a().twoColumn.providersPerPage,ya=a().headerHeight);return this},setActionText:function(a){"string"===typeof a&&
ka(a);return this},setFontSize:function(a){a&&ja(a);return this},setFontFamily:function(a){a&&a&&(ab=a);return this},setFontColor:function(a){a&&Ha(a);return this},setButtonBorderColor:function(a){a&&na(a);return this},setButtonBorderRadius:function(a){if("string"==typeof a||"number"==typeof a)ia=q("number",[0,20],5,a);return this},setButtonBackgroundStyle:function(a){a&&ma(a);return this},setWidth:function(a){("string"==typeof a||"number"==typeof a)&&X(a);return this},refresh:function(){V();var a=
T();b();var c=Da();c&&!fb?ra("expected_tab",c):(null!==a&&"object"===typeof u&&a.appendChild(u),"object"===typeof k&&k.setHeight(parseInt(u.style.height)+2).refresh());ib&&"object"===typeof k&&k.setHeight(parseInt(u.style.height)+2).refresh();janrain.events.onCustomizationChange.fire($());return this},remove:function(){V();return this},setRowHeight:function(a){if(0!==g())return this;a||(a=60);oneRowHeaderHeight=q("number",[40,60,90],60,a);40===oneRowHeaderHeight&&(A=30,xa=40);60===oneRowHeaderHeight&&
(A=30);90===oneRowHeaderHeight&&(A=50);return this},setHeight:function(a){"object"==typeof u&&(u.style.height=a+"px");return this},setBackgroundColor:function(a){a&&oa(a);return this},setBorderColor:function(a){a&&ua(a);return this},setBorderRadius:function(a){("string"==typeof a||"number"==typeof a)&&pa(a);return this},setProviders:function(a){"object"==typeof a&&Ja(a);return this},setProvidersPerPage:function(a){if("string"==typeof a||"number"==typeof a)Ka(a),"object"===typeof k&&k.setHeight(h()).refresh("janrainModal");
return this},setShowAttribution:function(a){"boolean"===typeof a&&qa(a);return this},setPreviewMode:function(a){"boolean"===typeof a&&(ib=a);return this},setProviderFlow:function(a,b){return N(a,b)},triggerFlow:function(a){return R(a)},setNoReturnExperience:function(a){"boolean"===typeof a&&(Va=a);return this},setNoReturnExperienceSwitchAccountLink:function(a){"boolean"===typeof a&&(Wa=a);return this},setConfigureMode:function(a){"boolean"===typeof a&&(G=a,x=g());return this},embed:function(a){if((Fa=
a)&&"object"==typeof u)u.style.position="relative";return this},getContentsDiv:function(){return u},getErrorPage:function(a,b){var c=document.createTextNode(b.msg),d=document.createElement("div");d.appendChild(c);d.style.color=Z;d.style.fontSize=Y+"px";d.style.width="100%";var e=P(a);e.className="janrainAuthErrorPage";e.appendChild(d);e.appendChild(S(function(){u.removeChild(e);u.removeChild(la);sa=!0;return!1},a));u.appendChild(e);return u},showReturnExperience:Ma,getReturnExperience:function(a,
b){if(!Ma(a))return u;var c=O(a,b),d=P(a),e=document.createElement("div"),o=function(){sa=fb=!0;u.removeChild(d);document.getElementById("janrainView").style.visibility="inherit";return!1};e.style.position="relative";e.style.top="50%";30===A&&(e.style.marginTop="-25px");50===A&&(e.style.marginTop="-35px");0==x&&(e.style.top="0",e.style.marginTop="0");d.id="janrainAuthReturnExperience";d.appendChild(e);e.appendChild(c);Wa||e.appendChild(S(o,a));u.appendChild(d);return u},getWidth:function(){return U()},
getActualHeight:function(){return parseInt(u.style.height)+2},getHeight:function(){return h()-2*n},getState:function(){return $()},setState:function(b){if(i("customizable_auth_widget_styling")){var c=b.fontFamily;c&&(ab=c);ja(b.fontSize);Ha(b.fontColor);oa(b.backgroundColor);ua(b.borderColor);"embed"===I&&b.format&&(b.format&&aa(b.format),"two column"!==l&&(ya=a().headerHeight-5),"two column"===l&&(Q=a().twoColumn.providersPerPage,ya=a().headerHeight));if("string"==typeof b.providersPerPage||"number"==
typeof b.providersPerPage)Ka(b.providersPerPage),"object"===typeof k&&k.setHeight(h()).refresh("janrainModal");ma(b.buttonBackgroundStyle);na(b.buttonBorderColor);ia=q("number",[0,20],5,b.buttonBorderRadius);ka(b.actionText);qa(b.showAttribution);pa(b.borderRadius);"embed"===I&&("string"==typeof width||"number"==typeof width)&&X(b.width)}Ja(b.providers)},showNotice:function(){La()},removeNotice:function(){Ub(la)},removeReturnExperience:function(){var a=document.getElementById("janrainAuthReturnExperience");
Ub(a)}}}function b(){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 H).setName(la);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())},X(e.appUrl+"/signin/oauth_token?provider=facebook&callback=janrain.engage.signin.facebookAutoLoginCallback&token="+a.authResponse.accessToken+"&origin_domain="+window.location.hostname))})};X("//connect.facebook.net/en_US/all.js")}function c(){if("object"===typeof h)if("object"===typeof P){var a=h.getState();a.width=P.width;P=a}else P=h.getState();"object"===typeof h&&h.remove();"object"===typeof k&&k.remove();I="modal";w();"object"===typeof h&&P&&i("customizable_auth_widget_styling")&&
h.setState(P);"object"===typeof k&&Fa&&i("customizable_auth_widget_styling")&&k.setState(Fa);"object"===typeof k&&k.show();"object"===typeof h&&h.refresh()}function d(){if("object"===typeof h){if("object"===typeof P){var a=h.getState();a.borderRadius=P.borderRadius;a.format=P.format;a.width=P.width;P=a}else P=h.getState();Fa=P.modalState;delete Fa.orientation}"object"===typeof h&&h.remove();"object"===typeof k&&k.remove();"object"===typeof k&&(k="");I="embed";z();"object"===typeof h&&P&&i("customizable_auth_widget_styling")&&
h.setState(P);"object"===typeof h&&h.refresh()}function B(){var a,b;w();b=document.getElementsByTagName("a");var c=RegExp("(\\s|^)"+e.linkClass+"(\\s|$)");for(a in b)c.test(b[a].className)&&(b[a].onclick=j)}function g(a){var b=parseInt(janrain.settings.fontSize,10);"two column"===Gb?a.setFontSize(b||gb):a.setFontSize(b||hb)}function z(){var b=Da();h=new a;g(h);h.setBackgroundColor(qb).embed(!0).setPreviewMode(rb).setShowAttribution(sb).setNoReturnExperience(tb).setNoReturnExperienceSwitchAccountLink(Hb).setFormat(Gb).setRowHeight(Ib).setFontSize(ub).setFontFamily(vb).setFontColor(wb).setActionText(xb).setProviders(Jb).setProvidersPerPage(Kb).setWidth(Lb).setBorderColor(ea).setBorderRadius(Ca).setButtonBorderColor(yb).setButtonBorderRadius(zb).setButtonBackgroundStyle(Ab).build();
var c=document.getElementById("janrainEngageEmbed");null===c&&(c=document.getElementById("janrainModal"));S||(b?(N("welcome_info_name",unescape(y("welcome_info_name"))),ra("expected_tab",b)):oa(c,h.getContentsDiv()))}function j(){"object"===typeof k&&k.show();return!1}function w(){var b=mb(pb,ob),c=Da();if("undefined"===typeof b||0>b)b=5;h=new a;g(h);h.setBackgroundColor(qb).setPreviewMode(rb).setShowAttribution(sb).setNoReturnExperience(tb).setNoReturnExperienceSwitchAccountLink(Hb).setFontSize(ub).setFontFamily(vb).setFontColor(wb).setActionText(xb).setProviders(Jb).setProvidersPerPage(Kb).setBorderRadius(b).setButtonBorderColor(yb).setButtonBorderRadius(zb).setButtonBackgroundStyle(Ab).build();
if("object"!==typeof k){k=new Vb;k.ready=!1;var d=k.addContent;k.addContent=function(a){k.ready=!0;d(a);janrain.events.onModalWidgetReady.fire()}}k.setHeight(h.getActualHeight()).setWidth(h.getWidth()).setPreviewMode(rb).setBorderColor(Y).setBorder(ob).setBorderOpacity(Z).setBorderRadius(pb);S||(c?(N("welcome_info_name",unescape(y("welcome_info_name"))),ra("expected_tab",c)):k.addContent(h.getContentsDiv()));k.onOrientationChange.addHandler(function(a){"portrait"===a.orientation&&h.setFormat(a.format).setWidth(200).refresh({center:!0});
"landscape"===a.orientation&&h.setHeight(a.height).setWidth(a.width).setFormat(a.format).refresh({center:!0});k.setHeight(h.getActualHeight());k.setWidth(h.getWidth())},!0);k.onShow.addHandler(function(){"object"==typeof h&&k.setWidth(h.getWidth())},!0);k.onBorderWidthChange.addHandler(function(a){"object"===typeof k&&"object"===typeof h&&(h.setBorderRadius(a.radius).refresh(),a=h.getState(),a.borderRadius<a.modalState.borderRadius-a.modalState.borderWidth&&k.setBorderRadius(a.borderRadius+a.modalState.borderWidth))},
!0);k.onBorderRadiusChange.addHandler(function(a){"object"===typeof h&&(h.setBorderRadius(a.radius).refresh(),a=h.getState(),a.borderRadius<a.modalState.borderRadius-a.modalState.borderWidth&&k.setBorderRadius(a.borderRadius+a.modalState.borderWidth))},!0)}function r(a,b){if(!i("customizable_auth_widget_styling"))return!1;if("object"===typeof h)return b(a),!0}function K(a){return r(a,function(a){h.setBackgroundColor(a).refresh()})}function R(a){return r(a,function(a){h.setBorderRadius(a).refresh()})}
function V(a){return r(a,function(a){h.setBorderColor(a).refresh()})}function pa(a){return"modal"===I?!1:r(a,function(a){h.setWidth(a).refresh({center:!0})})}function Ha(a){return r(a,function(a){h.setActionText(a).refresh()})}function Ja(a){return r(a,function(a){h.setButtonBorderColor(a).refresh()})}function Ma(a){return r(a,function(a){h.setButtonBorderRadius(a).refresh()})}function C(a){return r(a,function(a){h.setButtonBackgroundStyle(a).refresh()})}function Ka(a){return"modal"==I?!1:r(a,function(a){h.setFormat(a).refresh()})}
function La(a){return r(a,function(a){h.setProvidersPerPage(a).refresh()})}function p(a){return r(a,function(a){h.setFontFamily(a).refresh()})}function va(a){return r(a,function(a){h.setFontSize(a).refresh()})}function ia(a){return r(a,function(a){h.setFontColor(a).refresh()})}function y(a){var b;if("single cookie"===ua){b=H().getCookie("janrain_engage_login_data");if(!b)return;b=O.parse(b);return!b[a]?void 0:a=b[a]}if("default"===ua)return a=H().getCookie(a),!a?void 0:a}function za(a,b,c){var d;
if(!a||!b)return!1;c||(c=1);if("single cookie"===ua)return(oldCookieJSON=H().getCookie("janrain_engage_login_data"))||(oldCookieJSON="{}"),c=O.parse(oldCookieJSON),c[a]=b,d=new H,d.setName("janrain_engage_login_data").setValue(O.stringify(c)).setDomain(window.location.hostname).setExpiration(1826).create(),!0;return"default"===ua?(d=new H,d.setName(a).setValue(b).setDomain(window.location.hostname).setExpiration(c).create(),!0):!1}function Ba(a,b){if("expected_tab"===a&&!b){var c=y("login_tab");c&&
Ba("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;tb?H().setName(a).remove():za(a,b,1826)}function aa(a,b){var c={};a||(a=Mb);b||(b=Mb.appUrl);if(f&&3>Ya)return c.widget_type=a.widget_type,c.provider=a.provider,c.time=(new Date).getTime(),c=nb(c),X(b+"/signin/get_login_info"+c),Ya++,!0;"object"===typeof janrain.events.onProviderLoginCancel&&janrain.events.onProviderLoginCancel.fire(a);
"undefined"!==typeof jb&&clearTimeout(jb);"undefined"!==typeof h&&h.refresh&&h.refresh();janrain.events.onShareLoginCancel&&"fail"===a.stat&&janrain.events.onShareLoginCancel.fire(a);return!1}function eb(a,b,c){var d=b.appUrl,e=janrain.settings.customSAML&&a.customSAML,f=janrain.settings.customOpenid&&a.customOpenid,d=e||"saml2"==a.flow?d+"/saml2/sso/start":d+("/"+a.flow+"/start"),g=janrain.settings.originUrl||window.location.href;b.mobileDevice&&(g="mobile");var h=b.language||"en",i=b.popup?"xdr":
"xdrsw",k=b.tokenUrl||window.location.href,j={};Mb={appUrl:b.appUrl,provider:a.name,widget_type:b.widgetType};j.language_preference=h;j.token_url=k;j.display="popup";j.widget=!0;"object"===typeof b.facebookPermissions&&(j.ext_perm=b.facebookPermissions.toString());e?j.saml_provider=a.identifier:j.openid_identifier=a.identifier;j.origin_url=g;j.provider_name=a.name;j.force_reauth=b.forceReauth;j.xdReceiver=b.appUrl+"/"+i;j.callback="none";j.widget_type=b.widgetType;j.token_action="url";janrain.settings.captureDomain&&
(j.capture_domain=janrain.settings.captureDomain);if("event"===b.tokenAction||"hybrid"===b.tokenAction)j.token_action="event";b.mobileDevice&&"hybrid"===b.tokenAction&&(j.token_action="url");b.bpChannel&&(j.bp_channel=b.bpChannel);b.extParams&&b.extParams[a.name]&&(j.ext_params=b.extParams[a.name]);b.scopes&&"object"===typeof b.scopes[a.name]&&(j.override_scopes=b.scopes[a.name].toString());b.sharingType&&(j.sharing_type=b.sharingType);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&&(j.opx_blob=g);d+=nb(j);(function(){janrain.events.onProviderLoginStart.fire({provider:a.name,width:a.width,height:a.height});(function(a,b,c){if(a&&b){var c=c||1826,d=H(),e=window.janrain;e&&e.settings&&"single cookie"===e.settings.storageType?(e=O.parse(H().getCookie("janrain_engage_login_data")||"{}"),e[a]=b,d.setName("janrain_engage_login_data").setValue(O.stringify(e))):d.setName(a).setValue(b);d.setDomain(window.location.hostname).setExpiration(c).create()}})("login_tab",
a.name,1);var g;b.mobileDevice&&"event"!==b.tokenAction||!b.popup?X(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 jc(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=nb(d);"function"===typeof c&&c();X(b.appUrl+"/signin/get_login_info"+
e);janrain.events.onProviderLoginComplete.fire({provider:a.name})}).show())})()}function N(a,b){if(!b||"undefined"===b||"welcome_info_name"!==a)return!1}function Da(){e.noReturnExperience&&("single cookie"===e.storageType?H().setName("janrain_engage_login_data").setDomain(window.location.hostname).remove():(Wa("login_tab"),Wa("expected_tab")));$();var a=y("login_tab"),b=y("expected_tab");return ma.isAndroid()?a:b}function $(){var a=y("login_tab"),b=y("expected_tab"),c=y("welcome_info_name");if(!a||
!b||!c)_noReturnExperience=!0,Wa("login_tab"),Wa("expected_tab"),Wa("welcome_info_name"),H().setUseLocalStorage(!0).setName("janrainLastAuthMethod").remove()}function ra(a,b){function c(){janrain.events.onReturnExperienceFound.fire({returnProvider:b,welcomeName:d})}var d=unescape(y("welcome_info_name")),e=function(a){var c=function(){600>a&&setTimeout(function(){e(++a)},50)};if("object"!==typeof h)return c(),!1;"modal"===I?k.addContent(h.getReturnExperience(b,d)):"embed"===I&&(oa(document.getElementById("janrainEngageEmbed"),
h.getReturnExperience(b,d)),h.showReturnExperience(b)&&(document.getElementById("janrainView").style.visibility="hidden"));"modal"===I&&janrain.events.onModalWidgetReady.fire()};if("expected_tab"!==a||!b)return!1;"object"===typeof h&&h.removeReturnExperience();Xa?c():janrain.events.onAuthWidgetLoad.addHandler(c,!0);e(0)}function oa(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()):(t.log('Missing container div, please place this div where you wantthe embedded widget to be displayed on your page- <div id="janrainEngageEmbed"></div>.'),t.show());return a}function ga(a,b,c){c=c?gc:Eb;return Na=b?c(Na,a):a}function Ia(){function a(b){if(!("customsaml"===b&&!e.customSAML||"customopenid"===b&&!e.customOpenid)){var c,d;if("customsaml"===b)c="customSAMLProviderId",d=["customSAMLProviderName",
"customSAMLProviderColor","customSAMLLargeIcon"];else if("customopenid"===b)c="customOpenidProviderId",d="customOpenIdProviderName,customOpenIdProviderColor,customOpenidLargeIcon,customOpenidIdentifier,customOpenidFlow,customOpenidOpxblob".split(",");else{t.log("Bad provider: "+b);t.show();return}var f=typeof e[c];if("undefined"===f||"string"===f){var g=e[c]||b;e[c]=[g];U(d,function(a){if("object"!==typeof e[a]){var b=e[a];e[a]={};e[a][g]=b}})}}}function b(a,c){var d=hc,f={customopenid:["customOpenidFlow",
"customOpenidIdentifier"],customsaml:["customSAMLProviderId"]};if(e[{customopenid:"customOpenid",customsaml:"customSAML"}[a]]&&i("customizable_auth_widget_styling")){"customopenid"===a&&(Oa=!0);for(var f=f[a],g=0,o=f.length;g<o;g++)if(!e[f[g]])return t.log(d({provider:a,setting:f[g]},"Missing {| setting |}. {| setting |} is required when adding a {| provider |} provider")),t.show(),!1;var h={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"}},d=function(b){b=e[h[a][b]];return"object"===typeof b?b[c]:b},f={width:d("modalWidth")||800,height:d("modalHeight")||600,friendlyName:d("friendlyName"),
color:d("providerColor"),largeIcon:d("largeIcon"),identifier:d("identifier")};"customopenid"===a?(f.flow=d("flow"),f.customOpenid=!0,f.customOpenidOpxblob=d("customOpenidOpxblob")):"customsaml"===a&&(f.customSAML=!0,f.identifier=c);ha[c]=f}}e=janrain.settings;if("en"!==janrain.settings.language&&"undefined"===typeof janrain.settings.translate)return++da,0===da%2E3&&s.error("Translations are not loading. janrain.settings.translate is undef."),setTimeout(Ia,5),!1;!0===e.noProvidersCss&&!0===e.custom||
(Sb(Ob()+"providers.css"),f&&9>=f&&Sb(Ob()+"providers-ie.css"));if(e.stop)return!0;Ga=e.tokenAction?e.tokenAction:Ga;if(!e.tokenUrl&&"event"!=Ga)return t.log("Missing tokenUrl.  tokenUrl is required."),t.show(),!1;qa=e.appUrl;I=q("string",["modal","embed"],"embed",e.type?e.type:I);S=e.multi?e.multi:S;ta=e.custom?e.custom:ta;sa=e.forceReauth?e.forceReauth:sa;db=e.bpChannel?e.bpChannel:db;fa=e.facebookPermissions?e.facebookPermissions:fa;cb=e.scopes?e.scopes:cb;Aa=!!e.facebookAutoLogin;ua=e.storageType?
q("string",["default","single cookie"],"default",e.storageType):ua;Za="boolean"===typeof e.popup?e.popup:Za;Yb&&"event"!==Ga&&(Za=!1);ca=e.returnExperienceTimeout?e.returnExperienceTimeout:ca;S&&(setTimeout(function(){var a=Da();if(a)N("welcome_info_name",unescape(y("welcome_info_name"))),ra("expected_tab",a),document.getElementById("janrainView").style.visibility="hidden";else if(a=function(){if("modal"===I)k.addContent(h.getContentsDiv());else if("embed"===I){var a=document.getElementById("janrainEngageEmbed");
oa(a,h.getContentsDiv())}"undefined"!==typeof b&&Ta.removeHandler(b)},h)a();else var b=Ta.addHandler(a)},ca),X(e.appUrl+"/signin/get_cookies"));a("customopenid");a("customsaml");e.customOpenid&&U(e.customOpenidProviderId,function(a){b("customopenid",a)});e.customSAML&&U(e.customSAMLProviderId,function(a){b("customsaml",a)});$();if(ta)return!0;Ga=e.tokenAction?e.tokenAction:Ga;ob=i("customizable_auth_widget_styling")?e.modalBorderWidth:ob;Y=i("customizable_auth_widget_styling")?e.modalBorderColor:
Y;pb=i("customizable_auth_widget_styling")?e.modalBorderRadius:pb;Z=i("customizable_auth_widget_styling")?e.modalBorderOpacity:Z;qb=i("customizable_auth_widget_styling")?e.backgroundColor:qb;Ca=i("customizable_auth_widget_styling")?e.borderRadius:Ca;ea=i("customizable_auth_widget_styling")?e.borderColor:ea;Gb=e.format;wb=i("customizable_auth_widget_styling")?e.fontColor:wb;ub=i("customizable_auth_widget_styling")?e.fontSize:ub;vb=i("customizable_auth_widget_styling")?e.fontFamily:vb;Lb=i("customizable_auth_widget_styling")?
e.width:Lb;Ib=i("customizable_auth_widget_styling")?e.rowHeight:Ib;Kb=e.providersPerPage;Fb=i("customizable_auth_widget_styling")?e.providersNotPaged:Fb;xb=i("customizable_auth_widget_styling")?e.actionText:xb;yb=i("customizable_auth_widget_styling")?e.buttonBorderColor:yb;zb=i("customizable_auth_widget_styling")?e.buttonBorderRadius:zb;Ab=i("customizable_auth_widget_styling")?e.buttonBackgroundStyle:Ab;sb=i("customizable_auth_widget_hide_attribution")?e.showAttribution:sb;rb=e.previewMode;tb=e.noReturnExperience;
Hb=e.noReturnExperienceSwitchAccountLink;Jb=e.providers;"undefined"===typeof janrain.settings.translate&&(janrain.settings.translate=e.translate={});if(e.customOpenid&&i("customizable_auth_widget_styling")){if(!e.customOpenidLargeIcon)return t.log("Missing customOpenidLargeIcon.  customOpenidLargeIcon is required and should be the full path to an image that is 50px x 50px."),t.show(),!1;Ea={largeIcon:e.customOpenidLargeIcon,customOpenIdProviderName:e.customOpenIdProviderName||janrain.settings.translate.SIGN_IN||
"Sign in",customOpenIdProviderColor:e.customOpenIdProviderColor}}if(e.customSAML&&i("customizable_auth_widget_styling")){if(!e.customSAMLLargeIcon)return t.log("Missing customSAMLLargeIcon.  customSAMLLargeIcon is required and should be the full path to an image that is 50px x 50px."),t.show(),!1;Pa={largeIcon:e.customSAMLLargeIcon,customSAMLProviderName:e.customSAMLProviderName||janrain.settings.translate.SIGN_IN||"Sign in",customSAMLProviderColor:e.customSAMLProviderColor}}e.previewMode?("modal"===
I&&kb(c),"embed"===I&&kb(d)):("modal"===I&&kb(B),"embed"===I&&kb(z));Zb&&W(window,"unload",function(){})}var qa,fa,cb,Aa=!1,la="janrain_engage_facebook_auto_login",db,Oa=!1,sa=!1,Ga="url",Na={},I="embed",S=!1,ca=300,sa=!1,Za=!0,ta=!1,da=0,ua="default",Ea,Pa,Fa,k,ob,Y,pb,Z,h,P,qb,Ca,ea,Lb,Ib,Gb,Jb=[],Fb=!1,Kb,xb,ub,vb,wb,yb,zb,Ab,rb,tb,Hb,sb,fb=!1,Xa=!1,gb=18,hb=14;janrain.events.onAuthWidgetLoad||(janrain.events.onAuthWidgetLoad=J(!0));janrain.events.onModalWidgetReady||(janrain.events.onModalWidgetReady=
J());janrain.events.onReturnExperienceFound||(janrain.events.onReturnExperienceFound=J());janrain.events.onAuthWidgetLoad.addHandler(function(){Xa=!0;var a=(new H).getCookie(la);Aa&&!a&&b()},!0);janrain.events.onProviderLoginSuccess.addHandler(function(){var a=document.getElementById("janrainAuthReturnExperience"),b=document.getElementById("janrainView");a&&(a.style.visibility="hidden");b&&(b.style.visibility="hidden")});janrain.events.onAuthWidgetLoad.addHandler(function(){var a=y("expected_tab"),
b=y("welcome_info_name");U(janrain.settings.beforeJanrainWidgetOnLoad||[],Tb);"function"===typeof janrainWidgetOnload?(U(janrain.settings.beforeJanrainWidgetOnLoad||[],Tb),ta?(janrainWidgetOnload(),!S&&a&&b&&janrain.events.onReturnExperienceFound.fire({returnProvider:a,welcomeName:unescape(b)})):h?janrainWidgetOnload(h.getState()):janrainWidgetOnload()):s.warn("No such function 'janrainWidgetOnload'. Does 'janrainCaptureWidgetOnLoad' exist?")},!0);for(var jb,Ya=0,Mb,Nb="onAuthWidgetContentPlaced,onProviderLoginStart,onProviderLoginError,onProviderLoginToken,onProviderLoginCancel,onProviderLoginSuccess,onProviderLoginComplete,onProviderLogoutStart,onProviderLogoutComplete".split(","),
Bb=0;Bb<Nb.length;Bb++)"undefined"===typeof janrain.events[Nb[Bb]]&&(janrain.events[Nb[Bb]]=new Va);janrain.events.onProviderLoginError.addHandler(function(a){if(ta)return!0;var b=y("login_tab");if("modal"===I){var c=document.getElementById("janrainModal");c&&c.appendChild(h.getErrorPage(b,a.err))}"embed"===I&&(c=document.getElementById("janrainEngageEmbed"))&&oa(c,h.getErrorPage(b,a.err))},!0);Ia();return{status:"loaded",logoutFacebook:function(a){if("function"!==typeof a)throw Error("janrain.engage.signin.logoutFacebook takes a callback function as its only parameter.");
var b=!1,c=function(d){var e=Ua(d.origin).host,f=Ua(qa).host;e!==f?s.forceError("Ignoring postMessage due to domain mismatch: ",d.origin+" does not match "+qa):0===d.data.indexOf("janrainLogoutFacebook:")&&(e=d.data.indexOf(":")+1,d=d.data.substring(e),d=O.parse(d),"ok"!==d.status&&s.forceError("Failed to log out of Facebook"),b=!0,na(window,"message",c),a(d))};W(window,"message",c);var d=qa+"/widget/logout_facebook?facebookAppId="+janrain.settings.facebookAppId+"&url="+encodeURIComponent(window.location.protocol+
"//"+window.location.host);Cb("janrainLogoutFacebook",d);setTimeout(function(){b||(na(window,"message",c),a({status:"fail",message:"Timeout attempting to log out of Facebook"}))},5E3)},appendTokenParams:function(a,b,c){ga(a,b,c)},appendTokenParamsCumulative:function(a,b){ga(a,!0,b)},setBackplaneChannel:function(a){db=a},setLoginCookie:function(a,b){Ba(a,b)},loginHandler:function(a){var b=Ga;a?("ok"===a.stat&&("event"===b||"hybrid"===b||"noRedirect"===b?("undefined"!=typeof storage&&storage.set("janrainEngageAuthenticityToken",
a.authenticity_token),"noRedirect"!==b&&X(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),"undefined"!==typeof h&&h.refresh&&h.refresh()):janrain.events.onProviderLoginError.fire(a),"undefined"!==typeof jb&&clearTimeout(jb),janrain.events.onShareLoginCancel&&"fail"===a.stat&&janrain.events.onShareLoginCancel.fire(a))):
aa()},cancelLogin:function(a){aa(a,e.appUrl);!ta&&h&&h.removeNotice()},removeNotice:function(){h&&h.removeNotice()},setWelcomeInfoName:function(a,b){N(a,b)},setReturnExperience:function(a,b){ra(a,b)},setNoReturnExperience:function(a,b){var c;"boolean"===typeof a&&h?(h.setNoReturnExperience(a),b||h.refresh(),c=!0):c=!1;return c},setNoReturnExperienceSwitchAccountLink:function(a){"boolean"===typeof a&&h?(h.setNoReturnExperienceSwitchAccountLink(a).refresh(),a=!0):a=!1;return a},setPreviewMode:function(a){"boolean"===
typeof a&&h?(h.setPreviewMode(a).refresh(),a=!0):a=!1;return a},setConfigureMode:function(a){"boolean"===typeof a&&h?(h.setConfigureMode(a).refresh(),a=!0):a=!1;return a},setCustom:function(a){ta=a},getState:function(){return"object"===typeof h?h.getState():!1},setProviderFlow:function(b,c){return!i("customizable_auth_widget_styling")?!1:a().setProviderFlow(b,c)},triggerFlow:function(b){return!i("customizable_auth_widget_styling")?!1:a().triggerFlow(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(){d()},setBackgroundColor:function(a){return K(a)},setBorderColor:function(a){return V(a)},
setBorderRadius:function(a){return R(a)},setWidth:function(a){return pa(a)},setActionText:function(a){return Ha(a)},setFontFamily:function(a){return p(a)},setFontSize:function(a){return va(a)},setFontColor:function(a){return ia(a)},setFormat:function(a){return Ka(a)},setButtonBorderColor:function(a){return Ja(a)},setButtonBorderRadius:function(a){return Ma(a)},setButtonBackgroundStyle:function(a){return C(a)},setProviders:function(a){var b;"object"===typeof h&&(G?h.setProviders(a):h.setProviders(a).refresh(),
b=!0);return b},setProvidersPerPage:function(a){return La(a)},setShowAttribution:function(a){var b;i("customizable_auth_widget_hide_attribution")?"object"===typeof h&&h.setShowAttribution(a).refresh():b=!1;return b},refresh:function(){return h.refresh()},getWidth:function(){return h.getWidth()}},modal:{init:function(){c()},close:function(){"object"==typeof k&&k.close()},create:function(){return new Vb},setBorder:function(a){i("customizable_auth_widget_styling")?("object"===typeof k&&(k.setBorder(a),
k.refresh({center:!0})),a=!0):a=!1;return a},setBorderColor:function(a){i("customizable_auth_widget_styling")?("object"===typeof k&&(k.setBorderColor(a),k.refresh()),a=!0):a=!1;return a},setBorderOpacity:function(a){i("customizable_auth_widget_styling")?("object"===typeof k&&(k.setBorderOpacity(a),k.refresh()),a=!0):a=!1;return a},setBorderRadius:function(a){i("customizable_auth_widget_styling")?("object"==typeof k&&(k.setBorderRadius(a),k.refresh()),a=!0):a=!1;return a}}}};z=new function(){return{status:"not loaded"}};
Ha=new function(){return{status:"not loaded"}};Xb();return{engage:{signin:"loaded"===Z(janrain,"engage.signin.status")?janrain.engage.signin:va,share:"loaded"===Z(janrain,"engage.share.status")?janrain.engage.share:z},capture:{ui:Ha}}}();janrain.engage=janrain.apps.engage;janrain.capture=janrain.apps.capture;