function search_producer(s){
	$("#s_producer").attr('checked', 'checked');
	$("#str_search").val(s);
	$("#search").submit();
}

function search_actor(s){
	$("#s_actor").attr('checked', 'checked');
	$("#str_search").val(s);
	$("#search").submit();
}

function get(url){
	location.href = url;
}

function on_resize()
{
  $('.novinki .good').show();
  if ($.browser.msie && $.browser.version==7)
    {
    if ($('#content').width()<=1575)
        $('.novinki .good_6').hide();
    if ($('#content').width()<=1325)
        $('.novinki .good_5').hide();
    if ($('#content').width()<=944)
        $('.novinki .good_4').hide();
    if ($('#content').width()<=720)
        $('.novinki .good_3').hide();
    }
  else
  {
    if ($('#content').width()<=1575)
        $('.novinki .good_6').hide();
    if ($('#content').width()<=1325)
        $('.novinki .good_5').hide();
    if ($('#content').width()<=944)
        $('.novinki .good_4').hide();
    if ($('#content').width()<=720)
        $('.novinki .good_3').hide();
  }
}

function toggle_cat_description()
{
  $('.cat_description .cat_content').toggle();
  if ($('.cat_description .image_close').attr('src')=='pictures/image_open.gif')
    $('.cat_description .image_close').attr('src', 'pictures/image_close.gif');
  else
    $('.cat_description .image_close').attr('src', 'pictures/image_open.gif');
}

$(function(){
  /*$('.genres').hide();
  $('.genres_group').click(function() {
    $('.genres:visible').hide('blind');
    $(this).next('.genres').show('blind');
  });*/
  $('.genres_group').next().hide();
  $('.genres .selected').parent().show();
  $('.cat_description .cat_content').hide();
  $('.cat_description .image_close').attr('src', 'pictures/image_open.gif');
  $('.genres_group').click(function() {
    $(this).next('.genres').toggle('blind');
  });
    $('.secondlevel a').click(function(){
      $(this).parent().toggleClass('open');
      $(this).parent().next('.hiden').toggle();
      return false;
    });
    $(window).resize(on_resize);
    on_resize();
});
