$(document).ready(function(){
	// ALL ANCHORS LINKING TO JPEG FILES WILL OPEN IN FANCYBOX (single image, no navigation or caption)
	$('a[href*=.jpg]').fancybox({
		'titlePosition'	: 'over', 
		'imageScale'					: true, 
		'overlayShow'					: true, 
		'overlayColor'				: '#000', 
		'overlayOpacity'			:	0.90, 
		'hideOnOverlayClick'	: true, 
		'transitionIn'	: 'none', 
		'transitionOut'	: 'none'
	});
	// ANCHORS WITH rel="gallery" WILL OPEN IN FANCYBOX GALLERY MODE (navigation, captions, slide numbers)
	$(".gallery a, a[rel=gallery]").fancybox({
		'titlePosition' 	: 'over',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'imageScale'					: true, 
		'overlayShow'					: true, 
		'overlayColor'				: '#000', 
		'overlayOpacity'			:	0.90, 
		'hideOnOverlayClick'	: true, 
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">' + title + '<br> Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
		}
	});
	$('#cycle').cycle({
	  fx: 'fade', 
	  speed: 600, 
	  timeout: 3000, 
	  next: '#nextSlide', 
	  prev: '#prevSlide', 
	  pause: 1
	});
	$("ul.zoom li").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
			.animate({
				marginTop: '-110px', 
				marginLeft: '-110px', 
				top: '50%', 
				left: '50%', 
				width: '174px', 
				height: '174px',
				padding: '20px' 
			}, 200);
		
		} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
			.animate({
				marginTop: '0', 
				marginLeft: '0',
				top: '0', 
				left: '0', 
				width: '100px', 
				height: '100px', 
				padding: '5px'
			}, 400);
	});
	
	
	//Main Navigation
	$("div#menu ul#nav li").hover(function(){
        $('ul:first',this).css('visibility', 'visible');
    }, function(){
        $('ul:first',this).css('visibility', 'hidden');
    });
    
    
 
	
	
    $(".carousel ul").liScroll({travelocity: 0.15}); 
	
	
	
	
	
	
	
});