Easy FancyBox - Version 1.5.8

Version Description

  • FIX: variable variable php 7 compat
  • Dropped IE6 support
  • FIX: obj undefined in minified js
  • FIX: nofancybox in menu ignored, thanks Trishah
  • Color value sanitize
  • NEW: auto popup delay
  • NEW: pro extension version compatibility check routine
  • NEW: margin option
  • NEW: iFrame alow full screen option
  • Dropped mu-plugins support
  • Added support for universal nolightbox class
  • Set focus on iframe after load
  • FIX: No center on scroll on touch devices
  • FIX: Allow fullscreen videos
Download this release

Release Info

Developer deployer
Plugin Icon 128x128 Easy FancyBox
Version 1.5.8
Comparing to
See all releases

Code changes from version 1.5.7 to 1.5.8

Files changed (87) hide show
  1. easy-fancybox-admin.php +0 -0
  2. easy-fancybox-class.php +0 -659
  3. easy-fancybox.php +54 -65
  4. fancybox/blank.gif +0 -0
  5. fancybox/fancy_close.png +0 -0
  6. fancybox/fancy_loading.png +0 -0
  7. fancybox/fancy_nav_left.png +0 -0
  8. fancybox/fancy_nav_right.png +0 -0
  9. fancybox/fancy_shadow_e.png +0 -0
  10. fancybox/fancy_shadow_n.png +0 -0
  11. fancybox/fancy_shadow_ne.png +0 -0
  12. fancybox/fancy_shadow_nw.png +0 -0
  13. fancybox/fancy_shadow_s.png +0 -0
  14. fancybox/fancy_shadow_se.png +0 -0
  15. fancybox/fancy_shadow_sw.png +0 -0
  16. fancybox/fancy_shadow_w.png +0 -0
  17. fancybox/fancy_title_left.png +0 -0
  18. fancybox/fancy_title_main.png +0 -0
  19. fancybox/fancy_title_over.png +0 -0
  20. fancybox/fancy_title_right.png +0 -0
  21. fancybox/fancybox-x.png +0 -0
  22. fancybox/fancybox-y.png +0 -0
  23. fancybox/fancybox.png +0 -0
  24. fancybox/jquery.fancybox-1.3.7.min.css +0 -1
  25. fancybox/jquery.fancybox-1.3.7.min.js +0 -43
  26. fancybox/{jquery.fancybox-1.3.7.css → jquery.fancybox-1.3.8.css} +36 -101
  27. fancybox/{jquery.fancybox-1.3.7.js → jquery.fancybox-1.3.8.js} +42 -36
  28. fancybox/jquery.fancybox-1.3.8.min.css +1 -0
  29. fancybox/jquery.fancybox-1.3.8.min.js +2 -0
  30. light-mask.png → images/light-mask.png +0 -0
  31. inc/class-easyfancybox-admin.php +327 -0
  32. easy-fancybox-settings.php → inc/class-easyfancybox-options.php +134 -120
  33. inc/class-easyfancybox.php +437 -0
  34. inc/translation-strings.php +9 -0
  35. jquery.easing.pack.js +0 -14
  36. jquery.metadata.js +0 -148
  37. jquery.metadata.pack.js +0 -21
  38. jquery.mousewheel.pack.js +0 -8
  39. jquery.easing.js → js/jquery.easing.js +12 -74
  40. js/jquery.easing.min.js +14 -0
  41. js/jquery.metadata.js +117 -0
  42. js/jquery.metadata.min.js +1 -0
  43. jquery.mousewheel.js → js/jquery.mousewheel.js +0 -0
  44. jquery.mousewheel.min.js → js/jquery.mousewheel.min.js +0 -0
  45. languages/easy-fancybox-bel.mo +0 -0
  46. languages/easy-fancybox-bel.po +687 -0
  47. languages/easy-fancybox-cs_CZ.mo +0 -0
  48. languages/easy-fancybox-cs_CZ.po +0 -0
  49. languages/easy-fancybox-es_ES.mo +0 -0
  50. languages/easy-fancybox-es_ES.po +0 -0
  51. languages/easy-fancybox-fa_IR.mo +0 -0
  52. languages/easy-fancybox-fa_IR.po +0 -0
  53. languages/easy-fancybox-fr_FR.mo +0 -0
  54. languages/easy-fancybox-fr_FR.po +0 -0
  55. languages/easy-fancybox-hi_IN.mo +0 -0
  56. languages/easy-fancybox-hi_IN.po +0 -0
  57. languages/easy-fancybox-hr.mo +0 -0
  58. languages/easy-fancybox-hr.po +414 -384
  59. languages/easy-fancybox-id_ID.mo +0 -0
  60. languages/easy-fancybox-id_ID.po +0 -0
  61. languages/easy-fancybox-lt_LT.mo +0 -0
  62. languages/easy-fancybox-lt_LT.po +0 -0
  63. languages/easy-fancybox-nl.po +680 -0
  64. languages/easy-fancybox-nl_NL.mo +0 -0
  65. languages/easy-fancybox-nl_NL.po +694 -583
  66. languages/easy-fancybox-pl_PL.mo +0 -0
  67. languages/easy-fancybox-pl_PL.po +0 -0
  68. languages/easy-fancybox-readme-bel.mo +0 -0
  69. languages/easy-fancybox-readme-bel.po +1361 -0
  70. languages/{easy-fancybox.ro_RO.mo → easy-fancybox-ro_RO.mo} +0 -0
  71. languages/easy-fancybox-ro_RO.po +0 -0
  72. languages/easy-fancybox-ru_RU.mo +0 -0
  73. languages/easy-fancybox-ru_RU.po +561 -0
  74. languages/easy-fancybox-sr_RS.mo +0 -0
  75. languages/easy-fancybox-sr_RS.po +0 -0
  76. languages/easy-fancybox-tr_TR.mo +0 -0
  77. languages/easy-fancybox-tr_TR.po +0 -0
  78. languages/easy-fancybox-ua_UA.mo +0 -0
  79. languages/easy-fancybox-ua_UA.po +0 -0
  80. languages/easy-fancybox-xx_XX.mo +0 -0
  81. languages/easy-fancybox-xx_XX.po +605 -580
  82. languages/easy-fancybox.mo +0 -0
  83. languages/easy-fancybox.pot +605 -580
  84. languages/instructions.txt +0 -0
  85. readme.txt +6 -3
  86. screenshot-1.png +0 -0
  87. screenshot-2.png +0 -0
