function Confrims() {
	if(confirm('Are you sure?')) {
		return(true);
	}
	return(false);
}

$(document).ready(function(){
	$("#picture-car a").hover(function(){
		$(this).children().addClass("act");
	});
	
	$("#picture-car a").livequery("click",function(){
		var images = $(this).next().text();
		var text = $(this).attr("title");
		
		var index = $("#picture-car a").index(this);

		if(!text) text = "";
		$(".fullsize").hide();
		$("#loading").show();
		$(".fullsize").attr("src",'images/blank.gif')
		setTimeout("loadezy('"+images+"','"+text+"','"+index+"')",500);
	});
	
	$("#closewindow").livequery("click",function(){
		$("#right-banner").hide();
	});
});


function loadezy(images,text,index){
	var original_size = images;
	if($(".fullsize").attr("src",images)){
		$(".fullsize").fadeIn(500);
		$("#loading").hide();
	}
		
}

$(function(){
    var time = Math.random();
    $("#brand_id").change(function() {
        var brand_id = $(this).val();
        $.ajax({
            type: "GET",
            url: "requests/select_type_car2.php",
            data: "brand_id="+brand_id+"&time="+time+"&op=brand",
            success: function(req){
                $("#model_id").empty().html(req);
            }
        });
    });
	
	 $("#brand_id2").change(function() {
        var brand_id = $(this).val();
        $.ajax({
            type: "GET",
            url: "requests/select_type_car2.php",
            data: "brand_id="+brand_id+"&time="+time+"&op=brand",
            success: function(req){
                $("#model_id2").empty().html(req);
            }
        });
    });
});
