$(function() {
    $('a.lightbox').lightBox();
    $('a.galerijai').lightBox();
});

$(function () {
  $('#ticker marquee').marquee('pointer').mouseover(function () {
      $(this).trigger('stop');
  }).mouseout(function () {
      $(this).trigger('start');
  }).mousemove(function (event) {
      if ($(this).data('drag') == true) {
          this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
      }
  }).mousedown(function (event) {
      $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  }).mouseup(function () {
      $(this).data('drag', false);
  });
});


$(document).ready(function() {
  $('div#headerslideshow').slideshow({
    timeout: 7000,
    fadetime: 1000,
    type: 'sequence'
  });
});


    function dm(Server, Login, Display){
      if ((Display.length == 0) || (Display.indexOf('@')+1)) {
      document.write('<a href=' + '"mai' + 'lto:' + Login + '&#64;' + Server + '">' + Login + '&#64;' + Server + '<\/a>'); }
      else  {
      document.write('<a href=' + '"mai' + 'lto:' + Login + '&#64;' + Server + '">' + Display + '<\/a>'); }
    }

 
function rodyk(id) {
document.getElementById(id).style.display='';
}

function slepk(id) {
document.getElementById(id).style.display='none';
}

function toggle_visibility(id) {
  if(document.getElementById(id).style.display=='none') rodyk(id); else slepk(id);
}

function popUp(URL,width,height,left,top){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height+",left = "+left+",top = "+top+"');")}

