rambling-slider-rails 0.1.1 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -1
  3. data/Gemfile +0 -0
  4. data/LICENSE +3 -1
  5. data/README.markdown +4 -2
  6. data/Rakefile +0 -0
  7. data/lib/rambling/slider/rails/engine.rb +0 -0
  8. data/lib/rambling/slider/rails/version.rb +2 -2
  9. data/lib/rambling/slider/rails.rb +0 -0
  10. data/lib/rambling-slider-rails.rb +0 -0
  11. data/rambling-slider-rails.gemspec +3 -3
  12. data/vendor/assets/images/themes/default/arrows.png +0 -0
  13. data/vendor/assets/images/themes/default/bullets.png +0 -0
  14. data/vendor/assets/images/themes/default/loading.gif +0 -0
  15. data/vendor/assets/images/themes/orman/arrows.png +0 -0
  16. data/vendor/assets/images/themes/orman/bullets.png +0 -0
  17. data/vendor/assets/images/themes/orman/loading.gif +0 -0
  18. data/vendor/assets/images/themes/orman/ribbon.png +0 -0
  19. data/vendor/assets/images/themes/orman/slider.png +0 -0
  20. data/vendor/assets/images/themes/pascal/bullets.png +0 -0
  21. data/vendor/assets/images/themes/pascal/controlnav.png +0 -0
  22. data/vendor/assets/images/themes/pascal/featured.png +0 -0
  23. data/vendor/assets/images/themes/pascal/loading.gif +0 -0
  24. data/vendor/assets/images/themes/pascal/ribbon.png +0 -0
  25. data/vendor/assets/images/themes/pascal/slider.png +0 -0
  26. data/vendor/assets/javascripts/jquery.rambling.slider.js +162 -125
  27. data/vendor/assets/javascripts/jquery.rambling.slider.min.js +14 -15
  28. data/vendor/assets/stylesheets/jquery.rambling.slider/themes/default.css.scss +0 -0
  29. data/vendor/assets/stylesheets/jquery.rambling.slider/themes/orman.css.scss +0 -0
  30. data/vendor/assets/stylesheets/jquery.rambling.slider/themes/pascal.css.scss +0 -0
  31. data/vendor/assets/stylesheets/jquery.rambling.slider.css.scss +8 -3
  32. metadata +17 -21
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 15027b814135810fbb9b2af3954c36e9b5a82595
4
+ data.tar.gz: 6c894576f9b73cc4deca91afef0643aa9623a934
5
+ SHA512:
6
+ metadata.gz: 26189126b97fd71ba5f2180d72f6565d1e4eec658881ce08bf36e4a7f6623b68c06dec0c0d9c784e24c8171686c86506aa327c48d5de6d4f73219f74e50ef7a4
7
+ data.tar.gz: 74aca7e15959f08ffcd57d14eeaf5dc0bfb629cdd05ea203d7f1569e41c0e553fac73e340530996631ce43b75fec490d423ce1f38829e6a846454ab927c0f1df
data/.gitignore CHANGED
@@ -3,7 +3,8 @@
3
3
  *.swo
4
4
 
5
5
  # RVM
6
- .rvmrc
6
+ .ruby-version
7
+ .ruby-gemset
7
8
 
8
9
  # Gemfile
9
10
  Gemfile.lock
data/Gemfile CHANGED
File without changes
data/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2012 Rambling Labs
1
+ Copyright (c) 2012-2013 Edgar Gonzalez
2
+
3
+ MIT License
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person
4
6
  obtaining a copy of this software and associated documentation
data/README.markdown CHANGED
@@ -1,4 +1,4 @@
1
- # rambling-slider-rails [![Build Status](https://secure.travis-ci.org/egonzalez0787/rambling-slider-rails.png)](http://travis-ci.org/egonzalez0787/rambling-slider-rails) [![Dependency Status](https://gemnasium.com/egonzalez0787/rambling-slider-rails.png)](https://gemnasium.com/egonzalez0787/rambling-slider-rails) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/egonzalez0787/rambling-slider-rails)
1
+ # rambling-slider-rails [![Build Status](https://secure.travis-ci.org/gonzedge/rambling-slider-rails.png)](http://travis-ci.org/gonzedge/rambling-slider-rails) [![Dependency Status](https://gemnasium.com/gonzedge/rambling-slider-rails.png)](https://gemnasium.com/gonzedge/rambling-slider-rails) [![Code Climate](https://codeclimate.com/github/gonzedge/rambling-slider-rails.png)](https://codeclimate.com/github/gonzedge/rambling-slider-rails) [![Gem Version](https://badge.fury.io/rb/rambling-slider-rails.png)](http://badge.fury.io/rb/rambling-slider-rails)
2
2
 