easy-fancybox-admin.php DELETED
File without changes
easy-fancybox-class.php DELETED
@@ -1,659 +0,0 @@
1
- <?php
2
- /**
3
- * Easy FancyBox Class
4
- */
5
- class easyFancyBox {
6
-
7
- public static $pagehook;
8
-
9
- public static $add_scripts = false;
10
-
11
- public static $options = array();
12
-
13
-
14
- /**********************
15
- MAIN SCRIPT OUTPUT
16
- **********************/
17
-
18
- public static function main_script() {
19
-
20
- echo '
21
- <!-- Easy FancyBox ' . EASY_FANCYBOX_VERSION . ' using FancyBox ' . FANCYBOX_VERSION . ' - RavanH (http://status301.net/wordpress-plugins/easy-fancybox/) -->';
22
-
23
- // check for any enabled sections
24
- //if(!empty(self::$options['Global']['options']['Enable']['options']))
25
- foreach (self::$options['Global']['options']['Enable']['options'] as $value) {
26
- // anything enabled?
27
- if ( isset($value['id']) && '1' == get_option($value['id'],$value['default']) ) {
28
- self::$add_scripts = true;
29
- break;
30
- }
31
- }
32
- // and abort when none are active
33
- if (!self::$add_scripts) {
34
- echo '
35
- <!-- Nothing enabled under Settings > Media > FancyBox. -->
36
-
37
- ';
38
- return;
39
- }
40
-
41
- // begin output FancyBox settings
42
- echo '
43
- <script type="text/javascript">
44
- /* <![CDATA[ */
45
- var fb_timeout = null;';
46
-
47
- /*
48
- * Global settings routine
49
- */
50
- $more=0;
51
- echo '
52
- var fb_opts = {';
53
- foreach (self::$options['Global']['options'] as $globals) {
54
- foreach ($globals['options'] as $_key => $_value) {
55
- if ( isset($_value['id']) )
56
- if ( isset($_value['default']) )
57
- $parm = get_option($_value['id'], $_value['default']);
58
- else
59
- $parm = get_option($_value['id']);
60
- elseif ( isset($_value['default']) )
61
- $parm = $_value['default'];
62
- else
63
- $parm = '';
64
-
65
- if ( isset($_value['input']) && 'checkbox'==$_value['input'] )
66
- $parm = ( '1' == $parm ) ? 'true' : 'false';
67
-
68
- if( !isset($_value['hide']) && $parm!='' ) {
69
- $quote = (is_numeric($parm) || (isset($_value['noquotes']) && $_value['noquotes'] == true) ) ? '' : '\'';
70
- if ($more>0)
71
- echo ',';
72
- echo ' \''.$_key.'\' : ';
73
- echo $quote.$parm.$quote;
74
- $more++;
75
- } else {
76
- $$_key = $parm;
77
- }
78
- }
79
- }
80
- echo ' };
81
- var easy_fancybox_handler = function(){';
82
-
83
- foreach (self::$options as $key => $value) {
84
- // check if not enabled or hide=true then skip
85
- if ( isset($value['hide']) || !get_option(self::$options['Global']['options']['Enable']['options'][$key]['id'], self::$options['Global']['options']['Enable']['options'][$key]['default']) )
86
- continue;
87
-
88
- echo '
89
- /* ' . $key . ' */';
90
- /*
91
- * Auto-detection routines (2x)
92
- */
93
- $autoAttribute = (isset($value['options']['autoAttribute'])) ? get_option( $value['options']['autoAttribute']['id'], $value['options']['autoAttribute']['default'] ) : "";
94
- // update from previous version:
95
- if($attributeLimit == '.not(\':empty\')')
96
- $attributeLimit = ':not(:empty)';
97
- elseif($attributeLimit == '.has(\'img\')')
98
- $attributeLimit = ':has(img)';
99
-
100
- if(!empty($autoAttribute)) {
101
- if(is_numeric($autoAttribute)) {
102
- echo '
103
- jQuery(\'a['.$value['options']['autoAttribute']['selector'].']:not(.nofancybox)'.$attributeLimit.', area['.$value['options']['autoAttribute']['selector'].']:not(.nofancybox)'.$attributeLimit.'\')';
104
- //if ( isset($value['options']['autoAttribute']['href-replace']) )
105
- // echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttribute']['href-replace'].'})';
106
- echo '.addClass(\''.$value['options']['class']['default'].'\');';
107
- } else {
108
- // set selectors
109
- $file_types = array_filter( explode( ' ', str_replace( ',', ' ', $autoAttribute ) ) );
110
- $more=0;
111
- echo '
112
- var fb_'.$key.'_select = \'';
113
- foreach ($file_types as $type) {
114
- if ($type == "jpg" || $type == "jpeg" || $type == "png" || $type == "gif")
115
- $type = '.'.$type;
116
- if ($more>0)
117
- echo ', ';
118
- echo 'a['.$value['options']['autoAttribute']['selector'].'"'.$type.'"]:not(.nofancybox,.pin-it-button)'.$attributeLimit.', area['.$value['options']['autoAttribute']['selector'].'"'.$type.'"]:not(.nofancybox)'.$attributeLimit;
119
- $more++;
120
- }
121
- echo '\';';
122
-
123
- // class and rel depending on settings
124
- if( '1' == get_option($value['options']['autoAttributeLimit']['id'],$value['options']['autoAttributeLimit']['default']) ) {
125
- // add class
126
- echo '
127
- var fb_'.$key.'_sections = jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
128
- fb_'.$key.'_sections.each(function() { jQuery(this).find(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
129
- // and set rel
130
- switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
131
- case '':
132
- default :
133
- echo '; });';
134
- break;
135
- case '1':
136
- echo '.attr(\'rel\', \'gallery-\' + fb_'.$key.'_sections.index(this)); });';
137
- break;
138
- case '2':
139
- echo '.attr(\'rel\', \'gallery\'); });';
140
- }
141
- } else {
142
- // add class
143
- echo '
144
- jQuery(fb_'.$key.'_select).addClass(\''.$value['options']['class']['default'].'\')';
145
- // set rel
146
- switch( get_option($value['options']['autoGallery']['id'],$value['options']['autoGallery']['default']) ) {
147
- case '':
148
- default :
149
- echo ';';
150
- break;
151
- case '1':
152
- echo ';
153
- var fb_'.$key.'_sections = jQuery(\''.get_option($value['options']['autoSelector']['id'],$value['options']['autoSelector']['default']).'\');
154
- fb_'.$key.'_sections.each(function() { jQuery(this).find(fb_'.$key.'_select).attr(\'rel\', \'gallery-\' + fb_'.$key.'_sections.index(this)); });';
155
- break;
156
- case '2':
157
- echo '.attr(\'rel\', \'gallery\');';
158
- }
159
- }
160
-
161
- }
162
- }
163
-
164
- $autoAttributeAlt = ( isset($value['options']['autoAttributeAlt']) ) ? get_option( $value['options']['autoAttributeAlt']['id'], $value['options']['autoAttributeAlt']['default'] ) : "";
165
- if(!empty($autoAttributeAlt) && is_numeric($autoAttributeAlt)) {
166
- echo '
167
- jQuery(\'a['.$value['options']['autoAttributeAlt']['selector'].']:not(.nofancybox)'.$attributeLimit.', area['.$value['options']['autoAttributeAlt']['selector'].']:not(.nofancybox)'.$attributeLimit.'\')';
168
- //if (!empty($value['options']['autoAttributeAlt']['href-replace']))
169
- // echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttributeAlt']['href-replace']. '})';
170
- echo '.addClass(\''.$value['options']['class']['default'].'\');';
171
- }
172
-
173
- /*
174
- * Generate .fancybox() bind
175
- */
176
- $trigger='';
177
- if( $key == $autoClick )
178
- $trigger = '.filter(\':first\').trigger(\'click\')';
179
-
180
- echo '
181
- jQuery(\'' . $value['options']['tag']['default']. '\')';
182
-
183
- // use each() to allow different metadata values per instance; fix by Elron. Thanks!
184
- if ( '1' == get_option(self::$options['Global']['options']['Links']['options']['metaData']['id'],self::$options['Global']['options']['Links']['options']['metaData']['default']) )
185
- echo '.each(function() { jQuery(this)';
186
-
187
- echo '.fancybox( jQuery.extend({}, fb_opts, {';
188
- $more=0;
189
- foreach ($value['options'] as $_key => $_value) {
190
- if (isset($_value['id']) || isset($_value['default']))
191
- $parm = (isset($_value['id']))? get_option($_value['id'], $_value['default']) : $_value['default'];
192
- else
193
- $parm = '';
194
-
195
- if( isset($_value['input']) && 'checkbox'==$_value['input'] )
196
- $parm = ( '1' == $parm ) ? 'true' : 'false';
197
-
198
- if( !isset($_value['hide']) && $parm!='' ) {
199
- $quote = (is_numeric($parm) || (isset($_value['noquotes']) && $_value['noquotes'] == true) ) ? '' : '\'';
200
- if ($more>0)
201
- echo ',';
202
- echo ' \''.$_key.'\' : ';
203
- echo $quote.$parm.$quote;
204
- $more++;
205
- }
206
- }
207
- echo ' }) ';
208
-
209
- // use each() to allow different metadata values per instance; fix by Elron. Thanks!
210
- if ( '1' == get_option(self::$options['Global']['options']['Links']['options']['metaData']['id'],self::$options['Global']['options']['Links']['options']['metaData']['default']) )
211
- echo ');} ';
212
-
213
- echo ')'.$trigger.';';
214
-
215
- }
216
-
217
- switch( $autoClick ) {
218
- case '':
219
- default :
220
- break;
221
- case '1':
222
- echo '
223
- /* Auto-click */
224
- jQuery(\'#fancybox-auto\').trigger(\'click\');';
225
- break;
226
- case '99':
227
- echo '
228
- /* Auto-load */
229
- jQuery(\'a[class*="fancybox"]\').filter(\':first\').trigger(\'click\');';
230
- break;
231
- }
232
- echo '
233
- }
234
- /* ]]> */
235
- </script>
236
- ';
237
-
238
- // customized styles
239
- $styles = '';
240
- if (isset($overlaySpotlight) && 'true' == $overlaySpotlight)
241
- $styles .= '
242
- #fancybox-overlay{background-attachment:fixed;background-image:url("' . EASY_FANCYBOX_PLUGINURL . 'light-mask.png");background-position:center;background-repeat:no-repeat;background-size:cover;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'light-mask.png",sizingMethod="scale");-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' . EASY_FANCYBOX_PLUGINURL . 'light-mask.png\',sizingMethod=\'scale\')";}';
243
- if (isset($borderRadius) && !empty($borderRadius))
244
- $styles .= '
245
- #fancybox-bg-n,#fancybox-bg-ne,#fancybox-bg-e,#fancybox-bg-se,#fancybox-bg-s,#fancybox-bg-sw,#fancybox-bg-w,#fancybox-bg-nw{background-image:none}#fancybox-outer,#fancybox-content{border-radius:'.$borderRadius.'px}#fancybox-outer{-moz-box-shadow:0 0 12px #1111;-webkit-box-shadow:0 0 12px #111;box-shadow:0 0 12px #111}.fancybox-title-inside{padding-top:'.$borderRadius.'px;margin-top:-'.$borderRadius.'px !important;border-radius: 0 0 '.$borderRadius.'px '.$borderRadius.'px}';
246
- if (isset($backgroundColor) && '' != $backgroundColor)
247
- $styles .= '
248
- #fancybox-content{background-color:'.$backgroundColor.'}';
249
- if (isset($paddingColor) && '' != $paddingColor)
250
- $styles .= '
251
- #fancybox-content{border-color:'.$paddingColor.'}#fancybox-outer{background-color:'.$paddingColor.'}'; //.fancybox-title-inside{background-color:'.$paddingColor.';margin-left:0 !important;margin-right:0 !important;width:100% !important;}
252
- if (isset($textColor) && '' != $textColor)
253
- $styles .= '
254
- #fancybox-content{color:'.$textColor.'}';
255
- if (isset($titleColor) && '' != $titleColor)
256
- $styles .= '
257
- #fancybox-title,#fancybox-title-float-main{color:'.$titleColor.'}';
258
-
259
- if ( !empty($styles) ) {
260
- echo '
261
- <style type="text/css">' . $styles . '
262
- </style>
263
- ';
264
- }
265
-
266
- // running our IE alphaimageloader relative path styles here
267
- if (isset($compatIE6) && 'true' == $compatIE6)
268
- echo '
269
- <!--[if lt IE 8]>
270
- <style type="text/css">
271
- .fancybox-ie6 #fancybox-close{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_close.png",sizingMethod="scale")}
272
- .fancybox-ie6 #fancybox-left-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_nav_left.png",sizingMethod="scale")}
273
- .fancybox-ie6 #fancybox-right-ico{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_nav_right.png",sizingMethod="scale")}
274
- .fancybox-ie6 #fancybox-title-over{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_title_over.png",sizingMethod="scale");zoom:1}
275
- .fancybox-ie6 #fancybox-title-float-left{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_title_left.png",sizingMethod="scale")}
276
- .fancybox-ie6 #fancybox-title-float-main{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_title_main.png",sizingMethod="scale")}
277
- .fancybox-ie6 #fancybox-title-float-right{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_title_right.png",sizingMethod="scale")}
278
- .fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame{height:expression(this.parentNode.clientHeight+"px")}
279
- #fancybox-loading.fancybox-ie6{position:absolute;margin-top:0;top:expression((-20+(document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2)+(ignoreMe=document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+"px")}
280
- #fancybox-loading.fancybox-ie6 div{background:transparent;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_loading.png", sizingMethod="scale")}
281
- .fancybox-ie #fancybox-bg-n{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_n.png",sizingMethod="scale")}
282
- .fancybox-ie #fancybox-bg-ne{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_ne.png",sizingMethod="scale")}
283
- .fancybox-ie #fancybox-bg-e{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_e.png",sizingMethod="scale")}
284
- .fancybox-ie #fancybox-bg-se{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_se.png",sizingMethod="scale")}
285
- .fancybox-ie #fancybox-bg-s{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_s.png",sizingMethod="scale")}
286
- .fancybox-ie #fancybox-bg-sw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_sw.png",sizingMethod="scale")}
287
- .fancybox-ie #fancybox-bg-w{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_w.png",sizingMethod="scale")}
288
- .fancybox-ie #fancybox-bg-nw{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_nw.png",sizingMethod="scale")}
289
- </style>
290
- <![endif]-->
291
- ';
292
-
293
- // running our IE alphaimageloader relative path styles here
294
- if (isset($compatIE8) && 'true' == $compatIE8)
295
- echo '
296
- <!--[if IE 8]>
297
- <style type="text/css">
298
- .fancybox-ie #fancybox-bg-n{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_n.png",sizingMethod="scale")\'}
299
- .fancybox-ie #fancybox-bg-ne{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_ne.png",sizingMethod="scale")\'}
300
- .fancybox-ie #fancybox-bg-e{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_e.png",sizingMethod="scale")\'}
301
- .fancybox-ie #fancybox-bg-se{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_se.png",sizingMethod="scale")\'}
302
- .fancybox-ie #fancybox-bg-s{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_s.png",sizingMethod="scale")\'}
303
- .fancybox-ie #fancybox-bg-sw{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_sw.png",sizingMethod="scale")\'}
304
- .fancybox-ie #fancybox-bg-w{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_w.png",sizingMethod="scale")\'}
305
- .fancybox-ie #fancybox-bg-nw{-ms-filter:\'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' . EASY_FANCYBOX_PLUGINURL . 'fancybox/fancy_shadow_nw.png",sizingMethod="scale")\'}
306
- </style>
307
- <![endif]-->
308
- ';
309
- }
310
-
311
-
312
- /***********************
313
- ADMIN FUNCTIONS
314
- ***********************/
315
-
316
- public static function register_settings($args = array()) {
317
- foreach ($args as $key => $value) {
318
- // check to see if the section is enabled, else skip to next
319
- if ( array_key_exists($key, self::$options['Global']['options']['Enable']['options']) && !get_option( self::$options['Global']['options']['Enable']['options'][$key]['id'], self::$options['Global']['options']['Enable']['options'][$key]['default']) )
320
- continue;
321
-
322
- switch($value['input']) {
323
- case 'deep':
324
- // go deeper by looping back on itself
325
- self::register_settings($value['options']);
326
- break;
327
- case 'multiple':
328
- add_settings_field( 'fancybox_'.$key, '<a name="'.$value['title'].'"></a>'.$value['title'], array(__CLASS__, 'settings_fields'), 'media', 'fancybox_section', $value);
329
- foreach ( $value['options'] as $_value ) {
330
- if ( !isset($_value['sanitize_callback']) )
331
- $sanitize_callback = '';
332
- else
333
- $sanitize_callback = array(__CLASS__, $_value['sanitize_callback']);
334
- if ( isset($_value['id']) )
335
- register_setting( 'media', $_value['id'], $sanitize_callback );
336
- }
337
- break;
338
- default:
339
- if ( !isset($value['sanitize_callback']) )
340
- $sanitize_callback = '';
341
- else
342
- $sanitize_callback = array(__CLASS__, $value['sanitize_callback']);
343
- if ( isset($value['id']) )
344
- register_setting( 'media', 'fancybox_'.$key, $sanitize_callback );
345
- }
346
- }
347
- }
348
-
349
- // add our FancyBox Media Settings Section on Settings > Media admin page
350
- public static function settings_section() {
351
- echo '<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number='.EASY_FANCYBOX_VERSION.'&no_shipping=0&tax=0&charset=UTF%2d8&currency_code=EUR" title="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:5px 0 0 10px" alt="'.__('Donate to keep the Easy FancyBox plugin development going!','easy-fancybox').'" width="92" height="26" /></a>'.sprintf(__('The options in this section are provided by the plugin %s and determine the <strong>Media Lightbox</strong> overlay appearance and behaviour controlled by %s.','easy-fancybox'),'<strong><a href="http://status301.net/wordpress-plugins/easy-fancybox/">'.__('Easy FancyBox','easy-fancybox').'</a></strong>','<strong><a href="http://fancybox.net/">'.__('FancyBox','easy-fancybox').'</a></strong>').'</p><p>'.__('First enable each sub-section that you need. Then save and come back to adjust its specific settings.','easy-fancybox').' '.__('Note: Each additional sub-section and features like <em>Auto-detection</em>, <em>Elastic transitions</em> and all <em>Easing effects</em> (except Swing) will have some extra impact on client-side page speed. Enable only those sub-sections and options that you actually need on your site.','easy-fancybox').' '.__('Some setting like Transition options are unavailable for SWF video, PDF and iFrame content to ensure browser compatibility and readability.','easy-fancybox').'</p>';
352
- }
353
-
354
- // add our FancyBox Media Settings Fields
355
- public static function settings_fields($args){
356
- $disabled = (isset($args['status']) && 'disabled' == $args['status']) ? ' disabled="disabled"' : '';
357
- if (isset($args['input']))
358
- switch($args['input']) {
359
- case 'multiple':
360
- case 'deep':
361
- foreach ($args['options'] as $options)
362
- self::settings_fields($options);
363
- if (isset($args['description'])) echo $args['description'];
364
- break;
365
- case 'select':
366
- if( !empty($args['label_for']) )
367
- echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
368
- else
369
- echo $args['title'];
370
- echo '
371
- <select name="'.$args['id'].'" id="'.$args['id'].'">';
372
- foreach ($args['options'] as $optionkey => $optionvalue) {
373
- $selected = (get_option($args['id'], $args['default']) == $optionkey) ? ' selected="selected"' : '';
374
- echo '
375
- <option value="'.esc_attr($optionkey).'"'.$selected.' '.$disabled.' >'.$optionvalue.'</option>';
376
- }
377
- echo '
378
- </select> ';
379
- if( empty($args['label_for']) )
380
- echo '<label for="'.$args['id'].'">'.$args['description'].'</label> ';
381
- else
382
- if (isset($args['description'])) echo $args['description'];
383
- break;
384
- case 'checkbox':
385
- if( !empty($args['label_for']) )
386
- echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
387
- else
388
- if (isset($args['title'])) echo $args['title'];
389
- $value = esc_attr( get_option($args['id'], $args['default']) );
390
- if ($value == "1")
391
- $checked = ' checked="checked"';
392
- else
393
- $checked = '';
394
- if ($args['default'] == "1")
395
- $default = __('Checked','easy-fancybox');
396
- else
397
- $default = __('Unchecked','easy-fancybox');
398
- if( empty($args['label_for']) )
399
- echo '
400
- <label><input type="checkbox" name="'.$args['id'].'" id="'.$args['id'].'" value="1" '.$checked.' '.$disabled.' /> '.$args['description'].'</label><br />';
401
- else
402
- echo '
403
- <input type="checkbox" name="'.$args['id'].'" id="'.$args['id'].'" value="1" '.$checked.' '.$disabled.' /> '.$args['description'].'<br />';
404
- break;
405
- case 'text':
406
- if( !empty($args['label_for']) )
407
- echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
408
- else
409
- echo $args['title'];
410
- echo '
411
- <input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="'.$args['class'].'"'.$disabled.' /> ';
412
- if( empty($args['label_for']) )
413
- echo '<label for="'.$args['id'].'">'.$args['description'].'</label> ';
414
- else
415
- if (isset($args['description'])) echo $args['description'];
416
- break;
417
- case 'number':
418
- if( !empty($args['label_for']) )
419
- echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
420
- else
421
- echo $args['title'];
422
- echo '
423
- <input type="number" step="'.$args['step'].'" min="'.$args['min'].'" max="'.$args['max'].'" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="'.$args['class'].'"'.$disabled.' /> ';
424
- if( empty($args['label_for']) )
425
- echo '<label for="'.$args['id'].'">'.$args['description'].'</label> ';
426
- else
427
- if (isset($args['description'])) echo $args['description'];
428
- break;
429
- case 'hidden':
430
- echo '
431
- <input type="hidden" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" /> ';
432
- break;
433
- default:
434
- if (isset($args['description'])) echo $args['description'];
435
- }
436
- else
437
- if (isset($args['description'])) echo $args['description'];
438
- }
439
-
440
- /**
441
- * Adds an action link to the Plugins page
442
- */
443
- public static function add_action_link( $links ) {
444
- $settings_link = '<a href="' . admin_url('options-media.php') . '">' . translate('Settings') . '</a>';
445
- array_unshift( $links, $settings_link );
446
- return $links;
447
- }
448
-
449
- public static function intval($setting = '') {
450
- if ($setting == '')
451
- return '';
452
-
453
- if (substr($setting, -1) == '%') {
454
- $val = intval(substr($setting, 0, -1));
455
- $prc = '%';
456
- } else {
457
- $val = intval($setting);
458
- $prc = '';
459
- }
460
-
461
- return ( $val != 0 ) ? $val.$prc : 0;
462
- }
463
-
464
-
465
- /***********************
466
- ACTIONS & FILTERS
467
- ***********************/
468
-
469
- public static function register_scripts() {
470
-
471
- if ( is_admin() ) return;
472
-
473
- // ENQUEUE
474
- // first get rid of previously registered variants of jquery.fancybox by other plugins or theme
475
- wp_deregister_script('fancybox');
476
- wp_deregister_script('jquery.fancybox');
477
- wp_deregister_script('jquery_fancybox');
478
- wp_deregister_script('jquery-fancybox');
479
- // register main fancybox script
480
- if ( defined('WP_DEBUG') && true == WP_DEBUG )
481
- wp_register_script('jquery-fancybox', EASY_FANCYBOX_PLUGINURL.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.js', array('jquery'), EASY_FANCYBOX_VERSION, true);
482
- else
483
- wp_register_script('jquery-fancybox', EASY_FANCYBOX_PLUGINURL.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.min.js', array('jquery'), EASY_FANCYBOX_VERSION, true);
484
-
485
- // easing in IMG settings?
486
- if ( ( '' == get_option( self::$options['IMG']['options']['easingIn']['id'], self::$options['IMG']['options']['easingIn']['default']) || 'linear' == get_option( self::$options['IMG']['options']['easingIn']['id'], self::$options['IMG']['options']['easingIn']['default']) ) && ( '' == get_option( self::$options['IMG']['options']['easingOut']['id'], self::$options['IMG']['options']['easingOut']['default']) || 'linear' == get_option( self::$options['IMG']['options']['easingOut']['id'], self::$options['IMG']['options']['easingOut']['default']) ) ) {
487
- // do nothing
488
- } else {
489
- if ( 'elastic' == get_option( self::$options['IMG']['options']['transitionIn']['id'], self::$options['IMG']['options']['transitionIn']['default']) || 'elastic' == get_option( self::$options['IMG']['options']['transitionOut']['id'], self::$options['IMG']['options']['transitionOut']['default']) ) {
490
- wp_deregister_script('jquery-easing');
491
- wp_register_script('jquery-easing', EASY_FANCYBOX_PLUGINURL.'jquery.easing.pack.js', array('jquery'), EASING_VERSION, true);
492
- }
493
- }
494
-
495
- // mousewheel in IMG settings?
496
- if ( '1' == get_option( self::$options['IMG']['options']['mouseWheel']['id'], self::$options['IMG']['options']['mouseWheel']['default']) ) {
497
- wp_deregister_script('jquery-mousewheel');
498
- wp_register_script('jquery-mousewheel', EASY_FANCYBOX_PLUGINURL.'jquery.mousewheel.min.js', array('jquery'), MOUSEWHEEL_VERSION, true);
499
- }
500
-
501
- // metadata in Link settings?
502
- if ('1' == get_option( self::$options['Global']['options']['Links']['options']['metaData']['id'], self::$options['Global']['options']['Links']['options']['metaData']['default']) ) {
503
- wp_deregister_script('jquery-metadata');
504
- wp_register_script('jquery-metadata',EASY_FANCYBOX_PLUGINURL.'jquery.metadata.pack.js', array('jquery'), METADATA_VERSION, true);
505
- }
506
- }
507
-
508
- public static function enqueue_styles() {
509
- // register style
510
- wp_dequeue_style('fancybox');
511
- if ( defined('WP_DEBUG') && true == WP_DEBUG )
512
- wp_enqueue_style('fancybox', EASY_FANCYBOX_PLUGINURL.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.css', false, EASY_FANCYBOX_VERSION, 'screen');
513
- else
514
- wp_enqueue_style('fancybox', EASY_FANCYBOX_PLUGINURL.'fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.min.css', false, EASY_FANCYBOX_VERSION, 'screen');
515
- }
516
-
517
- public static function enqueue_footer_scripts() {
518
- if (!self::$add_scripts)
519
- return;
520
-
521
- wp_enqueue_script('jquery-fancybox');
522
- wp_enqueue_script('jquery-easing');
523
- wp_enqueue_script('jquery-mousewheel');
524
- wp_enqueue_script('jquery-metadata');
525
- }
526
-
527
- public static function on_ready() {
528
- if (!self::$add_scripts) // abort mission, there is no need for any script files
529
- return;
530
-
531
- // 'gform_post_render' for gForms content triggers an error... Why?
532
- // 'post-load' is for Infinite Scroll by JetPack
533
- echo '
534
- <script type="text/javascript">
535
- jQuery(document).on(\'ready post-load\', easy_fancybox_handler );
536
- </script>
537
- ';
538
- }
539
-
540
- public static function admin_init(){
541
-
542
- add_filter('plugin_action_links_' . EASY_FANCYBOX_PLUGINBASENAME, array(__CLASS__, 'add_action_link') );
543
-
544
- // in preparation of dedicated admin page move:
545
- //add_action('admin_menu', array(__CLASS__, 'add_menu'));
546
-
547
- add_settings_section('fancybox_section', __('FancyBox','easy-fancybox'), array(__CLASS__, 'settings_section'), 'media');
548
-
549
- self::register_settings( self::$options );
550
-
551
- // TODO : fix?? media_upload_max_image_resize() does not exist anymore...
552
- //add_action( 'pre-upload-ui', 'media_upload_max_image_resize' );
553
- }
554
-
555
- // Hack to fix missing wmode in Youtube oEmbed code based on David C's code in the comments on
556
- // http://www.mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html
557
- public static function add_video_wmode_opaque($html, $url, $attr) {
558
- if (strpos($html, "<embed src=" ) !== false) {
559
- $html = str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque"', $html);
560
- } elseif (strpos($html, 'youtube' ) !== false && strpos($html, 'wmode' ) == false ) {
561
- $html = str_replace('feature=oembed', 'feature=oembed&wmode=opaque', $html);
562
- } elseif ( strpos($html, "vimeo" ) !== false && strpos($html, 'wmode' ) == false ) {
563
- $html = str_replace('" width', '?theme=none&wmode=opaque" width', $html);
564
- } elseif ( strpos($html, "dailymotion" ) !== false && strpos($html, 'wmode' ) == false ) {
565
- $html = str_replace('" width', '?wmode=opaque" width', $html);
566
- }
567
- return $html;
568
- }
569
-
570
- public static function init() {
571
- require_once(EASY_FANCYBOX_PLUGINDIR . 'easy-fancybox-settings.php');
572
-
573
- add_filter('embed_oembed_html', array(__CLASS__, 'add_video_wmode_opaque'), 10, 3);
574
- }
575
-
576
- public static function textdomain() {
577
- if ( is_admin() ) {
578
- load_plugin_textdomain('easy-fancybox', false, dirname( EASY_FANCYBOX_PLUGINBASENAME ) . '/languages/');
579
- }
580
- }
581
- /**********************
582
- ADMIN
583
- **********************/
584
-
585
- public static function add_menu() {
586
- /* Register our plugin page */
587
- self::$pagehook = add_submenu_page( 'themes.php', __('Easy FancyBox Settings', 'easy-fancybox'), __('FancyBox', 'easy-fancybox'), 'manage_options', 'easy-fancybox', array(__CLASS__, 'admin') );
588
- /* Using registered $page handle to hook script load */
589
- add_action('load-' . self::$pagehook, array(__CLASS__, 'admin_scripts'));
590
- }
591
-
592
- public static function admin() {
593
-
594
- add_filter( 'get_user_option_closedpostboxes_'.self::$pagehook, array(__CLASS__, 'closed_meta_boxes') );
595
-
596
- add_meta_box('submitdiv', __('Sections','easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_submit'), self::$pagehook, 'side', 'high');
597
- add_meta_box('globaldiv', __('Global settings', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_global'), self::$pagehook, 'normal', 'high');
598
- add_meta_box('imgdiv', __('Images', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_img'), self::$pagehook, 'normal', 'normal');
599
- add_meta_box('inlinediv', __('Inline content', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_inline'), self::$pagehook, 'normal', 'normal');
600
- add_meta_box('pdfdiv', __('PDF', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_pdf'), self::$pagehook, 'normal', 'normal');
601
- add_meta_box('swfdiv', __('SWF', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_swf'), self::$pagehook, 'normal', 'normal');
602
- add_meta_box('youtubediv', __('YouTube', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_youtube'), self::$pagehook, 'normal', 'normal');
603
- add_meta_box('vimeodiv', __('Vimeo', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_vimeo'), self::$pagehook, 'normal', 'normal');
604
- add_meta_box('dailymotiondiv', __('Dailymotion', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_dailymotion'), self::$pagehook, 'normal', 'normal');
605
- add_meta_box('iframediv', __('iFrames', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_iframe'), self::$pagehook, 'normal', 'normal');
606
-
607
- //load admin page
608
- include(EASY_FANCYBOX_PLUGINDIR . '/easy-fancybox-admin.php');
609
- }
610
-
611
- public function closed_meta_boxes( $closed ) {
612
-
613
- if ( false === $closed )
614
- // set default closed metaboxes
615
- $closed = array( 'advanceddiv', 'supportdiv', 'creditsdiv', 'resourcesdiv' );
616
- else
617
- // remove closed setting of some metaboxes
618
- $closed = array_diff ( $closed , array ( 'submitdiv' ) );
619
-
620
- return $closed;
621
- }
622
-
623
- public static function admin_scripts($hook) {
624
-
625
- // needed javascripts to allow drag/drop, expand/collapse and hide/show of boxes
626
- wp_enqueue_script('common');
627
- wp_enqueue_script('wp-list');
628
- wp_enqueue_script('postbox');
629
-
630
- //add several metaboxes now, all metaboxes registered during load page can be switched off/on at "Screen Options" automatically, nothing special to do therefore
631
- //add_meta_box('advanceddiv', __('Advanced Options', 'easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_advanced'), self::$pagehook, 'normal', 'core');
632
-
633
- add_meta_box('supportdiv', __('Support','easy-fancybox'), array(__CLASS__.'_Admin', 'meta_box_support'), self::$pagehook, 'side', 'core');
634
- add_meta_box('resourcesdiv', __('Resources','skype-online-status'), array(__CLASS__.'_Admin', 'meta_box_resources'), self::$pagehook, 'side', 'low');
635
- add_meta_box('discussiondiv', translate('Discussion'), array(__CLASS__.'_Admin', 'meta_box_discussion'), self::$pagehook, 'normal', 'low');
636
- add_meta_box('creditsdiv', __('Credits','skype-online-status'), array(__CLASS__.'_Admin', 'meta_box_credits'), self::$pagehook, 'side', 'default');
637
-
638
- }
639
-
640
- /**********************
641
- RUN
642
- **********************/
643
-
644
- static function run() {
645
-
646
- // HOOKS //
647
- add_action('plugins_loaded', array(__CLASS__, 'textdomain'));
648
-
649
- add_action('admin_init', array(__CLASS__, 'admin_init'));
650
-
651
- add_action('init', array(__CLASS__, 'init'));
652
- add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_styles'), 999);
653
- add_action('wp_head', array(__CLASS__, 'main_script'), 999);
654
- add_action('wp_print_scripts', array(__CLASS__, 'register_scripts'), 999);
655
- add_action('wp_footer', array(__CLASS__, 'enqueue_footer_scripts'));
656
- add_action('wp_footer', array(__CLASS__, 'on_ready'), 999);
657
- }
658
-
659
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
easy-fancybox.php CHANGED
@@ -1,65 +1,54 @@
1
- <?php
2
- /*
3
- Plugin Name: Easy FancyBox
4
- Plugin URI: http://status301.net/wordpress-plugins/easy-fancybox/
5
- Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
6
- Text Domain: easy-fancybox
7
- Domain Path: languages
8
- Version: 1.5.7
9
- Author: RavanH
10
- Author URI: http://status301.net/
11
- */
12
-
13
- /* Copyright 2013 RavanH (email : ravanhagen@gmail.com)
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
- */
29
-
30
- /*
31
- For Installation instructions, usage, revision history and other info: see readme.txt included in this package
32
- */
33
-
34
-
35
- /**************
36
- * CONSTANTS
37
- **************/
38
-
39
- define( 'EASY_FANCYBOX_VERSION', '1.5.7' );
40
- define( 'FANCYBOX_VERSION', '1.3.7' );
41
- define( 'MOUSEWHEEL_VERSION', '3.1.12' );
42
- define( 'EASING_VERSION', '1.3' );
43
- define( 'METADATA_VERSION', '2.1' );
44
- define( 'EASY_FANCYBOX_PLUGINBASENAME', plugin_basename(__FILE__) );
45
- define( 'EASY_FANCYBOX_PLUGINFILE', basename(__FILE__) );
46
-
47
- // Check if easy-fancybox.php is moved one dir up like in WPMU's /mu-plugins/
48
- // or if plugins_url() returns the main plugins dir location as it does on
49
- // a Debian repository install.
50
- // NOTE: WP_PLUGIN_URL causes problems when installed in /mu-plugins/
51
- if( !stristr( plugins_url( '', __FILE__ ), '/easy-fancybox' ) )
52
- define( 'EASY_FANCYBOX_SUBDIR', 'easy-fancybox/' );
53
- else
54
- define( 'EASY_FANCYBOX_SUBDIR', '' );
55
-
56
- define( 'EASY_FANCYBOX_PLUGINDIR', dirname(__FILE__) . '/' . EASY_FANCYBOX_SUBDIR );
57
- define( 'EASY_FANCYBOX_PLUGINURL', plugins_url( '/' . EASY_FANCYBOX_SUBDIR, __FILE__ ) );
58
-
59
-
60
- /**************
61
- * CLASS
62
- **************/
63
- require_once(EASY_FANCYBOX_PLUGINDIR . 'easy-fancybox-class.php');
64
-
65
- easyFancyBox::run();
1
+ <?php
2
+ /*
3
+ Plugin Name: Easy FancyBox
4
+ Plugin URI: http://status301.net/wordpress-plugins/easy-fancybox/
5
+ Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, PDF, YouTube, Dailymotion and Vimeo links. Also supports iFrame and inline content.
6
+ Text Domain: easy-fancybox
7
+ Domain Path: languages
8
+ Version: 1.5.8
9
+ Author: RavanH
10
+ Author URI: http://status301.net/
11
+ */
12
+
13
+ /* Copyright 2016 RavanH (email : ravanhagen@gmail.com)
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
+ */
29
+
30
+ /*
31
+ For Installation instructions, usage, revision history and other info: see readme.txt included in this package
32
+ */
33
+
34
+ if ( ! defined( 'ABSPATH' ) ) exit;
35
+
36
+ /**************
37
+ * CONSTANTS
38
+ **************/
39
+
40
+ define( 'EASY_FANCYBOX_VERSION', '1.5.8' );
41
+ define( 'FANCYBOX_VERSION', '1.3.8' );
42
+ define( 'MOUSEWHEEL_VERSION', '3.1.12' );
43
+ define( 'EASING_VERSION', '1.3.2' );
44
+ define( 'METADATA_VERSION', '2.22.1' );
45
+ if( !defined( __DIR__ ) )
46
+ define( __DIR__, dirname(__FILE__) );
47
+
48
+ /**************
49
+ * CLASS
50
+ **************/
51
+
52
+ require_once __DIR__ . '/inc/class-easyfancybox.php';
53
+
54
+ $efb = new easyFancyBox( __FILE__ );
 
 
 
 
 
 
 
 
 
 
 
fancybox/blank.gif CHANGED
File without changes
fancybox/fancy_close.png CHANGED
File without changes
fancybox/fancy_loading.png CHANGED
File without changes
fancybox/fancy_nav_left.png CHANGED
File without changes
fancybox/fancy_nav_right.png CHANGED
File without changes
fancybox/fancy_shadow_e.png CHANGED
File without changes
fancybox/fancy_shadow_n.png CHANGED
File without changes
fancybox/fancy_shadow_ne.png CHANGED
File without changes
fancybox/fancy_shadow_nw.png CHANGED
File without changes
fancybox/fancy_shadow_s.png CHANGED
File without changes
fancybox/fancy_shadow_se.png CHANGED
File without changes
fancybox/fancy_shadow_sw.png CHANGED
File without changes
fancybox/fancy_shadow_w.png CHANGED
File without changes
fancybox/fancy_title_left.png CHANGED
File without changes
fancybox/fancy_title_main.png CHANGED
File without changes
fancybox/fancy_title_over.png CHANGED
File without changes
fancybox/fancy_title_right.png CHANGED
File without changes
fancybox/fancybox-x.png CHANGED
File without changes
fancybox/fancybox-y.png CHANGED
File without changes
fancybox/fancybox.png CHANGED
File without changes
fancybox/jquery.fancybox-1.3.7.min.css DELETED
@@ -1 +0,0 @@
1
- #fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:11104;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading div{position:absolute;top:0;left:0;width:40px;height:480px;background-image:url(fancybox.png);box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-overlay{position:absolute;top:0;left:0;width:100%;z-index:11100;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{position:absolute;top:0;left:0;padding:20px;z-index:11101;outline:0;display:none;box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-wrap div{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-outer{position:relative;width:100%;height:100%;background:#fff}#fancybox-content{width:0;height:0;padding:0;outline:0;position:relative;overflow:hidden;z-index:11102;border:0 solid #fff;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:11101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:11103;display:none}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{width:100%;height:100%;padding:0;margin:0;border:none;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{width:100%;height:100%;border:none;display:block;-webkit-overflow-scrolling:touch;z-index:0}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:0;background:url(blank.gif);z-index:11102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:11102;display:block}#fancybox-left-ico{background-image:url(fancybox.png);background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-image:url(fancybox.png);background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}.fancybox-bg{position:absolute;padding:0;margin:0;border:0;width:20px;height:20px;z-index:11001}#fancybox-bg-n{top:-20px;left:0;width:100%;background-image:url(fancybox-x.png)}#fancybox-bg-ne{top:-20px;right:-20px;background-image:url(fancybox.png);background-position:-40px -162px}#fancybox-bg-e{top:0;right:-20px;height:100%;background-image:url(fancybox-y.png);background-position:-20px 0}#fancybox-bg-se{bottom:-20px;right:-20px;background-image:url(fancybox.png);background-position:-40px -182px}#fancybox-bg-s{bottom:-20px;left:0;width:100%;background-image:url(fancybox-x.png);background-position:0 -20px}#fancybox-bg-sw{bottom:-20px;left:-20px;background-image:url(fancybox.png);background-position:-40px -142px}#fancybox-bg-w{top:0;left:-20px;height:100%;background-image:url(fancybox-y.png)}#fancybox-bg-nw{top:-20px;left:-20px;background-image:url(fancybox.png);background-position:-40px -122px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:11102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background-image:url(fancy_title_over.png);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#FFF;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}.fancybox-ie .fancybox-bg{background:0 0!important}
 
fancybox/jquery.fancybox-1.3.7.min.js DELETED
@@ -1,43 +0,0 @@
1
- !function(t){var e,i,n,a,o,d,c,r,s,h,l,f,p,g=0,b={},u=[],y=0,w={},m=[],v=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=/[^\.]\.(svg)\s*$/i,j=1,O=0,T="",A=!1,D=t.extend(t("<div/>")[0],{prop:0}),S=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,F=void 0!==document.createTouch,E=function(){i.hide(),x.onerror=x.onload=null,v&&v.abort(),e.empty()},N=function(){return!1===b.onError(u,g,b)?(i.hide(),void(A=!1)):(b.titleShow=!1,b.width="auto",b.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),void P())},B=function(){var n,a,o,c,r,s,h=u[g]
2
- if(E(),b=t.extend({},t.fn.fancybox.defaults,void 0===t(h).data("fancybox")?b:t(h).data("fancybox")),s=b.onStart(u,g,b),s===!1)return void(A=!1)
3
- if("object"==typeof s&&(b=t.extend(b,s)),o=b.title||(h.nodeName?t(h).attr("title"):h.title)||"",h.nodeName&&!b.orig&&(b.orig=t(h).children("img:first").length?t(h).children("img:first"):t(h)),""===o&&b.orig&&(o=b.orig.attr(b.titleFromAlt?"alt":"title")),n=b.href||(h.nodeName?t(h).attr("href"):h.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),b.type?(a=b.type,n||(n=b.content)):b.content?a="html":n&&(a=n.match(I)||t(h).hasClass("image")?"image":n.match(C)?"swf":n.match(k)?"svg":t(h).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void N()
4
- switch("inline"==a&&(h=n.substr(n.indexOf("#")),a=t(h).length>0?"inline":"ajax"),b.type=a,b.href=n,b.title=o,b.autoDimensions&&("html"==b.type||"inline"==b.type||"ajax"==b.type?(b.width="auto",b.height="auto"):b.autoDimensions=!1),b.modal&&(b.overlayShow=!0,b.hideOnOverlayClick=!1,b.hideOnContentClick=!1,b.enableEscapeButton=!1,b.showCloseButton=!1),b.padding=parseInt(b.padding,10),b.margin=parseInt(b.margin,10),e.css("padding",b.padding+b.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(b.content),P()
5
- break
6
- case"inline":if(t(h).parent().is("#fancybox-content")===!0)return void(A=!1)
7
- t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(h)).on("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).on("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(h).appendTo(e),P()
8
- break
9
- case"image":A=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){N()},x.onload=function(){A=!0,x.onerror=x.onload=null,z()},x.src=n
10
- break
11
- case"swf":b.scrolling="no",c='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+b.width+'" height="'+b.height+'"><param name="movie" value="'+n+'"></param>',r="",t.each(b.swf,function(t,e){c+='<param name="'+t+'" value="'+e+'"></param>',r+=" "+t+'="'+e+'"'}),c+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+b.width+'" height="'+b.height+'"'+r+"></embed></object>",e.html(c),P()
12
- break
13
- case"svg":b.scrolling="no",c='<object width="'+b.width+'" height="'+b.height+'" data="'+n+'"></object>',e.html(c),P()
14
- break
15
- case"ajax":A=!1,t.fancybox.showActivity(),b.ajax.win=b.ajax.success,v=t.ajax(t.extend({},b.ajax,{url:n,data:b.ajax.data||{},error:function(t){t.status>0&&N()},success:function(t,a,o){var d="object"==typeof o?o:v
16
- if(200==d.status){if("function"==typeof b.ajax.win){if(s=b.ajax.win(n,t,a,o),s===!1)return void i.hide();("string"==typeof s||"object"==typeof s)&&(t=s)}e.html(t),P()}}}))
17
- break
18
- case"iframe":H()}},P=function(){var i=b.width,n=b.height,a=0==t(window).width()?window.innerWidth:t(window).width(),o=0==t(window).height()?window.innerHeight:t(window).height()
19
- i=(""+i).indexOf("%")>-1?parseInt((a-2*b.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=(""+n).indexOf("%")>-1?parseInt((o-2*b.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==b.scrolling?"auto":"yes"==b.scrolling?"scroll":"hidden")+';position:relative;"></div>'),b.width=e.width(),b.height=e.height(),H()},z=function(){b.width=x.width,b.height=x.height,t("<img />").attr({id:"fancybox-img",src:x.src,alt:b.title}).appendTo(e),H()},H=function(){var o,l
20
- return i.hide(),a.is(":visible")&&!1===w.onCleanup(m,y,w)?(t(".fancybox-inline-tmp").trigger("fancybox-cancel"),void(A=!1)):(A=!0,t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),m=u,y=g,w=b,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||(S&&t("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),p=Q(),M(),a.is(":visible")?(t(c.add(s).add(h)).hide(),o=a.position(),f={top:o.top,left:o.left,width:a.width(),height:a.height()},l=f.width==p.width&&f.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,W)}
21
- t(".fancybox-inline-tmp").trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}),l?i():(D.prop=0,t(D).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:$,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(f=U(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),D.prop=0,void t(D).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:$,complete:W})):("inside"==w.titlePosition&&O>0&&r.show(),d.css({width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,W))))},L=function(t){return t&&t.length?"float"==w.titlePosition?'<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>":!1},M=function(){if(T=w.title||"",O=0,r.empty().removeAttr("style").removeClass(),w.titleShow===!1)return void r.hide()
22
- if(T=t.isFunction(w.titleFormat)?w.titleFormat(T,m,y,w):L(T),!T||""===T)return void r.hide()
23
- switch(r.addClass("fancybox-title-"+w.titlePosition).html(T).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),O=r.outerHeight(!0),r.appendTo(o),p.height+=O
24
- break
25
- case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o)
26
- break
27
- case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a)
28
- break
29
- default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},R=function(){return(w.enableEscapeButton||w.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),w.showNavArrows?((w.cyclic&&m.length>1||0!==y)&&s.show(),void((w.cyclic&&m.length>1||y!=m.length-1)&&h.show())):(s.hide(),void h.hide())},W=function(){t.support.opacity||(d.get(0).style.removeAttribute("filter"),a.get(0).style.removeAttribute("filter")),b.autoDimensions&&d.css("height","auto"),a.css("height","auto"),T&&T.length&&r.show(),w.showCloseButton&&c.show(),R(),w.hideOnContentClick&&d.on("click",t.fancybox.close),w.hideOnOverlayClick&&n.on("click",t.fancybox.close),w.autoResize&&t(window).on("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),t.fn.mousewheel&&a.on("mousewheel.fb",function(e,i){A?e.preventDefault():"image"!=w.type||0!=t(e.target).get(0).clientHeight&&t(e.target).get(0).scrollHeight!==t(e.target).get(0).clientHeight||(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),"iframe"==w.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'"'+(navigator.userAgent.match(/msie [6]/i)?' allowtransparency="true""':"")+' style="border:0;margin:0;overflow:'+("auto"==b.scrolling?"auto":"yes"==b.scrolling?"scroll":"hidden")+'" src="'+w.href+'"'+(!1===b.allowfullscreen?"":" allowfullscreen")+"></iframe>").appendTo(d),a.show(),A=!1,t.fancybox.center(),w.onComplete(m,y,w),K()},K=function(){var e,i
30
- m.length-1>y&&(e=m[y+1].href,void 0!==e&&(e.match(I)||t(obj).hasClass("image"))&&(i=new Image,i.src=e)),y>0&&(e=m[y-1].href,void 0!==e&&(e.match(I)||t(obj).hasClass("image"))&&(i=new Image,i.src=e))},$=function(t){var e={width:parseInt(f.width+(p.width-f.width)*t,10),height:parseInt(f.height+(p.height-f.height)*t,10),top:parseInt(f.top+(p.top-f.top)*t,10),left:parseInt(f.left+(p.left-f.left)*t,10)}
31
- void 0!==p.opacity&&(e.opacity=.5>t?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-O*t-2*w.padding})},q=function(){return[0==t(window).width()?window.innerWidth:t(window).width()-2*w.margin,0==t(window).height()?window.innerHeight:t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},Q=function(){var t,e=q(),i={},n=w.autoScale,a=2*w.padding
32
- return i.width=(""+w.width).indexOf("%")>-1?parseInt(e[0]*parseFloat(w.width)/100,10):w.width+a,i.height=(""+w.height).indexOf("%")>-1?parseInt(e[1]*parseFloat(w.height)/100,10):w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==b.type||"svg"==b.type||"swf"==b.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},X=function(t){var e=t.offset()
33
- return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},U=function(){var e,i,n=b.orig?t(b.orig):!1,a={}
34
- return n&&n.length?(e=X(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=q(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},G=function(){return i.is(":visible")?(t("div",i).css("top",-40*j+"px"),void(j=(j+1)%12)):void clearInterval(l)}
35
- t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){if(e.preventDefault(),!A){A=!0,t(this).blur(),u=[],g=0
36
- var i=t(this).attr("rel")||""
37
- i&&""!=i&&"nofollow"!==i?(u=t('a[rel="'+i+'"], area[rel="'+i+'"]'),g=u.index(this)):u.push(this),B()}}),this):this},t.fancybox=function(e){var i
38
- if(!A){if(A=!0,i=void 0!==arguments[1]?arguments[1]:{},u=[],g=parseInt(i.index,10)||0,t.isArray(e)){for(var n=0,a=e.length;a>n;n++)"object"==typeof e[n]?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i))
39
- u=jQuery.merge(u,e)}else"object"==typeof e?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),u.push(e);(g>u.length||0>g)&&(g=0),B()}},t.fancybox.showActivity=function(){clearInterval(l),i.show(),l=setInterval(G,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(y+1)},t.fancybox.prev=function(){return t.fancybox.pos(y-1)},t.fancybox.pos=function(t){A||(t=parseInt(t),u=m,t>-1&&t<m.length?(g=t,B()):w.cyclic&&m.length>1&&(g=t>=m.length?0:m.length-1,B()))},t.fancybox.cancel=function(){A||(A=!0,t(".fancybox-inline-tmp").trigger("fancybox-cancel"),E(),b.onCancel(u,g,b),A=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t(".fancybox-inline-tmp").trigger("fancybox-cleanup"),d.empty(),w.onClosed(m,y,w),m=b=[],y=g=0,w=b={},A=!1}if(!A&&!a.is(":hidden")){if(A=!0,w&&!1===w.onCleanup(m,y,w))return void(A=!1)
40
- if(E(),t(c.add(s).add(h)).hide(),t(d.add(n)).off(),t(window).off("resize.fb scroll.fb mousewheel.fb"),t(document).off("keydown.fb"),d.find("iframe#fancybox-frame").attr("src",S&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){f=U()
41
- var i=a.position()
42
- p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),D.prop=1,t(D).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:$,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e
43
- A||(e=arguments[0]===!0?1:0,t=q(),(e||!(a.width()>t[0]||a.height()>t[1]))&&a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),a=t('<div id="fancybox-wrap"></div>')),o=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(a),o.append(d=t('<div id="fancybox-content"></div>'),c=t('<a id="fancybox-close"></a>'),r=t('<div id="fancybox-title"></div>'),s=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),h=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),c.click(t.fancybox.close),i.click(t.fancybox.cancel),s.click(function(e){e.preventDefault(),t.fancybox.prev()}),h.click(function(e){e.preventDefault(),t.fancybox.next()}),t.support.opacity||a.addClass("fancybox-ie"),S&&(i.addClass("fancybox-ie6"),a.addClass("fancybox-ie6"),t('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(o)))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,allowfullscreen:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!F,autoResize:!0,ajax:{},swf:{wmode:"transparent"},svg:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},t(document).ready(function(){t.fancybox.init()})}(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/{jquery.fancybox-1.3.7.css → jquery.fancybox-1.3.8.css} RENAMED
@@ -8,13 +8,27 @@
8
  * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
  *
10
  * Version: 1.3.4 (11/11/2010) patched : box-sizing: content-box;
11
- * Requires: jQuery v1.3+
12
  *
13
  * Dual licensed under the MIT and GPL licenses:
14
  * http://www.opensource.org/licenses/mit-license.php
15
  * http://www.gnu.org/licenses/gpl.html
16
  */
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  #fancybox-loading {
19
  position: fixed;
20
  top: 50%;
@@ -25,10 +39,8 @@
25
  margin-left: -20px;
26
  cursor: pointer;
27
  overflow: hidden;
28
- z-index:11104;
29
  display: none;
30
- box-sizing: content-box;
31
- -moz-box-sizing: content-box;
32
  }
33
 
34
  #fancybox-loading div {
@@ -38,8 +50,6 @@
38
  width: 40px;
39
  height: 480px;
40
  background-image: url('fancybox.png');
41
- box-sizing: content-box;
42
- -moz-box-sizing: content-box;
43
  }
44
 
45
  #fancybox-overlay {
@@ -47,10 +57,8 @@
47
  top: 0;
48
  left: 0;
49
  width: 100%;
50
- z-index:11100;
51
  display: none;
52
- box-sizing: content-box;
53
- -moz-box-sizing: content-box;
54
  }
55
 
56
  #fancybox-tmp {
@@ -66,16 +74,9 @@
66
  top: 0;
67
  left: 0;
68
  padding: 20px;
69
- z-index:11101;
70
  outline: none;
71
  display: none;
72
- box-sizing: content-box;
73
- -moz-box-sizing: content-box;
74
- }
75
-
76
- #fancybox-wrap div {
77
- box-sizing: content-box;
78
- -moz-box-sizing: content-box;
79
  }
80
 
81
  #fancybox-outer {
@@ -83,6 +84,9 @@
83
  width: 100%;
84
  height: 100%;
85
  background: #fff;
 
 
 
86
  }
87
 
88
  #fancybox-content {
@@ -92,7 +96,7 @@
92
  outline: none;
93
  position: relative;
94
  overflow: hidden;
95
- z-index:11102;
96
  border: 0px solid #fff;
97
  background: #fff;
98
  -moz-background-clip: padding; /* Firefox 3.6 */
@@ -100,6 +104,11 @@
100
  background-clip: padding-box; /* IE9+, Firefox 4+, Opera, Chrome */
101
  }
102
 
 
 
 
 
 
103
  #fancybox-hide-sel-frame {
104
  position: absolute;
105
  top: 0;
@@ -107,7 +116,7 @@
107
  width: 100%;
108
  height: 100%;
109
  background: transparent;
110
- z-index:11101;
111
  }
112
 
113
  #fancybox-close {
@@ -118,7 +127,7 @@
118
  height: 30px;
119
  background: transparent url('fancybox.png') -40px 0px;
120
  cursor: pointer;
121
- z-index:11103;
122
  display: none;
123
  }
124
 
@@ -148,7 +157,7 @@
148
  border: none;
149
  display: block;
150
  -webkit-overflow-scrolling: touch;
151
- z-index:0; /* z-index bug with -webkit-overflow-scrolling */
152
  }
153
 
154
  #fancybox-left, #fancybox-right {
@@ -158,8 +167,7 @@
158
  width: 35%;
159
  cursor: pointer;
160
  outline: none;
161
- background: transparent url('blank.gif');
162
- z-index:11102;
163
  display: none;
164
  }
165
 
@@ -189,7 +197,7 @@
189
  height: 30px;
190
  margin-top: -15px;
191
  cursor: pointer;
192
- z-index:11102;
193
  display: block;
194
  }
195
 
@@ -235,78 +243,10 @@
235
  left:20px
236
  }
237
 
238
- .fancybox-bg {
239
- position: absolute;
240
- padding: 0;
241
- margin: 0;
242
- border: 0;
243
- width: 20px;
244
- height: 20px;
245
- z-index:11001;
246
- }
247
-
248
- #fancybox-bg-n {
249
- top: -20px;
250
- left: 0;
251
- width: 100%;
252
- background-image: url('fancybox-x.png');
253
- }
254
-
255
- #fancybox-bg-ne {
256
- top: -20px;
257
- right: -20px;
258
- background-image: url('fancybox.png');
259
- background-position: -40px -162px;
260
- }
261
-
262
- #fancybox-bg-e {
263
- top: 0;
264
- right: -20px;
265
- height: 100%;
266
- background-image: url('fancybox-y.png');
267
- background-position: -20px 0px;
268
- }
269
-
270
- #fancybox-bg-se {
271
- bottom: -20px;
272
- right: -20px;
273
- background-image: url('fancybox.png');
274
- background-position: -40px -182px;
275
- }
276
-
277
- #fancybox-bg-s {
278
- bottom: -20px;
279
- left: 0;
280
- width: 100%;
281
- background-image: url('fancybox-x.png');
282
- background-position: 0px -20px;
283
- }
284
-
285
- #fancybox-bg-sw {
286
- bottom: -20px;
287
- left: -20px;
288
- background-image: url('fancybox.png');
289
- background-position: -40px -142px;
290
- }
291
-
292
- #fancybox-bg-w {
293
- top: 0;
294
- left: -20px;
295
- height: 100%;
296
- background-image: url('fancybox-y.png');
297
- }
298
-
299
- #fancybox-bg-nw {
300
- top: -20px;
301
- left: -20px;
302
- background-image: url('fancybox.png');
303
- background-position: -40px -122px;
304
- }
305
-
306
  #fancybox-title {
307
  font-family: Helvetica;
308
  font-size: 12px;
309
- z-index:11102;
310
  }
311
 
312
  .fancybox-title-inside {
@@ -335,7 +275,7 @@
335
 
336
  #fancybox-title-over {
337
  padding: 10px;
338
- background-image: url('fancy_title_over.png');
339
  display: block;
340
  }
341
 
@@ -363,7 +303,7 @@
363
  }
364
 
365
  #fancybox-title-float-main {
366
- color: #FFF;
367
  line-height: 29px;
368
  font-weight: bold;
369
  padding: 0 0 3px 0;
@@ -375,11 +315,6 @@
375
  background: url('fancybox.png') -55px -90px no-repeat;
376
  }
377
 
378
- .fancybox-hidden{
379
  display:none
380
  }
381
-
382
- /* IE */
383
- .fancybox-ie .fancybox-bg{
384
- background: transparent !important
385
- }
8
  * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
  *
10
  * Version: 1.3.4 (11/11/2010) patched : box-sizing: content-box;
 
11
  *
12
  * Dual licensed under the MIT and GPL licenses:
13
  * http://www.opensource.org/licenses/mit-license.php
14
  * http://www.gnu.org/licenses/gpl.html
15
  */
16
 
17
+ #fancybox-loading, #fancybox-loading div,
18
+ #fancybox-overlay,
19
+ #fancybox-wrap, .fancybox-bg,
20
+ #fancybox-outer,
21
+ #fancybox-content,
22
+ #fancybox-content > div,
23
+ #fancybox-content > div > div,
24
+ #fancybox-frame,
25
+ #fancybox-close,
26
+ #fancybox-title, #fancybox-title div,
27
+ #fancybox-left, #fancybox-right, .fancy-ico {
28
+ box-sizing: content-box;
29
+ -moz-box-sizing: content-box;
30
+ }
31
+
32
  #fancybox-loading {
33
  position: fixed;
34
  top: 50%;
39
  margin-left: -20px;
40
  cursor: pointer;
41
  overflow: hidden;
42
+ z-index: 111104;
43
  display: none;
 
 
44
  }
45
 
46
  #fancybox-loading div {
50
  width: 40px;
51
  height: 480px;
52
  background-image: url('fancybox.png');
 
 
53
  }
54
 
55
  #fancybox-overlay {
57
  top: 0;
58
  left: 0;
59
  width: 100%;
60
+ z-index: 111100;
61
  display: none;
 
 
62
  }
63
 
64
  #fancybox-tmp {
74
  top: 0;
75
  left: 0;
76
  padding: 20px;
77
+ z-index: 111101;
78
  outline: none;
79
  display: none;
 
 
 
 
 
 
 
80
  }
81
 
82
  #fancybox-outer {
84
  width: 100%;
85
  height: 100%;
86
  background: #fff;
87
+ box-shadow:0 0 20px #111;
88
+ -moz-box-shadow:0 0 20px #1111;
89
+ -webkit-box-shadow:0 0 20px #111;
90
  }
91
 
92
  #fancybox-content {
96
  outline: none;
97
  position: relative;
98
  overflow: hidden;
99
+ z-index: 111102;
100
  border: 0px solid #fff;
101
  background: #fff;
102
  -moz-background-clip: padding; /* Firefox 3.6 */
104
  background-clip: padding-box; /* IE9+, Firefox 4+, Opera, Chrome */
105
  }
106
 
107
+ #fancybox-content > div {
108
+ max-width: 100%;
109
+ max-height: 100%;
110
+ }
111
+
112
  #fancybox-hide-sel-frame {
113
  position: absolute;
114
  top: 0;
116
  width: 100%;
117
  height: 100%;
118
  background: transparent;
119
+ z-index: 111101;
120
  }
121
 
122
  #fancybox-close {
127
  height: 30px;
128
  background: transparent url('fancybox.png') -40px 0px;
129
  cursor: pointer;
130
+ z-index: 111103;
131
  display: none;
132
  }
133
 
157
  border: none;
158
  display: block;
159
  -webkit-overflow-scrolling: touch;
160
+ z-index: 0; /* z-index bug with -webkit-overflow-scrolling */
161
  }
162
 
163
  #fancybox-left, #fancybox-right {
167
  width: 35%;
168
  cursor: pointer;
169
  outline: none;
170
+ z-index: 111102;
 
171
  display: none;
172
  }
173
 
197
  height: 30px;
198
  margin-top: -15px;
199
  cursor: pointer;
200
+ z-index: 111102;
201
  display: block;
202
  }
203
 
243
  left:20px
244
  }
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  #fancybox-title {
247
  font-family: Helvetica;
