$(window).load(function(){ var $wall = $('#content'); $wall.masonry({ itemSelector: '#post, #twitter, #pagination', columnWidth: 230 }); $wall.infinitescroll({ navSelector : ".nav", nextSelector : ".nav a", itemSelector : "#post", behavior : 'twitter', extraScrollPx: 50, bufferPx : 5000, loadingImg : "", loadingText : "", loading : "", donetext : "" }, function( newElements ) { var $newElems = $( newElements ).css({ opacity: 0 }); $newElems.imagesLoaded(function(){ $newElems.animate({ opacity: 1 }); $wall.masonry( "appended", $newElems, true ); }); $('.audio').each(function(){ var audioID = $(this).attr("id"); var $audioPost = $(this); $.ajax({ url: 'http://ohmyjenga.tumblr.com/api/read/json?id=' + audioID, dataType: 'jsonp', timeout: 50000, success: function(data){ $audioPost.find('#audio_player_'+audioID).replaceWith('
' + data.posts[0]['audio-player'].replace("audio_player.swf", "audio_player_black.swf") +'
');} }); }); }); $(document).load(function(){ e.preventDefault(); $wall.infinitescroll('retrieve'); }); $('#load').click(function(){ $(document).trigger('retrieve.infscr'); return false; }); }); $(document).ready(function() { $('#xtr_spc, #xtr_spc_twitter').stickyScroll({ container: '#container' }); }); jQuery(function($){ $("#feed").tweet({ username: "", count: "5" }); }); $('.blogroll').click(function(){ $('#blogroll').show(); $('#content').hide(); }); $('#close').click(function(){ $('#content').show(); $('#blogroll').hide(); });