jQuery(document).ready(function($){
	$('.menu-header .shop').hover(function(){
		$('#submenu').fadeIn();
		$('.submenu-brochures').hide();
		$('.submenu2-brochures').hide();
	});
	$('#submenu').mouseleave(function(){
		$(this).fadeOut();
	});
	$('#submenu').mouseenter(function(){
		$('.menu-header .shop').addClass('current-menu-item');
	});
	$('#submenu').mouseleave(function(){
		$('.menu-header .shop').removeClass('current-menu-item');
	});
	$('.menu-header .shop.current-menu-item').each(function(){
		$('#smenu').show();
		$('.submenu-brochures').hide();
		$('.submenu-brochures').mouseleave(function(){
			$('#smenu').fadeIn();
			$('.submenu-brochures').hide();
		});
	});
	
	$('.menu-header .brochures').hover(function(){
		$('.submenu-brochures').fadeIn();
		$('#submenu').hide();
		$('#smenu').hide();
	});
	$('.submenu-brochures').mouseleave(function(){
		$(this).fadeOut('slow');
	});
	$('.submenu-brochures').mouseenter(function(){
		$('.menu-header .brochures').addClass('current-menu-item');
	});
	$('.submenu-brochures').mouseleave(function(){
		$('.menu-header .brochures').removeClass('current-menu-item');
	});
	$('.menu-header .brochures.current-menu-item').each(function(){
		$('.submenu2-brochures').show();
		$('#submenu').hide();
		$('#submenu').mouseleave(function(){
			$('.submenu2-brochures').fadeIn();
			$('#submenu').hide();
		});
	});
	$('#content-category').each(function() {
		$('.menu-header .brochures').addClass('current-menu-item');
		$('.submenu2-brochures').show();
		$('.menu-header .shop').hover(function(){
			$('#submenu').fadeIn();
			$('.submenu2-brochures').hide();
		});
		$('#submenu').mouseleave(function(){
			$('#submenu').hide();
			$('.submenu2-brochures').fadeIn();
		});
	});
	
	$('#promotie .category-new h3').replaceWith('<h1>Nieuw bij Heemskerk Sport</h1>');
	$('#promotie .product:last-child').removeClass('product').addClass('product-last');
	$('#shopp .product:last-child').removeClass('product').addClass('product-last');
	
	$('#advertentie').easySlider({
		auto: true, 
		continuous: true,
		numeric: true,
		numericId: 'controls',
		speed: 1000,
		pause: 10000
	});
	
	$('#controls li:last-child').css('margin','0');
	$('<div id="controls-text">Bekijk meer aanbiedingen</div>').insertBefore('#controls #controls1');
	
	$('#shopp #tafeltennis_indoor-smenu').each(function() {
		$('#shopp #tafeltennis_indoor-smenu li:first-child').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_outdoor-smenu').each(function() {
		$('#shopp #tafeltennis_outdoor-smenu li:nth-child(2)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_prof-smenu').each(function() {
		$('#shopp #tafeltennis_prof-smenu li:nth-child(3)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_netpost-smenu').each(function() {
		$('#shopp #tafeltennis_netpost-smenu li:nth-child(4)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_bal-smenu').each(function() {
		$('#shopp #tafeltennis_bal-smenu li:nth-child(5)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_access-smenu').each(function() {
		$('#shopp #tafeltennis_access-smenu li:nth-child(6)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafeltennis_batjes-smenu').each(function() {
		$('#shopp #tafeltennis_batjes-smenu li:nth-child(7)').addClass('current');
		$('#smenu .shopp_categories li:first-child').addClass('current');
	});
	$('#shopp #tafelvoetbal_recreatie-smenu').each(function() {
		$('#shopp #tafelvoetbal_recreatie-smenu li:first-child').addClass('current');
		$('#smenu .shopp_categories li:nth-child(2)').addClass('current');
	});
	$('#shopp #tafelvoetbal_prof-smenu').each(function() {
		$('#shopp #tafelvoetbal_prof-smenu li:nth-child(2)').addClass('current');
		$('#smenu .shopp_categories li:nth-child(2)').addClass('current');
	});
	$('#shopp #tafelvoetbal_outdoor-smenu').each(function() {
		$('#shopp #tafelvoetbal_outdoor-smenu li:nth-child(3)').addClass('current');
		$('#smenu .shopp_categories li:nth-child(2)').addClass('current');
	});
	$('#shopp #tafelvoetbal_access-smenu').each(function() {
		$('#shopp #tafelvoetbal_access-smenu li:nth-child(4)').addClass('current');
		$('#smenu .shopp_categories li:nth-child(2)').addClass('current');
	});
	
	$('#content-shop #related .category #sortering').remove();
	$('#content-shop #related .category #shopp-related-orderby-menu').remove();
	$('#content-shop #related .product:last-child').removeClass('product').addClass('product-last');
	$('#random #sortering').remove();
	$('#random .breadcrumb').remove();
	
	$('#select .wpcf7-select').easySelectBox();
	
	$('.product .details, .product-last .details').wrap('<div class="center" />');
	$('.product .details img, .product-last .details img').wrap('<div align="center" />');
	
	$('#content-category .post:nth-child(2), #content-category .post:nth-child(4), #content-category .post:nth-child(6), #content-category .post:nth-child(8)').removeClass('post').addClass('post-left');
});
