function sepet_ekle(id,adet){
 
 var GK = $("#GK").val();
 
 if(id > 0 && adet > 0 && GK ){	
		
		$("#sepeteeklendi").show('fast');
		
		var str = 'id=' + id + '&adet=' + adet + '&GK=' + GK + '&IS=1';
		
		$.ajax({ type	 : 'POST',
				 url	 : 'ajax-sepet.php',
				 data	 : str, 
				 success : function(d){ 
		
										$("#sepeteeklendi").hide(2000); 
										
											if(d>0){
										
												$("#sepetegit").html('Sepete Git('+ d +')');
										
											}else{ alert(d); }
			
										}
			  });	
	
 }
}
	
function sepet_guncelle(){
	
 var GK = $("#GK").val();
 

var str =  $("#Form_sepet").serialize() + '&GK=' + GK + '&IS=3';

		$.ajax({ type	 : 'POST',
				 url	 : 'ajax-sepet.php',
				 data	 : str, 
				 success : function(d){ 			
											if(d>0){
										
												window.location.reload(); 
										
											}else{ alert(d); }
			
										}
			  });	
	
	
}

function sepet_cikar(id){
	
 var GK = $("#GK").val();
 
 if(id > 0 && GK ){	
		
		var str = 'id=' + id + '&GK=' + GK + '&IS=2';
		
		$.ajax({ type	 : 'POST',
				 url	 : 'ajax-sepet.php',
				 data	 : str, 
				 success : function(d){ 			
											if(d>0){
										
												window.location.reload(); 
												
												//$("#sptli"+id).remove();
												
												//$("#sepetegit").html('Sepete Git('+ d +')');
										
											}else{ alert(d); }
			
										}
			  });	
	
 }	
	
	
	
}

function sepet_bosalt(){
	
 var GK = $("#GK").val();
 
 if( GK ){	
		
		var str = 'GK=' + GK + '&IS=4';
		
		$.ajax({ type	 : 'POST',
				 url	 : 'ajax-sepet.php',
				 data	 : str, 
				 success : function(d){ 			
											if(d>0){
										
												window.location.reload(); 
												
												//$("#sptli"+id).remove();
												
												//$("#sepetegit").html('Sepete Git('+ d +')');
										
											}else{ alert(d); }
			
										}
			  });	
	
 }	
	
	
}
