// cufón
Cufon.replace('#subsites li.selected', {textShadow:'#a9a9a9 0 1px'});
Cufon('#subsites li:not(.selected)', {textShadow:'#fff 0 1px', hover: {textShadow: '#a9a9a9 0 1px'} });
Cufon('.sidemenu', {textShadow:'#707070 0 1px'});
Cufon('.category', {textShadow:'#707070 0 1px'});

// fake input texts

Cufon('#fakeSearch');
Cufon('.fakeNewsletter');
Cufon('.fakeArchive');

$(function()
{
	$("#search").click(function () { $("#fakeSearch").fadeOut(60); });
	$(".issuuBig p").mouseover(function () { $(this).fadeOut(250); });
	$(".sideIssuu p").mouseover(function () { $(this).fadeOut(250); });
	$("#fakeSearch").click(function () { $(this).fadeOut(60); });
	$(".newsletterInput").click(function () { $(".fakeNewsletter").fadeOut(60); });
	$(".fakeNewsletter").click(function () { $(this).fadeOut(60); });
	$(".fakeArchive").click(function () { $(this).fadeOut(60); });
	$(".archiveSelect").click(function () { $(".fakeArchive").fadeOut(60); });
});




// smallbox nth-child margin remover

$(function()
{
	$(".smallboxContainer :nth-child(3n)").css("margin-right", "0");
});

// inits
$(document).ready(function(){ 


	//poszt képtartalom méretező
	var sum=0;
	$('.postImage').each( function(){ sum = $("img", this).width(); });
	$('.postImage').width(sum);

	
	
	if ($.fn.fancybox) {
		
		$(".postImage a").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none'
		});
		
		
		$(".bigbox.gallery .slide a").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titlePosition' : 'over',
		'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		} 
		
		});
	}
});

