/* -*- Engage Auth Widget -*- Copyright (c) 2012, Janrain, Inc. All rights reserved. Version: 2013.1_ws_widgets_rc9 */ "object"!==typeof window.janrain&&(window.janrain={});janrain.apps={}; janrain.apps=function(){var $a,Ca,ja,Pa;function Eb(){var a;a="http:"===document.location.protocol?"http://cdn.quilt.janrain.com/2.1.4/":"https://d3hmp0045zy3cs.cloudfront.net/2.1.4/";if(janrain.settings.capture&&janrain.settings.capture.quiltVersion){a=a.split("/");if("cdn.quilt.janrain.com"===a[2]||"d3hmp0045zy3cs.cloudfront.net"===a[2])a[a.length-2]=janrain.settings.capture.quiltVersion;a=a.join("/")}return a}function Pb(a,e,b){var c;if(document.getElementById(a))return!1;if(f){c="";var d=document.createElement("div"); d.innerHTML=c+"';document.body&&document.body.appendChild(d);c=document.getElementById(a)}else c=document.createElement("iframe"),c.setAttribute("name",a),c.id=a,c.setAttribute("src",e),c.style.display="none",document.body&&document.body.appendChild(c);"function"===typeof b&&b();return c}function W(a){for(var e="",b=0;bMath.round((new Date(d)).getTime()/ 1E3)?(c=b,a(),"function"===typeof e&&e(!1)):"function"===typeof e&&e(g):(new O).getCookie(b+"_session")?"function"===typeof e&&e(g):(c=b,a())}):"function"===typeof e&&e(!1)});else if(H=t.getItem(b),g=t.getItem(b+"_Expires"),H){if(!(g&&Math.round((new Date).getTime()/1E3)>Math.round((new Date(g)).getTime()/1E3))&&(g||(new O).getCookie(b+"_session")))return H;c=b;a()}else return!1;else{g=document.cookie.split(";");f=g.length;for(var i=0;ib&&(b=0);b>a&&(b=a);return b}function Fb(a,e){if(f&&9>=f)return a.style.backgroundImage="url('"+vb("rel/img/c7a91677d94f4a79e1b26c8ceb31af82.png")+"')", !0;var b;if(b=Qa()){a:{if(K&&(b=K.match(/(\d)[\d.]+ Safari/))&&b[1]){b=1*b[1];break a}b=0}b=4>=b}if(b||ca.getMobileDevice()){var c=b="",d="",g=e.split(","),G={top:"left top, left bottom",right:"right top, right bottom",bottom:"left bottom, left top",left:"left top, left bottom"};g[0]&&G[g[0]]&&(b=G[g[0]]);g[1]&&(c="from("+g[1]+")");g[g.length-1]&&(d="to("+g[g.length-1]+")");a.style.backgroundImage="-webkit-gradient(linear,"+b+","+c+","+d+")"}a.style.backgroundImage="-moz-linear-gradient("+e+")";a.style.backgroundImage= "-webkit-linear-gradient("+e+")";a.style.backgroundImage="-ms-linear-gradient("+e+")";a.style.backgroundImage="-o-linear-gradient("+e+")";a.style.backgroundImage="linear-gradient("+e+")"}function da(a,e,b,c){var d=Gb(b),g=Gb(b,c);if(b=Rb(b))b.a=c,g="rgba("+b.r+", "+b.g+", "+b.b+", "+b.a+")";if(0=f||f&&v)return!1;a.style.backgroundColor=g;a.style.padding=e+"px"}else a.style.backgroundColor="",a.style.padding="0px"}function Rb(a){var e= {};if("string"!==typeof a||!a)return!1;a=a.replace(/\s+/g,"");a=a.replace(/,{2,}/g,",");a=a.replace(/[^\d.,]/g,"");a=a.split(",");if(3>a.length||4e.indexOf(c[t]))return d||p.log(c+" is not within the valid range, using default value instead"),b;return c}if("url"===a){if("string"!==typeof c)return b;c&&(c=c.trim());if(/^http(?:s)?:\/\/[-a-z0-9._~@:!$&'()*+,;=\s/?#]+$/i.test(c))return c;d||p.log(c+" is not the valid format, using default value instead");return b}if("text"===a){if(e){if(0<=e.indexOf(c))return c;d||p.log('Value of "'+ c+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}return g.test(c)?c:b}if("usertext"===a){if("string"!==typeof c&&"number"!==typeof c)return b;if(T(e)){if(1===e.length){if(c.length<=e[0])return c;d||p.log(c+" is too long, using default value instead");return b}if(2===e.length){if(c.length<=e[1]&&c.length>=e[0])return c;d||p.log(c+" is not within the valid range, using default value instead");return b}d||p.log("usertext range is invalid, using default value instead"); return b}return c}"string"===typeof c&&0==c.length&&(c=" ");if(!g.test(c))return d||p.log(c+" contains invalid character(s)"),b;if("boolean"===a){if("boolean"===typeof c)return c;d||p.log(c+" is wrong type, must be boolean, using default value instead");return b}if("text"===a)return c;if("number"===a){if(isNaN(parseInt(c)))return d||p.log(c+" is wrong type, must be a valid number"),b;c=parseFloat(c)}if("color"===a){c&&(c=c.trim());if("transparent"===c||f.test(c))return c;d||p.log('Value of "'+c+'" for '+ arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}if(typeof c!=a&&"color"!=a)return d||p.log(c+" for "+arguments.callee.caller.name+" is "+typeof c+" expected "+a),b;if("object"===typeof e&&"string"===a){if(0<=e.indexOf(c))return c;d||p.log('Value of "'+c+'" for '+arguments.callee.caller.name+' is not a valid value, using default value of "'+b+'" instead');return b}if("object"===typeof e&&"number"===a){2===e.length?(g=e[0],f=e[1]):(g=e.shift(), f=e.pop(),t=e);if(cf)return d||p.log("Value of "+c+" for "+arguments.callee.caller.name+" is above maximum of "+f+", using maximum value of "+f+" instead"),f;if(t&&"number"===typeof t.indexOf(c)||c==g||c==f)return c;return t?(d||p.log("Value of "+c+" for "+arguments.callee.caller.name+" is not a valid value, using default value of "+b+" instead"),b):c}return 0!= c&&!c?b:c}function fb(a){for(var e=fb.options,a=e.parser[e.strictMode?"strict":"loose"].exec(a),b={},c=14;c--;)b[e.key[c]]=a[c]||"";b[e.q.name]={};b[e.key[12]].replace(e.q.parser,function(a,c,d){c&&(b[e.q.name][c]=d)});return b}function Sb(a,e){function b(a){p=!0;"undefined"!==typeof A&&clearTimeout(A);if("string"===typeof a)return"function"===typeof t&&t(a),!0;if("object"===typeof a||"undefined"===typeof a)return"object"===typeof a&&"error"===a.type?"function"===typeof t&&t(a):"function"===typeof d&& d(),!0}function c(){q++;if(p)return!0;qf?setTimeout(c,50):b(!0))}}function d(){var a;try{a=!!g.sheet.cssRules}catch(c){f+=1;200>f?setTimeout(d,50):a&&b(!0);return}b()}if(!(!T(ea)?0:-1=document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,g=document.documentElement.scrollLeft>=document.body.scrollLeft?document.documentElement.scrollLeft: document.body.scrollLeft;"undefined"!=typeof window.innerWidth?(b=window.innerWidth,c=window.innerHeight):(b=document.documentElement.offsetWidth,c=document.documentElement.offsetHeight);var f=a.style&&a.style.width?parseInt(a.style.width):a.offsetWidth?parseInt(a.offsetWidth):0,k=a.style&&a.style.height?parseInt(a.style.height):a.offsetHeight?parseInt(a.offsetHeight):0;c-=k;b-=f;e+=c/2;g+=b/2;0>c&&(document.documentElement.scrollTop=0,document.body.scrollTop=0,e=10);0>b&&(document.documentElement.scrollLeft= 0,g=document.body.scrollLeft=0);a.style.top=e+"px";a.style.left=g+"px";"absolute"!==a.style.position&&(a.style.position="absolute")}function g(){if(z){var a=document.getElementById("previewMode");a.style.position="relative";a.appendChild(k)}else d(k);z||p.show()}function G(a){ga||(M=r("number",[0,20],10,a),oa.fire({radius:Va(V,M)}))}function t(a){ga||(F=r("color",null,"#000000",a))}function q(a){ga||(V=r("number",[0,20],10,a),aa.fire({radius:Va(V,M),refresh:!0}))}function A(a){ga||(pa=r("number", [0,1],0.5,a),"object"==typeof k&&da(k,M,F,pa))}function Ea(a){if("portrait"===a){ba="portrait";var b="one column"}"landscape"===a&&(ba="landscape",b="two column");Ia.fire({orientation:ba,format:b,width:Ua,height:D});setTimeout(va,100);g()}function Q(a){a&&(za=a);f&&v&&(za+=M-2);"object"==typeof k&&(k.style.width=za+"px");return this}function Qb(a){a&&(u=a);f&&v&&(u=u+2*M-4);a&&"object"==typeof k&&(k.style.height=u+"px");return this}function H(){ja>=Pa&&"undefined"===typeof window.orientation?"landscape"!== ba&&Ea("landscape"):90===window.orientation||-90===window.orientation?"landscape"!==ba&&Ea("landscape"):"portrait"!==ba&&Ea("portrait");g()}function va(){var a=Hb();E.style.height=a.height+"px";E.style.width=a.width+"px"}function U(){return"object"===typeof k&&"none"!==k.style.display}var Ua=380,D=131,k,Mb="janrainModal",na,E,S,za=Ua,u=D,M=10,F="#000000",V=10,pa=0.5,ma=!1,R=vb("rel/img/b573cd6e318034fa17bb7e9690552ca1.png"),O="",ga=janrain.settings&&janrain.settings.capture&&janrain.settings.capture.noModalBorderInlineCss, K=!1,ia="Are you sure you want to quit?",T="Yes, quit",Y="No, stay",Ha,ba="landscape",Aa=!0,$="boolean"===typeof $?$:"number"===typeof window.orientation?!0:!1,Ma="boolean"===typeof Ma?Ma:janrain.settings.previewMode,z=Ma,ha=ha||!1,qa=!1;janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseImage&&(R=janrain.settings.capture.modalCloseImage,K=!0);janrain.settings&&janrain.settings.capture&&janrain.settings.capture.modalCloseHtml&&(O=janrain.settings.capture.modalCloseHtml); window.janrain.events.onModalClose||(window.janrain.events.onModalClose=I());window.janrain.events.onModalOpen||(window.janrain.events.onModalOpen=I());var W=I(),Ya=I(),aa=I(),oa=I(),Ia=I();ca&&ca.onOrientationChange&&ca.onViewportChange&&(ca.onOrientationChange.addHandler(function(a){Ea(a.orientation)}),ca.onViewportChange.addHandler(function(){d(k)}));"undefined"!==typeof janrain.events.onCaptureRenderComplete&&(janrain.events.onCaptureRenderComplete.addHandler(function(){U()&&(qa=!0)}),janrain.events.onCaptureContentChange.addHandler(function(){U()&& qa&&(g(),setTimeout(va,500),qa=!1)}));return{isOpen:function(){return U()},setWidth:function(a){Q(a);return this},setHeight:function(a){Qb(a);return this},setBorder:function(a){("string"==typeof a||"number"==typeof a)&&G(a);ga||"object"==typeof k&&da(k,M,F,pa);return this},setBorderColor:function(a){a&&t(a);ga||"object"==typeof k&&da(k,M,F,pa);return this},setBorderRadius:function(a){("string"==typeof a||"number"==typeof a)&&q(a);ga||"object"==typeof k&&L(k,V);return this},setBorderOpacity:function(a){("number"=== typeof a||"string"===typeof a)&&A(a);return this},setZIndex:function(a){E.style.zIndex=a},setPreviewMode:function(a){"boolean"===typeof a&&(z=a);return this},setId:function(a){Mb=a;k&&(k.id=a);return this},show:function(){$||(k.style.display="block");"object"==typeof na&&Aa&&(na.style.display="block");z?$&&(k.style.display="block"):(E.style.display="block",$?(ca.setElement(k).activate(),k.style.display="block"):(X(window,"resize",H),X(window,"resize",va),H(),va()));ga||aa.fire({radius:Va(V,M),refresh:!1}); Ya.fire();janrain.events.onModalOpen.fire();k.focus()},close:function(a){e(a)},closeConfirm:function(){c()},refresh:function(a){ha||k.appendChild(S);a&&a.center&&g()},remove:function(){if(z){var a=document.getElementById("previewMode");"object"===typeof S&&k.removeChild(S);"object"===typeof k&&a.removeChild(k);"object"===typeof E&&document.body.removeChild(E);if(a=document.getElementById("janrainEngageEmbed_old"))a.id="janrainEngageEmbed";E=k=""}else"object"===typeof S&&k.removeChild(S),"object"=== typeof E&&document.body.removeChild(E),"object"===typeof k&&document.body.removeChild(k)},addContent:function(b){janrain.events.onAuthWidgetContentPlaced.fire();na=b;if(!k){k=document.createElement("div");k.id=Mb;if("number"===typeof za||"string"===typeof za)k.style.width=za+"px";k.style.height=u+"px";k.style.position="absolute";ga||(k.style.padding=M+"px",L(k,V),da(k,M,F,pa));k.style.zIndex=1E3;k.style.display="none";b=Hb();E=document.createElement("div");janrain.settings&&janrain.settings.capture&& janrain.settings.capture.captureServer&&(E.id="janrainModalOverlay");E.style.width=b.width+"px";E.style.height=b.height+"px";E.style.left=0;E.style.top=0;E.style.backgroundColor="#000000";E.style.position="absolute";b=E;"undefined"!==typeof b.style.filter&&(b.style.filter="alpha(opacity=40)");"undefined"!==typeof b.style.opacity&&(b.style.opacity="0.4");"undefined"!==typeof b.style.KhtmlOpacity&&(b.style.KhtmlOpacity="0.4");"undefined"!==typeof b.style.MozOpacity&&(b.style.MozOpacity="0.4");E.style.display= "none";E.style.zIndex=1E3;S=O?a("a"):a();k.appendChild(S);document.body.appendChild(E);document.body.appendChild(k)}k.appendChild(na);setTimeout(va,500);z&&g();return this},getContent:function(){return na},getBorderWidth:function(){return M},getState:function(){return{width:za,borderWidth:M,borderColor:F,borderRadius:V,borderOpacity:pa,orientation:ba}},setState:function(a){i("customizable_auth_widget_styling")&&("undefined"!==typeof a.borderWidth&&G(a.borderWidth),"undefined"!==typeof a.borderColor&& t(a.borderColor),"undefined"!==typeof a.borderOpacity&&A(a.borderOpacity),"undefined"!==typeof a.orientation&&Ea(a.orientation),"undefined"!==typeof a.borderRadius&&(("string"==typeof a.borderRadius||"number"==typeof a.borderRadius)&&q(a.borderRadius),"object"==typeof k&&L(k,V)))},setConfirmClose:function(a){ma=a;return this},setShowContentOnLoad:function(a){Aa=a;return this},setConfirmMessageText:function(a){ia=a},setConfirmLinkText:function(a){T=a},setCancelLinkText:function(a){Y=a},onClose:W,onShow:Ya, onOrientationChange:Ia,onBorderRadiusChange:aa,onBorderWidthChange:oa}}function Ub(a){function e(a){"janrainReadyToClose:True"===a.data&&(window.focus(),f=!0,wa(window,"message",e))}function b(){var a=window.open(c,"","width="+d+", height="+g+", status=1, location=1, resizable=yes");("iPod"===Nb||"iPhone"===Nb)&&6<=Vb&&X(window,"message",e);var b=window.setInterval(function(){f&&a&&(a.close(),f=!1);if(a&&a.closed||a&&"undefined"===typeof a.closed||"undefined"===typeof a)window.clearInterval(b),"function"=== typeof i&&i()},500)}var c=a,d=400,g=400,f=!1,i;return{show:function(){b()},setWidth:function(a){a&&(d=a);return this},setHeight:function(a){a&&(g=a);return this},setCallback:function(a){a&&(i=a);return this}}}function Wb(){function a(){r=(new Date).getTime()-d;if(r>>0;if(0===b)return-1;var c=0;0=b)return-1;for(c=0<=c?c:Math.max(b-Math.abs(c),0);c>>0;if("function"!==typeof a)throw new TypeError; for(var d=Array(c),g=0;g>>0;if("function"!=typeof a)throw new TypeError;for(var f=[],g=0;gb?setTimeout(function(){d({height:c,width:g},++b)},100):U.fire({height:c,width:g}):setTimeout(function(){d({height:c, width:g},0)},100)}function b(){setTimeout(function(){A(r)},20);c(Q,document.body)}function c(a,b){for(var c=0;cPa||(90===window.orientation||-90===window.orientation)&&Pa>ja?!1:!0;var b="landscape";if(a&&(0===window.orientation||180===window.orientation))b="portrait";if(!a&&(90===window.orientation||-90=== window.orientation))b="portrait";return b}function g(){var a=f();A("width=device-width, initial-scale=1, maximum-scale=1");u.fire({orientation:a})}function i(){var a=document.getElementsByTagName("meta"),b;for(b in a)if("viewport"===a[b].name)return a[b];return!1}function p(){if("undefined"===typeof document.getElementsByTagName||i())return!1;var a=document.getElementsByTagName("head")[0],b=document.createElement("meta");b.setAttribute("name","viewport");a.appendChild(b);return!0}function q(){if("undefined"=== typeof document.getElementsByTagName)return!1;document.getElementsByTagName("head");var a=document.createElement("meta");a.setAttribute("name","HandheldFriendly");a.content="true"}function A(a){var b=i();if(!b||b.content==a)return!1;if("undefined"===typeof a){var c=i();document.getElementsByTagName("head")[0].removeChild(c)}b.content=a;return!0}var r,Q=document.createElement("div"),v=navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad|blackberry|rim tablet|android|htc|lg|midp|mmp|mobile|nokia|opera mini|palm|pocket|psp|sgh|smartphone|symbian|treo mini|playstation portable|sonyericsson|samsung|mobileexplorer|palmsource|benq|windows phone|windows mobile|iemobile|windows ce|nintendo wii|\Wsilk\W)/i), H=null!==v?v[0]:!1,u=I(),U=I();H&&H[0].match(/android|\Wsilk\W/);var Ua=function(){var a=window.orientation,b={height:screen?screen.height:0,width:screen?screen.width:0},c={height:window.innerHeight,width:window.innerWidth},d=!1;return function(e,g,f){var i=!1,A=function(a,b){return a.height>=a.width&&b.height>=b.width||a.width>a.height&&b.width>b.height?!0:!1},p=a===e,q=A(g,b),Q=A(f,c);if(!p&&(!q||!Q))i=!0;!p&&!q&&(d=!0);i&&(d&&!A(g,f)&&(i=f.height,f.height=f.width,f.width=i),Pa=f.height,ja=f.width); a=e;b={height:g.height,width:g.width};c={height:f.height,width:f.width}}}();return{setElement:function(){return this},onOrientationChange:u,onViewportChange:U,getMobileDevice:function(){return H},getOrientation:function(){return f()},activate:function(){a()},deactivate:function(){b()}}}(),vb=function(a){var d;d="https:"===document.location.protocol?"https://docj27ko03fnu.cloudfront.net/":"http://cdn.rpxnow.com/";d=d.replace(/\/$/,"");return d+"/"+a},F={openId:{aol:{identifier:"aol",flow:"openid1", width:514,height:550,color:"#0FD6FF",friendlyName:"AOL"},blogger:{identifier:"blogger",flow:"openid1",width:800,height:600,color:"#FF6600",friendlyName:"Blogger"},livejournal:{identifier:"livejournal",flow:"openid1",width:800,height:600,color:"##213368",friendlyName:"LiveJournal"},netlog:{identifier:"netlog",flow:"openid1",width:800,height:600,color:"#000000",friendlyName:"Netlog"},wordpress:{identifier:"wordpress",flow:"openid1",width:800,height:600,color:"#21759b",friendlyName:"WordPress"},openid:{identifier:"openid", flow:"openid1",width:800,height:600,color:"#f79311",friendlyName:"OpenID"}},openId2:{flickr:{identifier:"https://me.yahoo.com/id",flow:"openid",width:500,height:500,color:"#FF0084",friendlyName:"Flickr"},google:{identifier:"https://www.google.com/accounts/o8/id",flow:"openid",width:500,height:450,color:"#1C69F5",friendlyName:"Google"},hyves:{identifier:"http://hyves.nl/",flow:"openid",width:800,height:600,color:"#659BC8",friendlyName:"Hyves"},myopenid:{identifier:"http://myopenid.com/",flow:"openid", width:800,height:600,color:"#8cc63f",friendlyName:"MyOpenID"},paypal:{identifier:"https://www.paypal.com/webapps/auth/server",flow:"openid",width:800,height:600,color:"#1A3665",friendlyName:"PayPal"},verisign:{identifier:"http://pip.verisignlabs.com/",flow:"openid",width:945,height:600,color:"#B8004D",friendlyName:"VeriSign"},yahoo:{identifier:"https://me.yahoo.com/id",flow:"openid",width:500,height:500,color:"#650065",friendlyName:"Yahoo!",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"}, features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}}},oauth:{facebook:{flow:"facebook",width:1050,height:550,color:"#3B5998",friendlyName:"Facebook",publishSettings:{},shareSettings:{broadcast:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!0,actionLink:!0}},contact:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!0,actionLink:!0}}}},myspace:{flow:"myspace",width:800,height:500,color:"#000000", friendlyName:"Myspace",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},twitter:{flow:"twitter",width:800,height:500,color:"#35CCFF",friendlyName:"Twitter",shareSettings:{broadcast:{counter:{max:140,urlRegex:/\b(?:[a-z]{1}[-a-z0-9+.]+:(?:\/\/)?)?[-a-z0-9._~@:!$&'()*+,;=]+(?:\.[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\.(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx))(?::\d+)?(?:\/[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\?[-a-z0-9._~@:!$&'()*+,;=%]+)?(?:#[-a-z0-9._~@:!$&'()*+,;=%]+)?\b/ig, urlLength:23},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}},contact:{counter:{max:140,urlRegex:/\b(?:[a-z]{1}[-a-z0-9+\.]+:(?:\/\/)?)?[-a-z0-9._~@:!$&'()*+,;=]+(?:\.[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\.(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx))(?::\d+)?(?:\/[-a-z0-9._~@:!$&'()*+,;=]+)*(?:\?[-a-z0-9._~@:!$&'()*+,;=%]+)?(?:#[-a-z0-9._~@:!$&'()*+,;=%]+)?\b/ig,urlLength:23}, format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},linkedin:{flow:"linkedin",width:550,height:750,color:"#006699",friendlyName:"LinkedIn",shareSettings:{broadcast:{counter:{},format:{},features:{message:!0,title:!0,url:!0,description:!0,image:!0,media:!1,actionLink:!1}},contact:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},live_id:{flow:"liveid", width:900,height:600,color:"#666666",friendlyName:"Windows Live ID"},salesforce:{flow:"salesforce",width:800,height:500,color:"#333333",friendlyName:"Salesforce"},orkut:{flow:"orkut",width:800,height:600,color:"#333",friendlyName:"Orkut"},vzn:{flow:"vzn",width:600,height:450,color:"#333",friendlyName:"VZnet"},foursquare:{flow:"foursquare",width:950,height:550,color:"#333",friendlyName:"Foursquare"},sinaweibo:{flow:"sinaweibo",width:950,height:550,color:"#333",friendlyName:"Sina Weibo"},tumblr:{flow:"tumblr", width:950,height:550,color:"#333",friendlyName:"Tumblr"},microsoft_live_connect:{flow:"microsoft_live_connect",width:950,height:550,color:"#333",friendlyName:"Microsoft Live Connect"},renren:{flow:"renren",width:950,height:550,color:"#333",friendlyName:"Renren"},disqus:{flow:"disqus",width:950,height:550,color:"#333",friendlyName:"Disqus"},soundcloud:{flow:"soundcloud",width:950,height:550,color:"#333",friendlyName:"SoundCloud"},vk:{flow:"vk",width:950,height:550,color:"#333",friendlyName:"VK"},mixi:{flow:"mixi", width:950,height:550,color:"#333",friendlyName:"Mixi",shareSettings:{broadcast:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}},contact:{counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0,title:!0,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}},email:{color:"#009ddc",shareSettings:{email:{providers:{google:!0,yahoo:!0},counter:{},format:{message:"#{MESSAGE} #{URL}"},features:{message:!0, title:!1,url:!1,description:!1,image:!1,media:!1,actionLink:!1}}}}}},ia={},ra=["openId","openId2","oauth"];0a?"0"+a:a}function d(a){f.lastIndex=0;return f.test(a)?'"'+a.replace(f,function(a){var b=p[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(a,c){var f,p,r,v,t=g,u,D=c[a];D&&"object"===typeof D&&"function"===typeof D.toJSON&&(D=D.toJSON(a)); "function"===typeof q&&(D=q.call(c,a,D));switch(typeof D){case "string":return d(D);case "number":return isFinite(D)?""+D:"null";case "boolean":case "null":return""+D;case "object":if(!D)return"null";g+=i;u=[];if("[object Array]"===Object.prototype.toString.apply(D)){v=D.length;for(f=0;fb)return 1;if(0=-(ta-(n+1)))return 0}0==w&&(c=C-100);if(0>a&&a<-c)return 1;if(0< a||a>=-n)return 0}function q(){if("two column"===m)var a=N/2;"one column"===m&&(a=N);"one row"===m&&(a=1);var b="one row"===m?0:2*a,c="one column"===m?3*n:0;if(7===f||6===f||f&&v){if("two column"===m&&(c=n,7===f||6===f))c=2*n;if("one column"===m&&(c=3*n,(7===f||6===f)&&!v))c+=n;if("one row"===m&&(7===f||6===f))c=n}"one column"===m&&La<=N&&(c=f&&v?c+2*n:c-2*n);return x*a+n*(a+1)+b+c}function t(){function a(){var b;j="over";var Za=k();if(0==Za&&"left"===h||0==Za&&"top"===h||1==Za&&"right"===h||1==Za&& "bottom"===h)return this.style.cursor="default",B.onclick="",!1;var e=this;setTimeout(function(){if(1===i){if("over"!==j)return!1;f&&(d.style.display="block");g.style.display="block";B.onclick=c;e.style.cursor="pointer";var a=document.getElementById("janrainProviderPages");b="top"==h||"bottom"==h?parseInt(a.style.top):parseInt(a.style.left);var Za="right"===h||"bottom"===h?b-Ea:b+Ea;"top"===h||"bottom"===h?a.style.top=Za+"px":a.style.left=Za+"px";i=2}},f?50:100)}function b(){var a;j="out";var c=k(); if(1==c&&"right"===h||0==c&&"left"===h||0==c&&"top"===h||1==c&&"bottom"===h)return!1;setTimeout(function(){if(2===i){if("out"!==j)return!1;f&&(d.style.display="none");g.style.display="none";var b=document.getElementById("janrainProviderPages");a="top"==h||"bottom"==h?parseInt(b.style.top):parseInt(b.style.left);var c="right"===h||"bottom"===h?a+Ea:a-Ea;"top"===h||"bottom"===h?b.style.top=c+"px":b.style.left=c+"px";i=1}},f?200:400)}function c(){g.style.display="none";B.style.cursor="default";A(h,function(a){E(a); i=1})}var d,h,e,g,o={left:"-33px -16px",right:"0px -16px",top:"-16px -33px",bottom:"-16px 0px"},j="",i=1,B;return{setSide:function(a){h=a;return this},create:function(){var f;if(La<=N)f=!1;else{f=document.createElement("div");f.setAttribute("id","janrainShim_"+h);f.style.background="black";"top"===h||"bottom"===h?(f.style.height="19px",f.style.width="100%"):(f.style.height="100%",f.style.width="17px");da?(f.style.filter="alpha(opacity=100)",f.style.opacity=100):(f.style.filter="alpha(opacity=0)", f.style.opacity=0);f.style.position="absolute";f.style.zindex="99";if("top"===h||"bottom"===h)f.style.left="0";f.style[h]=n+"px";f.style.top="one column"!==m?n+1+"px":"top"===h?"10px":"0px";f.style.display="none";d=f;f=document.createElement("div");f.style.backgroundColor=da?"green":Oa;f.className="janrainSlideControllerMask";f.style.position="absolute";"one column"!==m&&(f.style.width=n+"px",f.style.height="100%",f.style.top="0px",f.style[h]="0px",f.style.borderWidth="1px","right"===h&&(!sa||"one row"=== m)&&L(f,null,0,0,y,0),"left"===h&&(!sa||"one row"===m)&&L(f,null,0,0,0,y),"right"===h&&" "===J&&L(f,null,0,y,y,0),"left"===h&&" "===J&&L(f,null,y,0,0,y));"one column"===m&&(f.style.height=n+"px",f.style.fontSize="0px",f.style.width="100%",f.style.padding="0px",f.style[h]="0px","top"===h&&" "===J?L(f,null,y,y,0,0):"bottom"===h&&!sa&&L(f,null,0,0,y,y));"one row"===m&&(f.style.height="105.5%");e=f;f=document.createElement("div");f.setAttribute("id","janrainArrow_"+h);f.style.background="url("+vb("rel/img/ee9d3aa7c5896c69488b5941ef31c7bc.png")+ ") no-repeat scroll "+o[h]+" transparent";f.style.height="19px";f.style.width="17px";f.style.position="absolute";if("top"===h||"bottom"===h)f.style.left=C/2+"px";f.style[h]=n+"px";f.style.top="one column"!==m?q()/2-2*n+1+"px":"top"===h?"10px":"0px";f.style.display="none";g=f;f=document.createElement("div");f.className="janrainSlideControl";f.style.backgroundColor=da?"purple":"transparent";"one column"===m?(f.style.width=C+4+"px",f.style.left="3px","top"==h?(f.style.height=n+"px",f.style.top=ta+n+ "px"," "===J&&(f.style.left="0px",f.style.width=C+10+"px")):(f.style.height="20px",f.style.bottom=(sa?Ga+n:0)+"px",L(f,null,0,0,y,y))):(f.style.width="right"===h?"20px":"0px",f.style[h]="0px",f.style.height=q()-(n*(" "===J)?1:2)+"px",40===ua&&"one row"===m&&"left"===h&&(f.style.left=ra+"px"),"right"===h&&!sa&&L(f,null,0,0,y,0),"left"===h&&!sa&&L(f,null,0,0,0,y));f.style.position="absolute";f.style.zIndex="100";f.style.cursor="pointer";f.onmouseover=a;f.onmouseout=b;f.onclick=c;B=f;B.appendChild(e); B.appendChild(d);B.appendChild(g);f=B}return f}}}function A(a,b){var c=document.getElementById("janrainProviderPages"),h=new Wb;if("top"===a||"bottom"===a){if(" "===J)var d=-(q()-x),e=0;else d=-(q()-x-ta-n),e=ta+n;50===x&&(d-=20);f&&v&&(d+=n," "!==J&&(e+=n));h.setElement(c).setAcceleration("sinusoidal").setDuration(100*N).startPosition(parseInt(c.style.top)).endPosition("bottom"===a?d:e).setDirection("vertical").setCallback(function(){b(a)}).animate()}else f&&v?(d=-(C-2*n-39),"one row"===m&&(d=-(ra- 1*n))):(d=-(C-32),"one row"===m&&(d=-(C-24))),h.setElement(c).setAcceleration("sinusoidal").setDuration(800).startPosition(parseInt(c.style.left)).endPosition("right"==a?d:n).setDirection("horizontal").setCallback(function(){b(a)}).animate()}function D(){var a,b;function c(h){h=h.touches[0];"one column"===m?a=h.pageY:b=h.pageX}function h(c){c.preventDefault();c=c.touches[0];c="one column"===m?a-c.pageY:b-c.pageX;if(35c){var d;d="one column"===m?0w)for(o=0;o<=B;o++)e.appendChild(l[o]);for(var q=j.length%2,r=u?La:N,s=0;sC&&(g.style.textIndent="-9999px",g.style.marginLeft=0,d.style.textAlign="center");2==w&&(30==x&&(d.style.width="auto"),50==x&&(e.style.marginLeft="5px"));if(0==w&&(30==x||50==x)){var e=document.createElement("a"),o=document.createElement("span"), j=document.createTextNode(a);"undefined"!==typeof b&&(e.tabIndex=b);e.className="janrain-provider-icon-32 janrain-provider-icon-bg janrain-provider-icon-"+a;e.style.marginTop="0px";e.href="javascript:void(0);";e.style.textDecoration="none";e.style.display="block";o.style.display="inline-block";o.style.textIndent="-9999px"}if(c("customSAML")||c("customOpenid")){var i=c("friendlyName")||"Sign In",B=document.createTextNode(i);if(1==w||2==w){if(30==x||50==x)e.style.backgroundImage="url("+c("largeIcon")+ ")",g.appendChild(B),g.style.color=c("color")||"#000000";15<=B.length&&(B.textContent=B.textContent.substr(0,15))}if(0==w&&(30==x||50==x))j=document.createTextNode(i),e.style.backgroundImage="url("+c("largeIcon")+")";f&&10>f&&(e.style.backgroundImage="none",e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+c("largeIcon")+"')")}else if("blank"!==a&&(1==w||2==w))30==x&&(e.style.backgroundColor="transparent",g.innerHTML=ia[a].friendlyName),50==x&& (e.style.backgroundColor="transparent",g.innerHTML=ia[a].friendlyName);6===f&&"one row"!==m&&(i=document.createElement("div"),i.style.height=e.style.height,i.style.width="90px",i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=crop,src='"+e.src+"')",e.style.filter="alpha(opacity=0)",i.appendChild(e),h.appendChild(i));0==w?(h.appendChild(e),e.appendChild(o),o.appendChild(j)):(h.appendChild(d),d.appendChild(e),d.appendChild(g));return F(a,h)}function I(a,b){var c= document.createElement("a"),h=d.translate.SIGN_IN_AS||"Sign in as {name}",h=h.replace("{name}",b),e=document.createElement("span"),h=document.createTextNode(h),g=document.createElement("span");e.className="janrain-provider-text-color-"+a;c.href="javascript:void(0);";c.style.textDecoration="none";c.style.display="block";if("customopenid"===a){var o=document.createElement("span");document.createElement("span");o.className="janrain-provider-icon-32 janrain-provider-icon-"+a;o.style.backgroundImage="url("+ Ia.largeIcon+")";e.style.color=Ia.customOpenIdProviderColor||"#000000";10>f&&(o.style.backgroundImage="none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ia.largeIcon+"')")}else"customsaml"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-32 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Wa.largeIcon+")",e.style.color=Wa.customSAMLProviderColor||"#000000",10>f&&(o.style.backgroundImage= "none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Wa.largeIcon+"')")):(o=document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a);g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily=Sa;var i=document.createElement("div"),B=7.5*h.length+30,l=j();i.style.fontSize="16px";i.style.height="100%";i.style.position="relative";if(0==w||120>l)15<=h.length&&(i.style.fontSize="14px",B= 7*h.length+30),20<=h.length&&(i.style.fontSize="12px",B=6*h.length+30),24<=h.length&&(i.style.fontSize="10px",B=5*h.length+50),30<=h.length&&(h.textContent=h.textContent.substr(0,26)+"...",B=162);i.style.width=B+"px";if(0==w||116>l)"customopenid"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Ia.largeIcon+")",e.style.color=Ia.customOpenIdProviderColor||"#000000",f&&10>f&&(o.style.backgroundImage= "none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+Ia.largeIcon+"')")):"SAML"===a?(o=document.createElement("span"),document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a,o.style.backgroundImage="url("+Wa.largeIcon+")",e.style.color=Wa.customSAMLProviderColor||"#000000",f&&10>f&&(o.style.backgroundImage="none",o.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enable=true,sizingMethod=scale,src='"+ Wa.largeIcon+"')")):(o=document.createElement("span"),o.className="janrain-provider-icon-24 janrain-provider-icon-"+a);30===x&&(g.style.marginTop="9px",g.style.fontSize="12px",o.style.marginTop="3px");50===x&&(g.style.marginTop="16px",o.className="janrain-provider-icon-32 janrain-provider-icon-"+a,o.style.marginTop="9px");"one row"===m&&30===x&&(o.style.marginTop="-1px");g.appendChild(e);e.appendChild(h);o.style.marginRight="10px";o.style.verticalAlign="top";c.style.overflow="hidden";c.style.position= "relative";c.style.height=("one row"!==m?x:25)+"px";c.style.marginBottom="one row"===m?"-4px":"4px";"one row"===m&&(c.style.top="-4px");c.style.left="0px";f&&v&&(c.style.marginRight="5px");f&&v&&(c.style.marginLeft="3px");c.style.border="1px solid "+ma;L(c,ha);"customopenid"===a&&(c.style.color=ia[a].color);6===f||7===f||f&&v?i.style.left="10px":i.style.margin="0 auto";i.appendChild(o);i.appendChild(g);0==w&&(i.style.paddingTop="2px",g.style.marginTop="6px");0==w||116>l?(c.appendChild(i),i.style.width= "auto"):(50===x&&parseInt(c.style.height),g.style.cssFloat="none",g.style.styleFloat="none",c.appendChild(o),c.appendChild(g));return F(a,c)}function M(a,b){X(a,"click",function(){O(b)})}function O(a){var b=ia[a],c={appUrl:d.appUrl,mobileDevice:yb,language:d.language,popup:Ya,tokenUrl:Ma||d.tokenUrl||window.location.href,facebookPermissions:ga,forceReauth:ba,widgetType:"auth",tokenAction:Aa,bpChannel:Na,customOpenid:$a,customSAML:Ha,customOpenidOpxblob:d.customOpenidOpxblob};b.name=a;new Pa(b,c,function(){aa|| (db=setTimeout(function(){Fa(b)},300))})}function K(){var a=document.createElement("div");a.style.position="absolute";a.style.top="0px";a.style.left="0px";a.style.width=C+"px";a.style.zIndex="102";a.style.textAlign="center";a.style.padding=n+"px";a.style.backgroundColor="transparent"===Oa?"#ffffff":Oa;a.style.height=j()-(f&&v?0:2*n)+"px";L(a,y);return a}function P(a){var b=document.createElement("a"),c=document.createTextNode(d.translate.USE_ANOTHER_ACCOUNT||"switch accounts");b.setAttribute("class", "janrainSwitchAccountLink");b.setAttribute("href","");b.style.fontSize="12px";b.style.fontFamily=Sa;b.style.color=Z;b.onclick=a;b.appendChild(c);return b}function Q(){return"modal"===z?document.getElementById("janrainModal"):"embed"===z?document.getElementById("janrainEngageEmbed"):!1}function R(){var a=parseInt(s.style.width);return a=a+2*n+2}function T(){var a=Q();null!==a&&"object"===typeof s&&s.parentNode===a&&a.removeChild(s);janrain.events.onProviderLoginStart.removeHandler(Xa)}function U(){var a= "";"object"===typeof l&&(a=l.getState());return{type:z,width:R(),fontFamily:Sa,fontSize:ea,fontColor:Z,backgroundColor:Oa,borderColor:xa,borderRadius:y,format:m,providersPerPage:N,providers:la,buttonBackgroundStyle:Ta,buttonBorderColor:ma,buttonBorderRadius:ha,actionText:e(),showAttribution:sa,modalState:a}}function V(a){m=r("string",["default","two column","one column","one row"],"two column",a);"default"===m&&(m="two column");"one row"==a&&(y=r("number",[0,10],5,y));na()}function W(a){"two column"=== m&&(C=r("number",[225,600],380,a));"one column"===m&&(C=r("number",[160,600],200,a));"one row"===m&&(x=30,a=La<=N?n*(parseInt(N)-1):n*(parseInt(N)+2),40===ua&&(a+=ra-n),C=x*N+a);if(("two column"===m||"one column"===m)&&!u)C=C-2*n-2;f&&v&&(C=C+2*n+2);"one row"!==m&&(x=380b)b=5;j=new a;j.setBackgroundColor(ib).setPreviewMode(jb).setShowAttribution(kb).setNoReturnExperience(lb).setNoReturnExperienceSwitchAccountLink(Bb).setFontSize(mb).setFontFamily(nb).setFontColor(ob).setActionText(pb).setProviders(la).setProvidersPerPage(qb).setBorderRadius(b).setButtonBorderColor(rb).setButtonBorderRadius(sb).setButtonBackgroundStyle(tb).build(); if("object"!==typeof l){l=new Lb;l.ready=!1;var d=l.addContent;l.addContent=function(a){l.ready=!0;d(a);janrain.events.onModalWidgetReady.fire()}}l.setHeight(j.getActualHeight()).setWidth(j.getWidth()).setPreviewMode(jb).setBorderColor(Da).setBorder(gb).setBorderOpacity(Fa).setBorderRadius(hb);qa||(c?(V("welcome_info_name",unescape(S("welcome_info_name"))),pa("expected_tab",c)):l.addContent(j.getContentsDiv()));l.onOrientationChange.addHandler(function(a){"portrait"===a.orientation&&j.setFormat(a.format).setWidth(200).refresh({center:!0}); "landscape"===a.orientation&&j.setHeight(a.height).setWidth(a.width).setFormat(a.format).refresh({center:!0});l.setHeight(j.getActualHeight());l.setWidth(j.getWidth())});l.onShow.addHandler(function(){"object"==typeof j&&l.setWidth(j.getWidth())});l.onBorderWidthChange.addHandler(function(a){"object"===typeof l&&"object"===typeof j&&(j.setBorderRadius(a.radius).refresh(),a=j.getState(),a.borderRadiusRa)return c.widget_type=a.widget_type,c.provider=a.provider,c.time=(new Date).getTime(),c=xb(c),Y(b+"/signin/get_login_info"+c),Ra++,!0;"object"===typeof janrain.events.onProviderLoginCancel&&janrain.events.onProviderLoginCancel.fire(a);"undefined"!==typeof db&&clearTimeout(db);return!1}function Pa(a,b,c){var d=b.appUrl,e=janrain.settings.customSAML&& a.customSAML,f=janrain.settings.customOpenid&&a.customOpenid,d=e?d+"/saml2/sso/start":d+("/"+a.flow+"/start"),g=window.location.href;b.mobileDevice&&(g="mobile");var i=b.language||"en",j=b.popup?"xdr":"xdrsw",l=b.tokenUrl||window.location.href,k={};Cb={appUrl:b.appUrl,provider:a.name,widget_type:b.widgetType};k.language_preference=i;k.token_url=l;k.display="popup";k.widget=!0;"object"===typeof b.facebookPermissions&&(k.ext_perm=b.facebookPermissions.toString());e?k.saml_provider=a.identifier:k.openid_identifier= a.identifier;k.origin_url=g;k.provider_name=a.name;k.force_reauth=b.forceReauth;k.xdReceiver=b.appUrl+"/"+j;k.callback="none";k.widget_type=b.widgetType;k.token_action="url";if("event"===b.tokenAction||"hybrid"===b.tokenAction)k.token_action="event";b.mobileDevice&&"hybrid"===b.tokenAction&&(k.token_action="url");b.bpChannel&&(k.bp_channel=b.bpChannel);g=function(b){var c=janrain.settings[b],b=a[b],c="object"===typeof c?c[a.name]:c;return c!==b?c:b}("customOpenidOpxblob");b.customOpenid&&"string"=== typeof g&&(k.opx_blob=g);d+=xb(k);(function(){janrain.events.onProviderLoginStart.fire({provider:a.name,width:a.width,height:a.height});var g;b.mobileDevice&&"event"!==b.tokenAction||!b.popup?Y(b.appUrl+"/signin/set_login_tab?login_tab="+a.name+"&origin_url="+encodeURIComponent(window.location.href),function(){janrain.settings.customProviderInIFrame&&(f||e)?window.location.href=d:window.top.location.href=d}):(g=new Ub(d),g.setWidth(a.width).setHeight(a.height).setCallback(function(){var d={},e=""; d.widget_type=b.widgetType;d.provider=a.name||"";d.time=(new Date).getTime();e=xb(d);"function"===typeof c&&c();Y(b.appUrl+"/signin/get_login_info"+e);janrain.events.onProviderLoginComplete.fire({provider:a.name})}).show())})()}function V(a,b){if(!b||"undefined"===b||"welcome_info_name"!==a)return!1;b&&(ha=b)}function pa(a,b){function c(){janrain.events.onReturnExperienceFound.fire({returnProvider:b,welcomeName:ha})}var d=function(a){var c=function(){600>a&&setTimeout(function(){d(++a)},50)};if("object"!== typeof j)return c(),!1;"modal"===z?l.addContent(j.getReturnExperience(b,ha)):"embed"===z&&ma(document.getElementById("janrainEngageEmbed"),j.getReturnExperience(b,ha));"modal"===z&&janrain.events.onModalWidgetReady.fire()};if("expected_tab"!==a||!b)return!1;"object"===typeof j&&j.removeReturnExperience();Qa?c():janrain.events.onAuthWidgetLoad.addHandler(c);d(0)}function ma(a,b){a&&(a.innerHTML="");janrain.settings.capture&&(a?(a.innerHTML="",a.appendChild(b)):(a=document.createElement("div"),a.id= "janrainEngageEmbed",a.style.display="none",document.body.appendChild(a)));a?(a.appendChild(b),janrain.events.onAuthWidgetContentPlaced.fire()):(p.log('Missing container div, please place this div where you wantthe embedded widget to be displayed on your page-
.'),p.show());return a}function Ba(a,b){Ma=Ma||$;tokenUrl=b?Ma:$;var c="";if(!fb(tokenUrl).query)var c=c+"?",d=!0;for(var e in a)d?(c+=e+"="+a[e],d=!1):c+="&"+e+"="+a[e];Ma=tokenUrl+c}function da(){function a(b){if(!("customsaml"=== b&&!d.customSAML||"customopenid"===b&&!d.customOpenid)){var c,e;if("customsaml"===b)c="customSAMLProviderId",e=["customSAMLProviderName","customSAMLProviderColor","customSAMLLargeIcon"];else if("customopenid"===b)c="customOpenidProviderId",e="customOpenIdProviderName,customOpenIdProviderColor,customOpenidLargeIcon,customOpenidIdentifier,customOpenidFlow,customOpenidOpxblob".split(",");else{p.log("Bad provider: "+b);p.show();return}var h=typeof d[c];if("undefined"===h||"string"===h){var f=d[c]||b; d[c]=[f];wb(e,function(a){if("object"!==typeof d[a]){var b=d[a];d[a]={};d[a][f]=b}})}}}function e(a,b){var c=Tb,h={customopenid:["customOpenidFlow","customOpenidIdentifier"],customsaml:["customSAMLProviderId"]};if(d[{customopenid:"customOpenid",customsaml:"customSAML"}[a]]&&i("customizable_auth_widget_styling")){"customopenid"===a?$a=!0:"customsaml"===a&&(Ha=!0);for(var h=h[a],f=0,g=h.length;f=f&&Ib(Eb()+"providers-ie.css");if(d.stop)return!0;Xb&&Y(d.appUrl+"/signin/establish_session");Aa=d.tokenAction?d.tokenAction:Aa;if(!d.tokenUrl&&"event"===Aa)$=window.location.href;else if(d.tokenUrl)$=d.tokenUrl;else return p.log("Missing tokenUrl. tokenUrl is required."),p.show(),!1;z=r("string",["modal","embed"],"embed",d.type?d.type:z);qa=d.multi?d.multi:yb?!0:qa;aa=d.custom?d.custom:aa;ba=d.forceReauth?d.forceReauth:ba;Na=d.bpChannel?d.bpChannel:Na;ga=d.facebookPermissions? d.facebookPermissions:ga;fa=!!d.facebookAutoLogin;oa=d.storageType?r("string",["default","single cookie"],"default",d.storageType):oa;Ya="boolean"===typeof d.popup?d.popup:Ya;yb&&"event"!==Aa&&(Ya=!1);Ca=d.returnExperienceTimeout?d.returnExperienceTimeout:Ca;qa&&(setTimeout(function(){var a=S("expected_tab");a?(V("welcome_info_name",unescape(S("welcome_info_name"))),pa("expected_tab",a)):"modal"===z?l.addContent(j.getContentsDiv()):"embed"===z&&(a=document.getElementById("janrainEngageEmbed"),ma(a, j.getContentsDiv()))},Ca),Y(d.appUrl+"/signin/get_cookies"));a("customopenid");a("customsaml");d.customOpenid&&wb(d.customOpenidProviderId,function(a){e("customopenid",a)});d.customSAML&&wb(d.customSAMLProviderId,function(a){e("customsaml",a)});if(aa)return!0;Aa=d.tokenAction?d.tokenAction:Aa;gb=i("customizable_auth_widget_styling")?d.modalBorderWidth:gb;Da=i("customizable_auth_widget_styling")?d.modalBorderColor:Da;hb=i("customizable_auth_widget_styling")?d.modalBorderRadius:hb;Fa=i("customizable_auth_widget_styling")? d.modalBorderOpacity:Fa;ib=i("customizable_auth_widget_styling")?d.backgroundColor:ib;wa=i("customizable_auth_widget_styling")?d.borderRadius:wa;ea=i("customizable_auth_widget_styling")?d.borderColor:ea;ya=i("customizable_auth_widget_styling")?d.format:ya;ob=i("customizable_auth_widget_styling")?d.fontColor:ob;mb=i("customizable_auth_widget_styling")?d.fontSize:mb;nb=i("customizable_auth_widget_styling")?d.fontFamily:nb;Z=i("customizable_auth_widget_styling")?d.width:Z;xa=i("customizable_auth_widget_styling")? d.rowHeight:xa;qb=i("customizable_auth_widget_styling")?d.providersPerPage:qb;Ab=i("customizable_auth_widget_styling")?d.providersNotPaged:Ab;pb=i("customizable_auth_widget_styling")?d.actionText:pb;rb=i("customizable_auth_widget_styling")?d.buttonBorderColor:rb;sb=i("customizable_auth_widget_styling")?d.buttonBorderRadius:sb;tb=i("customizable_auth_widget_styling")?d.buttonBackgroundStyle:tb;kb=i("customizable_auth_widget_hide_attribution")?d.showAttribution:kb;jb=d.previewMode;lb=d.noReturnExperience; Bb=d.noReturnExperienceSwitchAccountLink;la=d.providers;"undefined"===typeof janrain.settings.translate&&(janrain.settings.translate=d.translate={});if(d.customOpenid&&i("customizable_auth_widget_styling")){if(!d.customOpenidLargeIcon)return p.log("Missing customOpenidLargeIcon. customOpenidLargeIcon is required and should be the full path to an image that is 50px x 50px."),p.show(),!1;Ia={largeIcon:d.customOpenidLargeIcon,customOpenIdProviderName:d.customOpenIdProviderName||janrain.settings.translate.SIGN_IN|| "Sign in",customOpenIdProviderColor:d.customOpenIdProviderColor}}if(d.customSAML&&i("customizable_auth_widget_styling")){if(!d.customSAMLLargeIcon)return p.log("Missing customSAMLLargeIcon. customSAMLLargeIcon is required and should be the full path to an image that is 50px x 50px."),p.show(),!1;Wa={largeIcon:d.customSAMLLargeIcon,customSAMLProviderName:d.customSAMLProviderName||janrain.settings.translate.SIGN_IN||"Sign in",customSAMLProviderColor:d.customSAMLProviderColor}}d.previewMode?("modal"=== z&&(janrain.ready?b():X(window,"load",b)),"embed"===z&&(janrain.ready?c():X(window,"load",c))):("modal"===z&&(janrain.ready?F():X(window,"load",F)),"embed"===z&&(janrain.ready?g():X(window,"load",g)))}var ga,fa=!1,ra="janrain_engage_facebook_auto_login",Na,$a=!1,Ha=!1,ba=!1,Aa="url",$,Ma,z="embed",ha="unknown",qa=!1,Ca=300,ba=!1,Ya=!0,aa=!1,oa="default",Ia,Wa,Xa,l,gb,Da,hb,Fa,j,P,ib,wa,ea,Z,xa,ya,la=[],Ab=!1,qb,pb,mb,nb,ob,rb,sb,tb,jb,lb,Bb,kb,bb=!1,Qa=!1;janrain.events.onAuthWidgetLoad||(janrain.events.onAuthWidgetLoad= I());janrain.events.onModalWidgetReady||(janrain.events.onModalWidgetReady=I());janrain.events.onReturnExperienceFound||(janrain.events.onReturnExperienceFound=I());janrain.events.onAuthWidgetLoad.addHandler(function(){Qa=!0;var a=(new O).getCookie(ra);fa&&!a&&e()});janrain.events.onAuthWidgetLoad.addHandler(function(){"function"===typeof janrainWidgetOnload&&(aa?janrainWidgetOnload():j?janrainWidgetOnload(j.getState()):janrainWidgetOnload())});for(var db,Ra=0,Cb,Db="onAuthWidgetContentPlaced,onProviderLoginStart,onProviderLoginError,onProviderLoginToken,onProviderLoginCancel,onProviderLoginSuccess,onProviderLoginComplete,onProviderLogoutStart,onProviderLogoutComplete".split(","), ub=0;ub