3
3
  The `rambling-slider-rails` gem provides an easy way to include the [jQuery Rambling Slider](https://github.com/ramblinglabs/rambling.slider) on your Rails application.
4
4
 
@@ -42,7 +42,9 @@ For more information on how to use the jQuery Rambling Slider, you can go to [it
42
42
 
43
43
  ## License and copyright
44
44
 
45
- Copyright (c) 2012 Rambling Labs
45
+ Copyright (c) 2012-2013 Edgar Gonzalez
46
+
47
+ MIT License
46
48
 
47
49
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
48
50
 
data/Rakefile CHANGED
File without changes
File without changes
@@ -2,10 +2,10 @@ module Rambling
2
2
  module Slider
3
3
  module Rails
4
4
  # Current version of rambling-slider-rails.
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.4'
6
6
 
7
7
  # Current version of the jQuery Rambling Slider.
8
- JQUERY_RAMBLING_SLIDER_VERSION = '0.3.1'
8
+ JQUERY_RAMBLING_SLIDER_VERSION = '0.3.2'
9
9
  end
10
10
  end
11
11
  end
File without changes
File without changes
@@ -3,8 +3,8 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
  require 'rambling/slider/rails/version'
4
4
 
5
5
  Gem::Specification.new do |gem|
6
- gem.authors = ['Rambling Labs']
7
- gem.email = ['development@ramblinglabs.com']
6
+ gem.authors = ['Edgar Gonzalez']
7
+ gem.email = ['edggonzalezg@gmail.com']
8
8
  gem.description = 'The rambling-slider-rails is a gem aimed to automate the usage of the jQuery Rambling Slider within a Rails application.'
9
9
  gem.summary = 'Automate usage of jQuery Rambling Slider within Rails.'
10
10
  gem.homepage = 'http://github.com/ramblinglabs/rambling-slider-rails'
@@ -19,5 +19,5 @@ Gem::Specification.new do |gem|
19
19
  gem.version = Rambling::Slider::Rails::VERSION
20
20
  gem.platform = Gem::Platform::RUBY
21
21
 
22
- gem.add_dependency 'jquery-rails', '>=2.0.0'
22
+ gem.add_dependency 'jquery-rails', '>= 2.0.0', '< 2.2.0'
23
23
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,35 +1,36 @@
1
+ /*!
2
+ * jQuery Rambling Slider
3
+ * http://github.com/gonzedge/rambling.slider
4
+ * http://ramblinglabs.com
5
+ *
6
+ * Copyright 2011-2013, Edgar Gonzalez
7
+ * Released under the MIT license.
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * May 2013
11
+ *
12
+ * Based on jQuery Nivo Slider by Gilbert Pellegrom
13
+ */
14
+
15
+
1
16
  (function() {
2
- /*!
3
- * jQuery Rambling Slider
4
- * http://github.com/egonzalez0787/rambling.slider
5
- * http://ramblinglabs.com
6
- *
7
- * Copyright 2011-2012, Rambling Labs
8
- * Released under the MIT license.
9
- * http://www.opensource.org/licenses/mit-license.php
10
- *
11
- * January 2012
12
- *
13
- * Based on jQuery Nivo Slider by Gilbert Pellegrom
14
- */
15
- var RamblingBoxGenerator, RamblingBoxer, RamblingSliceGenerator, RamblingSlicer, root;
16
- var __indexOf = Array.prototype.indexOf || function(item) {
17
- for (var i = 0, l = this.length; i < l; i++) {
18
- if (this[i] === item) return i;
19
- }
20
- return -1;
21
- }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = Array.prototype.slice;
17
+ var RamblingBoxGenerator, RamblingBoxer, RamblingSliceGenerator, RamblingSlicer, root,
18
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
19
+ __slice = [].slice;
20
+
22
21
  Array.prototype.shuffle = function() {
23
- var i, j, _ref, _ref2;
24
- for (i = _ref = this.length; _ref <= 1 ? i <= 1 : i >= 1; _ref <= 1 ? i++ : i--) {
22
+ var i, j, _i, _ref, _ref1;
23
+ for (i = _i = _ref = this.length; _ref <= 1 ? _i <= 1 : _i >= 1; i = _ref <= 1 ? ++_i : --_i) {
25
24
  j = parseInt(Math.random() * i);
26
- _ref2 = [this[j], this[--i]], this[i] = _ref2[0], this[j] = _ref2[1];
25
+ _ref1 = [this[j], this[--i]], this[i] = _ref1[0], this[j] = _ref1[1];
27
26
  }
28
27
  return this;
29
28
  };
29
+
30
30
  Array.prototype.contains = function(value) {
31
31
  return __indexOf.call(this, value) >= 0;
32
32
  };
33
+
33
34
  Array.prototype.where = function(predicate) {
34
35
  var element, _i, _len, _results;
35
36
  _results = [];
@@ -41,6 +42,7 @@
41
42
  }
42
43
  return _results;
43
44
  };
45
+
44
46
  Array.prototype.first = function(predicate) {
45
47
  var element;
46
48
  if (!predicate) {
@@ -60,6 +62,7 @@
60
62
  return _results;
61
63
  }).call(this))[0];
62
64
  };
65
+
63
66
  Array.prototype.map = function(map) {
64
67
  var element, _i, _len, _results;
65
68
  if (!map) {
@@ -74,35 +77,40 @@
74
77
  }
75
78
  return _results;
76
79
  };
80
+
77
81
  Array.prototype.random = function() {
78
82
  return this[Math.floor(Math.random() * this.length)];
79
83
  };
84
+
80
85
  Array.prototype.fromObject = function(object, valueSelector) {
81
- var key, value, _fn;
86
+ var key, value, _fn,
87
+ _this = this;
82
88
  if (!valueSelector) {
83
89
  valueSelector = (function(key, value) {
84
90
  return value;
85
91
  });
86
92
  }
87
- _fn = __bind(function(key, value) {
88
- return this.push(valueSelector(key, value));
89
- }, this);
93
+ _fn = function(key, value) {
94
+ return _this.push(valueSelector(key, value));
95
+ };
90
96
  for (key in object) {
91
97
  value = object[key];
92
98
  _fn(key, value);
93
99
  }
94
100
  return this;
95
101
  };
102
+
96
103
  Array.prototype.sortOutIn = function() {
97
- var halfLength, i, length, newArray, _fn;
104
+ var halfLength, i, length, newArray, _fn, _i,
105
+ _this = this;
98
106
  newArray = [];
99
107
  length = this.length;
100
108
  halfLength = Math.floor(length / 2);
101
- _fn = __bind(function(i) {
102
- newArray.push(this[i]);
103
- return newArray.push(this[length - i - 1]);
104
- }, this);
105
- for (i = 0; 0 <= halfLength ? i < halfLength : i > halfLength; 0 <= halfLength ? i++ : i--) {
109
+ _fn = function(i) {
110
+ newArray.push(_this[i]);
111
+ return newArray.push(_this[length - i - 1]);
112
+ };
113
+ for (i = _i = 0; 0 <= halfLength ? _i < halfLength : _i > halfLength; i = 0 <= halfLength ? ++_i : --_i) {
106
114
  _fn(i);
107
115
  }
108
116
  if (length % 2) {
@@ -110,6 +118,26 @@
110
118
  }
111
119
  return newArray;
112
120
  };
121
+
122
+ String.prototype.contains = function(string) {
123
+ return this.indexOf(string) !== -1;
124
+ };
125
+
126
+ String.prototype.decapitalize = function() {
127
+ var first, rest;
128
+ first = this.slice(0, 1);
129
+ rest = this.slice(1);
130
+ return "" + (first.toLowerCase()) + rest;
131
+ };
132
+
133
+ String.prototype.startsWith = function(string) {
134
+ return this.substring(0, string.length) === string;
135
+ };
136
+
137
+ String.prototype.endsWith = function(string) {
138
+ return this.substring(this.length - string.length, this.length) === string;
139
+ };
140
+
113
141
  (function($) {
114
142
  $.fn.reverse = [].reverse;
115
143
  $.fn.shuffle = [].shuffle;
@@ -149,6 +177,7 @@
149
177
  return result;
150
178
  };
151
179
  })(jQuery);
180
+
152
181
  RamblingBoxGenerator = (function() {
153
182
  function RamblingBoxGenerator(slider, settings, vars) {
154
183
  this.slider = slider;
@@ -156,8 +185,10 @@
156
185
  this.vars = vars;
157
186
  this.boxer = new RamblingBoxer(this.slider);
158
187
  }
188
+
159
189
  RamblingBoxGenerator.prototype.createBoxes = function(boxCols, boxRows) {
160
- var animationContainer, boxHeight, boxWidth, row, _fn;
190
+ var animationContainer, boxHeight, boxWidth, row, _fn, _i,
191
+ _this = this;
161
192
  if (boxCols == null) {
162
193
  boxCols = this.settings.boxCols;
163
194
  }
@@ -167,29 +198,35 @@
167
198
  boxWidth = Math.round(this.slider.width() / boxCols);
168
199
  boxHeight = Math.round(this.slider.height() / boxRows);
169
200
  animationContainer = this.slider.find('#rambling-animation');
170
- _fn = __bind(function(row) {
171
- var column, _results;
201
+ _fn = function(row) {
202
+ var column, _j, _results;
172
203
  _results = [];
173
- for (column = 0; 0 <= boxCols ? column < boxCols : column > boxCols; 0 <= boxCols ? column++ : column--) {
174
- _results.push(__bind(function(column) {
175
- return animationContainer.append(this.boxer.getRamblingBox(boxWidth, boxHeight, row, column, this.settings, this.vars));
176
- }, this)(column));
204
+ for (column = _j = 0; 0 <= boxCols ? _j < boxCols : _j > boxCols; column = 0 <= boxCols ? ++_j : --_j) {
205
+ _results.push((function(column) {
206
+ return animationContainer.append(_this.boxer.getRamblingBox(boxWidth, boxHeight, row, column, _this.settings, _this.vars));
207
+ })(column));
177
208
  }
178
209
  return _results;
179
- }, this);
180
- for (row = 0; 0 <= boxRows ? row < boxRows : row > boxRows; 0 <= boxRows ? row++ : row--) {
210
+ };
211
+ for (row = _i = 0; 0 <= boxRows ? _i < boxRows : _i > boxRows; row = 0 <= boxRows ? ++_i : --_i) {
181
212
  _fn(row);
182
213
  }
183
214
  return this.slider.find('.rambling-box');
184
215
  };
216
+
185
217
  return RamblingBoxGenerator;
218
+
186
219
  })();
220
+
187
221
  root = typeof global !== "undefined" && global !== null ? global : window;
222
+
188
223
  root.RamblingBoxGenerator = RamblingBoxGenerator;
224
+
189
225
  RamblingBoxer = (function() {
190
226
  function RamblingBoxer(slider) {
191
227
  this.slider = slider;
192
228
  }
229
+
193
230
  RamblingBoxer.prototype.getBox = function(boxWidth, boxHeight, row, column, settings) {
194
231
  var boxCss;
195
232
  boxCss = {
@@ -202,6 +239,7 @@
202
239
  };
203
240
  return $('<div class="rambling-box"></div>').css(boxCss);
204
241
  };
242
+
205
243
  RamblingBoxer.prototype.getRamblingBox = function(boxWidth, boxHeight, row, column, settings, vars) {
206
244
  var bottom, ramblingBox, ramblingBoxImageStyle, top;
207
245
  ramblingBox = this.getBox(boxWidth, boxHeight, row, column, settings);
@@ -222,10 +260,15 @@
222
260
  ramblingBox.find('img').css(ramblingBoxImageStyle);
223
261
  return ramblingBox;
224
262
  };
263
+
225
264
  return RamblingBoxer;
265
+
226
266
  })();
267
+
227
268
  root = typeof global !== "undefined" && global !== null ? global : window;
269
+
228
270
  root.RamblingBoxer = RamblingBoxer;
271
+
229
272
  RamblingSliceGenerator = (function() {
230
273
  function RamblingSliceGenerator(slider, settings, vars) {
231
274
  this.slider = slider;
@@ -233,14 +276,17 @@
233
276
  this.vars = vars;
234
277
  this.slicer = new RamblingSlicer(this.slider);
235
278
  }
279
+
236
280
  RamblingSliceGenerator.prototype.getOneSlice = function(slideElement) {
237
281
  if (slideElement == null) {
238
282
  slideElement = this.vars.currentSlideElement;
239
283
  }
240
284
  return this.createSlices(1, slideElement);
241
285
  };
286
+
242
287
  RamblingSliceGenerator.prototype.createSlices = function(slices, slideElement) {
243
- var animationContainer, i, sliceWidth, _fn;
288
+ var animationContainer, i, sliceWidth, _fn, _i,
289
+ _this = this;
244
290
  if (slices == null) {
245
291
  slices = this.settings.slices;
246
292
  }
@@ -249,22 +295,28 @@
249
295
  }
250
296
  sliceWidth = Math.round(this.slider.width() / slices);
251
297
  animationContainer = this.slider.find('#rambling-animation');
252
- _fn = __bind(function(i) {
253
- return animationContainer.append(this.slicer.getRamblingSlice(sliceWidth, i, slices, slideElement, this.settings));
254
- }, this);
255
- for (i = 0; 0 <= slices ? i < slices : i > slices; 0 <= slices ? i++ : i--) {
298
+ _fn = function(i) {
299
+ return animationContainer.append(_this.slicer.getRamblingSlice(sliceWidth, i, slices, slideElement, _this.settings));
300
+ };
301
+ for (i = _i = 0; 0 <= slices ? _i < slices : _i > slices; i = 0 <= slices ? ++_i : --_i) {
256
302
  _fn(i);
257
303
  }
258
304
  return this.slider.find('.rambling-slice');
259
305
  };
306
+
260
307
  return RamblingSliceGenerator;
308
+
261
309
  })();
310
+
262
311
  root = typeof global !== "undefined" && global !== null ? global : window;
312
+
263
313
  root.RamblingSliceGenerator = RamblingSliceGenerator;
314
+
264
315
  RamblingSlicer = (function() {
265
316
  function RamblingSlicer(slider) {
266
317
  this.slider = slider;
267
318
  }
319
+
268
320
  RamblingSlicer.prototype.getSlice = function(sliceWidth, position, total) {
269
321
  var sliceCss;
270
322
  sliceCss = {
@@ -276,6 +328,7 @@
276
328
  };
277
329
  return $('<div class="rambling-slice"></div>').css(sliceCss);
278
330
  };
331
+
279
332
  RamblingSlicer.prototype.getRamblingSlice = function(sliceWidth, position, total, slideElement, settings) {
280
333
  var ramblingSlice, ramblingSliceImageStyle;
281
334
  ramblingSlice = this.getSlice(sliceWidth, position, total);
@@ -290,10 +343,15 @@
290
343
  ramblingSlice.find('img').css(ramblingSliceImageStyle);
291
344
  return ramblingSlice;
292
345
  };
346
+
293
347
  return RamblingSlicer;
348
+
294
349
  })();
350
+
295
351
  root = typeof global !== "undefined" && global !== null ? global : window;
352
+
296
353
  root.RamblingSlicer = RamblingSlicer;
354
+
297
355
  (function($) {
298
356
  var RamblingSlider, cannotChange, publicMethods;
299
357
  publicMethods = ['stop', 'start', 'option', 'effect', 'destroy', 'previousSlide', 'nextSlide', 'slide', 'theme'];
@@ -316,14 +374,14 @@
316
374
  }
317
375
  } else {
318
376
  if (optionsIsString) {
319
- return $.error("Method '" + options + "' not found.");
377
+ throw "Method '" + options + "' not found.";
320
378
  } else {
321
- return $.error("Slider already initialized.");
379
+ throw "Slider already initialized.";
322
380
  }
323
381
  }
324
382
  } else {
325
383
  if (methodExists || optionsIsString) {
326
- return $.error("Tried to call method '" + options + "' on element without slider.");
384
+ throw "Tried to call method '" + options + "' on element without slider.";
327
385
  }
328
386
  }
329
387
  return this.each(function(key, value) {
@@ -376,7 +434,8 @@
376
434
  };
377
435
  cannotChange = ['startSlide', 'directionNav', 'directionNavHide', 'controlNav', 'controlNavThumbs', 'controlNavThumbsFromRel', 'controlNavThumbsSearch', 'controlNavThumbsReplace', 'adaptImages', 'useLargerImage', 'keyboardNav', 'pauseOnHover', 'prevText', 'nextText', 'imageTransitions', 'flashTransitions', 'imageFlashTransitions', 'transitionGroups', 'transitionGroupSuffixes', 'afterLoad'];
378
436
  return RamblingSlider = function(element, options) {
379
- var addCaption, addControlNavigation, addDirectionNavigation, addKeyboardNavigation, animateBoxes, animateBoxesIn2d, animateFullImage, animateSlices, animationTimeBuffer, children, extendAvailableTransitions, fadeBoxes, fadeSlices, flashTransitions, foldSlices, getAnimationHelpers, getAnimationsForCurrentSlideElement, getAvailableTransitions, getRandomAnimation, getSettingsArrayFor, growBoxes, imageFlashTransitions, imageTransitions, pauseSlider, prepareAdaptiveSlider, prepareAnimationContainer, prepareSliderChildren, processCaption, rainBoxes, raiseAnimationFinished, ramblingBoxGenerator, ramblingRun, ramblingSliceGenerator, resetTimer, setAnimationFinishedActions, setCurrentSlideElement, setSliderBackground, setSliderInitialState, setUpTransitions, settings, slideDownSlices, slideTo, slideUpDownSlices, slideUpSlices, slider, timer, transitionGroupSuffixes, transitionGroups, unpauseSlider, vars;
437
+ var addCaption, addControlNavigation, addDirectionNavigation, addKeyboardNavigation, animateBoxes, animateBoxesIn2d, animateFullImage, animateSlices, animationTimeBuffer, children, fadeBoxes, fadeSlices, flashTransitions, foldSlices, getAnimationHelpers, getAnimationsForCurrentSlideElement, getAvailableTransitions, getRandomAnimation, getSettingsArrayFor, growBoxes, imageFlashTransitions, imageTransitions, pauseSlider, prepareAdaptiveSlider, prepareAnimationContainer, prepareSliderChildren, processCaption, rainBoxes, raiseAnimationFinished, ramblingBoxGenerator, ramblingRun, ramblingSliceGenerator, resetTimer, setAnimationFinishedActions, setCurrentSlideElement, setSliderBackground, setSliderInitialState, setUpTransitions, settings, slideDownSlices, slideTo, slideUpDownSlices, slideUpSlices, slider, timer, transitionGroupSuffixes, transitionGroups, unpauseSlider, vars,
438
+ _this = this;
380
439
  slider = $(element);
381
440
  children = slider.children(':not(#rambling-animation)');
382
441
  settings = $.extend({}, $.fn.ramblingSlider.defaults, options);
@@ -440,7 +499,7 @@
440
499
  slider.children().show().children().show();
441
500
  return slider;
442
501
  };
443
- this.option = __bind(function() {
502
+ this.option = function() {
444
503
  var option, optionIsObject, options, value;
445
504
  options = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
446
505
  if (!options.length) {
@@ -449,24 +508,24 @@
449
508
  option = options[0], value = options[1];
450
509
  optionIsObject = typeof option === 'object';
451
510
  if (option === 'effect') {
452
- return this.effect.apply(this, value ? [value] : void 0);
511
+ return _this.effect.apply(_this, value ? [value] : void 0);
453
512
  }
454
513
  if (option === 'theme') {
455
- return this.theme.apply(this, value ? [value] : void 0);
514
+ return _this.theme.apply(_this, value ? [value] : void 0);
456
515
  }
457
516
  if (optionIsObject) {
458
517
  return $.extend(settings, option);
459
518
  } else {
460
519
  if (value != null) {
461
520
  if (__indexOf.call(cannotChange, option) >= 0) {
462
- return $.error("Slider already running. Option '" + option + "' cannot be changed.");
521
+ throw "Slider already running. Option '" + option + "' cannot be changed.";
463
522
  }
464
523
  return settings[option] = value;
465
524
  } else {
466
525
  return settings[option];
467
526
  }
468
527
  }
469
- }, this);
528
+ };
470
529
  this.effect = function() {
471
530
  var effects;
472
531
  effects = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
@@ -502,8 +561,7 @@
502
561
  if (settings.pauseOnHover) {
503
562
  slider.hover(pauseSlider, unpauseSlider);
504
563
  }
505
- setAnimationFinishedActions();
506
- return extendAvailableTransitions();
564
+ return setAnimationFinishedActions();
507
565
  };
508
566
  this.run = function() {
509
567
  if (!settings.manualAdvance && vars.totalSlides > 1) {
@@ -530,34 +588,29 @@
530
588
  });
531
589
  return array;
532
590
  };
533
- setSliderInitialState = __bind(function() {
534
- this.effect(settings.effect);
535
- this.theme(settings.theme);
591
+ setSliderInitialState = function() {
592
+ _this.effect(settings.effect);
593
+ _this.theme(settings.theme);
536
594
  setUpTransitions();
537
595
  slider.css({
538
596
  position: 'relative'
539
597
  });
540
- slider.addClass("ramblingSlider");
598
+ slider.addClass('ramblingSlider');
541
599
  vars.totalSlides = children.length;
600
+ prepareSliderChildren();
542
601
  prepareAnimationContainer();
543
602
  if (settings.adaptImages) {
544
- prepareAdaptiveSlider();
603
+ return prepareAdaptiveSlider();
545
604
  }
546
- return prepareSliderChildren();
547
- }, this);
605
+ };
548
606
  prepareAnimationContainer = function() {
549
- return slider.prepend($('<div id="rambling-animation"></div>').css({
607
+ var ramblingAnimationContainer;
608
+ ramblingAnimationContainer = $('<div id="rambling-animation"></div>').css({
550
609
  width: slider.width(),
551
610
  height: slider.height(),
552
611
  overflow: 'hidden'
553
- }));
554
- };
555
- prepareAdaptiveSlider = function() {
556
- return slider.addClass('adaptingSlider');
557
- };
558
- prepareSliderChildren = function() {
559
- var child, ramblingAnimationContainer;
560
- ramblingAnimationContainer = slider.find('#rambling-animation');
612
+ });
613
+ slider.prepend(ramblingAnimationContainer);
561
614
  children.each(function() {
562
615
  var child, clone;
563
616
  child = $(this);
@@ -575,7 +628,13 @@
575
628
  }
576
629
  return ramblingAnimationContainer.append(clone);
577
630
  });
578
- children = ramblingAnimationContainer.children();
631
+ return children = ramblingAnimationContainer.children();
632
+ };
633
+ prepareAdaptiveSlider = function() {
634
+ return slider.addClass('adaptingSlider');
635
+ };
636
+ prepareSliderChildren = function() {
637
+ var child;
579
638
  children.each(function() {
580
639
  var child, childHeight, childWidth, link, object;
581
640
  child = $(this);
@@ -639,9 +698,9 @@
639
698
  });
640
699
  }
641
700
  };
642
- addControlNavigation = __bind(function() {
643
- var controlNavAnchors, i, ramblingControl, self, _fn, _ref;
644
- self = this;
701
+ addControlNavigation = function() {
702
+ var controlNavAnchors, i, ramblingControl, self, _fn, _i, _ref;
703
+ self = _this;
645
704
  if (settings.controlNav) {
646
705
  ramblingControl = $('<div class="rambling-controlNav"></div>');
647
706
  slider.append(ramblingControl);
@@ -661,7 +720,7 @@
661
720
  return ramblingControl.append("<a class='rambling-control' rel='" + i + "'>" + (i + 1) + "'</a>");
662
721
  }
663
722
  };
664
- for (i = 0, _ref = children.length; 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) {
723
+ for (i = _i = 0, _ref = children.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
665
724
  _fn(i);
666
725
  }
667
726
  controlNavAnchors = slider.find('.rambling-controlNav a');
@@ -678,7 +737,7 @@
678
737
  return self.slide($(this).attr('rel'));
679
738
  });
680
739
  }
681
- }, this);
740
+ };
682
741
  addKeyboardNavigation = function() {
683
742
  if (settings.keyboardNav) {
684
743
  return $(window).keypress(function(event) {
@@ -691,9 +750,9 @@
691
750
  });
692
751
  }
693
752
  };
