var zI=1;
$.fn.hideContent=function(callback){
	return this.each(function(){
		if($(this).is(':visible')){
			$(this).slideUp(500);
		}
		if($('#coverCopy > div').index(this)==$('#coverCopy > div').length-1){
			if(typeof callback=='function')callback();
		}
	});
}
$.fn.displayContent=function(){
	return this.each(function(){
		if($(this).height()>360){
			var newHeight=$(this).height()+304;
			$('#cover, .center_rightColumn').animate({height:newHeight},500);
		}else{
			$('#cover, .center_rightColumn').animate({height:664},500);
		}
		$(this).css('z-index',zI).slideDown(500);
		zI++;
	});
}
$(document).ready(function(){
	$('#coverCopy div').css({visibility:'visible'});
	$('#coverCopy > div').css({
		display:'none',
		position:'absolute',
		top:'180px',
		left:'72px'
	});
	$('#coverCopy select').change(function(){
		$('#coverCopy > div').hideContent(function(){
			$('#coverCopy > div').eq($('#coverCopy select option').index($('#coverCopy select option:selected'))).displayContent();
		});
	}).change();
});