@pimaonline/pimaonline-themepack 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/README.md +113 -0
  2. package/dist/css/main.css +1 -0
  3. package/dist/css/plugins/font-awesome.css +1 -0
  4. package/dist/css/routes.css +3 -0
  5. package/dist/img/theme-images/culinary/black-marble.png +0 -0
  6. package/dist/img/theme-images/culinary/concrete-light.png +0 -0
  7. package/dist/img/theme-images/culinary/dark-marble.png +0 -0
  8. package/dist/img/theme-images/culinary/steel-stainless-rotate.jpg +0 -0
  9. package/dist/img/theme-images/culinary/wood.jpg +0 -0
  10. package/dist/img/theme-images/health-information-tech/hit-bkg.jpg +0 -0
  11. package/dist/img/theme-images/journalism/bg.jpg +0 -0
  12. package/dist/img/theme-images/machine/bg-diamond-plate.jpg +0 -0
  13. package/dist/img/theme-images/music/half_note.svg +5 -0
  14. package/dist/img/theme-images/music/music_brackets.png +0 -0
  15. package/dist/img/theme-images/music/treble-cleft.png +0 -0
  16. package/dist/img/theme-images/resort/fleur-de-lis.png +0 -0
  17. package/dist/img/theme-images/resort/flourish-left.svg +32 -0
  18. package/dist/img/theme-images/resort/flourish-main.svg +37 -0
  19. package/dist/img/theme-images/resort/flourish-right.svg +31 -0
  20. package/dist/img/theme-images/resort/hotel-wallpaper.png +0 -0
  21. package/dist/img/theme-images/resort/separator.svg +15 -0
  22. package/dist/img/theme-images/resort/stripes-light.png +0 -0
  23. package/dist/img/theme-images/theme-banners/bannerimage-calendar.jpg +0 -0
  24. package/dist/img/theme-images/theme-banners/bannerimage-desk-with-laptop.jpg +0 -0
  25. package/dist/img/theme-images/theme-banners/bannerimage-empty-classroom.jpg +0 -0
  26. package/dist/img/theme-images/theme-banners/bannerimage-empty-road.jpg +0 -0
  27. package/dist/img/theme-images/theme-banners/bannerimage-fingers-interacting-tablet.jpg +0 -0
  28. package/dist/img/theme-images/theme-banners/bannerimage-fingers-typing.jpg +0 -0
  29. package/dist/img/theme-images/theme-banners/bannerimage-hand-signing-document.jpg +0 -0
  30. package/dist/img/theme-images/theme-banners/bannerimage-student-shopping.jpg +0 -0
  31. package/dist/img/theme-images/theme-banners/bannerimage-students-on-computer.jpg +0 -0
  32. package/dist/img/theme-images/theme-banners/bannerimage-students-on-grass.jpg +0 -0
  33. package/dist/img/theme-images/widgets/separator.svg +17 -0
  34. package/dist/img/theme-images/writing/bg-composition-notebook.jpg +0 -0
  35. package/dist/img/theme-images/writing/bg-writing.jpg +0 -0
  36. package/dist/js/jumpTo.js +4 -0
  37. package/dist/js/scripts.js +209 -0
  38. package/dist/js/scripts2.js +205 -0
  39. package/dist/plugins/fancybox/_notes/dwsync.xml +1 -0
  40. package/dist/plugins/fancybox/blank.gif +0 -0
  41. package/dist/plugins/fancybox/fancybox-example.html +52 -0
  42. package/dist/plugins/fancybox/fancybox.css +73 -0
  43. package/dist/plugins/fancybox/fancybox_loading.gif +0 -0
  44. package/dist/plugins/fancybox/fancybox_loading@2x.gif +0 -0
  45. package/dist/plugins/fancybox/fancybox_overlay.png +0 -0
  46. package/dist/plugins/fancybox/fancybox_sprite.png +0 -0
  47. package/dist/plugins/fancybox/fancybox_sprite@2x.png +0 -0
  48. package/dist/plugins/fancybox/helpers/_notes/dwsync.xml +1 -0
  49. package/dist/plugins/fancybox/helpers/fancybox_buttons.png +0 -0
  50. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.css +97 -0
  51. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +122 -0
  52. package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +201 -0
  53. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +55 -0
  54. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +165 -0
  55. package/dist/plugins/fancybox/jquery.fancybox.css +275 -0
  56. package/dist/plugins/fancybox/jquery.fancybox.js +2018 -0
  57. package/dist/plugins/fancybox/jquery.fancybox.pack.js +46 -0
  58. package/dist/plugins/flashcards/README.md +135 -0
  59. package/dist/plugins/flashcards/_notes/dwsync.xml +1 -0
  60. package/dist/plugins/flashcards/config.rb +24 -0
  61. package/dist/plugins/flashcards/css/_notes/dwsync.xml +1 -0
  62. package/dist/plugins/flashcards/css/style.css +216 -0
  63. package/dist/plugins/flashcards/flashcards-example.html +66 -0
  64. package/dist/plugins/flashcards/images/_notes/dwsync.xml +1 -0
  65. package/dist/plugins/flashcards/images/icon-back.svg +1 -0
  66. package/dist/plugins/flashcards/images/icon-flip.svg +1 -0
  67. package/dist/plugins/flashcards/images/icon-next.svg +1 -0
  68. package/dist/plugins/flashcards/index.html +90 -0
  69. package/dist/plugins/flashcards/js/_notes/dwsync.xml +1 -0
  70. package/dist/plugins/flashcards/js/flash_cards.min.js +12 -0
  71. package/dist/plugins/flashcards/js/plugins/_notes/dwsync.xml +1 -0
  72. package/dist/plugins/flashcards/js/plugins/flash_cards.js +62 -0
  73. package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +1148 -0
  74. package/dist/plugins/flashcards/js/vendor/_notes/dwsync.xml +1 -0
  75. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +9404 -0
  76. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +4 -0
  77. package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +4 -0
  78. package/dist/plugins/flashcards/resources/fonts/flash_cards/_notes/dwsync.xml +1 -0
  79. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.eot +0 -0
  80. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.svg +21 -0
  81. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.ttf +0 -0
  82. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.woff +0 -0
  83. package/dist/plugins/floating-particles/floating-particles.js +68 -0
  84. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.eot +0 -0
  85. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.svg +3570 -0
  86. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.ttf +0 -0
  87. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.woff +0 -0
  88. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.woff2 +0 -0
  89. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.eot +0 -0
  90. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.svg +803 -0
  91. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.ttf +0 -0
  92. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.woff +0 -0
  93. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.woff2 +0 -0
  94. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.eot +0 -0
  95. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.svg +4700 -0
  96. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.ttf +0 -0
  97. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.woff +0 -0
  98. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.woff2 +0 -0
  99. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.css +539 -0
  100. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.html +18 -0
  101. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +53 -0
  102. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-advising.png +0 -0
  103. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-apps.png +0 -0
  104. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-counseling.png +0 -0
  105. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-d2l.png +0 -0
  106. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-email.png +0 -0
  107. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-nettutor.png +0 -0
  108. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-register.png +0 -0
  109. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-research-help.png +0 -0
  110. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-survey.png +0 -0
  111. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-tech-support.png +0 -0
  112. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-testing-center.png +0 -0
  113. package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-tutoring.png +0 -0
  114. package/dist/plugins/preview-banner/preview-banner.css +126 -0
  115. package/dist/plugins/preview-banner/preview-banner.html +17 -0
  116. package/dist/plugins/preview-banner/preview-banner.js +57 -0
  117. package/package.json +44 -0