248
  font-size: 12px;
249
+ z-index: 111102;
250
  }
251
 
252
  .fancybox-title-inside {
275
 
276
  #fancybox-title-over {
277
  padding: 10px;
278
+ background: rgba(0,0,0,.64);
279
  display: block;
280
  }
281
 
303
  }
304
 
305
  #fancybox-title-float-main {
306
+ color: #fff;
307
  line-height: 29px;
308
  font-weight: bold;
309
  padding: 0 0 3px 0;
315
  background: url('fancybox.png') -55px -90px no-repeat;
316
  }
317
 
318
+ .fancybox-hidden {
319
  display:none
320
  }
 
 
 
 
 
fancybox/{jquery.fancybox-1.3.7.js → jquery.fancybox-1.3.8.js} RENAMED
@@ -18,13 +18,15 @@
18
  * Removed/replaced non-HTML5 attributes
19
  * Added parameter allowfullscreen for iframe, RavanH ravanhagen@gmail.com
20
  * Line 309, 714: patches for better centering on ipad etc.
 
21
  * Line 645: Check type = image for mousewheel
22
- * Line 820: qouted attribute selector, RavanH ravanhagen@gmail.com
23
- * Line 41, 622 and 1125: added isTouch variable and autoResize parameter, RavanH ravanhagen@gmail.com
24
- * Line 34: WebP image support, RavanH ravanhagen@gmail.com
25
- * Line 126, 677, 686: 'image' class forces image type, RavanH ravanhagen@gmail.com
 
