var imageVisible = 0;
var transitionTime = 1000;

initForIE();

function initForIE() {
	if(!Array.indexOf){
	    Array.prototype.indexOf = function(obj){
	        for(var i=0; i<this.length; i++){
	            if(this[i]==obj){
	                return i;
	            }
	        }
	        return -1;
	    }
	}
}

$(init);

function init() {
	$("section.text details").hide();
	if($("section.text details p").size()>=1 && $("section.text details p:first").html()!='') {
		$("#readMoreLink").show();
	}
	//$("nav#work").hide();
	$("nav#work li div details").hide();
	//$("header nav ul li.work").click(toggleWorkNav);
}

function toggleWorkNav() {
	if($("nav#work:visible").size()==0) {			
		$("section.text").fadeOut();
		$("section.images").fadeOut();
		$("section.content").fadeOut();
	} else {				
		$("section.text").fadeIn();
		$("section.images").fadeIn();
		$("section.content").fadeIn();
	}
	$("nav#work").toggle("blind");
}


function readMore() {
	$("#readMoreLink").hide();
	$("#readLessLink").show();
	$("section.text details").show("blind");
}

function readLess() {
	$("section.text details").hide("blind");
	$("#readMoreLink").show();
	$("#readLessLink").hide();
}		