// JavaScript Document

$(function () {

    //window.alert(navigator.platform);

    // var msie6 = $.browser == 'msie' && $.browser.version < 7;

    // var ios5 = $.browser == 'safari' && $.browser.version > 5;

     if (!navigator.platform == 'iPhone') {
   // window.alert(BrowserDetect.OS + ' ' + BrowserDetect.browser + ' ' + BrowserDetect.version);
    var navObj = $('#nav');
    if (navObj != null) {
        var top = navObj.offset().top - parseFloat(navObj.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 div
            if (y >= top) {
                // if so, ad the fixed class
                $('#nav').addClass('fixed');
            } else {
                // otherwise remove it
                $('#nav').removeClass('fixed');
            }
        });
    }
     }
});


