/* Init */
$(document).ready(function() {

	$('#paymethods').bind('change', function(){
		
		$('.btninshopcart').each(function(){
			$(this).hide();
		});
	});
});	

WawShop.evChangedPayMethods = function (val) {

	if( val == 0 ) {
		var success = function ( json ) {
			if(json.result.state == 1){
				window.location.reload( true );
			}
		};
		var other = { "id" : 2 };
		WawClient.callComponent ( 'shopcart', 'edit', 'update_delivery_method', success, 'json', other );
		return false;
	}
	else {
		var success = function ( json ) {
			if(json.result.state == 1){
				window.location.reload( true );
			}
		};
		var other = { "id" : 1 };
		WawClient.callComponent ( 'shopcart', 'edit', 'update_delivery_method', success, 'json', other );
		return false;
	}
}

}); 

var unhide = function(elmId) {
	
	var elm = $('#'+elmId);
	elm.show();
}

