$(document).ready(function() {
	$(".fo").hover(function() {
		$(this).addClass("hover");
	},function() {
		$(this).removeClass("hover");
	});
	
	$("#Email").blur(function() {
	$("#Email_uzenet").load("/check_email.php",{ Email:$(this).val() });
	
	});

	$("#Nick").blur(function() {
	$("#Nick_uzenet").load("/nick",{ Nick:$(this).val() });
	
	});
		
	
	/*$("#belepes_form").submit(function() {
		$("#belepes").load("/belepes",$(this).serializeArray());
		return false;
	});*/
	
	$("#ujhszgomb").click(function() {
		$('#hszform').slideDown();
		$("#ujhszgomb").hide();	
	});
	
	
	$("#jatek").click(function() {
		document.location="/a-jatek-menete";
		return false;
	});
	
	$("#ladak").click(function() {
		document.location="/ladak";
		return false;
	});	

	$("#forum").click(function() {
		document.location="/forum";
		return false;
	});

	$("#adatm").submit(function() {
		if ($("#jelszo").val()!="" && $("#jelszo").val()!=$("#jelszo2").val()) {
			alert("A megadott két jelszó nem egyezik meg!");
		return false;
		};
		return true;
	});
	
	
	$("#fotoform").submit(function() {
		if ($("#kep").val()=="" || $("#cim").val()=="" || $("#Lada").val()==0 ) {
			alert("Minden mezőt ki kell tölteni!");
			return false;			
		} else 
			return true;

	});

	$("#video_1").submit(function() {
		if ($("#cim").val()=="" || $("#Lada").val()==0 || $("#descr").val()=="") {
			alert("Minden mezőt ki kell tölteni!");
			return false;			
		} else 
			return true;

	});

	$("#video_2").submit(function() {
		if ($("#file").val()=="") {
			alert("Minden mezőt ki kell tölteni!");
			return false;			
		} else 
			return true;

	});
	
	$("#fotok").click(function() {
		document.location="/fotok-videok";
		return false;
	});
		
	$.mask.options =  {
		attr: 'alt', // an attr to look for the mask name or the mask itself
		mask: null, // the mask to be used on the input
		type: 'fixed', // the mask of this mask
		maxLength: -1, // the maxLength of the mask
		defaultValue: '', // the default value for this input
		textAlign: true, // to use or not to use textAlign on the input
		selectCharsOnFocus: true, //selects characters on focus of the input
		setSize: false, // sets the input size based on the length of the mask (work with fixed and reverse masks only)
		autoTab: true, // auto focus the next form element
		fixedChars : '[(),.:/ -+]', // fixed chars to be used on the masks.
		onInvalid : function(){},
		onValid : function(){},
		onOverflow : function(){}
	};
	$.mask.masks.msk = {mask: '+999999999999'}
	$('#Mobil').setMask();
	
	$(".lightbox").lightBox();
});

