$(document).ready(function() {
	var screen_width = $(window).width();
	var min_width;
	
	if($('#header-enter').length) min_width = 960;
	else min_width = 850;
	
	var new_width = -450;
	if(screen_width < (min_width)){
		new_width = new_width + (min_width - screen_width);
		$('#wrapper').css('right',new_width+'px');
	}
	// Also create a handler for resize of browser window
	$(window).resize(function() {
		var screen_width = $(this).width();
		var min_width;
		if($('#header-enter').length) min_width = 960;
		else min_width = 850;
		var new_width = -450;
		if(screen_width < (min_width)){
			new_width = new_width + (min_width - screen_width);
			$('#wrapper').css('right',new_width+'px');
		}
		else {
			$('#wrapper').css('right','-450px');
		}
	});
	
	
	$('#fbl_nav_v').hover(function() { 
	$(this).stop().animate({ marginLeft: '-100px' },200); // on Mouseover move to left
	}, function() { //on Mouseout move back to original positon
		$(this).stop().animate({ marginLeft: '0px' }, 200);
	});
	
	$('#email_nav_v').hover(function() {
	$(this).stop().animate({ marginLeft: '-340px' },200); // on Mouseover move to left
	}, function() { //on Mouseout move back to original positon
		$(this).stop().animate({ marginLeft: '0px' }, 200);
	});
	
});
