$(document).ready(function() {
	$("#slider .container").scrollable({ circular:true });
	if($('#cycle').size()>0){ $('#cycle').cycle().css('zIndex',100); }
	if($("ul.tabs").size()>0){ $("ul.tabs").tabs("div.panes > div"); }
	$('a.gallery-photo').fancybox({
		'speedIn'				:	600, 
		'speedOut'				:	200, 
		'overlayShow'			:	true,
		'hideOnOverlayClick'	:	true,
		'titlePosition'			:   'inside',
		'cyclic'				:	true
	});
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
	if($('.department-image img').width()>200){
		$('.department-image img').css('width','200px');
	}
	  
	$("#navigation li, .sidebar li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function(){ $("ul", this).fadeOut("fast"); } 
	);  	 
  $('a.hidden-toggle').live('click', function(){
	if($(this).closest('.has-hidden').find('.hidden').is(':visible')){
		$(this).closest('.has-hidden').find('.hidden').slideUp('fast', function(){
			$('a.hidden-toggle strong').html('Show More &gt;');
		});
	}else{
		$(this).closest('.has-hidden').find('.hidden').slideDown('fast', function(){
			$('a.hidden-toggle strong').html('Hide More &gt;');
		});
	}
	return false;
	});
});
