function kobilaStart(){
var height = $(window).height();
var margin = ($(window).height()-150);
$('div[id=kobila]').css('margin-top', margin);
$('div[id=kobila]').css('display', 'block');
}

function kobilaDead() {
  $('div[id=kobila]').css('display', 'none');
}


$(document).ready(function(){
  $('span#panel').click(function(){
   $('div#poisk-kategorii').slideToggle('slow');
  });

  $('a#nov').hover(
  function(){
   $('div.help-nov').stop(1,1).show("fast");
  },
  function(){
   $('div.help-nov').hide("fast");
  });

  $('a#fav').hover(
  function(){
    $('div.help-favor').stop(1,1).show("fast");
  },
  function(){
    $('div.help-favor').hide("fast");
  });



  $('a#prim').click(function(){
  var text = $('a#prim').html();
  $('input#ajaxSearch_input').attr('value', text);
  return false;
  });

  $('span[id=Feya]').click(function(){
    $(this).parent().find('#poisk-po-piroshov').css('display', 'none');
    $(this).parent().find('#poisk-po-feerverk').slideToggle('slow');
    $(this).removeClass('off');
    $(this).addClass('on');
    $(this).css('pointer', 'none');
    $(this).parent().find('span[id=orgFeya]').addClass('off');
    $(this).parent().find('span[id=orgFeya]').removeClass('on');
  });
  $('span[id=orgFeya]').click(function(){
    $(this).parent().find('#poisk-po-feerverk').css('display', 'none');
    $(this).parent().find('#poisk-po-piroshov').slideToggle('slow');
    $(this).removeClass('off');
    $(this).addClass('on');
    $(this).parent().find('span[id=Feya]').removeClass('on');
    $(this).parent().find('span[id=Feya]').addClass('off');
  });

});



