2015-04-12 19:27:48 +02:00
|
|
|
$(document).ready(function() {
|
2015-05-27 22:43:49 +02:00
|
|
|
if($('#q').length) {
|
2015-04-12 19:27:48 +02:00
|
|
|
$('#categories label').click(function(e) {
|
|
|
|
$('#categories input[type="checkbox"]').each(function(i, checkbox) {
|
|
|
|
$(checkbox).prop('checked', false);
|
|
|
|
});
|
|
|
|
$('#categories label').removeClass('btn-primary').removeClass('active').addClass('btn-default');
|
|
|
|
$(this).removeClass('btn-default').addClass('btn-primary').addClass('active');
|
|
|
|
$($(this).children()[0]).prop('checked', 'checked');
|
2015-05-27 23:26:24 +02:00
|
|
|
if($('#q').val()) {
|
|
|
|
$('#search_form').submit();
|
|
|
|
}
|
2015-04-12 19:27:48 +02:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|