$(document).ready(function(){
    //1237652875123871201293-12470234019274-023-4182-4018-23490182-34018-2390
    $("#sidebar li>a ").hover(function(){
        
        $(this).stop().animate({marginLeft : "10px"},200,"swing");},
        function(){
        $(this).stop().animate({marginLeft : "0px"},200,"swing");}
        
    );
    
    $(".navigation>.alignleft a,.single_alignleft a").hover(function(){
        $(this).stop().animate({marginLeft : "10px"},200,"swing");},
        function(){
        $(this).stop().animate({marginLeft : "0px"},200,"swing");}
        
    );
    
    
    $(".navigation>.alignright a,.single_alignright a").hover(function(){
        $(this).stop().animate({marginRight : "10px"},200,"swing");},
        function(){
        $(this).stop().animate({marginRight : "0px"},200,"swing");}
        
    );
    


});

function goTop(acceleration, time) {
	acceleration = acceleration || 0.1;
	time = time || 16;

	var dx = 0;
	var dy = 0;
	var bx = 0;
	var by = 0;
	var wx = 0;
	var wy = 0;

	if (document.documentElement) {
		dx = document.documentElement.scrollLeft || 0;
		dy = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		bx = document.body.scrollLeft || 0;
		by = document.body.scrollTop || 0;
	}
	var wx = window.scrollX || 0;
	var wy = window.scrollY || 0;

	var x = Math.max(wx, Math.max(bx, dx));
	var y = Math.max(wy, Math.max(by, dy));

	var speed = 1 + acceleration;
	window.scrollTo(Math.floor(x / speed), Math.floor(y / speed));
	if(x > 0 || y > 0) {
		var invokeFunction = "MGJS.goTop(" + acceleration + ", " + time + ")"
		window.setTimeout(invokeFunction, time);
	}
}