26
  * Patched for jQuery 1.9+ compat by Sabel http://sabel.bluegfx.de/wordpress/wp-content/uploads/2013/03/jquery.fancybox-1.3.4.js
27
- *
28
  * Added SVG support by Simon Maillard simon@ogesta.fr
29
  */
30
  ;(function($) {
@@ -39,11 +41,11 @@
39
  titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
40
 
41
  isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
42
-
43
  isTouch = document.createTouch !== undefined,
44
 
45
  /*
46
- * Private methods
47
  */
48
 
49
  _abort = function() {
@@ -77,8 +79,8 @@
77
 
78
  _start = function() {
79
  var obj = selectedArray[ selectedIndex ],
80
- href,
81
- type,
82
  title,
83
  str,
84
  emb,
@@ -100,7 +102,7 @@
100
  title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
101
 
102
  if (obj.nodeName && !selectedOpts.orig) {
103
- selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
104
  }
105
 
106
  if (title === '' && selectedOpts.orig) {
@@ -163,7 +165,7 @@
163
  selectedOpts.width = 'auto';
164
  selectedOpts.height = 'auto';
165
  } else {
166
- selectedOpts.autoDimensions = false;
167
  }
168
  }
169
 
@@ -181,7 +183,7 @@
181
  tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
182
 
183
  $('.fancybox-inline-tmp').off('fancybox-cancel').on('fancybox-change', function() {
184
- $(this).replaceWith(content.children());
185
  });
186
 
187
  switch (type) {
@@ -314,14 +316,14 @@
314
  w = parseInt( (ww - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
315
 
316
  } else {
317
- w = w == 'auto' ? 'auto' : w + 'px';
318
  }
319
 
320
  if (h.toString().indexOf('%') > -1) {
321
  h = parseInt( (wh - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
322
 
323
  } else {
324
- h = h == 'auto' ? 'auto' : h + 'px';
325
  }
326
 
327
  tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
@@ -474,8 +476,8 @@
474
  return;
475
  }
476
 
477
- if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
478
- title.show();
479
  }
480
 
481
  content
@@ -581,15 +583,17 @@
581
  if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
582
  e.preventDefault();
583
  $.fancybox.close();
584
-
585
  } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
586
  e.preventDefault();
587
  $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
 
 
 
588
  }
589
  });
590
  }
