/*****************************
**     Popup message
******************************/

//close pop-up box
function closePopup()
 {
   $('#cartinfo').load("cart_info.php?ran="+Math.random());
   $('#opaco').toggleClass('hidden').removeAttr('style');
   $('#popup').hide();
   return false;
 }

 function closePopup2()
 {
   $('#opaco').toggleClass('hidden').removeAttr('style');
   $('#popup').hide();
   return false;
 }

  function closePopup3()
 {
   $('#opaco').toggleClass('hidden').removeAttr('style');
   $('#popup').hide();
   return false;
 }

//open pop-up
function showPopup(pid, kol)
 {

   if($.browser.msie)
   {
     $('#opaco').height($(document).height()).toggleClass('hidden');
   }
   else
   {
     $('#opaco').height($(document).height()).toggleClass('hidden').fadeTo('slow', 0.3);
   }


//	$('#popup').css("width", "80%");
//	$('#popup').css("height", "400px");


   $('#popup')
	.load("cart_popup.php?products_id="+pid+"&action=add_product&cart_quantity="+kol+"&ran="+Math.random())
    .alignCenter()
    .alignCenter()
    .show();
   return false;
 }





 //open pop-up
function showPopup2(pid)
 {

   if($.browser.msie)
   {
     $('#opaco').height($(document).height()).toggleClass('hidden');
   }
   else
   {
     $('#opaco').height($(document).height()).toggleClass('hidden').fadeTo('slow', 0.3);
   }


//	$('#popup').css("width", "250px");
//	$('#popup').css("height", "300px");


   $('#popup')
	.load("1click.php?pid="+pid+"&ran="+Math.random())
    .alignCenter()
    .alignCenter()
    .show();
   return false;
 }


 function showPopup3(pid)
 {
 	$('#popup').css("width", "850px");
	$('#popup').css("height", "600px");

   if($.browser.msie)
   {
     $('#opaco').height($(document).height()).toggleClass('hidden');
   }
   else
   {
     $('#opaco').height($(document).height()).toggleClass('hidden').fadeTo('slow', 0.3);
   }

   $('#popup')
	.load("review.php?id="+pid+"&ran="+Math.random())
    .alignCenter()
    .alignCenter()
    .show();
   return false;
 }




function tocart1(pid){
	kol=1
	showPopup(pid, kol)
};

