$(document).ready(function()
	{
$("a.popoffer").click(function()
		{
		var currentId=$(this).attr('id');
		$("#basic-modal-content11").load("http://"+document.domain+"/pop.php?id="+currentId);
		$('#basic-modal-content11').modal1();
		});
$("a.pop_i").click(function()
		{
		var currentId=$(this).attr('id');
	$("#basic-modal-content11").load("../tooltip.php?type="+currentId);
		$('#basic-modal-content11').modal()});

$("a.newpop_i").click(function()
	{
	var currentId=$(this).attr('id');
		$("#basic-modal-content11").load("../tooltip.php?type="+currentId);
		$('#basic-modal-content11').modal()
	});
		$("#popupContactClose").click(function(){disablePopup()});
		$("#backgroundPopup").click(function(){disablePopup()});
$(document).keypress(function(e){
			if(e.keyCode==27 && popupStatus==1){
				disablePopup();
			}
		});
		
	
		function disablePopup()
		{
		if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupContact").fadeOut("slow");
		popupStatus=0
			}
		}
	
	});

