﻿var name = "#floatMenu";  
var menuYloc = null;  
var getScrollTopvalue = null;
  
jQuery(document).ready(function(){  
    menuYloc = parseInt(jQuery(name).css("top").substring(0,jQuery(name).css("top").indexOf("px")))
	



    jQuery(window).scroll(function () {  
 
        var offset = menuYloc+jQuery(document).scrollTop() - 330 + "px";


 function getScrollTop(){
    if(typeof pageYOffset!= 'undefined'){
        //most browsers
        return pageYOffset;
    }
    else{
        var B= document.body; //IE 'quirks'
        var D= document.documentElement; //IE with doctype
        D= (D.clientHeight)? D: B;
        return D.scrollTop;
    }

}


getScrollTopvalue = getScrollTop()

//alert(getScrollTopvalue)





if (getScrollTopvalue > '320') {

	//alert('asdasd');

        jQuery(name).animate({top:offset},{duration:1000,queue:false});  
}




    });  











});  

