$(document).ready(function(){
    
$(document).pngFix(); //fix png dla IE6

$(".news_data").corner("3px");
$("#partners_box").corner("10px");
$("#realizations_box").corner("10px");
$(".realization_item").corner("10px");
$(".in_hand_item").corner("10px");

$("#latest_box").slideDown(2000);


$(function() {
	$('a.lightbox').lightBox(); // Select all links with lightbox class
	});

//tooltips
$(".more").tooltip({
          top: -25,
          left: 30,
          fade: 650, 
          showBody: " - ",
          showURL: false,
          track: true
          });
  $(".icon_link").tooltip({
          top: -25,
          left: 30,
          fade: 250,
          showBody: " - ",
          showURL: false,
          track: true
          });
        $(".footer_link").tooltip({
          top: -25,
          left: 30,
          fade: 250,
          showBody: " - ",
          showURL: false,
          track: true
          });
        $(".spi_link").tooltip({
          top: -25,
          left: 30,
          fade: 650, 
          showBody: " - ",
          showURL: false,
          track: true
          });
        $(".mail_link").tooltip({
          top: -25,
          left: 30,
          fade: 250,
          showBody: " - ",
          showURL: false,
          track: true
          });
        
// centrowanie w pionie obrazkow w partners box
//(function ($) {
//    $.fn.vAlign = function(container) {
//        return this.each(function(i){
//	   if(container == null) {
//	      container = 'div';
//	   }
//	   var paddingPx = 10; //change this value as you need (It is the extra height for the parent element)
//	   $(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
//	   var el = $(this).children(container + ":first");
//	   var elh = $(el).height(); //new element height
//	   var ph = $(this).height(); //parent height
//	   if(elh > ph) { //if new element height is larger apply this to parent
//	       $(this).height(elh + paddingPx);
//	       ph = elh + paddingPx;
//	   }
//	   var nh = (ph - elh) / 2; //new margin to apply
//	   $(el).css('margin-top', nh);
//        });
//     };
//})(jQuery);
//
//$(".partner_item").vAlign();


var auto_refresh = setInterval(
function()
{
$('#partners_box_inside').load('partners_box.php');
}, 5000);

$.ajaxSetup({ cache: false });


//var auto_refresh = setInterval(
//function()
//{
//$('#realizations_box').load('realizations_box.php');
//}, 7000);


}); // koniec dokument ready
