//Content Items	

	$(document).ready(function() {
						   
	var hash = window.location.hash.substr(1);
	var href = $('#menugroup a').each(function(){
		var href = $(this).attr('href');
		if(hash==href.substr(0,href.length-5)){
			var toLoad = hash+'.html #content-item';
			$('#content-item').load(toLoad)
		}											
	});

	$('#menugroup a').click(function(){
								  
		var toLoad = $(this).attr('href')+' #content-item';
		$('#content-item').hide('fast',loadContent);
		$('#load').remove();
		$('#content-wrapper01').append('<span id="load">Loading...</span>');
		$('#load').fadeIn('normal');
		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
		function loadContent() {
			$('#content-item').load(toLoad,'',showNewContent())
		}
		function showNewContent() {
			$('#content-item').show('normal',hideLoader());
		}
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
		return false;
		
	});
	

//Product Items

	var hash = window.location.hash.substr(1);
	var href = $('#productwrapper a').each(function(){
		var href = $(this).attr('href');
		if(hash==href.substr(0,href.length-5)){
			var toLoad2 = hash+'.html #product-item';
			$('#product-item').load(toLoad2)
		}											
	});

	$('#productwrapper a').click(function(){
								  
		var toLoad2 = $(this).attr('href')+' #product-item';
		$('#product-item').hide('fast',loadContent);
		$('#load').remove();
		$('#content-wrapper02').append('<span id="load">Loading...</span>');
		$('#load').fadeIn('normal');
		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
		function loadContent() {
			$('#product-item').load(toLoad2,'',showNewContent())
		}
		function showNewContent() {
			$('#product-item').show('normal',hideLoader());
		}
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
		return false;
		
	});

//End
});
