// JQUERY CONFIGURATION FILE FOR BLACKADMINV2 

$(document).ready(function() {


 
	// marcoooooo///////
	
	
	/*$('#make').change(function(){ 
	
	alert($(this).val());
	
    $.post('http://www.nscgroupserver.com/autoin/products/listModelByMake/' + $(this).val(), function(data) {
		//alert(data);																						  
        $("#model").empty().append(data).resetSS();
    }, 'html');
});*/

	/*
if($('#make_usato :selected').val()!=0)
	{
	
	$.get("http://www.nscgroupserver.com/autoin/products/values",{'val': $('#make_usato :selected').val()},function(data){ $('#model_usato').empty().append(data).resetSS(); });	
	
	
	}
*/

	
	 $('#make_usato').bind('change', function() {
		
			//alert($("input[@type=checkbox][@checked]").size() );
		
			
			$.get("http://www.autoinweb.it/products/values",{'val': $('#make_usato :selected').val()},function(data){ $('#model_usato').empty().append(data).resetSS(); });	
			
			
		});
		
	 $('#make_nuovo').bind('change', function() {
		
			//alert($("input[@type=checkbox][@checked]").size() );
		
			
			$.get("http://www.autoinweb.it/products/values",{'val': $('#make_nuovo :selected').val()},function(data){ $('#model_nuovo').empty().append(data).resetSS(); });	
			
			
		});
	



$('#UserCountryId').change(function(){ 
										
	
    $.post('/users/listRegionByCountry/' + $(this).val(), function(data) {
        $("#UserRegionId").empty().append(data);
    }, 'html');
});
	
	$('#UserRegionId').change(function(){ 
									   
	
    $.post('/users/listDistrictByRegion/' + $(this).val(), function(data) {
        $("#UserDistrictId").empty().append(data).resetSS();
    }, 'html');
});
	
});
