// Editing Instructions
// 1. Change '#your_div_id' to whatever the ID attribute of your DIV is
// 2. Change '175' to whatever the height of your header is, if you have no header, set to 0
/********************************
*   (C) 2009 - Thiago Barbedo   *
*   - tbarbedo@gmail.com        *
*********************************/
window.onscroll = function()
{
    if( window.XMLHttpRequest ) {
        if (document.documentElement.scrollTop > 110 || self.pageYOffset > 110) {
            $('#menubar').css('position','fixed');
            $('#menubar').css('width','980px');			
            $('#menubar').css('top','0');
            $('#menubar').css('z-index','500');
        } else if (document.documentElement.scrollTop < 110 || self.pageYOffset < 110) {
			$('#menubar').css('z-index','500');
            $('#menubar').css('position','absolute');
            $('#menubar').css('top','100px');
            $('#menubar').css('width','980px');	
        }
    }
}
