$(function () {
var msie6 = $.browser == 'msie' && $.browser.version < 7;
if (!msie6) {
var top = $('.xnav').offset().top - parseFloat($('.xnav').css('margin-top').replace(/auto/, 0));
$(window).scroll(function (event) {
// what the y position of the scroll is
var y = $(this).scrollTop();
// whether that's below the form
if (y >= top) {
// if so, add the fixed class
$('.xnav').addClass('fixed');
$('.page-content').css('marginTop', 60);
} else {
// otherwise remove it
$('.xnav').removeClass('fixed');
$('.page-content').css('marginTop', 20);
}
});
}
}); 
