var stub_showing = false; $j = jQuery.noConflict(true); function woahbar_show() { if(stub_showing) { $j('.woahbar-stub').slideUp('fast', function() { $j('.woahbar').show('bounce', { times:3, distance:15 }, 300); $j('body').animate({"marginTop": "32px"}, 300); }); } else { $j('.woahbar').show('bounce', { times:3, distance:15 }, 500); $j('body').animate({"marginTop": "32px"}, 250); } } function woahbar_hide() { $j('.woahbar').slideUp('fast', function() { $j('.woahbar-stub').show('bounce', { times:3, distance:15 }, 100); stub_showing = true; }); if( $j(window).width() > 1024 ) { $j('body').animate({"marginTop": "0px"}, 250); // if width greater than 1024 pull up the body } } $j().ready(function() { window.setTimeout(function() { woahbar_hide(); }, 0); });