591
 
592
- if (!currentOpts.showNavArrows) {
593
  nav_left.hide();
594
  nav_right.hide();
595
  return;
@@ -606,8 +610,8 @@
606
 
607
  _finish = function () {
608
  if (!$.support.opacity) {
609
- content.get(0).style.removeAttribute('filter');
610
- wrap.get(0).style.removeAttribute('filter');
611
  }
612
 
613
  if (selectedOpts.autoDimensions) {
@@ -625,7 +629,7 @@
625
  }
626
 
627
  _set_navigation();
628
-
629
  if (currentOpts.hideOnContentClick) {
630
  content.on('click', $.fancybox.close);
631
  }
@@ -646,15 +650,15 @@
646
  wrap.on('mousewheel.fb', function(e, delta) {
647
  if (busy) {
648
  e.preventDefault();
649
- } else if ( currentOpts.type == 'image' && ( $(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight ) ) {
650
  e.preventDefault();
651
  $.fancybox[ delta > 0 ? 'prev' : 'next']();
652
- }
653
  });
654
  }
655
 
656
  if (currentOpts.type == 'iframe') {
657
- $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '') + ' style="border:0;margin:0;overflow:' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + '" src="' + currentOpts.href + '"' + (false === selectedOpts.allowfullscreen ? '' : ' allowfullscreen') + '></iframe>').appendTo(content);
658
  }
