$(document).ready(function(){
	
	// H1 font cserelo
	Cufon.replace('h1');
	$('h1').show();

	if ($("div.distributive h2").length) {
		Cufon.replace('h2');
		$('h2').show();
	}
	
	// random idézet megadása a nyitón
	if (typeof citesCount != 'undefined') {
		var t = $("#indexroom_flash").attr("title");
		$("#indexroom_flash").attr("title", t + Math.floor(Math.random() * citesCount));
	}
	
	// Flash beillesztese
	$('.flash_replace').each(function() {
		flashembed(""+ $(this).attr('id') +"", {src:"/static/aegon_babamama/impl/f/"+ $(this).attr('title')});
		$(this).removeAttr('title');
	});
	
	// Input autocomplete off
	$(":input").attr("autocomplete","off");
	
	// Inputholder div-nek hover-re es focus-ra class-t ad a formokban
	$('div.inputholder input, div.inputholder textarea').hover(function() {
		$(this).parent().addClass('inputholder_hover');
	}, function() {
		$(this).parent().removeClass('inputholder_hover');
	});
	$('div.inputholder input, div.inputholder textarea').focus(function() {
		$(this).parent().addClass('inputholder_focus');
	});
	$('div.inputholder input, div.inputholder textarea').blur(function() {
		$(this).parent().removeClass('inputholder_focus');
		if ($(this).val() != "") {
			$(this).parent().addClass('inputholder_filled');
		} else {
			$(this).parent().removeClass('inputholder_filled');
		}
	});
	
	// Szep select-eket csinal (jquery.stylish-select.js)
	if ($("div.select").length) {
		$('div.select select').sSelect({ddMaxHeight: '189px'});
	}
	
});

