jQuery.noConflict();
jQuery(document).ready(function() {
		$galleryContainer = jQuery("#gallery");
		
		if ($galleryContainer.length)
		{
			$galleryContainer.easySlider
			({
				prevId:			'prevBtn',
				nextId:			'nextBtn',	
				auto:			true,
				pause:			3000,
				continuous:		true,
				numeric:		true,
				numericId:		'controls',
				numericPrev:	true,
				numericNext:	true
			});
		}
		
		jQuery('div.tribeca-gallery')
		
			.find('.gallery-info a.view-larger')
				.bind
				(
					'click',
					function(event)
					{
						jQuery(this).closest('li').find('a[rel=gallery]').trigger('click');
						event.preventDefault();
					}
				)
				.end()
				
			.find('a[rel=gallery]')
				.fancybox
				({
					transitionIn	: 'elastic',
					transitionOut	: 'elastic',
					titlePosition	: 'over',
					titleFormat		: function(title, currentArray, currentIndex, currentOpts)
					{
						return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
					}
				}).end()

            .find('li a[rel=gallery] img')
				.lazyload
				({
					placeholder: '../images/ajax-loader.gif',
					effect: 'fadeIn',
					effectSpeed: 3000,
					failurelimit: 3
				});


            jQuery("#nav > div > ul > li > a").append("<span class='space'></span>");
            jQuery("#nav > div > ul > li > ul").parent("li").addClass("parent");

		
		
});

