$.noConflict();
jQuery(document).ready(function($) {

	$("ul.topnav li").hover(function() {
		// making this int smaller makes the menus appear sooner
		$(this).doTimeout('hover', 500, function(){ 
			$(this).find("ul.level0").fadeIn('fast');
			$(this).hover(function() {
				//
			}, function() {
				$(this).parent().find("ul.level0").fadeOut('fast');
			});
		});
	}, function() {
		$(this).doTimeout('hover');
	});

	$('input#q').focus(function(){
		if ($(this).val() == 'Search website:') {
			$(this).val('');
		}}
	).blur(function(){
		if ($(this).val() == '') {
			$(this).val('Search website:');
		}}
	);
	
	var zIndexNumber = 10000000;
	$('.level0 li').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
	$('.level0').css('zIndex', 5000);
	
	
	$(".options-list").each(function() {
		$(this).children("li").children("input:first").trigger("click");
		console.log("initial custom options automatically selected");
	});
	
	$(".delivery-link a").click(function() {
		$(".product-collateral .product-tabs-content").each(function() {
			$(this).hide();
		});
		$(".product-collateral li").each(function() {
			$(this).removeClass("active");
		});
		$("#product_tabs_deliveryinformation_contents").show();
		$("#product_tabs_deliveryinformation").addClass('active');
	});
});


