function hideWarnings(){
	$("#div_quantity1").fadeOut();
	$("#div_quantity1_2").fadeOut();
	}

function showPrice(pro_uid){
     domain = $("#div_domain").html();
    quantity = $("#quantity1").val();

	
    if( /^\d*$/.test(quantity) && quantity!='') { // quantity.match(/^[0-9][0-9]*$/)
		
                    //$("#price1").load(domain+'/skin/showPrice.php?pro_uid='+pro_uid+'&quantity='+quantity);
                    $.get(domain+'/skin/showPrice.php?pro_uid='+pro_uid+'&quantity='+quantity, function(data){
                                                                    $("#price1").html(data);
                                                                    
                                                                
                                                                });
                                                                
		}
	else { if( quantity==''){
		$("#div_quantity1").fadeIn();
		}
		else{
			$("#div_quantity1_2").fadeIn();
			}
	}

}
function addItem(pro_uid,ignore){
	 
 if( $('#shopcart').length ){	 
        domain = $("#div_domain").html();
        if($('#quantity1').length==0 || ignore=='ignore'){quantity=1;}
        else{ 
		quantity = $("#quantity1").val();
		}
		if( quantity!='' &&  /^\d*$/.test(quantity))  { 
				$.ajax({
						url: domain+'/skin/addcart.php',
						data: 'pro_uid='+pro_uid+'&quantity='+quantity,
						cache: false,
						complete : function(ob){
									$("#shopcart").remove();
									$(".menu").append(ob.responseText);
                                                                        
                                                                        $("#shopcart").fadeIn(100).animate({top:"-=20px"},100).animate({top:"+=20px"},100).animate({top:"-=20px"},100)
                                                                        .animate({top:"+=20px"},100).animate({top:"-=20px"},100).animate({top:"+=20px"},100);
                                                                        
									}
			 });
		}
 }
}

function delItem(puod_uid){
        domain = $("#div_domain").html();
        
        $.ajax({
				url: domain+'/skin/delcart.php',
				data: 'puod_uid='+puod_uid,
				cache: false,
				complete : function(ob){
                                                        $("#shopcart").remove();
                                                        $(".menu").append(ob.responseText);
							}
	 });
    
}

$(document).ready(function(){
   
        domain = $("#div_domain").html();
        $.ajax({
				url: domain+'/skin/shopcart.php',
				cache: false,
				complete : function(ob){
                                    $("#shopcart").remove();
                                                                $(".menu").append(ob.responseText);
                                                                 
							}
	 });

});