@@ -0,0 +1,122 @@
1
+ /*!
2
+ * Buttons helper for fancyBox
3
+ * version: 1.0.5 (Mon, 15 Oct 2012)
4
+ * @requires fancyBox v2.0 or later
5
+ *
6
+ * Usage:
7
+ * $(".fancybox").fancybox({
8
+ * helpers : {
9
+ * buttons: {
10
+ * position : 'top'
11
+ * }
12
+ * }
13
+ * });
14
+ *
15
+ */
16
+ ;(function ($) {
17
+ //Shortcut for fancyBox object
18
+ var F = $.fancybox;
19
+
20
+ //Add helper object
21
+ F.helpers.buttons = {
22
+ defaults : {
23
+ skipSingle : false, // disables if gallery contains single image
24
+ position : 'top', // 'top' or 'bottom'
25
+ tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
26
+ },
27
+
28
+ list : null,
29
+ buttons: null,
30
+
31
+ beforeLoad: function (opts, obj) {
32
+ //Remove self if gallery do not have at least two items
33
+
34
+ if (opts.skipSingle && obj.group.length < 2) {
35
+ obj.helpers.buttons = false;
36
+ obj.closeBtn = true;
37
+
38
+ return;
39
+ }
40
+
41
+ //Increase top margin to give space for buttons
42
+ obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
43
+ },
44
+
45
+ onPlayStart: function () {
46
+ if (this.buttons) {
47
+ this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
48
+ }
49
+ },
50
+
51
+ onPlayEnd: function () {
52
+ if (this.buttons) {
53
+ this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
54
+ }
55
+ },
56
+
57
+ afterShow: function (opts, obj) {
58
+ var buttons = this.buttons;
59
+
60
+ if (!buttons) {
61
+ this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
62
+
63
+ buttons = {
64
+ prev : this.list.find('.btnPrev').click( F.prev ),
65
+ next : this.list.find('.btnNext').click( F.next ),
66
+ play : this.list.find('.btnPlay').click( F.play ),
67
+ toggle : this.list.find('.btnToggle').click( F.toggle ),
68
+ close : this.list.find('.btnClose').click( F.close )
69
+ }
70
+ }
71
+
72
+ //Prev
73
+ if (obj.index > 0 || obj.loop) {
74
+ buttons.prev.removeClass('btnDisabled');
75
+ } else {
76
+ buttons.prev.addClass('btnDisabled');
77
+ }
78
+
79
+ //Next / Play
80
+ if (obj.loop || obj.index < obj.group.length - 1) {
81
+ buttons.next.removeClass('btnDisabled');
82
+ buttons.play.removeClass('btnDisabled');
83
+
84
+ } else {
85
+ buttons.next.addClass('btnDisabled');
86
+ buttons.play.addClass('btnDisabled');
87
+ }
88
+
89
+ this.buttons = buttons;
90
+
91
+ this.onUpdate(opts, obj);
92
+ },
93
+
94
+ onUpdate: function (opts, obj) {
95
+ var toggle;
96
+
97
+ if (!this.buttons) {
98
+ return;
99
+ }
100
+
101
+ toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
102
+
103
+ //Size toggle button
104
+ if (obj.canShrink) {
105
+ toggle.addClass('btnToggleOn');
106
+
107
+ } else if (!obj.canExpand) {
108
+ toggle.addClass('btnDisabled');
109
+ }
110
+ },
111
+
112
+ beforeClose: function () {
113
+ if (this.list) {
114
+ this.list.remove();
115
+ }
116
+
117
+ this.list = null;
118
+ this.buttons = null;
119
+ }
120
+ };
121
+
122
+ }(jQuery));
@@ -0,0 +1,201 @@
1
+ /*!
2
+ * Media helper for fancyBox
3
+ * version: 1.0.6 (Fri, 14 Jun 2013)
4
+ * @requires fancyBox v2.0 or later
5
+ *
6
+ * Usage:
7
+ * $(".fancybox").fancybox({
8
+ * helpers : {
9
+ * media: true
10
+ * }
11
+ * });
12
+ *
13
+ * Set custom URL parameters:
14
+ * $(".fancybox").fancybox({
15
+ * helpers : {
16
+ * media: {
17
+ * youtube : {
18
+ * params : {
19
+ * autoplay : 0
20
+ * }
21
+ * }
22
+ * }
23
+ * }
24
+ * });
25
+ *
26
+ * Or:
27
+ * $(".fancybox").fancybox({,
28
+ * helpers : {
29
+ * media: true
30
+ * },
31
+ * youtube : {
32
+ * autoplay: 0
33
+ * }
34
+ * });
35
+ *
36
+ * Supports:
37
+ *
38
+ * Youtube
39
+ * http://www.youtube.com/watch?v=opj24KnzrWo
40
+ * http://www.youtube.com/embed/opj24KnzrWo
41
+ * http://youtu.be/opj24KnzrWo
42
+ * http://www.youtube-nocookie.com/embed/opj24KnzrWo
43
+ * Vimeo
44
+ * http://vimeo.com/40648169
45
+ * http://vimeo.com/channels/staffpicks/38843628
46
+ * http://vimeo.com/groups/surrealism/videos/36516384
47
+ * http://player.vimeo.com/video/45074303
48
+ * Metacafe
49
+ * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
50
+ * http://www.metacafe.com/watch/7635964/
51
+ * Dailymotion
52
+ * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
53
+ * Twitvid
54
+ * http://twitvid.com/QY7MD
55
+ * Twitpic
56
+ * http://twitpic.com/7p93st
57
+ * Instagram
58
+ * http://instagr.am/p/IejkuUGxQn/
59
+ * http://instagram.com/p/IejkuUGxQn/
60
+ * Google maps
61
+ * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
62
+ * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
63
+ * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
64
+ */
65
+ ;(function ($) {
66
+ "use strict";
67
+
68
+ //Shortcut for fancyBox object
69
+ var F = $.fancybox,
70
+ format = function( url, rez, params ) {
71
+ params = params || '';
72
+
73
+ if ( $.type( params ) === "object" ) {
74
+ params = $.param(params, true);
75
+ }
76
+
77
+ $.each(rez, function(key, value) {
78
+ url = url.replace( '$' + key, value || '' );
79
+ });
80
+
81
+ if (params.length) {
82
+ url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
83
+ }
84
+
85
+ return url;
86
+ };
87
+
88
+ //Add helper object
89
+ F.helpers.media = {
90
+ defaults : {
91
+ youtube : {
92
+ matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
93
+ params : {
94
+ autoplay : 1,
95
+ autohide : 1,
96
+ fs : 1,
97
+ rel : 0,
98
+ hd : 1,
99
+ wmode : 'opaque',
100
+ enablejsapi : 1,
101
+ ps: 'docs',
102
+ controls: 1
103
+ },
104
+ type : 'iframe',
105
+ url : '//www.youtube.com/embed/$3'
106
+ },
107
+ vimeo : {
108
+ matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
109
+ params : {
110
+ autoplay : 1,
111
+ hd : 1,
112
+ show_title : 1,
113
+ show_byline : 1,
114
+ show_portrait : 0,
115
+ fullscreen : 1
116
+ },
117
+ type : 'iframe',
118
+ url : '//player.vimeo.com/video/$1'
119
+ },
120
+ metacafe : {
121
+ matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
122
+ params : {
123
+ autoPlay : 'yes'
124
+ },
125
+ type : 'swf',
126
+ url : function( rez, params, obj ) {
127
+ obj.swf.flashVars = 'playerVars=' + $.param( params, true );
128
+
129
+ return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
130
+ }
131
+ },
132
+ dailymotion : {
133
+ matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
134
+ params : {
135
+ additionalInfos : 0,
136
+ autoStart : 1
137
+ },
138
+ type : 'swf',
139
+ url : '//www.dailymotion.com/swf/video/$1'
140
+ },
141
+ twitvid : {
142
+ matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
143
+ params : {
144
+ autoplay : 0
145
+ },
146
+ type : 'iframe',
147
+ url : '//www.twitvid.com/embed.php?guid=$1'
148
+ },
149
+ twitpic : {
150
+ matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
151
+ type : 'image',
152
+ url : '//twitpic.com/show/full/$1/'
153
+ },
154
+ instagram : {
155
+ matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
156
+ type : 'image',
157
+ url : '//$1/p/$2/media/?size=l'
158
+ },
159
+ google_maps : {
160
+ matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
161
+ type : 'iframe',
162
+ url : function( rez ) {
163
+ return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
164
+ }
165
+ }
166
+ },
167
+
168
+ beforeLoad : function(opts, obj) {
169
+ var url = obj.href || '',
170
+ type = false,
171
+ what,
172
+ item,
173
+ rez,
174
+ params;
175
+
176
+ for (what in opts) {
177
+ if (opts.hasOwnProperty(what)) {
178
+ item = opts[ what ];
179
+ rez = url.match( item.matcher );
180
+
181
+ if (rez) {
182
+ type = item.type;
183
+ params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
184
+
185
+ url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
186
+
187
+ break;
188
+ }
189
+ }
190
+ }
191
+
192
+ if (type) {
193
+ obj.href = url;
194
+ obj.type = type;
195
+
196
+ obj.autoHeight = false;
197
+ }
198
+ }
199
+ };
200
+
201
+ }(jQuery));
@@ -0,0 +1,55 @@
1
+ #fancybox-thumbs {
2
+ position: fixed;
3
+ left: 0;
4
+ width: 100%;
5
+ overflow: hidden;
6
+ z-index: 8050;
7
+ }
8
+
9
+ #fancybox-thumbs.bottom {
10
+ bottom: 2px;
11
+ }
12
+
13
+ #fancybox-thumbs.top {
14
+ top: 2px;
15
+ }
16
+
17
+ #fancybox-thumbs ul {
18
+ position: relative;
19
+ list-style: none;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+
24
+ #fancybox-thumbs ul li {
25
+ float: left;
26
+ padding: 1px;
27
+ opacity: 0.5;
28
+ }
29
+
30
+ #fancybox-thumbs ul li.active {
31
+ opacity: 0.75;
32
+ padding: 0;
33
+ border: 1px solid #fff;
34
+ }
35
+
36
+ #fancybox-thumbs ul li:hover {
37
+ opacity: 1;
38
+ }
39
+
40
+ #fancybox-thumbs ul li a {
41
+ display: block;
42
+ position: relative;
43
+ overflow: hidden;
44
+ border: 1px solid #222;
45
+ background: #111;
46
+ outline: none;
47
+ }
48
+
49
+ #fancybox-thumbs ul li img {
50
+ display: block;
51
+ position: relative;
52
+ border: 0;
53
+ padding: 0;
54
+ max-width: none;
55
+ }
@@ -0,0 +1,165 @@
1
+ /*!
2
+ * Thumbnail helper for fancyBox
3
+ * version: 1.0.7 (Mon, 01 Oct 2012)
4
+ * @requires fancyBox v2.0 or later
5
+ *
6
+ * Usage:
7
+ * $(".fancybox").fancybox({
8
+ * helpers : {
9
+ * thumbs: {
10
+ * width : 50,
11
+ * height : 50
12
+ * }
13
+ * }
14
+ * });
15
+ *
16
+ */
17
+ ;(function ($) {
18
+ //Shortcut for fancyBox object
19
+ var F = $.fancybox;
20
+
21
+ //Add helper object
22
+ F.helpers.thumbs = {
23
+ defaults : {
24
+ width : 50, // thumbnail width
25
+ height : 50, // thumbnail height
26
+ position : 'bottom', // 'top' or 'bottom'
27
+ source : function ( item ) { // function to obtain the URL of the thumbnail image
28
+ var href;
29
+
30
+ if (item.element) {
31
+ href = $(item.element).find('img').attr('src');
32
+ }
33
+
34
+ if (!href && item.type === 'image' && item.href) {
35
+ href = item.href;
36
+ }
37
+
38
+ return href;
39
+ }
40
+ },
41
+
42
+ wrap : null,
43
+ list : null,
44
+ width : 0,
45
+
46
+ init: function (opts, obj) {
47
+ var that = this,
48
+ list,
49
+ thumbWidth = opts.width,
50
+ thumbHeight = opts.height,
51
+ thumbSource = opts.source;
52
+
53
+ //Build list structure
54
+ list = '';
55
+
56
+ for (var n = 0; n < obj.group.length; n++) {
57
+ list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
58
+ }
59
+
60
+ this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
61
+ this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
62
+
63
+ //Load each thumbnail
64
+ $.each(obj.group, function (i) {
65
+ var el = obj.group[ i ],
66
+ href = thumbSource( el );
67
+
68
+ if (!href) {
69
+ return;
70
+ }
71
+
72
+ $("<img />").on("load", function () {
73
+ var width = this.width,
74
+ height = this.height,
75
+ widthRatio, heightRatio, parent;
76
+
77
+ if (!that.list || !width || !height) {
78
+ return;
79
+ }
80
+
81
+ //Calculate thumbnail width/height and center it
82
+ widthRatio = width / thumbWidth;
83
+ heightRatio = height / thumbHeight;
84
+
85
+ parent = that.list.children().eq(i).find('a');
86
+
87
+ if (widthRatio >= 1 && heightRatio >= 1) {
88
+ if (widthRatio > heightRatio) {
89
+ width = Math.floor(width / heightRatio);
90
+ height = thumbHeight;
91
+
92
+ } else {
93
+ width = thumbWidth;
94
+ height = Math.floor(height / widthRatio);
95
+ }
96
+ }
97
+
98
+ $(this).css({
99
+ width : width,
100
+ height : height,
101
+ top : Math.floor(thumbHeight / 2 - height / 2),
102
+ left : Math.floor(thumbWidth / 2 - width / 2)
103
+ });
104
+
105
+ parent.width(thumbWidth).height(thumbHeight);
106
+
107
+ $(this).hide().appendTo(parent).fadeIn(300);
108
+
109
+ })
110
+ .attr('src', href)
111
+ .attr('title', el.title);
112
+ });
113
+
114
+ //Set initial width
115
+ this.width = this.list.children().eq(0).outerWidth(true);
116
+
117
+ this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
118
+ },
119
+
120
+ beforeLoad: function (opts, obj) {
121
+ //Remove self if gallery do not have at least two items
122
+ if (obj.group.length < 2) {
123
+ obj.helpers.thumbs = false;
124
+
125
+ return;
126
+ }
127
+
128
+ //Increase bottom margin to give space for thumbs
129
+ obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
130
+ },
131
+
132
+ afterShow: function (opts, obj) {
133
+ //Check if exists and create or update list
134
+ if (this.list) {
135
+ this.onUpdate(opts, obj);
136
+
137
+ } else {
138
+ this.init(opts, obj);
139
+ }
140
+
141
+ //Set active element
142
+ this.list.children().removeClass('active').eq(obj.index).addClass('active');
143
+ },
144
+
145
+ //Center list
146
+ onUpdate: function (opts, obj) {
147
+ if (this.list) {
148
+ this.list.stop(true).animate({
149
+ 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
150
+ }, 150);
151
+ }
152
+ },
153
+
154
+ beforeClose: function () {
155
+ if (this.wrap) {
156
+ this.wrap.remove();
157
+ }
158
+
159
+ this.wrap = null;
160
+ this.list = null;
161
+ this.width = 0;
162
+ }
163
+ }
164
+
165
+ }(jQuery));