diff --git a/README.md b/README.md index d80fbf6..3af3e7a 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,41 @@ http://kthornbloom.com/smoothslides ##Features -- Lightweight [3.5Kb] -- Four Animation Types: Zoom In, Zoom Out, Pan Left, Pan Right +- Lightweight [6Kb] +- Four Animation Types: Zoom In, Zoom Out, Pan Left, Pan Right, Pan Up, Pan Down - Easily add captions - CSS3 transitions for smoother effects - Responsive image sizes +- Set various defaults ##Usage - -- Include jQuery, smoothslides.js, and smoothslides.css +- Include smoothslides.css in the header +- Include jQuery and smoothslides.min.js in the footer - Create a div with a class of "ss-slides". Create each slide within as a div called "ss-slide" and place your image inside. Images should be the same size. - Want a caption? Add a title attribute to your "ss-slide" div. +- Call your script: + + + ##Browser Support - Full support: Chrome, Safari, Firefox (16+), Internet Explorer (9+) diff --git a/index.html b/index.html index 9485124..c869172 100644 --- a/index.html +++ b/index.html @@ -89,42 +89,17 @@

Smoothslides


- -

Features

- - -

Usage

-
    -
  1. Include jQuery, smoothslides.js, andsmoothslides.css
  2. -
  3. Create a div with a class of "ss-slides". Create each slide within as a div called "ss-slide" and place your image inside. Images should be the same size.
  4. -
  5. Want a caption? Add a title attribute to your "ss-slide" div.
  6. -
- - - -

Customization

-The slideshow will randomly pick animation effects as it plays. The timing of the slideshow is set in milliseconds via the playTimer variable within the javascript file. -The styling of the slideshow can be changed by editing the kenburns.styles.css file. - -

Browser Support

- - -

Download

-Find me on Github +

Download & Info

