$(document).ready(function(){

// 	function fadeOut() {
// 		$('#content').fadeOut(250, function(){ return true; });
// 	}
// 
// 	$('a').click(fadeOut);

	if($('ul.hide').length > 0) {
		$('ul.hide').hide();
		$('#main li:first a').click(function(){
			$(this).addClass('active');
			$('ul.hide').slideDown(300);
			return false;
		});
	}

	if($('ul.show').length > 0) {
		$('ul.show').hide();
		$('ul.show').slideDown(500);
	}

	if($('#gallery').length > 0) {
		if(!start_show) start_show = 0;
		$('#gallery').cycle({ 
			// prev:   'a.prev', 
			next:   'a.next', 
			timeout: 0,
			speed: 500,
			startingSlide: start_show,
			before: function(){
				$('#caption').html(this.alt);
			}
		});
	}

	// work preview on homepage	
	if($('#work_preview').length > 0) {
		$('#work_preview img').hide();
		$('#work_preview img:first').show();	
		$('#work_preview').hide().fadeIn(300, function() { 
			$('#work_preview').cycle({ timeout: 1500, speed: 1500});
		});
	}
	




});
