if ($.browser.msie) {
	document.createElement('header');
	document.createElement('nav');	
	document.createElement('section');
	document.createElement('footer');
}

$(window).ready(function() {
	if( $(window).height() <= 740 ) {
		$('#page').css({'margin-top': 0, 'margin-bottom': 0,});
	}
});

$(window).load(function() {
	var nav = $('nav');
	var cur = $('nav a.cur');

	var curWidth = cur.outerWidth();
	var curHeight = cur.outerHeight();
	var curLeft = cur.position().left + 4;
	
	var marker = $('<b style="height:'+ curHeight +'px;width:'+ curWidth +'px;left:'+ curLeft +'px;"></b>');
	marker.appendTo(nav);	

	$('nav a').each(function(index) {
		$(this).mouseenter(function(){
			marker.stop(true).animate({ 
				left: $(this).position().left + 4,
				width: $(this).outerWidth()			
				}, {
				duration: 400,
				easing: 'easeOutQuint'
			});
			cur.stop(true).animate({color: '#bbb'}, 300);
			$(this).stop(true).animate({color: '#fff'}, 400);	
		}).mouseleave(function(){
			$(this).stop(true).animate({color: '#bbb'}, 400);
		});
		
	});	


	nav.mouseleave(function(){
		marker.stop(true).animate({ 
			left: curLeft,
			width: curWidth			
			}, {
			duration: 400,
			easing: 'easeOutQuart'
		});			
		cur.stop(true).animate({color: '#fff'}, 400);	
	});
	
});






