$(document).ready(function(){
	$(".tab").hide();
	$("nav ul li:first a").addClass("current").show();
	$(".tab:first").show();
	$("nav ul li a").click(function() {
		$("nav ul li a").removeClass("current");
		$(this).addClass("current");
		$(".tab").hide();
		var activeTab = $(this).attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$("a[rel=galeria]").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	
	$(".video a").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'				: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

		return false;
	});
	
	$('.terkep_link').hover(function () {
	    $('.terkep').fadeIn(200);
	},function () {
		$('.terkep').fadeOut(200);
	});
	
	$(".terkep_link").click(function() {
			$.fancybox({
				'padding'		: 0,
				'type'			: 'iframe',
				'width'			: 640,
				'height'		: 385,
				'href'			: 'http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=hu&amp;geocode=&amp;q=d%C3%A1nyit%C3%B3&amp;aq=&amp;sll=47.534588,19.571972&amp;sspn=0.076839,0.154324&amp;ie=UTF8&amp;hq=&amp;hnear=D%C3%A1ny,+D%C3%A1nyit%C3%B3,+Magyarorsz%C3%A1g&amp;ll=47.535283,19.576693&amp;spn=0.024338,0.055017&amp;z=14&amp;iwloc=A&amp;output=embed'
			});
	
			return false;
		});
		
});
