// Manage placeholder for inputs
function add_placeholder(e, placeholder) {
	if ($(e).val() == '')
		$(e).val(placeholder);
		
	$(e).focus(function() {
		if ($(this).val() == placeholder)
			$(this).val('');
	});
	
	$(e).blur(function() {
		if ($(this).val() == '')
			$(this).val(placeholder);
	});
}

$(document).ready(function() {
	// Ajax popups
	$(".colorbox").colorbox();
	 $(".find_mannequin").colorbox({height:'550px'});

	// Fonts replacement
	Cufon.replace($('h2'), {'fontFamily':'Futura Hv BT'});
	Cufon.replace($('h3'), {'fontFamily':'Futura Bk BT'});
	Cufon.replace($('.futura_light'), {'fontFamily':'Futura Bk BT'});
	Cufon.replace($('#cms h1'), {'fontFamily':'Futura Hv BT'});
	Cufon.replace($('#cms h2'), {'fontFamily':'Futura Bk BT'});
	Cufon.replace($('#header_menu a'), {'fontFamily':'Helvetica Neue'});
	Cufon.replace($('#header_menu span'), {'fontFamily':'Helvetica Neue'});
	Cufon.replace($('h1'), {'fontFamily':'Futura Hv BT'});

	// Manage 'soul' popup
	$('#soul_inner').css('display', 'none');

	$('#soul_btn').click(function(){
		$('#soul_inner').slideToggle('fast');
	});
	
	// Main Menu 
	$('.menu-level2').css('display', 'none');			
	$('.menu-level3').css('display', 'none');			

	$('.menu-level1').hoverIntent({
		over: function() {
			$(this).find('.menu-level2').show();
		},
		out: function() {
			$(this).find('.menu-level2').hide();
			$(this).find('.menu-level3').hide();			
		}
	});
	$('.menu-level2 li').hoverIntent({
		over: function() {
			$(this).find('.menu-level3').show();
		},
		out: function() {
			$(this).find('.menu-level3').hide();
		},
		timeout: 200 // prevent the submenu from disapparing too soon
	});
});

