
//server injected code
// Debug info: server: WEB511, utc_time: 2013-11-28 00:37:38.758, src_ip: 66.171.231.82, method: HTTP/GET, api key: 2_UW0gX5gvtKLDXjWgTEfiHEBblsgFeQLrMW1F79mqY6WI3AsWO9neqjVavJbTLebW, site found?: True
if (typeof gigya == 'undefined' || !gigya.isGigya) { gigya = { isGigya: true } };
gigya.env='prod';
gigya.gaeDomain='chat.gigya.com';
gigya.build={version:'2.21.13',time:'Sun 11/24/2013 10:34:51.64'};
if (typeof gigya.partnerSettings == 'undefined') {
    gigya.partnerSettings={authMode:'cookie',baseDomains:'history.com,peelinteractive.com'};
    gigya.partnerSettings.plugins={"apiDomain":"US1.gigya.com"};
}
//end server injected code
if("undefined"==typeof gigya||!gigya.isGigya)gigya={isGigya:!0};"undefined"==typeof gigya.partnerSettings&&(gigya.partnerSettings={authMode:"cookie",baseDomain:"",plugins:{apiDomain:"us1.gigya.com"}});"undefined"==typeof gigya.build&&(gigya.build={version:"local",time:(new Date).getTime()});
"object"==typeof gigya&&!0==gigya.loaded&&"object"==typeof console&&console.warn?console.warn("**** Socialize.js loaded twice ****"):function(){gigya.loaded=true;gigya.socialize={};gigya.gcs={};gigya.gm={};gigya.comments={};gigya.accounts={};gigya.global={};if(!gigya.defaultEventMaps)gigya.defaultEventMaps=[];var q=navigator.userAgent.toLowerCase(),u=gigya,v=new Date,w=document.location.href.split("?")[0].split("#")[0].split("/")[2].split(":")[0],x=q.indexOf("win")!=-1,y=q.indexOf("msie")!=-1,z=q.indexOf("msie 6.")!=
-1,A=q.indexOf("msie 7.")!=-1,B=q.indexOf("msie 8.")!=-1,C=q.indexOf("msie 9.")!=-1,D=q.indexOf("iphone")!=-1||q.indexOf("ipad")!=-1,s;s=q.indexOf("applewebkit")!=-1&&q.indexOf("version/")!=-1?parseInt(q.split("version/")[1].split(" ")[0]):0;u.localInfo={initTime:v,version:0,pageDomain:w,userAgent:q,isWin:x,isIE:y,isIE6:z,isIE7:A,isIE8:B,isIE9:C,isIOS:D,iosVersion:s,isChrome:q.indexOf("chrome")!=-1,isFF:q.indexOf("firefox")!=-1,isOpera:q.indexOf("opera")!=-1,isSafari:navigator.appVersion&&navigator.appVersion.toLowerCase().indexOf("safari")!=
-1&&navigator.appVersion.toLowerCase().indexOf("chrome")==-1,isMAC:navigator.appVersion&&navigator.appVersion.toLowerCase().indexOf("mac")!=-1?true:false,isWindowsPhone:q.indexOf("windows phone")!=-1,supportsPostMessage:window.postMessage!=null&&q.indexOf("msie")==-1,supportsLocalStorage:window.localStorage!=null,quirksMode:document.compatMode=="BackCompat"&&q.indexOf("msie")!=-1,backCompat:document.compatMode=="BackCompat",isMobile:function(){var a=["iphone","android","midp","240x320","blackberry",
"netfront","nokia","panasonic","portalmmm","sharp","sie-","sonyericsson","symbian","windows ce","benq","mda","mot-","opera mini","philips","pocket pc","sagem","samsung"],b;for(b in a)if(q.indexOf(a[b])!=-1)return true;return false}()};(function(){var a=gigya.partnerSettings.baseDomains;if(a&&!gigya.partnerSettings.baseDomain)for(var a=a.split(","),b=0;b<a.length;b++){var c=a[b],d=gigya.localInfo.pageDomain.indexOf(c);if(d>=0&&d==gigya.localInfo.pageDomain.length-c.length){gigya.partnerSettings.baseDomain=
c;break}}if(!gigya.partnerSettings.baseDomain)gigya.partnerSettings.baseDomain=""})();gigya.events={addMap:function(a){gigya.defaultEventMaps.splice(0,0,a)},global:{_eventHandlers:{},_pendingEvents:{},_activeNamespaces:{},add:function(a,b,c,d,e){a=e+"_"+a;c||(c="other");this._eventHandlers[a]||(this._eventHandlers[a]=[]);this._eventHandlers[a].push({handler:b,type:c,context:d});this._activeNamespaces[e]=1;if((b=gigya.events.global._pendingEvents[a])&&c=="other"){gigya.events.global._pendingEvents[a]=
[];for(c=0;c<b.length;c++){d=b[c];gigya.events.global.dispatch(d.eventObj,d.params)}}},remove:function(){},dispatch:function(a,b){var c=a.isInternal,d=a.eventName.split(",");gigya.log.log('Dispatching global event "'+a.eventName+'" with this event object',a);for(var e=0;e<d.length;e++){var f=d[e].split("."),g=f.length>1?f.shift():"socialize",i=f[0],f="on"+i.substring(0,1).toUpperCase()+i.substring(1);(f=gigya.utils.object.clone(this._eventHandlers[g+"_"+f]))||(f=[]);var h=gigya.utils.object.clone(a);
h.eventName=i;if(b&&b.source)h.source=b.source;if(b&&b.sourceData)h.sourceData=b.sourceData;i=["component"];c||i.push("other");for(var m=0;m<i.length;m++)for(var k=i[m],n=0;n<f.length;n++){var l=f[n];if(l.type==k){var r=gigya.utils.object.clone(h);r.context==null&&l.context!=null&&(r.context=l.context);r.context==null&&delete r.context;k!="component"&&j.handleSpecialFields(r);try{l.handler(r)}catch(p){gigya.log.log('Error while trying to invoke "'+a.eventName+'" global event handler',p)}}}c||gigya.events._dispatchFromMaps(h,
true);if(!c&&typeof GenesisExchange_Gigya!="undefined"&&typeof gigya_omniture_conf!="undefined"&&g=="socialize"){(new GenesisExchange_Gigya(gigya_omniture_conf)).processAction(h);typeof myOmnitureIntegrationFunc!="undefined"&&myOmnitureIntegrationFunc(gigya_omniture_conf,h)}}},dispatchWhenHandlerAdded:function(a,b){var c=gigya.events.global._pendingEvents,d=a.eventName.split("."),e=d.length>1?d.shift():"socialize",d=d[0],d="on"+d.substring(0,1).toUpperCase()+d.substring(1),e=e+"_"+d;c[e]||(c[e]=[]);
c[e].push({eventObj:a,params:b})},getEventsForOperation:function(a){var b=[];if(a.toLowerCase().indexOf("login")!=-1){this._activeNamespaces.socialize&&b.push("socialize.login");this._activeNamespaces.accounts&&b.push("accounts.login")}else a=="addConnection"&&this._activeNamespaces.socialize&&b.push("socialize.connectionAdded");return b.join(",")}},dispatchErrorFromResponse:function(a,b,c){b||(b={});var d=b;if(d.response)d=d.response;b={eventName:"error",status:d.status?d.status:"FAIL",statusMessage:d.statusMessage?
d.statusMessage:"General Server Error",errorMessage:d.errorMessage?d.errorMessage:"General Server Error",errorDetails:d.errorDetails?d.errorDetails:"",errorCode:d.errorCode?d.errorCode:500001,response:b};gigya.utils.object.add(b,c);gigya.events.dispatchForWidget(b,a)},dispatchInvalidParamError:function(a,b){var c={eventName:"error"};if(typeof a[b]=="undefined"||a[b]==null){c.errorCode=400002;c.errorMessage="Missing_required_parameter ("+b+")"}else{c.errorCode=400006;c.errorMessage="Invalid_parameter_value ("+
b+")"}c.status=c.errorCode;c.statusMessage=c.errorMessage;this.dispatchForWidget(c,a)},dispatchForWidget:function(a,b){if(a&&a.eventName){var c=a.eventName;gigya.log.log('Dispatching widget event "'+c+'" for '+b.lastSource+" with this event object",a);var d="on"+c.substring(0,1).toUpperCase()+c.substring(1);j.handleSpecialFields(a);for(var e=a.eventName.split(","),f,g=0;g<e.length;g++){c=e[g];d="on"+c.substring(0,1).toUpperCase()+c.substring(1);if(b.context)a.context=b.context;if(b&&b.source)a.source=
b.source;if(b&&b.sourceData)a.sourceData=b.sourceData;try{typeof b[d]=="function"&&(f=b[d](a))}catch(i){}if(c.indexOf("login")==-1&&c.indexOf("logout")==-1&&c!="connectionRemoved"&&c!="connectionAdded"){this._dispatchFromMaps(a);if(typeof GenesisExchange_Gigya!="undefined"&&typeof gigya_omniture_conf!="undefined"){(new GenesisExchange_Gigya(gigya_omniture_conf)).processAction(a);typeof myOmnitureIntegrationFunc!="undefined"&&myOmnitureIntegrationFunc(gigya_omniture_conf,a)}}}if(f!=null)return f}},
_dispatchFromMaps:function(a){for(var b=[],c=false,d=0;d<gigya.defaultEventMaps.length;d++){for(var e=gigya.defaultEventMaps[d].eventMap,f=gigya.defaultEventMaps[d].defaultMethod,g=0;g<e.length;g++){var i=e[g],h=[];if(!i.args)i.args=[];for(var m=0;m<i.args.length;m++)h.push(gigya.utils.templates.fill(i.args[m],a));i.events.split(",");m=","+i.events.toLowerCase()+",";if((m.indexOf(",on"+a.eventName.toLowerCase()+",")!=-1||m.indexOf(","+a.eventName.toLowerCase()+",")!=-1)&&(!a.source&&!i.sources||!i.sources||
i.sources.indexOf(a.source)!=-1)){b.push(i);(i.method?i.method:f).apply(this,h);i.override&&(c=true)}}if(c)break}}};gigya.external={backplane:{_ready:null,executeOnInit:function(a,b){if(a){b||(b=2E3);if(gigya.external.backplane.isLoaded())if(!gigya.external.backplane.getChannelId()&&!gigya.external.backplane._ready){window.setTimeout(function(){if(!gigya.external.backplane._ready){gigya.external.backplane._ready=true;a()}},b);Backplane(function(){gigya.external.backplane._ready=true;a()})}else{gigya.external.backplane._ready=
true;a()}else a()}},isLoaded:function(){return typeof Backplane!="undefined"},getChannelId:function(){if(gigya.external.backplane.isLoaded())return Backplane.getChannelID()},resetChannel:function(){gigya.external.backplane.isLoaded()&&Backplane.resetCookieChannel()}},facebook:{_pendingRequests:[],_initializedTime:null,isLoaded:function(){return gigya.external.facebook._initializedTime!=null&&gigya.external.facebook.gigya.external.facebook._initializedTime>0},isLoggedIn:false,isConnected:false,load:function(a){if(!gigya.external.facebook._initializedTime){gigya.external.facebook._initializedTime=
-1;window.setInterval(function(){gigya.external.facebook.refreshSession()},27E5);window.fbAsyncInit=function(){var b=gigya.utils.object.clone(gigya.thisScript.globalConf.facebookInitParams);b||(b={});b.appId=gigya.fbAppID;b.status=false;b.cookie=true;b.xfbml=true;b.oauth=true;FB.init(b);if(a!=true)FB.getLoginStatus(function(a){gigya.external.facebook._initializedTime=(new Date).getTime();gigya.external.facebook.isConnected=a.status=="connected";gigya.external.facebook.isLoggedIn=a.status!="unknown";
gigya.events.global.dispatch({eventName:"facebookLoaded",isLoggedIn:gigya.external.facebook.isLoggedIn,isConnected:gigya.external.facebook.isConnected});gigya.socialize.addEventHandlers({listenerType:"component"},{listenerDescription:"listener for updating Facebook Connect session",onLogin:function(){gigya.external.facebook.refreshSession()},onConnect:function(){gigya.external.facebook.refreshSession()},onLogout:function(){gigya.external.facebook.refreshSession()}})},true);else{gigya.external.facebook._initializedTime=
(new Date).getTime();gigya.events.global.dispatch({eventName:"facebookLoaded",isLoggedIn:gigya.external.facebook.isLoggedIn,isConnected:gigya.external.facebook.isConnected})}};var b=document.createElement("div");b.id="fb-root";gigya.utils.DOM.appendToBody(b);gigya.utils.script.load(document.location.protocol+"//connect.facebook.net/"+gigya.thisScript.lang.full.replace("-","_")+"/all.js",null,function(){if(document.documentElement.style.display=="none")document.documentElement.style.display=""},true)}},
refreshSession:function(){if(typeof FB!="undefined"){var a=function(a){gigya.external.facebook._initializedTime=(new Date).getTime();gigya.external.facebook.isConnected=a.status=="connected";gigya.external.facebook.isLoggedIn=a.status!="unknown";gigya.events.global.dispatch({eventName:"FBCRefreshed"})};gigya.fbAppID&&(FB&&FB.getLoginStatus)&&FB.getLoginStatus(a,true)}},retryPending:function(){for(var a=gigya.external.facebook._pendingRequests,b=0;b<a.length;b++)a[b].cmd.run();gigya.external.facebook._pendingRequests=
[]},addPending:function(a,b){gigya.external.facebook._pendingRequests.push({cmd:a,response:b})},getParams:function(){var a={};if(typeof FB!="undefined"&&FB.getAuthResponse)try{var b=FB.getAuthResponse();if(b){if(b.userID!=null)a.fb_UID=b.userID;if(b.accessToken!=null)a.fb_at=b.accessToken;if(b.expiresIn!=null)a.fb_exp=b.expiresIn}}catch(c){}return a}},openGraph:{getMetaTag:function(a){for(var b=document.getElementsByTagName("meta"),c=0;c<b.length;c++)if(b[c].getAttribute("property")==a&&b[c].getAttribute("content"))return b[c].getAttribute("content")}}};
gigya.utils={array:{indexOf:function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},clone:function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b},removeByProperty:function(a,b,c){if(a)for(var d=a.length-1;d>=0;d--)a[d][b]==c&&a.splice(d,1)}},delegate:{create:function(a,b){return function(){return b.apply(a,arguments)}}},templates:{fill:function(a,b){typeof a=="function"&&(a=a(b));a instanceof Array&&(a=a.join(""));var c=/(\$)(!?)([a-z_][a-z_.\d]*)([(][^()]*[)])?|(\$)(!?)\{([a-z_][a-z_.\d]*)([(][^()]*[)])?\}/gi;
c.lastIndex=0;for(var d=a,e=c.exec(d),f;e!=null;){f=e[1]=="$"?0:4;var g=e[2+f]=="!",i=e[3+f];f=e[4+f];f==null&&(f="");i.substring(0,1)=="."&&(i=i.substring(1));i.substring(0,3)=="DBG"&&(i=i.substring(3));var h="";for(f=i+f;f!=h;){var h=f,m=c.lastIndex;f=gigya.utils.templates.fill(h,b);c.lastIndex=m}h="";m=0;if(b[i.split(".")[0]]!=null)try{h=(new Function("o","p",'return eval("o." + p)'))(b,f)}catch(k){}else{h="$"+(g?"!":"")+f;m=1}d=g?d.replace(e[0],""):d.substr(0,e.index)+h+d.substr(e.index+e[0].length);
c.lastIndex=e.index+m;e=c.exec(d)}return d}},functions:{callFunction:function(a,b){var c=eval(a),d=a.split(".");d.splice(d.length-1,1);d=eval(d.join("."));c.apply(d,b)},invokeOnPageLoad:function(a,b){if(!document.readyState&&document.body||document.readyState=="loaded"||document.readyState=="complete"||!b&&document.readyState=="interactive"&&document.body)a();else{var c=false,d=function(){if(!c){c=true;a()}};window.setTimeout(d,2E4);gigya.utils.DOM.addEventListener(window,"load",d);gigya.utils.DOM.addEventListener(document,
"DOMContentLoaded",d)}},makePublic:function(a,b){for(var c=a.split("."),d=window,e=0;e<c.length-1;e++){var f=c[e];d[f]||(d[f]={});d=d[f]}d[c[c.length-1]]=b}},window:{_openedWindows:{},open:function(a,b,c){if(gigya.localInfo.isIE&&a.length>2048||a.length>4096)gigya.utils.redirect(a.split("?")[0],[gigya.utils.URL.getParamsFromURL(a)],"POST","_blank");else{c||(c="menubar=0,toolbar=0,resizable=1,scrollbars=1,width=960,height=680");var d=c;try{var e=c.split("width=")[1].split(",")[0],f=c.split("height=")[1].split(",")[0],
g=(screen.width-e)/2,i=(screen.height-f)/2;g<0&&(g=0);i<0&&(i=0);d=d+(",top="+i+",left="+g)}catch(h){}(a=window.open(a,b,d))&&a.focus&&a.focus();this._openedWindows[b]=a}return this._openedWindows[b]!=null},close:function(a){if(gigya.utils.window._openedWindows[a]!=null){var b=function(){try{gigya.utils.window._openedWindows[a]!=null&&gigya.utils.window._openedWindows[a].close();delete gigya.utils.window._openedWindows[a]}catch(b){}};gigya.localInfo.iosVersion>=6?b():window.setTimeout(b,10)}}},validation:{isExplicitTrue:function(a){a=
(""+a).toLowerCase();return a=="true"||a=="1"},isExplicitFalse:function(a){a=(""+a).toLowerCase();return a=="false"||a=="0"}},object:{removeUndefined:function(a){var b={},c;for(c in a)a[c]!=null&&a[c]!=void 0&&(b[c]=a[c]);return b},getPropertyBySerializedName:function(a,b,c){if(!b)return a;for(var b=b.split("."),d=0;d<b.length;d++){var e=b[d];c&&!a[e]&&(a[e]={});if(a[e])a=a[e];else return null}return a},setPropertyBySerializedName:function(a,b,c){var b=b.split("."),d=b.pop();this.getPropertyBySerializedName(a,
b.join("."),true)[d]=c},add:function(a,b){for(var c in b)a[c]=b[c]},getHash:function(a){var b=[],c;for(c in a)b.push(c+"="+a[c]);return b.sort().join("&")},getMurmurHash:function(a,b){b||(b=0);var c,d,e,f,g;c=a.length&3;d=a.length-c;e=b;for(g=0;g<d;){f=a.charCodeAt(g)&255|(a.charCodeAt(++g)&255)<<8|(a.charCodeAt(++g)&255)<<16|(a.charCodeAt(++g)&255)<<24;++g;f=(f&65535)*3432918353+(((f>>>16)*3432918353&65535)<<16)&4294967295;f=f<<15|f>>>17;f=(f&65535)*461845907+(((f>>>16)*461845907&65535)<<16)&4294967295;
e=e^f;e=e<<13|e>>>19;e=(e&65535)*5+(((e>>>16)*5&65535)<<16)&4294967295;e=(e&65535)+27492+(((e>>>16)+58964&65535)<<16)}f=0;switch(c){case 3:f=f^(a.charCodeAt(g+2)&255)<<16;case 2:f=f^(a.charCodeAt(g+1)&255)<<8;case 1:f=f^a.charCodeAt(g)&255;f=(f&65535)*3432918353+(((f>>>16)*3432918353&65535)<<16)&4294967295;f=f<<15|f>>>17;e=e^(f&65535)*461845907+(((f>>>16)*461845907&65535)<<16)&4294967295}e=e^a.length;e=e^e>>>16;e=(e&65535)*2246822507+(((e>>>16)*2246822507&65535)<<16)&4294967295;e=e^e>>>13;e=(e&65535)*
3266489909+(((e>>>16)*3266489909&65535)<<16)&4294967295;return(e^e>>>16)>>>0},clone:function(a,b,c,d,e,f){e||(e=0);if(typeof a=="undefined"||a==null||typeof a=="function"&&c)return null;if(a.constructor==Array){for(var g=[],i=0;i<a.length;i++)if(!c||typeof a[i]!="function")g[i]=b?this.clone(a[i],b,c,d,e+1,f):a[i];return g}if(typeof a=="object"){g={};for(i in a)if(!(f&&i=="context")&&(!c||typeof a[i]!="function"))g[i]=b?this.clone(a[i],b,c,d,e+1,f):a[i];return g}return a},merge:function(a){for(var b=
{},c=0;c<a.length;c++)if(a[c]&&a[c].length)for(var d=0;d<a[c].length;d++)for(var e in a[c][d])b[e]=a[c][d][e];else for(e in a[c])b[e]=a[c][e];return b},extractProperties:function(a,b,c){if(a!=null){b==null&&(b={});if(a.constructor==Array)for(var d=0;d<a.length;d++)this.extractProperties(a[d],b,c);else if(c){var c=c.split("|"),e={};for(d in a)e[d.toLowerCase()]=1;for(var f=0;f<c.length;f++){d=c[f];e[d.toLowerCase()]&&(b[d]=a[d])}}else b=gigya.utils.object.clone(a,false);return b}},extractProperty:function(a,
b){return this.extractProperties(a,void 0,b)[b]}},cookie:{get:function(a){a=a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1").replace(/^[ \t]+|[ \t]+$/g,"");return(a=document.cookie.match(RegExp("(?:^|;)\\s?"+a+"=(.*?)(?:;|$)")))&&unescape(a[1])},set:function(a,b,c,d,e){var f=gigya.localInfo.pageDomain,g=gigya.partnerSettings.baseDomain;d==null&&(d=g.length>0&&f.length>=g.length&&f.lastIndexOf(g)==f.length-g.length?g:f);c=c==null||c==""?47304E7:c==0?null:c*1E3;f=new Date;f.setTime(f.getTime()+c);a=a+
"="+escape(b)+(e?"":"; path=/")+(c==null?"":"; expires="+f.toGMTString())+(d&&d!=""&&d.indexOf(".")!=-1?"; domain="+d:"");document.cookie=a},remove:function(a){var b=gigya.localInfo.pageDomain,c=gigya.partnerSettings.baseDomain;if(c.length>0&&b.length>=c.length&&b.lastIndexOf(c)==b.length-c.length){this.set(a,"",-1,c);this.set(a,"",-1,c,true)}this.set(a,"",-1,gigya.localInfo.pageDomain);this.set(a,"",-1,gigya.localInfo.pageDomain,true);this.set(a,"",-1,"");this.set(a,"",-1,"",true)}},sanitize:{sanitizeHTML:function(a){return a==
null||typeof a=="undefined"?a:a.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;").replace(/\"/g,"&#34;").replace(/'/g,"&#39;").replace(/&#38;#173;/g,"&#173;")},sanitizeAttribute:function(a){return a==null||typeof a=="undefined"?a:a.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;").replace(/\"/g,"&#34;").replace(/\=/g,"&#61;")}},JSON:{serialize:function(a,b,c,d){d||(d=0);if(d>10)return"[Too deep]";var e="",f="",g="";if(c)for(var g="\t",f="\n",i=0;i<d+1;i++)e=e+g;var h=
typeof a;if(h=="function")return h.toString();if(h!="object"||a===null){h=="string"&&(a='"'+a.replace(/\"/g,'\\"')+'"');return""+a}var m,k,j=[],l=a&&a.constructor==Array;if(l)for(i=0;i<a.length;i++){k=a[i];h=typeof k;k==null||h=="undefined"?k="":h=="string"?k='"'+k.replace(/\"/g,'\\"')+'"':h=="function"?k=b?"[Function]":"":k.parentNode&&k.innerHTML?k="[HTML Element]":k.constructor==Date?k="":h=="object"&&k!==null&&(k=this.serialize(k,b,c,d+1));""+k!=""&&j.push(e+g+(""+k))}else for(m in a){k=a[m];
h=typeof k;k==null||h=="undefined"?k=""+k:h=="string"?k='"'+k.replace(/\"/g,'\\"')+'"':h=="function"?k=b?"[Function]":"":k.parentNode&&k.innerHTML?k="[HTML Element]":k.constructor==Date?k="":h=="object"&&k!==null&&(k=f+this.serialize(k,b,c,d+1));""+k!=""&&j.push(e+g+'"'+m.replace(/\"/g,'\\"')+'":'+(""+k))}return f+e+(l?"[":"{")+f+j.join(","+f)+f+e+(l?"]":"}")},deserialize:function(a){a===""&&(a='""');eval("var o");try{eval("o="+a)}catch(b){}return o}},viewport:{getScroll:function(){var a=0,b=0;if(typeof window.pageYOffset==
"number"){b=window.pageYOffset;a=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollTop;a=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}return{left:a,top:b}},getFullSize:function(){var a=document.documentElement,b=document.body,c=a.clientHeight;if(c==0)c=b.clientHeight;a=
a.clientWidth;if(a==0)a=b.clientWidth;return{w:a,h:c}},getInnerSize:function(){var a,b;b=document.documentElement;var c=document.body;if(window.innerHeight){a=window.innerHeight;b=window.innerWidth}else{a=b.clientHeight;if(a==0)a=c.clientHeight;b=b.clientWidth;if(b==0)b=c.clientWidth}return{w:b,h:a}},getMiddleCenter:function(){var a=this.getScroll(),b=this.getInnerSize();return{top:a.top+Math.floor(b.h/2),left:a.left+Math.floor(b.w/2)}}},mouse:{_mouseEventObject:null,_moveEvent:function(a){if(!a)a=
window.event;gigya.utils.mouse._mouseEventObject={clientX:a.clientX,clientY:a.clientY}},getPosition:function(){var a=0,b=0;if(document.body){var c=this._mouseEventObject;c||(c={clientX:0,clientY:0});if(c.pageX||c.pageY){a=c.pageX;b=c.pageY}else if(c.clientX||c.clientY){a=c.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;b=c.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:a,y:b}}}},localStorage:{setItem:function(){},getItem:function(){},removeItem:function(){},
_getAllItems:function(){}},redirect:function(a,b,c,d){if(c&&c.toLowerCase()=="post"){var e=document.createElement("form"),f=[];e.setAttribute("accept-charset","UTF-8");e.setAttribute("method","POST");e.setAttribute("action",a);d&&e.setAttribute("target",d);var c=gigya.utils.object.merge(b),g;for(g in c)(typeof c[g]=="boolean"||typeof c[g]=="string")&&g!="eventName"&&f.push('<textarea name="'+encodeURIComponent(g)+'">'+c[g]+"</textarea>");e.innerHTML=f.join("");e.style.display="none";gigya.utils.DOM.appendToBody(e);
e.submit()}else{c=a.split("?");a=c[0];d={};if(c.length>1){c=c[1].split("&");for(e=0;e<c.length;e++){f=c[e].split("=");d[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}}for(e=0;e<b.length;e++){c=b[e];for(g in c)if((typeof c[g]=="boolean"||typeof c[g]=="string")&&g!="eventName")d[g]=c[g]}b=[];for(g in d)b.push(g+"="+encodeURIComponent(d[g]));document.location.href=a+"?"+b.join("&")}},URL:{URLEncode:function(a){return encodeURIComponent(a)},URLDecode:function(a){return decodeURIComponent(a).replace(/\+/g,
" ")},getParamsFromURL:function(a,b){return a.indexOf("?")==-1?{}:gigya.utils.keyValue.deserialize(a.split("#")[0].split("?")[1],"&",b)},getParamValueFromURL:function(a,b,c){if(null==b||""==b)return c;var d=b.indexOf("?");if(d==-1)return c;d="&"+b.substr(d+1);b=d.toLowerCase().indexOf("&"+a.toLowerCase()+"=");if(b==-1)return c;a=d.substr(b+(1+a.length+1))+"&";b=a.indexOf("&");return a.substr(0,b)},addParamsToURL:function(a,b){var c=gigya.utils.URL.getParamsFromURL(a);gigya.utils.object.add(c,b);var d=
a.split("#"),c=d[0].split("?")[0]+"?"+gigya.utils.keyValue.serialize(c,"&");d.length>1&&(c=c+("#"+d[1]));return c}},keyValue:{serialize:function(a,b){var c=[];b||(b="&");for(var d in a)switch(typeof a[d]){case "function":break;case "array":case "object":a[d]!=null&&c.push(d+"="+gigya.utils.URL.URLEncode(gigya.utils.JSON.serialize(a[d])));break;case "undefined":break;default:c.push(d+"="+gigya.utils.URL.URLEncode(a[d]))}return c.join(b)},deserialize:function(a,b,c,d){var e={};if(!a)return e;b||(b=
"&");a=a.split(b);for(b=0;b<a.length;b++){var f=a[b],g=f.indexOf("=");if(g==-1){var i=c?f.toLowerCase():f;e[i]="1"}else{i=f.substr(0,g);c&&(i=i.toLowerCase());f=f.substr(g+1).replace(/\+/g," ");try{e[i]=d?unescape(f):gigya.utils.URL.URLDecode(f)}catch(h){e[i]=unescape(f)}}}return e}},DOM:{_nextZIndex:999999999,_popupContainers:[],_pseudoContainers:[],_backListener:null,addEventListener:function(a,b,c){a&&c&&(window.addEventListener?a.addEventListener(b,c,true):a.attachEvent("on"+b,c))},removeEventListener:function(a,
b,c){c&&(window.removeEventListener?a.removeEventListener(b,c,true):a.detachEvent("on"+b,c))},addDialogBackListener:function(a){gigya.utils.DOM._removeDialogBackListener();var b=function(b){if(b&&b.newURL&&b.newURL.indexOf("|gigyaMobileDialog")==-1){a(b);gigya.utils.DOM._removeDialogBackListener()}};gigya.utils.DOM._backListener=b;window.setTimeout(function(){if(window.location.hash.indexOf("|gigyaMobileDialog")==-1)window.location.hash=window.location.hash+"|gigyaMobileDialog";gigya.utils.DOM.addEventListener(window,
"hashchange",b)},50)},_removeDialogBackListener:function(){var a=gigya.utils.DOM._backListener;if(a){gigya.utils.DOM.removeEventListener(window,"hashchange",a);gigya.utils.DOM._backListener=null;window.location.hash=window.location.hash.replace("|gigyaMobileDialog","")}},appendToBody:function(a){document.body&&(document.body.insertBefore&&document.body.firstChild?document.body.insertBefore(a,document.body.firstChild):document.body.appendChild(a))},removeElement:function(a){a.parentElement&&a.parentElement.removeChild(a)},
isVisible:function(a){if(!a||!a.parentNode||a.style&&a.style.display=="none")return false;if(a.parentNode)return gigya.utils.DOM.isVisible(a.parentNode)},createTopLevelDiv:function(a){var b=document.createElement("div");b.style.position="absolute";if(b.style.zIndex!=null)b.style.zIndex=this._nextZIndex++;if(a)b.id=a;this.appendToBody(b);return b},hideByID:function(a){if(a=document.getElementById(a))a.style.display="none"},showByID:function(a){if(a=document.getElementById(a))a.style.display=gigya.localInfo.isIE6?
a.tagName=="TD"?"table-cell":a.tagName=="TR"?"":a.tagName=="TABLE"?"":"block":""},clearByID:function(a){try{var b=document.getElementById(a);if(b!=null)b.innerHTML=""}catch(c){}},getHTMLSize:function(a,b){var c=document.createElement("div");c.style.position="absolute";c.style.left="-1000px";c.innerHTML=a;b.appendChild(c);var d=c.offsetWidth,e=c.offsetHeight;c.parentNode.removeChild(c);return{w:d,h:e}},getElementsByClass:function(a,b){if(!a)return[];for(var c=[],d=a.getElementsByTagName("*"),e=0;e<
d.length;e++){var f=d[e].className;if(f)for(var f=f.split(" "),g=0;g<f.length;g++)f[g]==b&&c.push(d[e])}return c||[]},getElementsByAttribute:function(a,b,c,d){for(var e=[],a=a.getElementsByTagName(b),b=0;b<a.length;b++)a[b].getAttribute(c)==d&&e.push(a[b]);return e},getElementPosition:function(a){if(!a)return{left:0,top:0};var b=curtop=0;if(a.offsetParent){do{b=b+a.offsetLeft;curtop=curtop+a.offsetTop}while(a=a.offsetParent)}return{left:b,top:curtop}},addClassToElement:function(a,b){if(a){for(var c=
false,d=a.className.split(" "),e=0;e<d.length;e++)if(d[e]==b){c=true;break}if(!c){d.push(b);a.className=d.join(" ")}}},removeClassFromElement:function(a,b){if(a){for(var c=a.className.split(" "),d=c.length-1;d>=0;d--)c[d]==b&&c.splice(d,1);a.className=c.join(" ")}},isElementClass:function(a,b){if(a){for(var c=false,d=a.className.split(" "),e=0;e<d.length;e++)if(d[e]==b){c=true;break}return c}},cancelEvent:function(a){if(a)"cancelable"in a?a.preventDefault():a.returnValue=false},createElement:function(a,
b){var c=document.createElement("div"),b=b||"";c.innerHTML="<"+a+' name="'+b+'" id="'+b+'"></'+a+">";return c.firstChild}},SSO:{_domain:document.location.protocol+"//"+document.location.href.split("?")[0].split("#")[0].split("/")[2],_request:function(a,b){b=gigya.utils.object.clone(b);if(gigya.partnerSettings.ssoKey){var c=this._getIframe();b||(b={});var d=b.callback;b.callback=function(b){gigya.log.log("SSO: About to invoke callback for "+a+" with this response",b);d&&d(b)};b.m=a;b.d=this._domain;
b.lid=gigya.utils.xd._flashListenerID;if(b.legacyCrossSiteMethod&&b.legacyCrossSiteMethod.toLowerCase()!="localstorage")b.lid=b.legacyCrossSiteMethod+":"+gigya.utils.xd._flashListenerID;if(typeof b.callback=="function"){b.callbackID="gig_sso_cb"+(new Date).getTime();gigya.utils.xd.addMessageListener(b.callbackID,{},b.callback);delete b.callback}b.sAPIKey=gigya.thisScript.APIKey;var e=gigya.utils.keyValue.serialize(b);c.src="https://cdns.gigya.com/gs/sso.htm?APIKey="+gigya.partnerSettings.ssoKey+"&version=1#"+
(new Date).getTime()+"&"+e;gigya.log.log("SSO: Calling "+a,{SSOKey:gigya.partnerSettings.ssoKey,params:b});document.body?gigya.utils.DOM.appendToBody(c):gigya.utils.functions.invokeOnPageLoad(function(){gigya.utils.DOM.appendToBody(c)})}else b&&b.callback&&b.callback()},_getIframe:function(){var a=document.getElementById("gig_sso");if(!a){a=document.createElement("iframe");a.style.width="30px";a.style.height="10px";a.style.position="absolute";a.style.top="-1000px";a.style.left="-1000px";a.id="gig_sso"}return a},
getGroupToken:function(a){this._request("getToken",a)},setGroupTokenFromResponse:function(a,b,c){if(a.sessionInfo)a=a.sessionInfo;var d=a.expires_in,d=d==null||d==""?47304E7:d==0?null:d*1E3,e=new Date;e.setTime(e.getTime()+d);gigya.utils.SSO.setGroupToken({lt:a.login_token,expiration:d==null?0:e.getTime(),legacyCrossSiteMethod:c,callback:b})},setGroupToken:function(a){this._request("setToken",a)},logout:function(a){this._request("logout",a)},removeGroupToken:function(a){this._request("removeToken",
a)}},xd:{_listeners:{},_flashListenerID:"flid"+(new Date).getTime(),_added:false,_addedLegacyMethods:{},_onFlashMessage:function(a){var a=gigya.utils.keyValue.deserialize(a,null,null,true),b=a.id,c=this._listeners[b];if(c!=null){typeof c.callback=="function"&&c.callback(a,c.context);this.removeMessageListener(b)}},_onMessage:function(a){var b=this,c=function(){var c=a.data.split("="),e=b._listeners[c[0]];if(e!=null){if(typeof e.callback=="function"){var f=unescape(c[1]),f=gigya.utils.keyValue.deserialize(f,
null,null,true);e.callback(f,e.context)}b.removeMessageListener(c[0])}};a&&(a.data&&a.data.split)&&(gigya.localInfo.iosVersion>=6?c():window.setTimeout(c,100))},addMessageListener:function(a,b,c){this._listeners[a]={callback:c,context:b,t:(new Date).getTime()};var d="localstorage";if(b&&b.c&&b.c.legacyCrossSiteMethod&&b.c.legacyCrossSiteMethod.toLowerCase()!="localstorage")d=b.c.legacyCrossSiteMethod;var e=this;if(gigya.localInfo.supportsPostMessage){if(!this._added){window.addEventListener?window.addEventListener("message",
function(a){e._onMessage(a)},false):window.attachEvent&&window.attachEvent("onmessage",function(a){e._onMessage(a)});this._added=true}}else gigya.utils.xd._addedLegacyMethods[d]||window.setTimeout(function(){var a=document.createElement("div");a.style.width="1px";a.style.height="1px";a.style.overflow="hidden";a.style.position="absolute";a.style.left="-1000px";var c=gigya.utils.xd._flashListenerID;d!="localstorage"&&(c=b.c.legacyCrossSiteMethod+":"+gigya.utils.xd._flashListenerID);var e=document.location.protocol+
"//"+document.location.href.split("?")[0].split("#")[0].split("/")[2],h=(new Date).getTime(),m=document.createElement("object");with(m){setAttribute("id","eventsBroadcaster"+h);setAttribute("codebase","https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0");setAttribute("width","50");setAttribute("height","50");setAttribute("src","https://cdns.gigya.com/GS/swf/eventsBroadcaster2.swf")}h=document.createElement("param");h.name="movie";h.setAttribute("value","https://cdns.gigya.com/GS/swf/eventsBroadcaster2.swf");
m.appendChild(h);h=document.createElement("param");h.setAttribute("name","allowScriptAccess");h.setAttribute("value","always");m.appendChild(h);h=document.createElement("param");h.setAttribute("name","FlashVars");h.setAttribute("value","action=listen&id="+c+"&eventName=loginComplete&callback=gigya.utils.xd._onFlashMessage&domain="+e);m.appendChild(h);a.appendChild(m);gigya.utils.functions.invokeOnPageLoad(function(){gigya.utils.DOM.appendToBody(a);m.setAttribute("type","application/x-shockwave-flash");
m.setAttribute("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")});gigya.utils.xd._addedLegacyMethods[d]=true},500)},removeMessageListener:function(a){delete this._listeners[a]}},script:{_pending:{},load:function(a,b,c,d){var e=gigya.utils.script._pending;if(d&&e[a])if(e[a].loaded)c&&c();else{e[a].onLoad.push(c);e[a].onError.push(b)}else{d=function(){var f=document.createElement("script");f.async=true;f.type="text/javascript";f.charset="UTF-8";e[a]||(e[a]={loaded:false,onLoad:[c],onError:[b]});
var d=e[a],i=false,h=function(){if(!i){e[a].loaded=true;for(var b=0;b<d.onLoad.length;b++)if(typeof d.onLoad[b]=="function")d.onLoad[b]();i=true;setTimeout(function(){f.parentNode&&f.parentNode.removeChild(f)},5E3)}};f.onload=h;f.onreadystatechange=function(){this.readyState=="loaded"&&h()};f.onerror=function(){for(var b=0;b<d.onError.length;b++)if(typeof d.onError[b]=="function")d.onError[b]();delete e[a]};var m=document.getElementsByTagName("head");m&&m.length>0&&m[0].appendChild(f);m=function(){f.src=
a};gigya.localInfo.iosVersion>=6?m():setTimeout(m,1)};gigya.localInfo.isIE?gigya.utils.functions.invokeOnPageLoad(d):d()}}},sessionCache:{set:function(a,b){if(window.sessionStorage){var c;try{(c=gigya.utils.JSON.deserialize(window.sessionStorage.getItem("gigyaCache")))||(c={});b==null&&c[a]?delete c[a]:c[a]={response:b,time:(new Date).getTime()};window.sessionStorage.setItem("gigyaCache",gigya.utils.JSON.serialize(c))}catch(d){}gigya.callsQueue.release("cache","cache_"+a)}},get:function(a,b,c){if(window.sessionStorage)try{if(!gigya.callsQueue.isActive("cache_"+
a)){var d=window.sessionStorage.getItem("gigyaCache"),e=gigya.utils.JSON.deserialize(d),f=e?e[a]:null;if(f){if(b&&b+f.time>(new Date).getTime()){c(f.response);return}gigya.utils.sessionCache.remove(a);f=null}if(!f){gigya.callsQueue.hold("cache","cache_"+a);c(null);return}}gigya.callsQueue.isActive("cache_"+a)&&gigya.callsQueue.waitFor("cache_"+a,gigya.utils.sessionCache.get,arguments)}catch(g){c(null)}else typeof c=="function"&&c()},remove:function(a){gigya.utils.sessionCache.set(a,null)}},stringUtils:{format:function(a,
b){for(var c=0;c<arguments.length-1;c++)arguments[c+1]!=null&&(a=a.split("{"+c+"}").join(arguments[c+1]));return a}},browser:{_cache:{},isModern:function(){return gigya.localInfo.isChrome||gigya.localInfo.isFF||gigya.localInfo.opera||gigya.localInfo.isIE&&gigya.utils.browser.getVersion()>=9||gigya.localInfo.isSafari&&gigya.utils.browser.getVersion()>=4},getVersion:function(){if(this._cache.version)return gigya.utils.browser._cache.version;var a=q.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
if(a[2]){a=a[2].split(".")[0];if(!isNaN(parseInt(a)))return gigya.utils.browser._cache.version=parseInt(a)}return 0}}};if(gigya.localInfo.supportsLocalStorage)gigya.utils.localStorage={_getAllItems:function(){return window.localStorage},setItem:function(a,b){try{window.localStorage[a]=b}catch(c){}},getItem:function(a){return window.localStorage[a]},removeItem:function(a){window.localStorage.removeItem(a)}};else if(gigya.localInfo.isIE6||gigya.localInfo.isIE7)gigya.utils.localStorage={_start:function(){if(!gigya.utils.localStorage.el){gigya.utils.localStorage.el=
document.createElement("div");gigya.utils.localStorage.el.addBehavior("#default#userData");gigya.utils.DOM.appendToBody(gigya.utils.localStorage.el)}},_getAllItems:function(){this._load();for(var a={},b=this.el.XMLDocument.firstChild.attributes,c=0;c<b.length;c++)a[b[c].name]=b[c].value;return a},_save:function(){try{this._start();this.el.save("gigya_ud")}catch(a){}},_load:function(){try{this._start();this.el.load("gigya_ud")}catch(a){}},setItem:function(a,b){this._load();this.el.setAttribute(a,b);
this._save()},getItem:function(a){this._load();return this.el.getAttribute(a)},removeItem:function(a){this._load();this.el.removeAttribute(a);this._save()},implementation:"userData behavior (IE6/IE7)"};else if(gigya.localInfo.isFF)gigya.utils.localStorage={setItem:function(a,b){try{globalStorage[location.hostname][a]=b}catch(c){}},getItem:function(a){return globalStorage[location.hostname][a]},removeItem:function(a){delete globalStorage[location.hostname][a]}};gigya.utils.localStorage.setObject=function(a,
b){this.setItem(a,gigya.utils.JSON.serialize(b))};gigya.utils.localStorage.getObject=function(a){a=this.getItem(a);try{a=gigya.utils.JSON.deserialize(a)}catch(b){}return a};document.attachEvent?document.attachEvent("onmousemove",gigya.utils.mouse._moveEvent):document.addEventListener&&document.addEventListener("mousemove",gigya.utils.mouse._moveEvent,false);gigya.auth={oAuthToken:{get:function(a){return a.oauth_token}},loginToken:{_triedGACs:{},_getTokenCookieName:function(a){if(!a)a=gigya.thisScript.APIKey;
return a?"glt_"+a:"_gig_lt"},get:function(a){return(a=gigya.utils.cookie.get(gigya.auth.loginToken._getTokenCookieName(a)))?a.split("|")[0]:null},set:function(a,b,c){gigya.utils.localStorage.removeItem("gigyaSettings");if(!a)a=gigya.thisScript.APIKey;if(a){gigya.utils.cookie.set("glt_"+a,b,c);gigya.utils.cookie.remove("gac_"+a)}else gigya.utils.cookie.set("_gig_lt",b,c)},setFromGAC:function(){if(gigya.thisScript.APIKey){var a=gigya.utils.cookie.get("gac_"+gigya.thisScript.APIKey);if(a){a.charAt(0)==
'"'&&a.charAt(a.length-1)=='"'&&(a=a.substring(1,a.length-1));if(gigya.callsQueue.isActive("API"))gigya.callsQueue.waitFor("API",gigya.auth.loginToken.setFromGAC,[]);else if(!gigya.auth.loginToken._triedGACs[a]){gigya.auth.loginToken._triedGACs[a]=true;gigya.socialize.notifyLogin({neverTryGAC:true,authCode:a,APIKey:gigya.thisScript.APIKey,client_id:gigya.thisScript.APIKey},{callback:function(){gigya.utils.cookie.remove("gac_"+gigya.thisScript.APIKey);gigya.callsQueue.release("GAC","API");gigya.socialize.refreshUI({neverTryGAC:true})}});
gigya.callsQueue.hold("GAC","API")}}}},setFromSSOResponse:function(a,b){if(!b)b=gigya.thisScript.APIKey;if(a.errorCode==0){gigya.auth.loginToken.set(b,a.login_token,a.expires_in);gigya.socialize.getUserInfo({signIDs:true,callback:function(b){a.errorCode==0&&gigya.events.global._activeNamespaces.accounts&&gigya.accounts.getAccountInfo({callback:function(a){var b={eventName:"accounts.login"};gigya.utils.object.extractProperties(a,b,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data");
gigya.events.global.dispatch(b)},include:"profile,data",includeUserInfo:false});b=gigya.socialize._addUserInfoToEvent(b,{eventName:"login"},true);gigya.events.global.dispatch(b);gigya.external.backplane.executeOnInit(function(){gigya.external.backplane.getChannelId()&&gigya.socialize.notifySSOLogin({bp_channel_url:gigya.external.backplane.getChannelId()})})}})}},remove:function(a){gigya.auth.loginToken.get()&&gigya.utils.SSO.removeGroupToken();if(!a)a=gigya.thisScript.APIKey;gigya.utils.cookie.remove("glt_"+
a);gigya.utils.cookie.remove("_gig_lt")},migrateExisting:function(){var a=gigya.utils.cookie.get("_gig_lt");if(a&&gigya.thisScript.APIKey&&!gigya.auth.loginToken.get()){gigya.utils.cookie.remove("_gig_lt");gigya.auth.loginToken.set(null,a)}},getTokenParam:function(a,b){var c=gigya.utils.cookie.get(gigya.auth.loginToken._getTokenCookieName(a));if(c){c=c.split("|");return c.length>1?gigya.utils.keyValue.deserialize(c[1])[b]:null}}}};gigya.log={_isEnabled:function(){return gigya.utils.cookie.get("_gig_dbgConsole_log")==
"1"},_log:[],log:function(a,b){if(gigya.log._isEnabled()){var b=gigya.utils.object.clone(b,true,false,4,null,true),c=a;b!=null&&(c=c+(":"+(typeof b=="object"?"\n":"")+gigya.utils.JSON.serialize(b,true,true)));gigya.log._log.push(c);typeof console=="object"&&console.log(c);document.getElementById("gigya_log")!=null&&gigya.log.show&&gigya.log.show()}},logCall:function(a,b,c){if(!c)c=b.lastSource;gigya.log.log("Calling "+a+(c&&c!=a?" for "+c:"")+(b.source&&c!=b.source?" initiated from "+b.source:"")+
" with these params",b)}};gigya.debug=function(){gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services.socialize.plugins.log.min.js",null,function(){gigya.log.showConfig()},true)};gigya.showLog=function(){gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services.socialize.plugins.log.min.js",null,function(){gigya.log.show()},true)};gigya.callsQueue={_q:{},isActive:function(a){if(!this._q[a])return false;var b=0,c;for(c in this._q[a].ids)b++;return b>0},release:function(a,b){if(this._q[b]){delete this._q[b].ids[a];
if(!this.isActive(b)){var c=this._q[b].q;for(this._q[b].q=[];c.length>0;){var d=c.splice(0,1)[0];d.func.apply(this,d.args);if(this.isActive(b)){this._q[b].q=c;break}}}}},hold:function(a,b){this._q[b]||(this._q[b]={q:[],ids:{}});this._q[b].ids[a]=true},waitFor:function(a,b,c){this._q[a]||(this._q[a]={q:[],ids:{}});this._q[a].q.push({func:b,args:c})},queueForExecution:function(a,b,c){c=c||[];gigya.callsQueue.isActive(a)?gigya.callsQueue.waitFor(a,b,c):b.apply(this,c)}};gigya.thisScript={APIKey:null,
protocol:document.location.protocol=="http:"?"http":"https",base:null,params:{},globalConf:{},lang:{},scriptElement:null,_retried:0,_getScriptElement:function(){for(var a=document.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b],d=c.src.toLowerCase();if(d!=""&&(d.indexOf("//cdn.gigya.com")>-1||d.indexOf("//cdns.gigya.com")>-1||d.indexOf("?apikey=")>-1)&&(d.indexOf("gigya.js")>-1||d.indexOf("socialize.js")>-1||d.indexOf("gsjssdk.js")>-1)){gigya.thisScript.scriptElement=c;break}}if(gigya.thisScript.scriptElement){gigya.thisScript.protocol=
gigya.thisScript.scriptElement.src.toLowerCase().indexOf("https")==0?"https":"http";gigya.thisScript.arPaths=gigya.thisScript.scriptElement.src.split("/");gigya.thisScript.base=gigya.thisScript.arPaths[0]+"//"+gigya.thisScript.arPaths[2];gigya.thisScript.URLParams=gigya.utils.URL.getParamsFromURL(gigya.thisScript.scriptElement.src,true);gigya.callsQueue.release("thisScript","API")}else{gigya.thisScript.base=gigya.thisScript.protocol=="http"?"http://cdn.gigya.com":"https://cdns.gigya.com";gigya.thisScript.URLParams=
{};if(gigya.thisScript._retried<10){gigya.thisScript._retried++;gigya.callsQueue.hold("thisScript","API");window.setTimeout(gigya.thisScript._getScriptElement,200)}else gigya.callsQueue.release("thisScript","API")}}};gigya.thisScript._getScriptElement();gigya.callsQueue.queueForExecution("API",function(){if(gigya.thisScript.scriptElement&&gigya.thisScript.scriptElement.innerHTML.replace(/^\s+|\s+$/g,"")!="")try{gigya.thisScript.globalConf=gigya.utils.JSON.deserialize(gigya.thisScript.scriptElement.innerHTML);
if(typeof gigya.thisScript.globalConf!="object")gigya.thisScript.globalConf={}}catch(a){alert("Gigya global configuration object parse error");gigya.thisScript.globalConf={}}if(typeof window.__gigyaConf!="object")window.__gigyaConf={};if(typeof gigya.partnerSettings.plugins!="object")gigya.partnerSettings.plugins={};gigya.thisScript.globalConf=gigya.utils.object.merge([gigya.partnerSettings.plugins,gigya.thisScript.globalConf,window.__gigyaConf]);if(gigya.thisScript.URLParams.apikey)gigya.thisScript.APIKey=
gigya.thisScript.URLParams.apikey;!gigya.thisScript.APIKey&&(typeof console=="object"&&console.warn&&gigya.thisScript.scriptElement)&&console.warn("**** WARNING - Loading socialize.js without an APIKey parameter is unsupported and may result in an unexpected behavior.  ****");var b=gigya.thisScript.URLParams.lang;b||(b="en-US");var b=b.replace("_","-").toLowerCase(),c=b.split("-"),d=c[0],c=c.length>1?c[1]:d,c=c.toUpperCase();switch(b){case "es-mx":case "pt-br":case "zh-cn":case "zh-hk":case "zh-tw":case "en-gb":case "te-st":break;
default:b=d}gigya.thisScript.lang={full:d+"-"+c,langCode:b,countryCode:c}});gigya.reports={trackAddressBarShares:function(){if(gigya.thisScript.globalConf.trackAddressBarShares){var a=gigya.auth.loginToken.getTokenParam(null,"UUID"),b=document.location.href.split("#");if(b.length==1||b[1]=="")document.location.replace("#guid="+(a?a:"_"))}},report:function(a,b,c,d,e,f){var g=arguments;gigya.utils.functions.invokeOnPageLoad(function(){window.setTimeout(function(){if(a){if(!b)b=gigya.thisScript.APIKey;
if(gigya.callsQueue.isActive("API"))gigya.callsQueue.waitFor("API",gigya.reports.report,g);else{var i=new Image(1,1),h={sdk:"js",f:"re",e:a,ak:b,cid:c,source:d,sourceData:e,now:(new Date).getTime(),ucid:gigya.partnerSettings.ucid};if(f)for(var m in f)h[m]=f[m];m="https";if(a=="load"||a=="loadc")m=gigya.thisScript.protocol;if(m=="https")h.gcid=gigya.partnerSettings.gcid;h=gigya.utils.stringUtils.format("{0}://gscounters.{1}/gs/api.ashx?{2}",m,gigya.partnerSettings.plugins.apiDomain,gigya.utils.keyValue.serialize(h));
i.src=h}}},500)},true)},reportLoad:function(a,b){if(!b._reportedLoad&&b.containerID){b._reportedLoad=true;var c="load";if(a!="gigya.socialize.plugins.reactions.showReactionsBarUI"){a=="gigya.socialize.plugins.simpleshare.showSimpleShareUI"&&(c="loadSimple");this.report(c,b.APIKey,b.cid,b.source,b.sourceData)}}}};gigya.getVersion=function(){return"js_"+gigya.build.version};gigya.socialize.showShareUI=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=a.operationMode;
b&&(b=b.toLowerCase().replace(/ /g,""));if(!a.containerID){delete a.width;delete a.height}return b=="simpleshare"||b=="autodetect"&&!j.canSendRequest(a)?gigya.socialize.showSimpleShareUI(a):j.showUI("share","showShareUI",a,true,{width:520,height:320},{width:595,height:324},"userAction")};gigya.comments.showCommentsUI=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.prepareParameters(a);return a.version==2&&gigya.utils.browser.isModern()?j.showUI("comments.comments2",
"showCommentsUI",a,false,{width:500}):j.showUI("comments.comments","showCommentsUI",a,false,{width:500})};gigya.gm.showNotifications=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=gigya.utils.localStorage.getObject("gmSettings");if(!b||!b.disableNotifications){a.containerID="gigNotifications";if(!document.getElementById(a.containerID)){b=document.createElement("div");b.id=a.containerID;b.style.position="absolute";b.style.left="-1000px";gigya.utils.DOM.appendToBody(b)}return j.showUI("gm.notifications",
"showNotifications",a)}};gigya.socialize.showConnectUI=function(){this.showAddConnectionsUI.apply(this,Array.prototype.slice.apply(arguments))};gigya.socialize.login=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);gigya.auth.loginToken.remove(a.APIKey);j.endPoint("login",a,function(a,c){(!a.dontClose||a.dontClose=="false")&&gigya.utils.window.close(c.id);a.errorCode==0?gigya.utils.validation.isExplicitTrue(c.p.authCodeOnly)?j.handleRESTResponse(c,{authCode:a.code}):
j.handleRESTResponse(c,a):j.handleRESTResponse(c,a)})};gigya.accounts._injectCSS=function(a){a||(a={});return j.showUI("accounts.screenSet","_injectCSS",a,true,null,null,null,null,true)};gigya.accounts.socialLogin=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);gigya.auth.loginToken.remove(a.APIKey);j.endPoint("/accounts.socialLogin",a,function(a,c){(!a.dontClose||a.dontClose=="false")&&gigya.utils.window.close(c.id);j.handleRESTResponse(c,a)})};gigya.socialize.addConnection=
function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.endPoint("addConnection",a,function(a,c){(!a.dontClose||a.dontClose=="false")&&gigya.utils.window.close(c.id);j.handleRESTResponse(c,a)})};gigya.socialize.requestPermissions=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.endPoint("requestPermissions",a,function(a,c){(!a.dontClose||a.dontClose=="false")&&gigya.utils.window.close(c.id);j.handleRESTResponse(c,a)})};gigya.socialize.postBookmark=
function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);if(!a.APIKey)a.APIKey=gigya.thisScript.APIKey;var b={};gigya.utils.object.extractProperties([a],b,j.APIParamSchema.postBookmark);b.sdk=gigya.getVersion();if((!b.URL||b.URL=="")&&(!b.url||b.url=="")&&b.userAction&&!b.userAction.linkBack)for(var c=document.getElementsByTagName("meta"),d=0;d<c.length;d++)if(c[d].getAttribute("property")=="og:url"&&c[d].getAttribute("content")){b.URL=c[d].getAttribute("content");break}if(!b.URL&&
!b.url&&b.userAction&&!b.userAction.linkBack)b.URL=document.location.href;delete b.context;if(!b.provider)a.provider="";if(!b.providerKey&&b.provider.toLowerCase()=="facebook")b.providerKey=gigya.external.openGraph.getMetaTag("fb:app_id");var c=gigya.utils.keyValue.serialize(b),d=j.getBookmarkSize(b.provider),e=a.enablePopupLocation?"location=1,toolbar=1":null;d.w&&d.h&&(e=(a.enablePopupLocation?"location=1,toolbar=1,":"toolbar=0,")+"menubar=0,resizable=1,scrollbars=1,width="+d.w+",height="+d.h);
gigya.log.logCall("postBookmark",b);gigya.utils.window.open(gigya.utils.stringUtils.format("https://socialize.{0}/gs/bookmark.aspx?{1}",a.apiDomain,c),"gs_bookmark_"+b.provider,e)};gigya.socialize.trackReferrals=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=a.APIKey?a.APIKey:gigya.thisScript.APIKey,c={},d={};document.location.href.indexOf("#")!=-1&&(d=gigya.utils.keyValue.deserialize(document.location.href.split("#")[1]));document.location.href.indexOf("?")!=
-1&&(c=gigya.utils.keyValue.deserialize(document.location.href.split("?")[1].split("#")[0]));d.guid&&d.guid!="_"&&gigya.utils.cookie.set("_gigRefUid_"+b,d.guid);var e=d._giguuid||c._giguuid;e&&gigya.utils.cookie.set("_gigRefUid_"+b,e);if(!(d._gus!=null||c._gus!=null)){if(!gigya.reportedReferrals){var f,d={url:document.location.href,ref:document.referrer};if(c.fb_ref){f=gigya.utils.keyValue.deserialize(c.fb_ref,":");d.uuid=f.uu;d.sn=f.p;f=f.s}else if(document.referrer&&document.referrer.indexOf("://")!=
-1){c=document.referrer.split("://")[1].split("/")[0];c.indexOf("www.")==0&&(c=c.split("www.")[1]);e={"digg.com":"digg","stumbleupon.com":"stumbleupon","delicious.com":"delicious","technorati.com":"technorati","t.co":"twitter","plus.url.google.com":"googlePlus","facebook.com":"facebook","linkedin.com":"linkedIn","pinterest.com":"pinterest"};if(e[c])d.sn=e[c]}if(!d.sn&&(!document.referrer||document.referrer.indexOf("http://soc.li")==-1&&document.referrer.indexOf("https://shr.gs")==-1)){c=document.location.href.split("#guid=");
if(c.length>1){c=c[1].split("#")[0].split("&")[0];if(c!=gigya.auth.loginToken.getTokenParam(b,"UUID")){d.sn="AddressBarShares";d.uuid=c;c=="_"&&delete d.uuid;document.location.replace("#");gigya.reports.trackAddressBarShares();d.url=document.location.href.split("#")[0]}}}d.uuid&&gigya.utils.cookie.set("_gigRefUid_"+b,d.uuid);d.sn&&gigya.reports.report("linkback",b,a.cid,f,null,d);gigya.reportedReferrals=true}typeof a.callback=="function"&&a.callback({status:"OK",statusMessage:"",operation:"trackReferrals",
context:a.context,errorMessage:"",errorCode:0})}};gigya.socialize.sendEmailNative=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=a.userAction||{};document.location.href="mailto:?to=&subject="+(b.title||"")+"&body="+(b.linkBack||"");gigya.socialize.sendEmail(a,{dontSendEmail:true})};gigya.socialize.hideUI=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);typeof a.callback=="function"&&a.callback({status:"OK",statusMessage:"",operation:"hideUI",
context:a.context,errorMessage:"",errorCode:0})};gigya.gcs.submitUserForm=function(){var a={},b=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),c=document.getElementById(b.form);if(!c)(arForms=document.getElementsByName(b.form))&&arForms.length>0&&(c=arForms[0]);for(var d=0;d<c.elements.length;d++){var e=c.elements[d];if(e.name){for(var f=e.name.split("."),g=a,i=0;i<f.length-1;i++){var h=f[i];g[h]||(g[h]={});g=g[h]}g[f[f.length-1]]=e.value}}b.data=a;gigya.gcs.setUserData(b)};gigya.socialize.addEventHandlers=
function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=a.namespace?a.namespace:"socialize",c;for(c in a)c.indexOf("on")==0&&gigya.events.global.add(c,a[c],a.listenerType,a.context,b);typeof a.callback=="function"&&a.callback({status:"OK",statusMessage:"",errorCode:0,errorMessage:"",operation:"addEventHandlers",context:a.context})};gigya.accounts.addEventHandlers=function(){var a=gigya.utils.object.merge([arguments,{namespace:"accounts"}]);gigya.socialize.addEventHandlers(a)};
gigya.socialize.waitForService=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]),b=a.service;if(b){b=b.toLowerCase();if(b=="fbconnect"||b=="facebook"){b=a.callback;!gigya.external.facebook._initializedTime||gigya.external.facebook._initializedTime<0?gigya.socialize.addEventHandlers({listenerType:"component"},{onFacebookLoaded:b,context:a.context}):b({context:a.context})}}};gigya.socialize.refreshUI=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,
arguments]),b=a.callback;a.callback=function(c){var d={eventName:"login",isInternal:true};if(a.provider)d.provider=a.provider;gigya.socialize._addUserInfoToEvent(c,d,true);if(a.context)d.context=a.context;gigya.events.global.dispatch(d);typeof b=="function"&&b(c)};gigya.socialize.getUserInfo(a)};gigya.socialize.getProviderShareCounts=function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services.socialize.plugins.shareCounts.min.js",
null,function(){gigya.services.socialize.plugins.shareCounts.getProviderShareCounts(a)},true)};gigya.socialize._injectFBC=function(){gigya.callsQueue.queueForExecution("API",function(){gigya.utils.functions.invokeOnPageLoad(gigya.external.facebook.load)})};var j={canSendRequest:function(){var a=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);return gigya.auth.loginToken.get(a.APIKey)||gigya.auth.oAuthToken.get(a)},showUI:function(a,b,c,d,e,f,g,i,h){j.prepareParameters(c);var m="socialize",
k=a;if(a.indexOf(".")!=-1){m=a.substr(0,a.indexOf("."));k=a.substr(a.indexOf(".")+1)}if(!i&&!gigya.socialize.pluginsCoreLoaded){gigya.callsQueue.hold("pluginsJS","UI");gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services.socialize.plugins.min.js",null,null,true);gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services."+m+".plugins."+k+".min.js"+(c.lang?"?lang="+c.lang:""),null,null,true)}if(gigya.callsQueue.isActive("UI"))gigya.callsQueue.waitFor("UI",j.showUI,arguments);else{e||
(e={});f||(f={});g||(g="");var n=g.split("|");if(c.containerID==null)if(d)c.containerID="";else{gigya.events.dispatchInvalidParamError(c,"containerID");return}var l=c.containerID;if(h)l=c.containerID="";var r=l==""||c.isPopup,p;for(p in e)c[p]==null&&(c[p]=r&&f[p]?f[p]:e[p]);if(r)for(p in f)c[p]||(c[p]=e[p]);var q=!gigya.utils.validation.isExplicitFalse(c.needsContainer);q&&!r&&gigya.utils.DOM.clearByID(l);for(l=0;l<n.length;l++){p=n[l];if(p!=""&&(c[p]==null||c[p]=="")){gigya.events.dispatchInvalidParamError(c,
p);return}}if(c.source)c.isPopup=false;else{c.source=b=="showSimpleShareUI"?"showShareUI":b;n={showReactionsBarUI:["barID"],showCommentsUI:["categoryID","streamID"],showFeedUI:["feedID"],showChatUI:["configID","streamID","chatID"]};if(!c.sourceData&&n[b]){for(var r={},t=false,l=0;l<n[b].length;l++){p=n[b][l];if(c[p]!=null){t=true;r[p]=c[p]}}if(t)c.sourceData=r}}if(!c.stacktrace)c.stacktrace=[];if(!c.lang)c.lang=gigya.thisScript.lang.langCode;c.stacktrace.push({source:b});c.lastSource=b;if(!i)return gigya.socialize._AddJSRequest("gigya.services."+
m+".plugins."+k,"gigya."+m+".plugins."+k+"."+b,q,c);gigya.utils.script.load(gigya.thisScript.base+"/js/gigya.services."+m+".plugins."+k+".min.js"+(c.lang?"?lang="+c.lang:""),null,function(){gigya[m].plugins[k][b](c,c,c)},true)}},getBookmarkSize:function(a){var b,c,a=a.toLowerCase();switch(a){case "facebook":b=640;c=370;break;case "twitter":b=880;c=585;break;case "messenger":b=710;c=905;break;case "linkedin":b=560;c=500;break;case "yahoobookmarks":b=840;c=975;break;case "digg":b=1010;c=1045;break;
case "delicious":b=890;c=905;break;case "googlebookmarks":b=710;c=905;break;case "mixi":b=640;c=470;break;case "googleplus":b=496;c=420}return{w:b,h:c}},getGigyaSettings:function(a){var b=gigya.utils.localStorage.getItem("gigyaSettings");try{b=gigya.utils.JSON.deserialize(b)}catch(c){b={}}b||(b={});return gigya.utils.JSON.serialize(b[a])},setGigyaSettings:function(a,b){var c=gigya.utils.localStorage.getItem("gigyaSettings");try{c=gigya.utils.JSON.deserialize(c)}catch(d){c={}}c||(c={});c[a]||(c[a]=
{});for(var e in b)c[a][e]=b[e];gigya.utils.localStorage.setItem("gigyaSettings",gigya.utils.JSON.serialize(c))},delGigyaSettings:function(a){if(a){var b=gigya.utils.localStorage.getItem("gigyaSettings");if(b){b=gigya.utils.JSON.deserialize(b);delete b[a];gigya.utils.localStorage.setItem("gigyaSettings",gigya.utils.JSON.serialize(b))}}else gigya.utils.localStorage.removeItem("gigyaSettings")},endPoint:function(a,b,c){if(gigya.callsQueue.isActive("API"))gigya.callsQueue.waitFor("API",j.endPoint,arguments);
else{if(gigya.thisScript.APIKey&&!b.APIKey)b.APIKey=gigya.thisScript.APIKey;var d=b.callback,e=b.context,f=b.authCodeOnly,g=a.replace(/\./g,"_").replace(/\//g,"")+"_"+(new Date).getTime();gigya.utils.xd.addMessageListener(g,{id:g,c:b,p:b,i:b,callback:d,context:e,operation:b._operation?b._operation:a,apiName:a},c);var i="socialize";if(a.indexOf(".")!=-1){d=a.indexOf(".");i=a.substr(0,d).replace("/","");a=a.substr(d+1)}var d=gigya.utils.stringUtils.format("https://{0}.{1}/{0}.{2}?",i,b.apiDomain,a),
e={},h=gigya.auth.loginToken.get(b.APIKey),m=gigya.auth.oAuthToken.get(b);if(a=="addConnection"){var k=b.connectWithoutLoginBehavior;k&&(k=k.toLowerCase());k=="loginexistinguser"&&(e.x_loginIfExists=true);if((h==""||h==null)&&(m==null||m=="")){d=gigya.utils.stringUtils.format("https://socialize.{0}/socialize.login?",b.apiDomain);b.userWasLoggedOut=true;if(k!="alwayslogin")e.x_temporary_account=true}}var n;b&&b.provider&&b[b.provider+"ExtraPermissions"]&&(n=b[b.provider+"ExtraPermissions"]);if(b&&
b.permissions&&!n){n=b.permissions;delete b.permissions}b.pendingRegistration?b.pending_registration=b.pendingRegistration:b.newUsersPendingRegistration&&(b.pending_registration=b.newUsersPendingRegistration);b.alwaysForceAuthentication==true&&(b.forceAuthentication=true);gigya.utils.object.extractProperties([b],e,j.APIParamSchema.common+"|"+j.APIParamSchema.login);for(var l in e)if(l.indexOf("x_")!=0){e["x_"+l]=b[l];delete e[l]}e.client_id=e.x_APIKey;delete e.x_APIKey;e.redirect_uri="/GS/AfterLogin.aspx";
e.response_type=f?"code":"server_token";e.format="jsonp";e.x_sdk=gigya.getVersion();if(i=="accounts"&&gigya.events.global._activeNamespaces.socialize)e.includeUserInfo=true;e.x_include=e.include?e.include+",":"profile,data";e.authMode="cookie";if(m){e.oauth_token=m;e.authMode="token"}n&&(e.x_extraPermissions=n);if(gigya.partnerSettings.gcid)e.gcid=gigya.partnerSettings.gcid;if(gigya.partnerSettings.ucid)e.ucid=gigya.partnerSettings.ucid;(f=gigya.utils.cookie.get("_gigRefUid_"+b.APIKey))&&(e.x_refUID=
f);n=gigya.utils.xd._flashListenerID;b.legacyCrossSiteMethod&&b.legacyCrossSiteMethod.toLowerCase()!="localstorage"&&(n=b.legacyCrossSiteMethod+":"+gigya.utils.xd._flashListenerID);f=b.authFlow?b.authFlow:"popup";n={domain:document.location.href.split("?")[0].split("#")[0],id:g,lid:n};l=b.redirectURL;if(!l)l=document.location.href;if(f=="redirect"||gigya.localInfo.isWindowsPhone){n.redirectURL=gigya.utils.URL.addParamsToURL(l,{gig_events:gigya.events.global.getEventsForOperation(a)});if(b.redirectURL!=
null){n.addUserInfo=true;n.redirectMethod=b.redirectMethod}}if(b.provider&&b.provider.toLowerCase()=="facebook")n.invite=b.invite;(l=gigya.external.backplane.getChannelId())&&(n.bp_channel_url=l);e.state=gigya.utils.keyValue.serialize(n);b.requestParams=e;n=gigya.utils.keyValue.serialize(e);var r;e&&e.x_provider&&(r=gigya.socialize._getProviderByName(e.x_provider.toLowerCase()));l=null;r!=null&&(l=(b.enablePopupLocation?"location=1,toolbar=1":"toolbar=0,")+"menubar=0,resizable=1,scrollbars=1,width="+
r.width+",height="+r.height);gigya.reports.report(a,b.APIKey,b.cid,e.source,e.sourceData,{sn:r?r.toString():null});gigya.log.logCall(a,b);f=="redirect"?document.location.href=d+n:gigya.utils.window.open(d+n,g,l)}},getCommonNonOverridableParams:function(a){if(!a)a=gigya.thisScript.APIKey;var b={},c=gigya.auth.loginToken.get(a);if(c!=null)b.login_token=c;if(a!=null){a=gigya.utils.cookie.get("gltexp_"+a);if(a!=null)b.loginTokenExp=a}if(gigya.partnerSettings.gcid)b.gcid=gigya.partnerSettings.gcid;if(gigya.partnerSettings.ucid)b.ucid=
gigya.partnerSettings.ucid;if(gigya.customDomain){var a=gigya.external.facebook.getParams(),d;for(d in a)b[d]=a[d]}return b},prepareParameters:function(a){for(var b in a)b.toLowerCase().indexOf("provider")!=-1&&typeof a[b]=="string"&&(a[b]=gigya.socialize.replaceProviderAliases(a[b]));if(!a.lang)a.lang=gigya.thisScript.lang.langCode},processMergedParams:function(a,b){if(b.hasOwnProperty("timestamp")){b.UIDTimestamp=b.timestamp;delete b.timestamp}if(b.hasOwnProperty("signature")&&a.indexOf("/")!=0){b.UIDSig=
b.signature;delete b.signature}if(b.hasOwnProperty("nonce")){b.UIDNonce=b.nonce;delete b.nonce}if(b.hasOwnProperty("format")&&!b.dataFormat){b.dataFormat=b.format;delete b.format}b.hasOwnProperty("recipients")&&(b.recipients=j.extractListOfGIGUIDs(b.recipients));if(b.hasOwnProperty("friends")){var c=j.extractListOfGIGUIDs(b.friends);b.UIDs.length>0&&(b.UIDs=b.UIDs+",");b.UIDs=b.UIDs+c}},getCommonOverridableParams:function(){var a={};a.APIKey=gigya.thisScript.APIKey;a.targetEnv="jssdk";var b=gigya.external.backplane.getChannelId();
b&&(a.bp_channel_url=b);return a},convertIdentitiesArrayToObject:function(a){if(a.identities==null)a.identities={};else if(a.identities.constructor==Array){var b=a.identities;a.identities={};for(var c=0;c<b.length;c++)a.identities[b[c].provider]=new gigya.socialize.Identity(b[c])}},saveTokenFromResult:function(a,b,c){if(a.sessionInfo)a=a.sessionInfo;a.hasOwnProperty("login_token")&&gigya.auth.loginToken.set(b,a.login_token,a.expires_in,c)},handleSpecialFields:function(a){var b=gigya.socialize.Collection,
c=function(a,b){for(var c=[],e=0,d=a[e];d;){c.push(new b(d));c[e].identities&&j.convertIdentitiesArrayToObject(c[e]);d=a[++e]}return c};if(a.photos)a.photos=new b(a.photos,"");if(a.albums)a.albums=new b(a.albums,"");if(a.contacts)a.contacts=new b(c(a.contacts,gigya.socialize.Contact),"email");if(a.friend)a.friend=new b(c(a.friend,gigya.socialize.Friend),"UID");if(a.user)a.user=new gigya.socialize.User(a.user);if(a.friends&&a.friends instanceof Array){for(var d=[],e=0;e<a.friends.length;e++)d.push(a.friends[e].UID);
a.UIDs=d.join(",");a.friends=new b(c(a.friends,gigya.socialize.Friend),"UID")}},extractListOfGIGUIDs:function(a){switch(typeof a){case "string":return a;case "object":if(typeof a.UID!="undefined")return a.UID;if(a instanceof gigya.socialize.Collection){var b=[];a.each(function(a){a=j.extractListOfGIGUIDs(a);a!=null&&a!=""&&b.push(a)});return b.join(",")}}},APIParamSchema:{common:"APIKey|cid|oauth_token|login_token|source|sourceData|usePost|refUID",login:"provider|redirect_uri|pending_registration|lang|extraPermissions|permissions|sessionExpiration|forceAuthentication|includeiRank|includeAllIdentities|extraFields|enabledProviders|disabledProviders|signIDs|openIDUsername|openIDURL|openIDProviderLogo|openIDProviderName|finalizeRegistration|include|actionAttributes|profileAttributes|googlePlayAppID|bp_channel_url",
postBookmark:"provider|URL|url|title|description|target|cid|APIKey|shortURLs|source|sourceData|providerKey|thumbnailURL|tags|userAction|[providerCapability=actions]UserAction|actionAttributes"},generateEventsFromResponse:function(a,b,c){var d=b.operation;if(b.p&&b.p.hasOwnProperty("getUserInfoFor")){b.operation=d=b.p.getUserInfoFor;delete b.p.getUserInfoFor}var e;if(a.errorCode==0)switch(d){case "unlinkAccounts":case "deleteAccount":e={eventName:"logout,accounts.logout"};break;case "linkAccounts":case "setUID":gigya.socialize._addUserInfoToEvent(a,
e,true);break;case "removeConnection":case "disconnect":e={eventName:"connectionRemoved,disconnect",provider:b.p.provider?b.p.provider:""};gigya.socialize._addUserInfoToEvent(a,e);break;case "addConnection":case "connect":if(b.i.userWasLoggedOut&&gigya.utils.validation.isExplicitTrue(a.user.isLoggedIn)){e={eventName:"login",provider:b.p.provider};gigya.socialize._addUserInfoToEvent(a,e,true)}else{e={eventName:"connectionAdded,connect",provider:b.p.provider};gigya.socialize._addUserInfoToEvent(a,e)}break;
case "/accounts.linkAccounts":case "/accounts.finalizeRegistration":case "/accounts.login":case "/accounts.register":case "/accounts.socialLogin":var f={eventName:"accounts.login",remember:gigya.utils.validation.isExplicitTrue(a.requestParams.remember),provider:b.p.provider?b.p.provider.toLowerCase():""};gigya.utils.object.extractProperties(c.profile?c:a,f,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data");gigya.events.global.dispatch(f,b.p);case "finalizeRegistration":case "register":case "login":if(!a.user&&
!a.authCode)break;e={eventName:"login"};e.provider=b.p.provider?b.p.provider:"site";if(a.authCode)e.authCode=a.authCode;gigya.socialize._addUserInfoToEvent(a,e,true);c=b.p.provider;if(a.user&&c){c=c.toLowerCase();gigya.utils.cookie.set("_gig_llp",c);gigya.utils.cookie.set("_gig_llu",a.user.firstName||"")}break;case "/accounts.logout":case "logout":e={eventName:"logout,accounts.logout"};break;case "notifyLogin":if(!b.c.authCode){e||(e={eventName:"login"});e.provider="site";gigya.socialize._addUserInfoToEvent(a,
e,true)}if(b.p.context&&b.p.context.eventOnSuccess){e=gigya.utils.object.clone(b.p.context.eventOnSuccess);gigya.socialize._addUserInfoToEvent(a,e,true)}break;case "/gm.notifyAction":gigya.events.global.dispatch({eventName:"actionNotified",isInternal:true})}(d=="login"||d=="addConnection"||d=="/accounts.socialLogin")&&(b.p.redirectURL!=null&&b.p.redirectURL!=""&&e&&e.user)&&gigya.utils.redirect(b.p.redirectURL,[e,e.user],b.p.redirectMethod);if(a.errorCode==0&&e&&e.eventName=="login"&&!a.profile&&
gigya.events.global._activeNamespaces.accounts&&d.indexOf("/accounts")==-1){d=gigya.utils.object.clone(b.p);delete d.callback;gigya.accounts.getAccountInfo(d,{include:"profile,data",includeUserInfo:false,_operation:"/accounts.socialLogin",originalResponse:a})}if(e!=null){e.context=b.context;gigya.events.global.dispatch(e,b.p)}},checkReturnFromRedirect:function(){var a=gigya.utils.URL.getParamsFromURL(document.location.href);a.gig_events&&(a.errorCode==0&&gigya.auth.loginToken.get()?gigya.utils.SSO.setGroupTokenFromResponse({errorCode:0,
login_token:gigya.auth.loginToken.get(),expires_in:a.expires_in},function(){var b=a.gig_events.split(",");gigya.utils.array.indexOf(b,"accounts.login")!=-1?gigya.accounts.getAccountInfo({include:"profile,data,userinfo",callback:function(a){var d={errorCode:0,eventName:"accounts.login"};gigya.utils.object.extractProperties(a,d,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data");gigya.events.global.dispatch(d);gigya.events.global.dispatchWhenHandlerAdded(d);if(gigya.utils.array.indexOf(b,
"socialize.login")!=-1){a=gigya.socialize._addUserInfoToEvent(a,{errorCode:0,eventName:"socialize.login"},true);gigya.events.global.dispatch(a);gigya.events.global.dispatchWhenHandlerAdded(a)}}}):gigya.socialize.getUserInfo({signIDs:true,callback:function(a){for(var d=0;d<b.length;d++){var e=gigya.socialize._addUserInfoToEvent(a,{errorCode:0,eventName:b[d]},true);gigya.events.global.dispatch(e);gigya.events.global.dispatchWhenHandlerAdded(e)}}})},gigya.thisScript.globalConf.legacyCrossSiteMethod):
a.errorCode&&a.regToken&&j.checkCompleteRegistration(a,gigya.thisScript.globalConf))},checkCompleteRegistration:function(a,b){if(!b.dontHandleScreenSet&&(a.errorCode==206001||a.errorCode==403043||a.errorCode==206002||a.errorCode==206003)){var c;if(b.defaultMobileRegScreenSet&&gigya.localInfo.isMobile)c=b.defaultMobileRegScreenSet;else if(b.defaultRegScreenSet)c=b.defaultRegScreenSet;c&&gigya.accounts.showScreenSet({initialResponse:a,screenSet:c})}}};gigya.global.JPRequests={};gigya.global.JPRequest=
function(a){this.rid=a;this.retryTimerID=null;this.cmds=[];this.retry=0;this.inProgress=false};gigya.global.JPRequest.prototype={loadedFormIFrame:function(a){if(a.didSubmitForm)this.getSavedFormResponse();else{window.setTimeout(function(){document.getElementById("coreDiv_Form_"+a.id).submit()},10);a.didSubmitForm=true}},getSavedFormResponse:function(){if(this.cmds&&this.cmds.length>0){var a={},b=this.cmds[0];gigya.utils.object.extractProperties(b.params,a,"APIKey|authMode|oauth_token|saveResponseID|login_token|methodURL|gcid|ucid");
gigya.socialize.sendRequest("getSavedResponse",a,b.context,j.handleRESTResponse,null,b.useHTTP)}}};gigya.global.JPCMD=function(a){this.url=a;this.params={};this.ifrName="gigyaPostIframe_"+(new Date).getTime();this.callback=this.context=null};gigya.global.JPCMD.prototype={addParam:function(a,b){this.params[a]=b;return this},createParamFormElements:function(){var a=[],b="";for(b in this.params){a=a.concat(['<textarea name="',b,'">']);typeof this.params[b]=="object"?a.push(gigya.utils.URL.URLEncode(gigya.utils.JSON.serialize(this.params[b]))):
a.push(this.params[b]);a.push("</textarea>")}return a.join("")},GetDataPendingTimeout:function(a){return a<=4?500:a<=8?1E3:a<=21?2E3:a<=39?5E3:-1},handleResponse:function(a,b){if(!b){b=a.context?a.context:a.state;if(!b)return}var c=gigya.global.JPRequests[b];if(c){c.retryTimerID!=null&&window.clearTimeout(c.retryTimerID);c.loaded=true;c.inProgress=false;var d=c.cmds.slice(0);c.cmds=[];if(a.errorCode==100001){c=this.GetDataPendingTimeout(c.retry++);if(c>0){window.setTimeout(function(){for(var a=0;a<
d.length;a++)d[a].run(b)},c);return}}delete gigya.global.JPRequests[b];for(c=0;c<d.length;c++)this.handleCmdResponse(d[c],a)}},handleCmdResponse:function(a,b){var b=gigya.utils.object.clone(b),c=a.formDiv;c&&c.parentNode&&c.parentNode.removeChild(c);b.dontTryAgain&&delete b.dontTryAgain;if(!(b.errorCode==403030&&a.onSessionExpired(b))){var d=function(){typeof a.callback=="function"&&a.callback(a.context,b,a.params.login_token)},c=a.context.operation;if(b.errorCode==403005&&a.params.login_token){var e=
function(b){b?a.params.login_token=b:delete a.params.login_token;delete a.presetResponse;a.run()},f=function(){gigya.auth.loginToken.remove(a.params.APIKey);a.context.oApi.needsAuth?d():e()};gigya.partnerSettings.ssoKey?gigya.utils.SSO.getGroupToken({callback:function(b){if(b.login_token&&b.login_token.split("|")[0]!=a.params.login_token){gigya.auth.loginToken.setFromSSOResponse(b,a.params.APIKey);e(gigya.auth.loginToken.get(a.params.APIKey))}else f()}}):f()}else if(gigya.partnerSettings.ssoKey&&
(c=="logout"||c=="/accounts.logout"||c=="deleteAccount")&&b.errorCode==0){gigya.external.backplane.resetChannel();document.location.href!=gigya.partnerSettings.ssoLogoutUrl&&gigya.utils.SSO.logout({callback:function(a){j.logoutFromProviders(a.logoutURLs,d,{UID:b.UID,UIDSignature:b.UIDSignature,signatureTimestamp:b.signatureTimestamp})}})}else d()}},onSessionExpired:function(a){if(this.params.retryPossible==true){this.params.retryPossible=false;gigya.external.facebook.addPending(this,a);return true}return false},
getFormElement:function(a){var b=document.createElement("span");b.innerHTML=['<form accept-charset="UTF-8" id="coreDiv_Form_',this.ifrName,'" method="post" action="',this.params.methodURL?this.params.methodURL:this.url,"?context="+this.params.context+'" target="',this.ifrName,'">',this.createParamFormElements(),'<input name="utf8" type="hidden" value="&#x2713;" /><input type="submit" value="" /></form>'].join("");var c=gigya.utils.DOM.createElement("iframe",this.ifrName);c.setAttribute("id",this.ifrName);
gigya.localInfo.isIE6&&c.setAttribute("src",gigya.thisScript.base+"/wildfire/DO_NOT_DELETE.htm");gigya.utils.DOM.addEventListener(c,"load",function(){gigya.global.JPRequests[a]&&gigya.global.JPRequests[a].loadedFormIFrame(c)});b.appendChild(c);return b},run:function(a){if(a==null&&this.req)a=this.req.rid;var b=false;if(this.params.rid){a=this.params.rid;delete this.params.rid;b=true}var c=this.params.methodURL?this.params.methodURL:this.url;if(a==null)if(this.params.noCache)a="R"+(new Date).getTime()+
"_"+Math.random();else{var d=gigya.utils.object.clone(this.params),e;for(e in d)(e.indexOf("fb_")==0||e=="source"||e=="sourceData")&&delete d[e];a=gigya.utils.object.getMurmurHash(c+gigya.utils.object.getHash(d))}this.lastSentRequestID=a;if(this.url.indexOf("socialize.getSavedResponse")==-1){gigya.global.JPRequests[a]||(gigya.global.JPRequests[a]=new gigya.global.JPRequest(a));d=gigya.global.JPRequests[a];d.cmds.push(this);if(d.inProgress)return;d.inProgress=true}if(this.presetResponse!=null)this.handleResponse(this.presetResponse,
a);else{this.addParam("callback","gigya.global.JPCMD.prototype.handleResponse");this.addParam("context",a);this.params.oauth_token?this.addParam("authMode","token"):this.params.login_token&&this.addParam("authMode","cookie");d=gigya.utils.keyValue.serialize(this.params);e=0;var f=4096;gigya.localInfo.isIE&&(e=2048);if(this.params.maxLength){e=0;f=this.params.maxLength}if(c.length+1+d.length+e<=f&&!this.params.usePost){var g=this.params.callback,i=a;if(this.params.saveResponseID)i=this.params.saveResponseID;
gigya.utils.script.load(c+"?"+d+(b?"#"+(new Date).getTime():""),function(){gigya.utils.functions.callFunction(g,[{context:i,errorCode:500026,errorMessage:"Network_error"}])})}else{this.params.usePost&&delete this.params.usePost;var h=this;gigya.utils.functions.invokeOnPageLoad(function(){var b=document.getElementById("coreDiv_Forms");if(b==null){b=document.createElement("span");b.id="coreDiv_Forms";b.style.display="none";gigya.utils.DOM.appendToBody(b)}h.addParam("saveResponseID",a);var c=h.getFormElement(a);
b.appendChild(c);this.formDiv=c})}}}};gigya.socialize._addUserInfoToEvent=function(a,b,c){var d=a.user||a.userInfo;b==null&&(b={});if(d!=null){b.user=gigya.utils.object.clone(d);a.isLoggedIn!=null&&(b.user.isLoggedIn=a.isLoggedIn);a.isSiteUID!=null&&(b.user.isSiteUID=a.isSiteUID);a.iRank!=null&&(b.user.iRank=a.iRank)}if(c){gigya.utils.object.extractProperties(a,b,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID");if(b.user!=null){b.UID=d.UID;b.isSiteUID=d.isSiteUID}}return b};j.handleRESTResponse=
function(a,b,c){a.cacheKey&&(b.errorCode==0?gigya.utils.sessionCache.set(a.cacheKey,b):gigya.utils.sessionCache.set(a.cacheKey,null));var d=a.p.originalResponse?a.p.originalResponse:b;if(b.userInfo&&a.apiName.indexOf("/accounts")!=0){if(typeof b.userInfo=="string")b.userInfo=gigya.utils.JSON.deserialize(b.userInfo);if(b.userInfo)b=b.userInfo}if(b.accountInfo&&typeof b.accountInfo=="string"){b.accountInfo=gigya.utils.JSON.deserialize(b.accountInfo);if(b.accountInfo){b=gigya.utils.object.merge([b.accountInfo,
b]);delete b.accountInfo}}j.checkCompleteRegistration(b,a.c);delete b.statusCode;delete b.statusReason;if(!b.hasOwnProperty("errorCode"))b.errorCode=0;if(!b.hasOwnProperty("status"))b.status=b.errorCode==0?"OK":"FAIL";if(!b.hasOwnProperty("errorMessage"))b.errorMessage="";if(!b.hasOwnProperty("statusMessage"))b.statusMessage=b.errorMessage;var e={status:"OK",statusMessage:"",errorCode:0,statusCode:0,errorMessage:"",errorDetails:"",statusReason:""};if(b.errorCode==403005&&c)switch(a.apiName){case "setUserSettings":j.setGigyaSettings(a.p.group,
a.p.settings);b=e;break;case "delUserSettings":j.delGigyaSettings(a.p.group);b=e;break;case "getUserSettings":var f=j.getGigyaSettings(a.p.group),b=e;b.settings=f;break;case "/accounts.logout":case "logout":b=e}if(b.errorCode==0){switch(a.apiName){case "postComment":if(b.comment)try{b.comment=gigya.utils.JSON.deserialize(b.comment)}catch(g){}break;case "/gm.getTopUsers":if(gigya.localInfo.isIE)for(e=0;e<b.users.length;e++){f=b.users[e];if(f.photoURL&&f.photoURL.indexOf("apis.live.net")!=-1)f.photoURL=
f.photoURL.replace("https://apis.live.net",document.location.protocol+"//msnproxy.gigya.com")}break;case "notifyLogin":case "addConnection":case "/accounts.linkAccounts":case "/accounts.finalizeRegistration":case "/accounts.login":case "/accounts.register":case "/accounts.socialLogin":case "login":case "getUserInfo":if(a.operation=="isLoggedIn"){f=b;b={loggedIn:gigya.utils.validation.isExplicitTrue(f.isLoggedIn)};gigya.utils.object.extractProperties(f,b,"status|statusMessage|callId|errorCode|errorMessage|errorDetails|context")}else if(!b.authCode&&
!(a.apiName=="notifyLogin"&&a.c.authCode)){f=b;if(b.userInfo){f=b.userInfo;delete b.userInfo}if(a.apiName.indexOf("/accounts")==-1){b={user:f};gigya.utils.object.extractProperties(f,b,"status|statusMessage|callId|errorCode|errorMessage|errorDetails|settings|context|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data");if(b.user.hasOwnProperty("UIDSig"))b.signature=b.user.UIDSig;f.profile&&delete f.profile;f.data&&delete f.data;delete f.status;delete f.statusMessage;delete f.callId;delete f.errorCode;
delete f.errorMessage;delete f.errorDetails;delete f.settings;delete f.context}else if(b!=f)b.user=f;if(f.age!=""&&!isNaN(parseInt(f.age)))f.age=parseInt(f.age);(e=f.capabilities)||(e="");if(typeof f.capabilities!="object")f.capabilities={};e=e.toLowerCase();f.capabilities={actions:e.indexOf("actions")>-1,friends:e.indexOf("friends")>-1,login:e.indexOf("login")>-1,status:e.indexOf("status")>-1,notifications:e.indexOf("notifications")>-1,contacts:e.indexOf("contacts")>-1,photos:e.indexOf("photos")>
-1};j.convertIdentitiesArrayToObject(f);if(typeof f.providers=="string")f.providers=f.providers.split(",");if(a.p.group&&!b.settings){f=j.getGigyaSettings(a.p.group);b.settings=f}}break;case "getAvailableProviders":f={};for(e=0;e<b.availableProviders.length;e++)f[b.availableProviders[e].name]=b.availableProviders[e];b.availableProviders=f;break;case "unlinkAccounts":case "deleteAccount":case "/accounts.logout":case "logout":gigya.auth.loginToken.remove(a.c.APIKey)}j.handleSpecialFields(b)}j.saveTokenFromResult(d,
a.c.APIKey,a.c.legacyCrossSiteMethod);j.saveTokenFromResult(b,a.c.APIKey,a.c.legacyCrossSiteMethod);if(b.errorCode==0&&(c||a.operation=="/accounts.login"||a.operation=="notifyLogin"||a.operation=="/accounts.finalizeRegistration"||a.operation=="/accounts.register"))gigya.utils.cookie.remove("_gigRefUid_"+(a.c.APIKey||gigya.thisScript.APIKey));switch(a.apiName){case "removeConnection":case "disconnect":if(b.errorCode==0){gigya.socialize.getUserInfo(a.p,{getUserInfoFor:a.operation,_operation:a.operation,
originalResponse:d});return}}if(b.errorCode==403005&&a.apiName=="getUserInfo"){b.status="OK";b.statusMessage="";b.errorCode=0;b.statusCode=0;b.errorMessage="";b.errorDetails="";b.statusReason="";b.user={UID:"",nickname:"",photoURL:"",thumbnailURL:"",isSiteUID:false,birthDay:0,birthMonth:0,birthYear:0,gender:"",email:"",proxiedEmail:"",country:"",state:"",city:"",zip:"",firstName:"",lastName:"",profileURL:"",age:"",isLoggedIn:false,isConnected:false,isSiteUser:false,providers:[],identities:{},timestamp:"",
UIDSig:"",UIDSignature:"",signatureTimestamp:"",loginProvider:"",loginProviderUID:"",capabilities:{actions:false,friends:false,login:false,status:false,notifications:false,contacts:false,photos:false}};a.p.group&&j.getGigyaSettings(a.p.group)}try{if(b.settings&&typeof b.settings=="string")b.settings=gigya.utils.JSON.deserialize(b.settings)}catch(i){}a.context!=null?b.context=a.context:delete b.context;delete a.p._operation;delete a.p.originalResponse;b.requestParams=a.p;b.requestParams&&b.requestParams.password&&
delete b.requestParams.password;b.operation=a.operation;var h=function(){a.cbCalled=true;j.generateEventsFromResponse(b,a,d);if(typeof a.callback=="function"){gigya.log.log("Calling callback for "+a.operation+" with this response object",b);a.callback(b)}},c=a.p.forceProvidersLogout,m;b.connectedProviders?m=b.connectedProviders.toLowerCase():a.p.provider&&(m=a.p.provider.toLowerCase());if((a.operation=="logout"||a.operation=="/accounts.logout"||a.operation=="removeConnection"||a.operation=="deleteAccount")&&
m&&!gigya.utils.validation.isExplicitFalse(c)){c=function(){a.cbCalled||h()};window.setTimeout(c,5E3);j.logoutFromProviders(m,c)}else b.login_token||b.sessionInfo?gigya.utils.SSO.setGroupTokenFromResponse(b,h,a.c.legacyCrossSiteMethod):d.login_token||d.sessionInfo?gigya.utils.SSO.setGroupTokenFromResponse(d,h,a.c.legacyCrossSiteMethod):h()};j.logoutFromProviders=function(a,b,c){for(var d=a.split(","),e=0,a=0;a<d.length;a++){var f=d[a],g,i=false,h=false,j=true,k=function(){e++;if(e==d.length){f=="facebook"&&
gigya.external.facebook.refreshSession();b()}};switch(f){case "facebook":if(gigya.fbAppID){gigya.socialize.waitForService({service:"facebook",callback:function(){gigya.external.facebook.isLoggedIn&&FB.logout?FB.logout(k):k()}});h=true}break;case "yahoo":g="https://login.yahoo.com/config/login?.src=fpctx&amp;logout=1&r=";break;case "google":g=gigya.thisScript.protocol=="https"?"https://google.com/accounts/Logout?r=1":"https://www.google.com/accounts/Logout?r=";i=true;break;case "linkedin":g="https://www.linkedin.com/secure/login?session_full_logout=&trk=hb_signout&r=";
break;default:if(f.indexOf("http")==0&&(f.indexOf("https://")==0&&document.location.protocol=="https:"||document.location.protocol=="http:")){g=f;i=true;j=false}else g=""}if(g&&g!=""){j&&(g=g+(new Date).getTime());c&&(g=g+((g.indexOf("?")!=-1?"&":"?")+gigya.utils.keyValue.serialize(c,"&")));var n;if(i){var l=document.createElement("iframe");l.style.width="30px";l.style.height="10px";l.style.position="absolute";l.style.top="-1000px";l.style.left="-1000px";n=function(a){var b;b=a&&a.srcElement?a.srcElement:
a&&a.target?a.target:this;if(!b.loaded&&b.parentNode){b.loaded=true;k();window.setTimeout(function(){try{document.body.removeChild(b)}catch(a){}},5E3)}};if(l.addEventListener){l.addEventListener("load",n,false);l.addEventListener("error",n,false)}else if(l.attachEvent){l.attachEvent("onload",n);l.attachEvent("onerror",n);l.onerror=l.onload=l.onreadystatechange=function(a){(!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&n(a)};l.onerror=n}l.src=g;gigya.utils.DOM.appendToBody(l)}else{i=
new Image;n=function(){if(!this.loaded){this.loaded=true;k()}};i.onload=n;i.onerror=n;i.src=g}}else h||k()}};gigya.socialize.sendRequest=function(a,b,c,d,e,f){var g;if(a.indexOf(".")==-1){g=gigya.utils.stringUtils.format("socialize.{0}",c.p.apiDomain);a=gigya.utils.stringUtils.format("/socialize.{0}",a)}else{a.substr(0,1)=="/"&&(a=a.substr(1));var i=a.split(".");g=gigya.utils.stringUtils.format("{0}.{1}",i[0],c.p.apiDomain);if(i[0]=="chat"&&gigya.gaeDomain)g=gigya.gaeDomain;a="/"+a}g=new gigya.global.JPCMD((f?
"http://":"https://")+g+a);g.addParam("format","jsonp");g.addParam("sdk",gigya.getVersion());g.useHTTP=f;b=typeof b=="object"&&b.constructor==Array?b:[b];if(e!=null&&e.presetResponse!=null)g.presetResponse=e.presetResponse;for(e=0;e<b.length;e++){var f=b[e],h;for(h in f)if(h!=null&&f.hasOwnProperty(h))h=="context"?g.context=f[h]:h=="presetResponse"?g.presetResponse=f[h]:h=="callback"?g.callback=f[h]:typeof f[h]!="function"&&(typeof f[h]!="undefined"&&f[h]!=null)&&g.addParam(h,f[h])}if(typeof d=="function")g.callback=
d;if(c!=null)g.context=c;g.run()};(function(){var a=function(a,c,d,e,f,g,i){this.ID=a;this.arDefaultCapabilities=f.split(",");this.displayName=c;this.width=d;this.height=e;this.windowOptions="menubar=0,toolbar=0,resizable=1,scrollbars=1,width="+d+",height="+e;this.explicitOnly=g;this.name=c.toLowerCase().split(" ").join("").split("!").join("").split("+").join("plus");this.toString=function(){return this.name};if(i){if(!j._providerAliases)j._providerAliases={};arAliases=i.split("|");for(a=0;a<arAliases.length;a++)j._providerAliases[arAliases[a]]=
this.name}if(this.name=="messenger")this.displayName="Microsoft";if(this.name=="customopenid")this.displayName="OpenID"};j._arProviders=[new a(64,"Facebook",650,400,"login,friends,actions,status,photos,places,checkins"),new a(9012,"Twitter",800,440,"login,friends,notifications,actions,status,places,checkins"),new a(9811,"Google",410,450,"login,contacts"),new a(72,"Google+",560,600,"login",true),new a(9042,"LinkedIn",865,450,"login,friends,status,actions,notifications"),new a(9803,"Yahoo",500,567,
"login,friends,contacts,notifications"),new a(1047,"Messenger",380,540,"login,friends,status,notifications",false,"messenger|microsoft"),new a(9832,"Instagram",440,420,"login,photos"),new a(9222,"Odnoklassniki",888,425,"login"),new a(9003,"Digg",730,590,"login",true),new a(9007,"FourSquare",1E3,650,"login,friends,places,checkins"),new a(9809,"Orkut",610,510,"login,friends,status,actions,photos"),new a(8191,"Renren",450,350,"login,friends,status,actions"),new a(8203,"QQ",570,460,"login,actions"),new a(9821,
"Sina",640,380,"login,status,actions"),new a(4228,"Mixi",1E3,720,"login,friends,actions,photos",true),new a(9830,"Yahoo! JAPAN",980,700,"login,friends,actions",true),new a(8205,"Spiceworks",640,380,"login",true),new a(8190,"Kaixin",610,510,"login,friends"),new a(9041,"VKontakte",610,510,"login,friends,photos,status,actions"),new a(9800,"AOL",530,720,"login"),new a(4096,"WordPress",700,540,"login"),new a(256,"Blogger",760,400,"login"),new a(1041,"Hyves",700,540,"login"),new a(16,"LiveJournal",670,
360,"login"),new a(1043,"VeriSign",940,500,"login"),new a(1024,"Typepad",730,590,"login"),new a(4120,"OpenID",730,590,"login"),new a(4218,"Netlog",730,590,"login",true),new a(4222,"SignOn",870,900,"login",true),new a(4224,"Orange France",730,590,"login",true),new a(5002,"Livedoor",970,700,"login",true),new a(8202,"VZnet",610,510,"login"),new a(9216,"Skyrock",610,510,"login,friends,status",true),new a(5004,"Fox News",730,590,"login",true),new a(1051,"PayPal",400,550,"login",true),new a(9058,"Amazon",
785,510,"login",true),new a(9219,"Xing",785,510,"login,friends",true),new a(4121,"Custom OpenID",730,590,"login",true),new a(6002,"Site",730,590,"",true)]})();gigya.socialize.replaceProviderAliases=function(a){for(var a=a.split(","),b=0;b<a.length;b++){var c=a[b];j._providerAliases[c]&&(a[b]=j._providerAliases[c])}return a.join(",")};gigya.socialize._getProviderByName=function(a,b){if(null==b)b=j._arProviders;for(var c=0;c<b.length;c++)if(b[c].name.toLowerCase()==a.toLowerCase())return b[c]};gigya.socialize._getProviderByID=
function(a,b){if(null==b)b=j._arProviders;for(var c=0;c<b.length;c++)if(b[c].ID==a)return b[c]};gigya.socialize.hideProvidersByName=function(a,b,c){b=b.toLowerCase();b=b.split(" ").join("").toLowerCase().split(",");b=this.replaceWildcard(b,c);for(c=0;c<b.length;c++)for(var d=0;d<a.length;d++){var e=a[d];(e=e.name||e.toString())&&(e=e.toLowerCase());e==b[c]&&a.splice(d,1)}return a};gigya.socialize.getProvidersForRequiredCapabilities=function(a,b){b==null&&(b=[]);for(var c=[],d=0;d<a.length;d++){for(var e=
a[d],f=true,g=0;g<b.length;g++){for(var i=false,h=0;h<e.arDefaultCapabilities.length;h++)if(e.arDefaultCapabilities[h].toLowerCase()==b[g].toLowerCase()){i=true;break}if(!i){f=false;break}}f&&c.push(e)}return c};gigya.socialize.getAllProviders=function(){return j._arProviders.concat()};gigya.socialize.getProvidersByName=function(a,b){for(var a=(""+a).split(" ").join("").toLowerCase(),c=(""+a).split(","),c=this.replaceWildcard(c,b),d=[],e=0;e<c.length;e++){var f=gigya.socialize._getProviderByName(c[e],
b);f!=null&&d.push(f)}return d};gigya.socialize.replaceWildcard=function(a,b){if(!b)b=j._arProviders;for(var c=[],d=0;d<a.length;d++)if(a[d]=="*")for(var e=0;e<b.length;e++){for(var f=false,g=0;g<a.length;g++)a[g].toLowerCase()==b[e].name.toLowerCase()&&(f=true);!f&&!b[e].explicitOnly&&c.push(b[e].name)}else c.push(a[d]);return c};(function(){for(var a=function(a,b,c,e,d,k,n){this.name=a;this.type=b;this.needsAuth=gigya.utils.validation.isExplicitTrue(c);this.replacedBy=d;this.namespace="socialize";
this.secureOnly=n;this.fnPreprocessor=k;if(a.indexOf(".")!=-1){this.namespace=a.substr(0,a.indexOf("."));this.name=a.substr(a.indexOf(".")+1)}if(a=j.APIParamSchema.common+"|"+e){a=a.split("|");for(b=0;b<a.length;b++){c=a[b];if(c.toLowerCase().indexOf("[providercapability=")!=-1){e=c.toLowerCase().split("=")[1].split("]")[0];c=c.split("]")[1];e=gigya.socialize.getProvidersForRequiredCapabilities(gigya.socialize.getProvidersByName("*"),[e]);d=[];for(k=0;k<e.length;k++)d.push(e[k].name+c);a[b]=d.join("|")}}a=
a.join("|")}else a=void 0;this.schema=a;if(!gigya._methods)gigya._methods={};gigya._methods[this.namespace]||(gigya._methods[this.namespace]={});gigya._methods[this.namespace][this.name]=this},b=function(a,b,c,e,d,j,n,l,r){this.type=3;this.name=a;this.pluginName=b;this.allowPopup=c;this.defaultParams=e;this.defaultPopupParams=d;this.requiredParams=n;this.dontLoadPluginsCore=l;this.ignoreContainerID=r;this.namespace="socialize";if(a.indexOf(".")!=-1){this.namespace=a.substr(0,a.indexOf("."));this.name=
a.substr(a.indexOf(".")+1)}this.fnValidation=j},c=function(a){var b=a.name;a.namespace!="socialize"&&(b="/"+a.namespace+"."+a.name);if(a.type==0)return function(){var c={},e=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.prepareParameters(e);e.neverTryGAC||gigya.auth.loginToken.setFromGAC();if(gigya.callsQueue.isActive("API"))gigya.callsQueue.waitFor("API",gigya[a.namespace?a.namespace:"socialize"][a.name],arguments);else if(gigya.external.backplane.isLoaded()&&!gigya.external.backplane._ready&&
(a.name=="login"||a.name=="notifyLogin"||a.name=="linkAccounts"||a.name=="register"||a.name=="finalizeRegistration")){var d=this,k=arguments;gigya.external.backplane.executeOnInit(function(){gigya[a.namespace?a.namespace:"socialize"][a.name].apply(d,k)})}else if(gigya.callsQueue.isActive("backplane")&&(a.name=="login"||a.name=="login"||a.name=="login"||a.name=="login"))gigya.callsQueue.waitFor("backplane",gigya[a.namespace?a.namespace:"socialize"][a.name],arguments);else{var n={context:e.context,
callback:e.callback,p:e,c:e,i:e,apiName:b,oApi:a};a.name=="logout"&&(gigya.partnerSettings.ssoLogoutUrl&&document.location.href==gigya.partnerSettings.ssoLogoutUrl)&&(c={_operation:e._operation,presetResponse:{context:n,status:"OK",statusMessage:"",errorCode:0,errorMessage:"",dontTryAgain:true}});a.needsAuth==1&&(!j.canSendRequest(e)&&!(a.namespace=="accounts"&&e.regToken))&&(c=a.name=="logout"?{_operation:e._operation,presetResponse:{context:n,status:"OK",statusMessage:"",errorCode:0,errorMessage:"",
dontTryAgain:true}}:{_operation:e._operation,presetResponse:{context:n,status:"FAIL",statusMessage:"Unauthorized user",errorCode:403005,errorMessage:"Unauthorized user",dontTryAgain:true}});(a.name=="login"||a.name=="notifyLogin"||a.name=="initRegistration")&&gigya.auth.loginToken.remove(e.APIKey);var l=j.getCommonOverridableParams(),r=j.getCommonNonOverridableParams(e.APIKey),p=gigya.utils.object.merge([gigya.thisScript.globalConf,l,e,c]);j.processMergedParams(b,p);l=a.namespace=="socialize"?a.name:
"/"+a.namespace+"."+a.name;if(p._operation)l=p._operation;n.operation=l;if(a.namespace=="accounts"&&gigya.events.global._activeNamespaces.socialize&&p.includeUserInfo==null)p.includeUserInfo=true;a.name=="getSchema"&&(p.includeDynamicSchema="clientOnly");p.include=p.include?p.include+",":"profile,data";a.schema&&!c.presetResponse&&(p=gigya.utils.object.extractProperties(p,{},a.schema));p=gigya.utils.object.merge([p,r]);if(p.login_token||a.name=="login"||a.name=="register"||a.name=="notifyLogin"||
a.name=="initRegistration")if(c=gigya.utils.cookie.get("_gigRefUid_"+(e.APIKey||gigya.thisScript.APIKey)))p.refUID=c;a.fnPreprocessor&&a.fnPreprocessor(p);gigya.log.logCall(a.name,p,e.lastSource);var q=gigya.thisScript.protocol=="http"&&!gigya.auth.oAuthToken.get(e)&&a.needsAuth==0&&!p.regToken&&!gigya.auth.loginToken.get(e.APIKey)&&!a.secureOnly;if(p.password||p.oldPassword||p.newPassword)p.usePost=true;if(e.cacheTimeout&&!p.presetResponse){c=l+"_"+gigya.utils.object.getHash(p);n.cacheKey=c;gigya.utils.sessionCache.get(c,
e.cacheTimeout,function(a){if(a){p.presetResponse=a;delete n.cacheKey}gigya.socialize.sendRequest(b,p,n,j.handleRESTResponse,null,q)})}else gigya.socialize.sendRequest(b,p,n,j.handleRESTResponse,null,q)}};if(a.type==3)return function(){var b=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.prepareParameters(b);(!a.fnValidation||a.fnValidation(b))&&j.showUI(a.pluginName,a.name,b,a.allowPopup,a.defaultParams,a.defaultPopupParams,a.requiredParams,a.dontLoadPluginsCore,a.ignoreContainerID)};
if(a.type==4)return function(){var c=gigya.utils.object.merge([gigya.thisScript.globalConf,arguments]);j.prepareParameters(c);c._operation=b;this[a.replacedBy](c)}},d=function(a){gigya.auth.loginToken.remove(a.APIKey)},a=[new a("getAvailableProviders",0,0,"enabledProviders|disabledProviders|requiredCapabilities"),new a("notifyLogin",0,0,"siteUID|UIDTimestamp|UIDSig|UIDNonce|provider|authToken|tokenSecret|tokenExpiration|sessionHandle|sessionHandleExpiration|userInfo|providerSessions|sessionExpiration|authCode|includeAllIdentitiesincludeiRank|group|settings|extraFields|signIDs|newUser|actionAttributes|profileAttributes|bp_channel_url",
null,d,true),new a("shortenURL",0,0,"URL"),new a("convertAction",0,0,"userAction|[providerCapability=actions]UserAction|provider"),new a("getReactionsCount",0,0,"barID|buttonIDs|reportLoad"),new a("incrementReactionsCount",0,0,"barID|buttonID|count|actionAttributes|profileAttributes"),new a("deleteAccount",0,1,[]),new a("delUserSettings",0,1,"group|settings"),new a("getAlbums",0,1,"type|enabledProviders|disabledProviders"),new a("getContacts",0,1,"enabledProviders|disabledProviders"),new a("getFriendsInfo",
0,1,"enabledProviders|disabledProviders|detailLevel|UIDs|siteUsersOnly|requiredCapabilities|signIDs"),new a("getPhotos",0,1,"enabledProviders|disabledProviders|albumIDs|tags"),new a("getRawData",0,1,"provider|UID|fields|dataFormat"),new a("getSessionInfo",0,1,"provider|paddingMode|encrypt|signIDs|encryptAll"),new a("getUserInfo",0,1,"enabledProviders|disabledProviders|signIDs|includeiRank|includeAllIdentities|extraFields|group|settings|includeOpenidUID"),new a("getUserSettings",0,1,"group|settings"),
new a("getPlaces",0,1,"enabledProviders|disabledProviders|latitude|longitude|query|radius|unifyResults"),new a("checkin",0,1,"enabledProviders|disabledProviders|placeID|comment|latitude|longitude|actionAttributes|profileAttributes"),new a("logout",0,1,"signIDs",null,function(a){if(gigya.partnerSettings.ssoKey)a.signIDs=true}),new a("notifyRegistration",0,1,"siteUID|UIDTimestamp|UIDSig"),new a("publishUserAction",0,1,"userAction|[providerCapability=actions]UserAction|enabledProviders|disabledProviders|target|shortURLs|scope|privacy|feedID|userLocation|tags|actionAttributes|profileAttributes"),
new a("removeConnection",0,1,"provider"),new a("sendNotification",0,1,"recipients|body|subject|shortURLs|actionAttributes|profileAttributes"),new a("setStatus",0,1,"shortURLs|status|[providerCapability=status]Status|enabledProviders|disabledProviders|userLocation|actionAttributes|profileAttributes"),new a("setUID",0,1,"siteUID|UIDTimestamp|UIDSig"),new a("setUserSettings",0,1,"group|settings"),new a("unlinkAccounts",0,1,[]),new a("getFeed",0,0,"feedID|startTS|endTS|groups|limit|includeUID"),new a("sendEmail",
0,0,"dontSendEmail|companyName|lang|emails|emailSubject|emailBody|linkBack|senderEmail|senderName|userMsg|shortURLs|userAction|[providerCapability=actions]UserAction|actionAttributes|profileAttributes|captchaTicket",null,null,true),new a("facebookGraphOperation",0,0,"graphPath|graphParams|authRequired|method|authType"),new a("getTopShares",0,0,"age|tag|limit"),new a("notifySSOLogin",0,0,"bp_channel_url"),new b("showLoginUI","login",true,{width:120,height:110},{width:280,height:220}),new b("showAddConnectionsUI",
"login",true,{width:110,height:65},{width:250,height:200}),new b("showFriendSelectorUI","friendSelector",true,{width:400,height:360}),new b("showFeedUI","newsfeed",false,{width:304,height:265}),new b("chat.showChatUI","chat.chat",false,{width:300,height:450},null,function(a){if(a.site)a.categoryID=a.site;if(a.stream)a.streamID=a.stream;if(a.skin)a.skinID=a.skin;a.streamID=a.streamID||0;return true}),new b("showEditConnectionsUI","edit",true,{width:310,height:250},{width:310,height:310}),new b("showShareBarUI",
"reactions",false,{shareCountCacheTimeout:3E5},null,null,"userAction|shareButtons"),new b("showReactionsBarUI","reactions",false,null,null,function(a){if(!a.barID)a.barID=a.itemID;return true},"userAction|barID|reactions"),new b("showMiniShareUI","minishare",true,{width:320,height:153}),new b("showFollowBarUI","followbar",false,null,null,null,"buttons"),new b("showBookmarkUI","bookmark",true,{width:310,height:250},{width:310,height:310}),new b("showSimpleShareUI","simpleShare",true,{width:280,height:175},
null,null,"userAction",true,true),new b("showShareMobileUI","shareMobile",true,{},{},null,"userAction"),new b("gm.showUserStatusUI","gm.userStatus",false,{width:300},null,function(a){return j.canSendRequest(a)}),new b("gm.showAchievementsUI","gm.achievements",false,{width:300,height:100,excludeChallenges:"_default"}),new b("gm.showChallengeStatusUI","gm.achievements",false,{width:300,height:100,challenge:"_default"}),new b("gm.showLeaderboardUI","gm.leaderboard",false,{width:300},null,function(a){if(a&&
a.height)a.height=null;return true}),new b("accounts.showScreenSet","accounts.screenSet",true,{},{}),new b("accounts.hideScreenSet","accounts.screenSet",true,{},{}),new b("accounts.switchScreen","accounts.screenSet",true,{needsContainer:false},{needsContainer:false}),new a("connect",4,null,null,"addConnection"),new a("disconnect",4,null,null,"removeConnection"),new a("linkAccounts",4,null,null,"setUID"),new a("showConnectUI",4,null,null,"showAddConnectionsUI"),new a("showNewsfeedUI",4,null,null,"showFeedUI"),
new a("isLoggedIn",4,null,null,"getUserInfo"),new a("gm.getChallengeStatus",0,0,"UID|includeChallenges|excludeChallenges|details|lang|actionAttributes|profileAttributes"),new a("gm.resetLevelStatus",0,1,"challenges|actionAttributes|profileAttributes"),new a("gm.getTopUsers",0,0,"challenge|totalCount|friendsCount|includeSelf|period|lang|actionAttributes|profileAttributes"),new a("gm.getChallengeConfig",0,0,"UID|includeChallenges|excludeChallenges|lang|actionAttributes|profileAttributes|expandActions"),
new a("gm.notifyAction",0,1,"action|operation|challengeIDs|actionAttributes|profileAttributes"),new b("comments.showRatingUI","comments.rating",false),new a("comments.postComment",0,0,"categoryID|streamID|parentID|guestName|guestEmail|commentText|privacy|feedID|userAction|UserAction|scope|enabledProviders|disabledProviders|shortURLs|commentTitle|ratings|tags|streamTags|actionAttributes|profileAttributes"),new a("comments.getComments",0,0,"categoryID|streamID|includeSettings|start|startTS|threadLimit|sort|threaded|threadDepth|includeStreamInfo|includeOpenidUID|includeUID|includeReplies|tags|dataFormat|includeUserOptions|includeUserComments|includeRatingsDims"),
new a("comments.setStreamInfo",0,0,"categoryID|streamID|streamTitle|streamURL|streamInfoSig|streamTags"),new a("comments.getTopStreams",0,0,"categoryID|limit|maxStreamAge|includeLastComment|streamTag|minRatingCount"),new a("comments.getTopRatedStreams",0,0,"categoryID|limit|maxStreamAge|ratingClass|minRatingCount|streamTag"),new a("comments.getStreamInfo",0,0,"categoryID|streamID|streamIDs|includeLastComment|includeRatingsDims"),new a("comments.flagComment",0,0,"categoryID|streamID|commentID|actionAttributes|profileAttributes"),
new a("comments.vote",0,1,"categoryID|streamID|commentID|vote|actionAttributes|profileAttributes"),new a("comments.getUserVotes",0,1,"categoryID|streamID"),new a("comments.getUserComments",0,1,"categoryID|streamID|tag|senderUID|start|limit|sort|includeReplies|includeStreamInfo"),new a("comments.getFriendsComments",0,1,"categoryID|streamID|start|limit|includeUID|sort|includeReplies|includeStreamInfo"),new a("comments.getThread",0,0,"categoryID|streamID|commentID|start|includeUID|limit|threadDepth|sort"),
new a("comments.deleteComment",0,1,"categoryID|streamID|commentID"),new a("comments.subscribe",0,0,"categoryID|streamID|email|lang"),new a("comments.unsubscribe",0,0,"categoryID|streamID|unsubscribeToken"),new a("comments.setUserOptions",0,1,"replyNotifications|notificationsEmail|notificationsLanguage"),new a("comments.getUserOptions",0,1,"APIKey"),new a("gcs.getUserData",0,1,"type|fields"),new a("gcs.setUserData",0,1,"data|type|updateBehavior"),new a("gcs.search",0,0,"expTime|querySig|query"),new a("gcs.getSchema",
0,0,"schemaType"),new a("chat.getSettings",0,0,"categoryID|streamID|skinID"),new a("chat.getMessages",0,0,"categoryID|streamID|start|includeSettings"),new a("chat.postMessage",0,1,"categoryID|streamID|messageText|isPrivate|actionAttributes|profileAttributes"),new a("chat.resetChat",0,0,"categoryID|streamID|timestamp|chatSignature"),new a("chat.blockUser",0,0,"categoryID|streamID|UID|chatSignature"),new a("chat.deleteMessage",0,0,"categoryID|streamID|messageId|chatSignature"),new a("accounts.login",
0,0,"loginID|password|sessionExpiration|targetEnv|regToken|include|actionAttributes|profileAttributes|includeUserInfo|bp_channel_url",null,d,true),new a("accounts.linkAccounts",0,0,"loginID|password|sessionExpiration|targetEnv|include|regToken|includeUserInfo|bp_channel_url",null,null,true),new a("accounts.initRegistration",0,0,"sdk",null,d),new a("accounts.register",0,0,"username|email|password|UID|regToken|siteUID|secretQuestion|secretAnswer|profile|data|captchaText|captchaToken|lang|hashedPassword|pwHashAlgorithm|skipVerification|finalizeRegistration|targetEnv|sessionExpiration|include|actionAttributes|profileAttributes|includeUserInfo|bp_channel_url",
null,null,true),new a("accounts.finalizeRegistration",0,0,"regToken|targetEnv|include|includeUserInfo|bp_channel_url"),new a("accounts.captchaImage",0,0,"regToken"),new a("accounts.importProfilePhoto",0,0,"regToken|URL|publish"),new a("accounts.resetPassword",0,0,"lang|loginID|passwordResetToken|secretAnswer|securityFields|newPassword|email",null,null,true),new a("accounts.isAvailableLoginID",0,0,"loginID"),new a("accounts.resendVerificationCode",0,0,"regToken|email"),new a("accounts.getCaptcha",
0,0,""),new a("accounts.getPolicies",0,0,"sections"),new a("accounts.getSchema",0,0,"sections|schemaType"),new a("accounts.getAccountInfo",0,1,"include|extraProfileFields|regToken"),new a("accounts.setAccountInfo",0,1,"profile|data|regToken|oldPassword|password|newPassword|addLoginEmails|removeLoginEmails|username|secretQuestion|secretAnswer",null,null,true),new a("accounts.logout",0,1,"signIDs",null,function(a){if(gigya.partnerSettings.ssoKey)a.signIDs=true}),new a("accounts.search",0,0,"expTime|querySig|query"),
new a("accounts.getScreenSets",0,0,"screenSetIDs|include"),new a("ds.store",0,0,"type|data|oid|updateBehavior"),new a("ds.get",0,0,"type|data|oid|fields"),new a("ds.search",0,0,"expTime|querySig|query"),new a("ds.getSchema",0,0,""),new a("ds.delete",0,0,"type|oid|fields")],b=0;b<a.length;b++){var d=a[b],e="socialize";if(d.namespace)e=d.namespace;gigya[e]||(gigya[e]={});gigya[e][d.name]=c(d)}})();(function(){var a={},b={User:"personwithuid+isLoggedIn|false,isConnected|false,isSiteUser|false,identities|{},providers|[],timestamp,UIDSig,UIDSignature,signatureTimestamp,loginProvider,loginProviderUID,capabilities|{}",
Friend:"personwithuid+timestamp,friendshipSig,friendshipSignature,signatureTimestamp,timestamp,isSiteUser|false,identities|{}",Identity:"person+isExpiredSession|false,allowsLogin|false,providerUID,provider,isLoginIdentity|false,missingPermissions",Contact:"provider,firstName,lastName,nickname,email,photoURL",person:"nickname,photoURL,thumbnailURL,birthDay|0,birthMonth|0,birthYear|0,gender,email,proxiedEmail,country,state,city,hometown,zip,firstName,lastName,profileURL,age|0",personwithuid:"person+UID,isSiteUID|false",
UserAction:"actorUID,actorNickname,actionName,date|new Date(),targets|[],images|[],actionData1,actionData2,iconURL,title,linkBack,userMessage,description,actionLinks|[],mediaItems|[],subtitle"},c=function(a){var e={},a=b[a];if(a.indexOf("+")!=-1){e=c(a.split("+")[0]);a=a.split("+")[1]}arFields=a.split(",");for(a=0;a<arFields.length;a++){var d="",h=arFields[a].split("|");if(h.length>1)try{d=gigya.utils.JSON.deserialize(h[1])}catch(j){}e[h[0]]=d}return e},d=function(b){return function(c){var e=a[b],
d;for(d in e)this[d]=gigya.utils.object.clone(e[d]);if(typeof c=="object")for(d in c)typeof c[d]!="function"&&(this[d]=gigya.utils.object.clone(c[d]))}},e;for(e in b){a[e]=c(e);gigya.socialize[e]=d(e)}gigya.socialize.Collection=function(a,b){this.arr=a;this._key=b?b:""};gigya.socialize.Collection.prototype={asArray:function(){return this.arr},each:function(a){for(var b=0,c=this.arr[b];c;){a(c,b);b++;c=this.arr[b]}},getById:function(a){typeof this._hash=="undefined"&&this._buildHash();return(this._hash?
this._hash:this.arr)[a]},getSize:function(){return this.arr.length},_buildHash:function(){var a=this._hash={},b=this._key;this.each(function(c){a[typeof c[b]=="function"?c[b]():c[b]]=c})}};gigya.socialize.UserAction.prototype={clone:function(){return new gigya.socialize.UserAction(gigya.utils.object.clone(this,true,true))},getTemplate:function(){return this.titleTemplate},setTemplate:function(a){this.titleTemplate=a},getActor:function(){return{UID:this.actorUID,nickname:this.actorNickname}},setActionName:function(a){this.actionName=
a;return this},getActionName:function(){return this.actionName},getTemplateFields:function(){var a=[],b;for(b in this.templateFields)a.push(this.templateFields[b]);return new gigya.socialize.Collection(a,"fieldName")},setTemplateField:function(a,b,c){this.templateFields[a]={fieldName:a,text:b,href:c};return this},getTemplateField:function(a){return this.templateFields[a]?this.templateFields[a]:null},addTarget:function(a){if(typeof a=="object"){this.targets.push({UID:a.UID,nickname:a.nickname?a.nickname:
""});return this}if(typeof a=="string"){this.targets.push({UID:a,nickname:""});return this}},addActionLink:function(a,b){this.actionLinks.push({text:a,href:b?b:""});return this},addMediaItem:function(a){this.mediaItems.push(a);return this},setTitle:function(a){if(a)this.title=a;return this},setLinkBack:function(a){a&&a.toString&&(a=a.toString());if(a)this.linkBack=a;return this},setUserMessage:function(a){this.userMessage=a?a:"";return this},setDescription:function(a){this.description=a?a:"";return this},
addImage:function(a,b){this.addMediaItem({type:"image",src:a,href:b})},getImages:function(){return new gigya.socialize.Collection(this.images,"")},getTargets:function(){return new gigya.socialize.Collection(this.targets,"UID")},setIconURL:function(a){this.iconURL=a;return this},getIconURL:function(){return this.iconURL},getDate:function(){return this.date},setActionData1:function(a){this.actionData1=a;return this},getActionData1:function(){return this.actionData1},setActionData2:function(a){this.actionData2=
a;return this},getActionData2:function(){return this.actionData2},setSubtitle:function(a){this.subtitle=a;return this},getSubtitle:function(){return this.subtitle}}})();gigya.attachPlugin=function(a,b,c,d){b||(b="socialize");gigya[b]||(gigya[b]={});if(!gigya[b].plugins)gigya[b].plugins={};gigya[b].plugins[c]||(gigya[b].plugins[c]={instances:[]});var e=gigya[b].plugins[c];e[d]||(e[d]=function(d){d=new a(d,"gigya."+b+".plugins."+c+".instances["+e.instances.length+"]");e.instances.push(d)})};gigya.socialize.addEventHandlers({listenerType:"component"},
{onFacebookLoaded:function(){gigya.external.facebook.retryPending()},onFBCRefreshed:function(){gigya.external.facebook.retryPending()}});gigya.utils.functions.makePublic("gigya.socialize.showChatUI",gigya.chat.showChatUI);gigya.utils.functions.makePublic("gigya.socialize.showCommentsUI",gigya.comments.showCommentsUI);gigya.utils.functions.makePublic("gigya.socialize.showRatingUI",gigya.comments.showRatingUI);gigya.utils.functions.makePublic("gigya.services.socialize",gigya.socialize);gigya.utils.functions.makePublic("gigya.services.gcs",
gigya.gcs);gigya.utils.functions.makePublic("gigya.services.gm",gigya.gm);gigya.utils.functions.makePublic("gigya.services.comments",gigya.comments);gigya.utils.functions.makePublic("gigya.services.accounts",gigya.accounts);gigya.utils.functions.makePublic("gigya.services.accounts",gigya.accounts);gigya.utils.functions.makePublic("gigya._getLoggingStatus",gigya.log._isEnabled);gigya.callsQueue.queueForExecution("API",function(){gigya.auth.loginToken.migrateExisting();gigya.reports.trackAddressBarShares();
if(gigya.thisScript.APIKey){var a=false;if(gigya.localInfo.isSafari)try{window.localStorage.setItem("gigTest","1");window.localStorage.removeItem("gigTest")}catch(b){b.code===DOMException.QUOTA_EXCEEDED_ERR&&window.localStorage.length===0&&(a=true)}if(gigya.localInfo.supportsLocalStorage&&gigya.utils.cookie.get("gig3pc")!="1"&&!a){gigya.global._onIDs=function(a){if(a&&a.data&&a.data.indexOf)if(a.data.indexOf("gig3pc=true")!=-1){gigya.utils.cookie.set("gig3pc","1",172800,gigya.partnerSettings.baseDomain);
gigya.callsQueue.release("gigIDs","API");gigya.callsQueue.release("gigIDs","UI")}else if(a.data.indexOf("gcid=")==0){a=gigya.utils.keyValue.deserialize(a.data);gigya.log.log("Safari IDs Proxy: Got callback with this response",a);if(a){if(a.gcid!="-1")gigya.partnerSettings.gcid=a.gcid;if(a.ucid!="-1")gigya.partnerSettings.ucid=a.ucid}gigya.callsQueue.release("gigIDs","API");gigya.callsQueue.release("gigIDs","UI");a=gigya.global.ifrGcid;a.parentNode.removeChild(a);delete gigya.global.ifrGcid;gigya.utils.DOM.removeEventListener(window,
"message",gigya.global._onIDs);delete gigya.global._onIDs}};gigya.callsQueue.hold("gigIDs","API");gigya.callsQueue.hold("gigIDs","UI");gigya.utils.DOM.addEventListener(window,"message",gigya.global._onIDs);var c=document.createElement("iframe"),a=document.location.protocol+"//"+document.location.href.split("?")[0].split("#")[0].split("/")[2],d=gigya.partnerSettings.ssoKey||gigya.thisScript.APIKey;c.src="https://cdns.gigya.com/gs/gigIDsProxy.htm?APIKey="+encodeURIComponent(d)+"&domain="+encodeURIComponent(a)+
"&apiDomain="+encodeURIComponent(gigya.partnerSettings.plugins.apiDomain);c.style.width="30px";c.style.height="10px";c.style.position="absolute";c.style.top="-1000px";c.style.left="-1000px";gigya.global.ifrGcid=c;gigya.log.log("Gigya IDs Proxy: Calling getIDs",{apiKey:d,domain:a});document.body?gigya.utils.DOM.appendToBody(c):gigya.utils.functions.invokeOnPageLoad(function(){gigya.utils.DOM.appendToBody(c)})}}gigya.auth.loginToken.setFromGAC();gigya.utils.functions.invokeOnPageLoad(function(){typeof gigya_omniture_conf!=
"undefined"&&gigya.utils.script.load(gigya.thisScript.base+"/js/GenesisExchange_Gigya.min.js")});gigya.reports.report("loadc",gigya.thisScript.APIKey,null,null,null,{sref:document.referrer});gigya.thisScript.APIKey&&gigya.utils.functions.invokeOnPageLoad(function(){window.setTimeout(function(){gigya.socialize.trackReferrals()},1E3)});if(gigya.partnerSettings.ssoKey&&gigya.thisScript.APIKey&&!gigya.auth.loginToken.get()){gigya.callsQueue.hold("SSO","API");gigya.utils.SSO.getGroupToken({callback:function(a){gigya.auth.loginToken.setFromSSOResponse(a);
gigya.callsQueue.release("SSO","API")}})}gigya.socialize.waitForService({service:"facebook",callback:function(){var a=gigya.external.facebook.getParams();gigya.thisScript.globalConf.autoLogin&&(a&&a.fb_at&&!gigya.auth.loginToken.get())&&gigya.socialize.notifyLogin({providerSessions:{facebook:{authToken:a.fb_at,tokenExpiresIn:a.fb_exp}}},{context:{eventOnSuccess:{eventName:"login",provider:"facebook"}}})}});gigya.thisScript.globalConf.customEventMap&&gigya.events.addMap(gigya.thisScript.globalConf.customEventMap);
j.checkReturnFromRedirect();typeof onGigyaServiceReady=="function"&&onGigyaServiceReady("socialize")})}();
