/*
	Autor: Grzegorz Jaworek
	E-mail: grzegorz.jaworek@gmail.com
	www: http://gjaworek.pl 
	Tel.: +48 696 818 300
*/

jQuery(document).ready(function(){
	jQuery('body').prepend('<div id="loader" />');
	jQuery('#loader').height(jQuery('body').height());
	try {
		Cufon.replace('#content h2, .mail_box h4, .wp-pagenavi span, .wp-pagenavi strong', { fontFamily: 'arial' });
		Cufon.replace('#menu a, .wp-pagenavi a, .related a, .related strong', { fontFamily: 'arial', hover: true });
		Cufon.replace('#art_list a', { fontFamily: 'euphemia', hover: true  });
	} catch(err) {}
	jQuery('.totop').click(function () {
		scroll(0,0);
		return false;
	});
	jQuery('label.hide').each(function () {
		jQuery(this).next().val(jQuery(this).html());
		jQuery(this).next().attr('rel',jQuery(this).html());
		jQuery(this).next().attr('title',jQuery(this).html());
		jQuery(this).hide();
	});
	jQuery('input[type="text"], textarea').focus(function () {
		if (jQuery(this).val()==jQuery(this).attr('rel')) jQuery(this).val('');
		jQuery(this).removeClass('invalid');
		jQuery(this).addClass('active');
	});
	jQuery('input[type="text"], textarea').blur(function () {
		if (jQuery(this).val()=='') jQuery(this).val(jQuery(this).attr('rel'));
		jQuery(this).removeClass('active');
	});
});

jQuery(window).load(function(){
	jQuery('#loader').remove();
});

