
function splitid(str)
{
   return str.split('-')[1];
}

function redirect(url)
{
   document.location = url;
   return true;
}

function in_array(what, where)
{
   var a = false;
   
   for ( var i=0; i<where.length; i++ )
   {
      if ( what == where[i] )
      {
         a = true;
         break;
      }
   }
   
   return a;
}

$(function()
{
   $('#debug')
   .css({'width':$(window).width(), 'height':$(document).height()})
   .ajaxStart(function()
   {
      $(this).fadeIn();
   })
   .ajaxStop(function()
   {
      $(this).fadeOut();
   })
   .ajaxError(function(event, request, settings)
   {
      $(this).fadeOut();
      jQuery.jGrowl('Error requesting page '+settings.url, {header: 'Ошибка'});
   })
   .children('img').css('marginTop', $(document).scrollTop()+$(window).height()/2-155);
});