
// (C) 2008 Przemysław Wądołowski

var loader = new Array();
var fbboxto;

$(document).ready(init);

function init()
{
  $('.collapse-content').each(function(){
    $(this).children(':first').css('margin-top', 0);
    $(this).children(':last').css('margin-bottom', 0);
  });
  
  $('#menu img, #footer-btns a img').each(function(){
    var parts = this.src.split('/');
    var img = parts.pop();
    parts.push('over');
    parts.push(img);
    this.srcOriginal = this.src;
    this.srcOver = parts.join('/');
    img = new Image();
    img.src = this.srcOver;
    loader.push(img); 
    $(this).mouseover(function(){ this.src = this.srcOver });
    $(this).mouseout(function(){ this.src = this.srcOriginal });
  });
  $('a[rel=lightbox]').lightbox();

	$('#fbbox').mouseover(function()
	{
			clearTimeout(fbboxto);
			$(this).stop().animate({left:0});
	});
  $('#fbbox').mouseout(function()
	{
			fbboxto = setTimeout(FBBoxHide, 200);
	});
}


function FBBoxHide()
{
	$('#fbbox').stop().animate({left:-205});
}
