//Menu Init jQuery(document).ready(function(){ jQuery('ul.sf-menu').superfish(); }); // Only use jQuery if the website already makes extensive use of it! jQuery(document).ready(function() { jQuery('.post').one('mouseenter', function() { Socialite.load(jQuery(this)[0]); }); }); jQuery(document).ready(function(){ // hide #back-top first jQuery("#back-top").hide(); // fade in #back-top jQuery(function () { jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 100) { jQuery('#back-top').fadeIn(); } else { jQuery('#back-top').fadeOut(); } }); // scroll body to 0px on click jQuery('#back-top a').click(function () { jQuery('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); }); //Post Tab jQuery(document).ready(function() { jQuery('#leadbutton2').addClass('current'); }); jQuery(window).load(function() { jQuery('#popular').hide(); }); function show_popular(c){ jQuery('#popular').fadeIn(); jQuery(c).addClass('current'); jQuery('#leadbutton2').removeClass('current'); jQuery('#recent').hide(); return false; } function show_recent(c){ jQuery('#recent').fadeIn(); jQuery('#recent').show(); jQuery(c).addClass('current'); jQuery('#leadbutton1').removeClass('current'); jQuery('#popular').hide(); return false; } //Social Icon Tab (function(jQuery){ jQuery(document).ready(function(){ jQuery('#popular').hide(); jQuery("#style-switcher h2 a").click(function(e){ e.preventDefault(); var div = jQuery("#style-switcher"); console.log(div.css("right")); if (div.css("right") === "-61px") { jQuery("#style-switcher").animate({ right: "0px" }); } else { jQuery("#style-switcher").animate({ right: "-61px" }); } }); }); })(this.jQuery);