/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  February 9th 2010 1:27:04 PM PST                             */
/*      Machine:  10.16.139.101                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/eyo9mgp8ge0wgg8c.pkg.js h:cczhzc81                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/eyo9mgp8ge0wgg8c.pkg.js                                   */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/eyo9mgp8ge0wgg8c.pkg.js"]); }

function thumb_arrows(obj,_L1){if(thumb_arrows.instances[obj])if(_L1){thumb_arrows.prototype.left_arrow_handlers=[];thumb_arrows.prototype.right_arrow_handlers=[];}else return thumb_arrows.instances[obj];thumb_arrows.instances[obj]=this;this.obj=obj;this.unique_id=this.obj.id.replace('thumb_arrows_','');this.left_arrow=$('thumb_arrows_left_'+this.unique_id);this.right_arrow=$('thumb_arrows_right_'+this.unique_id);this.left_arrow.onmousedown=function(){this._onmousedownarrow('left');}.bind(this);this.right_arrow.onmousedown=function(){this._onmousedownarrow('right');}.bind(this);this.left_arrow.onmouseup=function(){this._onmouseuparrow('left');}.bind(this);this.right_arrow.onmouseup=function(){this._onmouseuparrow('right');}.bind(this);}thumb_arrows.prototype.left_arrow_handlers=[];thumb_arrows.prototype.right_arrow_handlers=[];thumb_arrows.instances={};thumb_arrows.prototype._onmousedownarrow=function(_L0){if(CSS.hasClass(this[_L0+'_arrow'],'thumb_arrow_'+_L0+'_disabled'))return false;this.mouse_down=true;CSS.addClass(this[_L0+'_arrow'],'thumb_arrow_'+_L0+'_selected');this.mouseup_event=addEventBase(document.body,'mouseup',this._onmouseup.bind(this));};thumb_arrows.prototype._onmouseuparrow=function(_L0){if(CSS.hasClass(this[_L0+'_arrow'],'thumb_arrow_'+_L0+'_disabled'))return false;for(var i=0;i<this[_L0+'_arrow_handlers'].length;i++)this[_L0+'_arrow_handlers'][i](_L0);};thumb_arrows.prototype._onmouseup=function(){if(this.mouse_down==true){removeEventBase(document.body,'mouseup',this.mouseup_event);CSS.removeClass(this.right_arrow,'thumb_arrow_right_selected');CSS.removeClass(this.left_arrow,'thumb_arrow_left_selected');}};thumb_arrows.prototype.disable_arrow=function(_L0){CSS.addClass(this[_L0+'_arrow'],'thumb_arrow_'+_L0+'_disabled');};thumb_arrows.prototype.enable_arrow=function(_L0){CSS.removeClass(this[_L0+'_arrow'],'thumb_arrow_'+_L0+'_disabled');};thumb_arrows.prototype.add_click_handler=function(fn){this['left_arrow_handlers'].push(fn);this['right_arrow_handlers'].push(fn);};
function photocrop(obj,_L1){if(photocrop.instance&&photocrop.instance.old_obj==obj)return false;photocrop.destroy();photocrop.instance=this;copy_properties(this,_L1);if(this.parent_container_id)this.parent_container=$(this.parent_container_id);if(!this.parent_container){this.parent_container=obj.parentNode;this.parent_container_child=obj;}else{this.parent_container_child=this.parent_container.firstChild;if(CSS.getStyle(this.parent_container,'display')=='none'){toggle(this.parent_container);this.hide_parent_container=true;}}this.obj=document.createElement('img');this.obj.setAttribute('src',obj.src);this.obj.style.position='relative';this.obj.style.display='block';this.obj.style.margin='0px';this.obj.style.padding='0px';if(obj.width)this.obj.setAttribute('width',obj.width);if(obj.height)this.obj.setAttribute('height',obj.height);if(this.do_intro_animation){animation(this.obj).to('opacity',.4).duration(250).go();}else animation(this.obj).to('opacity',.4).duration(0).go();this.container=document.createElement('div');this.container.style.position='relative';this.container.style.padding='0px';CSS.setClass(this.container,'photocrop_container clearfix');this.loading_indicator=document.createElement('div');CSS.setClass(this.loading_indicator,'photocrop_loading');this.loading_indicator.style.display='none';this.loading_indicator.innerHTML='<table><tr><td valign="middle"><div></div><strong>'+_tx("Cropping Photo...")+'</strong></td></tr></table>';this.container.appendChild(this.loading_indicator);this.loading_indicator_bg=document.createElement('div');CSS.setClass(this.loading_indicator_bg,'photocrop_loading_bg');this.loading_indicator_bg.style.display='none';this.container.appendChild(this.loading_indicator_bg);this.container.appendChild(this.obj);this.crop_window=document.createElement('div');CSS.setClass(this.crop_window,'photocrop_window');this.crop_window_photo=document.createElement('img');this.crop_window_photo.setAttribute('src',obj.src);this.crop_window_photo.setAttribute('id','photocrop_window_image');if(obj.width)this.crop_window_photo.setAttribute('width',obj.width);if(obj.height)this.crop_window_photo.setAttribute('height',obj.height);this.crop_window.appendChild(this.crop_window_photo);this.container.appendChild(this.crop_window);this.resize_nw=document.createElement('div');CSS.setClass(this.resize_nw,'photocrop_resize photocrop_resize_nw');this.container.appendChild(this.resize_nw);this.resize_ne=document.createElement('div');CSS.setClass(this.resize_ne,'photocrop_resize photocrop_resize_ne');this.container.appendChild(this.resize_ne);this.resize_sw=document.createElement('div');CSS.setClass(this.resize_sw,'photocrop_resize photocrop_resize_sw');this.container.appendChild(this.resize_sw);this.resize_se=document.createElement('div');CSS.setClass(this.resize_se,'photocrop_resize photocrop_resize_se');this.container.appendChild(this.resize_se);this.set_handle_opacity(.5);this.obj.onclick=null;this.mousedown_event=addEventBase(this.container,'mousedown',this._mousedown.bind(this));this.keyup_event=addEventBase(document.body,'keyup',this._keyup.bind(this));this.keydown_event=addEventBase(document.body,'keydown',this._keydown.bind(this));this.old_obj=obj;hide(obj);this.parent_container.insertBefore(this.container,this.parent_container_child);this.window_x=this.default_x;this.window_y=this.default_y;this.window_width=this.default_width;this.window_height=this.default_height;this.container.style.width=this.obj.offsetWidth+'px';this.container.style.height=this.obj.offsetHeight+'px';this.handle_size=this.resize_se.offsetWidth;this.image_width=this.obj.offsetWidth;this.image_height=this.obj.offsetHeight;this.redraw();return false;}photocrop.prototype.default_width=200;photocrop.prototype.default_height=200;photocrop.prototype.min_width=200;photocrop.prototype.min_height=70;photocrop.prototype.handle_hitarea=20;photocrop.prototype.default_x=100;photocrop.prototype.default_y=100;photocrop.prototype.do_intro_animation=true;photocrop.prototype.allow_click_to_hide=true;photocrop.prototype.disable_interaction=false;photocrop.prototype.set_loading=function(_L0){if(_L0){var _L1=this.container.getElementsByTagName('div');for(var i=0;i<_L1.length;i++)if(CSS.hasClass(_L1[i],'photocrop_resize'))hide(_L1[i]);this.disable_interaction=true;show(this.loading_indicator);animation(this.loading_indicator_bg).from('opacity',0).to('opacity',.5).duration(200).show().go();}else{var _L1=this.container.getElementsByTagName('div');for(var i=0;i<_L1.length;i++)if(CSS.hasClass(_L1[i],'photocrop_resize'))show(_L1[i]);this.disable_interaction=false;hide(this.loading_indicator);hide(this.loading_indicator_bg);}};photocrop.prototype.set_handle_opacity=function(_L0,_L1){if(_L1){animation(this.resize_nw).to('opacity','0.5').duration(250).go();animation(this.resize_ne).to('opacity','0.5').duration(250).go();animation(this.resize_sw).to('opacity','0.5').duration(250).go();animation(this.resize_se).to('opacity','0.5').duration(250).go();}else{CSS.setOpacity(this.resize_nw,_L0);CSS.setOpacity(this.resize_ne,_L0);CSS.setOpacity(this.resize_sw,_L0);CSS.setOpacity(this.resize_se,_L0);}};photocrop.prototype.redraw=function(){if((this.window_x+this.window_width)>this.image_width)this.window_x=this.image_width-this.window_width;if(this.window_x<0)this.window_x=0;if((this.window_y+this.window_height)>this.image_height)this.window_y=this.image_height-this.window_height;if(this.window_y<0)this.window_y=0;this.crop_window.style.width=this.window_width+'px';this.crop_window.style.height=this.window_height+'px';this.crop_window.style.left=this.window_x+'px';this.crop_window.style.top=this.window_y+'px';this.crop_window_photo.style.left=(-1*this.window_x)+'px';this.crop_window_photo.style.top=(-1*this.window_y)+'px';this.resize_se.style.left=this.window_x+this.window_width-(this.handle_size/2)+'px';this.resize_se.style.top=this.window_y+this.window_height-(this.handle_size/2)+'px';this.resize_sw.style.left=this.window_x-(this.handle_size/2)+'px';this.resize_sw.style.top=this.window_y+this.window_height-(this.handle_size/2)+'px';this.resize_ne.style.left=this.window_x+this.window_width-(this.handle_size/2)+'px';this.resize_ne.style.top=this.window_y-(this.handle_size/2)+'px';this.resize_nw.style.left=this.window_x-(this.handle_size/2)+'px';this.resize_nw.style.top=this.window_y-(this.handle_size/2)+'px';};photocrop.prototype.hitTest=function(_L0,_L1,_L2,_L3,x,y){if(x>_L0&&x<(_L0+_L2)&&y>_L1&&y<(_L1+_L3))return true;};photocrop.prototype._keyup=function(_L0){this.last_key=_L0?_L0.keyCode:-1;if(this.key_down==this.last_key)this.key_down=0;if(this.last_key==16)this.lock_square=false;};photocrop.prototype._keydown=function(_L0){this.key_down=this.last_key=_L0?_L0.keyCode:-1;if(this.key_down==16)this.lock_square=true;};photocrop.prototype._prevent_default=function(_L0){if(_L0.preventDefault){_L0.preventDefault();}else _L0.returnValue=false;};photocrop.prototype._mousedown=function(_L0){this._prevent_default(_L0);if(this.disable_interaction)return false;this.mouse_down=true;this.mousemove_event=addEventBase(document.body,'mousemove',this._mousemove.bind(this));this.mouseup_event=addEventBase(document.body,'mouseup',this._mouseup.bind(this));this.originX=Vector2.getEventPosition(_L0).x;this.originY=Vector2.getEventPosition(_L0).y;this.originWindowX=this.window_x;this.originWindowY=this.window_y;this.originWindowWidth=this.window_width;this.originWindowHeight=this.window_height;var _L1=elementX(this.container)+this.window_x;var _L2=elementY(this.container)+this.window_y;var _L3=this.crop_window.offsetWidth;var _L4=this.crop_window.offsetHeight;var _L5=this.handle_hitarea/2;if(this.originX>_L1-_L5&&this.originX<_L1+_L5&&this.originY>_L2-_L5&&this.originY<_L2+_L5){this.resize_corner=1;this.set_handle_opacity(1);return false;}if(this.originX>_L1+_L3-_L5&&this.originX<_L1+_L3+_L5&&this.originY>_L2-_L5&&this.originY<_L2+_L5){this.resize_corner=2;this.set_handle_opacity(1);return false;}if(this.originX>_L1+_L3-_L5&&this.originX<_L1+_L3+_L5&&this.originY>_L2+_L4-_L5&&this.originY<_L2+_L4+_L5){this.resize_corner=3;this.set_handle_opacity(1);return false;}if(this.originX>_L1-_L5&&this.originX<_L1+_L5&&this.originY>_L2+_L4-_L5&&this.originY<_L2+_L4+_L5){this.resize_corner=4;this.set_handle_opacity(1);return false;}if(this.hitTest(_L1,_L2,_L3,_L4,this.originX,this.originY)){this.drag_window=true;this.set_handle_opacity(1);}else{this.mouse_down=false;if(this.allow_click_to_hide)animation(this.obj).to('opacity',1).duration(200).ondone(function(){this.destroy();}.bind(this)).go();}this._prevent_default(_L0);return false;};photocrop.prototype._mousemove=function(_L0){if(!this.mouse_down)return false;var _L1=Vector2.getEventPosition(_L0).x-this.originX;var _L2=Vector2.getEventPosition(_L0).y-this.originY;var _L3=this.container.offsetWidth;var _L4=this.container.offsetHeight;if(this.resize_corner>=1){if(this.resize_corner==1){var _L5=this.originWindowX+this.originWindowWidth;var _L6=this.originWindowX+_L1;if(_L6<0)_L6=0;if(_L5-_L6<this.min_width){this.window_x=_L5-this.min_width;this.window_width=this.min_width;}else{this.window_x=_L6;this.window_width=_L5-_L6;}var _L5=this.originWindowY+this.originWindowHeight;var _L6=this.originWindowY+_L2;if(_L6<0)_L6=0;if(_L5-_L6<this.min_height){this.window_y=_L5-this.min_height;this.window_height=this.min_height;}else{this.window_y=_L6;this.window_height=_L5-_L6;}}if(this.resize_corner==2){if(this.originWindowWidth+_L1<this.min_width){this.window_width=this.min_width;this.window_x=this.originWindowX;}else{this.window_width=this.originWindowWidth+_L1;this.window_x=this.originWindowX;}if(this.originWindowX+this.originWindowWidth+_L1>_L3){this.window_width=_L3-this.originWindowX;this.window_x=this.originWindowX;}var _L5=this.originWindowY+this.originWindowHeight;var _L6=this.originWindowY+_L2;if(_L6<0)_L6=0;if(_L5-_L6<this.min_height){this.window_y=_L5-this.min_height;this.window_height=this.min_height;}else{this.window_y=_L6;this.window_height=_L5-_L6;}}if(this.resize_corner==3){if(this.originWindowWidth+_L1<this.min_width){this.window_width=this.min_width;this.window_x=this.originWindowX;}else{this.window_width=this.originWindowWidth+_L1;this.window_x=this.originWindowX;}if(this.originWindowX+this.originWindowWidth+_L1>_L3){this.window_width=_L3-this.originWindowX;this.window_x=this.originWindowX;}if(this.originWindowHeight+_L2<this.min_height){this.window_height=this.min_height;this.window_y=this.originWindowY;}else{this.window_height=this.originWindowHeight+_L2;this.window_y=this.originWindowY;}if(this.originWindowY+this.originWindowHeight+_L2>_L4){this.window_height=_L4-this.originWindowY;this.window_y=this.originWindowY;}}if(this.resize_corner==4){var _L5=this.originWindowX+this.originWindowWidth;var _L6=this.originWindowX+_L1;if(_L6<0)_L6=0;if(_L5-_L6<this.min_width){this.window_x=_L5-this.min_width;this.window_width=this.min_width;}else{this.window_x=_L6;this.window_width=_L5-_L6;}if(this.originWindowHeight+_L2<this.min_height){this.window_height=this.min_height;this.window_y=this.originWindowY;}else{this.window_height=this.originWindowHeight+_L2;this.window_y=this.originWindowY;}if(this.originWindowY+this.originWindowHeight+_L2>_L4){this.window_height=_L4-this.originWindowY;this.window_y=this.originWindowY;}}this.redraw();}if(this.drag_window==true){if(this.originWindowX+_L1+this.window_width>_L3){this.window_x=_L3-this.window_width;}else if(this.originWindowX+_L1<0){this.window_x=0;}else this.window_x=this.originWindowX+_L1;if(this.originWindowY+_L2+this.window_height>_L4){this.window_y=_L4-this.window_height;}else if(this.originWindowY+_L2<0){this.window_y=0;}else this.window_y=this.originWindowY+_L2;this.redraw();}this._prevent_default(_L0);return false;};photocrop.prototype._mouseup=function(_L0){this._prevent_default(_L0);if(this.mouse_down==true){this.set_handle_opacity(.5,true);removeEventBase(document.body,'mousemove',this.mousemove_event);removeEventBase(document.body,'mouseup',this.mouseup_event);this.mouse_down=false;this.drag_window=false;this.resize_corner=false;this.container.style.cursor='auto';}return false;};photocrop.prototype.get_dimensions=function(){var _L0={};_L0['x']=this.window_x;_L0['y']=this.window_y;_L0['width']=this.window_width;_L0['height']=this.window_height;return _L0;};photocrop.prototype.destroy=function(){this.cleanup_events();this.parent_container.removeChild(this.container);if(this.hide_parent_container==true)toggle(this.parent_container);show(this.old_obj);this.container=null;delete photocrop.instance;};photocrop.prototype.cleanup_events=function(){if(this.mouseup_event){removeEventBase(document.body,'mouseup',this.mouseup_event);this.mouseup_event=null;}if(this.mousedown_event){removeEventBase(this.container,'mousedown',this.mousedown_event);this.mousedown_event=null;}if(this.mousemove_event){removeEventBase(document.body,'mousemove',this.mousemove_event);this.mousemove_event=null;}if(this.keyup_event){removeEventBase(document.body,'keyup',this.keyup_event);this.keyup_event=null;}if(this.keydown_event){removeEventBase(document.body,'keydown',this.keydown_event);this.keydown_event=null;}};photocrop.destroy=function(_L0){if(photocrop.instance)photocrop.instance.destroy(_L0);};function photo_to_profile(obj,_L1){if(photocrop.instance&&photocrop.instance.old_obj==obj)return false;this.photocrop_instructions=$N('div',{className:'clearfix hidden_elem',id:'photocrop_instructions'});var _L2=$N('div',{className:'photocrop_buttons'});this.done_button=$N('input',{type:'button',className:'inputbutton',value:_tx("Finished cropping")});this.cancel_button=$N('input',{type:'button',className:'inputbutton inputaux',value:_tx("Cancel")});this.done_button_listener=this.done_button.listen('click',function(){this.done_cropping();}.bind(this));this.cancel_button_listener=this.cancel_button.listen('click',function(){photocrop.destroy();});_L2.setContent([this.done_button,this.cancel_button]);var _L3=$N('div',{className:'photocrop_status_message'},_tx("Drag the corners of the transparent box below to crop this photo into your Profile picture."));this.photocrop_instructions.setContent([_L2,_L3]);$('photoborder').prependContent(this.photocrop_instructions);copy_properties(this,_L1);if(ge('photocrop_error'))hide(ge('photocrop_error'));if(obj.offsetWidth<=200||obj.offsetHeight<=200||this.no_cropping){this.crop_dialog_box();return;}if(window['PhotoPageTags'])PhotoPageTags.hideTaggingUI();this.photocrop_instructions.removeClass('hidden_elem');var _L4=elementY(this.photocrop_instructions)-5;if(Vector2.getScrollPosition().y>_L4){animation(DOMScroll.getScrollRoot()).to('scrollTop',_L4).ease(animation.ease.both).duration(500).ondone(function(){this.build(obj,_L1);}.bind(this)).go();}else this.build(obj,_L1);}photo_to_profile.extend('photocrop');photo_to_profile.prototype.build=function(obj,_L1){this.parent.construct(this,obj,_L1);var _L2=PhotoTag.tagsForPhoto(this.pid,this.photo_owner);for(var i=0;i<_L2.length;i++)if(_L2[i].getTaggeeId()==this.uid){var _L4=_L2[i].absoluteCenter(this.image_width,this.image_height);this.window_x=Math.round(_L4.x)-(this.window_width/2);this.window_y=Math.round(_L4.y)-(this.window_height/2);this.redraw();break;}};photo_to_profile.prototype.crop_dialog_box=function(){var _L0=(this.type=='profile')?_tx("Do you want to make this your profile picture?"):_tx("Do you want to make this {page_name}'s profile picture?",{page_name:this.page_name});new Dialog().setTitle(_tx("Select as your Profile picture")).setBody(_L0).setButtons([Dialog.newButton('ok',_tx("OK"),'',bind(null,dynamic_post,this.upload_server+'pic_upload.php',{id:this.photo_owner,pid:this.pid,type:this.type,profile_pic_id:this.profile_pic_id})),Dialog.CANCEL]).show();};photo_to_profile.prototype.done_cropping=function(){var _L0=this.get_dimensions();var _L1={};for(var k in _L0)_L1[k]=_L0[k];_L1['pid']=this.pid;_L1['owner']=this.photo_owner;_L1['id']=this.profile_pic_id;_L1['return']='profile.php?id='+this.profile_pic_id;_L1['error_return']='photo.php?pid='+this.pid+'&id='+this.photo_owner;this.done_button.disabled=true;this.set_loading(true);dynamic_post(this.upload_server+'crop_profile_pic.php',_L1);};photo_to_profile.prototype.destroy=function(_L0){this.parent.destroy();this.done_button_listener.remove();this.cancel_button_listener.remove();if(_L0){this.instructions_container=document.createElement('div');this.photocrop_instructions.parentNode.insertBefore(this.instructions_container,this.photocrop_instructions);this.instructions_container.appendChild(this.photocrop_instructions);_L0(this.instructions_container).to('height',0).blind().hide().duration(500).ondone(function(){this.photocrop_instructions.remove();this.instructions_container.parentNode.removeChild(this.instructions_container);}.bind(this)).go();}else this.photocrop_instructions.remove();return false;};
function photocrop_rooster(_L0){if(photocrop_rooster.instance)if(_L0['suggestee']){photocrop.destroy();}else return photocrop_rooster.instance;this.rooster_image_element=$(_L0['image']);this.rooster_photocrop_button=ge(_L0['button'])||DOM.find(ge('pop_content'),'input.'+_L0['button']);this.rooster_photocrop_button.onclick=function(){this.button_handler();}.bind(this);_L0.do_intro_animation=false;_L0.allow_click_to_hide=false;this.photocrop_properties=_L0;this.rooster_photos=_L0['rooster_photos'];this.upload_server=_L0['upload_server'];if(_L0['suggestee'])this.suggestee=_L0['suggestee'];if(_L0['thumb_arrows']&&ge(_L0['thumb_arrows'])){this.thumb_arrows=new thumb_arrows($(_L0['thumb_arrows']),true);this.thumb_arrows.add_click_handler(this.change_photo.bind(this));}this.rooster_current_photo_i=0;this.rooster_current_photo=this.rooster_photos[this.rooster_current_photo_i];this.setup_photo();photocrop_rooster.instance=this;return this;}photocrop_rooster.instance=null;photocrop_rooster.prototype.setup_photo=function(){this.rooster_image_element.src=this.rooster_photos[this.rooster_current_photo_i]['url_large'];this.rooster_image_element.height=this.rooster_photos[this.rooster_current_photo_i]['new_height'];this.rooster_image_element.width=this.rooster_photos[this.rooster_current_photo_i]['new_width'];if(this.rooster_photos[this.rooster_current_photo_i]&&this.rooster_photos[this.rooster_current_photo_i].photocrop_instance)return;var _L0={};if(this.rooster_current_photo.ratio!=1){_L0.window_width=Math.round(200*this.rooster_current_photo.ratio);_L0.min_width=_L0.window_width;_L0.window_height=Math.round(300*this.rooster_current_photo.ratio);_L0.min_height=Math.round(200/3*this.rooster_current_photo.ratio);}else{_L0.window_width=200;_L0.window_height=300;_L0.min_height=Math.round(200/3);_L0.min_width=200;}if(this.rooster_current_photo['user_tag']){_L0.window_x=Math.round(this.rooster_current_photo.new_width*(this.rooster_current_photo.user_tag.x/100))-(_L0.window_width/2);_L0.window_y=Math.round(this.rooster_current_photo.new_height*(this.rooster_current_photo.user_tag.y/100))-(_L0.window_height/2);}if(this.thumb_arrows){if(this.rooster_current_photo_i==0){this.thumb_arrows.disable_arrow('left');}else this.thumb_arrows.enable_arrow('left');if(this.rooster_current_photo_i==this.rooster_photos.length-1){this.thumb_arrows.disable_arrow('right');}else this.thumb_arrows.enable_arrow('right');}this.rooster_photos[this.rooster_current_photo_i].photocrop_instance=new photocrop(this.rooster_image_element,this.photocrop_properties);copy_properties(this.rooster_photos[this.rooster_current_photo_i].photocrop_instance,_L0);this.rooster_photos[this.rooster_current_photo_i].photocrop_instance.redraw();};photocrop_rooster.prototype.change_photo=function(_L0){photocrop.destroy();this.rooster_photos[this.rooster_current_photo_i].photocrop_instance=null;if(_L0=='right'){this.rooster_current_photo_i=this.rooster_current_photo_i+1;}else this.rooster_current_photo_i=this.rooster_current_photo_i-1;this.rooster_current_photo=this.rooster_photos[this.rooster_current_photo_i];this.setup_photo();};photocrop_rooster.prototype.button_handler=function(){this.rooster_photos[this.rooster_current_photo_i].photocrop_instance.set_loading(true);this.rooster_photocrop_button.disabled=true;if(this.thumb_arrows){this.thumb_arrows.disable_arrow('left');this.thumb_arrows.disable_arrow('right');}this.do_form_post();};photocrop_rooster.prototype.do_form_post=function(){var _L0=this.rooster_photos[this.rooster_current_photo_i].photocrop_instance.get_dimensions();var _L1={};for(var k in _L0)_L1[k]=Math.round(_L0[k]/this.rooster_current_photo.ratio);_L1['pid']=this.rooster_current_photo.pid;_L1['owner']=this.rooster_current_photo.owner;_L1['return']='profile.php';_L1['error_return']='home.php';_L1['rooster_photo_count']=this.rooster_photos.length;_L1['upload_type']=this.upload_type;var _L3;if(this.suggestee){_L1['suggestee']=this.suggestee;_L1['return']='/ajax/profile/picture/upload_iframe.php';_L1['post_form_id']=$('post_form_id').value;_L1['fb_dtsg']=$('fb_dtsg').value;_L3='profileiframe';}dynamic_post(this.upload_server+'crop_profile_pic.php',_L1,_L3);};

if (window.Bootloader) { Bootloader.done(["js\/eyo9mgp8ge0wgg8c.pkg.js"]); }