compass-foundation 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +9 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/LICENSE.mkdn +11 -0
- data/README.mkdn +43 -0
- data/Rakefile +1 -0
- data/compass-foundation.gemspec +26 -0
- data/lib/compass-foundation/rails/engine.rb +7 -0
- data/lib/compass-foundation/rails.rb +7 -0
- data/lib/compass-foundation/version.rb +5 -0
- data/lib/compass-foundation.rb +14 -0
- data/stylesheets/compass-foundation/_compass_foundation.scss +13 -0
- data/stylesheets/compass-foundation/_forms.css.scss +249 -0
- data/stylesheets/compass-foundation/_globals.css.scss +176 -0
- data/stylesheets/compass-foundation/_grid.css.scss +188 -0
- data/stylesheets/compass-foundation/_ie.css.scss +4 -0
- data/stylesheets/compass-foundation/_mobile.css.scss +220 -0
- data/stylesheets/compass-foundation/_orbit.css.scss +227 -0
- data/stylesheets/compass-foundation/_reveal.css.scss +107 -0
- data/stylesheets/compass-foundation/_typography.css.scss +169 -0
- data/stylesheets/compass-foundation/_ui.css.scss +338 -0
- data/vendor/assets/images/misc/button-gloss.png +0 -0
- data/vendor/assets/images/misc/button-overlay.png +0 -0
- data/vendor/assets/images/misc/custom-form-sprites.png +0 -0
- data/vendor/assets/images/misc/input-bg.png +0 -0
- data/vendor/assets/images/misc/modal-gloss.png +0 -0
- data/vendor/assets/images/misc/table-sorter.png +0 -0
- data/vendor/assets/images/orbit/bullets.jpg +0 -0
- data/vendor/assets/images/orbit/left-arrow.png +0 -0
- data/vendor/assets/images/orbit/loading.gif +0 -0
- data/vendor/assets/images/orbit/mask-black.png +0 -0
- data/vendor/assets/images/orbit/pause-black.png +0 -0
- data/vendor/assets/images/orbit/right-arrow.png +0 -0
- data/vendor/assets/images/orbit/rotator-black.png +0 -0
- data/vendor/assets/images/orbit/timer-black.png +0 -0
- data/vendor/assets/javascripts/app.js +48 -0
- data/vendor/assets/javascripts/forms.jquery.js +58 -0
- data/vendor/assets/javascripts/jquery.customforms.js +168 -0
- data/vendor/assets/javascripts/jquery.orbit.js +597 -0
- data/vendor/assets/javascripts/jquery.placeholder.min.js +2 -0
- data/vendor/assets/javascripts/jquery.reveal.js +126 -0
- data/vendor/assets/stylesheets/compass-foundation/_compass_foundation.scss +13 -0
- data/vendor/assets/stylesheets/compass-foundation/_forms.scss +249 -0
- data/vendor/assets/stylesheets/compass-foundation/_globals.scss +176 -0
- data/vendor/assets/stylesheets/compass-foundation/_grid.scss +188 -0
- data/vendor/assets/stylesheets/compass-foundation/_ie.scss +4 -0
- data/vendor/assets/stylesheets/compass-foundation/_mobile.scss +220 -0
- data/vendor/assets/stylesheets/compass-foundation/_orbit.scss +227 -0
- data/vendor/assets/stylesheets/compass-foundation/_reveal.scss +107 -0
- data/vendor/assets/stylesheets/compass-foundation/_typography.scss +169 -0
- data/vendor/assets/stylesheets/compass-foundation/_ui.scss +338 -0
- data/vendor/assets/stylesheets/compass-foundation/compass_foundation.scss +13 -0
- data/vendor/assets/stylesheets/compass-foundation/manifest.rb +38 -0
- metadata +121 -0
@@ -0,0 +1,597 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery Orbit Plugin 1.3.0
|
3
|
+
* www.ZURB.com/playground
|
4
|
+
* Copyright 2010, ZURB
|
5
|
+
* Free to use under the MIT license.
|
6
|
+
* http://www.opensource.org/licenses/mit-license.php
|
7
|
+
*/
|
8
|
+
|
9
|
+
|
10
|
+
(function($) {
|
11
|
+
|
12
|
+
var ORBIT = {
|
13
|
+
|
14
|
+
defaults: {
|
15
|
+
animation: 'horizontal-push', // fade, horizontal-slide, vertical-slide, horizontal-push, vertical-push
|
16
|
+
animationSpeed: 600, // how fast animtions are
|
17
|
+
timer: true, // true or false to have the timer
|
18
|
+
advanceSpeed: 4000, // if timer is enabled, time between transitions
|
19
|
+
pauseOnHover: false, // if you hover pauses the slider
|
20
|
+
startClockOnMouseOut: false, // if clock should start on MouseOut
|
21
|
+
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
|
22
|
+
directionalNav: true, // manual advancing directional navs
|
23
|
+
captions: true, // do you want captions?
|
24
|
+
captionAnimation: 'fade', // fade, slideOpen, none
|
25
|
+
captionAnimationSpeed: 600, // if so how quickly should they animate in
|
26
|
+
bullets: false, // true or false to activate the bullet navigation
|
27
|
+
bulletThumbs: false, // thumbnails for the bullets
|
28
|
+
bulletThumbLocation: '', // location from this file where thumbs will be
|
29
|
+
afterSlideChange: $.noop, // empty function
|
30
|
+
fluid: true,
|
31
|
+
centerBullets: true // center bullet nav with js, turn this off if you want to position the bullet nav manually
|
32
|
+
},
|
33
|
+
|
34
|
+
activeSlide: 0,
|
35
|
+
numberSlides: 0,
|
36
|
+
orbitWidth: null,
|
37
|
+
orbitHeight: null,
|
38
|
+
locked: null,
|
39
|
+
timerRunning: null,
|
40
|
+
degrees: 0,
|
41
|
+
wrapperHTML: '<div class="orbit-wrapper" />',
|
42
|
+
timerHTML: '<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',
|
43
|
+
captionHTML: '<div class="orbit-caption"></div>',
|
44
|
+
directionalNavHTML: '<div class="slider-nav"><span class="right">Right</span><span class="left">Left</span></div>',
|
45
|
+
bulletHTML: '<ul class="orbit-bullets"></ul>',
|
46
|
+
|
47
|
+
init: function (element, options) {
|
48
|
+
var $imageSlides,
|
49
|
+
imagesLoadedCount = 0,
|
50
|
+
self = this;
|
51
|
+
|
52
|
+
// Bind functions to correct context
|
53
|
+
this.clickTimer = $.proxy(this.clickTimer, this);
|
54
|
+
this.addBullet = $.proxy(this.addBullet, this);
|
55
|
+
this.resetAndUnlock = $.proxy(this.resetAndUnlock, this);
|
56
|
+
this.stopClock = $.proxy(this.stopClock, this);
|
57
|
+
this.startTimerAfterMouseLeave = $.proxy(this.startTimerAfterMouseLeave, this);
|
58
|
+
this.clearClockMouseLeaveTimer = $.proxy(this.clearClockMouseLeaveTimer, this);
|
59
|
+
this.rotateTimer = $.proxy(this.rotateTimer, this);
|
60
|
+
|
61
|
+
this.options = $.extend({}, this.defaults, options);
|
62
|
+
if (this.options.timer === 'false') this.options.timer = false;
|
63
|
+
if (this.options.captions === 'false') this.options.captions = false;
|
64
|
+
if (this.options.directionalNav === 'false') this.options.directionalNav = false;
|
65
|
+
|
66
|
+
this.$element = $(element);
|
67
|
+
this.$wrapper = this.$element.wrap(this.wrapperHTML).parent();
|
68
|
+
this.$slides = this.$element.children('img, a, div');
|
69
|
+
|
70
|
+
this.$element.bind('orbit.next', function () {
|
71
|
+
self.shift('next');
|
72
|
+
});
|
73
|
+
|
74
|
+
this.$element.bind('orbit.prev', function () {
|
75
|
+
self.shift('prev');
|
76
|
+
});
|
77
|
+
|
78
|
+
this.$element.bind('orbit.goto', function (event, index) {
|
79
|
+
self.shift(index);
|
80
|
+
});
|
81
|
+
|
82
|
+
this.$element.bind('orbit.start', function (event, index) {
|
83
|
+
self.startClock();
|
84
|
+
});
|
85
|
+
|
86
|
+
this.$element.bind('orbit.stop', function (event, index) {
|
87
|
+
self.stopClock();
|
88
|
+
});
|
89
|
+
|
90
|
+
$imageSlides = this.$slides.filter('img');
|
91
|
+
|
92
|
+
if ($imageSlides.length === 0) {
|
93
|
+
this.loaded();
|
94
|
+
} else {
|
95
|
+
$imageSlides.bind('imageready', function () {
|
96
|
+
imagesLoadedCount += 1;
|
97
|
+
if (imagesLoadedCount === $imageSlides.length) {
|
98
|
+
self.loaded();
|
99
|
+
}
|
100
|
+
});
|
101
|
+
}
|
102
|
+
},
|
103
|
+
|
104
|
+
loaded: function () {
|
105
|
+
this.$element
|
106
|
+
.addClass('orbit')
|
107
|
+
.css({width: '1px', height: '1px'});
|
108
|
+
|
109
|
+
this.setDimentionsFromLargestSlide();
|
110
|
+
this.updateOptionsIfOnlyOneSlide();
|
111
|
+
this.setupFirstSlide();
|
112
|
+
|
113
|
+
if (this.options.timer) {
|
114
|
+
this.setupTimer();
|
115
|
+
this.startClock();
|
116
|
+
}
|
117
|
+
|
118
|
+
if (this.options.captions) {
|
119
|
+
this.setupCaptions();
|
120
|
+
}
|
121
|
+
|
122
|
+
if (this.options.directionalNav) {
|
123
|
+
this.setupDirectionalNav();
|
124
|
+
}
|
125
|
+
|
126
|
+
if (this.options.bullets) {
|
127
|
+
this.setupBulletNav();
|
128
|
+
this.setActiveBullet();
|
129
|
+
}
|
130
|
+
},
|
131
|
+
|
132
|
+
currentSlide: function () {
|
133
|
+
return this.$slides.eq(this.activeSlide);
|
134
|
+
},
|
135
|
+
|
136
|
+
setDimentionsFromLargestSlide: function () {
|
137
|
+
//Collect all slides and set slider size of largest image
|
138
|
+
var self = this,
|
139
|
+
$fluidPlaceholder;
|
140
|
+
|
141
|
+
self.$element.add(self.$wrapper).width(this.$slides.first().width());
|
142
|
+
self.$element.add(self.$wrapper).height(this.$slides.first().height());
|
143
|
+
self.orbitWidth = this.$slides.first().width();
|
144
|
+
self.orbitHeight = this.$slides.first().height();
|
145
|
+
$fluidPlaceholder = this.$slides.first().clone();
|
146
|
+
|
147
|
+
this.$slides.each(function () {
|
148
|
+
var slide = $(this),
|
149
|
+
slideWidth = slide.width(),
|
150
|
+
slideHeight = slide.height();
|
151
|
+
|
152
|
+
if (slideWidth > self.$element.width()) {
|
153
|
+
self.$element.add(self.$wrapper).width(slideWidth);
|
154
|
+
self.orbitWidth = self.$element.width();
|
155
|
+
}
|
156
|
+
if (slideHeight > self.$element.height()) {
|
157
|
+
self.$element.add(self.$wrapper).height(slideHeight);
|
158
|
+
self.orbitHeight = self.$element.height();
|
159
|
+
$fluidPlaceholder = $(this).clone();
|
160
|
+
}
|
161
|
+
self.numberSlides += 1;
|
162
|
+
});
|
163
|
+
|
164
|
+
if (this.options.fluid) {
|
165
|
+
if (typeof this.options.fluid === "string") {
|
166
|
+
$fluidPlaceholder = $('<img src="http://placehold.it/' + this.options.fluid + '" />')
|
167
|
+
}
|
168
|
+
|
169
|
+
self.$element.prepend($fluidPlaceholder);
|
170
|
+
$fluidPlaceholder.addClass('fluid-placeholder');
|
171
|
+
self.$element.add(self.$wrapper).css({width: 'inherit'});
|
172
|
+
self.$element.add(self.$wrapper).css({height: 'inherit'});
|
173
|
+
|
174
|
+
$(window).bind('resize', function () {
|
175
|
+
self.orbitWidth = self.$element.width();
|
176
|
+
self.orbitHeight = self.$element.height();
|
177
|
+
});
|
178
|
+
}
|
179
|
+
},
|
180
|
+
|
181
|
+
//Animation locking functions
|
182
|
+
lock: function () {
|
183
|
+
this.locked = true;
|
184
|
+
},
|
185
|
+
|
186
|
+
unlock: function () {
|
187
|
+
this.locked = false;
|
188
|
+
},
|
189
|
+
|
190
|
+
updateOptionsIfOnlyOneSlide: function () {
|
191
|
+
if(this.$slides.length === 1) {
|
192
|
+
this.options.directionalNav = false;
|
193
|
+
this.options.timer = false;
|
194
|
+
this.options.bullets = false;
|
195
|
+
}
|
196
|
+
},
|
197
|
+
|
198
|
+
setupFirstSlide: function () {
|
199
|
+
//Set initial front photo z-index and fades it in
|
200
|
+
var self = this;
|
201
|
+
this.$slides.first()
|
202
|
+
.css({"z-index" : 3})
|
203
|
+
.fadeIn(function() {
|
204
|
+
//brings in all other slides IF css declares a display: none
|
205
|
+
self.$slides.css({"display":"block"})
|
206
|
+
});
|
207
|
+
},
|
208
|
+
|
209
|
+
startClock: function () {
|
210
|
+
var self = this;
|
211
|
+
|
212
|
+
if(!this.options.timer) {
|
213
|
+
return false;
|
214
|
+
}
|
215
|
+
|
216
|
+
if (this.$timer.is(':hidden')) {
|
217
|
+
this.clock = setInterval(function () {
|
218
|
+
this.$element.trigger('orbit.next');
|
219
|
+
}, this.options.advanceSpeed);
|
220
|
+
} else {
|
221
|
+
this.timerRunning = true;
|
222
|
+
this.$pause.removeClass('active')
|
223
|
+
this.clock = setInterval(this.rotateTimer, this.options.advanceSpeed / 180);
|
224
|
+
}
|
225
|
+
},
|
226
|
+
|
227
|
+
rotateTimer: function () {
|
228
|
+
var degreeCSS = "rotate(" + this.degrees + "deg)"
|
229
|
+
this.degrees += 2;
|
230
|
+
this.$rotator.css({
|
231
|
+
"-webkit-transform": degreeCSS,
|
232
|
+
"-moz-transform": degreeCSS,
|
233
|
+
"-o-transform": degreeCSS
|
234
|
+
});
|
235
|
+
if(this.degrees > 180) {
|
236
|
+
this.$rotator.addClass('move');
|
237
|
+
this.$mask.addClass('move');
|
238
|
+
}
|
239
|
+
if(this.degrees > 360) {
|
240
|
+
this.$rotator.removeClass('move');
|
241
|
+
this.$mask.removeClass('move');
|
242
|
+
this.degrees = 0;
|
243
|
+
this.$element.trigger('orbit.next');
|
244
|
+
}
|
245
|
+
},
|
246
|
+
|
247
|
+
stopClock: function () {
|
248
|
+
if (!this.options.timer) {
|
249
|
+
return false;
|
250
|
+
} else {
|
251
|
+
this.timerRunning = false;
|
252
|
+
clearInterval(this.clock);
|
253
|
+
this.$pause.addClass('active');
|
254
|
+
}
|
255
|
+
},
|
256
|
+
|
257
|
+
setupTimer: function () {
|
258
|
+
this.$timer = $(this.timerHTML);
|
259
|
+
this.$wrapper.append(this.$timer);
|
260
|
+
|
261
|
+
this.$rotator = this.$timer.find('.rotator');
|
262
|
+
this.$mask = this.$timer.find('.mask');
|
263
|
+
this.$pause = this.$timer.find('.pause');
|
264
|
+
|
265
|
+
this.$timer.click(this.clickTimer);
|
266
|
+
|
267
|
+
if (this.options.startClockOnMouseOut) {
|
268
|
+
this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);
|
269
|
+
this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer);
|
270
|
+
}
|
271
|
+
|
272
|
+
if (this.options.pauseOnHover) {
|
273
|
+
this.$wrapper.mouseenter(this.stopClock);
|
274
|
+
}
|
275
|
+
},
|
276
|
+
|
277
|
+
startTimerAfterMouseLeave: function () {
|
278
|
+
var self = this;
|
279
|
+
|
280
|
+
this.outTimer = setTimeout(function() {
|
281
|
+
if(!self.timerRunning){
|
282
|
+
self.startClock();
|
283
|
+
}
|
284
|
+
}, this.options.startClockOnMouseOutAfter)
|
285
|
+
},
|
286
|
+
|
287
|
+
clearClockMouseLeaveTimer: function () {
|
288
|
+
clearTimeout(this.outTimer);
|
289
|
+
},
|
290
|
+
|
291
|
+
clickTimer: function () {
|
292
|
+
if(!this.timerRunning) {
|
293
|
+
this.startClock();
|
294
|
+
} else {
|
295
|
+
this.stopClock();
|
296
|
+
}
|
297
|
+
},
|
298
|
+
|
299
|
+
setupCaptions: function () {
|
300
|
+
this.$caption = $(this.captionHTML);
|
301
|
+
this.$wrapper.append(this.$caption);
|
302
|
+
this.setCaption();
|
303
|
+
},
|
304
|
+
|
305
|
+
setCaption: function () {
|
306
|
+
var captionLocation = this.currentSlide().attr('data-caption'),
|
307
|
+
captionHTML;
|
308
|
+
|
309
|
+
if (!this.options.captions) {
|
310
|
+
return false;
|
311
|
+
}
|
312
|
+
|
313
|
+
//Set HTML for the caption if it exists
|
314
|
+
if (captionLocation) {
|
315
|
+
captionHTML = $(captionLocation).html(); //get HTML from the matching HTML entity
|
316
|
+
this.$caption
|
317
|
+
.attr('id', captionLocation) // Add ID caption TODO why is the id being set?
|
318
|
+
.html(captionHTML); // Change HTML in Caption
|
319
|
+
//Animations for Caption entrances
|
320
|
+
switch (this.options.captionAnimation) {
|
321
|
+
case 'none':
|
322
|
+
this.$caption.show();
|
323
|
+
break;
|
324
|
+
case 'fade':
|
325
|
+
this.$caption.fadeIn(this.options.captionAnimationSpeed);
|
326
|
+
break;
|
327
|
+
case 'slideOpen':
|
328
|
+
this.$caption.slideDown(this.options.captionAnimationSpeed);
|
329
|
+
break;
|
330
|
+
}
|
331
|
+
} else {
|
332
|
+
//Animations for Caption exits
|
333
|
+
switch (this.options.captionAnimation) {
|
334
|
+
case 'none':
|
335
|
+
this.$caption.hide();
|
336
|
+
break;
|
337
|
+
case 'fade':
|
338
|
+
this.$caption.fadeOut(this.options.captionAnimationSpeed);
|
339
|
+
break;
|
340
|
+
case 'slideOpen':
|
341
|
+
this.$caption.slideUp(this.options.captionAnimationSpeed);
|
342
|
+
break;
|
343
|
+
}
|
344
|
+
}
|
345
|
+
},
|
346
|
+
|
347
|
+
setupDirectionalNav: function () {
|
348
|
+
var self = this;
|
349
|
+
|
350
|
+
this.$wrapper.append(this.directionalNavHTML);
|
351
|
+
|
352
|
+
this.$wrapper.find('.left').click(function () {
|
353
|
+
self.stopClock();
|
354
|
+
self.$element.trigger('orbit.prev');
|
355
|
+
});
|
356
|
+
|
357
|
+
this.$wrapper.find('.right').click(function () {
|
358
|
+
self.stopClock();
|
359
|
+
self.$element.trigger('orbit.next');
|
360
|
+
});
|
361
|
+
},
|
362
|
+
|
363
|
+
setupBulletNav: function () {
|
364
|
+
this.$bullets = $(this.bulletHTML);
|
365
|
+
this.$wrapper.append(this.$bullets);
|
366
|
+
this.$slides.each(this.addBullet);
|
367
|
+
this.$element.addClass('with-bullets');
|
368
|
+
if (this.options.centerBullets) this.$bullets.css('margin-left', -this.$bullets.width() / 2);
|
369
|
+
},
|
370
|
+
|
371
|
+
addBullet: function (index, slide) {
|
372
|
+
var position = index + 1,
|
373
|
+
$li = $('<li>' + (position) + '</li>'),
|
374
|
+
thumbName,
|
375
|
+
self = this;
|
376
|
+
|
377
|
+
if (this.options.bulletThumbs) {
|
378
|
+
thumbName = $(slide).attr('data-thumb');
|
379
|
+
if (thumbName) {
|
380
|
+
$li
|
381
|
+
.addClass('has-thumb')
|
382
|
+
.css({background: "url(" + this.options.bulletThumbLocation + thumbName + ") no-repeat"});;
|
383
|
+
}
|
384
|
+
}
|
385
|
+
this.$bullets.append($li);
|
386
|
+
$li.data('index', index);
|
387
|
+
$li.click(function () {
|
388
|
+
self.stopClock();
|
389
|
+
self.$element.trigger('orbit.goto', [$li.data('index')])
|
390
|
+
});
|
391
|
+
},
|
392
|
+
|
393
|
+
setActiveBullet: function () {
|
394
|
+
if(!this.options.bullets) { return false; } else {
|
395
|
+
this.$bullets.find('li')
|
396
|
+
.removeClass('active')
|
397
|
+
.eq(this.activeSlide)
|
398
|
+
.addClass('active');
|
399
|
+
}
|
400
|
+
},
|
401
|
+
|
402
|
+
resetAndUnlock: function () {
|
403
|
+
this.$slides
|
404
|
+
.eq(this.prevActiveSlide)
|
405
|
+
.css({"z-index" : 1});
|
406
|
+
this.unlock();
|
407
|
+
this.options.afterSlideChange.call(this, this.$slides.eq(this.prevActiveSlide), this.$slides.eq(this.activeSlide));
|
408
|
+
},
|
409
|
+
|
410
|
+
shift: function (direction) {
|
411
|
+
var slideDirection = direction;
|
412
|
+
|
413
|
+
//remember previous activeSlide
|
414
|
+
this.prevActiveSlide = this.activeSlide;
|
415
|
+
|
416
|
+
//exit function if bullet clicked is same as the current image
|
417
|
+
if (this.prevActiveSlide == slideDirection) { return false; }
|
418
|
+
|
419
|
+
if (this.$slides.length == "1") { return false; }
|
420
|
+
if (!this.locked) {
|
421
|
+
this.lock();
|
422
|
+
//deduce the proper activeImage
|
423
|
+
if (direction == "next") {
|
424
|
+
this.activeSlide++;
|
425
|
+
if (this.activeSlide == this.numberSlides) {
|
426
|
+
this.activeSlide = 0;
|
427
|
+
}
|
428
|
+
} else if (direction == "prev") {
|
429
|
+
this.activeSlide--
|
430
|
+
if (this.activeSlide < 0) {
|
431
|
+
this.activeSlide = this.numberSlides - 1;
|
432
|
+
}
|
433
|
+
} else {
|
434
|
+
this.activeSlide = direction;
|
435
|
+
if (this.prevActiveSlide < this.activeSlide) {
|
436
|
+
slideDirection = "next";
|
437
|
+
} else if (this.prevActiveSlide > this.activeSlide) {
|
438
|
+
slideDirection = "prev"
|
439
|
+
}
|
440
|
+
}
|
441
|
+
|
442
|
+
//set to correct bullet
|
443
|
+
this.setActiveBullet();
|
444
|
+
|
445
|
+
//set previous slide z-index to one below what new activeSlide will be
|
446
|
+
this.$slides
|
447
|
+
.eq(this.prevActiveSlide)
|
448
|
+
.css({"z-index" : 2});
|
449
|
+
|
450
|
+
//fade
|
451
|
+
if (this.options.animation == "fade") {
|
452
|
+
this.$slides
|
453
|
+
.eq(this.activeSlide)
|
454
|
+
.css({"opacity" : 0, "z-index" : 3})
|
455
|
+
.animate({"opacity" : 1}, this.options.animationSpeed, this.resetAndUnlock);
|
456
|
+
}
|
457
|
+
|
458
|
+
//horizontal-slide
|
459
|
+
if (this.options.animation == "horizontal-slide") {
|
460
|
+
if (slideDirection == "next") {
|
461
|
+
this.$slides
|
462
|
+
.eq(this.activeSlide)
|
463
|
+
.css({"left": this.orbitWidth, "z-index" : 3})
|
464
|
+
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
465
|
+
}
|
466
|
+
if (slideDirection == "prev") {
|
467
|
+
this.$slides
|
468
|
+
.eq(this.activeSlide)
|
469
|
+
.css({"left": -this.orbitWidth, "z-index" : 3})
|
470
|
+
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
471
|
+
}
|
472
|
+
}
|
473
|
+
|
474
|
+
//vertical-slide
|
475
|
+
if (this.options.animation == "vertical-slide") {
|
476
|
+
if (slideDirection == "prev") {
|
477
|
+
this.$slides
|
478
|
+
.eq(this.activeSlide)
|
479
|
+
.css({"top": this.orbitHeight, "z-index" : 3})
|
480
|
+
.animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
481
|
+
}
|
482
|
+
if (slideDirection == "next") {
|
483
|
+
this.$slides
|
484
|
+
.eq(this.activeSlide)
|
485
|
+
.css({"top": -this.orbitHeight, "z-index" : 3})
|
486
|
+
.animate({"top" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
487
|
+
}
|
488
|
+
}
|
489
|
+
|
490
|
+
//horizontal-push
|
491
|
+
if (this.options.animation == "horizontal-push") {
|
492
|
+
if (slideDirection == "next") {
|
493
|
+
this.$slides
|
494
|
+
.eq(this.activeSlide)
|
495
|
+
.css({"left": this.orbitWidth, "z-index" : 3})
|
496
|
+
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
497
|
+
this.$slides
|
498
|
+
.eq(this.prevActiveSlide)
|
499
|
+
.animate({"left" : -this.orbitWidth}, this.options.animationSpeed);
|
500
|
+
}
|
501
|
+
if (slideDirection == "prev") {
|
502
|
+
this.$slides
|
503
|
+
.eq(this.activeSlide)
|
504
|
+
.css({"left": -this.orbitWidth, "z-index" : 3})
|
505
|
+
.animate({"left" : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
506
|
+
this.$slides
|
507
|
+
.eq(this.prevActiveSlide)
|
508
|
+
.animate({"left" : this.orbitWidth}, this.options.animationSpeed);
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
//vertical-push
|
513
|
+
if (this.options.animation == "vertical-push") {
|
514
|
+
if (slideDirection == "next") {
|
515
|
+
this.$slides
|
516
|
+
.eq(this.activeSlide)
|
517
|
+
.css({top: -this.orbitHeight, "z-index" : 3})
|
518
|
+
.animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
519
|
+
this.$slides
|
520
|
+
.eq(this.prevActiveSlide)
|
521
|
+
.animate({top : this.orbitHeight}, this.options.animationSpeed);
|
522
|
+
}
|
523
|
+
if (slideDirection == "prev") {
|
524
|
+
this.$slides
|
525
|
+
.eq(this.activeSlide)
|
526
|
+
.css({top: this.orbitHeight, "z-index" : 3})
|
527
|
+
.animate({top : 0}, this.options.animationSpeed, this.resetAndUnlock);
|
528
|
+
this.$slides
|
529
|
+
.eq(this.prevActiveSlide)
|
530
|
+
.animate({top : -this.orbitHeight}, this.options.animationSpeed);
|
531
|
+
}
|
532
|
+
}
|
533
|
+
|
534
|
+
this.setCaption();
|
535
|
+
}
|
536
|
+
}
|
537
|
+
};
|
538
|
+
|
539
|
+
$.fn.orbit = function (options) {
|
540
|
+
return this.each(function () {
|
541
|
+
var orbit = $.extend({}, ORBIT);
|
542
|
+
orbit.init(this, options);
|
543
|
+
});
|
544
|
+
};
|
545
|
+
|
546
|
+
})(jQuery);
|
547
|
+
|
548
|
+
/*!
|
549
|
+
* jQuery imageready Plugin
|
550
|
+
* http://www.zurb.com/playground/
|
551
|
+
*
|
552
|
+
* Copyright 2011, ZURB
|
553
|
+
* Released under the MIT License
|
554
|
+
*/
|
555
|
+
(function ($) {
|
556
|
+
|
557
|
+
var options = {};
|
558
|
+
|
559
|
+
$.event.special.imageready = {
|
560
|
+
|
561
|
+
setup: function (data, namespaces, eventHandle) {
|
562
|
+
options = data || options;
|
563
|
+
},
|
564
|
+
|
565
|
+
add: function (handleObj) {
|
566
|
+
var $this = $(this),
|
567
|
+
src;
|
568
|
+
|
569
|
+
if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
|
570
|
+
if (options.forceLoad) {
|
571
|
+
src = $this.attr('src');
|
572
|
+
$this.attr('src', '');
|
573
|
+
bindToLoad(this, handleObj.handler);
|
574
|
+
$this.attr('src', src);
|
575
|
+
} else if ( this.complete || this.readyState === 4 ) {
|
576
|
+
handleObj.handler.apply(this, arguments);
|
577
|
+
} else {
|
578
|
+
bindToLoad(this, handleObj.handler);
|
579
|
+
}
|
580
|
+
}
|
581
|
+
},
|
582
|
+
|
583
|
+
teardown: function (namespaces) {
|
584
|
+
$(this).unbind('.imageready');
|
585
|
+
}
|
586
|
+
};
|
587
|
+
|
588
|
+
function bindToLoad(element, callback) {
|
589
|
+
var $this = $(element);
|
590
|
+
|
591
|
+
$this.bind('load.imageready', function () {
|
592
|
+
callback.apply(element, arguments);
|
593
|
+
$this.unbind('load.imageready');
|
594
|
+
});
|
595
|
+
}
|
596
|
+
|
597
|
+
}(jQuery));
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! http://mths.be/placeholder v1.8.5 by @mathias */
|
2
|
+
(function(g,a,$){var f='placeholder' in a.createElement('input'),b='placeholder' in a.createElement('textarea');if(f&&b){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((f?'textarea':':input')+'[placeholder]').bind('focus.placeholder',c).bind('blur.placeholder',e).trigger('blur.placeholder').end()};$.fn.placeholder.input=f;$.fn.placeholder.textarea=b;$(function(){$('form').bind('submit.placeholder',function(){var h=$('.placeholder',this).each(c);setTimeout(function(){h.each(e)},10)})});$(g).bind('unload.placeholder',function(){$('.placeholder').val('')})}function d(i){var h={},j=/^jQuery\d+$/;$.each(i.attributes,function(l,k){if(k.specified&&!j.test(k.name)){h[k.name]=k.value}});return h}function c(){var h=$(this);if(h.val()===h.attr('placeholder')&&h.hasClass('placeholder')){if(h.data('placeholder-password')){h.hide().next().show().focus().attr('id',h.removeAttr('id').data('placeholder-id'))}else{h.val('').removeClass('placeholder')}}}function e(){var l,k=$(this),h=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=$('<input>').attr($.extend(d(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',c);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(this,document,jQuery));
|