// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults


$(document).ready(function() {
		
		// if($(".homepage_works").length == 1) {
		// 	var max_height = 0;
		// 	$(".fademe .work").each(function() { 
		// 		if(max_height < $(this).height()) max_height = $(this).height();
		// 	})
		// 	max_height = max_height + $("#message").height() + 50;
		// 	if(max_height > $("#main").height()) $("#main").attr("style","height: " + max_height + "px !important; min-height: " + max_height + "px !important");
		// }
		$(".fademe").cycle({fx: "fade"})
		
		
		$('#portfolio').innerfade({
						speed: 'slow',
						timeout: 4000,
						type: 'sequence',
						containerheight: '400px'
		});
		
})




function subnav(item,section) {
	$("#subnavigation li").removeClass("on")
	$("#content .section").hide();
	$("#content #" + section).show();
	$(item).parent().addClass("on")
	
	
}

function showWork(index) {
	$("#selected_works .work").hide();
	$("#work_" + index).show()
}