- /*
- * jQuery Cycle Plugin Transition Definitions
- * This script is a plugin for the jQuery Cycle Plugin
- * Examples and documentation at: http://malsup.com/jquery/cycle/
- * Copyright (c) 2007 M. Alsup
- * Version: 2.02
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
- jQuery.fn.cycle.transitions.scrollUp = function(d, e, f) {
- d.css('overflow', 'hidden');
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.top = b.offsetHeight;
- c.animOut.top = 0 - a.offsetHeight
- });
- f.cssFirst = {
- top: 0
- };
- f.animIn = {
- top: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.scrollDown = function(d, e, f) {
- d.css('overflow', 'hidden');
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.top = 0 - b.offsetHeight;
- c.animOut.top = a.offsetHeight
- });
- f.cssFirst = {
- top: 0
- };
- f.animIn = {
- top: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.scrollLeft = function(d, e, f) {
- d.css('overflow', 'hidden');
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.left = b.offsetWidth;
- c.animOut.left = 0 - a.offsetWidth
- });
- f.cssFirst = {
- left: 0
- };
- f.animIn = {
- left: 0
- }
- };
- jQuery.fn.cycle.transitions.scrollRight = function(d, e, f) {
- d.css('overflow', 'hidden');
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.left = 0 - b.offsetWidth;
- c.animOut.left = a.offsetWidth
- });
- f.cssFirst = {
- left: 0
- };
- f.animIn = {
- left: 0
- }
- };
- jQuery.fn.cycle.transitions.scrollHorz = function(f, g, h) {
- f.css('overflow', 'hidden').width();
- h.before.push(function(a, b, c, d) {
- jQuery(this).show();
- var e = a.offsetWidth,
- nextW = b.offsetWidth;
- c.cssBefore = d ? {
- left: nextW
- } : {
- left: -nextW
- };
- c.animIn.left = 0;
- c.animOut.left = d ? -e : e;
- g.not(a).css(c.cssBefore)
- });
- h.cssFirst = {
- left: 0
- };
- h.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.scrollVert = function(f, g, h) {
- f.css('overflow', 'hidden');
- h.before.push(function(a, b, c, d) {
- jQuery(this).show();
- var e = a.offsetHeight,
- nextH = b.offsetHeight;
- c.cssBefore = d ? {
- top: -nextH
- } : {
- top: nextH
- };
- c.animIn.top = 0;
- c.animOut.top = d ? e : -e;
- g.not(a).css(c.cssBefore)
- });
- h.cssFirst = {
- top: 0
- };
- h.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.slideX = function(a, b, c) {
- c.animIn = {
- width: 'show'
- };
- c.animOut = {
- width: 'hide'
- }
- };
- jQuery.fn.cycle.transitions.slideY = function(a, b, c) {
- c.animIn = {
- height: 'show'
- };
- c.animOut = {
- height: 'hide'
- }
- };
- jQuery.fn.cycle.transitions.shuffle = function(f, g, h) {
- var w = f.css('overflow', 'visible').width();
- g.css({
- left: 0,
- top: 0
- });
- h.before.push(function() {
- jQuery(this).show()
- });
- h.speed = h.speed / 2;
- h.random = 0;
- h.shuffle = h.shuffle || {
- left: -w,
- top: 15
- };
- h.els = [];
- for (var i = 0; i < g.length; i++) h.els.push(g[i]);
- for (var i = 0; i < h.startingSlide; i++) h.els.push(h.els.shift());
- h.fxFn = function(a, b, c, d) {
- var e = jQuery(a);
- e.animate(c.shuffle, c.speedIn, c.easeIn, function() {
- c.els.push(c.els.shift());
- for (var i = 0, len = c.els.length; i < len; i++) jQuery(c.els[i]).css('z-index', len - i);
- e.animate({
- left: 0,
- top: 0
- }, c.speedOut, c.easeOut, function() {
- jQuery(this).hide();
- if (d) d()
- })
- })
- }
- };
- jQuery.fn.cycle.transitions.turnUp = function(d, e, f) {
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.top = b.cycleH;
- c.animIn.height = b.cycleH
- });
- f.cssFirst = {
- top: 0
- };
- f.cssBefore = {
- height: 0
- };
- f.animIn = {
- top: 0
- };
- f.animOut = {
- height: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.turnDown = function(d, e, f) {
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.animIn.height = b.cycleH;
- c.animOut.top = a.cycleH
- });
- f.cssFirst = {
- top: 0
- };
- f.cssBefore = {
- top: 0,
- height: 0
- };
- f.animOut = {
- height: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.turnLeft = function(d, e, f) {
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore.left = b.cycleW;
- c.animIn.width = b.cycleW
- });
- f.cssBefore = {
- width: 0
- };
- f.animIn = {
- left: 0
- };
- f.animOut = {
- width: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.turnRight = function(d, e, f) {
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.animIn.width = b.cycleW;
- c.animOut.left = a.cycleW
- });
- f.cssBefore = {
- left: 0,
- width: 0
- };
- f.animIn = {
- left: 0
- };
- f.animOut = {
- width: 0
- };
- f.cssAfter = {
- display: 'none'
- }
- };
- jQuery.fn.cycle.transitions.zoom = function(d, e, f) {
- f.cssFirst = {
- top: 0,
- left: 0
- };
- f.cssAfter = {
- display: 'none'
- };
- f.before.push(function(a, b, c) {
- jQuery(this).show();
- c.cssBefore = {
- width: 0,
- height: 0,
- top: b.cycleH / 2,
- left: b.cycleW / 2
- };
- c.animIn = {
- top: 0,
- left: 0,
- width: b.cycleW,
- height: b.cycleH
- };
- c.animOut = {
- width: 0,
- height: 0,
- top: a.cycleH / 2,
- left: a.cycleW / 2
- }
- })
- };
- jQuery.fn.cycle.transitions.fadeZoom = function(d, e, f) {
- f.before.push(function(a, b, c) {
- c.cssBefore = {
- width: 0,
- height: 0,
- opacity: 1,
- left: b.cycleW / 2,
- top: b.cycleH / 2,
- zIndex: 1
- };
- c.animIn = {
- top: 0,
- left: 0,
- width: b.cycleW,
- height: b.cycleH
- }
- });
- f.animOut = {
- opacity: 0
- };
- f.cssAfter = {
- zIndex: 0
- }
- };
Raw Paste