/* Matches Rigth Aside to Holder class height */
$(document).ready(function() {
	$(".rightAside").height($(".holder").height()+80);
});

/* Slider START */
$(function(){
	$("#slides").slides({
		preload: false,
		play: 6000,
		pause: 2500,
		effect: 'slide, fade',
		slideSpeed: 900,
		hoverPause: true
	});
});
/* Slider END */
/* Find START */
$(document).ready(function(){ 
    $("select#state").change(function(){ 
        var post_string = "type=" + $(this).val(); 
 
        /* Send the request and update sub category dropdown */
        $.ajax({ 
            type: "POST", 
            data: post_string, 
            dataType: "json", 
            cache: false, 
            url: 'find-cities.php', 
           /* timeout: 2000, */
            error: function() { 
                alert("Failed to submit"); 
            }, 
            success: function(data) {  
                /* Clear all options from sub category select */
                $("select#city option").remove(); 
 
                /* Fill sub category select */
                $.each(data, function(i, j){ 
                    var row = "<option value=\"" + j.value + "\">" + j.text + "</option>"; 
                    $(row).appendTo("select#city"); 
                }); 
            } 
        }); 
    });     
});
/* Find END*/