659
 
660
  wrap.show();
@@ -669,22 +673,22 @@
669
  },
670
 
671
  _preload_images = function() {
672
- var href,
673
  objNext;
674
 
675
  if ((currentArray.length -1) > currentIndex) {
676
- href = currentArray[ currentIndex + 1 ].href;
677
 
678
- if (typeof href !== 'undefined' && (href.match(imgRegExp) || $(obj).hasClass("image")) ) {
679
  objNext = new Image();
680
  objNext.src = href;
681
  }
682
  }
683
 
684
  if (currentIndex > 0) {
685
- href = currentArray[ currentIndex - 1 ].href;
686
 
687
- if (typeof href !== 'undefined' && (href.match(imgRegExp) || $(obj).hasClass("image")) ) {
688
  objNext = new Image();
689
  objNext.src = href;
690
  }
@@ -823,7 +827,7 @@
823
  };
824
 
825
  /*
826
- * Public methods
827
  */
828
 
829
  $.fn.fancybox = function(options) {
@@ -1049,21 +1053,24 @@
1049
  overlay.css('height', $(document).height());
1050
  }
1051
 
1052
- $.fancybox.center(true);
 
 
 
1053
  };
1054
 
1055
  $.fancybox.center = function() {
1056
  var view, align;
1057
 
1058
  if (busy) {
1059
- return;
1060
  }
1061
 
1062
  align = arguments[0] === true ? 1 : 0;
1063
  view = _get_viewport();
1064
 
1065
  if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1066
- return;
1067
  }
