// JavaScript Document
document.observe("dom:loaded", function() {
if ((screen.width>=1152) && (screen.height>=768))
{
	
	new Ajax.Updater({success: 'moduleCart'}, '/data_cart.php'); // Ottiene info carrello
	$('moduleCart').show();

Event.observe('cart_quantity', 'submit', function(event) {
	
    $('cart_quantity').request({ //Invia form al carrello
	    method: 'post',
		
		
		onCreate: function() {
		$('mrCartSpinner').show();
		},
		
        onFailure: function() {  
		$('mrCartSpinner').hide();
		return false;
		},
		
        onComplete: function(t) {
			new Ajax.Updater({success: 'moduleCart'}, '/data_cart.php', {
						onComplete: function () {
						Effect.Pulsate('mrCartTable', { pulses: 2, duration: 0.6 }); // pulsa carrello dopo caricamento
						}
					}); // Ottiene info carrello
			
			$('mrCartSpinner').hide(); // nascone spinner
        }
    });
    Event.stop(event); // stop l'invio della form
});
} 
});