/* Author: VDBC

*/
$(document).ready(function(){

  $("#breadcrumbs a").each(function(){
    if(!$(this).attr("href").length)
      $(this).remove();
  });

  if($("#brand_select").length) {
    //brand to model select
    $("#brand_select").change(function(){

      var brand = $(this).val();
      if(brand!="all") {
        $("#model_select").attr("disabled","disabled").html("<option>Loading...</option>");
        $.post(
	        main_site_url + "/getbrandmodels/",
	        {brand:brand},
	        function(data) {
		        $("#model_select").html(data).removeAttr("disabled");
	        }
        );
      }
    });
  }

  // Equalize columns
  var $els = $("#primary, #secondary").equalizeCols();

  $(".carmeleonpop").popupWindow({height:600,width:660});

});























