function formatTitle(title, currentArray, currentIndex, currentOpts) {
  return '<div id="tip7-title">' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
}

$(document).ready(
  function()
  {
    /*
    $('#navi a').hover(
    function()
    {
    sID = $(this).attr('rel');
    $('#content-header #'+sID+':not(.current)').addClass('hover').show();
  },
    function()
    {
    sID = $(this).attr('rel');
    $('#content-header #'+sID+':not(.current)').hide().removeClass('hover');
  }
    );
    */
    
    $(".fancybox").fancybox({
      'titlePosition'     : 'inside',
      'titleFormat'    : formatTitle
    });
    $(".fancyboxiframe").fancybox(
      {
        'hideOnContentClick': true,
        'type': 'iframe'
      }
    );
    
    $('li.bt-more-big a, li.bt-more a, li.bt-pdf a').hover(
      function()
      {
        $(this).parents().css({backgroundPosition: 'top left !important'});
      },
      function()
      {
        $(this).parents().css({backgroundPosition: 'bottom left !important'});
      }
    ); 
    
    $('.submitinputInactive').hover(
      function()
      {
        alert("test");
        $(this).css({backgroundPosition: 'top left !important'});
      },
      function()
      {
        $(this).css({backgroundPosition: 'bottom left !important'});
      }
    );     
    
    $(window).resize(function() {
      iWindowHeight = $(window).height();
      iContentHeight = $('#wrapper').height() + $('#footer-wrap').height() - parseInt($('#footer-wrap').css('marginTop'));
      
      iDiff = iWindowHeight - iContentHeight;
      if (iDiff > 0)
      {
        iPadding = iDiff-1;
      } else {
        iPadding = 0;
      }
      $('#footer-wrap').css('marginTop', iPadding+'px');
    });
    $(window).trigger('resize'); 
  }
);

