$(document).ready(function(){
	/*
		adjust's top position of message box when browser is being scrolled 
		better if default_position is equal to the msgbox style default top position
		anyway you can modify it accordding what your site needs
	*/
	var default_position = 250;
	$(window).scroll(function(){
		$('#msgboxForgetPass').animate({top:$(window).scrollTop()+default_position+"px" },{queue: false, duration: 350});  
	});							
									
	$("#DimBackgroundForgetPass").css("height", $(document).height());
	
	//When the link that triggers the message is clicked, display DimBackground and fadeIn msgbox...
	$(".showForgetPass").click(function(){
		$("#DimBackgroundForgetPass").css({'display':'block'});
		$("#msgboxForgetPass").fadeIn();
		return false;
	});
	
	//When the message box is closed, hide DimBackground and fadeOut msgbox...
	$(".closeForgetPass").click(function(){
		$("#DimBackgroundForgetPass").css({'display':'none'});
		$("#msgboxForgetPass").fadeOut();
		return false;
	});

});

//adjust's height of overlay to fill screen when browser gets resized  
$(window).bind("resize", function(){
	$("#DimBackgroundForgetPass").css("height", $(window).height());
});

