jQuery.noConflict();
jQuery(document).ready(function(){ 
	jQuery.fn.cycle.defaults.speed = 4000;
	jQuery.fn.cycle.defaults.timeout = 1000;

	jQuery('#images').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		nowrap: 0, // we only want to do this once
		end: function() {
		}
	});
	jQuery(".popup1").fancybox({
		'width'				: 600,
		'height'			: 500,
		'autoScale'			: false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'overlayOpacity'	: '0.7',
		'overlayColor'		: '#000000',
		'centerOnScroll'	: 'true',
		'scrolling'			: 'auto'
	});
	jQuery(".popup2").fancybox({
		'width'				: 500,
		'height'			: 400,
		'autoScale'			: false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'overlayOpacity'	: '0.7',
		'overlayColor'		: '#000000',
		'centerOnScroll'	: 'true',
		'scrolling'			: 'auto'
	});
	jQuery(".popup3").fancybox({
		'width'				: 500,
		'height'			: 470,
		'autoScale'			: false,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
		'overlayOpacity'	: '0.7',
		'overlayColor'		: '#000000',
		'centerOnScroll'	: 'true',
		'scrolling'			: 'auto'
	});
	jQuery(".inlinePopup").fancybox({
		'autoScale'			: true,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'none',
		'overlayOpacity'	: '0.7',
		'overlayColor'		: '#000000',
		'centerOnScroll'	: 'true',
		'scrolling'			: 'no',
		'type'				: 'inline'
	});
	jQuery("a[rel=image_group]").fancybox({
		 'overlayOpacity' : '0.7',
		 'overlayColor' : '#000000',
		 'transitionIn' : 'fade',
		 'transitionOut' : 'none',
		 'titlePosition' : 'over',
		 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
		 return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
	 }
	 });
	jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	};

    jQuery('#mycarouselOne').jcarousel({
        visible: 3,
		easing: 'swing',
        animation: 1000
    });
	jQuery('#mycarouselTwo').jcarousel({
        visible: 3,
		easing: 'swing',
        animation: 1000
    });
	jQuery('#mycarouselThree').jcarousel({
        visible: 3,
		easing: 'swing',
        animation: 1000
    });
});   
