
// (c) 2008, Przemysław Wądołowski

if ( window.self != window.top )
{
  window.top.location = window.location.href;
}

$(document).ready(init);

function init()
{
  $('.abc').hide();
  $('a[rel=lightbox]').lightbox();
//  $('#home_baner').flash('flash/baner.swf', 150, 100);
  $('#flash-zaufalinam').flash('flash/zaufali-nam.swf', 130, 76);
}


function swf(swf, width, height) {
  var date = new Date();
  var id = hex_md5(swf + date.getUTCSeconds() + Math.random());
  document.write('<div id="' + id + '"></div>');
  
  var swfo = new SWFObject(swf, id + 'movie', width, height, "9", "#FFFFFF");
  swfo.write(id);  
}

function startup()
{
  fixanchors();
}

function fixanchors()
{
  base = document.location.href;
  pos = base.indexOf('#');
  if (pos > -1) {
    base = base.substring(0, pos);
  }
  
  anchors = document.getElementsByTagName('a');
  log = '';
  for (x in anchors) {
    log += anchors[x] + "\r\n";
    href = new String(anchors[x].href);
    pos = href.indexOf('#');
    if (pos > -1) {
      log += 'anchor: ' + href.substring(pos) + "\r\n";
      anchors[x].href = base + href.substring(pos);
    }
  }
  //alert(log);
}


function popup(url, width, height)
{
  if (width == undefined) width = 500;
  if (height == undefined) height = 500;
  var base = document.getElementsByTagName('base')[0].href;
  var left =  (screen.availWidth - width) / 2;
  var top =  (screen.availHeight - height) / 2;
  window.open(base + url, '', 'width='+width+',height='+height+',left='+left+',top='+top
                              +',resizable,scrollbars=auto');
}

function setCurrentLogo(no)
{
  alert(no);
}