$(document).ready(function() {
	$('.projectCycle').cycle({
		timeout: 0,
		speed: 500,
		slideExpr: 'div',
		containerResize: 0,
		prev: '.prev', 
		next: '.next',
		after: onAfter
	});
	
	// var projHeight = $(window).height();
	// var projPad = $('#projectInfo').css('paddingTop');
	// projPad = projPad.replace(/px/g,'');
	// projHeight = projHeight-projPad;
	// projHeight = projHeight-150+'px';
	// projHeight = projHeight+'px';
	// alert(projHeight);
	// $('#projectInfo').css('height',projHeight);	
	// alert(projHeight);
	
	// show and hide for project info
	$('.projInfoShow').click(function() {
		$('#projectInfo').show();
		return false;
	});
	$('.projInfoHide').click(function() {
		$('#projectInfo').hide();
		return false;
	});
	
});
function onAfter(curr,next,opts) {
	var numcount = 'Image ' + (opts.currSlide + 1) + ' of ' + opts.slideCount;
	$('.numCount').html(numcount);
	//get the height of the current slide
	var $ht = $(this).height()-95;
	$('#projectInfo').css('height',$ht);
	//set the container's height to that of the current slide
	// $(this).parent().animate({height:$ht});
	// $('#projectNav').hide();
	// var textPosition = $('.projImg p:visible').position();
	// var textTop = textPosition.top;
	// $('#projectNav').animate({top:textTop+'px',opacity:'show'});
}
