jQuery.noConflict(); (function($) { function callOnDomReady() { $(document) .ready( function() { $("#sidebar > a") .hover(function() { $("img", this).stop().fadeTo(500, 1); }, function() { $("img", this).stop().fadeTo(500, 0.6); }); $.getDocHeight = function() { return Math.max( $(document).height(), $(window).height(), /* For opera: */ document.documentElement.clientHeight ); }; $('ul.download li a').click(function() { ga('send', 'event', 'download', 'click', $(this).attr('href')); }); }); } $(callOnDomReady); })(jQuery);