@pimaonline/pimaonline-themepack 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/LICENSE.md +30 -0
  2. package/README.md +69 -111
  3. package/dist/css/main.css +1 -1
  4. package/dist/css/themes/ait/styles.css +1 -0
  5. package/dist/css/themes/art/styles.css +1 -1
  6. package/dist/css/themes/business/styles.css +1 -1
  7. package/dist/css/themes/cards/styles.css +1 -1
  8. package/dist/css/themes/cda/styles.css +1 -1
  9. package/dist/css/themes/communication/styles.css +1 -1
  10. package/dist/css/themes/culinary/styles.css +1 -1
  11. package/dist/css/themes/ece/styles.css +1 -1
  12. package/dist/css/themes/ecn/styles.css +1 -0
  13. package/dist/css/themes/eng/styles.css +1 -0
  14. package/dist/css/themes/fsc/styles.css +1 -0
  15. package/dist/css/themes/geography/styles.css +1 -1
  16. package/dist/css/themes/geology/styles.css +1 -1
  17. package/dist/css/themes/health-it/styles.css +1 -1
  18. package/dist/css/themes/history/styles.css +1 -1
  19. package/dist/css/themes/hrm/styles.css +1 -0
  20. package/dist/css/themes/hrs/styles.css +1 -1
  21. package/dist/css/themes/journalism/styles.css +1 -1
  22. package/dist/css/themes/lang/styles.css +1 -1
  23. package/dist/css/themes/machine/styles.css +1 -1
  24. package/dist/css/themes/math/styles.css +1 -1
  25. package/dist/css/themes/minimalist/styles.css +1 -1
  26. package/dist/css/themes/music/styles.css +1 -1
  27. package/dist/css/themes/philosophy/styles.css +1 -1
  28. package/dist/css/themes/resort/styles.css +1 -1
  29. package/dist/css/themes/ss/styles.css +1 -0
  30. package/dist/css/themes/university/styles.css +1 -1
  31. package/dist/css/themes/vet/styles.css +1 -1
  32. package/dist/css/themes/welding/styles.css +1 -1
  33. package/dist/css/themes/writing/styles.css +1 -1
  34. package/dist/img/theme-images/ecn/arrow-2.svg +4 -0
  35. package/dist/img/theme-images/ecn/arrow.svg +4 -0
  36. package/dist/img/theme-images/ecn/point.svg +3 -0
  37. package/dist/img/theme-images/eng/button-bkg.svg +178 -0
  38. package/dist/img/theme-images/eng/halftone-banner.svg +1 -0
  39. package/dist/img/theme-images/eng/halftone.svg +177 -0
  40. package/dist/img/theme-images/eng/long-button-bkg.svg +353 -0
  41. package/dist/img/theme-images/fsc/bottomwave-pinkred.svg +17 -0
  42. package/dist/img/theme-images/fsc/bottomwave-redorange.svg +17 -0
  43. package/dist/img/theme-images/fsc/bottomwave-yellow.svg +17 -0
  44. package/dist/img/theme-images/fsc/bottomwave-yelloworange.svg +17 -0
  45. package/dist/img/theme-images/fsc/fire-icon.png +0 -0
  46. package/dist/img/theme-images/fsc/mainwave-pinkred.svg +17 -0
  47. package/dist/img/theme-images/fsc/mainwave-redorange.svg +17 -0
  48. package/dist/img/theme-images/fsc/mainwave-yellow.svg +17 -0
  49. package/dist/img/theme-images/fsc/mainwave-yelloworange.svg +17 -0
  50. package/dist/img/theme-images/lang/country-flags/argentina_flag.png +0 -0
  51. package/dist/img/theme-images/lang/country-flags/bolivia_flag.png +0 -0
  52. package/dist/img/theme-images/lang/country-flags/chile_flag.png +0 -0
  53. package/dist/img/theme-images/lang/country-flags/colombia_flag.png +0 -0
  54. package/dist/img/theme-images/lang/country-flags/costa-rica_flag.png +0 -0
  55. package/dist/img/theme-images/lang/country-flags/cuba_flag.png +0 -0
  56. package/dist/img/theme-images/lang/country-flags/dominican-republic_flag.png +0 -0
  57. package/dist/img/theme-images/lang/country-flags/ecuador_flag.png +0 -0
  58. package/dist/img/theme-images/lang/country-flags/el-salvador_flag.png +0 -0
  59. package/dist/img/theme-images/lang/country-flags/guatemala_flag.png +0 -0
  60. package/dist/img/theme-images/lang/country-flags/honduras_flag.png +0 -0
  61. package/dist/img/theme-images/lang/country-flags/mexico_flag.png +0 -0
  62. package/dist/img/theme-images/lang/country-flags/nicaragua_flag.png +0 -0
  63. package/dist/img/theme-images/lang/country-flags/panama_flag.png +0 -0
  64. package/dist/img/theme-images/lang/country-flags/paraguay_flag.png +0 -0
  65. package/dist/img/theme-images/lang/country-flags/peru_flag.png +0 -0
  66. package/dist/img/theme-images/lang/country-flags/puerto-rice_flag.png +0 -0
  67. package/dist/img/theme-images/lang/country-flags/spain_flag.png +0 -0
  68. package/dist/img/theme-images/lang/country-flags/uruguay_flag.png +0 -0
  69. package/dist/img/theme-images/lang/country-flags/venezuela_flag.png +0 -0
  70. package/dist/img/theme-images/music/half_note.svg +5 -5
  71. package/dist/img/theme-images/resort/flourish-left.svg +32 -32
  72. package/dist/img/theme-images/resort/flourish-main.svg +37 -37
  73. package/dist/img/theme-images/resort/flourish-right.svg +31 -31
  74. package/dist/img/theme-images/resort/separator.svg +15 -15
  75. package/dist/img/theme-images/ss/blockquote.svg +3 -0
  76. package/dist/img/theme-images/ss/list-style.svg +3 -0
  77. package/dist/img/theme-images/ss/main-large-blob.svg +3 -0
  78. package/dist/img/theme-images/ss/main-small-blob.svg +3 -0
  79. package/dist/img/theme-images/ss/small-blob.svg +3 -0
  80. package/dist/img/theme-images/ss/tall-blob.svg +3 -0
  81. package/dist/img/theme-images/widgets/separator.svg +17 -17
  82. package/dist/js/jumpTo.js +3 -3
  83. package/dist/js/scripts.js +326 -326
  84. package/dist/js/scripts2.js +541 -345
  85. package/dist/plugins/fancybox/fancybox-example.html +51 -51
  86. package/dist/plugins/fancybox/fancybox.css +72 -72
  87. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.css +97 -97
  88. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +122 -122
  89. package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +201 -201
  90. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +54 -54
  91. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +165 -165
  92. package/dist/plugins/fancybox/jquery.fancybox.css +274 -274
  93. package/dist/plugins/fancybox/jquery.fancybox.js +2018 -2018
  94. package/dist/plugins/fancybox/jquery.fancybox.pack.js +46 -46
  95. package/dist/plugins/flashcards/README.md +135 -135
  96. package/dist/plugins/flashcards/config.rb +24 -24
  97. package/dist/plugins/flashcards/css/style.css +215 -215
  98. package/dist/plugins/flashcards/flashcards-example.html +65 -65
  99. package/dist/plugins/flashcards/index.html +90 -90
  100. package/dist/plugins/flashcards/js/flash_cards.min.js +11 -11
  101. package/dist/plugins/flashcards/js/plugins/flash_cards.js +62 -62
  102. package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +1147 -1147
  103. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +9404 -9404
  104. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +3 -3
  105. package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +3 -3
  106. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.svg +20 -20
  107. package/dist/plugins/floating-particles/floating-particles.js +67 -67
  108. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.svg +3570 -3570
  109. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.svg +803 -803
  110. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.svg +4700 -4700
  111. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.css +539 -539
  112. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.html +18 -18
  113. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +52 -52
  114. package/dist/plugins/preview-banner/preview-banner.css +125 -125
  115. package/dist/plugins/preview-banner/preview-banner.html +17 -17
  116. package/dist/plugins/preview-banner/preview-banner.js +56 -56
  117. package/package.json +39 -40
  118. package/dist/img/theme-images/history/hisribbonv-02.png +0 -0
  119. package/dist/img/theme-images/img/bouncingball.png +0 -0
@@ -1,122 +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));
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));
@@ -1,201 +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));
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));