//Cufon
Cufon.replace('#content .sidebar H3.cufon');

jQuery(document).ready(function(){

	// align menu
	var delta = parseInt(jQuery('#header .container').width()) - parseInt(jQuery('#header .main-menu UL').width());
	if (delta > 0) {
		var n_p = parseInt(jQuery('#header .main-menu UL LI:last A SPAN').css('paddingLeft'))+parseInt(delta / 2);
		jQuery('#header .main-menu UL LI:last A SPAN').css('paddingLeft', n_p+'px');
		//n_p = n_p - 1;
		jQuery('#header .main-menu UL LI:last A SPAN').css('paddingRight', n_p+'px');
	}
	
	jQuery('.wpcf7-form').prepend(jQuery('.wpcf7-form .wpcf7-response-output'));
	
	if (('#content .slides UL').length) {
		jQuery('#content .slides UL').cycle({
			fx: 'fade'
		});
	}
	
	jQuery('.auto-hint').each(function(){
		if (jQuery(this).val() == '') jQuery(this).val(jQuery(this).attr('title'));
	});
	jQuery('.auto-hint').focus(function(){
		if (jQuery(this).val() == jQuery(this).attr('title')) jQuery(this).val('');
	});
	jQuery('.auto-hint').blur(function(){
		if (jQuery(this).val() == '') jQuery(this).val(jQuery(this).attr('title'));
	});
	
	jQuery('.newsletter FORM').submit(function(){
		jQuery(this).children('.auto-hint').each(function(){
			if (jQuery(this).val() == jQuery(this).attr('title')) jQuery(this).val('');
		});
		return true;
	});
	
	
	
});


