var $adtour=jQuery.noConflict();

$adtour(document).ready(function($) {
$adtour('#clear-form').click(function(e) {
     $adtour('.destinatii').val('<option value="">...</option>');
     $adtour('#regiuni').val('<option value="">...</option>');
     $adtour('#statiuni').val('<option value="">...</option>');
     $adtour('#clasificare').val('<option value="">...</option>');
});

$adtour('.destinatii').change(function(e) {
$adtour('#regiuni').html('<option>... Incarcare regiuni ...</option>');
$adtour('#statiuni').val('...');
$adtour('#cat_id').val($(this).val());
$.ajax({
 type: "POST",
 data: "data=" + $(this).val(),
 url: "http://www.adtour.ro/wp-content/plugins/rezervari-vacante/ajax-results.php",
 success: function(msg){
                if (msg != ''){
                    $adtour('#regiuni').html('<option value="">...</option>');
                    $adtour('#regiuni').html(msg).show();
                 }
                else{
                    $adtour('#regiuni').html('<option value="">...</option>');
                }
        }
});
});


$adtour('#regiuni').change(function(e) {
$adtour('#statiuni').html('<option>... Incarcare statiuni ...</option>');
$adtour('#cat_id').val($adtour(this).val());
$.ajax({
 type: "POST",
 data: "data=" + $(this).val(),
 url: "http://www.adtour.ro/wp-content/plugins/rezervari-vacante/ajax-results.php",
 success: function(msg){
                if (msg != ''){
                    $adtour('#statiuni').html('<option value="">...</option>');
                    $adtour('#statiuni').html(msg).show();
                 }
                else{
                    $adtour('#statiuni').html('<option value="">...</option>');
                }
        }
});
});

$adtour('#statiuni').change(function(e) {
$adtour('#cat_id').val($adtour(this).val());
});

$adtour('#clasificare').change(function(e) {
$adtour('#clasificare_value').val($adtour(this).val());
});


});