├── .gitignore ├── README.md ├── bower.json ├── demo.html ├── demo ├── attic.jpg ├── aurora.jpg ├── barbecue.jpg ├── blackswan.jpg ├── chess.jpg ├── diveevo.jpg ├── fire.jpg ├── keyboard.jpg ├── locomotive.jpg ├── person.jpg ├── rose.jpg ├── seagull.jpg └── solarpower.jpg ├── index.html ├── jqcoverflow.jquery.json ├── jquery.coverflow.js ├── jquery.interpolate.min.js ├── jquery.touchSwipe.min.js └── reflection.js /.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject/ 2 | /debug/ 3 | /bower_components/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jQuery Coverflow 2 | ================ 3 | Version 1.3.5 4 | 5 | Copyright © 2013-2017 Martijn van der Lee (http://martijn.vanderlee.com). 6 | MIT Open Source license applies. 7 | 8 | Yet another jQuery Coverflow widget. 9 | 10 | Features 11 | -------- 12 | * Keyboard interaction using the cursor keys, Home, End, Page Up and Page Down. 13 | * Focusable 14 | * Click on a picture to move it to focus. 15 | * Uses CSS3 transformations if supported by browser, otherwise gracefully degrades. 16 | * Events for changing the focus, selecting and confirming (clicking on the picture in focus). 17 | * Animation easing and duration. 18 | * Separate CSS styles for the selected, innermost and outermost styles, all smoothly transitioning. 19 | * Support for your own transitioning code, should you want to use weird CSS tricks such as CSS3 filters. 20 | * Builtin mousewheel support. 21 | * Optional support for complex CSS transitions using interpolate plugin. 22 | Included with Coverflow. 23 | Available separately from https://github.com/vanderlee/interpolate. 24 | * Optional support for reflections (need to enable manually). 25 | Use Christophe Beyls' Reflections.js plugin, available from http://www.digitalia.be/software/reflectionjs-for-jquery and included with Coverflow. 26 | * Optional support for touch swipe gestures. 27 | Use Matt Bryson's TouchSwipe plugin, available from https://github.com/mattbryson/TouchSwipe-Jquery-Plugin and included with Coverflow. 28 | * Extensive support for CSS styling of the states 29 | 30 | p.s. All the plugins optionally supported are MIT licensed, so as safe to use as the Coverflow plugin itself. 31 | 32 | Download & Install 33 | ------------------ 34 | Install with bower using `bower install coverflow`. 35 | 36 | jQuery v1.8.0 or higher required. 37 | jQuery v1.7.x also works, but without the ability to click on covers to select. 38 | 39 | jQueryUI v1.9.0 or higher required. 40 | 41 | Current version: https://github.com/vanderlee/coverflow/archive/master.zip 42 | 43 | Sourcecode on Github: https://github.com/vanderlee/coverflow 44 | 45 | 46 | jQueryUI custom build 47 | --------------------- 48 | If you download a custom build of jQueryUI, you need these components: 49 | 50 | * Widget 51 | 52 | Quick start 53 | ----------- 54 | Here's a short code fragment, demonstrating how to use coverflow at it's most 55 | basic level. 56 | 57 | There are many more options to tailor it to your needs. 58 | 59 |
60 |
A
61 |
B
62 | ... 63 |
Y
64 |
Z
65 |
66 | 67 | 72 | 73 | Documentation 74 | ============= 75 | `.coverflow(options)` 76 | --------------------- 77 | Create one or more coverflows or access an existing coverflow. 78 | 79 | Coverflow uses the concepts of "selected", "inner" and "outer" covers. There is 80 | exactly one selected cover; the one in the middle that is visible as the 81 | current (or "selected") cover. The inner cover are the ones closest to the 82 | selected cover on either side. Outer covers are the ones at the very edges of 83 | the visible field. There may be covers beyond the outer covers, but they will 84 | not be visible. 85 | 86 | ### Focus 87 | Coverflow is focussable. If you do not specify an explicit `tabIndex` attribute 88 | for the Coverflow element, one will be assigned with value `-1`, meaning it 89 | can be focussed using the mouse, but not by pressing the [tab] key. 90 | 91 | You can optionally set the `autofocus` attribute on the element, and Coverflow 92 | will detect it and focus itself on page load. 93 | 94 | Options 95 | ------- 96 | ### **density** (function, default: `1`) 97 | @todo 98 | 99 | ### **duration** (integer/string, default: `"normal"`) 100 | The speed of animation. Use one of the standard constants "slow", "normal", 101 | "fast" or an integer for time in milliseconds. 102 | 103 | ### **easing** (string, default: `undefined`) 104 | Define an easing method for scrolling. If none is specified, "swing" easing 105 | is used by default. 106 | 107 | ### **enableKeyboard** (boolean, default: `"both"`) 108 | By default, Coverflow catches keyboard events both when hovering over it or 109 | when it has focus. 110 | Available options are `"focus"`, `"hover"`, `"both"` and `"focus"`. You can also 111 | use boolean `true` or `false` to completely enable or disable keyboard. 112 | Can be enabled/disabled using the `option` and `options` method. 113 | 114 | If you use multiple coverflow components, you should use either `"focus"` or 115 | `"hover"`, otherwise the keyboard will affect multiple Coverflows at once. 116 | 117 | ### **enableClick** (boolean, default: `true`) 118 | Set to false to disable mouse button (and touch tap) interaction. Can be 119 | enabled/disabled using the `option` and `options` method. 120 | 121 | ### **enableWheel** (boolean, default: `true`) 122 | Set to false to disable mouse wheel interaction. Can be enabled/disabled using 123 | the `option` and `options` method. 124 | 125 | ### **index** (string, integer: `0`) 126 | The initial selected index. 127 | 128 | ### **innerAngle** (float, integer: `-75`) 129 | An angle, in degrees, of the inner covers. Negative values indicate the 130 | covers are turned inwards (towards the center). Positive values indicate 131 | the covers will be turned outwards. 132 | 133 | ### **innerCss** (object, default: `undefined`) 134 | A plain object containing CSS properties of the inner covers. Leave 135 | undefined if you don't need any CSS changes. You can specify all (and only) 136 | the CSS properties supported by jQuery/jQueryUI. 137 | 138 | ### **innerOffset** (float, default: `100/3`) 139 | @todo 140 | 141 | ### **innerScale** (float, integer: `0.75`) 142 | @todo 143 | 144 | ### **outerAngle** (float, integer: `-30`) 145 | An angle, in degrees, of the outer covers. Negative values indicate the 146 | covers are turned inwards (towards the center). Positive values indicate 147 | the covers will be turned outwards. 148 | 149 | ### **outerCss** (object, default: `undefined`) 150 | A plain object containing CSS properties of the outer covers. Leave 151 | undefined if you don't need any CSS changes. You can specify all (and only) 152 | the CSS properties supported by jQuery/jQueryUI. 153 | 154 | ### **outerScale** (float, integer: `0.25`) 155 | @todo 156 | 157 | ### **selectedCss** (object, default: `undefined`) 158 | A plain object containing CSS properties of the selected cover. Leave 159 | undefined if you don't need any CSS changes. You can specify all (and only) 160 | the CSS properties supported by jQuery/jQueryUI. 161 | 162 | ### **visible** (string/float, default: `"density"`) 163 | @todo 164 | 165 | ### **width** (integer, default: `undefined`) 166 | @todo 167 | 168 | Methods 169 | ------- 170 | ### **cover** 171 | Get the currently selected cover as a jQuery object. 172 | 173 | ### **index** 174 | Get or set the current index. If no value is provided, the current index is 175 | returned. Otherwise, the index will be set to the provided value. 176 | 177 | ### **refresh** 178 | Redraw the covers. You shouldn't ever need to do this unless you are adding 179 | or removing covers or changing the covers yourself. 180 | 181 | Events 182 | ------ 183 | ### **before** 184 | Triggered just before moving the coverflow to a new index. 185 | 186 | Callback: `function(event, cover, index)` 187 | 188 | ### **change** 189 | Triggered whenever the current cover index changes. This includes initially and 190 | for each cover passed by when skipping past multiple covers. Change triggers as 191 | soon as the cover is on front; this may be before or after it's animation is 192 | completed (but only once!). 193 | 194 | Callback: `function(event, cover, index)` 195 | 196 | ### **confirm** 197 | Triggered when the user clicks on the current cover. 198 | 199 | Callback: `function(event, cover, index)` 200 | 201 | `event.originalEvent.target` contains the DOM element that was clicked to 202 | trigger the confirm event. 203 | 204 | ### **select** 205 | Triggered whenever a cover is selected. This includes initially. In contrast to 206 | the `change` event, `select` only triggers once after the requested cover 207 | position has been reached. 208 | 209 | Callback: `function(event, cover, index)` 210 | 211 | ### **animateStep** 212 | Triggered for every animation frame. Use this event to customize how the 213 | animation looks if the default options provide insufficient control. 214 | 215 | Callback: `function(event, cover, offset, isVisible, isMiddle, sin, cos)` 216 | 217 | ### **animateComplete** 218 | Triggered after the animation has stopped. A final `animateStep` will 219 | be triggered after animation as well, so you don't need to use the 220 | `animateComplete` event for normal animation frames. 221 | 222 | Callback: `function(event, cover, offset, isVisible, isMiddle, sin, cos)` 223 | 224 | Extensions/dependencies 225 | ======================= 226 | Coverflow is designed to take advantage of a number of separate Javascript 227 | libraries to supply additional features. The download comes with these files 228 | included. If you deploy your code, you may wish to use or exclude these files. 229 | 230 | Interpolate 231 | ----------- 232 | https://github.com/vanderlee/interpolate 233 | 234 | Interpolate is a library for smoothly interpolating CSS by taking advantage of 235 | the builtin jQuery and jQueryUI features. jQuery/jQueryUI offer support to 236 | smoothly animate transitions between two states of a large number of CSS rules 237 | but does not provide an interface to get a single "frame". Interpolate provides 238 | that interface. 239 | 240 | If you want to use Coverflow's `innerCss` and `outerCss` features, including 241 | Interpolate will ensure the animations will be smooth. 242 | 243 | TouchSwipe-Jquery-Plugin 244 | ------------------------ 245 | https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 246 | 247 | TouchSwipe provides support for touch device input, like swiping the coverflow 248 | sideways. If you include this plug-in (or any plugin providing a compatible 249 | `.swipe()` implementation), Coverflow will detect it and support swiping. 250 | 251 | Relection.js 252 | ------------ 253 | http://www.digitalia.be/software/reflectionjs-for-jquery/ 254 | 255 | The Reflection.js jQuery plugin provides controlable image reflections 256 | underneath the images. Though Coverflow neither detects nor interacts with this 257 | script, Coverflow is designed to work smoothly with this plugin without any 258 | additional code. 259 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "coverflow", 3 | "version": "1.3.5", 4 | "homepage": "https://github.com/vanderlee/coverflow", 5 | "authors": [ 6 | "Martijn van der Lee " 7 | ], 8 | "description": "A jQuery-based Coverflow components with optional mousewheel, CSS3 interpolation, transformations, touch swipe, reflections and more.", 9 | "main": "jquery.coverflow.js", 10 | "keywords": [ 11 | "jquery", 12 | "coverflow" 13 | ], 14 | "license": "MIT", 15 | "ignore": [ 16 | "**/.*", 17 | "node_modules", 18 | "bower_components", 19 | "test", 20 | "tests" 21 | ], 22 | "dependencies": { 23 | "jquery": ">=1.7.0", 24 | "jquery-ui": ">=1.9.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Coverflow 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 101 | 102 | 171 | 172 | 173 |

Coverflow

174 | jQuery Coverflow effect with luxurious transformations (CSS3!) support for reflections and gracefull(ish) degradation. 175 | 176 |

Examples

177 | 178 |

Alphabet selector

179 |
180 | 181 | 182 | 183 |
184 |
185 |
186 |
187 |
188 |
A
189 |
B
190 |
C
191 |
D
192 |
E
193 |
F
194 |
G
195 |
H
196 |
I
197 |
J
198 |
K
199 |
L
200 |
M
201 |
N
202 |
O
203 |
P
204 |
Q
205 |
R
206 |
S
207 |
T
208 |
U
209 |
V
210 |
W
211 |
X
212 |
Y
213 |
Z
214 |
215 | 216 |

CD Covers

217 |
218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 |
232 |
233 |
234 |
235 | 236 |
237 | 238 |
239 | 240 | 241 | -------------------------------------------------------------------------------- /demo/attic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/attic.jpg -------------------------------------------------------------------------------- /demo/aurora.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/aurora.jpg -------------------------------------------------------------------------------- /demo/barbecue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/barbecue.jpg -------------------------------------------------------------------------------- /demo/blackswan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/blackswan.jpg -------------------------------------------------------------------------------- /demo/chess.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/chess.jpg -------------------------------------------------------------------------------- /demo/diveevo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/diveevo.jpg -------------------------------------------------------------------------------- /demo/fire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/fire.jpg -------------------------------------------------------------------------------- /demo/keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/keyboard.jpg -------------------------------------------------------------------------------- /demo/locomotive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/locomotive.jpg -------------------------------------------------------------------------------- /demo/person.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/person.jpg -------------------------------------------------------------------------------- /demo/rose.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/rose.jpg -------------------------------------------------------------------------------- /demo/seagull.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/seagull.jpg -------------------------------------------------------------------------------- /demo/solarpower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanderlee/coverflow/674c0f1636b8d9c93567dd95c26205b67c54242b/demo/solarpower.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery.Coverflow 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 99 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | Fork me on GitHub 200 | 201 | 202 | 203 |
204 |
205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 |
219 | 230 | 262 |
263 | 264 |
265 |
266 | 267 |

Examples

268 |
269 | Click here for some demos: Demos 270 |
271 |
272 | 273 | 276 | 277 | 278 | -------------------------------------------------------------------------------- /jqcoverflow.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jqcoverflow", 3 | "version": "1.3.5", 4 | "title": "Vanderlee Coverflow", 5 | "description": "A jQuery-based Coverflow components with optional mousewheel, CSS3 interpolation, transformations, touch swipe, reflections and more.", 6 | "author": { 7 | "name": "Martijn van der Lee", 8 | "url": "http://martijn.vanderlee.com", 9 | "email": "martijn@vanderlee.com" 10 | }, 11 | "licenses": [ 12 | { 13 | "type": "MIT", 14 | "url": "http://opensource.org/licenses/MIT" 15 | } 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/vanderlee/coverflow.git" 20 | }, 21 | "dependencies": { 22 | "jquery": ">=1.7.0", 23 | "jqueryui": ">=1.9.0" 24 | }, 25 | "homepage": "http://vanderlee.github.com/coverflow", 26 | "demo": "http://vanderlee.github.com/coverflow", 27 | "download":"https://github.com/vanderlee/coverflow", 28 | "bugs": "https://github.com/vanderlee/coverflow/issues", 29 | "maintainers": [ 30 | { 31 | "name": "Martijn van der Lee", 32 | "url": "http://martijn.vanderlee.com", 33 | "email": "martijn@vanderlee.com" 34 | } 35 | ], 36 | "keywords": ["coverflow", "cover", "flow", "page", "scroll", "slideshow", "slide"] 37 | } -------------------------------------------------------------------------------- /jquery.coverflow.js: -------------------------------------------------------------------------------- 1 | /*jslint devel: true, bitwise: true, regexp: true, browser: true, confusion: true, unparam: true, eqeq: true, white: true, nomen: true, plusplus: true, maxerr: 50, indent: 4 */ 2 | /*globals jQuery */ 3 | 4 | /*! 5 | * Coverflow 6 | * 7 | * Copyright (c) 2013-2016 Martijn W. van der Lee 8 | * Licensed under the MIT. 9 | */ 10 | 11 | /* Lightweight and flexible coverflow effect using CSS3 transforms. 12 | * For modern browsers with some amount of graceful degradation. 13 | * Optional support for jQuery.interpolate() plugin. 14 | * Optional support for .reflect() plugins. 15 | * 16 | * Requires jQuery 1.7+ and jQueryUI 1.9+. 17 | * Recommended jQuery 1.8+ and jQueryUI 1.9+. 18 | */ 19 | 20 | ;(function($, undefined) { 21 | "use strict"; 22 | 23 | var sign = function(number) { 24 | return number < 0 ? -1 : 1; 25 | }, 26 | scl = function(number, fromMin, fromMax, toMin, toMax) { 27 | return ((number - fromMin) * (toMax - toMin) / (fromMax - fromMin)) + toMin; 28 | }, 29 | wheelEvents = ('onwheel' in document) ? 'wheel' : 'mousewheel', // FF 30 | getWheel = function(event) { 31 | if ('deltaY' in event.originalEvent) { 32 | return 0 - event.originalEvent.deltaY; 33 | } else if ('wheelDelta' in event.originalEvent) { 34 | return event.originalEvent.wheelDelta; // IE 35 | } 36 | }; 37 | 38 | $.widget("vanderlee.coverflow", { 39 | options: { 40 | animateComplete: undefined, 41 | animateStart: undefined, 42 | animateStep: undefined, 43 | density: 1, 44 | duration: 'normal', 45 | easing: undefined, 46 | enableKeyboard: 'both', // true, false, 'both', 'focus', 'hover', 'none' 47 | enableClick: true, 48 | enableWheel: true, 49 | index: 0, 50 | innerAngle: -75, 51 | innerCss: undefined, 52 | innerOffset: 100 / 3, 53 | innerScale: 0.75, 54 | outerAngle: -30, 55 | outerCss: undefined, 56 | outerScale: 0.25, 57 | selectedCss: undefined, 58 | visible: 'density', // 'density', 'all', NNN (exact) 59 | width: undefined, 60 | 61 | change: undefined, // Whenever index is changed 62 | confirm: undefined, // Whenever clicking on the current item 63 | select: undefined // Whenever index is set (also on init) 64 | }, 65 | 66 | _window_handler_resize: null, 67 | _window_handler_keydown: null, 68 | 69 | _create: function() { 70 | var that = this, 71 | covers = that._getCovers(), 72 | images = covers.filter('img').add('img', covers).filter(function() { 73 | return !(this.complete || this.height > 0); 74 | }), 75 | maxHeight = Math.max.apply(null, covers.map(function(){ 76 | return $(this).height(); 77 | }).get()), 78 | height; 79 | 80 | // Internal event prefix 81 | that.widgetEventPrefix = 'vanderlee-coverflow'; 82 | 83 | that.hovering = false; 84 | that.pagesize = 1; 85 | that.currentIndex = that.options.index; 86 | 87 | // Fix height 88 | that.element.height(maxHeight); 89 | images.on(function() { 90 | height = that._getCovers().height(); 91 | if (height > maxHeight) { 92 | maxHeight = height; 93 | that.element.height(maxHeight); 94 | } 95 | }); 96 | 97 | // Hide all covers and set position to absolute 98 | covers.hide(); 99 | 100 | // Add tabindex and autofocus if needed. 101 | if (this.element.not(':tabbable')) { 102 | this.element.attr('tabIndex', -1); 103 | if (this.element.attr('autofocus')) { 104 | this.element.focus(); 105 | } 106 | } 107 | 108 | // Enable click-jump 109 | that.element.on('mousedown tap click', '> *', function(event) { 110 | if (that.options.enableClick) { 111 | var index = that._getCovers().index(this); 112 | if (index === that.currentIndex) { 113 | that._callback('confirm', event); 114 | } else { 115 | that._setIndex(index, true); 116 | } 117 | } 118 | }); 119 | 120 | // Mousewheel 121 | that.element.on(wheelEvents, function(event) { 122 | if (that.options.enableWheel) { 123 | var delta = getWheel(event) > 0 ? 1 : -1; 124 | 125 | event.preventDefault(); 126 | that._setIndex(that.options.index - delta, true); 127 | } 128 | }); 129 | 130 | // Swipe 131 | if ($.isFunction(that.element.swipe)) { 132 | that.element.swipe({ 133 | allowPageScroll: "vertical", 134 | swipe: function(event, direction, distance, duration, fingerCount) { 135 | var count = Math.round((direction==="left"? 1 : (direction==="right"? -1 : 0 )) * 1.25 * that.pagesize * distance / that.element.width()); 136 | that._setIndex(that.options.index + count, true); 137 | } 138 | }); 139 | } 140 | 141 | // Keyboard 142 | // that.element.hover( 143 | // function() { that.hovering = true; } 144 | // , function() { that.hovering = false; } 145 | // ); 146 | 147 | // Refresh on resize 148 | that._window_handler_resize = function() { 149 | that.refresh(); 150 | }; 151 | $(window).on('resize', that._window_handler_resize); 152 | 153 | that._window_handler_keydown = function(event) { 154 | if (($.inArray(that.options.enableKeyboard, [true, 'both', 'focus']) >= 0 && that.element.is(':focus')) 155 | || ($.inArray(that.options.enableKeyboard, [true, 'both', 'hover']) >= 0 >= 0 && that.element.is(':hover'))) { 156 | switch (event.which) { 157 | case 36: // home 158 | event.preventDefault(); 159 | that._setIndex(0, true); 160 | break; 161 | 162 | case 35: // end 163 | event.preventDefault(); 164 | that._setIndex(that._getCovers().length - 1, true); 165 | break; 166 | 167 | case 38: // up 168 | case 37: // left 169 | event.preventDefault(); 170 | that._setIndex(that.options.index - 1, true); 171 | break; 172 | 173 | case 40: // down 174 | case 39: // right 175 | event.preventDefault(); 176 | that._setIndex(that.options.index + 1, true); 177 | break; 178 | 179 | case 33: // page up (towards home) 180 | event.preventDefault(); 181 | that._setIndex(that.options.index - that.pagesize, true); 182 | break; 183 | 184 | case 34: // page down (towards end) 185 | event.preventDefault(); 186 | that._setIndex(that.options.index + that.pagesize, true); 187 | break; 188 | } 189 | } 190 | }; 191 | $(window).on('keydown', that._window_handler_keydown); 192 | 193 | // Initialize 194 | that._setIndex(that.options.index, false, true); 195 | 196 | return that; 197 | }, 198 | 199 | 200 | /** 201 | * Destroy this object 202 | * @returns {undefined} 203 | */ 204 | _destroy: function() { 205 | $(window).off('resize', this._window_handler_resize); 206 | $(window).off('keydown', this._window_handler_keydown); 207 | this.element.height(''); 208 | }, 209 | 210 | /** 211 | * Returns the currently selected cover 212 | * @returns {jQuery} jQuery object 213 | */ 214 | cover: function() { 215 | return $(this._getCovers()[this.options.index]); 216 | }, 217 | 218 | /** 219 | * 220 | * @returns {unresolved} 221 | */ 222 | _getCovers: function() { 223 | return $('> *', this.element); 224 | }, 225 | 226 | _setIndex: function(index, animate, initial) { 227 | var that = this, 228 | covers = that._getCovers(); 229 | 230 | index = Math.max(0, Math.min(index, covers.length - 1)); 231 | 232 | if (index !== that.options.index) { 233 | // Fix reflections 234 | covers.css('position', 'absolute'); 235 | this._frame(that.options.index); 236 | 237 | if (animate === true || that.options.duration === 0) { 238 | that.options.index = Math.round(index); 239 | 240 | var duration = typeof that.options.duration === "number" 241 | ? that.options.duration 242 | : jQuery.fx.speeds[that.options.duration] || jQuery.fx.speeds._default; 243 | 244 | this.refresh(duration, that.options.index); 245 | } else { 246 | that.options.index = Math.round(index); 247 | that.refresh(0); 248 | } 249 | } else if (initial === true) { 250 | that.refresh(); 251 | that._callback('select'); 252 | } 253 | }, 254 | 255 | _callback: function(callback, event) { 256 | this._trigger(callback, event, [this._getCovers().get(this.currentIndex), this.currentIndex]); 257 | }, 258 | 259 | index: function(index) { 260 | if (index === undefined) { 261 | return this.options.index; 262 | } 263 | 264 | while (index < 0) { 265 | index += this._getCovers().length; 266 | } 267 | 268 | this._setIndex(index, true); 269 | }, 270 | 271 | _frame: function(frame) { 272 | frame = frame.toFixed(6); 273 | 274 | var that = this, 275 | covers = that._getCovers(), 276 | count = covers.length, 277 | parentWidth = that.element.innerWidth(), 278 | coverWidth = that.options.width || covers.eq(this.options.index).show().get(0).offsetWidth, 279 | visible = that.options.visible === 'density' ? Math.round(parentWidth * that.options.density / coverWidth) 280 | : $.isNumeric(that.options.visible) ? that.options.visible 281 | : count, 282 | parentLeft = that.element.position().left - ((1 - that.options.outerScale) * coverWidth * 0.5), 283 | space = (parentWidth - (that.options.outerScale * coverWidth)) * 0.5; 284 | 285 | that.pagesize = visible; 286 | 287 | covers.removeClass('current').each(function(index, cover) { 288 | var $cover = $(cover), 289 | position = index - frame, 290 | offset = Math.min(Math.max(-1., position / visible), 1), 291 | isMiddle = position == 0, 292 | zIndex = count - Math.abs(Math.round(position)), 293 | isVisible = Math.abs(position) <= visible, 294 | sin = Math.sin(offset * Math.PI * 0.5), 295 | cos = Math.cos(offset * Math.PI * 0.5), 296 | left = sign(sin) * scl(Math.abs(sin), 0, 1, that.options.innerOffset * that.options.density, space), 297 | scale = isVisible ? scl(Math.abs(cos), 1, 0, that.options.innerScale, that.options.outerScale) : 0, 298 | angle = sign(sin) * scl(Math.abs(sin), 0, 1, that.options.innerAngle, that.options.outerAngle), 299 | css = isMiddle ? that.options.selectedCss || {} 300 | : ( $.interpolate && that.options.outerCss && !$.isEmptyObject(that.options.outerCss) ? ( 301 | isVisible ? $.interpolate(that.options.innerCss || {}, that.options.outerCss, Math.abs(sin)) 302 | : that.options.outerCss 303 | ) : {} 304 | ), 305 | transform; 306 | 307 | // bad behaviour for being in the middle 308 | if (Math.abs(position) < 1) { 309 | angle = 0 - (0 - angle) * Math.abs(position); 310 | scale = 1 - (1 - scale) * Math.abs(position); 311 | left = 0 - (0 - left) * Math.abs(position); 312 | } 313 | 314 | //@todo Test CSS for middle behaviour (or does $.interpolate handle it?) 315 | 316 | transform = 'scale(' + scale + ',' + scale + ') perspective(' + (parentWidth * 0.5) + 'px) rotateY(' + angle + 'deg)'; 317 | 318 | $cover[isMiddle ? 'addClass' : 'removeClass']('current'); 319 | $cover[isVisible ? 'show' : 'hide'](); 320 | 321 | $cover.css($.extend(css, { 322 | 'left': parentLeft + space + left, 323 | 'z-index': zIndex, 324 | '-webkit-transform': transform, 325 | '-ms-transform': transform, 326 | 'transform': transform 327 | })); 328 | 329 | that._trigger('animateStep', null, [cover, offset, isVisible, isMiddle, sin, cos]); 330 | 331 | if (frame == that.options.index) { 332 | that._trigger('animateComplete', null, [cover, offset, isVisible, isMiddle, sin, cos]); 333 | } 334 | }); 335 | }, 336 | 337 | refresh: function(duration, index) { 338 | var that = this, 339 | previous = that.currentIndex, 340 | covers = that._getCovers(), 341 | covercount = covers.length, 342 | triggered = false; 343 | 344 | that._callback('before'); 345 | 346 | covers.css('position', 'absolute'); 347 | that.element.stop().animate({ 348 | '__coverflow_frame': index || that.options.index 349 | }, { 350 | 'easing': that.options.easing, 351 | 'duration': duration || 0, 352 | 'step': function(now, fx) { 353 | that._frame(now); 354 | 355 | that.currentIndex = Math.max(0, Math.min(Math.round(now), covercount - 1)); 356 | if (previous !== that.currentIndex) { 357 | previous = that.currentIndex; 358 | that._callback('change'); 359 | if (that.currentIndex === that.options.index) { 360 | triggered = true; 361 | } 362 | } 363 | }, 364 | 'complete': function() { 365 | that.currentIndex = that.options.index; 366 | that._callback('after'); 367 | 368 | if (!triggered) { 369 | that._callback('change'); 370 | } 371 | that._callback('select'); 372 | } 373 | }); 374 | } 375 | }); 376 | }(jQuery)); 377 | -------------------------------------------------------------------------------- /jquery.interpolate.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Interpolate 3 | * 4 | * Copyright (c) 2013-2016 Martijn W. van der Lee 5 | * Licensed under the MIT. 6 | */ 7 | (function(a,h){a.fn.interpolate=function(d,c,b,e){var f=this;a.isPlainObject(d)?(e=b||"linear",b=a.isNumeric(c)?c:.5,a.each(d,function(c,d){a.each(f,function(){a.Tween(this,{duration:1},c,d,e).run(b)})})):(b=a.isNumeric(b)?b:.5,a.each(f,function(){a.Tween(this[0],{duration:1},d,c,e||"linear").run(b)}));return this};a.interpolate=function(d,c,b,e){var f=a(""),g=a.extend({},d);f.css(g).interpolate(c,b,e);a.each(c,function(a,b){g[a]=f.css(a)});return g}})(jQuery); -------------------------------------------------------------------------------- /jquery.touchSwipe.min.js: -------------------------------------------------------------------------------- 1 | (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{if(typeof module!=="undefined"&&module.exports){a(require("jquery"))}else{a(jQuery)}}}(function(f){var y="1.6.15",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!a,d=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!a,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipe=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipe")}}else{if(F&&typeof H==="object"){F.option.apply(this,arguments)}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}}return G};f.fn.swipe.version=y;f.fn.swipe.defaults=n;f.fn.swipe.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipe.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipe.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipe.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,au){var au=f.extend({},au);var az=(a||d||!au.fallbackToMouseEvents),K=az?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",ax=az?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=az?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=az?(d?"mouseleave":null):"mouseleave",aD=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ag=0,aP=null,a2=null,ac=0,a1=0,aZ=0,H=1,ap=0,aJ=0,N=null;var aR=f(a5);var aa="start";var X=0;var aQ={};var U=0,a3=0,a6=0,ay=0,O=0;var aW=null,af=null;try{aR.bind(K,aN);aR.bind(aD,ba)}catch(aj){f.error("events not supported "+K+","+aD+" on jQuery.swipe")}this.enable=function(){aR.bind(K,aN);aR.bind(aD,ba);return aR};this.disable=function(){aK();return aR};this.destroy=function(){aK();aR.data(C,null);aR=null};this.option=function(bd,bc){if(typeof bd==="object"){au=f.extend(au,bd)}else{if(au[bd]!==undefined){if(bc===undefined){return au[bd]}else{au[bd]=bc}}else{if(!bd){return au}else{f.error("Option "+bd+" does not exist on jQuery.swipe.options")}}}return null};function aN(be){if(aB()){return}if(f(be.target).closest(au.excludedElements,aR).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{if(au.preventDefaultEvents!==false){be.preventDefault()}}ag=0;aP=null;a2=null;aJ=null;ac=0;a1=0;aZ=0;H=1;ap=0;N=ab();S();ai(0,bc);if(!bg||(X===au.fingers||au.fingers===i)||aX()){U=ar();if(X==2){ai(1,bg[1]);a1=aZ=at(aQ[0].start,aQ[1].start)}if(au.swipeStatus||au.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(au.hold){af=setTimeout(f.proxy(function(){aR.trigger("hold",[bf.target]);if(au.hold){bd=au.hold.call(aR,bf,bf.target)}},this),au.longTapThreshold)}an(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||al()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aH(bd);a3=ar();if(bj){X=bj.length}if(au.hold){clearTimeout(af)}aa=k;if(X==2){if(a1==0){ai(1,bj[1]);a1=aZ=at(aQ[0].start,aQ[1].start)}else{aH(bj[1]);aZ=at(aQ[0].end,aQ[1].end);aJ=aq(aQ[0].end,aQ[1].end)}H=a8(a1,aZ);ap=Math.abs(a1-aZ)}if((X===au.fingers||au.fingers===i)||!bj||aX()){aP=aL(bg.start,bg.end);a2=aL(bg.last,bg.end);ak(bf,a2);ag=aS(bg.start,bg.end);ac=aM();aI(aP,ag);be=P(bi,aa);if(!au.triggerOnTouchEnd||au.triggerOnTouchLeave){var bc=true;if(au.triggerOnTouchLeave){var bh=aY(this);bc=F(bg.end,bh)}if(!au.triggerOnTouchEnd&&bc){aa=aC(k)}else{if(au.triggerOnTouchLeave&&!bc){aa=aC(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length&&!al()){G(bd);return true}else{if(be.length&&al()){return true}}}if(al()){X=ay}a3=ar();ac=aM();if(bb()||!am()){aa=q;P(bd,aa)}else{if(au.triggerOnTouchEnd||(au.triggerOnTouchEnd==false&&aa===k)){if(au.preventDefaultEvents!==false){bc.preventDefault()}aa=h;P(bd,aa)}else{if(!au.triggerOnTouchEnd&&a7()){aa=h;aF(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}an(false);return null}function ba(){X=0;a3=0;U=0;a1=0;aZ=0;H=1;S();an(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(au.triggerOnTouchLeave){aa=aC(h);P(bd,aa)}}function aK(){aR.unbind(K,aN);aR.unbind(aD,ba);aR.unbind(ax,a4);aR.unbind(V,M);if(T){aR.unbind(T,L)}an(false)}function aC(bg){var bf=bg;var be=aA();var bd=am();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!au.triggerOnTouchEnd||au.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&au.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if(J()||W()){bd=aF(be,bc,l)}if((Q()||aX())&&bd!==false){bd=aF(be,bc,t)}if(aG()&&bd!==false){bd=aF(be,bc,j)}else{if(ao()&&bd!==false){bd=aF(be,bc,b)}else{if(ah()&&bd!==false){bd=aF(be,bc,B)}}}if(bc===q){if(W()){bd=aF(be,bc,l)}if(aX()){bd=aF(be,bc,t)}ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aF(bf,bc,be){var bd;if(be==l){aR.trigger("swipeStatus",[bc,aP||null,ag||0,ac||0,X,aQ,a2]);if(au.swipeStatus){bd=au.swipeStatus.call(aR,bf,bc,aP||null,ag||0,ac||0,X,aQ,a2);if(bd===false){return false}}if(bc==h&&aV()){clearTimeout(aW);clearTimeout(af);aR.trigger("swipe",[aP,ag,ac,X,aQ,a2]);if(au.swipe){bd=au.swipe.call(aR,bf,aP,ag,ac,X,aQ,a2);if(bd===false){return false}}switch(aP){case p:aR.trigger("swipeLeft",[aP,ag,ac,X,aQ,a2]);if(au.swipeLeft){bd=au.swipeLeft.call(aR,bf,aP,ag,ac,X,aQ,a2)}break;case o:aR.trigger("swipeRight",[aP,ag,ac,X,aQ,a2]);if(au.swipeRight){bd=au.swipeRight.call(aR,bf,aP,ag,ac,X,aQ,a2)}break;case e:aR.trigger("swipeUp",[aP,ag,ac,X,aQ,a2]);if(au.swipeUp){bd=au.swipeUp.call(aR,bf,aP,ag,ac,X,aQ,a2)}break;case x:aR.trigger("swipeDown",[aP,ag,ac,X,aQ,a2]);if(au.swipeDown){bd=au.swipeDown.call(aR,bf,aP,ag,ac,X,aQ,a2)}break}}}if(be==t){aR.trigger("pinchStatus",[bc,aJ||null,ap||0,ac||0,X,H,aQ]);if(au.pinchStatus){bd=au.pinchStatus.call(aR,bf,bc,aJ||null,ap||0,ac||0,X,H,aQ);if(bd===false){return false}}if(bc==h&&a9()){switch(aJ){case c:aR.trigger("pinchIn",[aJ||null,ap||0,ac||0,X,H,aQ]);if(au.pinchIn){bd=au.pinchIn.call(aR,bf,aJ||null,ap||0,ac||0,X,H,aQ)}break;case A:aR.trigger("pinchOut",[aJ||null,ap||0,ac||0,X,H,aQ]);if(au.pinchOut){bd=au.pinchOut.call(aR,bf,aJ||null,ap||0,ac||0,X,H,aQ)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aW);clearTimeout(af);if(Z()&&!I()){O=ar();aW=setTimeout(f.proxy(function(){O=null;aR.trigger("tap",[bf.target]);if(au.tap){bd=au.tap.call(aR,bf,bf.target)}},this),au.doubleTapThreshold)}else{O=null;aR.trigger("tap",[bf.target]);if(au.tap){bd=au.tap.call(aR,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aW);clearTimeout(af);O=null;aR.trigger("doubletap",[bf.target]);if(au.doubleTap){bd=au.doubleTap.call(aR,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aW);O=null;aR.trigger("longtap",[bf.target]);if(au.longTap){bd=au.longTap.call(aR,bf,bf.target)}}}}}return bd}function am(){var bc=true;if(au.threshold!==null){bc=ag>=au.threshold}return bc}function bb(){var bc=false;if(au.cancelThreshold!==null&&aP!==null){bc=(aT(aP)-ag)>=au.cancelThreshold}return bc}function ae(){if(au.pinchThreshold!==null){return ap>=au.pinchThreshold}return true}function aA(){var bc;if(au.maxTimeThreshold){if(ac>=au.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function ak(bc,bd){if(au.preventDefaultEvents===false){return}if(au.allowPageScroll===m){bc.preventDefault()}else{var be=au.allowPageScroll===s;switch(bd){case p:if((au.swipeLeft&&be)||(!be&&au.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((au.swipeRight&&be)||(!be&&au.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((au.swipeUp&&be)||(!be&&au.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((au.swipeDown&&be)||(!be&&au.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aO();var bc=Y();var be=ae();return bd&&bc&&be}function aX(){return !!(au.pinchStatus||au.pinchIn||au.pinchOut)}function Q(){return !!(a9()&&aX())}function aV(){var bf=aA();var bh=am();var be=aO();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(au.swipe||au.swipeStatus||au.swipeLeft||au.swipeRight||au.swipeUp||au.swipeDown)}function J(){return !!(aV()&&W())}function aO(){return((X===au.fingers||au.fingers===i)||!a)}function Y(){return aQ[0].end.x!==0}function a7(){return !!(au.tap)}function Z(){return !!(au.doubleTap)}function aU(){return !!(au.longTap)}function R(){if(O==null){return false}var bc=ar();return(Z()&&((bc-O)<=au.doubleTapThreshold))}function I(){return R()}function aw(){return((X===1||!a)&&(isNaN(ag)||agau.longTapThreshold)&&(ag=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function ar(){var bc=new Date();return bc.getTime()}function aY(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.xbd.top&&bc.y 4 | MIT-style license. 5 | */ 6 | (function(a){a.fn.extend({reflect:function(b){b=a.extend({height:1/3,opacity:0.5},b);return this.unreflect().each(function(){var c=this;if(/^img$/i.test(c.tagName)){function d(){var g=c.width,f=c.height,l,i,m,h,k;i=Math.floor((b.height>1)?Math.min(f,b.height):f*b.height);l=a("")[0];if(l.getContext){h=l.getContext("2d");try{a(l).attr({width:g,height:i});h.save();h.translate(0,f-1);h.scale(1,-1);h.drawImage(c,0,0,g,f);h.restore();h.globalCompositeOperation="destination-out";k=h.createLinearGradient(0,0,0,i);k.addColorStop(0,"rgba(255, 255, 255, "+(1-b.opacity)+")");k.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=k;h.rect(0,0,g,i);h.fill()}catch(j){return}}else{if(!window.ActiveXObject){return}l=a("").attr("src",c.src).css({width:g,height:f,marginBottom:i-f,filter:"FlipV progid:DXImageTransform.Microsoft.Alpha(Opacity="+(b.opacity*100)+", FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY="+(i/f*100)+")"})[0]}a(l).css({display:"block",border:0});m=a(/^a$/i.test(c.parentNode.tagName)?"":"
").insertAfter(c).append([c,l])[0];m.className=c.className;a.data(c,"reflected",m.style.cssText=c.style.cssText);a(m).css({width:g,height:f+i,overflow:"hidden"});c.style.cssText="display: block; border: 0px";c.className="reflected"}if(c.complete){d()}else{a(c).load(d)}}})},unreflect:function(){return this.unbind("load").each(function(){var c=this,b=a.data(this,"reflected"),d;if(b!==undefined){d=c.parentNode;c.className=d.className;c.style.cssText=b;a.removeData(c,"reflected");d.parentNode.replaceChild(c,d)}})}})})(jQuery); 7 | 8 | // AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED) 9 | jQuery(function($) { 10 | $("img.reflect").reflect({/* Put custom options here */}); 11 | }); --------------------------------------------------------------------------------