/* 
cursor following menu 
created by malihu [http://manos.malihu.gr | manos@malihu.gr]
*/

//cache vars
$menu=$("#fondo_cuadros");

$(window).load(function() {
	MoveMenu();
	
	function MouseMove(e){
		var posY=e.pageY+$menu_cursor_space_Y;
		var posX=e.pageX+$menu_cursor_space_X;
		$menu.stop().animate({top:posY ,left:posX}, $menu_following_speed,$menu_following_easing);		
	}
	
	function MoveMenu(){
		$("body").bind("mousemove", function(event){
			MouseMove(event);
		});
	}
	
});
	
//animate page
function Animate2id(id2Animate){
	var animSpeed=1500; //animation speed
    var easeType="easeInOutExpo"; //easing type
    if($.browser.webkit){ //webkit browsers do not support animate-html
        $("#page").stop().animate({scrollTop: $(id2Animate).offset().top}, animSpeed, easeType);
    } else {
        $("#page").stop().animate({scrollTop: $(id2Animate).offset().top}, animSpeed, easeType);
    }
}

