if(typeof scriptParsing=='function')scriptParsing('hyvesconnect');var Hyves=Hyves||{};Hyves.type={MEMBER:6,BLOGITEM:9,TIP:11,WIDGET:27,HUB:29,HUBINTEREST:43,PRESENCE:34,MEDIA:8};Hyves.config={};Hyves.config.environment="live";Hyves.config.base_url="http://hyves.nl";Hyves.config.www_base_url="http://www.hyves.nl";Hyves.config.secure_url="https://secure.hyves.nl";Hyves.badge={};Hyves.badge.type={OVERVIEW:"OVERVIEW",POLL:"POLL",MEDIA:"MEDIA",PREVIEW:"PREVIEW"};Hyves.badge.module={ABOUT:"About",BLOG:"Blog",MEMBER:"Member",SUBSCRIBE:"Subscribe",POLL:"Poll",PREVIEW:"Preview",THUMBNAIL:"Thumbnail"};Hyves.badge.defaults={OVERVIEW:["Subscribe"],POLL:["Poll"],MEDIA:["Thumbnail"],PREVIEW:["Preview"]};Hyves.badge.available={OVERVIEW:["About","Blog","Member","Subscribe"],POLL:["Poll"],MEDIA:["Preview","Thumbnail"],PREVIEW:["Preview"]};Hyves.badge.config={About:{height:100,item:0,row:1,count:0,itemwidth:!1},Blog:{height:1,item:132,row:1,count:3,itemwidth:!1},Member:{height:30,item:67,row:4,count:8,itemwidth:70},Subscribe:{height:100,item:100,row:1,count:0,itemwidth:!1},Poll:{height:270,item:0,row:1,count:0,itemwidth:!1},Preview:{height:270,item:0,row:1,count:0,itemwidth:!1},Thumbnail:{height:72,item:63,row:4,count:8,itemwidth:74}};var Hyves=Hyves||{};Hyves.constants={empty:null,response:{status:{success:"id_res",requestLoginRequired:"setup_needed",cancelled:"cancel",unknownError:"error"},field:{userid:"ax.value.userid",language:"ax.value.language",unavailable:null},oauth:{requestToken:"oauth.request_token",accessToken:"oauth.oauth_token",accessTokenSecret:"oauth.oauth_token_secret",scope:"oauth.scope",unavailable:null},profileField:{nickname:"ax.value.nickname",profilepicture:"ax.value.profilepicture",profilepictureIcon:"ax.value.profilepicture_icon",profilepictureIconLarge:"ax.value.profilepicture_icon_large",profileurl:"ax.value.profileurl",firstname:"ax.value.firstname",lastname:"ax.value.lastname",birthdate:"ax.value.birthdate",gender:"ax.value.gender"},contactField:{address:"ax.value.address",postalcode:"ax.value.postalcode",city:"ax.value.city",email:"ax.value.email",phonenumber:"ax.value.phonenumber"}}};Hyves.connect=function()
{97|1;var www_base_url=Hyves.config.www_base_url,secure_url=Hyves.config.secure_url,environment=Hyves.config.environment,isLive=environment=="development"||environment=="staging"?!1:!0;try{window.addEventListener?window.addEventListener("message",function(a)
{97|1;rpc.receiveMessage(a)
},!1):window.attachEvent("onmessage",function(a)
{97|1;rpc.receiveMessage(a)
});var params=[],aOption=[],consumerKey="",rpcRelay="http://"+location.host+"/statics/hcrpc_relay.html"}catch(e){}var logging_is_enabled=!0,HYVESCONNECT_TYPE_COMBO=10001,HYVESCONNECT_TYPE_TELLAFRIEND=10002,HYVESCONNECT_TYPE_PAY=10003,init=function(a)
{97|1;a.consumerKey&&(consumerKey=a.consumerKey);a.rpcRelay&&(rpcRelay=a.rpcRelay)
},log={debug:function(a)
{97|1;if(logging_is_enabled&&window.console){typeof a=="string"&&document.domain&&(a="["+document.domain+"] "+a);console.log(a)}
}},builder={buildPopupUrl:function(a)
{97|1;var b=params[a],c=[];for(var d in b)b.hasOwnProperty(d)&&c.push(escape(d)+"="+escape(b[d]));var e=config.getPostUrl(a)+"?"+c.join("&");log.debug(e);return e
},buildButton:function(a)
{97|1;var b=[16,24,32,48].join("|").indexOf(aOption[a].iconsize)<0?24:aOption[a].iconsize;return'<a href="javascript:;" onclick="Hyves.connect.submit('+a+');"><img style="border:none;" src="'+config.getCacheUrl()+"/images/hyvesconnect/favicon_"+b+'_round.png"></a>'
},decorateDiv:function(a,b)
{97|1;a.style.padding="15px";a.style.backgroundColor="rgb(207, 223, 239)";a.id=b;builder.decorateGeneric(a)
},decorateGeneric:function(a)
{97|1;a.style.position="absolute";a.style.zIndex="1000"
}},helper={getScrollOffset:function()
{97|1;var a=document.body,b=0,c=0;do{b+=a.scrollTop||0;c+=a.scrollLeft||0;a=a.parentNode}while(a);return{left:c,top:b}
},getDocumentDimensions:function()
{97|1;var a,b;if(typeof window.innerWidth!="undefined"){a=window.innerWidth;b=window.innerHeight}else if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!==0){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{a=document.getElementsByTagName("body")[0].clientWidth;b=document.getElementsByTagName("body")[0].clientHeight}return{width:a,height:b}
},getLeftAndTopOffset:function(a)
{97|1;var b=helper.getElementDimensions(a),c=helper.getDocumentDimensions(),d=helper.getScrollOffset(),e=Math.floor(c.width/2-b.width/2+d.left),f=Math.floor(c.height/2-b.height/2+d.top);return{left:e,top:f}
},getElementDimensions:function(a)
{97|1;return{width:a.clientWidth,height:a.clientHeight}
},getElementNode:function(a)
{97|1;var b=!1;typeof a=="string"?b=document.getElementById(a):typeof a=="object"&&(b=a);return b
},getBadgeNode:function(a)
{97|1;log.debug("Looking for node: "+a);return document.getElementById(a)||document.body
},encodeParams:function(a)
{97|1;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b
},appendAndEncodeParams:function(a,b)
{97|1;var c=helper.encodeParams(b);if(c.length>0){var d="?";if(a.indexOf("?")>-1||a.indexOf("#")>-1)d="&";a+=d+c.join("&")}log.debug(a);return a
},appendSettings:function(a)
{97|1;var b={consumerKey:consumerKey,rpcRelay:rpcRelay};return this.appendAndEncodeParams(a,b)
},extend:function(a,b)
{97|1;var c={};for(var d in b)c[d]=b[d];for(var d in a)c[d]=a[d];return c
},cleanup:function(a)
{97|1;var b=helper.getElementNode(a);if(b){var c=b.parentNode;c.removeChild(b)}
},normalizeDomain:function(a)
{97|1;var b=this.parseUri(a);return b.protocol+"://"+b.host
},parseUri:function(a,b)
{97|1;b||(b=!1);var c={strictMode:b,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},d=c.parser[c.strictMode?"strict":"loose"].exec(a),e={},f=14;while(f--)e[c.key[f]]=d[f]||"";e[c.q.name]={};e[c.key[12]].replace(c.q.parser,function(a,b,d)
{97|1;b&&(e[c.q.name][b]=d)
});return e
}},config={getHyvesUrl:function(a)
{97|1;var b=a?aOption[a].secure:!1;if(b)return secure_url;else return isLive?"http://www.hyves.nl":www_base_url.replace("cache","www")
},getPostUrl:function(a)
{97|1;return this.getHyvesUrl(a)+"/hyvesconnect/smartbutton"
},getBadgeUrlByType:function(a)
{97|1;var b="";switch(a){case Hyves.badge.type.OVERVIEW:b="module=Badge&action=showOverviewBadge";break;case Hyves.badge.type.POLL:b="module=Badge&action=showPollBadge";break;case Hyves.badge.type.MEDIA:b="module=Badge&action=showMediaBadge";break;case Hyves.badge.type.PREVIEW:b="module=Badge&action=showUpdatedPreviewModule"}return this.getHyvesUrl()+"/?"+b
},getBadgeUrl:function()
{97|1;return this.getHyvesUrl()+"/hyvesconnect/badge"
},getRelayUrl:function()
{97|1;return this.getHyvesUrl()+"/statics/hcrpc_relay.html"
},getBridgeUrl:function()
{97|1;return this.getHyvesUrl()+"/hyvesconnect/bridge"
},getBridgePopupUrl:function()
{97|1;return this.getHyvesUrl()+"/hyvesconnect/bridgepopup"
},getCacheUrl:function()
{97|1;return isLive?"http://cache.hyves-static.net":www_base_url
},getDivId:function()
{97|1;return"hyvesconnect_div"
},getFormId:function()
{97|1;return"hyvesconnect_form"
},getIframeIdPrefix:function()
{97|1;return"hyvesconnect_iframe_"
},defaults:{iconsize:24,secure:!1},getFormMethod:function()
{97|1;return"get"
},getDefaultOptions:function()
{97|1;return this.defaults
},setDefaultOptions:function(a)
{97|1;for(var b in this.defaults)a[b]&&(this.defaults[b]=a[b])
},getDefaultLoginOptions:function()
{97|1;return{profileInformation:!0,contactInformation:!1,apiAccess:!1,apiScope:""}
},getDefaultLoginButtonOptions:function()
{97|1;var a=config.getCacheUrl()+"/images/hyvesconnect/nl_hyvesconnect_login_button.png";return{image:a,autoAttempt:!0}
},getDefaultApiParams:function()
{97|1;return{ha_format:"json",ha_fancylayout:"true",ha_version:"2.0"}
},getIFrameHeight:function(a)
{97|1;var b=660;switch(a){case Hyves.type.BLOGITEM:case Hyves.type.MEDIA:case Hyves.type.TIP:case Hyves.type.HUB:case Hyves.type.HUBINTEREST:case HYVESCONNECT_TYPE_COMBO:case Hyves.type.PRESENCE:b=560;break;case Hyves.type.MEMBER:b=580;break;case Hyves.type.WIDGET:break;default:b=660}return b
},getIFrameWidth:function(a)
{97|1;var b=530;switch(a){case HYVESCONNECT_TYPE_PAY:b=700;break;case Hyves.type.MEMBER:b=600}return b
}},login=function()
{97|1;var a=!1,b=!1,c=null,d=function(a)
{97|1;return{status:a.status,openid:a.openid,signature:a.signature,getStatus:function()
{97|1;return this.status
},getIdentity:function()
{97|1;return this.openid.identity
},getSignature:function()
{97|1;return this.signature
},getField:function(a,b)
{97|1;if(this.openid&&this.openid[a])return this.openid[a];else if(b)return b;else return Hyves.constants.response.field.unavailable
},getOAuthProperty:function(a)
{97|1;return this.getField(a,Hyves.constants.response.oauth.unavailable)
},getUserid:function()
{97|1;return this.getField(Hyves.constants.response.field.userid)
},getLanguage:function()
{97|1;return this.getField(Hyves.constants.response.field.language)
},getOAuthAccessToken:function()
{97|1;return this.getOAuthProperty(Hyves.constants.response.oauth.accessToken)
},getOAuthAccessTokenSecret:function()
{97|1;return this.getOAuthProperty(Hyves.constants.response.oauth.accessTokenSecret)
},getOAuthScope:function()
{97|1;return this.getOAuthProperty(Hyves.constants.response.oauth.scope)
},getOAuthRequestToken:function()
{97|1;return this.getOAuthProperty(Hyves.constants.response.oauth.requestToken)
}}
},e={getBridgeId:function()
{97|1;return config.getIframeIdPrefix()+"bridge"
},createBridge:function()
{97|1;c===null&&(c=Hyves.connect.rpc.create({frame:this.getBridgeId(),domain:config.getHyvesUrl(),relay:config.getRelayUrl()}));if(!a&&!helper.getElementNode(this.getBridgeId())){var b=document.createElement("iframe");b.style.width="1px";b.style.height="0px";b.scrolling="no";b.frameBorder="0";b.id=this.getBridgeId();b.name=this.getBridgeId();b.src=helper.appendSettings(config.getBridgeUrl());log.debug("Placing hyves-bridge in document body.");setTimeout(function()
{97|1;document.body.appendChild(b)
},0);c.register("bridge_init",function(b)
{97|1;log.debug("Hyves-bridge is now inited successful.");a=!0
});c.register("bridge_exception",function(a)
{97|1;log.debug("Bridge exception occured!");log.debug(a)
})}
},createBridgePopup:function(a)
{97|1;var b=this;Hyves.connect.login.require(function()
{97|1;b.bridgePopup&&b.bridgePopup.closed&&(b.bridgePopup=!1);b.bridgePopup&&b.bridgePopup.close();var c=helper.appendSettings(config.getBridgePopupUrl());c=helper.appendAndEncodeParams(c,{loginOptions:Hyves.connect.util.json.stringify(a)});b.bridgePopup=window.open(c,"hyves_bridge_popup","width=600,height=900,scrollbars=yes,location=yes")
})
},processResponse:function(a,b)
{97|1;var c=new d(b);c.getOAuthRequestToken()!==Hyves.constants.response.oauth.unavailable&&(api.loginResponse=c);a(c)
}};return{button:function(a,b,c,d)
{97|1;b=helper.extend(b,config.getDefaultLoginButtonOptions());var e=function()
{97|1;var e=helper.getElementNode(d);e||(e=document.body);var f=document.createElement("a");f.href="javascript:;";f.onclick=function(b)
{97|1;Hyves.connect.login.request(a,function(a)
{97|1;f.style.display="none";c(a)
})
};var g=document.createElement("img");g.style.border="0px";g.src=b.image;f.appendChild(g);e.appendChild(f)
};b.autoAttempt?Hyves.connect.login.attempt(a,function(a)
{97|1;a.status==Hyves.constants.response.status.requestLoginRequired?e():c(a)
}):e()
},attempt:function(a,b)
{97|1;var d=this;this.require(function()
{97|1;c.register("bridge_tryLoginResponse",function(a)
{97|1;e.processResponse(b,a)
});c.call("bridge_tryLogin",helper.extend(a,config.getDefaultLoginOptions()))
})
},request:function(a,b)
{97|1;var d=this;this.require(function()
{97|1;c.register("bridge_doLoginResponse",function(a)
{97|1;e.processResponse(b,a)
});e.createBridgePopup(helper.extend(a,config.getDefaultLoginOptions()))
})
},require:function(b)
{97|1;if(a){b();return}e.createBridge();var c=this;setTimeout(function()
{97|1;c.require(b)
},100)
},call:function(a,b)
{97|1;log.debug("send call "+a);c.call(a,b)
},register:function(a,b)
{97|1;log.debug("registering call "+a);c.register(a,b)
}}
}(),api=function()
{97|1;var a=null;return{call:function(a,b,c,d)
{97|1;login.require(function()
{97|1;login.register("bridge_apiCallResponse",function(a)
{97|1;c(a)
});b.ha_method=a;login.call("bridge_apiCall",helper.extend(b,config.getDefaultApiParams()))
})
}}
}(),main=function()
{97|1;var a=[];return{button:function(a,b,c)
{97|1;params.push(a);aOption.push(helper.extend(b,config.getDefaultOptions()));id=params.length-1;var d=helper.getElementNode(c),e=builder.buildButton(id);d?d.innerHTML=e:document.write(e)
},badge:function(b,c,d)
{97|1;if(c.style){var e=0;for(var f in c.style)if(c.style.hasOwnProperty(f)){c["pers_item_profile."+f]=c.style[f];e++}c.style=e>0?!0:!1}var g=document.createElement("iframe");g.style.border="0px";g.style.width="1px";g.scrolling="no";g.frameBorder="0";a.push(g);var h=a.length-1;g.id=config.getIframeIdPrefix()+h;g.src=helper.appendAndEncodeParams(config.getBadgeUrl(),helper.extend({frameId:h,badge_type:b.type},c));var i=helper.getBadgeNode(d);log.debug("Placing in node: "+i);setTimeout(function()
{97|1;i.appendChild(g)
},0);log.debug("badges array length: "+a.length);return{call:function(a,b)
{97|1;Hyves.connect.rpc.call(a,b,h)
}}
},drawBadge:function(a,b,c,d,e)
{97|1;if(!d)d={modules:{},pimp:{}};else{d.modules||(d.modules={});d.pimp||(d.pimp={})}var f=document.createElement("iframe"),g=d.width||300;g=g<175?175:g;var h=0;log.debug(a);var i=Hyves.badge.defaults[a];for(p in d.modules){var j=!1;for(var k=0;k<Hyves.badge.available[a].length;k++)if(Hyves.badge.available[a][k]==p){j=!0;break}if(!j){log.debug("Module "+p+" not available for Badge "+a);continue}h+=Hyves.badge.config[p].height;log.debug("Adding "+Hyves.badge.config[p].height+" for configured module "+p);var l=d.modules[p].count||Hyves.badge.config[p].count,m=Hyves.badge.config[p].item,n=!1;if(Hyves.badge.config[p].itemwidth){var o=Math.floor(g/Hyves.badge.config[p].itemwidth);log.debug("Items per row (itemWidth): "+o);var n=Math.ceil(l/o)}else if(m&&l){var o=Hyves.badge.config[p].row;log.debug("Items per row (itemCount): "+o);var n=o?l/o:l}if(n){var m=m*n;log.debug("Item height of "+p+": "+m);h+=m}}for(k=0;k<i.length;k++){var p=i[k];if(typeof d.modules[p]=="undefined"){log.debug("Adding "+Hyves.badge.config[p].height+" for default module "+p);h+=Hyves.badge.config[p].height;var m=Hyves.badge.config[p].item,o=Math.floor(g/Hyves.badge.config[p].itemwidth),l=Hyves.badge.config[p].count,n=l/o,m=m*n;log.debug("Adding default item height of "+p+": "+m);h+=m}}log.debug("Total "+a+" badge height: "+h);var q="1px solid ",r="silver";if(d.pimp){var s=d.pimp.bordercolor||r;r=s.replace(/[^0-9a-z#]/gi,"")}var t=q+r;log.debug("Border "+t);f.id="hyvesconnect_badge_"+a.toLowerCase();f.style.border=t;f.style.width=g+"px";f.style.height=h+"px";f.scrolling="no";f.frameBorder="0";var u=config.getBadgeUrlByType(a),v={owner:b,type:c,modules:Hyves.connect.util.json.stringify(d.modules),pimp:Hyves.connect.util.json.stringify(d.pimp)};f.src=helper.appendAndEncodeParams(u,v);setTimeout(function()
{97|1;helper.getBadgeNode(e).appendChild(f)
},0)
}}
}(),util=function()
{97|1;return{json:function()
{97|1;var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return{stringify:function(a)
{97|1;var b,c,d,e,f=/["\\\x00-\x1f\x7f-\x9f]/g,g;switch(typeof a){case"string":return f.test(a)?'"'+a.replace(f,function(a)
{97|1;var b=m[a];if(b)return b;b=a.charCodeAt();return"\\u00"+Math.floor(b/16).toString(16)+(b%16).toString(16)
})+'"':'"'+a+'"';case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";b=[];if(typeof a.length=="number"&&!a.propertyIsEnumerable("length")){e=a.length;for(c=0;c<e;c+=1)b.push(this.stringify(a[c])||"null");return"["+b.join(",")+"]"}for(d in a)if(a.hasOwnProperty(d)&&typeof d=="string"){g=this.stringify(a[d]);g&&b.push(this.stringify(d)+":"+g)}return"{"+b.join(",")+"}"}
},parse:function(text)
{97|1;if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return eval("("+text+")");return!1
}}
}(),client:{getHeight:function()
{97|1;var a=document.body.style.display;if(a!="none"&&a!==null)return document.body.offsetHeight;var b=document.body.style,c=b.visibility,d=b.position,e=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var f=document.body.clientHeight;b.display=e;b.position=d;b.visibility=c;return f
}}}
}(),rpc=function()
{97|1;var a={},b={},c={},d="..",e=[],f={},g=config.getRelayUrl(),h=config.getHyvesUrl(),i={parseParams:function(a)
{97|1;return Hyves.connect.util.json.parse(decodeURIComponent(a))
},emitIFrame:function(a,b,c,d)
{97|1;typeof c=="undefined"&&(c=1);typeof d=="undefined"&&(d=0);var f;for(var g=e.length-1;g>=0;--g){var h=e[g];try{if(h&&(h.recyclable||h.readyState==="complete")){h.parentNode.removeChild(h);if(window.ActiveXObject){e[g]=h=null;e.splice(g,1)}else{h.recyclable=!1;log.debug("reusing iframe");f=h;break}}}catch(i){}}if(!f){f=document.createElement("iframe");f.style.border=f.style.width=f.style.height="0px";f.style.visibility="hidden";f.style.position="absolute";f.onload=function()
{97|1;this.recyclable=!0
};e.push(f)}log.debug("iframepool size = "+e.length);var j=5e4;window.ActiveXObject&&(j=1500);var k=!1;if(a.length+b.length>j){var l=j-a.length;d===0&&(d=Math.ceil(b.length/l)-1);k=b.substring(j);b="part:"+c+":"+d+":"+encodeURIComponent(b.substring(0,j))}else c>1&&(b="part:"+c+":"+d+":"+encodeURIComponent(b));f.src=a+encodeURIComponent(b);setTimeout(function()
{97|1;document.body.appendChild(f)
},0);k!==!1&&this.emitIFrame(a,k,c+1,d)
},resize:function(a,b)
{97|1;log.debug("Resizing...");var a=document.getElementById(config.getIframeIdPrefix()+b.frame);if(a){a.style.width=b.width+"px";a.style.height=b.height+"px"}else log.debug("Frame doesn't exist..ignoring..")
},autoCallback:function(b,c)
{97|1;var d=c.__msgId;if(d){if("msg_"+d in a){var e=a["msg_"+d];if(e.target.domain===b.domain){a["msg_"+d].callback(c.__result);delete a["msg_"+d]}else log.debug("AutoCallback message received from wrong domain: "+b.domain)}}else log.debug("AutoCallback message received with unregistered message id: "+d)
},processRpcMessage:function(a,c,d)
{97|1;try{switch(c){case"resize":this.resize(d.frame,d);break;case"__autoCallback":this.autoCallback(a,d);break;default:if(a)if("__autoCallback"in d&&"__msgId"in d){var e={__msgId:d.__msgId};e.__result=b[a.domain][c](d);this.callRpc("__autoCallback",e,a)}else b[a.domain][c](d);else log.debug("Got message "+c+" but was unable to find target info.")}}catch(f){log.debug("Error executing "+c+", "+f.message)}
},registerRpc:function(a,c,d)
{97|1;b[d.domain]||(b[d.domain]={});b[d.domain][a]=c;log.debug("registered function "+a+" for target "+d.domain)
},callRpc:function(a,b,c)
{97|1;var d=window.parent;c.frame!==Hyves.connect.rpc.targetFrameParent&&(d=document.getElementById(c.frame).contentWindow);var e=!1;try{typeof d!="undefined"&&typeof d.postMessage!="undefined"&&(e=!0)}catch(f){}if(e){var g=Hyves.connect.util.json.stringify({key:a,params:b});d.postMessage(g,c.domain)}else{var h=Hyves.connect.util.json.stringify(b),i=c.relay+"#"+c.frame+"&"+a+"&"+encodeURIComponent(c.origin)+"&";this.emitIFrame(i,h)}
}};return{targetFrameParent:"..",create:function(b)
{97|1;b.origin=helper.normalizeDomain(location.href);b.domain=helper.normalizeDomain(b.domain);c[b.domain]=b;var d=1;function
e(){97|1;return d++
}return{target:b,register:function(a,c)
{97|1;i.registerRpc(a,c,b)
},call:function(a,c)
{97|1;i.callRpc(a,c,b)
},callWithAutoCallback:function(c,d,f)
{97|1;var g=e();d.__msgId=g;d.__autoCallback=!0;a["msg_"+g]={target:b,callback:f};this.call(c,d)
}}
},receive:function(a,b,d)
{97|1;var e=decodeURIComponent(d[0]),d=d[1];paramsStr=String(d);if(paramsStr.substring(0,5)=="part:"){log.debug(b+" is split into parts, processing part.");f[b]||(f[b]={parts:0,data:[]});var g=paramsStr.split(":");f[b].parts=parseInt(g[2])+1;f[b].data[parseInt(g[1])]=g[3];if(f[b].data.length!=f[b].parts)return;else{d=f[b].data.join("");log.debug(b+" all parts processed, proceeding.");delete f[b]}}d=i.parseParams(d);var h=c[e];i.processRpcMessage(h,b,d)
},receiveMessage:function(a)
{97|1;var b=helper.normalizeDomain(a.origin),d=c[b];d||(d={domain:helper.normalizeDomain(config.getHyvesUrl())});if(d.domain==b){var e=Hyves.connect.util.json.parse(a.data);e&&e.key&&i.processRpcMessage(d,e.key,e.params)}else log.debug("Got html5 message from unknown domain: "+b+"; expected: "+d.domain)
}}
}(),badge={firehose:function(a,b)
{97|1;return main.badge({type:"showPublicWwwMini"},a,b)
},overview:function(a,b,c,d)
{97|1;return main.drawBadge(Hyves.badge.type.OVERVIEW,a,Hyves.type.HUB,c,d)
},poll:function(a,b,c,d)
{97|1;return main.drawBadge(Hyves.badge.type.POLL,a,b,c,d)
},media:function(a,b,c,d)
{97|1;return main.drawBadge(Hyves.badge.type.MEDIA,a,b,c,d)
},preview:function(a,b,c,d)
{97|1;return main.drawBadge(Hyves.badge.type.PREVIEW,a,b,c,d)
},configuration:{modules:{},width:300}},respect={generate:function(a)
{97|1;var b=document.getElementById,a=a?a:{},c=a.url?a.url:"http://www.hyves.nl",d="80px",e="120px",f={url:c};a.forceCount&&(f.forceCount=a.forceCount);a.counterStyle&&(f.counterStyle=a.counterStyle);a.counterStyle=="vertical"||a.counterStyle=="no-count"?e="70px":a.counterStyle=="horizontal"&&(d="120px");var g=helper.appendAndEncodeParams(Hyves.config.www_base_url+"/respect/button",f),h=["<iframe",'src="'+g+'"','style="border: medium none; overflow:hidden; width:'+e+"; height:"+d+';"','scrolling="no"','frameborder="0"',">"],i=h.join(" ")+"</iframe>";log.debug(i);return i
}};return{init:init,tip:function(a,b,c)
{97|1;a.type=Hyves.type.TIP;main.button(a,b,c)
},blog:function(a,b,c)
{97|1;a.type=Hyves.type.BLOGITEM;main.button(a,b,c)
},widget:function(a,b,c)
{97|1;a.type=Hyves.type.WIDGET;main.button(a,b,c)
},interest:function(a,b,c)
{97|1;a.type=Hyves.type.HUBINTEREST;main.button(a,b,c)
},hub:function(a,b,c)
{97|1;a.type=Hyves.type.HUB;main.button(a,b,c)
},friendinvite:function(a,b,c)
{97|1;a.type=Hyves.type.MEMBER;main.button(a,b,c)
},presence:function(a,b,c)
{97|1;a.type=Hyves.type.PRESENCE;main.button(a,b,c)
},combo:function(a,b,c)
{97|1;a.type=HYVESCONNECT_TYPE_COMBO;main.button(a,b,c)
},tellafriend:function(a,b,c)
{97|1;a.type=HYVESCONNECT_TYPE_TELLAFRIEND;main.button(a,b,c)
},pay:function(a,b,c)
{97|1;a.type=HYVESCONNECT_TYPE_PAY;a.popup=1;a.fixed=a&&a.fixed===!0?1:0;b=b||{};b.secure=!0;main.button(a,b,c)
},media:function(a,b,c)
{97|1;a.type=Hyves.type.MEDIA;main.button(a,b,c)
},submit:function(a)
{97|1;var b=builder.buildPopupUrl(a);window.open(b,"popup","height="+config.getIFrameHeight(params[a].type)+",width="+config.getIFrameWidth(params[a].type)+",location=yes,scrollbars=yes")
},close:function()
{97|1;helper.cleanup(config.getDivId())
},defaults:function(a)
{97|1;config.setDefaultOptions(a)
},util:util,rpc:rpc,badge:badge,login:login,api:api,respect:respect}
}();try{window.jsloaded&&jsloaded("/statics/hyvesconnect_core.js")}catch(e){}window.jsloaded&&jsloaded("/precompiled/hyvesconnect_bundle.js");;if(typeof scriptReady=='function')scriptReady('hyvesconnect');
