(function($){

	// comment out in production
	$.ajaxSetup ({
		cache: false
	});

	// projects page
	$("div.project a").bind("mouseenter mouseleave", function(e){
		$("p", this)[ e.type === "mouseenter" ? "fadeIn" : "fadeOut"]("fast");
	});
	
	var image = $("#project-view-placeholder img"),
		div = image.next();
	
	if(image.length){
		$("#project-view-scroll").delegate("a", "click", function(){
			var $this = $(this);
			
			if($this.hasClass("moreinfo")){
				image.addClass("hide");
				div.load(this.href).removeClass("hide");
			} else {
				image.attr("src", this.href).removeClass("hide");
				div.addClass("hide");
			}
			
			return false;
		});
	}

})(jQuery);

(function($){

	// comment out in production
	$.ajaxSetup ({
		cache: false
	});

	// projects page
	$("div.element a").bind("mouseenter mouseleave", function(el){
		$("p", this)[ el.type === "mouseenter" ? "fadeIn" : "fadeOut"]("fast");
	});
	
	var image = $("#element-view-placeholder img"),
		div = image.next();
	
	if(image.length){
		$("#element-view-scroll").delegate("a", "click", function(){
			var $this = $(this);
			
			if($this.hasClass("moreinfo")){
				image.addClass("hide");
				div.load(this.href).removeClass("hide");
			} else {
				image.attr("src", this.href).removeClass("hide");
				div.addClass("hide");
			}
			
			return false;
		});
	}

})(jQuery);

