$(document).ready(function(){
$('#portfolio').hide();
$('#resume').hide();
$('#contact').hide();
$('.detail').hide();	

//show main sections
	$('h3 a').click(function(){
		var section = '"#main div' + $(this).attr('href') + '"';
		//alert(section);   
		$(section).show('5').siblings("div").hide();
	});
//show project details
	$('.thumb a').click(function(){
		var detailContainer = '"#portfolioDetails div' + $(this).attr('href') + '"';   
		$(detailContainer).show('5').siblings('.detail').hide();
	});
//hide project details
	$('.close').click(function(){
		$('.detail').hide();
	});
	var winW = 630, winH = 460;
	if (document.body && document.body.offsetWidth) {
	 winW = document.body.offsetWidth;
	 winH = document.body.offsetHeight;
	}
	if (document.compatMode=='CSS1Compat' &&
	    document.documentElement &&
	    document.documentElement.offsetWidth ) {
	 winW = document.documentElement.offsetWidth;
	 winH = document.documentElement.offsetHeight;
	}
	if (window.innerWidth && window.innerHeight) {
	 winW = window.innerWidth;
	 winH = window.innerHeight;
	}
	$('div.detail').css('minHeight', winH)
	$('div.detail img').css('maxHeight', '511px')
	//alert('Window width = '+winW+', Window height = '+winH);
	$('.detail p a').nyroModal();
});