1068
 
1069
  wrap
@@ -1142,8 +1149,8 @@
1142
  autoResize : true, //!isTouch
1143
 
1144
  ajax : {},
1145
- swf : { wmode: 'transparent' },
1146
- svg : { wmode: 'transparent' },
1147
 
1148
  hideOnOverlayClick : true,
1149
  hideOnContentClick : false,
@@ -1187,4 +1194,3 @@
1187
  });
1188
 
1189
  })(jQuery);
1190
-
18
  * Removed/replaced non-HTML5 attributes
19
  * Added parameter allowfullscreen for iframe, RavanH ravanhagen@gmail.com
20
  * Line 309, 714: patches for better centering on ipad etc.
21
+ * Line 588: added support for tab key gallery browsing
22
  * Line 645: Check type = image for mousewheel
23
+ * Line 820: qouted attribute selector, RavanH ravanhagen@gmail.com
24
+ * Line 41, 622 and 1125: added isTouch variable and autoResize parameter, RavanH ravanhagen@gmail.com
25
+ * Line 34: WebP image support, RavanH ravanhagen@gmail.com
26
+ * Line 126, 677, 686: 'image' class forces image type, RavanH ravanhagen@gmail.com
27
+ * Put focus on iframe at _finish
28
  * Patched for jQuery 1.9+ compat by Sabel http://sabel.bluegfx.de/wordpress/wp-content/uploads/2013/03/jquery.fancybox-1.3.4.js
29
+ *
30
  * Added SVG support by Simon Maillard simon@ogesta.fr
31
  */
32
  ;(function($) {
41
  titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
42
 
43
  isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
44
+
45
  isTouch = document.createTouch !== undefined,
46
 
47
  /*
48
+ * Private methods
49
  */
50
 
51
  _abort = function() {
79
 
80
  _start = function() {
81
  var obj = selectedArray[ selectedIndex ],
82
+ href,
83
+ type,
84
  title,
85
  str,
86
  emb,
102
  title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
103
 
104
  if (obj.nodeName && !selectedOpts.orig) {
105
+ selectedOpts.orig = $(obj).find("img:first").length ? $(obj).find("img:first") : $(obj);
106
  }
107
 
108
  if (title === '' && selectedOpts.orig) {
165
  selectedOpts.width = 'auto';
166
  selectedOpts.height = 'auto';
167
  } else {
168
+ selectedOpts.autoDimensions = false;
169
  }
170
  }
171
 
183
  tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
184
 
185
  $('.fancybox-inline-tmp').off('fancybox-cancel').on('fancybox-change', function() {
186
+ $(this).replaceWith(content.children());
187
  });
188
 
189
  switch (type) {
316
  w = parseInt( (ww - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
317
 
318
  } else {
319
+ w = w == 'auto' ? 'auto' : w + 'px';
320
  }
321
 
322
  if (h.toString().indexOf('%') > -1) {
323
  h = parseInt( (wh - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
324
 
325
  } else {
326
+ h = h == 'auto' ? 'auto' : h + 'px';
327
  }
328
 
329
  tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
476
  return;
477
  }
478
 
479
+ if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
480
+ title.show();
481
  }
482
 
483
  content
583
  if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
584
  e.preventDefault();
585
  $.fancybox.close();
 
586
  } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
587
  e.preventDefault();
588
  $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
589
+ } else if ((e.keyCode == 9) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
590
+ e.preventDefault();
591
+ $.fancybox[ e.shiftKey ? 'prev' : 'next']();
592
  }
593
  });
594
  }
595
 
596
+ if (!currentOpts.showNavArrows) {
597
  nav_left.hide();
598
  nav_right.hide();
599
  return;
610
 
611
  _finish = function () {
612
  if (!$.support.opacity) {
613
+ content.css('filter', 0);
614
+ wrap.css('filter', 0);
615
  }
616
 
617
  if (selectedOpts.autoDimensions) {
629
  }
630
 
631
  _set_navigation();
632
+
633
  if (currentOpts.hideOnContentClick) {
634
  content.on('click', $.fancybox.close);
635
  }
650
  wrap.on('mousewheel.fb', function(e, delta) {
651
  if (busy) {
652
  e.preventDefault();
653
+ } else if ( currentOpts.type == 'image' && ( $(e.target).outerHeight() == 0 || $(e.target).prop('scrollHeight') === $(e.target).outerHeight() ) ) {
654
  e.preventDefault();
655
  $.fancybox[ delta > 0 ? 'prev' : 'next']();
656
+ }
657
  });
658
  }
659
 
660
  if (currentOpts.type == 'iframe') {
661
+ $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '"' + (navigator.userAgent.match(/msie [6]/i) ? ' allowtransparency="true""' : '') + ' style="border:0;margin:0;overflow:' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + '" src="' + currentOpts.href + '"' + (false === currentOpts.allowfullscreen ? '' : ' allowfullscreen') + ' tabindex="999"></iframe>').appendTo(content).focus();
662
  }
663
 
664
  wrap.show();
673
  },
674
 
675
  _preload_images = function() {
676
+ var obj,
677
  objNext;
678
 
679
  if ((currentArray.length -1) > currentIndex) {
680
+ obj = currentArray[ currentIndex + 1 ];
681
 
682
+ if (typeof href !== 'undefined' && (obj.href.match(imgRegExp) || $(obj).hasClass("image")) ) {
683
  objNext = new Image();
684
  objNext.src = href;
685
  }
686
  }
687
 
688
  if (currentIndex > 0) {
689
+ obj = currentArray[ currentIndex - 1 ];
690
 
691
+ if (typeof href !== 'undefined' && (obj.href.match(imgRegExp) || $(obj).hasClass("image")) ) {
692
  objNext = new Image();
693
  objNext.src = href;
694
  }
827
  };
828
 
829
  /*
830
+ * Public methods
831
  */
832
 
833
  $.fn.fancybox = function(options) {
1053
  overlay.css('height', $(document).height());
1054
  }
1055
 
1056
+ /* no centering after resize on touch devices */
1057
+ if (!isTouch) {
1058
+ $.fancybox.center(true);
1059
+ }
1060
  };
1061
 
1062
  $.fancybox.center = function() {
1063
  var view, align;
1064
 
1065
  if (busy) {
1066
+ return;
1067
  }
1068
 
1069
  align = arguments[0] === true ? 1 : 0;
1070
  view = _get_viewport();
1071
 
1072
  if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1073
+ return;
1074
  }
1075
 
1076
  wrap
1149
  autoResize : true, //!isTouch
1150
 
1151
  ajax : {},
1152
+ swf : { wmode: 'opaque' },
1153
+ svg : { wmode: 'opaque' },
1154
 
1155
  hideOnOverlayClick : true,
1156
  hideOnContentClick : false,
1194
  });
1195
 
1196
  })(jQuery);
 
