$(function() {
    $('a[@rel*=lightbox]').lightBox({
        imageLoading: 'http://papiruszkft.hu/images/lightbox-ico-loading.gif',
        imageBtnClose: 'http://papiruszkft.hu/images/lightbox-btn-close.gif',
        imageBtnPrev: 'http://papiruszkft.hu/images/lightbox-btn-prev.gif',
        imageBtnNext: 'http://papiruszkft.hu/images/lightbox-btn-next.gif'
    });
});

function getTxt(txt,lnk) {
  if (lnk == "") {lnk = txt}
  if (NaV == "Netscape") {
    lin = '<A HREF="../' + lnk + '">' + txt + '</A>' 
  } else {
    lin = '<A HREF="javascript:getIEtxt(' ; lin += "'" + lnk + "')"
    lin += '">' + txt + '</A>'
  }
  document.write(lin) ; document.close()
}
function getIEtxt(txt) {
  loc = self.location.href
  loc = loc.substr(0,loc.lastIndexOf("/") + 1)
  window.location="view-source:" + loc + txt
}
function doBlink() {
	var blink = document.all.tags("BLINK")
	for (var i=0; i<blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}

function startBlink() {
	if (document.all)
		setInterval("doBlink()",1000)
}
window.onload = startBlink;

ns4=document.layers
ie4=document.all
ns6=document.getElementById&&!document.all
var xWin=null; var ticks=0;

function ChangeLabel0(txt){
if(ns4){document.layers.label0.innerHTML=txt}
if(ie4){document.all.label0.innerHTML=txt}
if(ns6){document.getElementById("label0").innerHTML=txt}
}

function StartT(){
 StartPopup();
 window.focus();
 ChangeLabel0("<b>Felugró ablakok engedélyezésének ellenőrzése: "+ticks+" másodperc</b>");
} 
function StartPopup(){
 xWin=window.open("../test.html");
 setTimeout("test_xWin()",700);
}
function test_xWin(){
//  alert("typeof(xWin)="+typeof(xWin));
//  alert("typeof(xWin.location.href)="+typeof(xWin.location.href));
//  alert("xWin="+xWin);
//  alert("xWin.location.hash="+xWin.location.hash);
  if ( (xWin==null)
     ||(typeof(xWin)=="undefined")
     ||(typeof(xWin.location.hash)!="string")
//     ||(xWin.location.hash!="#abc")
     ){sMsg="<font color=#FF0000><b>Az oldal működéséhez elengedhetetlen a felugró ablakok  (PopUp) engedélyezése.<br>Kérem kapcsolja ki a felugró ablakok tiltását!</b></font>";}
  else{sMsg="<font color=#008000><b>A felugró ablakok (PopUp) engedélyezve</b></font>";};
//alert("xWin="+xWin+" type="+typeof(xWin)+" typeloc="+typeof(xWin.location.hash)+" hash="+xWin.location.hash);
  window.focus();
  ChangeLabel0(sMsg);
}


function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
}

function hsImg()
{
	if($("#left_side a").hasClass("highslide"))
		$("#left_side a").each(function(){$(this).attr("href", $(this).children().attr("src")).children().attr("border","0")});			
}

function changeContent()
{
	if($("#actual").css("display")=="none")
	{
		$("#firmstory").fadeOut("slow", function(){$("#actual").fadeIn("slow");});
		$("#left_side a:contains('Aktualitások')").css("color","#000000");
		$("#left_side a:contains('Cégtörténet')").css("color","#B3B3B3");
	}
	else if($("#firmstory").css("display")=="none")
	{	
		$("#actual").fadeOut("slow", function(){$("#firmstory").fadeIn("slow");});
		$("#left_side a:contains('Cégtörténet')").css("color","#000000");
		$("#left_side a:contains('Aktualitások')").css("color","#B3B3B3");
	}
}

var t 
function showMisc()
{
	//clearInterval(timer);
	if($(".floatedmenu img").css("display")=="none")
	{
		$(".floatedmenu img").show("slow");
		t = setInterval("hideMiscImg()", 5000);
	}
	else
		$(".floatedmenu img").hide("slow");
}

function hideMiscImg()
{
	$(".floatedmenu img").hide("slow");
}