var yp={};//yp.API=Request.extend({yp.API=new Class({	Extends : Request,	getAPIOptions:function(){		return{			end_point:window.api_endpoint,api_key:window.api_key,auth_token:window.api_auth_token,secret:window.api_secret,response_format:"json",onJsonError:$empty,onAPIFailure:$empty,onAPISuccess:$empty		};	}	,initialize:function(_1,_2){		this.addEvent("onFailure",this.onStatusFailure);		this.method=_1;		this.options.method=_1;		this.setOptions(this.getAPIOptions(),_2);		this.options.url=this.options.end_point;		this.parent(this.options);	}	,call:function(_3){		var _4=this.queryString(_3);		if(this.options.method=="get"){			this.options._url=this.options.url;			this.options.url+="?"+_4;		}		else{			this.options.data=this.queryString(_3);		}		this.send();		if(this._url){			this.url=this._url;			this._url=null;		}	}	,onSuccess:function(){		this.parent();		var _5=JSON.decode(this.response.text);		if(_5){			if(_5.stat=="ok"){				this.fireEvent("onAPISuccess",[_5],20);			}			else{				this.fireEvent("onAPIFailure",[_5],20);			}		}		else{			this.fireEvent("onJsonError",[this.response.text,this.response.xml],20);		}	}	,queryString:function(_6){		var _7={		};		//        _7["ypp"]="1";		//        _7["api_key"]=this.options.api_key;		//        if(this.options.auth_token){		//            _7["auth_token"]=this.options.auth_token;		//        }		_7["method"]=this.method;		//        _7["format"]=this.options.response_format;    _7["timestamp"]=new Date().getTime();		_7=$extend(_7,_6);		var _8=[];		var _9="";		for(var _a in _7){			_8.push(_a);			_9+="&"+_a+"="+(_7[_a]?_7[_a].toString().escape_utf8():"");		}		_8.sort();		_b="vista";		//        var _b=this.options.secret;		//        for(var i=0;i<_8.length;i++){		//            _b+=_8[i]+_7[_8[i]];		//        }		_9="api_sig="+_b+_9;		return _9;	}	,onStatusFailure:function(){		alert("Error("+this.transport.status+"): "+this.transport.message);	}});var urls={	SCHEME:"http",APP_DOMAIN:window.app_domain||"imx365.net",MEDIA_ROOT:window.media_root||"",MEDIA_FILES:/(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)$/i,	PHOTO_SUFFIX:{		"square":"_75","thumb":"_t","small":"_m","medium":"","large":"_o"	},_:function(_d){		if(_d.indexOf("/")===0){			return urls.SCHEME+"://www."+urls.APP_DOMAIN+_d;		}		return _d;	}	,_u:function(){		var _e=$A(arguments);		if(_e.length===0){			return urls._u(window.current_user);		}		if(_e.length==1){			if(typeof _e[0]=="string"){				return urls._u(window.current_user,_e[0]);			}			else{				return urls._u(_e[0],"/");			}		}		if(_e.length===2){			if(_e[1].indexOf("/")===0){				var _f="www";				if(_e[0]){					_f=_e[0].id;				}				//                return urls.SCHEME+"://"+_f+"."+urls.APP_DOMAIN+_e[1];				return _e[1]+"userid="+_f;			}			return _e[1];		}	}	,_m:function(_10){		if(_10.indexOf("/")===0){			return urls.MEDIA_ROOT+_10;		}		return _10;	}	,_p:function(_11,_12,_13){		if(_12=="view"){			return urls._pv(_11,_13);		}//	return "http://photo."+urls.APP_DOMAIN+"/"+_11.dir+"/"+_11.filename+"/"+_12+"/";		return "/images/"+_11.dir+"/"+_11.filename+urls.PHOTO_SUFFIX[_12]+".jpg";	}	,_pv:function(_14,_15){		var url=urls._("viewimage.mpl?id="+_14.id);		if(_15){			//            url+="&"+Object.toQueryString(_15);			//Hash.toQueryString(new Hash(source));			url+="&"+Hash.toQueryString(new Hash(_15));		}		return url;	}};function $url(){	var _17=$A(arguments);	if(_17.length>1){		return (_17[0].filename)?urls._p.apply(urls,_17):urls._u.apply(urls,_17);	}	if(_17.length===0){		return urls._u();	}	return (_17[0].test(urls.MEDIA_FILES))?urls._m(_17[0]):urls._(_17[0]);}String.implement({	escape_html:function(){		var div=document.createElement("div");		var _19=document.createTextNode(this);		div.appendChild(_19);		return div.innerHTML;	}	,escape_utf8:function(){		var _1a=this;		if(_1a===""||_1a===null){			return "";		}		var _1b="";		for(var i=0;i<_1a.length;i++){			var c=_1a.charCodeAt(i);			var bs=[];			if(c>65536){				bs[0]=240|((c&1835008)>>>18);				bs[1]=128|((c&258048)>>>12);				bs[2]=128|((c&4032)>>>6);				bs[3]=128|(c&63);			}			else{				if(c>2048){					bs[0]=224|((c&61440)>>>12);					bs[1]=128|((c&4032)>>>6);					bs[2]=128|(c&63);				}				else{					if(c>128){						bs[0]=192|((c&1984)>>>6);						bs[1]=128|(c&63);					}					else{						bs[0]=c;					}				}			}			if(bs.length>1){				for(var j=0;j<bs.length;j++){					var b=bs[j];					var hex=nibble_to_hex((b&240)>>>4)+nibble_to_hex(b&15);					_1b+="%"+hex;				}			}			else{				_1b+=encodeURIComponent(String.fromCharCode(bs[0]));			}		}		return _1b;	}	,len:function(){		var _22=this.toString();		var len=0;		for(var i=0;i<_22.length;i++){			var c=_22.charCodeAt(i);			if(c>128){				len+=2;			}			else{				len+=1;			}		}		return len;	}	,brief:function(_26){		var len=0;		var buf="";		for(var i=0;i<this.length;i++){			var c=this.charCodeAt(i);			if(c>128){				len+=2;			}			else{				len+=1;			}			if(len<=_26){				buf+=this.charAt(i);			}			else{				return buf;			}		}		return buf;	}	,format:function(){		var _2b=this;		var _2c=$A(arguments);	return _2b.replace(/\{(\d+)\}/g,function(m,i){		return _2c[i];	}	);}});function nibble_to_hex(_2f){	var _30="0123456789ABCDEF";	return _30.charAt(_2f);}Element.implement({	classNames:function(){		return this.className.clean().split(/\s+/);	}	,visible:function(_31){		return this.getStyle("display")!="none";	}	,hide:function(){		this.setStyle("display","none");		return this;	}	,show:function(){		this.setStyle("display","");		return this;	}	,toggle:function(){		this[this.visible()?"hide":"show"]();		return this;	}	,within:function(x,y){		this.offset=[this.getLeft(),this.getTop()];		return (y>=this.offset[1]&&y<this.offset[1]+this.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+this.offsetWidth);	}	,getOpacity:function(){		var _34;		if((_34=this.getStyle("opacity"))){			return parseFloat(_34);		}		if((_34=(this.getStyle("filter")||"")).match(/alpha\(opacity=(.*)\)/)){			if(_34[1]){				return parseFloat(_34[1])/100;			}		}		return 1;	}	,disable:function(){		$A(this.getElementsByTagName("*")).each(function(el){			$(el);			if(["select","input","textarea"].contains(el.getTag())){				el.blur();				el.disabled=true;			}		}		);	}	,enable:function(){		$A(this.getElementsByTagName("*")).each(function(el){			$(el);			if(["select","input","textarea"].contains(el.getTag())){				el.disabled="";			}		}		);	}});Element.show=function(){	for(var i=0;i<arguments.length;i++){		$(arguments[i]).show();	}};Element.hide=function(){	for(var i=0;i<arguments.length;i++){		$(arguments[i]).hide();	}};Element.toggle=function(){	for(var i=0;i<arguments.length;i++){		$(arguments[i]).toggle();	}};Element.implement({	setHTML:function(){		return this.set('html',Array.flatten($A(arguments)).join('\n'));	},	setText:function(text){		return this.set('text',text);	},	getText:function(){		return this.get('text');	},	getHTML:function(){		return this.get('html');	},	setOpacity:function(value){		return this.set('opacity', value, false);	},	getTag:function(){		return this.tagName.toLowerCase();	},	replaceWith:function(el){		var newEL=$(el, true);		var oEL=$(this);		this.parentNode.replaceChild(newEL, oEL);		return newEL;	},	getValue: function(){		switch(this.getTag()){			case 'select':			var values = [];			for(i=0,L=this.options.length;i<L;i++){				if (this.options[i].selected) values.push($pick(this.options[i].value, this.options[i].text));			}			return (this.multiple) ? values : values[0];			case 'input': if (!(this.checked && ['checkbox', 'radio'].contains(this.type)) && !['hidden', 'text', 'password'].contains(this.type)) break;			case 'textarea': return this.value;		}		return false;	},	getFormElements: function(){		return $$(this.getElementsByTagName('input'), this.getElementsByTagName('select'), this.getElementsByTagName('textarea'))||[];	},	remove:function(){		return this.dispose();	}});var overlay={	show:function(_3a){		this.el=$("overlay");		if(!this.el){			var _3b=document.getElementsByTagName("body").item(0);			this.el=new Element("div").setProperty("id","overlay").setStyle("display","none").injectInside(_3b);		}		if(!this.iframe){			this.iframe=new BackgroundIframe(this.el);		}		_3a=$extend({			duration:200,from:0,to:0.6		}		,_3a||{		}		);		if(_3a.onclick){			this.el.onclick=_3a.onclick;		}		this.el.setStyle("opacity",0);		this.el.setStyle("height",Window.getScrollHeight()+"px");		//this.el.effect("opacity",_3a).set(_3a.from).start(_3a.from,_3a.to);		new Fx.Tween(this.el, {property:"opacity",duration:_3a.duration}).set(_3a.from).start(_3a.from,_3a.to);		this.el.show();		this.iframe.onResized();	}	,hide:function(_3c){		if(!this.el){			return;		}		_3c=$extend({			duration:200,onComplete:function(){				overlay.el.hide();			}		}		,_3c||{		}		);		if(this.el.onclick){			this.el.onclick=null;		}		//this.el.effect("opacity",_3c).start(this.el.getOpacity(),0);		this.el.fade('out');	}};var BackgroundIframe=new Class({	initialize:function(_3d){		this.iframe=null;		if(Browser.Engine.trident4){			var _3e="<iframe frameBorder=\"no\" style=\"position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; overflow: hidden; z-index: -1; filter: alpha(opacity=0);\"></iframe>";			this.iframe=new Element(_3e);			if(_3d){				this.domNode=_3d;				this.iframe.injectInside(_3d);			}			else{				this.iframe.injectInside(document.body);				this.iframe.hide();			}		}	}	,onResized:function(){		if(this.iframe&&this.domNode){			var w=this.domNode.offsetWidth;			var h=this.domNode.offsetHeight;			if(w==0||h==0){				this.onResized.bind(this).delay(50);			}			else{				this.iframe.setStyles({					width:w+"px",height:h+"px"				}				);			}		}	}	,size:function(_41){		if(!this.iframe){			return;		}		var _42=_41.getCoordinates();		if(_42.width===0||_42.height===0){			var _43=this;			setTimeout(function(){				_43.size(_41);			}			,50);		}		else{			this.iframe.setStyles({				width:_42.width,height:_42.height,left:_42.left,top:_42.top			}			);		}	}	,setZIndex:function(_44){		if(!this.iframe){			return;		}		if(isNaN(_44)){			this.iframe.setStyle("z-index",_44.getStyle("z-index")-1);		}		else{			this.iframe.setStyle("z-index",_44);		}	}	,show:function(){		if(!this.iframe){			return;		}		this.iframe.show();	}	,hide:function(){		if(!this.iframe){			return;		}		this.iframe.hide();	}	,remove:function(){		if(this.iframe.parentNode){			this.iframe.remove();		}	}});yp.Shadow=new Class({	options:{		mode:"drop",offset:4	}	,initialize:function(_45){		this.setOptions(_45);		this.offset=this.options.offset;		this.mode=this.options.mode;		this.zIndex=this.options.zIndex;		this.initAdjusts();	}	,initAdjusts:function(){		var o=this.offset,a={			h:0		};		var rad=Math.floor(this.options.offset/2);		switch(this.mode.toLowerCase()){			case "drop":a.w=0;			a.l=a.t=o;			a.t-=1;			if(Browser.Engine.trident4){				a.l-=this.offset+rad;				a.t-=this.offset+rad;				a.w-=rad;				a.h-=rad;				a.t+=1;			}			break;			case "sides":a.w=(o*2);			a.l=-o;			a.t=o-1;			if(Browser.Engine.trident4){				a.l-=(this.offset-rad);				a.t-=this.offset+rad;				a.l+=2;				a.w-=(this.offset-rad)*2;				a.w-=rad+1;				a.h-=2;			}			break;			case "frame":a.w=a.h=(o*2);			a.l=a.t=-o;			a.t+=1;			a.h-=2;			if(Browser.Engine.trident4){				a.l-=(this.offset-rad);				a.t-=(this.offset-rad);				a.l+=1;				a.w-=(this.offset+rad+1);				a.h-=(this.offset+rad);				a.h+=1;			}			break;		}		this.adjusts=a;	}	,show:function(_48){		_48=$(_48);		if(!this.el){			this.el=yp.Shadow.Pool.pull();			if(this.el.getNext()!=_48){				this.el.remove().injectBefore(_48);			}		}		this.el.setStyle("z-index",this.zIndex||_48.getStyle("z-index").toInt()-1);		if(Browser.Engine.trident4){			this.el.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")";		}		this.realign(_48.getLeft(),_48.getTop(),_48.offsetWidth,_48.offsetHeight);		this.el.style.display="block";	}	,isVisible:function(){		return this.el?true:false;	}	,realign:function(l,t,w,h){		if(!this.el){			return;		}		var a=this.adjusts,d=this.el,s=d.style;		var iea=0;		s.left=(l+a.l)+"px";		s.top=(t+a.t)+"px";		var sw=(w+a.w),sh=(h+a.h),sws=sw+"px",shs=sh+"px";		if(s.width!=sws||s.height!=shs){			s.width=sws;			s.height=shs;			if(!Browser.Engine.trident4){				var cn=d.childNodes;				var sww=Math.max(0,(sw-12))+"px";				cn[0].childNodes[1].style.width=sww;				cn[1].childNodes[1].style.width=sww;				cn[2].childNodes[1].style.width=sww;				cn[1].style.height=Math.max(0,(sh-12))+"px";			}		}	}	,hide:function(){		if(this.el){			this.el.style.display="none";			yp.Shadow.Pool.push(this.el);			delete this.el;		}	}	,setZIndex:function(z){		this.zIndex=z;		if(this.el){			this.el.setStyle("z-index",z);		}	}});yp.Shadow.implement(new Options());yp.Shadow.Pool=function(){	var p=[];	var _54="<div class=\"xst\"><div class=\"xstl\"></div><div class=\"xstc\"></div><div class=\"xstr\"></div></div><div class=\"xsc\"><div class=\"xsml\"></div><div class=\"xsmc\"></div><div class=\"xsmr\"></div></div><div class=\"xsb\"><div class=\"xsbl\"></div><div class=\"xsbc\"></div><div class=\"xsbr\"></div></div>";	return{		pull:function(){			var sh=p.shift();			if(!sh){				sh=new Element("div");				if(Browser.Engine.trident4){					sh.addClass("x-ie-shadow");				}				else{					sh.addClass("x-shadow").setHTML(_54);				}				sh.inject(document.body);				sh.autoBoxAdjust=false;			}			return sh;		}		,push:function(sh){			p.push(sh);		}	};}();function $decorate(el,cls){	el=$(el);	function newDiv(cls){		return new Element("div").addClass(cls);	}	var c=newDiv(cls+"-cc");	el.getChildren().each(function(n){		n.remove().inject(c);	}	);	newDiv(cls+"-t").adopt(newDiv(cls+"-tl")).adopt(newDiv(cls+"-tc")).adopt(newDiv(cls+"-tr")).inject(el);	newDiv(cls+"-c").adopt(newDiv(cls+"-cr").adopt(c)).inject(el);	newDiv(cls+"-b").adopt(newDiv(cls+"-bl")).adopt(newDiv(cls+"-bc")).adopt(newDiv(cls+"-br")).inject(el);	return el;}var Dropdown=new Class({	options:{		popup:true,shadow:true,shadowMode:"drop",shadowOffset:3,offset:3,zindex:99	}	,initialize:function(id,_5d){		this.id=id;		this.menu=$(id);		this.setOptions(_5d);		if(this.options.popup){			this.dropper=new Element("span").addClass("dropper").injectInside(this.menu);			this.dropper.addEvent("mouseover",function(){				this.addClass("dropper-hover");			}			);			this.dropper.addEvent("mouseout",function(){				this.removeClass("dropper-hover");			}			);			this.dropper.addEvent("mousedown",function(){				this.addClass("dropper-active");			}			);			this.dropper.addEvent("mouseup",function(){				this.removeClass("dropper-active");			}			);			this.dropper.addEvent("click",this.toggle.bind(this));			this.mouseUpHander=this.mouseUp.bindAsEventListener(this);		}		this.menu.addEvent("mouseover",this.mouseOver.bind(this));		this.menu.addEvent("mouseout",this.mouseOut.bind(this));		this.showing=false;	}	,initPopup:function(){		this.popup=$("dropdown-"+this.id);		this.popup.addClass("drop-popup");		$decorate(this.popup,"drop-popup");		this.popup.setStyle("z-index",this.options.zindex);		if(this.options.shadow){			this.shadow=new yp.Shadow({				mode:this.options.shadowMode,offset:this.options.shadowOffset			}			);		}		this.popup.hide();		this.popup.remove().injectInside(document.body);	}	,mouseOver:function(){		this.menu.addClass("hover");		this.fireEvent("onMouseOver");	}	,mouseOut:function(){		if(!this.showing){			this.menu.removeClass("hover");		}		this.fireEvent("onMouseOut");	}	,show:function(){		if(!this.popup){			this.initPopup();		}		if(!this.pos){			var _5e=this.menu.getCoordinates();			this.pos={				"top":_5e.top+_5e.height+this.options.offset,"left":_5e.left			};			this.popup.setStyles(this.pos);		}		this.popup.show();		if(this.shadow){			this.shadow.show(this.popup);		}		if(Browser.Engine.trident4){			if(!this.shim){				this.shim=new BackgroundIframe(this.popup);			}			this.shim.onResized();		}		this.showing=true;		$(document.body).addEvent("mouseup",this.mouseUpHander);		this.fireEvent("onShow");		return false;	}	,hide:function(){		if(this.shadow){			this.shadow.hide();		}		this.popup.hide();		this.showing=false;		$(document.body).removeEvent("mouseup",this.mouseUpHander);		this.fireEvent("onHide");		return false;	}	,toggle:function(){		if(this.showing){			this.hide();		}		else{			this.show();		}		return false;	}	,mouseUp:function(e){		e=new Event(e);		if(this.showing){			if(!this.popup.within(e.page.x,e.page.y)&&!this.menu.within(e.page.x,e.page.y)){				this.hide();				this.mouseOut();			}		}	}});Dropdown.implement(new Events());Dropdown.implement(new Options());var dropmenu=(function(){	var _60=[];	var opt={		shadow:true,shadowMode:"sides",shadowOffset:5	};	function mouseOver(){		if(this.showing||!this.options.popup){			return;		}		_60.each(function(d){			if(d.showing&&d!=this){				d.hide();				d.mouseOut();				this.show();			}		}		,this);	}	return{		init:function(_63){			_63.each(function(m){				var d=new Dropdown("menu-"+m.name,$extend(m,opt));				d.addEvent("onMouseOver",mouseOver);				_60.push(d);			}			);		}	};})();var SearchBox=new Class({	options:{		placeHolder:"Search",autoSave:"yupoo.com",results:8,wrapperClass:"search-wrapper",leftClass:"left",inputClass:"pretty-search",rightClass:"right",resetClass:"reset"	}	,initialize:function(el,_67){		this.input=$(el);		this.box=this.input.getParent();		this.form=this.findForm(this.input);		this.setOptions(_67);		this.decorateInput();	}	,findForm:function(_68){		if(!_68){			return null;		}		if(_68.tagName.toLowerCase()!="form"){			return this.findForm(_68.parentNode);		}		return $(_68);	}	,decorateInput:function(){		var i=this.input;		if(navigator.userAgent.match(/AppleWebKit/i)){			i.setAttribute("type","search");			i.setAttribute("placeholder",this.options.placeHolder);			i.setAttribute("autosave",this.options.autoSave);			i.setAttribute("results",this.options.results);			var _6a=this;			i.addEvent("focus",function(){				_6a.fireEvent("onFocus");			}			);			i.addEvent("blur",function(){				_6a.fireEvent("onBlur");			}			);		}		else{			this.wrapper=i.replaceWith(new Element("div",{				"class":this.options.wrapperClass			}			));			this.input=new Element("input",{				"name":i.getAttribute("name"),"class":this.options.inputClass			}			).injectInside(this.wrapper);			i=this.input;			i.setAttribute("autocomplete","off");			new Element("span",{				"class":this.options.leftClass			}			).injectBefore(i);			new Element("span",{				"class":this.options.rightClass			}			).injectAfter(i);			this.reset=new Element("div",{				"class":this.options.resetClass			}			).injectInside(this.wrapper);			var _6b=i.value==this.options.placeHolder;			var _6c=i.value.length===0;			if(_6b||_6c){				i.value=this.options.placeHolder;				this.wrapper.addClass("blurred");				this.wrapper.addClass("empty");			}			i.addEvent("focus",this.onFocus.bind(this));			i.addEvent("blur",this.onBlur.bind(this));			i.addEvent("keydown",this.onKeyDown.bind(this));			this.reset.addEvent("mousedown",this.resetField.bind(this));		}	}	,onFocus:function(){		var _6d=this.wrapper.hasClass("blurred");		if(this.input.value==this.options.placeHolder&&_6d){			this.input.value="";		}		this.wrapper.removeClass("blurred");		this.fireEvent("onFocus");	}	,onBlur:function(){		if(this.input.value===""){			this.input.addClass("empty");			this.input.value=this.options.placeHolder;		}		this.wrapper.addClass("blurred");		this.fireEvent("onBlur");	}	,onKeyDown:function(evt){		var e=new Event(evt||event);		if(e.key==13&&!e.alt){			if(e.target&&e.target.value.length===0){				return false;			}			if(this.form){				this.form.submit();			}			return;		}		if(this.input.value.length>=0){			this.wrapper.removeClass("empty");		}		if(e.key==27){			this.resetField();		}	}	,resetField:function(){		this.input.blur();		this.input.value="";		this.wrapper.addClass("empty");		this.input.focus();	}});SearchBox.implement(new Options());SearchBox.implement(new Events());var GlobalSearch=SearchBox.extend({	options:{		searchForName:"searchfor",searchFor:[{			name:"Photos",value:"photos",selected:true		}		,{			name:"Groups",value:"groups"		}		,{			name:"People",value:"people"		}		],optionClass:"gs-option"	}	,initialize:function(el,_71){		this.parent(el,_71);		this.addEvent("onFocus",this.showOptions);		this.mouseDownHandler=this.mouseDown.bindAsEventListener(this);	}	,initOptionSelector:function(){		function makeCheckbox(c,o){			var cb=new Element("input",{				type:"radio",id:"searchfor_"+o.value,name:"searchfor",value:o.value,checked:o.selected?true:false			}			);			new Element("label",{				"for":"searchfor_"+o.value			}			).adopt(cb).appendText(o.name).inject(c);			return cb;		}		var _75=new Element("input",{			type:"hidden",name:this.options.searchForName		}		).inject(this.form);		var _76=new Element("div",{			"class":this.options.optionClass		}		).inject(document.body);		this.options.searchFor.each(function(_77,i){			if(_77.selected){				_75.value=_77.value;			}			var cb=makeCheckbox(_76,_77);			var _7a=this;			cb.onclick=function(){				_75.value=this.value;				if(_7a.input.value.length>0&&_7a.input.value!=_7a.options.placeHolder){					_7a.form.submit();				}			};		}		,this);		var _7b=this.wrapper?this.wrapper.getCoordinates():this.input.getCoordinates();		var top=_7b.top+_7b.height+3;		var _7d=_7b.left-(_76.offsetWidth-_7b.width-10);		_76.setStyles({			"top":top+"px","left":_7d+"px"		}		);		this.optionSelector=_76;	}	,showOptions:function(){		if(!this.optionSelector){			this.initOptionSelector();		}		this.optionSelector.show();		$(document.body).addEvent("mousedown",this.mouseDownHandler);	}	,hideOptions:function(){		this.optionSelector.hide();	}	,mouseDown:function(e){		e=new Event(e);		if(this.hideTimer){			$clear(this.hideTimer);		}		if(!this.optionSelector.within(e.page.x,e.page.y)&&!this.input.within(e.page.x,e.page.y)){			this.hideOptions();		}	}});function generateSlideShow(_7f,_80){	var url="?api_key="+window.api_key;	for(var _82 in _7f){		url+="&"+_82+"="+_7f[_82];	}	if(window.api_auth_token){		url+="&auth_token="+api_auth_token;	}	if(window.auth_hash){		url+="&auth_hash="+auth_hash;	}	if(arguments.length==1){		var w=500;		var h=500;		url=window.urls._("/photos/slideshow/popup")+url;		window.open(url,"slideShowWin","width="+w+",height="+h+",top=150,left=70,scrollbars=no, status=no, resizable=no");	}	else{		var _85=document.getElementById(_80);		if(!_85){			return;		}		var bg="000000";		var w="500";		var h="500";		var _87=762;		var _88=350;		url=window.urls._m("/images/slideshow.swf")+url;		url+="&minH="+_88;		url+="&minW="+_87;		var _89="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\""+w+"\" HEIGHT=\""+h+"\" id=\"slideShowMovie\" name=\"slideShowMovie\" ALIGN=\"\"><PARAM NAME=movie VALUE=\""+url+"\"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#"+bg+"><EMBED src=\""+url+"\" quality=high bgcolor=#"+bg+" WIDTH=\""+w+"\" HEIGHT=\""+h+"\" id=\"slideShowMovie\" name=\"slideShowMovie\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT>";		_85.innerHTML=_89;		if(document.slideShowMovie&&typeof document.slideShowMovie.focus=="function"){			document.slideShowMovie.focus();		}	}}function generateSlideCode(_8a,_8b,_8c){	var url="?api_key=4a0dfd625c8ad19b1e2105ff44dc962b";	for(var _8e in _8a){		url+="&"+_8e+"="+_8a[_8e];	}	var _8f=document.getElementById(_8b);	var _90=document.getElementById(_8c);	if(!_8f||!_90){		return;	}	var bg="000000";	var w="500";	var h="500";	var _94=762;	var _95=350;	url=window.urls._m("/images/slideshow.swf")+url;	url+="&minH="+_95;	url+="&minW="+_94;	var _96="<EMBED src=\""+url+"\" quality=\"high\" bgcolor=\"#"+bg+"\" WIDTH=\""+w+"\" HEIGHT=\""+h+"\" id=\"slideShowMovie\" name=\"slideShowMovie\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED>";	var ubb="[swf]"+url+"[/swf]";	_8f.value=_96;	_90.value=ubb;}yp.ErrorInfo=new Class({	initialize:function(_98,_99){		this.error_cn="";		this.code=_99;		this.basemethod=_98.match(/\w+/g).splice(0,1).join(".");		this.extendmethod=_98.match(/\w+/g).splice(1,4).join(".");	}	,ErrorCn:function(){		if(this.code.toInt()>=96){			this.globalError();			return;		}		switch(this.basemethod){			case "groups":this.groups();			break;			case "albums":this.albums();			break;		}		return this.error_cn;	}	,groups:function(){		switch(this.extendmethod){			case "pools.add":if(this.code=="5"){				this.error_cn=lang["label_photo_limit_reached"];			}			if(this.code=="3"){				this.error_cn=lang["label_photo_already_in_pool"];			}			break;		}		return this.error_cn;	}	,globalError:function(){		switch(this.code){			case "98":this.error_cn=lang["label_login_fail"];			break;			case "105":this.error_cn=lang["label_service_unavailable"];			break;		}		return this.error_cn;	}});function innerNotice(_9a,txt,_9c){	if(!Cookie.get(_9a)){		var _9d="<div id=\""+_9a+"\" class=\""+_9c+"\">"+txt+"</div>";		document.write(_9d);		var _9e="/images/close_1.gif";		if(_9c=="notice-pop"){			_9e="/images/close_1.gif";		}		else{			if(_9c=="casual"){				_9e="/images/close_2.gif";			}		}		var _9f=new Element("img",{			"src":_9e,"alt":lang["close"]		}		).addClass("close").injectInside($(_9a));		_9f.addEvent("click",function(){			if($(_9a)){				$(_9a).remove();			}			Cookie.set(_9a,"close",{				duration:365,domain:window.app_domain			}			);		}		);	}}function innerCG(_a0,_a1,_a2){	if(!Cookie.get(_a0)){		var _a3="<div id=\"${name}\" class=\"img_cg\"><a href=\"${imghref}\"><img src=\"${imgsource}\" /></a></div>";		_a3=_a3.replace("${name}",_a0).replace("${imghref}",_a2).replace("${imgsource}",_a1);		document.write(_a3);		var _a4=new Element("img",{			"src":"/images/dismiss.gif"		}		).addClass("close_cg").injectInside($(_a0));		_a4.addEvent("click",function(){			if($(_a0)){				$(_a0).remove();			}			Cookie.set(_a0,"close",{				duration:1/48,domain:window.app_domain			}			);		}		);	}}function innerSWF(_a5,_a6,_a7,_a8,_a9){	if(!Cookie.get(_a5)){		var _aa="<div id=\"${name}\" class=\"img_cg\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"{width}\" height=\"{height}\">"+"<param name=\"movie\" value=\"${swfsource}\" />"+"<param name=\"quality\" value=\"high\" />"+"<param name=\"wmode\" value=\"opaque\" />"+"<embed wmode=\"opaque\" src=\"${swfsource}\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"{width}\" height=\"{height}\"></embed>"+"</object></div>";		_aa=_aa.replace("${name}",_a5).replace("${swfsource}",_a6).replace("${swfsource}",_a6).replace("{width}",_a8).replace("{height}",_a9).replace("{width}",_a8).replace("{height}",_a9);		document.write(_aa);		if(_a7==0){			return false;		}		var _ab=new Element("img",{			"src":"/images/dismiss.gif"		}		).addClass("close_cg").injectInside($(_a5));		_ab.addEvent("click",function(){			if($(_a5)){				$(_a5).remove();			}			Cookie.set(_a5,"close",{				duration:1/48,domain:window.app_domain			}			);		}		);	}}