var zch = zch || [];
zch.portfolio = {
	showhide:function(e) {
		$("li.service-offered").live("mouseenter", function() {
			$(this)
				.stop().animate({width: '606px',queue:false},{duration:1000})
				.addClass("open")
				.removeClass("closed");
			$("li.service-offered")
				.not(this)
				.stop()
				.animate({width: '50px',queue:false},{duration:1000})
				.removeClass("open")
				.addClass("closed");
		});

	}
};
$(document).ready(function(e) {
	zch.portfolio.showhide();
	var sHash = window.location.hash;
	
	// remove hash
	sHash = sHash.replace("#", "");
	
	// design Pane is open by default
	var isPaneOpen = true;
	if(sHash !="") {
		
		// all panes are now shut
		var isPaneOpen = false;
		$("li.service-offered").each(function() {
			var paneToOpen = this.id;
			if(paneToOpen.match(sHash)) {
				$(this).removeClass("closed").addClass("open");
				
				// pane is now open
				isPaneOpen = true;
			} else {
				$(this).removeClass("open").addClass("closed");
			}
		});
		
		// there is a hash value but has not opened any panes so open the design one by default
		if(isPaneOpen === false) {
			$("#design").removeClass("closed").addClass("open");
		}
	}
	
});