694
- setAnimationFinishedActions = __bind(function() {
753
+ setAnimationFinishedActions = function() {
695
754
  var self;
696
- self = this;
755
+ self = _this;
697
756
  return slider.bind('rambling:finished', function() {
698
757
  var child;
699
758
  vars.running = false;
@@ -713,17 +772,6 @@
713
772
  slider.find('.rambling-slice,.rambling-box').remove();
714
773
  return settings.afterChange.call(this);
715
774
  });
716
- }, this);
717
- extendAvailableTransitions = function() {
718
- if (settings.imageTransitions) {
719
- $.extend(imageTransitions, settings.imageTransitions);
720
- }
721
- if (settings.imageFlashTransitions) {
722
- $.extend(imageFlashTransitions, settings.imageFlashTransitions);
723
- }
724
- if (settings.flashTransitions) {
725
- return $.extend(flashTransitions, settings.flashTransitions);
726
- }
727
775
  };
728
776
  processCaption = function(settings) {
729
777
  var ramblingCaption, title;
@@ -766,12 +814,12 @@
766
814
  vars.paused = true;
767
815
  return resetTimer();
768
816
  };
769
- unpauseSlider = __bind(function() {
817
+ unpauseSlider = function() {
770
818
  vars.paused = false;
771
819
  if (timer === '') {
772
- return this.run();
820
+ return _this.run();
773
821
  }
774
- }, this);
822
+ };
775
823
  slideTo = function(direction) {
776
824
  if (vars.running || vars.totalSlides === 1) {
777
825
  return false;
@@ -905,17 +953,17 @@
905
953
  };
906
954
  animateBoxesIn2d = function(animationSetUp, sortCallback) {
907
955
  return animateBoxes(function(finishedCallback) {
908
- var boxes, column, index, totalBoxes, _ref, _results;
956
+ var boxes, column, index, totalBoxes, _i, _ref, _results;
909
957
  boxes = this;
910
958
  totalBoxes = settings.boxCols * settings.boxRows;
911
959
  index = 0;
912
960
  _results = [];
913
- for (column = 0, _ref = settings.boxCols * 2; 0 <= _ref ? column < _ref : column > _ref; 0 <= _ref ? column++ : column--) {
961
+ for (column = _i = 0, _ref = settings.boxCols * 2; 0 <= _ref ? _i < _ref : _i > _ref; column = 0 <= _ref ? ++_i : --_i) {
914
962
  _results.push((function(column) {
915
- var row, _ref2, _results2;
916
- _results2 = [];
917
- for (row = 0, _ref2 = settings.boxRows; 0 <= _ref2 ? row < _ref2 : row > _ref2; 0 <= _ref2 ? row++ : row--) {
918
- _results2.push((function(row) {
963
+ var row, _j, _ref1, _results1;
964
+ _results1 = [];
965
+ for (row = _j = 0, _ref1 = settings.boxRows; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; row = 0 <= _ref1 ? ++_j : --_j) {
966
+ _results1.push((function(row) {
919
967
  var box, finished;
920
968
  if (column >= 0 && column < settings.boxCols) {
921
969
  box = $(boxes[row][column]);
@@ -931,7 +979,7 @@
931
979
  return column--;
932
980
  })(row));
933
981
  }
934
- return _results2;
982
+ return _results1;
935
983
  })(column));
936
984
  }
937
985
  return _results;
@@ -1106,6 +1154,7 @@
1106
1154
  return this;
1107
1155
  };
1108
1156
  })(jQuery);
1157
+
1109
1158
  (function($) {
1110
1159
  var allAroundTransitions, animationFullImageOptions, boxTransitions, flashHorizontalSlideIn, flashSlideIn, name, transitions, value, _fn;
1111
1160
  allAroundTransitions = [
@@ -1237,7 +1286,8 @@
1237
1286
  };
1238
1287
  },
1239
1288
  slideInLeft: function(slider) {
1240
- var finishedHandler;
1289
+ var finishedHandler,
1290
+ _this = this;
1241
1291
  this.css({
1242
1292
  height: '100%',
1243
1293
  width: 0,
@@ -1245,21 +1295,22 @@
1245
1295
  left: 'auto',
1246
1296
  right: 0
1247
1297
  });
1248
- finishedHandler = __bind(function() {
1249
- this.css({
1298
+ finishedHandler = function() {
1299
+ _this.css({
1250
1300
  left: 0,
1251
1301
  right: 'auto'
1252
1302
  });
1253
1303
  return slider.unbind('rambling:finished', finishedHandler);
1254
- }, this);
1304
+ };
1255
1305
  slider.bind('rambling:finished', finishedHandler);
1256
1306
  }
1257
1307
  };
1258
1308
  flashSlideIn = function(beforeAnimation, animateStyle, afterAnimation) {
1309
+ var _this = this;
1259
1310
  this.currentSlideElement.css(beforeAnimation);
1260
- return window.setTimeout((__bind(function() {
1261
- return this.currentSlideElement.animate(animateStyle, this.settings.speed * 2, this.raiseAnimationFinished);
1262
- }, this)), this.settings.speed * 2);
1311
+ return window.setTimeout((function() {
1312
+ return _this.currentSlideElement.animate(animateStyle, _this.settings.speed * 2, _this.raiseAnimationFinished);
1313
+ }), this.settings.speed * 2);
1263
1314
  };
1264
1315
  flashHorizontalSlideIn = function(initialLeft) {
1265
1316
  var afterAnimation, beforeAnimation;
@@ -1341,19 +1392,5 @@
1341
1392
  });
1342
1393
  return $.fn.ramblingSlider.defaults.transitionGroupSuffixes = ['Right', 'Left', 'OutIn', 'InOut', 'Random', 'Forward', 'Reverse', 'In', 'Out'];
1343
1394
  })(jQuery);
1344
- String.prototype.contains = function(string) {
1345
- return this.indexOf(string) !== -1;
1346
- };
1347
- String.prototype.decapitalize = function() {
1348
- var first, rest;
1349
- first = this.slice(0, 1);
1350
- rest = this.slice(1);
1351
- return "" + (first.toLowerCase()) + rest;
1352
- };
1353
- String.prototype.startsWith = function(string) {
1354
- return this.substring(0, string.length) === string;
1355
- };
1356
- String.prototype.endsWith = function(string) {
1357
- return this.substring(this.length - string.length, this.length) === string;
1358
- };
1395
+
1359
1396
  }).call(this);
@@ -1,15 +1,14 @@
1
- (function(){
2
- /*!
3
- * jQuery Rambling Slider
4
- * http://github.com/egonzalez0787/rambling.slider
5
- * http://ramblinglabs.com
6
- *
7
- * Copyright 2011-2012, Rambling Labs
8
- * Released under the MIT license.
9
- * http://www.opensource.org/licenses/mit-license.php
10
- *
11
- * January 2012
12
- *
13
- * Based on jQuery Nivo Slider by Gilbert Pellegrom
14
- */
15
- var g,f,e,b,a;var d=Array.prototype.indexOf||function(m){for(var k=0,j=this.length;k<j;k++){if(this[k]===m){return k}}return -1},c=function(i,j){return function(){return i.apply(j,arguments)}},h=Array.prototype.slice;Array.prototype.shuffle=function(){var l,k,m,n;for(l=m=this.length;m<=1?l<=1:l>=1;m<=1?l++:l--){k=parseInt(Math.random()*l);n=[this[k],this[--l]],this[l]=n[0],this[k]=n[1]}return this};Array.prototype.contains=function(i){return d.call(this,i)>=0};Array.prototype.where=function(i){var l,m,k,j;j=[];for(m=0,k=this.length;m<k;m++){l=this[m];if(i(l)){j.push(l)}}return j};Array.prototype.first=function(i){var j;if(!i){i=(function(k){return true})}return((function(){var m,l,k;k=[];for(m=0,l=this.length;m<l;m++){j=this[m];if(i(j)){k.push(j)}}return k}).call(this))[0]};Array.prototype.map=function(m){var k,l,j,i;if(!m){m=(function(n){return n})}i=[];for(l=0,j=this.length;l<j;l++){k=this[l];i.push(m(k))}return i};Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]};Array.prototype.fromObject=function(i,l){var j,k,m;if(!l){l=(function(n,o){return o})}m=c(function(n,o){return this.push(l(n,o))},this);for(j in i){k=i[j];m(j,k)}return this};Array.prototype.sortOutIn=function(){var m,k,l,j,n;j=[];l=this.length;m=Math.floor(l/2);n=c(function(o){j.push(this[o]);return j.push(this[l-o-1])},this);for(k=0;0<=m?k<m:k>m;0<=m?k++:k--){n(k)}if(l%2){j.push(this[m])}return j};(function(i){i.fn.reverse=[].reverse;i.fn.shuffle=[].shuffle;i.fn.sortOutIn=function(){return i(Array.prototype.sortOutIn.apply(this))};i.fn.sortInOut=function(){return this.sortOutIn().reverse()};i.fn.as2dArray=function(j){var k,l,m;m=0;l=0;k=i("");k[m]=i("");this.each(function(){k[m][l]=i(this);l++;if(l===j){m++;l=0;return k[m]=i("")}});return k};i.fn.containsFlash=function(){return this.find("object,embed").length};return i.fn.equals=function(k){var j;j=true;j=this.length===k.length;this.each(function(l,m){return j=j&&m===k.get(l)});return j}})(jQuery);g=(function(){function i(k,j,l){this.slider=k;this.settings=j;this.vars=l;this.boxer=new f(this.slider)}i.prototype.createBoxes=function(k,j){var l,o,m,n,p;if(k==null){k=this.settings.boxCols}if(j==null){j=this.settings.boxRows}m=Math.round(this.slider.width()/k);o=Math.round(this.slider.height()/j);l=this.slider.find("#rambling-animation");p=c(function(s){var r,q;q=[];for(r=0;0<=k?r<k:r>k;0<=k?r++:r--){q.push(c(function(t){return l.append(this.boxer.getRamblingBox(m,o,s,t,this.settings,this.vars))},this)(r))}return q},this);for(n=0;0<=j?n<j:n>j;0<=j?n++:n--){p(n)}return this.slider.find(".rambling-box")};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingBoxGenerator=g;f=(function(){function i(j){this.slider=j}i.prototype.getBox=function(m,o,n,l,k){var j;j={opacity:0,left:m*l,top:o*n,width:l===(k.boxCols-1)?this.slider.width()-(m*l):m,height:o,overflow:"hidden"};return $('<div class="rambling-box"></div>').css(j)};i.prototype.getRamblingBox=function(o,q,s,l,m,p){var j,n,k,r;n=this.getBox(o,q,s,l,m);j=m.alignBottom?q*(m.boxRows-(s+1)):"auto";r=m.alignBottom?"auto":s*q;k={display:"block",width:this.slider.width(),left:-(l*o),top:m.alignBottom?"auto":-r,bottom:m.alignBottom?-j:"auto"};n.css({top:r,bottom:j});n.append("<span><img src='"+(p.currentSlideElement.attr("src")||p.currentSlideElement.find("img").attr("src"))+"' alt=''/></span>");n.find("img").css(k);return n};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingBoxer=f;e=(function(){function i(k,j,l){this.slider=k;this.settings=j;this.vars=l;this.slicer=new b(this.slider)}i.prototype.getOneSlice=function(j){if(j==null){j=this.vars.currentSlideElement}return this.createSlices(1,j)};i.prototype.createSlices=function(m,o){var k,j,l,n;if(m==null){m=this.settings.slices}if(o==null){o=this.vars.currentSlideElement}l=Math.round(this.slider.width()/m);k=this.slider.find("#rambling-animation");n=c(function(p){return k.append(this.slicer.getRamblingSlice(l,p,m,o,this.settings))},this);for(j=0;0<=m?j<m:j>m;0<=m?j++:j--){n(j)}return this.slider.find(".rambling-slice")};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingSliceGenerator=e;b=(function(){function i(j){this.slider=j}i.prototype.getSlice=function(l,j,k){var m;m={left:l*j,width:j===(k-1)?this.slider.width()-(l*j):l,height:0,opacity:0,overflow:"hidden"};return $('<div class="rambling-slice"></div>').css(m)};i.prototype.getRamblingSlice=function(o,j,n,p,m){var l,k;l=this.getSlice(o,j,n);l.append('<span><img src="'+(p.attr("src")||p.find("img").attr("src"))+'" alt=""/></span>');k={display:"block",width:this.slider.width(),left:-j*o,bottom:m.alignBottom?0:"auto",top:m.alignBottom?"auto":0};l.find("img").css(k);return l};return i})();a=typeof global!=="undefined"&&global!==null?global:window;a.RamblingSlicer=b;(function(k){var l,j,i;i=["stop","start","option","effect","destroy","previousSlide","nextSlide","slide","theme"];k.fn.ramblingSlider=function(){var r,s,n,m,o,p,q;n=arguments[0],o=2<=arguments.length?h.call(arguments,1):[];s=d.call(i,n)>=0;m=typeof n==="string";p=this.data("rambling:slider");r=function(t,u){return !u.length||(t==="option"&&u.length===1&&typeof u[0]==="string")};if(p){if(s){q=p[n].apply(p,o);if(r(n,o)){return q}else{return this}}else{if(m){return k.error("Method '"+n+"' not found.")}else{return k.error("Slider already initialized.")}}}else{if(s||m){return k.error("Tried to call method '"+n+"' on element without slider.")}}return this.each(function(u,v){var t;t=k(this);if(t.data("rambling:slider")){return}p=new l(this,n);t.data("rambling:slider",p);p.initialize();return p.run()})};k.fn.ramblingSlider.defaults={slices:15,boxCols:8,boxRows:4,speed:500,pauseTime:4500,manualAdvance:false,captionOpacity:0.8,theme:"default",alignBottom:false,effect:"random",startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",adaptImages:false,useLargerImage:true,keyboardNav:true,pauseOnHover:true,prevText:"Prev",nextText:"Next",imageTransitions:null,flashTransitions:null,imageFlashTransitions:null,transitionGroups:[],transitionGroupSuffixes:[],beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};j=["startSlide","directionNav","directionNavHide","controlNav","controlNavThumbs","controlNavThumbsFromRel","controlNavThumbsSearch","controlNavThumbsReplace","adaptImages","useLargerImage","keyboardNav","pauseOnHover","prevText","nextText","imageTransitions","flashTransitions","imageFlashTransitions","transitionGroups","transitionGroupSuffixes","afterLoad"];return l=function(B,K){var y,U,S,H,al,ak,x,r,ag,F,w,ab,D,Q,ae,p,T,v,N,G,af,z,o,Y,V,I,ai,A,P,M,aj,Z,C,u,ac,t,X,R,ah,ad,J,n,aa,q,s,O,L,E,m,W;s=k(B);F=s.children(":not(#rambling-animation)");ad=k.extend({},k.fn.ramblingSlider.defaults,K);O=0;ag=0;o=null;z=null;Q=null;E=[];L=[];W={currentSlide:0,currentSlideElement:"",previousSlideElement:"",totalSlides:0,running:false,paused:false,stopped:false};s.data("rambling:vars",W);C=new e(s,ad,W);aj=new g(s,ad,W);this.stop=function(){W.stopped=true;return s};this.start=function(){W.stopped=false;return s};this.previousSlide=function(){n("prev");return s};this.nextSlide=function(){n("next");return s};this.slide=function(){var am,an;an=1<=arguments.length?h.call(arguments,0):[];if(!an.length){return W.currentSlide}am=an[0]%W.totalSlides;if(!(W.running||W.totalSlides===1)){W.currentSlide=am-1;Z(s,F,ad,"control")}return s};this.destroy=function(){s.find("#rambling-animation,.rambling-slice,.rambling-box,.rambling-caption,.rambling-directionNav,.rambling-controlNav").remove();s.removeClass("ramblingSlider adaptingSlider");s.removeAttr("style");s.data("rambling:vars",null);s.data("rambling:slider",null);s.unbind("rambling:finished");s.unbind("hover");u();s.children().show().children().show();return s};this.option=c(function(){var ao,an,am,ap;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad}ao=am[0],ap=am[1];an=typeof ao==="object";if(ao==="effect"){return this.effect.apply(this,ap?[ap]:void 0)}if(ao==="theme"){return this.theme.apply(this,ap?[ap]:void 0)}if(an){return k.extend(ad,ao)}else{if(ap!=null){if(d.call(j,ao)>=0){return k.error("Slider already running. Option '"+ao+"' cannot be changed.")}return ad[ao]=ap}else{return ad[ao]}}},this);this.effect=function(){var am;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad.effect}ad.effect=am[0];return s};this.theme=function(){var ao,an,am;am=1<=arguments.length?h.call(arguments,0):[];if(!am.length){return ad.theme}an=ad.theme;ad.theme=am[0];ao=["theme-"+an,"theme-"+k.fn.ramblingSlider.defaults.theme];s.parents(ao.map(function(ap){return"."+ap}).join(",")).removeClass(ao.join(" ")).addClass("theme-"+ad.theme);return s};this.initialize=function(){R();W.currentSlide=ad.startSlide=ad.startSlide%W.totalSlides;t(F);X();y();S();U(F);H();if(ad.pauseOnHover){s.hover(Y,m)}ac();return w()};this.run=function(){if(!ad.manualAdvance&&W.totalSlides>1){return O=window.setInterval((function(){return Z(s,F,ad,false)}),ad.pauseTime)}};ah=function(){o=k.extend({},k.fn.ramblingSlider.defaults.imageTransitions,ad.imageTransitions);z=k.extend({},k.fn.ramblingSlider.defaults.imageFlashTransitions,ad.imageFlashTransitions);Q=k.extend({},k.fn.ramblingSlider.defaults.flashTransitions,ad.flashTransitions);E=G("transitionGroups");return L=G("transitionGroupSuffixes")};G=function(am){var an;an=[];k.each(k.fn.ramblingSlider.defaults[am],function(ao,ap){return an.push(ap)});k.each(ad[am],function(ao,ap){return an.push(ap)});return an};R=c(function(){this.effect(ad.effect);this.theme(ad.theme);ah();s.css({position:"relative"});s.addClass("ramblingSlider");W.totalSlides=F.length;I();if(ad.adaptImages){V()}return ai()},this);I=function(){return s.prepend(k('<div id="rambling-animation"></div>').css({width:s.width(),height:s.height(),overflow:"hidden"}))};V=function(){return s.addClass("adaptingSlider")};ai=function(){var an,am;am=s.find("#rambling-animation");F.each(function(){var ap,ao;ap=k(this);ap.css({display:"none"});ao=ap.clone().addClass("slideElement");if(ao.containsFlash()){if(!ao.find("param[name=wmode]").length){ao.find("object").prepend('<param name="wmode" value="opaque" />')}ao.find("embed").attr({wmode:"opaque"})}return am.append(ao)});F=am.children();F.each(function(){var at,ao,ap,ar,aq;at=k(this);ar=null;if(at.is("a")&&!at.containsFlash()){ar=at.addClass("rambling-imageLink");at=at.find("img:first")}ap=at.width()||at.attr("width");ao=at.height()||at.attr("height");if(ap>s.width()&&ad.useLargerImage){s.width(ap)}if(ao>s.height()&&(ad.useLargerImage||!ad.adaptImages)){s.height(ao)}aq=at.find("object,embed");aq.height(s.height());aq.width(s.width());if(ar){ar.css({display:"none"})}return at.css({display:"none"})});an=t(F);if(an.is("a")){return an.css({display:"block"})}};y=function(){s.append(k('<div class="rambling-caption"><p></p></div>').css({display:"none",opacity:ad.captionOpacity}));return A(ad)};S=function(){var am;if(ad.directionNav&&W.totalSlides>1){am=k("<div class='rambling-directionNav'><a class='rambling-prevNav'>"+ad.prevText+"</a><a class='rambling-nextNav'>"+ad.nextText+"</a></div>");s.append(am);if(ad.directionNavHide){am.hide();s.hover((function(){return am.show()}),(function(){return am.hide()}))}s.find("a.rambling-prevNav").live("click",function(){return n("prev")});return s.find("a.rambling-nextNav").live("click",function(){return n("next")})}};U=c(function(){var ao,an,ap,am,ar,aq;am=this;if(ad.controlNav){ap=k('<div class="rambling-controlNav"></div>');s.append(ap);ar=function(at){var au;if(ad.controlNavThumbs){au=F.eq(at);if(!au.is("img")){au=au.find("img:first")}if(ad.controlNavThumbsFromRel){return ap.append("<a class='rambling-control' rel='"+at+"'><img src='"+(au.attr("rel"))+"' alt='' /></a>")}else{return ap.append("<a class='rambling-control' rel='"+at+"'><img src='"+(au.attr("src").replace(ad.controlNavThumbsSearch,ad.controlNavThumbsReplace))+"' alt='' /></a>")}}else{return ap.append("<a class='rambling-control' rel='"+at+"'>"+(at+1)+"'</a>")}};for(an=0,aq=F.length;0<=aq?an<aq:an>aq;0<=aq?an++:an--){ar(an)}ao=s.find(".rambling-controlNav a");ao.filter(":eq("+W.currentSlide+")").addClass("active");return ao.live("click",function(){if(W.running){return false}if(k(this).hasClass("active")){return false}u();X();return am.slide(k(this).attr("rel"))})}},this);H=function(){if(ad.keyboardNav){return k(window).keypress(function(am){if(am.keyCode===37){n("prev")}if(am.keyCode===39){return n("next")}})}};ac=c(function(){var am;am=this;return s.bind("rambling:finished",function(){var an;W.running=false;an=k(F.get(W.currentSlide));an.siblings().css({display:"none"});if(an.is("a")){an.css({display:"block"})}if(O===""&&!W.paused){am.run()}X();s.find(".rambling-slice,.rambling-box").remove();return ad.afterChange.call(this)})},this);w=function(){if(ad.imageTransitions){k.extend(o,ad.imageTransitions)}if(ad.imageFlashTransitions){k.extend(z,ad.imageFlashTransitions)}if(ad.flashTransitions){return k.extend(Q,ad.flashTransitions)}};A=function(an){var am,ao;am=s.find(".rambling-caption");ao=W.currentSlideElement.attr("title");if(ao){if(ao.startsWith("#")){ao=k(ao).html()}if(am.css("display")==="block"){am.find("p").fadeOut(an.speed,function(){var ap;ap=k(this);ap.html(ao);return ap.fadeIn(an.speed)})}else{am.find("p").html(ao)}return am.fadeIn(an.speed)}else{return am.fadeOut(an.speed)}};t=function(am){var an;an=k(am.get(W.currentSlide));W.previousSlideElement=W.currentSlideElement;W.currentSlideElement=an;if(an.is("a")&&!an.containsFlash()){W.currentSlideElement=an.find("img:first")}return an};u=function(){window.clearInterval(O);return O=""};Y=function(){W.paused=true;return u()};m=c(function(){W.paused=false;if(O===""){return this.run()}},this);n=function(am){if(W.running||W.totalSlides===1){return false}u();if(am==="prev"){W.currentSlide-=2}return Z(s,F,ad,am)};X=function(){var am;am=s.find(".currentSlideElement");if(am.equals(W.currentSlideElement)){return}am.removeClass("currentSlideElement alignTop alignBottom").css({display:"none","z-index":0});am=W.currentSlideElement;am.siblings(".slideElement").css({display:"none"});am.addClass("currentSlideElement").addClass(ad.alignBottom?"alignBottom":"alignTop");am.css({display:"block","z-index":0});return am.find("img").css({display:"block"})};v=function(){var am;am=ad.effect.split(",");k.each(E,function(an,ap){var ao;if(am.contains(ap)){ao=[am.indexOf(ap),1];k.each(L,function(aq,ar){return ao.push(""+ap+ar)});return am.splice.apply(am,ao)}});return am};T=function(){var ap,an,am,ao;ao=[];am=[];if(W.currentSlideElement.containsFlash()){if(W.previousSlideElement.containsFlash()){am=Q;an=Q.slideInRight}else{am=z;an=z.fadeOut}}else{am=o;an=o.fadeIn}ap=v();ao=[].fromObject(am,function(aq,ar){return aq});if(ad.effect!=="random"){ao=ao.where(function(aq){return ap.contains(aq)})}ao=ao.map(function(aq){return am[aq]});ao["default"]=an;return ao};N=function(){var am;am=T();return am.random()||am["default"]};M=function(){return s.trigger("rambling:finished")};x=function(am){var an;an=C.getOneSlice();an.css({top:(ad.alignBottom?"auto":0),bottom:(ad.alignBottom?0:"auto")});return an.animate(am.apply(an,[s,k.extend({},ad)])||{width:s.width()},ad.speed*2,"",function(){if(ad.afterChange){ad.afterChange.apply(an)}return M()})};r=function(am,ao){var an;an=C.createSlices();ag=0;if(ao){an=ao.apply(an)}return an.each(function(ap,ar){var aq,at;at=k(ar);if(ap===ad.slices-1){aq=M}window.setTimeout((function(){return at.animate(am.apply(at,[ap,ar])||{},ad.speed,"",aq)}),100+ag);return ag+=50})};al=function(am,ao){var an;an=aj.createBoxes();ag=0;if(ao){an=ao.apply(an)}return am.apply(an,[M])};ak=function(am,an){return al(function(ar){var aq,at,ap,av,au,ao;aq=this;av=ad.boxCols*ad.boxRows;ap=0;ao=[];for(at=0,au=ad.boxCols*2;0<=au?at<au:at>au;0<=au?at++:at--){ao.push((function(ax){var ay,az,aw;aw=[];for(ay=0,az=ad.boxRows;0<=az?ay<az:ay>az;0<=az?ay++:ay--){aw.push((function(aB){var aA,aC;if(ax>=0&&ax<ad.boxCols){aA=k(aq[aB][ax]);if(ap===av-1){aC=ar}window.setTimeout((function(){return aA.animate(am.apply(aA),ad.speed/1.3,"",aC)}),100+ag);ap++;ag+=20}return ax--})(ay))}return aw})(at))}return ao},function(){var ao;ao=this;if(an){ao=an.call(this)}return ao.as2dArray(ad.boxCols)})};J=function(am){return r((function(an,ao){this.css({top:0});return{height:s.height(),opacity:"1"}}),am)};q=function(am){return r((function(an,ao){this.css({bottom:0});return{height:s.height(),opacity:"1"}}),am)};aa=function(am){return r((function(an,ao){this.css((an%2?{bottom:0}:{top:0}));return{height:s.height(),opacity:"1"}}),am)};ae=function(am){return r((function(ao,ap){var an,aq;aq=k(ap);an={width:aq.width(),opacity:"1"};aq.css({top:0,height:"100%",width:0});return an}),am)};D=function(am){return r((function(an,ao){this.css({height:s.height()});return{opacity:"1"}}),am)};ab=function(am){return al(function(an){var ao;ao=this.length;ag=0;return this.each(function(ap){var aq,ar;aq=k(this);if(ap===ao-1){ar=an}window.setTimeout((function(){return aq.animate({opacity:"1"},ad.speed,"",ar)}),100+ag);return ag+=20})},am)};P=function(am){return ak((function(){return{opacity:"1"}}),am)};af=function(am){return ak((function(){var an,ao;ao=this.width();an=this.height();this.css({width:0,height:0});return{opacity:"1",width:ao,height:an}}),am)};p=function(){var am;return am={setSliderBackground:X,currentSlideElement:W.currentSlideElement,previousSlideElement:W.previousSlideElement,raiseAnimationFinished:M,settings:k.extend({},ad),createSlices:function(ao,an){return C.createSlices(ao,an)},createBoxes:function(ao,an){return aj.createBoxes(ao,an)},getOneSlice:function(an){return C.getOneSlice(an)},animateFullImage:x,animateSlices:r,animateBoxes:al,animateBoxesIn2d:ak,slideUpSlices:q,slideDownSlices:J,slideUpDownSlices:aa,foldSlices:ae,fadeSlices:D,fadeBoxes:ab,rainBoxes:P,growBoxes:af}};Z=function(ap,an,ao,am){if(W.currentSlide===W.totalSlides-1){ao.lastSlide.call(this)}if(W.stopped&&!am){return false}ao.beforeChange.call(this);W.currentSlide=(W.currentSlide+1)%W.totalSlides;if(W.currentSlide===0){ao.slideshowEnd.call(this)}if(W.currentSlide<0){W.currentSlide=W.totalSlides+W.currentSlide}t(an);if(ao.controlNav){ap.find(".rambling-controlNav a").removeClass("active").filter(":eq("+W.currentSlide+")").addClass("active")}A(ao);W.running=true;return N().call(p())};ad.afterLoad.call(this);return this}})(jQuery);(function(n){var l,j,r,m,o,i,p,q,k;l=[{name:"sliceUp",helper:"slideUpSlices"},{name:"sliceDown",helper:"slideDownSlices"},{name:"sliceUpDown",helper:"slideUpDownSlices"},{name:"sliceFade",helper:"fadeSlices"},{name:"fold",helper:"foldSlices"}];l.suffixes=[{name:"Right",sorter:void 0},{name:"Left",sorter:n.fn.reverse},{name:"OutIn",sorter:n.fn.sortOutIn},{name:"InOut",sorter:n.fn.sortInOut},{name:"Random",sorter:n.fn.shuffle}];r=[{name:"boxRain",helper:"rainBoxes"},{name:"boxGrow",helper:"growBoxes"}];r.suffixes=[{name:"Forward",sorter:void 0},{name:"Reverse",sorter:n.fn.reverse},{name:"OutIn",sorter:n.fn.sortOutIn},{name:"InOut",sorter:n.fn.sortInOut},{name:"Random",sorter:n.fn.shuffle}];p=[l,r];j={fadeIn:function(s){this.css({height:"100%",width:s.width(),position:"absolute",top:0,left:0});return{opacity:"1"}},fadeOut:function(s){this.css({height:"100%",width:s.width(),position:"absolute",top:0,left:0});return{opacity:"1"}},rolloverRight:function(){this.css({height:"100%",width:0,opacity:"1"})},rolloverLeft:function(t,s){this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0});this.find("img").css({left:-t.width()}).animate({left:0},s.speed*2);return{width:t.width()}},slideInRight:function(t,s){this.css({height:"100%",width:0,opacity:"1"});this.find("img").css({left:-t.width()}).animate({left:0},s.speed*2);return{width:t.width()}},slideInLeft:function(s){var t;this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0});t=c(function(){this.css({left:0,right:"auto"});return s.unbind("rambling:finished",t)},this);s.bind("rambling:finished",t)}};o=function(t,s,u){this.currentSlideElement.css(t);return window.setTimeout((c(function(){return this.currentSlideElement.animate(s,this.settings.speed*2,this.raiseAnimationFinished)},this)),this.settings.speed*2)};m=function(s){var u,t;t={top:(this.settings.alignBottom?"auto":0),bottom:(this.settings.alignBottom?0:"auto"),left:s,position:"absolute",display:"block"};u={top:"auto",left:"auto",position:"relative"};return o.apply(this,[t,{left:0},u])};n.fn.ramblingSlider.defaults.imageTransitions={};n.each(p,function(s,t){return n.each(t,function(u,v){return n.each(t.suffixes,function(w,x){return n.fn.ramblingSlider.defaults.imageTransitions[""+v.name+x.name]=function(){return this[v.helper](x.sorter)}})})});k=function(s,t){return n.fn.ramblingSlider.defaults.imageTransitions[s]=function(){return this.animateFullImage(t)}};for(i in j){q=j[i];k(i,q)}n.fn.ramblingSlider.defaults.imageFlashTransitions={fadeOut:function(){var s,t;t=this.getOneSlice(this.previousSlideElement);t.css({height:"100%",width:t.parents(".ramblingSlider").width(),position:"absolute",top:0,left:0,opacity:"1"});this.setSliderBackground();s=this;return t.animate({opacity:"0"},this.settings.speed*2,"",function(){t.css({display:"none"});return s.raiseAnimationFinished()})}};n.fn.ramblingSlider.defaults.flashTransitions={slideInRight:function(){return m.apply(this,[-this.currentSlideElement.parents(".ramblingSlider").width()])},slideInLeft:function(){return m.apply(this,[this.currentSlideElement.parents(".ramblingSlider").width()])}};n.extend(n.fn.ramblingSlider.defaults.imageFlashTransitions,n.fn.ramblingSlider.defaults.flashTransitions);n.fn.ramblingSlider.defaults.transitionGroups=["fade","rollover","slideIn"];n.each(p,function(s,t){return n.each(t,function(u,v){return n.fn.ramblingSlider.defaults.transitionGroups.push(v.name)})});return n.fn.ramblingSlider.defaults.transitionGroupSuffixes=["Right","Left","OutIn","InOut","Random","Forward","Reverse","In","Out"]})(jQuery);String.prototype.contains=function(i){return this.indexOf(i)!==-1};String.prototype.decapitalize=function(){var j,i;j=this.slice(0,1);i=this.slice(1);return""+(j.toLowerCase())+i};String.prototype.startsWith=function(i){return this.substring(0,i.length)===i};String.prototype.endsWith=function(i){return this.substring(this.length-i.length,this.length)===i}}).call(this);
1
+ /*
2
+ * jQuery Rambling Slider
3
+ * http://github.com/gonzedge/rambling.slider
4
+ * http://ramblinglabs.com
5
+ *
6
+ * Copyright 2011-2013, Edgar Gonzalez
7
+ * Released under the MIT license.
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * May 2013
11
+ *
12
+ * Based on jQuery Nivo Slider by Gilbert Pellegrom
13
+ */
14
+ !function(){var a,b,c,d,e,f=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},g=[].slice;Array.prototype.shuffle=function(){var a,b,c,d,e;for(a=c=d=this.length;1>=d?1>=c:c>=1;a=1>=d?++c:--c)b=parseInt(Math.random()*a),e=[this[b],this[--a]],this[a]=e[0],this[b]=e[1];return this},Array.prototype.contains=function(a){return f.call(this,a)>=0},Array.prototype.where=function(a){var b,c,d,e;for(e=[],c=0,d=this.length;d>c;c++)b=this[c],a(b)&&e.push(b);return e},Array.prototype.first=function(a){var b;return a||(a=function(){return!0}),function(){var c,d,e;for(e=[],c=0,d=this.length;d>c;c++)b=this[c],a(b)&&e.push(b);return e}.call(this)[0]},Array.prototype.map=function(a){var b,c,d,e;for(a||(a=function(a){return a}),e=[],c=0,d=this.length;d>c;c++)b=this[c],e.push(a(b));return e},Array.prototype.random=function(){return this[Math.floor(Math.random()*this.length)]},Array.prototype.fromObject=function(a,b){var c,d,e,f=this;b||(b=function(a,b){return b}),e=function(a,c){return f.push(b(a,c))};for(c in a)d=a[c],e(c,d);return this},Array.prototype.sortOutIn=function(){var a,b,c,d,e,f,g=this;for(d=[],c=this.length,a=Math.floor(c/2),e=function(a){return d.push(g[a]),d.push(g[c-a-1])},b=f=0;a>=0?a>f:f>a;b=a>=0?++f:--f)e(b);return c%2&&d.push(this[a]),d},String.prototype.contains=function(a){return-1!==this.indexOf(a)},String.prototype.decapitalize=function(){var a,b;return a=this.slice(0,1),b=this.slice(1),""+a.toLowerCase()+b},String.prototype.startsWith=function(a){return this.substring(0,a.length)===a},String.prototype.endsWith=function(a){return this.substring(this.length-a.length,this.length)===a},function(a){return a.fn.reverse=[].reverse,a.fn.shuffle=[].shuffle,a.fn.sortOutIn=function(){return a(Array.prototype.sortOutIn.apply(this))},a.fn.sortInOut=function(){return this.sortOutIn().reverse()},a.fn.as2dArray=function(b){var c,d,e;return e=0,d=0,c=a(""),c[e]=a(""),this.each(function(){return c[e][d]=a(this),d++,d===b?(e++,d=0,c[e]=a("")):void 0}),c},a.fn.containsFlash=function(){return this.find("object,embed").length},a.fn.equals=function(a){var b;return b=!0,b=this.length===a.length,this.each(function(c,d){return b=b&&d===a.get(c)}),b}}(jQuery),a=function(){function a(a,c,d){this.slider=a,this.settings=c,this.vars=d,this.boxer=new b(this.slider)}return a.prototype.createBoxes=function(a,b){var c,d,e,f,g,h,i=this;for(null==a&&(a=this.settings.boxCols),null==b&&(b=this.settings.boxRows),e=Math.round(this.slider.width()/a),d=Math.round(this.slider.height()/b),c=this.slider.find("#rambling-animation"),g=function(b){var f,g,h;for(h=[],f=g=0;a>=0?a>g:g>a;f=a>=0?++g:--g)h.push(function(a){return c.append(i.boxer.getRamblingBox(e,d,b,a,i.settings,i.vars))}(f));return h},f=h=0;b>=0?b>h:h>b;f=b>=0?++h:--h)g(f);return this.slider.find(".rambling-box")},a}(),e="undefined"!=typeof global&&null!==global?global:window,e.RamblingBoxGenerator=a,b=function(){function a(a){this.slider=a}return a.prototype.getBox=function(a,b,c,d,e){var f;return f={opacity:0,left:a*d,top:b*c,width:d===e.boxCols-1?this.slider.width()-a*d:a,height:b,overflow:"hidden"},$('<div class="rambling-box"></div>').css(f)},a.prototype.getRamblingBox=function(a,b,c,d,e,f){var g,h,i,j;return h=this.getBox(a,b,c,d,e),g=e.alignBottom?b*(e.boxRows-(c+1)):"auto",j=e.alignBottom?"auto":c*b,i={display:"block",width:this.slider.width(),left:-(d*a),top:e.alignBottom?"auto":-j,bottom:e.alignBottom?-g:"auto"},h.css({top:j,bottom:g}),h.append("<span><img src='"+(f.currentSlideElement.attr("src")||f.currentSlideElement.find("img").attr("src"))+"' alt=''/></span>"),h.find("img").css(i),h},a}(),e="undefined"!=typeof global&&null!==global?global:window,e.RamblingBoxer=b,c=function(){function a(a,b,c){this.slider=a,this.settings=b,this.vars=c,this.slicer=new d(this.slider)}return a.prototype.getOneSlice=function(a){return null==a&&(a=this.vars.currentSlideElement),this.createSlices(1,a)},a.prototype.createSlices=function(a,b){var c,d,e,f,g,h=this;for(null==a&&(a=this.settings.slices),null==b&&(b=this.vars.currentSlideElement),e=Math.round(this.slider.width()/a),c=this.slider.find("#rambling-animation"),f=function(d){return c.append(h.slicer.getRamblingSlice(e,d,a,b,h.settings))},d=g=0;a>=0?a>g:g>a;d=a>=0?++g:--g)f(d);return this.slider.find(".rambling-slice")},a}(),e="undefined"!=typeof global&&null!==global?global:window,e.RamblingSliceGenerator=c,d=function(){function a(a){this.slider=a}return a.prototype.getSlice=function(a,b,c){var d;return d={left:a*b,width:b===c-1?this.slider.width()-a*b:a,height:0,opacity:0,overflow:"hidden"},$('<div class="rambling-slice"></div>').css(d)},a.prototype.getRamblingSlice=function(a,b,c,d,e){var f,g;return f=this.getSlice(a,b,c),f.append('<span><img src="'+(d.attr("src")||d.find("img").attr("src"))+'" alt=""/></span>'),g={display:"block",width:this.slider.width(),left:-b*a,bottom:e.alignBottom?0:"auto",top:e.alignBottom?"auto":0},f.find("img").css(g),f},a}(),e="undefined"!=typeof global&&null!==global?global:window,e.RamblingSlicer=d,function(b){var d,e,h;return h=["stop","start","option","effect","destroy","previousSlide","nextSlide","slide","theme"],b.fn.ramblingSlider=function(){var a,c,e,i,j,k,l;if(e=arguments[0],j=2<=arguments.length?g.call(arguments,1):[],c=f.call(h,e)>=0,i="string"==typeof e,k=this.data("rambling:slider"),a=function(a,b){return!b.length||"option"===a&&1===b.length&&"string"==typeof b[0]},k){if(c)return l=k[e].apply(k,j),a(e,j)?l:this;throw i?"Method '"+e+"' not found.":"Slider already initialized."}if(c||i)throw"Tried to call method '"+e+"' on element without slider.";return this.each(function(){var a;return a=b(this),a.data("rambling:slider")?void 0:(k=new d(this,e),a.data("rambling:slider",k),k.initialize(),k.run())})},b.fn.ramblingSlider.defaults={slices:15,boxCols:8,boxRows:4,speed:500,pauseTime:4500,manualAdvance:!1,captionOpacity:.8,theme:"default",alignBottom:!1,effect:"random",startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,controlNavThumbs:!1,controlNavThumbsFromRel:!1,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",adaptImages:!1,useLargerImage:!0,keyboardNav:!0,pauseOnHover:!0,prevText:"Prev",nextText:"Next",imageTransitions:null,flashTransitions:null,imageFlashTransitions:null,transitionGroups:[],transitionGroupSuffixes:[],beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}},e=["startSlide","directionNav","directionNavHide","controlNav","controlNavThumbs","controlNavThumbsFromRel","controlNavThumbsSearch","controlNavThumbsReplace","adaptImages","useLargerImage","keyboardNav","pauseOnHover","prevText","nextText","imageTransitions","flashTransitions","imageFlashTransitions","transitionGroups","transitionGroupSuffixes","afterLoad"],d=function(d,h){var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db=this;return Z=b(d),r=Z.children(":not(#rambling-animation)"),U=b.extend({},b.fn.ramblingSlider.defaults,h),$=0,q=0,D=null,C=null,u=null,ab=[],_=[],cb={currentSlide:0,currentSlideElement:"",previousSlideElement:"",totalSlides:0,running:!1,paused:!1,stopped:!1},Z.data("rambling:vars",cb),N=new c(Z,U,cb),L=new a(Z,U,cb),this.stop=function(){return cb.stopped=!0,Z},this.start=function(){return cb.stopped=!1,Z},this.previousSlide=function(){return W("prev"),Z},this.nextSlide=function(){return W("next"),Z},this.slide=function(){var a,b;return b=1<=arguments.length?g.call(arguments,0):[],b.length?(a=b[0]%cb.totalSlides,cb.running||1===cb.totalSlides||(cb.currentSlide=a-1,M(Z,r,U,"control")),Z):cb.currentSlide},this.destroy=function(){return Z.find("#rambling-animation,.rambling-slice,.rambling-box,.rambling-caption,.rambling-directionNav,.rambling-controlNav").remove(),Z.removeClass("ramblingSlider adaptingSlider"),Z.removeAttr("style"),Z.data("rambling:vars",null),Z.data("rambling:slider",null),Z.unbind("rambling:finished"),Z.unbind("hover"),O(),Z.children().show().children().show(),Z},this.option=function(){var a,c,d,h;if(d=1<=arguments.length?g.call(arguments,0):[],!d.length)return U;if(a=d[0],h=d[1],c="object"==typeof a,"effect"===a)return db.effect.apply(db,h?[h]:void 0);if("theme"===a)return db.theme.apply(db,h?[h]:void 0);if(c)return b.extend(U,a);if(null!=h){if(f.call(e,a)>=0)throw"Slider already running. Option '"+a+"' cannot be changed.";return U[a]=h}return U[a]},this.effect=function(){var a;return a=1<=arguments.length?g.call(arguments,0):[],a.length?(U.effect=a[0],Z):U.effect},this.theme=function(){var a,c,d;return d=1<=arguments.length?g.call(arguments,0):[],d.length?(c=U.theme,U.theme=d[0],a=["theme-"+c,"theme-"+b.fn.ramblingSlider.defaults.theme],Z.parents(a.map(function(a){return"."+a}).join(",")).removeClass(a.join(" ")).addClass("theme-"+U.theme),Z):U.theme},this.initialize=function(){return S(),cb.currentSlide=U.startSlide=U.startSlide%cb.totalSlides,Q(r),R(),i(),k(),j(r),l(),U.pauseOnHover&&Z.hover(E,bb),P()},this.run=function(){return!U.manualAdvance&&cb.totalSlides>1?$=window.setInterval(function(){return M(Z,r,U,!1)},U.pauseTime):void 0},T=function(){return D=b.extend({},b.fn.ramblingSlider.defaults.imageTransitions,U.imageTransitions),C=b.extend({},b.fn.ramblingSlider.defaults.imageFlashTransitions,U.imageFlashTransitions),u=b.extend({},b.fn.ramblingSlider.defaults.flashTransitions,U.flashTransitions),ab=A("transitionGroups"),_=A("transitionGroupSuffixes")},A=function(a){var c;return c=[],b.each(b.fn.ramblingSlider.defaults[a],function(a,b){return c.push(b)}),b.each(U[a],function(a,b){return c.push(b)}),c},S=function(){return db.effect(U.effect),db.theme(U.theme),T(),Z.css({position:"relative"}),Z.addClass("ramblingSlider"),cb.totalSlides=r.length,H(),G(),U.adaptImages?F():void 0},G=function(){var a;return a=b('<div id="rambling-animation"></div>').css({width:Z.width(),height:Z.height(),overflow:"hidden"}),Z.prepend(a),r.each(function(){var c,d;return c=b(this),c.css({display:"none"}),d=c.clone().addClass("slideElement"),d.containsFlash()&&(d.find("param[name=wmode]").length||d.find("object").prepend('<param name="wmode" value="opaque" />'),d.find("embed").attr({wmode:"opaque"})),a.append(d)}),r=a.children()},F=function(){return Z.addClass("adaptingSlider")},H=function(){var a;return r.each(function(){var a,c,d,e,f;return a=b(this),e=null,a.is("a")&&!a.containsFlash()&&(e=a.addClass("rambling-imageLink"),a=a.find("img:first")),d=a.width()||a.attr("width"),c=a.height()||a.attr("height"),d>Z.width()&&U.useLargerImage&&Z.width(d),c>Z.height()&&(U.useLargerImage||!U.adaptImages)&&Z.height(c),f=a.find("object,embed"),f.height(Z.height()),f.width(Z.width()),e&&e.css({display:"none"}),a.css({display:"none"})}),a=Q(r),a.is("a")?a.css({display:"block"}):void 0},i=function(){return Z.append(b('<div class="rambling-caption"><p></p></div>').css({display:"none",opacity:U.captionOpacity})),I(U)},k=function(){var a;return U.directionNav&&cb.totalSlides>1?(a=b("<div class='rambling-directionNav'><a class='rambling-prevNav'>"+U.prevText+"</a><a class='rambling-nextNav'>"+U.nextText+"</a></div>"),Z.append(a),U.directionNavHide&&(a.hide(),Z.hover(function(){return a.show()},function(){return a.hide()})),Z.find("a.rambling-prevNav").live("click",function(){return W("prev")}),Z.find("a.rambling-nextNav").live("click",function(){return W("next")})):void 0},j=function(){var a,c,d,e,f,g,h;if(e=db,U.controlNav){for(d=b('<div class="rambling-controlNav"></div>'),Z.append(d),f=function(a){var b;return U.controlNavThumbs?(b=r.eq(a),b.is("img")||(b=b.find("img:first")),U.controlNavThumbsFromRel?d.append("<a class='rambling-control' rel='"+a+"'><img src='"+b.attr("rel")+"' alt='' /></a>"):d.append("<a class='rambling-control' rel='"+a+"'><img src='"+b.attr("src").replace(U.controlNavThumbsSearch,U.controlNavThumbsReplace)+"' alt='' /></a>")):d.append("<a class='rambling-control' rel='"+a+"'>"+(a+1)+"'</a>")},c=g=0,h=r.length;h>=0?h>g:g>h;c=h>=0?++g:--g)f(c);return a=Z.find(".rambling-controlNav a"),a.filter(":eq("+cb.currentSlide+")").addClass("active"),a.live("click",function(){return cb.running?!1:b(this).hasClass("active")?!1:(O(),R(),e.slide(b(this).attr("rel")))})}},l=function(){return U.keyboardNav?b(window).keypress(function(a){return 37===a.keyCode&&W("prev"),39===a.keyCode?W("next"):void 0}):void 0},P=function(){var a;return a=db,Z.bind("rambling:finished",function(){var c;return cb.running=!1,c=b(r.get(cb.currentSlide)),c.siblings().css({display:"none"}),c.is("a")&&c.css({display:"block"}),""!==$||cb.paused||a.run(),R(),Z.find(".rambling-slice,.rambling-box").remove(),U.afterChange.call(this)})},I=function(a){var c,d;return c=Z.find(".rambling-caption"),d=cb.currentSlideElement.attr("title"),d?(d.startsWith("#")&&(d=b(d).html()),"block"===c.css("display")?c.find("p").fadeOut(a.speed,function(){var c;return c=b(this),c.html(d),c.fadeIn(a.speed)}):c.find("p").html(d),c.fadeIn(a.speed)):c.fadeOut(a.speed)},Q=function(a){var c;return c=b(a.get(cb.currentSlide)),cb.previousSlideElement=cb.currentSlideElement,cb.currentSlideElement=c,c.is("a")&&!c.containsFlash()&&(cb.currentSlideElement=c.find("img:first")),c},O=function(){return window.clearInterval($),$=""},E=function(){return cb.paused=!0,O()},bb=function(){return cb.paused=!1,""===$?db.run():void 0},W=function(a){return cb.running||1===cb.totalSlides?!1:(O(),"prev"===a&&(cb.currentSlide-=2),M(Z,r,U,a))},R=function(){var a;return a=Z.find(".currentSlideElement"),a.equals(cb.currentSlideElement)?void 0:(a.removeClass("currentSlideElement alignTop alignBottom").css({display:"none","z-index":0}),a=cb.currentSlideElement,a.siblings(".slideElement").css({display:"none"}),a.addClass("currentSlideElement").addClass(U.alignBottom?"alignBottom":"alignTop"),a.css({display:"block","z-index":0}),a.find("img").css({display:"block"}))},y=function(){var a;return a=U.effect.split(","),b.each(ab,function(c,d){var e;return a.contains(d)?(e=[a.indexOf(d),1],b.each(_,function(a,b){return e.push(""+d+b)}),a.splice.apply(a,e)):void 0}),a},x=function(){var a,b,c,d;return d=[],c=[],cb.currentSlideElement.containsFlash()?cb.previousSlideElement.containsFlash()?(c=u,b=u.slideInRight):(c=C,b=C.fadeOut):(c=D,b=D.fadeIn),a=y(),d=[].fromObject(c,function(a){return a}),"random"!==U.effect&&(d=d.where(function(b){return a.contains(b)})),d=d.map(function(a){return c[a]}),d["default"]=b,d},z=function(){var a;return a=x(),a.random()||a["default"]},K=function(){return Z.trigger("rambling:finished")},o=function(a){var c;return c=N.getOneSlice(),c.css({top:U.alignBottom?"auto":0,bottom:U.alignBottom?0:"auto"}),c.animate(a.apply(c,[Z,b.extend({},U)])||{width:Z.width()},2*U.speed,"",function(){return U.afterChange&&U.afterChange.apply(c),K()})},p=function(a,c){var d;return d=N.createSlices(),q=0,c&&(d=c.apply(d)),d.each(function(c,d){var e,f;return f=b(d),c===U.slices-1&&(e=K),window.setTimeout(function(){return f.animate(a.apply(f,[c,d])||{},U.speed,"",e)},100+q),q+=50})},m=function(a,b){var c;return c=L.createBoxes(),q=0,b&&(c=b.apply(c)),a.apply(c,[K])},n=function(a,c){return m(function(c){var d,e,f,g,h,i,j;for(d=this,g=U.boxCols*U.boxRows,f=0,j=[],e=h=0,i=2*U.boxCols;i>=0?i>h:h>i;e=i>=0?++h:--h)j.push(function(e){var h,i,j,k;for(k=[],h=i=0,j=U.boxRows;j>=0?j>i:i>j;h=j>=0?++i:--i)k.push(function(h){var i,j;return e>=0&&e<U.boxCols&&(i=b(d[h][e]),f===g-1&&(j=c),window.setTimeout(function(){return i.animate(a.apply(i),U.speed/1.3,"",j)},100+q),f++,q+=20),e--}(h));return k}(e));return j},function(){var a;return a=this,c&&(a=c.call(this)),a.as2dArray(U.boxCols)})},V=function(a){return p(function(){return this.css({top:0}),{height:Z.height(),opacity:"1"}},a)},Y=function(a){return p(function(){return this.css({bottom:0}),{height:Z.height(),opacity:"1"}},a)},X=function(a){return p(function(a){return this.css(a%2?{bottom:0}:{top:0}),{height:Z.height(),opacity:"1"}},a)},v=function(a){return p(function(a,c){var d,e;return e=b(c),d={width:e.width(),opacity:"1"},e.css({top:0,height:"100%",width:0}),d},a)},t=function(a){return p(function(){return this.css({height:Z.height()}),{opacity:"1"}},a)},s=function(a){return m(function(a){var c;return c=this.length,q=0,this.each(function(d){var e,f;return e=b(this),d===c-1&&(f=a),window.setTimeout(function(){return e.animate({opacity:"1"},U.speed,"",f)},100+q),q+=20})},a)},J=function(a){return n(function(){return{opacity:"1"}},a)},B=function(a){return n(function(){var a,b;return b=this.width(),a=this.height(),this.css({width:0,height:0}),{opacity:"1",width:b,height:a}},a)},w=function(){var a;return a={setSliderBackground:R,currentSlideElement:cb.currentSlideElement,previousSlideElement:cb.previousSlideElement,raiseAnimationFinished:K,settings:b.extend({},U),createSlices:function(a,b){return N.createSlices(a,b)},createBoxes:function(a,b){return L.createBoxes(a,b)},getOneSlice:function(a){return N.getOneSlice(a)},animateFullImage:o,animateSlices:p,animateBoxes:m,animateBoxesIn2d:n,slideUpSlices:Y,slideDownSlices:V,slideUpDownSlices:X,foldSlices:v,fadeSlices:t,fadeBoxes:s,rainBoxes:J,growBoxes:B}},M=function(a,b,c,d){return cb.currentSlide===cb.totalSlides-1&&c.lastSlide.call(this),cb.stopped&&!d?!1:(c.beforeChange.call(this),cb.currentSlide=(cb.currentSlide+1)%cb.totalSlides,0===cb.currentSlide&&c.slideshowEnd.call(this),cb.currentSlide<0&&(cb.currentSlide=cb.totalSlides+cb.currentSlide),Q(b),c.controlNav&&a.find(".rambling-controlNav a").removeClass("active").filter(":eq("+cb.currentSlide+")").addClass("active"),I(c),cb.running=!0,z().call(w()))},U.afterLoad.call(this),this}}(jQuery),function(a){var b,c,d,e,f,g,h,i,j;b=[{name:"sliceUp",helper:"slideUpSlices"},{name:"sliceDown",helper:"slideDownSlices"},{name:"sliceUpDown",helper:"slideUpDownSlices"},{name:"sliceFade",helper:"fadeSlices"},{name:"fold",helper:"foldSlices"}],b.suffixes=[{name:"Right",sorter:void 0},{name:"Left",sorter:a.fn.reverse},{name:"OutIn",sorter:a.fn.sortOutIn},{name:"InOut",sorter:a.fn.sortInOut},{name:"Random",sorter:a.fn.shuffle}],d=[{name:"boxRain",helper:"rainBoxes"},{name:"boxGrow",helper:"growBoxes"}],d.suffixes=[{name:"Forward",sorter:void 0},{name:"Reverse",sorter:a.fn.reverse},{name:"OutIn",sorter:a.fn.sortOutIn},{name:"InOut",sorter:a.fn.sortInOut},{name:"Random",sorter:a.fn.shuffle}],h=[b,d],c={fadeIn:function(a){return this.css({height:"100%",width:a.width(),position:"absolute",top:0,left:0}),{opacity:"1"}},fadeOut:function(a){return this.css({height:"100%",width:a.width(),position:"absolute",top:0,left:0}),{opacity:"1"}},rolloverRight:function(){this.css({height:"100%",width:0,opacity:"1"})},rolloverLeft:function(a,b){return this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0}),this.find("img").css({left:-a.width()}).animate({left:0},2*b.speed),{width:a.width()}},slideInRight:function(a,b){return this.css({height:"100%",width:0,opacity:"1"}),this.find("img").css({left:-a.width()}).animate({left:0},2*b.speed),{width:a.width()}},slideInLeft:function(a){var b,c=this;this.css({height:"100%",width:0,opacity:"1",left:"auto",right:0}),b=function(){return c.css({left:0,right:"auto"}),a.unbind("rambling:finished",b)},a.bind("rambling:finished",b)}},f=function(a,b){var c=this;return this.currentSlideElement.css(a),window.setTimeout(function(){return c.currentSlideElement.animate(b,2*c.settings.speed,c.raiseAnimationFinished)},2*this.settings.speed)},e=function(a){var b,c;return c={top:this.settings.alignBottom?"auto":0,bottom:this.settings.alignBottom?0:"auto",left:a,position:"absolute",display:"block"},b={top:"auto",left:"auto",position:"relative"},f.apply(this,[c,{left:0},b])},a.fn.ramblingSlider.defaults.imageTransitions={},a.each(h,function(b,c){return a.each(c,function(b,d){return a.each(c.suffixes,function(b,c){return a.fn.ramblingSlider.defaults.imageTransitions[""+d.name+c.name]=function(){return this[d.helper](c.sorter)}})})}),j=function(b,c){return a.fn.ramblingSlider.defaults.imageTransitions[b]=function(){return this.animateFullImage(c)}};for(g in c)i=c[g],j(g,i);return a.fn.ramblingSlider.defaults.imageFlashTransitions={fadeOut:function(){var a,b;return b=this.getOneSlice(this.previousSlideElement),b.css({height:"100%",width:b.parents(".ramblingSlider").width(),position:"absolute",top:0,left:0,opacity:"1"}),this.setSliderBackground(),a=this,b.animate({opacity:"0"},2*this.settings.speed,"",function(){return b.css({display:"none"}),a.raiseAnimationFinished()})}},a.fn.ramblingSlider.defaults.flashTransitions={slideInRight:function(){return e.apply(this,[-this.currentSlideElement.parents(".ramblingSlider").width()])},slideInLeft:function(){return e.apply(this,[this.currentSlideElement.parents(".ramblingSlider").width()])}},a.extend(a.fn.ramblingSlider.defaults.imageFlashTransitions,a.fn.ramblingSlider.defaults.flashTransitions),a.fn.ramblingSlider.defaults.transitionGroups=["fade","rollover","slideIn"],a.each(h,function(b,c){return a.each(c,function(b,c){return a.fn.ramblingSlider.defaults.transitionGroups.push(c.name)})}),a.fn.ramblingSlider.defaults.transitionGroupSuffixes=["Right","Left","OutIn","InOut","Random","Forward","Reverse","In","Out"]}(jQuery)}.call(this);
@@ -1,12 +1,13 @@
1
1
  /*
2
2
  * jQuery Rambling Slider
3
- * http://github.com/egonzalez0787/rambling.slider
3
+ * http://github.com/gonzedge/rambling.slider
4
+ * http://ramblinglabs.com
4
5
  *
5
- * Copyright 2011-2012, Rambling Labs
6
+ * Copyright 2011-2013, Edgar Gonzalez
6
7
  * Released under the MIT license.
7
8
  * http://www.opensource.org/licenses/mit-license.php
8
9
  *
9
- * January 2012
10
+ * May 2013
10
11
  *
11
12
  * Based on jQuery Nivo Slider by Gilbert Pellegrom
12
13
  *= require_tree .
@@ -111,6 +112,10 @@
111
112
  #rambling-animation {
112
113
  @include absolute-top-left;
113
114
  overflow: hidden;
115
+
116
+ img {
117
+ width: 100%;
118
+ }
114
119
  }
115
120
 
116
121
  object {
metadata CHANGED
@@ -1,36 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rambling-slider-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
- - Rambling Labs
7
+ - Edgar Gonzalez
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-09-24 00:00:00.000000000 Z
11
+ date: 2013-06-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: jquery-rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 2.0.0
20
+ - - <
21
+ - !ruby/object:Gem::Version
22
+ version: 2.2.0
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 2.0.0
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: 2.2.0
30
33
  description: The rambling-slider-rails is a gem aimed to automate the usage of the
31
34
  jQuery Rambling Slider within a Rails application.
32
35
  email:
33
- - development@ramblinglabs.com
36
+ - edggonzalezg@gmail.com
34
37
  executables: []
35
38
  extensions: []
36
39
  extra_rdoc_files: []
@@ -67,32 +70,25 @@ files:
67
70
  - vendor/assets/stylesheets/jquery.rambling.slider/themes/pascal.css.scss
68
71
  homepage: http://github.com/ramblinglabs/rambling-slider-rails
69
72
  licenses: []
73
+ metadata: {}
70
74
  post_install_message:
71
75
  rdoc_options: []
72
76
  require_paths:
73
77
  - lib
74
78
  required_ruby_version: !ruby/object:Gem::Requirement
75
- none: false
76
79
  requirements:
77
- - - ! '>='
80
+ - - '>='
78
81
  - !ruby/object:Gem::Version
79
82
  version: '0'
80
- segments:
81
- - 0
82
- hash: -2943173688260919414
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
- none: false
85
84
  requirements:
86
- - - ! '>='
85
+ - - '>='
87
86
  - !ruby/object:Gem::Version
88
87
  version: '0'
89
- segments:
90
- - 0
91
- hash: -2943173688260919414
92
88
  requirements: []
93
89
  rubyforge_project:
94
- rubygems_version: 1.8.24
90
+ rubygems_version: 2.0.3
95
91
  signing_key:
96
- specification_version: 3
92
+ specification_version: 4
97
93
  summary: Automate usage of jQuery Rambling Slider within Rails.
98
94
  test_files: []