+Github
- - + + diff --git a/js/smoothslides.js b/js/smoothslides.js index 9bd74b2..4d8d45c 100644 --- a/js/smoothslides.js +++ b/js/smoothslides.js @@ -7,163 +7,233 @@ * http://www.opensource.org/licenses/mit-license.php */ -$(document).ready(function() { - var playTimer = 4000 - var convertSeconds = (playTimer/1000)-.5 - - $('.ss-slide').css({ - 'webkitTransition': 'all ' + convertSeconds + 's ease-in-out', - 'mozTransition': 'all ' + convertSeconds + 's ease-in-out', - 'transition': 'all ' + convertSeconds + 's ease-in-out' - }); - - $('.ss-slide:last').css('position','relative'); - $('.ss-slides').wrap('
'); - $('.ss-slides-wrap').append('
PrevNext'); - var caption = $('.ss-slide:last').attr('title'); - $('.ss-caption').html(caption); - - firstPlay(); - - function captionUpdater() { - if ($('.ss-slide:eq(-2)').attr('title')) { - var caption = $('.ss-slide:eq(-2)').attr('title'); - $('.ss-caption').html(caption).show(); - } - else { - $('.ss-caption').empty().hide(); - } - } + (function ($) { + $.fn.extend({ + smoothSlides: function (options) { + + // These are overridden by options declared in footer + var defaults = { + playTimer: 4000, + animEasing: 'ease-in-out', + autoanimType: 'random', + nextText: 'Next', + prevText: 'Prev', + captions: 'true', + navigation: 'true' + } + + var options = $.extend(defaults, options), + convertSeconds = (options.playTimer/1000)-.5 + + /* Set CSS transition timing and easing */ + $('.ss-slide').css({ + 'webkitTransition': 'all ' + convertSeconds + 's ' + options.animEasing, + 'mozTransition': 'all ' + convertSeconds + 's ' + options.animEasing, + 'msTransition': 'all ' + convertSeconds + 's ' + options.animEasing, + 'oTransition': 'all ' + convertSeconds + 's ' + options.animEasing, + 'transition': 'all ' + convertSeconds + 's ' + options.animEasing + }); + + $('.ss-slide:last').css('position','relative'); + $('.ss-slides').wrap('
'); + if (options.captions == 'true'){ + $('.ss-slides-wrap').append('
'); + } + if (options.navigation == 'true'){ + $('.ss-slides-wrap').append('' + options.prevText + '' + options.nextText + ''); + } + var caption = $('.ss-slide:last').attr('title'); + $('.ss-caption').html(caption); + + + function captionUpdater() { + if ($('.ss-slide:eq(-2)').attr('title')) { + var caption = $('.ss-slide:eq(-2)').attr('title'); + $('.ss-caption').html(caption).show(); + } + else { + $('.ss-caption').empty().hide(); + } + } + + function zoomIn() { + captionUpdater(); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').css({ + 'webkitTransform':'scale(1.2) rotate(2deg)', + 'msTransform':'scale(1.2) rotate(2deg)', + 'transform':'scale(1.2) rotate(2deg)' + }); + + }); + } + + function zoomOut() { + captionUpdater(); + $('.ss-slide:eq(-2)').addClass('notrans').css({ + 'webkitTransform':'scale(1.2) rotate(2deg)', + 'msTransform': 'scale(1.2) rotate(2deg)', + 'transform': 'scale(1.2) rotate(2deg)' + }); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }); + }); + } + + function panRight() { + captionUpdater(); + $('.ss-slide:eq(-2)').addClass('notrans').css({ + 'webkitTransform': 'scale(1.3) translate(-10%, 0)', + 'msTransform': 'scale(1.3) translate(-10%, 0)', + 'transform': 'scale(1.3) translate(-10%, 0)' + }); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').removeClass('notrans').css({ + 'webkitTransform':'scale(1.3) translate(0,0)', + 'msTransform':'scale(1.3) translate(0,0)', + 'transform':'scale(1.3) translate(0,0)' + }); + }); + } + + function panLeft() { + captionUpdater(); + $('.ss-slide:eq(-2)').addClass('notrans').css({ + 'webkitTransform': 'scale(1.3) translate(10%, 0)', + 'msTransform': 'scale(1.3) translate(10%, 0)', + 'transform': 'scale(1.3) translate(10%, 0)' + }); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').removeClass('notrans').css({ + 'webkitTransform':'scale(1.3) translate(0,0)', + 'msTransform':'scale(1.3) translate(0,0)', + 'transform':'scale(1.3) translate(0,0)' + }); + }); + } + + function panUp() { + captionUpdater(); + $('.ss-slide:eq(-2)').addClass('notrans').css({ + 'webkitTransform': 'scale(1.3) translate(0, 10%)', + 'msTransform': 'scale(1.3) translate(0, 10%)', + 'transform': 'scale(1.3) translate(0, 10%)' + }); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').removeClass('notrans').css({ + 'webkitTransform':'scale(1.3) translate(0,0)', + 'msTransform':'scale(1.3) translate(0,0)', + 'transform':'scale(1.3) translate(0,0)' + }); + }); + } + + function panDown() { + captionUpdater(); + $('.ss-slide:eq(-2)').addClass('notrans').css({ + 'webkitTransform': 'scale(1.3) translate(0, -10%)', + 'msTransform': 'scale(1.3) translate(0, -10%)', + 'transform': 'scale(1.3) translate(0, -10%)' + }); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + $('.ss-slide:last').removeClass('notrans').css({ + 'webkitTransform':'scale(1.3) translate(0,0)', + 'msTransform':'scale(1.3) translate(0,0)', + 'transform':'scale(1.3) translate(0,0)' + }); + }); + } + + /* Start First Animation */ + if (options.autoanimType == 'random') { + var fns = [zoomOut, zoomIn, panRight, panLeft]; + fns[Math.floor(Math.random() * fns.length)](); + } else if (options.autoanimType == 'false') { + // + } else { + eval(options.autoanimType + "()"); + } + + /* Subsequent Auto Animations */ + var fn = function () { + if (options.autoanimType == 'random') { + var fns = [zoomOut, zoomIn, panRight, panLeft, panUp, panDown]; + fns[Math.floor(Math.random() * fns.length)](); + } else if (options.autoanimType == 'false') { + // + } else { + eval(options.autoanimType + "()"); + } + } + var myInterval = setInterval(fn, options.playTimer); + + /* Pause On Hover */ + $('#ss-prev, #ss-next').hover(function(ev){ + clearInterval(myInterval); + }, function(ev){ + myInterval = setInterval(fn, options.playTimer); + }); + + /* Next Button */ + $('#ss-next').click(function(event){ + captionUpdater(); + $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { + $(this).prependTo('.ss-slides').removeClass('notrans').css({ + 'webkitTransform':'scale(1) rotate(0deg)', + 'msTransform':'scale(1) rotate(0deg)', + 'transform':'scale(1) rotate(0deg)' + }).show(); + }); + event.preventDefault(); + }); + + /* Previous Button */ + $('#ss-prev').click(function(event){ + if ($('.ss-slide:first').attr('title')) { + var caption = $('.ss-slide:first').attr('title'); + $('.ss-caption').html(caption).show(); + } + else { + $('.ss-caption').empty().hide(); + } + $('.ss-slide:first').hide().addClass('notrans').appendTo('.ss-slides').fadeIn(); + event.preventDefault(); + }); - function firstPlay() { - $('.ss-slide:last').addClass('notrans').css({ - 'webkitTransform':'scale(1.2) rotate(2deg)', - 'msTransform': 'scale(1.2) rotate(2deg)', - 'transform': 'scale(1.2) rotate(2deg)' - }); - setTimeout( function() { - $('.ss-slide:last').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }); - }, 100); - } - - function playZoomin() { - captionUpdater(); - $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { - $(this).prependTo('.ss-slides').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }).show(); - $('.ss-slide:last').css({ - 'webkitTransform':'scale(1.2) rotate(2deg)', - 'msTransform':'scale(1.2) rotate(2deg)', - 'transform':'scale(1.2) rotate(2deg)' - }); - - }); -} - -function playZoomout() { - captionUpdater(); - $('.ss-slide:eq(-2)').addClass('notrans').css({ - 'webkitTransform':'scale(1.2) rotate(2deg)', - 'msTransform': 'scale(1.2) rotate(2deg)', - 'transform': 'scale(1.2) rotate(2deg)' - }); - $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { - $(this).prependTo('.ss-slides').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }).show(); - $('.ss-slide:last').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }); - }); -} - -function playPanright() { - captionUpdater(); - $('.ss-slide:eq(-2)').addClass('notrans').css({ - 'webkitTransform': 'scale(1.3) translate(-10%, 0)', - 'msTransform': 'scale(1.3) translate(-10%, 0)', - 'transform': 'scale(1.3) translate(-10%, 0)' - }); - $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { - $(this).prependTo('.ss-slides').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }).show(); - $('.ss-slide:last').removeClass('notrans').css({ - 'webkitTransform':'scale(1.3) translate(0,0)', - 'msTransform':'scale(1.3) translate(0,0)', - 'transform':'scale(1.3) translate(0,0)' - }); - }); -} - -function playPanleft() { - captionUpdater(); - $('.ss-slide:eq(-2)').addClass('notrans').css({ - 'webkitTransform': 'scale(1.3) translate(10%, 0)', - 'msTransform': 'scale(1.3) translate(10%, 0)', - 'transform': 'scale(1.3) translate(10%, 0)' - }); - $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { - $(this).prependTo('.ss-slides').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }).show(); - $('.ss-slide:last').removeClass('notrans').css({ - 'webkitTransform':'scale(1.3) translate(0,0)', - 'msTransform':'scale(1.3) translate(0,0)', - 'transform':'scale(1.3) translate(0,0)' - }); - }); -} - - var fns = [playZoomout, playZoomin, playPanright, playPanleft]; - var fn = function () { - fns[Math.floor(Math.random() * fns.length)](); - } - - var myInterval = setInterval(fn, playTimer); - - $('#ss-prev, #ss-next').hover(function(ev){ - clearInterval(myInterval); - }, function(ev){ - myInterval = setInterval(fn, playTimer); - }); - - $('#ss-next').click(function(event){ - captionUpdater(); - $('.ss-slide:last').addClass('notrans').fadeOut( "slow", function() { - $(this).prependTo('.ss-slides').removeClass('notrans').css({ - 'webkitTransform':'scale(1) rotate(0deg)', - 'msTransform':'scale(1) rotate(0deg)', - 'transform':'scale(1) rotate(0deg)' - }).show(); - }); - event.preventDefault(); - }); - - $('#ss-prev').click(function(event){ - if ($('.ss-slide:first').attr('title')) { - var caption = $('.ss-slide:first').attr('title'); - $('.ss-caption').html(caption).show(); - } - else { - $('.ss-caption').empty().hide(); } - $('.ss-slide:first').hide().addClass('notrans').appendTo('.ss-slides').fadeIn(); - event.preventDefault(); - }); -}); + }); +})(jQuery); diff --git a/js/smoothslides.min.js b/js/smoothslides.min.js index 82697ed..df603ae 100644 --- a/js/smoothslides.min.js +++ b/js/smoothslides.min.js @@ -1 +1 @@ -$(document).ready(function(){function r(){if($(".ss-slide:eq(-2)").attr("title")){var e=$(".ss-slide:eq(-2)").attr("title");$(".ss-caption").html(e).show()}else{$(".ss-caption").empty().hide()}}function i(){r();$(".ss-slide:last").addClass("notrans").css({webkitTransform:"scale(1.2) rotate(2deg)",msTransform:"scale(1.2) rotate(2deg)",transform:"scale(1.2) rotate(2deg)"});setTimeout(function(){$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"})},100)}function s(){r();$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").css({webkitTransform:"scale(1.2) rotate(2deg)",msTransform:"scale(1.2) rotate(2deg)",transform:"scale(1.2) rotate(2deg)"})})}function o(){r();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.2) rotate(2deg)",msTransform:"scale(1.2) rotate(2deg)",transform:"scale(1.2) rotate(2deg)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"})})}function u(){r();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(-10%, 0)",msTransform:"scale(1.3) translate(-10%, 0)",transform:"scale(1.3) translate(-10%, 0)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}function a(){r();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(10%, 0)",msTransform:"scale(1.3) translate(10%, 0)",transform:"scale(1.3) translate(10%, 0)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}var e=4e3;var t=e/1e3-.5;$(".ss-slide").css({webkitTransition:"all "+t+"s ease-in-out",mozTransition:"all "+t+"s ease-in-out",transition:"all "+t+"s ease-in-out"});$(".ss-slide:last").css("position","relative");$(".ss-slides").wrap('
');$(".ss-slides-wrap").append('
PrevNext');var n=$(".ss-slide:last").attr("title");$(".ss-caption").html(n);i();var f=[o,s,u,a];var l=function(){f[Math.floor(Math.random()*f.length)]()};var c=setInterval(l,e);$("#ss-prev, #ss-next").hover(function(e){clearInterval(c)},function(t){c=setInterval(l,e)});$("#ss-next").click(function(e){r();$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show()});e.preventDefault()});$("#ss-prev").click(function(e){if($(".ss-slide:first").attr("title")){var t=$(".ss-slide:first").attr("title");$(".ss-caption").html(t).show()}else{$(".ss-caption").empty().hide()}$(".ss-slide:first").hide().addClass("notrans").appendTo(".ss-slides").fadeIn();e.preventDefault()})}) +(function($){$.fn.extend({smoothSlides:function(options){function captionUpdater(){if($(".ss-slide:eq(-2)").attr("title")){var e=$(".ss-slide:eq(-2)").attr("title");$(".ss-caption").html(e).show()}else{$(".ss-caption").empty().hide()}}function zoomIn(){captionUpdater();$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").css({webkitTransform:"scale(1.2) rotate(2deg)",msTransform:"scale(1.2) rotate(2deg)",transform:"scale(1.2) rotate(2deg)"})})}function zoomOut(){captionUpdater();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.2) rotate(2deg)",msTransform:"scale(1.2) rotate(2deg)",transform:"scale(1.2) rotate(2deg)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"})})}function panRight(){captionUpdater();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(-10%, 0)",msTransform:"scale(1.3) translate(-10%, 0)",transform:"scale(1.3) translate(-10%, 0)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}function panLeft(){captionUpdater();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(10%, 0)",msTransform:"scale(1.3) translate(10%, 0)",transform:"scale(1.3) translate(10%, 0)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}function panUp(){captionUpdater();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(0, 10%)",msTransform:"scale(1.3) translate(0, 10%)",transform:"scale(1.3) translate(0, 10%)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}function panDown(){captionUpdater();$(".ss-slide:eq(-2)").addClass("notrans").css({webkitTransform:"scale(1.3) translate(0, -10%)",msTransform:"scale(1.3) translate(0, -10%)",transform:"scale(1.3) translate(0, -10%)"});$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show();$(".ss-slide:last").removeClass("notrans").css({webkitTransform:"scale(1.3) translate(0,0)",msTransform:"scale(1.3) translate(0,0)",transform:"scale(1.3) translate(0,0)"})})}var defaults={playTimer:4e3,animEasing:"ease-in-out",autoanimType:"random",nextText:"Next",prevText:"Prev",captions:"true",navigation:"true"};var options=$.extend(defaults,options),convertSeconds=options.playTimer/1e3-.5;$(".ss-slide").css({webkitTransition:"all "+convertSeconds+"s "+options.animEasing,mozTransition:"all "+convertSeconds+"s "+options.animEasing,msTransition:"all "+convertSeconds+"s "+options.animEasing,oTransition:"all "+convertSeconds+"s "+options.animEasing,transition:"all "+convertSeconds+"s "+options.animEasing});$(".ss-slide:last").css("position","relative");$(".ss-slides").wrap('
');if(options.captions=="true"){$(".ss-slides-wrap").append('
')}if(options.navigation=="true"){$(".ss-slides-wrap").append(''+options.prevText+''+options.nextText+"")}var caption=$(".ss-slide:last").attr("title");$(".ss-caption").html(caption);if(options.autoanimType=="random"){var fns=[zoomOut,zoomIn,panRight,panLeft];fns[Math.floor(Math.random()*fns.length)]()}else if(options.autoanimType=="false"){}else{eval(options.autoanimType+"()")}var fn=function(){if(options.autoanimType=="random"){var fns=[zoomOut,zoomIn,panRight,panLeft,panUp,panDown];fns[Math.floor(Math.random()*fns.length)]()}else if(options.autoanimType=="false"){}else{eval(options.autoanimType+"()")}};var myInterval=setInterval(fn,options.playTimer);$("#ss-prev, #ss-next").hover(function(e){clearInterval(myInterval)},function(e){myInterval=setInterval(fn,options.playTimer)});$("#ss-next").click(function(e){captionUpdater();$(".ss-slide:last").addClass("notrans").fadeOut("slow",function(){$(this).prependTo(".ss-slides").removeClass("notrans").css({webkitTransform:"scale(1) rotate(0deg)",msTransform:"scale(1) rotate(0deg)",transform:"scale(1) rotate(0deg)"}).show()});e.preventDefault()});$("#ss-prev").click(function(e){if($(".ss-slide:first").attr("title")){var t=$(".ss-slide:first").attr("title");$(".ss-caption").html(t).show()}else{$(".ss-caption").empty().hide()}$(".ss-slide:first").hide().addClass("notrans").appendTo(".ss-slides").fadeIn();e.preventDefault()})}})})(jQuery) \ No newline at end of file