$(document).ready(function()
{ 	
	$(document).pngFix(); 
	
	$("ul#mediapartner a").fancybox({
		'hideOnContentClick': true,
		'overlayShow': true,
		'overlayOpacity': 0.8,
		'zoomSpeedIn': 0,
		'zoomSpeedOut': 0
	});

	$("a[rel=fancybox]").fancybox({
		'hideOnContentClick': true,
		'overlayShow': true,
		'overlayOpacity': 0.8,
		'zoomSpeedIn': 0,
		'zoomSpeedOut': 0
	});
});

$(function(){
	$("a.blank").click(function(){ 
    	window.open(this.href);
        return false;
    });
});
function skryt(identif){
	document.getElementById(identif).style.display = (document.getElementById(identif).style.display == 'block') ? 'none' : 'block'
}
	
function jump_archive() {
	var jumpto = './'+document.getElementById('a_category').value;
	if (document.getElementById('a_query').value) jumpto += '?a_query='+document.getElementById('a_query').value;
	location = jumpto;
}
	
var itemindex = 0;
	
function selectmenu(item) {
	if (itemindex > 0) {
		document.getElementById('menu'+itemindex).style.background = 'transparent';
		document.getElementById('submenu'+itemindex).style.visibility = 'hidden';
	}
		
	document.getElementById('menu'+item).style.background = "url('/img/menu_bg_hover.gif')";
	document.getElementById('submenu'+item).style.visibility = 'visible';
	itemindex = item;
}

// Reklama


var adPositions = {};
function writeAdDiv(name) {
  document.write('<div id="'+name+'-beacon"></div>');
  adPositions[name] = name;
}
function positionAds() {
  for (ad in adPositions) {
    var oldDiv = document.getElementById(ad);
    var newDiv = document.getElementById(ad+'-beacon');
    newDiv.parentNode.replaceChild(oldDiv, newDiv)
  }
}