/*
* jQuery Infinite Carousel
* @author admin@catchmyfame.com - http://www.catchmyfame.com
* @version 3.0.2
* @date February 2, 2012
* @category jQuery plugin
* @copyright (c) admin@catchmyfame.com (www.catchmyfame.com)
* @license CC Attribution-Share Alike 3.0 - http://creativecommons.org/licenses/by-sa/3.0/
*/
$(window).load(function(){
$("#carousel ul").infiniteCarousel({
imagePath: '/templates/buis_event/javascript/infinitecarousel/images/',
transitionSpeed: 450,
displayTime: 4000,
internalThumbnails: false,
thumbnailType: 'none',
customClass: 'myCarousel',
progressRingColorOpacity: '0,0,0,.5',
progressRingBackgroundOn: false,
easeLeft: 'easeOutExpo',
easeRight:'easeOutQuad',
inView: 1,
advance: 1,
autoPilot: true,
prevNextInternal: true,
autoHideCaptions: false
});
checkMainPageHeight();
});
(function($){
$.fn.extend({
infiniteCarousel: function(options)
{
var defaults =
{
transitionSpeed: 800,
displayTime: 6000,
displayProgressRing: true,
progressRingColorOpacity: '0,0,0,.5',
progressRingBackgroundOn: true,
progressRingBackgroundColorOpacity: '255,255,255,.5',
thumbnailType: 'none', // buttons, images, numbers, count, or none
easeLeft: 'linear',
easeRight: 'linear',
imagePath: '/js/infinitecarousel/images/',
inView: 1,
margin: 0,
advance: 1,
customClass: null,
showControls: true,
autoHideCaptions: false,
autoPilot: false,
prevNextInternal: true,
internalThumbnails: false,
enableKeyboardNav: true,
onSlideStart: function(){},
onSlideEnd: function(){},
onPauseClick: function(){},
onPlayClick: function(){}
};
var options = $.extend(defaults, options);
return this.each(function() {
var o=options;
var obj = $(this);
var randID = Math.round(Math.random()*100000000);
var numItems = $('li', obj).length; // Number of items
var captions=[]; // captions array
var links=[]; // links array
var itemSources=[]; // sources array
var vidThumb=[]; // video thumbnails (supplied by the longdesc attribute in the iframe)
var widthSource,heightSource; // width and height of each item
var nextLeft,nextRight; // pointers to the next array index for moving left and right
var clrTimerInterval; // interval handle variable for timer and autoPilot
var u,elapsedTime=0;
var canvasSupported = "HTMLCanvasElement" in window;
$('li',obj).each(function(index){ // populate arrays
captions.push( $('span',this).html().replace(/~/g,"
") );
links.push( $('a',this).attr('href') );
vidThumb.push( $(this).find('iframe').attr('longdesc') );
itemSources.push( $(this).find('img, iframe').attr('src') ); // finds images and youtube and vimeo iframe sources
});
// Check for improper values in inview and advance
if(o.inView > numItems) o.inView = numItems; // Prevent trying to view more images than given
if(o.advance > o.inView) o.advance = o.inView; // Prevent advancing more than inView images at a time
// Dimensions should be set explicitly on the items so that we don't have to defer loading code until the images are loaded
widthSource = $(this).find('img, iframe').width();
heightSource = $(this).find('img, iframe').height();
// Build carousel container
$(obj).replaceWith('