fancybox/jquery.fancybox-1.3.8.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #fancybox-close,#fancybox-content,#fancybox-content>div,#fancybox-content>div>div,#fancybox-frame,#fancybox-left,#fancybox-loading,#fancybox-loading div,#fancybox-outer,#fancybox-overlay,#fancybox-right,#fancybox-title,#fancybox-title div,#fancybox-wrap,.fancy-ico,.fancybox-bg{box-sizing:content-box;-moz-box-sizing:content-box}#fancybox-loading{position:fixed;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;cursor:pointer;overflow:hidden;z-index:111104;display:none}#fancybox-loading div,#fancybox-overlay,#fancybox-wrap{left:0;top:0;position:absolute}#fancybox-loading div{width:40px;height:480px;background-image:url(fancybox.png)}#fancybox-overlay{width:100%;z-index:111100;display:none}#fancybox-tmp{padding:0;margin:0;border:0;overflow:auto;display:none}#fancybox-wrap{padding:20px;z-index:111101;outline:0;display:none}#fancybox-content,#fancybox-outer{position:relative;background:#fff}#fancybox-outer{width:100%;height:100%;box-shadow:0 0 20px #111;-moz-box-shadow:0 0 20px #1111;-webkit-box-shadow:0 0 20px #111}#fancybox-content{width:0;height:0;padding:0;outline:0;overflow:hidden;z-index:111102;border:0 solid #fff;-moz-background-clip:padding;-webkit-background-clip:padding;background-clip:padding-box}#fancybox-content>div{max-width:100%;max-height:100%}#fancybox-hide-sel-frame{position:absolute;top:0;left:0;width:100%;height:100%;background:0 0;z-index:111101}#fancybox-close{position:absolute;top:-15px;right:-15px;width:30px;height:30px;background:url(fancybox.png) -40px 0;cursor:pointer;z-index:111103;display:none}#fancybox-left-ico,#fancybox-right-ico{background-image:url(fancybox.png)}#fancybox-frame,#fancybox-img{border:none;height:100%;width:100%}#fancybox-error{color:#444;font:400 12px/20px Arial;padding:14px;margin:0}#fancybox-img{padding:0;margin:0;outline:0;line-height:0;vertical-align:top;max-width:none!important;max-height:none!important}#fancybox-frame{display:block;-webkit-overflow-scrolling:touch;z-index:0}#fancybox-left,#fancybox-right{position:absolute;bottom:0;height:100%;width:35%;cursor:pointer;outline:0;z-index:111102;display:none}#fancybox-left{left:0}.rtl #fancybox-left{left:auto;right:0}#fancybox-right{right:0}.rtl #fancybox-right{left:0;right:auto}#fancybox-left-ico,#fancybox-right-ico{position:absolute;top:50%;left:-9999px;width:30px;height:30px;margin-top:-15px;cursor:pointer;z-index:111102;display:block}#fancybox-left-ico{background-position:-40px -30px}.rtl #fancybox-left-ico{background-position:-40px -60px;right:-9999px}#fancybox-right-ico{background-position:-40px -60px}.rtl #fancybox-right-ico{background-position:-40px -30px;right:-9999px}#fancybox-left:hover,#fancybox-right:hover{visibility:visible}#fancybox-left:hover span{left:20px}.rtl #fancybox-left:hover span{right:20px}#fancybox-right:hover span{left:auto;right:20px}.rtl #fancybox-right:hover span{right:auto;left:20px}#fancybox-title{font-family:Helvetica;font-size:12px;z-index:111102}.fancybox-title-inside{padding-bottom:10px;text-align:center;color:#333;position:relative}.fancybox-title-outside{padding-top:10px;color:#fff}.fancybox-title-over{position:absolute;bottom:0;left:0;color:#FFF;text-align:left}.rtl .fancybox-title-over{text-align:right}#fancybox-title-over{padding:10px;background:rgba(0,0,0,.64);display:block}.fancybox-title-float{position:absolute;left:0;bottom:-20px;height:32px}#fancybox-title-float-wrap{border:none;border-collapse:collapse;width:auto}#fancybox-title-float-wrap td{border:none;white-space:nowrap}#fancybox-title-float-left{padding:0 0 0 15px;background:url(fancybox.png) -40px -90px no-repeat}#fancybox-title-float-main{color:#fff;line-height:29px;font-weight:700;padding:0 0 3px;background:url(fancybox-x.png) 0 -40px}#fancybox-title-float-right{padding:0 0 0 15px;background:url(fancybox.png) -55px -90px no-repeat}.fancybox-hidden{display:none}
fancybox/jquery.fancybox-1.3.8.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(t){var e,i,n,a,o,d,c,r,s,h,l,f,p,g=0,u={},b=[],y=0,w={},m=[],v=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=/[^\.]\.(svg)\s*$/i,O=1,j=0,T="",A=!1,D=t.extend(t("<div/>")[0],{prop:0}),N=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,E=void 0!==document.createTouch,S=function(){i.hide(),x.onerror=x.onload=null,v&&v.abort(),e.empty()},F=function(){return!1===u.onError(b,g,u)?(i.hide(),void(A=!1)):(u.titleShow=!1,u.width="auto",u.height="auto",e.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'),void B())},P=function(){var n,a,o,c,r,s,h=b[g];if(S(),u=t.extend({},t.fn.fancybox.defaults,void 0===t(h).data("fancybox")?u:t(h).data("fancybox")),s=u.onStart(b,g,u),s===!1)return void(A=!1);if("object"==typeof s&&(u=t.extend(u,s)),o=u.title||(h.nodeName?t(h).attr("title"):h.title)||"",h.nodeName&&!u.orig&&(u.orig=t(h).find("img:first").length?t(h).find("img:first"):t(h)),""===o&&u.orig&&(o=u.orig.attr(u.titleFromAlt?"alt":"title")),n=u.href||(h.nodeName?t(h).attr("href"):h.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),u.type?(a=u.type,n||(n=u.content)):u.content?a="html":n&&(a=n.match(I)||t(h).hasClass("image")?"image":n.match(C)?"swf":n.match(k)?"svg":t(h).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void F();switch("inline"==a&&(h=n.substr(n.indexOf("#")),a=t(h).length>0?"inline":"ajax"),u.type=a,u.href=n,u.title=o,u.autoDimensions&&("html"==u.type||"inline"==u.type||"ajax"==u.type?(u.width="auto",u.height="auto"):u.autoDimensions=!1),u.modal&&(u.overlayShow=!0,u.hideOnOverlayClick=!1,u.hideOnContentClick=!1,u.enableEscapeButton=!1,u.showCloseButton=!1),u.padding=parseInt(u.padding,10),u.margin=parseInt(u.margin,10),e.css("padding",u.padding+u.margin),t(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(u.content),B();break;case"inline":if(t(h).parent().is("#fancybox-content")===!0)return void(A=!1);t('<div class="fancybox-inline-tmp" />').hide().insertBefore(t(h)).on("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).on("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(h).appendTo(e),B();break;case"image":A=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){F()},x.onload=function(){A=!0,x.onerror=x.onload=null,L()},x.src=n;break;case"swf":u.scrolling="no",c='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+u.width+'" height="'+u.height+'"><param name="movie" value="'+n+'"></param>',r="",t.each(u.swf,function(t,e){c+='<param name="'+t+'" value="'+e+'"></param>',r+=" "+t+'="'+e+'"'}),c+='<embed src="'+n+'" type="application/x-shockwave-flash" width="'+u.width+'" height="'+u.height+'"'+r+"></embed></object>",e.html(c),B();break;case"svg":u.scrolling="no",c='<object width="'+u.width+'" height="'+u.height+'" data="'+n+'"></object>',e.html(c),B();break;case"ajax":A=!1,t.fancybox.showActivity(),u.ajax.win=u.ajax.success,v=t.ajax(t.extend({},u.ajax,{url:n,data:u.ajax.data||{},error:function(t){t.status>0&&F()},success:function(t,a,o){var d="object"==typeof o?o:v;if(200==d.status){if("function"==typeof u.ajax.win){if(s=u.ajax.win(n,t,a,o),s===!1)return void i.hide();("string"==typeof s||"object"==typeof s)&&(t=s)}e.html(t),B()}}}));break;case"iframe":z()}},B=function(){var i=u.width,n=u.height,a=0==t(window).width()?window.innerWidth:t(window).width(),o=0==t(window).height()?window.innerHeight:t(window).height();i=(""+i).indexOf("%")>-1?parseInt((a-2*u.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=(""+n).indexOf("%")>-1?parseInt((o-2*u.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('<div style="width:'+i+";height:"+n+";overflow: "+("auto"==u.scrolling?"auto":"yes"==u.scrolling?"scroll":"hidden")+';position:relative;"></div>'),u.width=e.width(),u.height=e.height(),z()},L=function(){u.width=x.width,u.height=x.height,t("<img />").attr({id:"fancybox-img",src:x.src,alt:u.title}).appendTo(e),z()},z=function(){var o,l;return i.hide(),a.is(":visible")&&!1===w.onCleanup(m,y,w)?(t(".fancybox-inline-tmp").trigger("fancybox-cancel"),void(A=!1)):(A=!0,t(d.add(n)).off(),t(window).off("resize.fb scroll.fb"),t(document).off("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),m=b,y=g,w=u,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||(N&&t("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),p=$(),M(),a.is(":visible")?(t(c.add(s).add(h)).hide(),o=a.position(),f={top:o.top,left:o.left,width:a.width(),height:a.height()},l=f.width==p.width&&f.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,K)};t(".fancybox-inline-tmp").trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:u.autoDimensions?"auto":p.height-j-2*w.padding}),l?i():(D.prop=0,t(D).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:q,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(f=U(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),D.prop=0,void t(D).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:q,complete:K})):("inside"==w.titlePosition&&j>0&&r.show(),d.css({width:p.width-2*w.padding,height:u.autoDimensions?"auto":p.height-j-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,K))))},H=function(t){return t&&t.length?"float"==w.titlePosition?'<table id="fancybox-title-float-wrap" style="border-spacing:0;border-collapse:collapse"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+t+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+w.titlePosition+'">'+t+"</div>":!1},M=function(){if(T=w.title||"",j=0,r.empty().removeAttr("style").removeClass(),w.titleShow===!1)return void r.hide();if(T=t.isFunction(w.titleFormat)?w.titleFormat(T,m,y,w):H(T),!T||""===T)return void r.hide();switch(r.addClass("fancybox-title-"+w.titlePosition).html(T).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),j=r.outerHeight(!0),r.appendTo(o),p.height+=j;break;case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o);break;case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a);break;default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},R=function(){return(w.enableEscapeButton||w.enableKeyboardNav)&&t(document).on("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName?9==e.keyCode&&w.enableKeyboardNav&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&"SELECT"!==e.target.tagName&&(e.preventDefault(),t.fancybox[e.shiftKey?"prev":"next"]()):(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),w.showNavArrows?((w.cyclic&&m.length>1||0!==y)&&s.show(),void((w.cyclic&&m.length>1||y!=m.length-1)&&h.show())):(s.hide(),void h.hide())},K=function(){t.support.opacity||(d.css("filter",0),a.css("filter",0)),u.autoDimensions&&d.css("height","auto"),a.css("height","auto"),T&&T.length&&r.show(),w.showCloseButton&&c.show(),R(),w.hideOnContentClick&&d.on("click",t.fancybox.close),w.hideOnOverlayClick&&n.on("click",t.fancybox.close),w.autoResize&&t(window).on("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).on("scroll.fb",t.fancybox.center),t.fn.mousewheel&&a.on("mousewheel.fb",function(e,i){A?e.preventDefault():"image"!=w.type||0!=t(e.target).outerHeight()&&t(e.target).prop("scrollHeight")!==t(e.target).outerHeight()||(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),"iframe"==w.type&&t('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'"'+(navigator.userAgent.match(/msie [6]/i)?' allowtransparency="true""':"")+' style="border:0;margin:0;overflow:'+("auto"==u.scrolling?"auto":"yes"==u.scrolling?"scroll":"hidden")+'" src="'+w.href+'"'+(!1===w.allowfullscreen?"":" allowfullscreen")+' tabindex="999"></iframe>').appendTo(d).focus(),a.show(),A=!1,t.fancybox.center(),w.onComplete(m,y,w),W()},W=function(){var e,i;m.length-1>y&&(e=m[y+1],"undefined"!=typeof href&&(e.href.match(I)||t(e).hasClass("image"))&&(i=new Image,i.src=href)),y>0&&(e=m[y-1],"undefined"!=typeof href&&(e.href.match(I)||t(e).hasClass("image"))&&(i=new Image,i.src=href))},q=function(t){var e={width:parseInt(f.width+(p.width-f.width)*t,10),height:parseInt(f.height+(p.height-f.height)*t,10),top:parseInt(f.top+(p.top-f.top)*t,10),left:parseInt(f.left+(p.left-f.left)*t,10)};void 0!==p.opacity&&(e.opacity=.5>t?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-j*t-2*w.padding})},X=function(){return[0==t(window).width()?window.innerWidth:t(window).width()-2*w.margin,0==t(window).height()?window.innerHeight:t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},$=function(){var t,e=X(),i={},n=w.autoScale,a=2*w.padding;return i.width=(""+w.width).indexOf("%")>-1?parseInt(e[0]*parseFloat(w.width)/100,10):w.width+a,i.height=(""+w.height).indexOf("%")>-1?parseInt(e[1]*parseFloat(w.height)/100,10):w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==u.type||"svg"==u.type||"swf"==u.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},Q=function(t){var e=t.offset();return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},U=function(){var e,i,n=u.orig?t(u.orig):!1,a={};return n&&n.length?(e=Q(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=X(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},G=function(){return i.is(":visible")?(t("div",i).css("top",-40*O+"px"),void(O=(O+1)%12)):void clearInterval(l)};t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).off("click.fb").on("click.fb",function(e){if(e.preventDefault(),!A){A=!0,t(this).blur(),b=[],g=0;var i=t(this).attr("rel")||"";i&&""!=i&&"nofollow"!==i?(b=t('a[rel="'+i+'"], area[rel="'+i+'"]'),g=b.index(this)):b.push(this),P()}}),this):this},t.fancybox=function(e){var i;if(!A){if(A=!0,i=void 0!==arguments[1]?arguments[1]:{},b=[],g=parseInt(i.index,10)||0,t.isArray(e)){for(var n=0,a=e.length;a>n;n++)"object"==typeof e[n]?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i));b=jQuery.merge(b,e)}else"object"==typeof e?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),b.push(e);(g>b.length||0>g)&&(g=0),P()}},t.fancybox.showActivity=function(){clearInterval(l),i.show(),l=setInterval(G,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(y+1)},t.fancybox.prev=function(){return t.fancybox.pos(y-1)},t.fancybox.pos=function(t){A||(t=parseInt(t),b=m,t>-1&&t<m.length?(g=t,P()):w.cyclic&&m.length>1&&(g=t<m.length?m.length-1:0,P()))},t.fancybox.cancel=function(){A||(A=!0,t(".fancybox-inline-tmp").trigger("fancybox-cancel"),S(),u.onCancel(b,g,u),A=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t(".fancybox-inline-tmp").trigger("fancybox-cleanup"),d.empty(),w.onClosed(m,y,w),m=u=[],y=g=0,w=u={},A=!1}if(!A&&!a.is(":hidden")){if(A=!0,w&&!1===w.onCleanup(m,y,w))return void(A=!1);if(S(),t(c.add(s).add(h)).hide(),t(d.add(n)).off(),t(window).off("resize.fb scroll.fb mousewheel.fb"),t(document).off("keydown.fb"),d.find("iframe#fancybox-frame").attr("src",N&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){f=U();var i=a.position();p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),D.prop=1,t(D).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:q,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),E||t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;A||(e=arguments[0]===!0?1:0,t=X(),(e||a.width()<=t[0]&&a.height()<=t[1])&&a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('<div id="fancybox-tmp"></div>'),i=t('<div id="fancybox-loading"><div></div></div>'),n=t('<div id="fancybox-overlay"></div>'),a=t('<div id="fancybox-wrap"></div>')),o=t('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(a),o.append(d=t('<div id="fancybox-content"></div>'),c=t('<a id="fancybox-close"></a>'),r=t('<div id="fancybox-title"></div>'),s=t('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),h=t('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')),c.click(t.fancybox.close),i.click(t.fancybox.cancel),s.click(function(e){e.preventDefault(),t.fancybox.prev()}),h.click(function(e){e.preventDefault(),t.fancybox.next()}),t.support.opacity||a.addClass("fancybox-ie"),N&&(i.addClass("fancybox-ie6"),a.addClass("fancybox-ie6"),t('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" style="overflow:hidden;border:0" tabindex="-1"></iframe>').prependTo(o)))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,allowfullscreen:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!E,autoResize:!0,//!isTouch
2
+ ajax:{},swf:{wmode:"opaque"},svg:{wmode:"opaque"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},t(document).ready(function(){t.fancybox.init()})}(jQuery);
light-mask.png → images/light-mask.png RENAMED
File without changes
inc/class-easyfancybox-admin.php ADDED
@@ -0,0 +1,327 @@