$(document).ready(function(){$(window).scroll(function(){if($("#header").offset().top>50){$(".sc").addClass("stk_mz");$('#header').stop().animate({top:'-10px'},150,'easeOutQuad');$('#header').css({'border-width':'0px'});$('#header .logo').stop().animate({marginTop:'0px'},250,'easeOutQuad');$('.stk_mz').stop().animate({opacity:'1'},200,'easeOutQuad')}else{$('#header').stop().animate({top:'0px'},150,'easeOutQuad');$('#header').css({'border-width':'1px'});$('#header .logo').stop().animate({marginTop:'0px'},250,'easeOutQuad');$('.stk_mz').stop().animate({opacity:'0'},100,'easeOutQuad')}})}); $(function(){$.fn.goTop=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="0"){$(this).stop().fadeIn(500)}var a=$(this);$(window).scroll(function(){if($(window).scrollTop()=="0"){$(a).fadeOut(150)}else{$(a).fadeIn(300)}});$(this).click(function(){$("html, body").animate({scrollTop:0},"1000")})}});$(function(){$("#gotop").goTop()});