$(document).ready(function(){
	var z;
	$('a.modal').click(function(){ // light box type functionality
		if (screen.height <= 768){
			$('div.whiteWrapper').css('margin-top','10px');
		}	
		if ($.browser.msie && $.browser.version==6){
			$('select').css('display','none');
		}
		z = parseInt($(document).scrollTop())+'px';
		var width = document.body.clientWidth; // gives the actual width of the body
		var height = document.body.clientHeight;
		var totalHeight = $(document).height();
		$('.overlayBlack').css('opacity',.30).css('height',totalHeight).css('width',width);
		$('.overlay').css('width',width).css('height',height).css('top',z);
		$('.overlayBlack, .overlay').fadeIn('fast');
		$(window).scroll(function(){
			z = parseInt($(document).scrollTop())+'px';
			$('.overlay').css('top',z);
		});
	});
	$('.close').click(function(){ //for closing the light box
		$('.overlayBlack, .overlay').fadeOut('fast');
		if ($.browser.msie && $.browser.version==6){
			$('select').css('display','');
		}
	});						   
	//MO -- MouseOver
	$('a.modalMO').mouseover(function(){ // light box type functionality
	    $('#divPopupList').css('display','block');
	});	
	//MO -- MouseOut
	$('a.modalMO').mouseout(function(){ // light box type functionality
	    $('#divPopupList').css('display','none');
	});	
	//RQ Click -- Click
	$('a.modalRQ').click(function(){ // light box type functionality
	    $('#divRQPopupList').css('display','block');
	    $('#divMsg').attr('style','display:block');
	    return false;
	});	
	
})
