/*lightbox js*/			
/* Show pupup win */
function show_modal_win()
	{
		
		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(document).width();

		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
		if(parseInt(winH)>0)
			winH = winH - 100;
			 
		//Set the popup window to center
		$('#lightboxwraper').css('top',  winH/2-$('#lightboxwraper').height()/2);
		$('#lightboxwraper').css('left', winW/2-$('#lightboxwraper').width()/2);
		
		//Set heigth and width to mask to fill up the whole screen
		$('#screenoverlay').css({'width':maskWidth,'height':maskHeight,'opacity':0.9});
		
		$('#screenoverlay').show();
		$('#lightboxwraper').show();
	}

	//function to close popup modal window
	function close_modal_win()
	{
		//popup window
		//if close button is clicked
		$('.modal_close').click(function (e) {
			//Cancel the link behavior
			e.preventDefault();
			$('#screenoverlay').hide();
			$('#lightboxwraper').hide();
		});	
	
		//if mask is clicked
		$('#screenoverlay').click(function () {
			$(this).hide();
			$('#lightboxwraper').hide();
		});			
		//popup window end
	}
