

<!--

<!--
var brandEl, categoryEl, serieEl, filtersEl;
function refreshFilters() {
 setTimeout(function() {
  $("#price").selectbox();
  $("#width").selectbox();
  $("#shape").selectbox();
  $("#filters").show();
 },1000);
}
$(document).ready(function() {
 brandEl = $("select[name='brand']");
 categoryEl = $("select[name='category']");
 serieEl = $("select[name='serie']");
 filtersEl = $('#filters');
 
 brandEl.change(function() {
  jQuery.getJSON(brandEl.attr('rel') + $(this).val(), function(json) {
   KOLO.Select.rebuild(categoryEl, json.categories);
   KOLO.Select.refresh(categoryEl);
   KOLO.Select.rebuild(serieEl, json.series);
   KOLO.Select.refresh(serieEl);
   filtersEl.html(json.filters);
   $("#filters").hide();
   refreshFilters();
  });
 });
 
 serieEl.change(function() {
  var val = $(this).val();
  if (val == 0) {
   $("#filters").hide();
   filtersEl.load($(this).attr('rel') + categoryEl.val() + '/0',function() { refreshFilters(); });
  } else {
   $("#filters").hide();
   filtersEl.load($(this).attr('rel') + '0/' + val,function() { refreshFilters(); });
  }
 });
 categoryEl.change(function() {
  
  var val = $(this).val();
  if (val == 0) {
   jQuery.getJSON(brandEl.attr('rel') + brandEl.children(":selected").val(), function(json) {
       KOLO.Select.rebuild(serieEl, json.series);
       KOLO.Select.refresh(serieEl);
       filtersEl.html(json.filters);
       $("#filters").hide();
       refreshFilters();
    });
  } else {
    jQuery.getJSON($(this).attr('rel') + val, function(json) {
       KOLO.Select.rebuild(serieEl, json.series);
       KOLO.Select.refresh(serieEl);
       filtersEl.html(json.filters);
       $("#filters").hide();
       refreshFilters();
    });
  }
 });
 $('#prodSearch').submit(function() {
  var url = $(this).attr('action') + '/';
  var params = '';
  var phrase = $('#phrase').val();
  var page = $('div.pagination.clear').find('li.active').html();
   url +=  brandEl.val() + '/' + categoryEl.val() + '/' + serieEl.val();
   if (phrase != '') {
    params += '?phrase=' + phrase;
   }
   filtersEl.find('select').each(function() {
    var el = $(this);
    if (el.val() != null && el.val() != 0) {
    params += '&' + el.attr('name') + '=' + el.val();
    }
  });
   if (page) {
    params += '&page=' + page;
   }
   if (params != '') {
   params = params.replace(/^&/, '?');
  }
  location.href = url + params;
  return false;
 });
 KOLO.Select.refresh(categoryEl);
});
//-->
//-->


