
	function ie6(){
		$('.menu li').each(function(){
			$(this).hover(
				function(){
					$(this).addClass('hover');
				},
				function(){
					$(this).removeClass('hover');
				}
			);
		});
	}

	function eqh(e){
		var h = 0;
		e.each(function(){
			var t = $(this).height()
			if(h <= t) h = t;
		});
		e.height(h);
	}

	function flash(){
		if($('#gallery')){
			$('#gallery').flash({
				src: '/galleries/slideshowpro.swf',
				width: '760',
				height: '505',
				allowfullscreen: 'false',
				allowscriptaccess: 'always',
				wmode: 'transparent',
				base: '../../',
				flashvars: {
					paramXMLPath: '/galleries/params.xml',
					initialURL: escape('http://harveynormam.local/')
				}
			});
		}
	}
	function cyc(){
		$('.banner div div.text').cycle({
			cleartypeNoBg: true,
			cleartype: true
		});
	}
function tabToggle(tabs){
	$(tabs).each(function(){
		var panel = $($(this).attr('href'));
		var sibs = panel.siblings();
		panel.css('left',-panel.outerWidth());
		$(this).click(function(ev){
			ev.preventDefault();
			sibs.each(function(){
				$(this).animate({'left':-$(this).outerWidth()});
			});
			panel.animate({
				'left': (parseInt(panel.css('left'),10) == 0) ? -panel.outerWidth() : 0
			});
		});
	});
}
/*
function menu(pageids){
	$('li.level-1').each(function(idx){
		var header = $('div.head');
		var div = $(this).children('div.level-2-wrapper');
		if(div.length)
		{
			var ul = div.children('ul.level-2');
			if($.inArray('page-1', pageids) == -1){ // If not homepage
				header.css('height', '159px');
			}else{
				header.css('height', '129px');
			}

			var pageclass = ($(this).attr('class')).match(/page-\d{1,4}/)[0];

			if($.inArray(pageclass, pageids) > -1){ // if current page or parent of current
				div.css('overflow', 'visible').show();
				ul.css('top', 0);
			}else{
				div.css('overflow', 'hidden').hide();
				ul.css('top', -ul.outerHeight());
				$(this).hover(function(ev){
					div.css('overflow', 'hidden');
					header.stop().animate({
						'height': '159px'
					});
					div.show(200, function(){
						ul.stop().animate({
							'top': '0'
						}, 400);
						header.css('overflow','visible');

					}).css('overflow','visible');;
				}, function(ev){
					div.css('overflow','hidden');
					ul.stop().animate({
						'top': '-30px'
					}, 200, function(){
						if($.inArray('page-1', pageids) === -1){
							div.hide(400);
						}
					});
					if($.inArray('page-1', pageids) >= 0){
						div.css('overflow','hidden');
						header.stop().animate({
							'height': '129px',
						},250, function(){

							header.css('overflow','visible');
						});
					}
				});
			}

		}
	});
}
*/
function menu(pageids){
	$('li.level-1').each(function(){
		$(this).children('div').hide();
		var pageclass = ($(this).attr('class')).match(/page-\d{1,4}/)[0];
		if($.inArray(pageclass, pageids) >= 0 && pageclass != 'page-1'){
			$(this).children('div').show();
			$('div.head').css('height','159px');
		}else if(pageclass == 'page-1'){
			$(this).children('div').hide();
		}
	});
}






	// Initialise jQuery this way to protect the dollar from other scripts
	(function($){
		$(document).ready(function(){
			ie6();
			cyc();
		});

	})(jQuery)
