// JavaScript Document
$(document).ready(function(){
//TOP OF PAGE NAVIGATION
$(window).scroll( function(){ handlescroll();}); 
	
});

//TOP OF PAGE NAVIGATION 492
	function handlescroll(){	
	
		if ($(window).scrollTop()>492 && $(window).scrollLeft()==0 && $("#slide").height()+30<$(window).height()){
			$("#slide").css({"top":-0+"px", "position":"fixed"});
			/*if($(".pagetop").length==0) {
                $("#slide ul:subCategoryList").append("<li><a class=\"subCategoryLink\" href=\"#\">Top of page</a></li>"); 
                $(".pagetop a").fadeIn(500).click(function(){$(window).scrollTop(0);});
            }*/
		} 
		else { 
			$("#slide").css({"top":"0px", "position":"static"});
			/*$(".pagetop").slideUp(492, function() {$(".pagetop").remove();}); */
		}
	}
