(function(a){SimpleSlideshow=function(b,c){this.init(b,c)};a.extend(SimpleSlideshow.prototype,{options:{initialized:false,pictureChanged:false},init:function(b,c){this.options=a.extend({},this.options,c);this.images=b;this.count=b.length;this.currentIndex=0;if(this.options.initialized){this.options.initialized.call(this,this.images)}},next:function(){this.currentIndex=(this.currentIndex+1)%this.count;this.updatePicture()},prev:function(){this.currentIndex=(this.currentIndex+(this.count-1))%this.count;this.updatePicture()},index:function(b){this.currentIndex=b;this.updatePicture()},updatePicture:function(){if(this.options.pictureChanged){this.options.pictureChanged.apply(this,[this.images[this.currentIndex],{index:this.currentIndex,count:this.count}])}},reset:function(b){this.images=b;this.count=b.length;this.currentIndex=0},peek:function(c){var b=(this.currentIndex+(this.count+c))%this.count;return{url:this.images[b],index:b}}})})(jQuery);(function(c,b){var a=c.Profile={};b.extend(a,{init:function(){var e=550;var d=b("#profile_description");b(".social_connections_and_reviews").delegate(".more-review-link","click",function(g){var f=b(this).parent();f.html(f.attr("data-full-review"));g.preventDefault()});b(".social_connections a.view_all").click(function(){b("ul.social-connections-list").css({"max-height":"none",overflow:"visible"});b(this).hide()});if(d.height()>e){d.addClass("truncated");d.css("height",e);d.append('<a class="show_more" href="javascript:void(0);">'+d.attr("data-more")+"</a>");d.find(".show_more").one("click",function(f){b(this).remove();d.css("height","");d.removeClass("truncated");f.preventDefault()})}}});b(document).ready(a.init)})(Airbnb,jQuery);(function(b,a){a.OpenGraph=(function(){var c={};c.init=function(e,d){b("#open-graph-button-yes").click(function(){b.colorbox.close();if(a.userAttributes.open_graph_publish_setting===null){a.userAttributes.open_graph_publish_setting=true;b.post("/favorites/open_graph_setting",{allow:"true"})}a.OpenGraph.doWithPermission(function(){e(d)})});b("#open-graph-button-skip").click(function(){b.colorbox.close();return false});b("#open-graph-button-no").click(function(){b.colorbox.close();a.userAttributes.open_graph_publish_setting=false;b.post("/favorites/open_graph_setting",{allow:"false"});return false})};c.sendFavoriteToFacebook=function(d){b('<span id="" style="font-size: 10px; color: gray; position: absolute;margin: -17px 0 0 27px; width:200px">Added to your Facebook Timeline!</span>').hide().appendTo("#star_"+d).fadeIn(100).delay(3000).fadeOut(1000);b.post("/open_graph_actions",{access_token:FB.getAccessToken(),action_type:"favorite",hosting_id:d},function(){})};c.deleteFavoriteFromFacebook=function(d){b('<span id="" style="font-size: 10px; color: gray; position: absolute;margin: -17px 0 0 27px; width:200px">Deleted from your Facebook Timeline.</span>').hide().appendTo("#star_"+d).fadeIn(100).delay(3000).fadeOut(1000);b.ajax({type:"POST",data:{access_token:FB.getAccessToken(),action_type:"favorite",_method:"delete"},url:"/open_graph_actions/"+d,dataType:"json",success:function(e){}})};c.doWithPermission=function(f,d){if(a.Utils.fbHasPublishAction){f(d)}else{var e={};e.scope="publish_actions";FB.login(function(){FB.api({method:"fql.query",query:"SELECT publish_actions FROM permissions WHERE uid = me()"},function(g){a.Utils.fbHasPublishAction=(g!==undefined&&g[0]&&g[0]["publish_actions"]==="1");if(a.Utils.fbHasPublishAction){f(d)}})},e)}};return c})()})(jQuery,window.Airbnb||{});
