var $j = jQuery.noConflict();

$j(document).ready(function () {  
	var top = $j('#menu').offset().top - parseFloat($j('#menu').css('marginTop').replace(/auto/, 0));
	
	$j(window).scroll(function (event) {
		
		// what the y position of the scroll is
    	var y = $j(this).scrollTop();
		var offsett = $j('#menu').offset();
    	// whether that's below the form
		
    	if (y >= top) {
			// if so, ad the fixed class
			$j('#menu').addClass('fixed');
			if ( $j.browser.msie && $j.browser.version < 9) {
				$j('#menu').css("left", offsett.left);
			}
    	} else {
			// otherwise remove it
			$j('#menu').removeClass('fixed');
    	}
  	});
});
