/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  February 9th 2010 2:40:29 PM PST                             */
/*      Machine:  10.16.140.103                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/dbuuenho9q0w0cw0.pkg.js h:ei408fcy                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/dbuuenho9q0w0cw0.pkg.js                                   */

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

function LikeController(){}copy_properties(LikeController,{saveChangeLike:function(_L0,_L1,_L2){var _L3=_L0.target_fbid;var _L4={feedback_params:JSON.encode(_L0),should_delete:!_L1,check_hash:_L2};LikeController.informChangeLike(_L3,_L1);var _L5=bind(null,LikeController.changeLikeResponse,_L3,_L1);new AsyncRequest().setURI('/ajax/like/like.php').setData(_L4).setHandler(_L5).setErrorHandler(_L5).send();},changeLikeResponse:function(_L0,_L1,_L2){if(_L2.isReplay())LikeController.informChangeLike(_L0,_L1);if(_L2.getError()){if(!_L2.getErrorIsWarning())LikeController.informChangeLike(_L0,!_L1);ErrorDialog.showAsyncError(_L2);}else LikeController.informUpdateState(_L0,{payload:_L2.payload});},informChangeLike:function(_L0,_L1){LikeController.informUpdateState(_L0,{exists:_L1});},informUpdateState:function(_L0,_L1){Arbiter.inform('like/update/'+_L0,_L1);}});function LikeComponent(_L0,_L1,_L2){copy_properties(this,{feedback_params:_L0,exists:_L1,container_id:_L2,container:null});Arbiter.subscribe('like/update/'+_L0.target_fbid,this.updateState.bind(this));}copy_properties(LikeComponent.prototype,{updateState:function(_L0,_L1){if(!this.init())return;this._updateState(_L1);},_hasMarkup:function(_L0){if(_L0){return (DOM.scry(this.sentence_container,'div.like_component_exists')[0]!=null);}else return (DOM.scry(this.sentence_container,'div.like_component_not_exists')[0]!=null);},_updateState:function(_L0){if(typeof _L0.exists!='undefined')this._updateLikeState(_L0.exists);if(typeof _L0.payload!='undefined'&&!this._hasMarkup(_L0.payload.disp_exists))this._updatePayload(_L0.payload);},_updatePayload:function(_L0){this.init();},_updateLikeState:function(_L0){if(_L0==this.exists)return;this.exists=_L0;this.updateClasses();},init:function(){if(!this.container)this.container=ge(this.container_id);return !!this.container;},updateClasses:function(){CSS.conditionClass(this.container,'like_exists',this.exists);CSS.conditionClass(this.container,'like_not_exists',!this.exists);},_updateContent:function(_L0,_L1,_L2,_L3){_L2=HTML(_L2);_L3=HTML(_L3);if(_L0&&_L2!=_L0.innerHTML)DOM.setContent(_L0,_L2);if(_L1&&_L3!=_L1.innerHTML)DOM.setContent(_L1,_L3);}});function LikeLink(_L0,_L1,_L2){this.parent.construct(this,_L0,_L1,_L2);}LikeLink.extend('LikeComponent');
function motion_show_embed_video_dialog(_L0){var _L1=new AsyncRequest().setURI('/ajax/video/embed.php').setData({v:_L0});new Dialog().setClassName('video_embed_dialog').setAsync(_L1).show();}
function VideoQualityController(_L0,_L1,_L2,_L3,_L4){this.video=document[_L2]||window[_L2];this.highqual_is_on=_L3;this.video_is_playing=false;this.is_enabled=true;this.is_permalink=_L4;VideoQualityController.instance=this;if(this.is_permalink){this.highqual_element=$(_L0);this.highqual_element.listen('click',this.toggle_hq.bind(this));this.lowqual_element=$(_L1);this.lowqual_element.listen('click',this.toggle_hq.bind(this));this.player_container=$('player');this.video_info=$('video_info');}else this.player_container=Dialog.getCurrent()._popup;}VideoQualityController.getInstance=function(){return VideoQualityController.instance;};VideoQualityController.prototype.toggle_hq=function(){this.highqual_is_on=!this.highqual_is_on;if(this.is_enabled){this.hq_disable();this.video.toggleHQ();}return false;};VideoQualityController.prototype.hq_disable=function(){this.is_enabled=false;};VideoQualityController.prototype.hq_enable=function(_L0){if(!this.is_enabled)if(this.highqual_is_on!=_L0){this.video.toggleHQ();return;}this.is_enabled=true;};VideoQualityController.prototype.resize_player=function(_L0,_L1){if(this.is_permalink){this.player_container.style.width=_L0+'px';this.player_container.style.height=_L1+'px';this.toggle_ui();}else this.player_container.style.width=(parseInt(_L0)+22)+'px';this.video.style.width=_L0+'px';this.video.style.height=_L1+'px';};VideoQualityController.prototype.toggle_ui=function(){CSS.toggleClass(this.highqual_element,'hidden_elem');CSS.toggleClass(this.lowqual_element,'hidden_elem');CSS.toggleClass(this.video_info,'info_bottom');CSS.toggleClass(this.video_info,'info_right');};
function motion_permalink_typeahead_onsubmit(){return false;}function motion_permalink_typeahead_onselect(_L0){if(!_L0.i)return;this.clear();motion_permalink_add_tag(this.video_id,_L0.i);}function motion_permalink_add_tag(_L0,_L1){if(!_L1)return;new AsyncRequest().setURI('/ajax/motion.php').setData({add_tag:true,v:_L0,u:_L1}).setHandler(function(_L2){set_inner_html($('tag_zone'),_L2.getPayload());}).send();}function motion_permalink_remove_tag_request(_L0,_L1){new AsyncRequest().setURI('/ajax/motion.php').setData({remove_request:true,v:_L0,u:_L1}).setHandler(function(_L2){set_inner_html($('tag_zone'),_L2.getPayload());}).send();}function motion_video_delete_tag(_L0,uid,obj){new AsyncRequest().setURI('/ajax/motion.php').setData({delete_tag:true,u:uid,v:_L0}).setHandler(function(_L3){obj.innerHTML=_L3.getPayload();}).send();return false;}function motion_rotate_video(_L0,_L1){new AsyncRequest().setURI('/ajax/motion.php').setData({v:_L0,rotate:_L1}).setFinallyHandler(function(_L2){$('rotate_wait').style.display='none';$('rotate_links').style.display='';}).send();$('rotate_links').style.display='none';$('rotate_wait').style.display='';}function motion_tag_video(){var _L0=$('tagger');CSS.toggleClass(_L0,'tagger_inactive');$('tagger_input').focus();}function motion_hide_tagger(){var _L0=$('tagger');CSS.toggleClass(_L0,'tagger_inactive');}

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