$(function() {
  $("ul.footer-links li a.sitemap").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'overlayColor'	:	'#000',
		'height'		:	'500',
		'width'			:	'760',
		'type'			:	'ajax',
		'centerOnScroll'	:	true,
		'autoDimensions'	: 	false
	});

	$("ul.footer-links li a.footer-link").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'overlayColor'	:	'#000',
		'height'		:	'100%',
		'width'			:	'920',
		'type'			:	'ajax',
		'centerOnScroll'	:	true,
		'autoDimensions'	: 	false
	});

	$("#gallery .image a").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'overlayColor'	:	'#000',
		'width'			:	950,
		'centerOnScroll'	:	true
	});

	//external links
	$("a[rel='external']").attr("target", "_blank");

	// social link hovers
	$("div.social-links ul li a").tooltip({ effect: 'fade' });

	// menu JS
	$("ul.glob-links li.parent").mouseover(function() {
		$(this).children(".brands-submenu").show();
	});
	$("ul.glob-links li.parent").mouseout(function() {
		$(this).children(".brands-submenu").hide();
	});

	$(".sidebar.videos .video a").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'overlayColor'	:	'#000',
		'width'			:	690,
		'centerOnScroll'	:	true,
		'type'			:	'ajax',
		'height'		:	'100%'
	});

  // consumer homepage brands JS
  $("ul.consumer-home li a").mouseenter(function() {
    $(this).next(".brand-overview").fadeIn("fast");
  }).mouseleave(function() {
    $(this).next(".brand-overview").fadeOut("fast");
  });


//$("input[placeholder], textarea[placeholder]").trigger("blur.placeholder");

	// pod height //
	if ($('a.full-link[href*="http://www.nouveaubeautygroup.com/salon-finder/?brand="]').length > 0) {
		var parent = $('a.full-link[href*="http://www.nouveaubeautygroup.com/salon-finder/?brand="]').parent();
		$('a.full-link[href*="http://www.nouveaubeautygroup.com/salon-finder/?brand="]').css('height', 104);
		$(parent).parent().css('height', 100);
		$(parent).parent().parent().css('height', 100);
		$(parent).css('height', 100);
		$(parent).css('background-position', 'top !important');
	}
});




