$(document).ready(function(){
						   
	
	
	$("form#addtocart").submit(function() {
 
	// we want to store the values from the form input box, then send via ajax below
	var action     = $('#action').attr('value');
	var product_id     = $('#product_id').attr('value'); 
	var variation_id     = $('#variation_id').attr('value');
	var currency_id     = $('#currency_id').attr('value'); 
 
		$.ajax({
			type: "POST",
			url: "cart.php",
			contentType: 'multipart/form-data',
			success: function(){

				$.iModal({
				type: 'ajax',
				url: 'cart.php?action=add&product_id='+product_id+"& variation_id="+ variation_id +"& currency_id=" + currency_id,
				width: 600
				});
			}
		});
	return false;
	});
});