/* ================================================================ 
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
=================================================================== */
/* custom-ied.js */
/* <![CDATA[ */
$(document).ready(function(){


if($.browser.msie && $.browser.version=="6.0")  {	//If IE6, do this:				 

	/* CONFIG */
	/* set start (sY) and finish (fY) heights for the list items */
	
	sY = 38; /* height of li.sub */
	fY = 155; /* height of maximum sub lines * sub line height */
	/* end CONFIG */
	
	/* open first list item */
	animate (fY)
	
	$("#slide .sub").not(".subpage #slide .sub").not("#slide .sub p").click(function() {
		if (this.className.indexOf('clicked') != -1 ) {  
			animate(sY)
			$(this)			.removeClass('clicked')
							.css("background", "url(images/p_05_ie.png) no-repeat top center")
							.css("color", "#ffffe6");
			}
			else {
			animate(sY)
			$('.clicked')	.removeClass('clicked')
							.css("background", "url(images/p_05_ie.png) no-repeat top center")
							.css("color", "#ffffe6");
			$(this)			.addClass('clicked');
			animate(fY)
		}
	});
	
	function animate(pY) {
	$('.clicked').animate({"height": pY + "px"}, 500);
	}
	
	$("#slide .sub")		.hover(function(){
	$(this)					.css("background", "url(images/p_05_o_ie.png) no-repeat top center")
							.css("color", "#ffffe6");
	},function(){
	if (this.className.indexOf('clicked') == -1) {
	$(this)					.css("background", "url(images/p_05_ie.png) no-repeat top center")
							.css("color", "#ffffe6");
	}
	});
	
	$('#contact').find('table.drop').hide().end().find('h3').hover(function() { $('table.drop').slideToggle(); });
	






} else { // If not IE6, do this:



	
	/* CONFIG */
	/* set start (sY) and finish (fY) heights for the list items */
	
	sY = 38; /* height of li.sub */
	fY = 155; /* height of maximum sub lines * sub line height */
	/* end CONFIG */
	
	$("#slide .sub").not(".subpage #slide .sub").not("#slide .sub p").click(function() {
		if (this.className.indexOf('clicked') != -1 ) {  
			animate(sY)
			$(this)			.removeClass('clicked')
							.css("background", "url(images/p_05.png) no-repeat top center")
							.css("color", "#ffffe6");
			}
			else {
			animate(sY)
			$('.clicked')	.removeClass('clicked')
							.css("background", "url(images/p_05.png) no-repeat top center")
							.css("color", "#ffffe6");
			$(this)			.addClass('clicked');
			animate(fY)
		}
	});
	
	function animate(pY) {
		$('.clicked').animate({"height": pY + "px"}, 500);
	}
		
	$("#slide .sub")	.hover(function(){
		$(this)					.css("background", "url(images/p_05_o.png) no-repeat top center")
								.css("color", "#ffffe6");
	},function(){
		if (this.className.indexOf('clicked') == -1) {
			$(this)				.css("background", "url(images/p_05.png) no-repeat top center")
								.css("color", "#ffffe6");
		}
	});
		
	$('#contact').find('table.drop').hide().end().find('h3').hover(function() { $('table.drop').slideToggle(); });
	


	/* open first list item */
	animate(fY)

   
	
	
}





}); //end of document.ready
/* ]]> */


