$(document).ready(function () {

		/* @Accordian */
	/* ------------------------------ */

	$('.acCont').hide();

	$('.acContBtn').click(function() {
		$(this).next('.acCont').slideToggle('normal').parent().toggleClass('activeCont');
		return false;
	});

	var timers = new Array();
	$('#nav li.dropdown').each(function (i) {
		$(this).hover(
			function() {
				clearTimeout(timers[i*2]);
				clearTimeout(timers[i*2+1]);
				var elem = $(this);
				elem.addClass('mouseover');
				if (elem.find('.drop-cont').is(':visible')) return;
				timers[i*2] = setTimeout(function() {
					elem.find('.drop-cont').show();
				}, 0);
			},
			function() {
				clearTimeout(timers[i*2]);
				clearTimeout(timers[i*2+1]);
				var elem = $(this);
				elem.removeClass('mouseover');
				if (elem.find('.drop-cont').is(':hidden')) return;
				timers[i*2+1] = setTimeout(function() {
					elem.find('.drop-cont').fadeOut("slow");
				}, 20);
			}
		);
	});
	
	$("a#lbi").fancybox({
		'titleShow'     : false
	});
	
	
});

function openExternalWin(product, url) {
	if(! confirm("Thank you for visiting " + product + ".com.\n\nMerck does not review or control the content at the site to which this hyperlink connects;\ntherefore, this hyperlink does not constitute an endorsement by Merck of the content of any\nnon-Merck site.\n\nDo you wish to continue?"))
			return false;

	var externalWin = window.open(url,null,"toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1");
	if (externalWin.opener == null)
		externalWin.opener=window;
	externalWin.opener.name="opener";
	return false;
}

/*jQuery(function($){		 
			var container = $("#banner");
			$('body').css({marginTop: '104px', backgroundPosition: '0 104px'});				
				$("#close_btn a").click(
					function(event){
						event.preventDefault();						 
						if (container.is(":visible")){						 
							container.slideUp(600);			
							$('body').css({marginTop: '0', backgroundPosition: '0 0'});		
							$.cookie('bannerClose', 'collapsed');							
						} else {						 
							container.slideDown(600);	
							$('body').css({marginTop: '104px', backgroundPosition: '0 104px'});		
							$.cookie('bannerOpen', 'open');							
					}
				}
			);
			
			var bannerClose = $.cookie('bannerClose');
			var bannerOpen = $.cookie('bannerOpen');
				if (bannerClose == 'collapsed') {
					$('#banner').css("display","none");
					$('body').css({marginTop: '0', backgroundPosition: '0 0'});
				};
				if (bannerOpen == 'open') {
					$('#banner').css("display","block");
					$('body').css({marginTop: '104px', backgroundPosition: '0 104px'});		
				};
			
		});*/
