

<!--
var brandEl, categoryEl, serieEl, phraseEl;
$(document).ready(function() {
 brandEl = $("select[name='brand']");
 categoryEl = $("select[name='category']");
 serieEl = $("select[name='serie']");
 phraseEl = $('#phrase');
 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);
  });
 });
 phraseEl.focus(function() {
  if ($(this).val() == $(this).attr('rel')) {
   $(this).val('');
  }
 });
 phraseEl.blur(function() {
  if ($(this).val() == '') {
   $(this).val($(this).attr('rel'));
  }
 });
 $('form#archiSearch, form#form_search').submit(function() {
  var url = $(this).attr('action') + '/';
  var params = '';
  var phrase = phraseEl.val();
  var page = $('div.pagination.clear').find('li.active').html();
  if (phrase == phraseEl.attr('rel')) {
   phraseEl.val('');
   phrase = '';
  }
   url +=  brandEl.val() + '/' + categoryEl.val() + '/' + serieEl.val();
   if (phrase != '') {
    params += '?phrase=' + phrase;
   }
   if (page) {
    params += '&page=' + page;
   }
   if (params != '') {
   params = params.replace(/^&/, '?');
  }
  location.href = url + params;
  return false;
 });
 $("table.filetable tr").not("tr.more").click(function() {
  if($(this).next("tr.more").attr("class").indexOf("active") >= 0) {
   $(this).next("tr.more").removeClass("active").hide();
  } else {
   $("table.filetable tr.active").not("tr.more").next("tr.more").hide();
   $("table.filetable tr.active").removeClass("active");
   $(this).addClass("active").next("tr.more").addClass("active").show();
  }
 });
 KOLO.Select.refresh(brandEl);
 KOLO.Select.refresh(categoryEl);
 KOLO.Select.refresh(serieEl);
});
//-->

