Easy FancyBox - Version 1.3.4.5

Version Description

FancyBox version 1.3.4 plus added PDF support and LOTS more options like border, overlay color, Easing, Title and adjustable YouTube, Vimeo and iFrame sizes! Missing WordPress auto-embed wmode fix.

=

Download this release

Release Info

Developer RavanH
Plugin Icon 128x128 Easy FancyBox
Version 1.3.4.5
Comparing to
See all releases

Code changes from version 1.3.3.4.2 to 1.3.4.5

easy-fancybox.css.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* -------------------------------------
3
+ Easy Fancybox Styleheet Conversion
4
+ ------------------------------------- */
5
+
6
+ header('Content-type: text/css; charset=utf-8', true);
7
+ ob_start("iepathfix_compress");
8
+ function iepathfix_compress($buffer) {
9
+ $prefix = ( isset($_SERVER['HTTPS']) ) ? "https://" : "http://";
10
+ /* Relative path fix : add 'fancybox/'
11
+ * IE6 path fix : replace relative with full path */
12
+ $buffer = str_replace(array("url('", "AlphaImageLoader(src='fancybox/"), array("url('fancybox/", "AlphaImageLoader(src='" . ( ( isset($_SERVER['HTTPS']) ) ? "https://" : "http://" ) . htmlspecialchars( $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']), ENT_QUOTES) . "/fancybox/"), $buffer);
13
+ /* remove comments */
14
+ $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
15
+ /* remove tabs, spaces, newlines, etc. */
16
+ $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
17
+ /* and squeeze some more */
18
+ $buffer = str_replace(array(", ", ": ", " {", "{ ", " }", "} ", ";}", " 0;"), array(",", ":", "{", "{", "}", "}", "}", ";"), $buffer);
19
+ return $buffer;
20
+ }
21
+
22
+ /* the css file */
23
+ include( 'fancybox/jquery.fancybox-' . htmlspecialchars( $_GET['ver'] , ENT_QUOTES) . '.css' );
24
+
25
+ ob_end_flush();
26
+ ?>
easy-fancybox.php CHANGED
@@ -2,240 +2,1030 @@
2
  /*
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
- Description: Easily enable the <a href="http://fancybox.net/">FancyBox 1.3.3 jQuery extension</a> on all image, SWF, YouTube and Vimeo links. Multi-Site compatible and supports iFrame and Flash movies in overlay viewport. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e3&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
6
- Version: 1.3.3.4.2
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
10
 
 
 
 
 
 
 
11
  // FUNCTIONS //
12
 
13
  function easy_fancybox_settings(){
14
- return array(
15
- 'autoAttribute' => array (
16
- 'id' => 'fancybox_autoAttribute',
17
- 'title' => __('Auto-enable','easy-fancybox'),
18
- 'label_for' => 'fancybox_autoAttribute',
19
- 'input' => 'text',
20
- 'class' => 'regular-text',
21
- 'options' => array(),
22
- 'hide' => 'true',
23
- 'default' => 'jpg gif png bmp jpeg jpe swf',
24
- 'description' => __('Enter file types FancyBox should be automatically enabled for. Clear field to switch off auto-enabling.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ),
26
- 'autoDetect' => array (
27
- 'id' => 'fancybox_autoDetect',
28
- 'title' => __('Auto-detect','easy-fancybox'),
29
- 'label_for' => '',
30
  'input' => 'multiple',
31
- 'class' => '',
32
  'options' => array(
33
- 'autoAttributeYoutube' => array (
34
- 'id' => 'fancybox_autoAttributeYoutube',
35
- 'label_for' => '',
36
- 'input' => 'checkbox',
37
- 'class' => '',
38
- 'options' => array(),
39
- 'hide' => 'true',
40
- 'default' => '1',
41
- 'description' => __('YouTube links.','easy-fancybox')
42
  ),
43
- 'autoAttributeYoutubeShortURL' => array (
44
- 'id' => 'fancybox_autoAttributeYoutubeShortURL',
45
- 'label_for' => '',
46
- 'input' => 'checkbox',
47
- 'class' => '',
48
- 'options' => array(),
49
- 'hide' => 'true',
50
- 'default' => '',
51
- 'description' => __('Short URL YouTube links.','easy-fancybox')
52
  ),
53
- 'autoAttributeVimeo' => array (
54
- 'id' => 'fancybox_autoAttributeVimeo',
55
- 'label_for' => '',
56
- 'input' => 'checkbox',
57
- 'class' => '',
58
- 'options' => array(),
59
- 'hide' => 'true',
60
- 'default' => '1',
61
- 'description' => __('Vimeo links.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  )
63
- ),
64
- 'hide' => 'true',
65
- 'description' => __('Select which external video content sites links should automatically be detected and FancyBox enabled.','easy-fancybox')
66
  ),
67
- 'titlePosition' => array (
68
- 'id' => 'fancybox_titlePosition',
69
- 'title' => __('Title Position','easy-fancybox'),
70
- 'label_for' => 'fancybox_titlePosition',
71
- 'input' => 'select',
72
- 'class' => '',
73
  'options' => array(
74
- 'over' => __('Overlay','easy-fancybox'),
75
- 'inside' => __('Inside','easy-fancybox'),
76
- 'outside' => __('Outside','easy-fancybox')
77
- ),
78
- 'default' => 'over',
79
- 'description' => __('Position of the overlay content title.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ),
81
- 'transitionIn' => array (
82
- 'id' => 'fancybox_transitionIn',
83
- 'title' => __('Transition In','easy-fancybox'),
84
- 'label_for' => 'fancybox_transitionIn',
85
- 'input' => 'select',
86
- 'class' => '',
87
  'options' => array(
88
- 'elastic' => __('Elastic','easy-fancybox'),
89
- 'fade' => __('Fade in','easy-fancybox'),
90
- 'none' => __('None','easy-fancybox')
91
- ),
92
- 'default' => 'elastic',
93
- 'description' => __('Transition effect when opening the overlay.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  ),
95
- 'transitionOut' => array (
96
- 'id' => 'fancybox_transitionOut',
97
- 'title' => __('Transition Out','easy-fancybox'),
98
- 'label_for' => 'fancybox_transitionOut',
99
- 'input' => 'select',
100
- 'class' => '',
101
  'options' => array(
102
- 'elastic' => __('Elastic','easy-fancybox'),
103
- 'fade' => __('Fade out','easy-fancybox'),
104
- 'none' => __('None','easy-fancybox')
105
- ),
106
- 'default' => 'elastic',
107
- 'description' => __('Transition effect when closing the overlay.','easy-fancybox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  );
110
  }
111
 
112
  function easy_fancybox() {
113
  $easy_fancybox_array = easy_fancybox_settings();
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  // begin output FancyBox settings
116
  echo "
117
- <!-- Easy FancyBox plugin for WordPress - RavanH (http://4visions.nl/en/wordpress-plugins/easy-fancybox/) -->
118
  <script type=\"text/javascript\">
119
  jQuery(document).ready(function($){";
120
-
121
- $file_types = array_filter( explode( ' ', get_option( 'fancybox_autoAttribute', $easy_fancybox_array['autoAttribute']['default']) ) );
122
-
123
- // add auto-detection image/swf links
124
- if(!empty($file_types)) {
125
- echo "
126
- $('";
127
- foreach ($file_types as $type)
128
- echo 'a[href$=".'.$type.'"],a[href$=".'.strtoupper($type).'"],';
129
- echo "')
130
- .attr('rel', 'gallery')
131
- .addClass('fancybox');";
 
 
 
 
 
 
 
 
 
 
 
132
  }
 
 
 
 
 
 
133
 
134
- // add auto-attribution for Youtube links
135
- if( "1" == get_option("fancybox_autoAttributeYoutube", $easy_fancybox_array['autoDetect']['options']['autoAttributeYoutube']['default']) )
136
- echo "
137
- $('a[href*=\"youtube.com/watch\"]').addClass('fancybox-youtube');";
 
 
138
 
139
- // add auto-attribution for Vimeo links
140
- if( "1" == get_option("fancybox_autoAttributeVimeo", $easy_fancybox_array['autoDetect']['options']['autoAttributeVimeo']['default']) )
141
- echo "
142
- $('a[href*=\"vimeo.com/\"]').addClass('fancybox-vimeo');
143
- ";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
 
145
- // image/swf fancybox settings
146
- echo "
147
- $('a.fancybox').fancybox({";
148
- foreach ($easy_fancybox_array as $key => $values)
149
- if('true'!=$values['hide'])
150
- echo "
151
- '".$key."' : '".get_option($values['id'], $values['default'])."',";
152
-
153
- if( "over" == get_option("fancybox_titlePosition", $easy_fancybox_array['titlePosition']['default']) )
154
- echo"
155
- 'onComplete' : function() {
156
- $('#fancybox-wrap').hover(function() {
157
- $('#fancybox-title').show();
158
- }, function() {
159
- $('#fancybox-title').hide();
160
- });
161
- },";
162
  echo"
163
- 'autoDimensions': false,
164
- 'titleFromAlt' : true
165
- });
166
- ";
167
-
168
- // iframe/swf/youtube/vimeo settings
169
- echo"
170
- var fb_opts = {
171
- 'titleShow' : false,
172
- 'padding' : 0,
173
- 'autoScale' : false,
174
- 'transitionIn' : 'none',
175
- 'transitionOut' : 'none',
176
- 'swf' : {
177
- 'wmode' : 'opacity',
178
- 'allowfullscreen' : 'true'
179
- }
180
- };
181
- $('a.fancybox-iframe').fancybox(
182
- $.extend(fb_opts, {
183
- 'type' : 'iframe',
184
- 'height' : '90%',
185
- 'width' : '70%'
186
- })
187
- );
188
- $('a.fancybox-swf').fancybox(
189
- $.extend(fb_opts, {
190
- 'width' : 680,
191
- 'height' : 495,
192
- 'type' : 'swf'
193
- })
194
- );
195
- $('a.fancybox-youtube').click(function(){
196
- $.fancybox(
197
- $.extend(fb_opts, {
198
- 'type' : 'swf',
199
- 'width' : 640,
200
- 'height' : 385,
201
- 'href' : this.href.replace(new RegExp('watch\\\?v=', 'i'), 'v/')
202
- })
203
- );
204
- return false;
205
- });";
206
- if( "1" == get_option("fancybox_autoAttributeYoutubeShortURL", $easy_fancybox_array['autoDetect']['options']['autoAttributeYoutubeShortURL']['default']) )
207
- echo "
208
- $('a[href*=\"youtu.be/\"]').click(function(){
209
- $.fancybox(
210
- $.extend(fb_opts, {
211
- 'type' : 'swf',
212
- 'width' : 640,
213
- 'height' : 385,
214
- 'href' : this.href.replace(new RegExp('youtu.be', 'i'), 'www.youtube.com/v')
215
- })
216
- );
217
- return false;
218
- });";
219
- echo "
220
- $('a.fancybox-vimeo').click(function() {
221
- $.fancybox(
222
- $.extend(fb_opts, {
223
- 'width' : 640,
224
- 'height' : 360,
225
- 'href' : this.href.replace(new RegExp('([0-9])', 'i'), 'moogaloop.swf?clip_id=$1')
226
- })
227
- );
228
- return false;
229
- });
230
  });
231
  </script>
 
232
  ";
233
  }
234
 
235
  // FancyBox Media Settings Section on Settings > Media admin page
236
  function easy_fancybox_settings_section() {
237
- echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number=&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us" title="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'"><img src="https://www.paypal.com/en_US/i/btn/x-click-but7.gif" style="border:none;float:right;margin:0 0 10px 10px" alt="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'" /></a><p>'.__('To manualy enable FancyBox for a link to an attached image or swf movie file, you can use the tags class="fancybox" or class="fancybox-swf". To make a link to any web page show in a FancyBox overlay, use class="fancybox-iframe". Use the tags class="fancybox-youtube" on a YouTube link and class="fancybox-vimeo" on a Vimeo link to manually enable FancyBox for it. Read more on <a href="http://4visions.nl/en/wordpress-plugins/easy-fancybox/">Easy FancyBox for WordPress</a>.','easy-fancybox').'</p><p>'.__('The settings listed below determine the image overlay behaviour controlled by FancyBox.','easy-fancybox').' '.__('Some setting like Title Position and Transition are ignored for swf video and iframe content overlays to improve browser compatibility and readability.','easy-fancybox').'</p>';
238
  }
 
239
  // FancyBox Media Settings Fields
240
  function easy_fancybox_settings_fields($args){
241
  switch($args['input']) {
@@ -245,6 +1035,10 @@ function easy_fancybox_settings_fields($args){
245
  echo $args['description'];
246
  break;
247
  case 'select':
 
 
 
 
248
  echo '
249
  <select name="'.$args['id'].'" id="'.$args['id'].'">';
250
  foreach ($args['options'] as $optionkey => $optionvalue) {
@@ -255,11 +1049,15 @@ function easy_fancybox_settings_fields($args){
255
  echo '
256
  </select> ';
257
  if( empty($args['label_for']) )
258
- echo '<label for="'.$args['id'].'">'.$args['description'].'</label> <em>'.__('Default:','easy-fancybox').' '.$args['options'][$args['default']].'</em>';
259
  else
260
- echo $args['description'].' <em>'.__('Default:','easy-fancybox').' '.$args['options'][$args['default']].'</em>';
261
  break;
262
  case 'checkbox':
 
 
 
 
263
  $value = esc_attr( get_option($args['id'], $args['default']) );
264
  if ($value == "1")
265
  $checked = ' checked="checked"';
@@ -269,16 +1067,24 @@ function easy_fancybox_settings_fields($args){
269
  $default = __('Checked','easy-fancybox');
270
  else
271
  $default = __('Unchecked','easy-fancybox');
272
- echo '
273
- <label><input type="checkbox" name="'.$args['id'].'" id="'.$args['id'].'" value="1" '.$checked.'/> '.$args['description'].'</label> <em>'.__('Default:','easy-fancybox').' '.$default.'</em><br />';
 
 
 
 
274
  break;
275
  case 'text':
 
 
 
 
276
  echo '
277
- <input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="'.$args['class'].'"/><br />';
278
  if( empty($args['label_for']) )
279
- echo '<label for="'.$args['id'].'">'.$args['description'].'</label> <em>'.__('Default:','easy-fancybox').' '.$args['default'].'</em>';
280
  else
281
- echo $args['description'].' <em>'.__('Default:','easy-fancybox').' '.$args['default'].'</em>';
282
  break;
283
  default:
284
  echo $args['description'];
@@ -295,30 +1101,53 @@ function easy_fancybox_admin_init(){
295
  foreach ($easy_fancybox_array as $key => $value) {
296
  add_settings_field( 'fancybox_'.$key, $value['title'], 'easy_fancybox_settings_fields', 'media', 'fancybox_section', $value);
297
  if ($value['input']=='multiple')
298
- foreach ($value['options'] as $_key => $_value)
299
- register_setting( 'media', 'fancybox_'.$_key );
300
  else
301
- register_setting( 'media', 'fancybox_'.$key );
302
  }
303
  }
304
 
305
  function easy_fancybox_enqueue() {
306
- // check if fancy.php is moved one dir up like in WPMU's /mu-plugins/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  // NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
308
  $efb_subdir = (file_exists(dirname(__FILE__).'/easy-fancybox')) ? 'easy-fancybox' : '';
309
 
310
  // ENQUEUE
311
  // register main fancybox script
312
- wp_enqueue_script('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.fancybox-1.3.3.pack.js', array('jquery'), '1.3.3');
313
 
314
- if( "none" != get_option("fancybox_transitionIn") || "none" != get_option("fancybox_transitionOut") ) {
 
 
 
 
 
 
315
  // first get rid of previously registered variants of jquery.easing (by other plugins)
316
  wp_deregister_script('jquery.easing');
317
  wp_deregister_script('jqueryeasing');
318
  wp_deregister_script('jquery-easing');
319
  wp_deregister_script('easing');
320
  // then register our version
321
- wp_enqueue_script('jquery.easing', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.easing-1.3.pack.js', array('jquery'), '1.3');
322
  }
323
 
324
  // first get rid of previously registered variants of jquery.mousewheel (by other plugins)
@@ -327,14 +1156,30 @@ function easy_fancybox_enqueue() {
327
  wp_deregister_script('jquery-mousewheel');
328
  wp_deregister_script('mousewheel');
329
  // then register our version
330
- wp_enqueue_script('jquery.mousewheel', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.mousewheel-3.0.4.pack.js', array('jquery'), '3.0.4');
331
 
332
  // register style
333
- wp_enqueue_style('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/jquery.fancybox.css.php', false, '1.3.3');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
 
336
  // HOOKS //
337
 
 
 
338
  add_action('wp_enqueue_scripts', 'easy_fancybox_enqueue', 999);
339
  add_action('wp_head', 'easy_fancybox');
340
 
2
  /*
3
  Plugin Name: Easy FancyBox
4
  Plugin URI: http://4visions.nl/en/wordpress-plugins/easy-fancybox/
5
+ Description: Easily enable the <a href="http://fancybox.net/">FancyBox jQuery extension</a> on all image, SWF, YouTube and Vimeo links. Multi-Site compatible and supports iFrame and Flash movies in overlay viewport. Happy with it? Please leave me a small <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&amp;item_number=1%2e3%2e4&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us">TIP</a> for development and support on this plugin and please consider a DONATION to the <a href="http://fancybox.net/">FancyBox project</a>.
6
+ Version: 1.3.4.5
7
  Author: RavanH
8
  Author URI: http://4visions.nl/
9
  */
10
 
11
+ // DEF
12
+
13
+ define( 'FANCYBOX_VERSION', '1.3.4' );
14
+ define( 'MOUSEWHEEL_VERSION', '3.0.4' );
15
+ define( 'EASING_VERSION', '1.3' );
16
+
17
  // FUNCTIONS //
18
 
19
  function easy_fancybox_settings(){
20
+
21
+ if (function_exists('is_plugin_active_for_network') && is_plugin_active_for_network(plugin_basename( __FILE__ )))
22
+ $no_network_activate = '';
23
+ else
24
+ $no_network_activate = '1';
25
+
26
+ return array (
27
+ 'Global' => array(
28
+ 'title' => __('Global settings','easy-fancybox'),
29
+ 'input' => 'multiple',
30
+ 'hide' => true,
31
+ 'options' => array(
32
+ 'intro' => array (
33
+ 'hide' => true,
34
+ 'description' => __('These settings determine the global overlay appearance and behaviour controlled by FancyBox.','easy-fancybox') . '<br />'
35
+ ),
36
+ 'p0' => array (
37
+ 'hide' => true,
38
+ 'description' => '<br /><strong>' . __('Links') . '</strong><br />'
39
+ ),
40
+ 'attributeLimit' => array (
41
+ 'id' => 'fancybox_attributeLimit',
42
+ 'title' => __('Exclude','easy-fancybox'),
43
+ 'label_for' => 'fancybox_attributeLimit',
44
+ 'hide' => true,
45
+ 'input' => 'select',
46
+ 'options' => array(
47
+ '' => __('None'),
48
+ '.not(\':empty\')' => __('Empty (hidden)','easy-fancybox'),
49
+ '.has(\'img\')' => __('Without thumbnail image','easy-fancybox'),
50
+ ),
51
+ 'default' => '.not(\':empty\')'
52
+ ),
53
+ 'p1' => array (
54
+ 'hide' => true,
55
+ 'description' => '<br /><br /><strong>' . __('Overlay','easy-fancybox') . '</strong><br />'
56
+ ),
57
+ 'overlayShow' => array (
58
+ 'id' => 'fancybox_overlayShow',
59
+ 'input' => 'checkbox',
60
+ 'default' => '1',
61
+ 'description' => __('Show the overlay around content opened in FancyBox.','easy-fancybox')
62
+ ),
63
+ 'overlayOpacity' => array (
64
+ 'id' => 'fancybox_overlayOpacity',
65
+ 'title' => __('Overlay opacity','easy-fancybox'),
66
+ 'label_for' => 'fancybox_overlayOpacity',
67
+ 'input' => 'text',
68
+ 'class' => 'small-text',
69
+ 'default' => '',
70
+ 'description' => __('Value between 0 and 1. ','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 0.7</em><br />'
71
+ ),
72
+ 'overlayColor' => array (
73
+ 'id' => 'fancybox_overlayColor',
74
+ 'title' => __('Overlay color','easy-fancybox'),
75
+ 'label_for' => 'fancybox_overlayColor',
76
+ 'input' => 'text',
77
+ 'class' => 'small-text',
78
+ 'default' => '',
79
+ 'description' => __('Enter a HTML color value.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' #777</em><br />'
80
+ ),
81
+ 'p2' => array (
82
+ 'hide' => true,
83
+ 'description' => '<br /><strong>' . __('Overlay window','easy-fancybox') . '</strong><br />'
84
+ ),
85
+ 'width' => array (
86
+ 'id' => 'fancybox_width',
87
+ 'title' => __('Width'),
88
+ 'label_for' => 'fancybox_width',
89
+ 'input' => 'text',
90
+ 'class' => 'small-text',
91
+ 'default' => '',
92
+ 'description' => ' '
93
+ ),
94
+ 'height' => array (
95
+ 'id' => 'fancybox_height',
96
+ 'title' => __('Height'),
97
+ 'label_for' => 'fancybox_height',
98
+ 'input' => 'text',
99
+ 'class' => 'small-text',
100
+ 'default' => ''
101
+ ),
102
+ 'padding' => array (
103
+ 'id' => 'fancybox_padding',
104
+ 'title' => __('Border'),
105
+ 'label_for' => 'fancybox_padding',
106
+ 'input' => 'text',
107
+ 'class' => 'small-text',
108
+ 'default' => '',
109
+ 'description' => '<br />' . __('Change default width, heigth and border of the overlay window.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 560 x 340 x 10</em><br />'
110
+ ),
111
+ 'centerOnScroll' => array (
112
+ 'id' => 'fancybox_centerOnScroll',
113
+ 'input' => 'checkbox',
114
+ 'default' => '1',
115
+ 'description' => __('Center while scrolling.','easy-fancybox')
116
+ ),
117
+ 'showCloseButton' => array (
118
+ 'id' => 'fancybox_showCloseButton',
119
+ 'input' => 'checkbox',
120
+ 'default' => '1',
121
+ 'description' => __('Show the (X) close button.','easy-fancybox')
122
+ ),
123
+ 'showNavArrows' => array (
124
+ 'id' => 'fancybox_showNavArrows',
125
+ 'input' => 'checkbox',
126
+ 'default' => '1',
127
+ 'description' => __('Show the gallery navigation arrows.','easy-fancybox')
128
+ ),
129
+ 'titleShow' => array (
130
+ 'id' => 'fancybox_titleShow',
131
+ 'input' => 'checkbox',
132
+ 'default' => '1',
133
+ 'description' => __('Show title','easy-fancybox')
134
+ ),
135
+ 'titlePosition' => array (
136
+ 'id' => 'fancybox_titlePosition',
137
+ 'title' => __('Title Position','easy-fancybox'),
138
+ 'label_for' => 'fancybox_titlePosition',
139
+ 'input' => 'select',
140
+ 'options' => array(
141
+ '' => __('Float','easy-fancybox'), // same as 'float'
142
+ 'outside' => __('Outside','easy-fancybox'),
143
+ 'inside' => __('Inside','easy-fancybox'),
144
+ 'over' => __('Overlay','easy-fancybox')
145
+ ),
146
+ 'default' => 'over',
147
+ ),
148
+ 'titleFromAlt' => array (
149
+ 'id' => 'fancybox_titleFromAlt',
150
+ 'input' => 'checkbox',
151
+ 'default' => '1',
152
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
153
+ ),
154
+ 'p3' => array (
155
+ 'hide' => true,
156
+ 'description' => '<br /><strong>' . __('Transition','easy-fancybox') . '</strong><br />'
157
+ ),
158
+ 'transitionIn' => array (
159
+ 'id' => 'fancybox_transitionIn',
160
+ 'title' => __('Transition In','easy-fancybox'),
161
+ 'label_for' => 'fancybox_transitionIn',
162
+ 'input' => 'select',
163
+ 'options' => array(
164
+ '' => __('Fade','easy-fancybox'),
165
+ 'elastic' => __('Elastic','easy-fancybox'),
166
+ 'none' => __('None','easy-fancybox')
167
+ ),
168
+ 'default' => 'elastic',
169
+ 'description' => ' '
170
+ ),
171
+ 'easingIn' => array (
172
+ 'id' => 'fancybox_easingIn',
173
+ 'title' => __('Easing In','easy-fancybox'),
174
+ 'label_for' => 'fancybox_easingIn',
175
+ 'input' => 'select',
176
+ 'options' => array(
177
+ '' => __('Swing','easy-fancybox'),
178
+ 'easeOutBack' => __('Back','easy-fancybox'),
179
+ 'easeOutQuad' => __('Quad','easy-fancybox'),
180
+ 'easeOutExpo' => __('Expo','easy-fancybox'),
181
+ ),
182
+ 'default' => 'easeOutBack',
183
+ 'description' => '<br />'
184
+ ),
185
+ 'transitionOut' => array (
186
+ 'id' => 'fancybox_transitionOut',
187
+ 'title' => __('Transition Out','easy-fancybox'),
188
+ 'label_for' => 'fancybox_transitionOut',
189
+ 'input' => 'select',
190
+ 'options' => array(
191
+ '' => __('Fade','easy-fancybox'),
192
+ 'elastic' => __('Elastic','easy-fancybox'),
193
+ 'none' => __('None','easy-fancybox')
194
+ ),
195
+ 'default' => 'elastic',
196
+ 'description' => ' '
197
+ ),
198
+ 'easingOut' => array (
199
+ 'id' => 'fancybox_easingOut',
200
+ 'title' => __('Easing Out','easy-fancybox'),
201
+ 'label_for' => 'fancybox_easingOut',
202
+ 'input' => 'select',
203
+ 'options' => array(
204
+ '' => __('Swing','easy-fancybox'),
205
+ 'easeInBack' => __('Back','easy-fancybox'),
206
+ 'easeInQuad' => __('Quad','easy-fancybox'),
207
+ 'easeInExpo' => __('Expo','easy-fancybox'),
208
+ ),
209
+ 'default' => 'easeInBack',
210
+ 'description' => '<br />' . __('Easing effects only apply when Transition is set to Elastic. ','easy-fancybox') . '<br /><br />'
211
+ ),
212
+ 'opacity' => array (
213
+ 'id' => 'fancybox_opacity',
214
+ 'input' => 'checkbox',
215
+ 'default' => '',
216
+ 'description' => __('Transparency fade during elastic transition.','easy-fancybox')
217
+ ),
218
+ 'speedIn' => array (
219
+ 'id' => 'fancybox_speedIn',
220
+ 'title' => __('Opening speed','easy-fancybox'),
221
+ 'label_for' => 'fancybox_speedIn',
222
+ 'input' => 'text',
223
+ 'class' => 'small-text',
224
+ 'default' => '',
225
+ ),
226
+ 'speedOut' => array (
227
+ 'id' => 'fancybox_speedIn',
228
+ 'title' => __('Closing speed','easy-fancybox'),
229
+ 'label_for' => 'fancybox_speedOut',
230
+ 'input' => 'text',
231
+ 'class' => 'small-text',
232
+ 'default' => '',
233
+ ),
234
+ 'changeFade' => array (
235
+ 'id' => 'fancybox_changeFade',
236
+ 'title' => __('Fade speed','easy-fancybox'),
237
+ 'label_for' => 'fancybox_changeFade',
238
+ 'input' => 'text',
239
+ 'class' => 'small-text',
240
+ 'default' => '',
241
+ 'description' => '<br />' . __('Duration in milliseconds. Higher is slower.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' 300</em>'
242
+ )
243
+ )
244
  ),
245
+ 'IMG' => array(
246
+ 'title' => __('Images','easy-fancybox'),
 
 
247
  'input' => 'multiple',
 
248
  'options' => array(
249
+ 'enable' => array (
250
+ 'id' => 'fancybox_enableImg',
251
+ 'input' => 'checkbox',
252
+ 'hide' => true,
253
+ 'default' => ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network(plugin_basename( __FILE__ )) ) ? '' : '1',
254
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Images','easy-fancybox') . '</strong>'
 
 
 
255
  ),
256
+ 'intro' => array (
257
+ 'hide' => true,
258
+ 'description' => __('To make any image file open in an overlay, add its extension to the auto-detect field or use the tag class="fancybox" for its link.','easy-fancybox') . '<br />'
 
 
 
 
 
 
259
  ),
260
+ 'autoAttribute' => array (
261
+ 'id' => 'fancybox_autoAttribute',
262
+ 'title' => __('Auto-detect','easy-fancybox'),
263
+ 'label_for' => 'fancybox_autoAttribute',
264
+ 'input' => 'text',
265
+ 'class' => 'regular-text',
266
+ 'hide' => true,
267
+ 'default' => 'jpg gif png',
268
+ 'selector' => 'href$=',
269
+ 'description' => '<br />' . __('Enter file types FancyBox should be automatically enabled for. Clear field to switch off auto-enabling.','easy-fancybox') . ' <em>' . __('Default:','easy-fancybox') . ' jpg gif png</em>'
270
+ ),
271
+ 'class' => array (
272
+ 'hide' => true,
273
+ 'default' => 'fancybox'
274
+ )
275
+ /* TODO : only use this parm when 'titlePosition' : 'over'
276
+ ,'onComplete' => array (
277
+ 'noquotes' => true,
278
+ 'default' => 'function() { $(\'#fancybox-wrap\').hover(function() { $(\'#fancybox-title\').show(); }, function() { $(\'#fancybox-title\').hide(); }); }'
279
+ )*/
280
+ )
281
+ ),
282
+
283
+ 'PDF' => array(
284
+ 'title' => __('PDF','easy-fancybox'),
285
+ 'input' => 'multiple',
286
+ 'options' => array(
287
+ 'enable' => array (
288
+ 'id' => 'fancybox_enablePDF',
289
+ 'input' => 'checkbox',
290
+ 'hide' => true,
291
+ 'default' => '',
292
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('PDF','easy-fancybox') . '</strong>'
293
+ ),
294
+ 'autoAttribute' => array (
295
+ 'id' => 'fancybox_autoAttributePDF',
296
+ 'input' => 'checkbox',
297
+ 'hide' => true,
298
+ 'default' => '',
299
+ 'selector' => 'href$=".pdf"',
300
+ 'description' => __('Auto-detect','easy-fancybox')
301
+ ),
302
+ 'class' => array (
303
+ 'hide' => true,
304
+ 'default' => 'fancybox-pdf'
305
+ ),
306
+ 'intro' => array (
307
+ 'hide' => true,
308
+ 'description' => __('To make any PDF document file open in an overlay, switch on auto-detect or use the tag class="fancybox-pdf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
309
+ ),
310
+ 'type' => array (
311
+ 'default' => 'html'
312
+ ),
313
+ 'width' => array (
314
+ 'id' => 'fancybox_PDFwidth',
315
+ 'title' => __('Width'),
316
+ 'label_for' => 'fancybox_PDFwidth',
317
+ 'input' => 'text',
318
+ 'class' => 'small-text',
319
+ 'default' => '90%',
320
+ 'description' => ' '
321
+ ),
322
+ 'height' => array (
323
+ 'id' => 'fancybox_PDFheight',
324
+ 'title' => __('Height'),
325
+ 'label_for' => 'fancybox_PDFheight',
326
+ 'input' => 'text',
327
+ 'class' => 'small-text',
328
+ 'default' => '90%'
329
+ ),
330
+ 'margin' => array (
331
+ 'default' => '0'
332
+ ),
333
+ 'padding' => array (
334
+ 'id' => 'fancybox_PDFpadding',
335
+ 'title' => __('Border'),
336
+ 'label_for' => 'fancybox_PDFpadding',
337
+ 'input' => 'text',
338
+ 'class' => 'small-text',
339
+ 'default' => '0',
340
+ 'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
341
+ ),
342
+ 'autoScale' => array (
343
+ 'noquotes' => true,
344
+ 'default' => 'false'
345
+ ),
346
+ 'titleShow' => array (
347
+ 'id' => 'fancybox_PDFtitleShow',
348
+ 'input' => 'checkbox',
349
+ 'default' => '',
350
+ 'description' => __('Show title','easy-fancybox')
351
+ ),
352
+ 'titlePosition' => array (
353
+ 'id' => 'fancybox_PDFtitlePosition',
354
+ 'title' => __('Title Position','easy-fancybox'),
355
+ 'label_for' => 'fancybox_PDFtitlePosition',
356
+ 'input' => 'select',
357
+ 'options' => array(
358
+ 'float' => __('Float','easy-fancybox'), // same as 'float'
359
+ 'outside' => __('Outside','easy-fancybox'),
360
+ 'inside' => __('Inside','easy-fancybox')
361
+ //,'over' => __('Overlay','easy-fancybox')
362
+ ),
363
+ 'default' => 'float',
364
+ ),
365
+ 'titleFromAlt' => array (
366
+ 'id' => 'fancybox_PDFtitleFromAlt',
367
+ 'input' => 'checkbox',
368
+ 'default' => '',
369
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
370
+ ),
371
+ 'transitionOut' => array (
372
+ 'id' => 'fancybox_PDFtransitionOut',
373
+ 'title' => __('Transition Out','easy-fancybox'),
374
+ 'label_for' => 'fancybox_PDFtransitionOut',
375
+ 'input' => 'select',
376
+ 'class' => '',
377
+ 'options' => array(
378
+ 'fade' => __('Fade','easy-fancybox'),
379
+ //'elastic' => __('Elastic','easy-fancybox'),
380
+ 'none' => __('None','easy-fancybox')
381
+ ),
382
+ 'default' => 'fade',
383
+ ),
384
+ 'easingIn' => array (
385
+ 'default' => 'swing'
386
+ ),
387
+ 'autoDimensions' => array (
388
+ 'noquotes' => true,
389
+ 'default' => 'false'
390
+ ),
391
+ 'scrolling' => array (
392
+ 'default' => 'no',
393
+ ),
394
+ 'onStart' => array (
395
+ 'noquotes' => true,
396
+ 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.content = \'<embed src="\' + selectedArray[selectedIndex].href + \'#nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="100%" width="100%" />\' }'
397
  )
398
+ )
 
 
399
  ),
400
+
401
+ 'SWF' => array(
402
+ 'title' => __('SWF','easy-fancybox'),
403
+ 'input' => 'multiple',
 
 
404
  'options' => array(
405
+ 'enable' => array (
406
+ 'id' => 'fancybox_enableSWF',
407
+ 'input' => 'checkbox',
408
+ 'hide' => true,
409
+ 'default' => '',
410
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('SWF','easy-fancybox') . '</strong>'
411
+ ),
412
+ 'autoAttribute' => array (
413
+ 'id' => 'fancybox_autoAttributeSWF',
414
+ 'input' => 'checkbox',
415
+ 'hide' => true,
416
+ 'default' => '',
417
+ 'selector' => 'href$=".swf"',
418
+ 'description' => __('Auto-detect','easy-fancybox')
419
+ ),
420
+ 'class' => array (
421
+ 'hide' => true,
422
+ 'default' => 'fancybox-swf'
423
+ ),
424
+ 'intro' => array (
425
+ 'hide' => true,
426
+ 'description' => __('To make any Flash (.swf) file open in an overlay, switch on auto-detect or use the tag class="fancybox-swf" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
427
+ ),
428
+ 'type' => array(
429
+ 'default' => 'swf'
430
+ ),
431
+ 'width' => array (
432
+ 'id' => 'fancybox_SWFWidth',
433
+ 'title' => __('Width'),
434
+ 'label_for' => 'fancybox_SWFWidth',
435
+ 'input' => 'text',
436
+ 'class' => 'small-text',
437
+ 'options' => array(),
438
+ 'default' => '680',
439
+ 'description' => ' '
440
+ ),
441
+ 'height' => array (
442
+ 'id' => 'fancybox_SWFHeight',
443
+ 'title' => __('Height'),
444
+ 'label_for' => 'fancybox_SWFHeight',
445
+ 'input' => 'text',
446
+ 'class' => 'small-text',
447
+ 'options' => array(),
448
+ 'default' => '495',
449
+ ),
450
+ 'padding' => array (
451
+ 'id' => 'fancybox_SWFpadding',
452
+ 'title' => __('Border'),
453
+ 'label_for' => 'fancybox_SWFpadding',
454
+ 'input' => 'text',
455
+ 'class' => 'small-text',
456
+ 'default' => '0',
457
+ 'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
458
+ ),
459
+ 'autoScale' => array (
460
+ 'noquotes' => true,
461
+ 'default' => 'false'
462
+ ),
463
+ 'titleShow' => array (
464
+ 'id' => 'fancybox_SWFtitleShow',
465
+ 'input' => 'checkbox',
466
+ 'default' => '',
467
+ 'description' => __('Show title','easy-fancybox')
468
+ ),
469
+ 'titlePosition' => array (
470
+ 'id' => 'fancybox_SWFtitlePosition',
471
+ 'title' => __('Title Position','easy-fancybox'),
472
+ 'label_for' => 'fancybox_SWFtitlePosition',
473
+ 'input' => 'select',
474
+ 'options' => array(
475
+ 'float' => __('Float','easy-fancybox'), // same as 'float'
476
+ 'outside' => __('Outside','easy-fancybox'),
477
+ 'inside' => __('Inside','easy-fancybox')
478
+ //,'over' => __('Overlay','easy-fancybox')
479
+ ),
480
+ 'default' => 'float',
481
+ ),
482
+ 'titleFromAlt' => array (
483
+ 'id' => 'fancybox_SWFtitleFromAlt',
484
+ 'input' => 'checkbox',
485
+ 'default' => '',
486
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
487
+ ),
488
+ 'transitionOut' => array (
489
+ 'id' => 'fancybox_SWFtransitionOut',
490
+ 'title' => __('Transition Out','easy-fancybox'),
491
+ 'label_for' => 'fancybox_SWFtransitionOut',
492
+ 'input' => 'select',
493
+ 'class' => '',
494
+ 'options' => array(
495
+ 'fade' => __('Fade','easy-fancybox'),
496
+ //'elastic' => __('Elastic','easy-fancybox'),
497
+ 'none' => __('None','easy-fancybox')
498
+ ),
499
+ 'default' => 'fade',
500
+ ),
501
+ 'easingIn' => array (
502
+ 'default' => 'swing'
503
+ ),
504
+ 'swf' => array (
505
+ 'noquotes' => true,
506
+ 'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
507
+ )
508
+ )
509
  ),
510
+
511
+ 'YouTube' => array(
512
+ 'title' => __('YouTube','easy-fancybox'),
513
+ 'input' => 'multiple',
 
 
514
  'options' => array(
515
+ 'enable' => array (
516
+ 'id' => 'fancybox_enableYoutube',
517
+ 'input' => 'checkbox',
518
+ 'hide' => true,
519
+ 'default' => '',
520
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('YouTube','easy-fancybox') . '</strong>'
521
+ ),
522
+ 'autoAttribute' => array (
523
+ 'id' => 'fancybox_autoAttributeYoutube',
524
+ 'input' => 'checkbox',
525
+ 'hide' => true,
526
+ 'default' => '',
527
+ 'selector' => 'href*="youtube.com/"',
528
+ //'href-replace' => "return attr.replace(new RegExp('watch\\\?v=', 'i'), 'v/')",
529
+ 'description' => __('Auto-detect','easy-fancybox')
530
+ ),
531
+ 'autoAttributeAlt' => array (
532
+ 'id' => 'fancybox_autoAttributeYoutubeShortURL',
533
+ 'input' => 'checkbox',
534
+ 'hide' => true,
535
+ 'default' => '',
536
+ 'selector' => 'href*="youtu.be/"',
537
+ //'href-replace' => "return attr.replace(new RegExp('youtu.be', 'i'), 'www.youtube.com/v')",
538
+ 'description' => __('Auto-detect Short links','easy-fancybox')
539
+ ),
540
+ 'class' => array (
541
+ 'hide' => true,
542
+ 'default' => 'fancybox-youtube'
543
+ ),
544
+ 'intro' => array (
545
+ 'hide' => true,
546
+ 'description' => __('To make any YouTube movie open in an overlay, switch on auto-detect or use the tag class="fancybox-youtube" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
547
+ ),
548
+ 'type' => array(
549
+ 'default' => 'swf'
550
+ ),
551
+ 'width' => array (
552
+ 'id' => 'fancybox_YoutubeWidth',
553
+ 'title' => __('Width'),
554
+ 'label_for' => 'fancybox_YoutubeWidth',
555
+ 'input' => 'text',
556
+ 'class' => 'small-text',
557
+ 'default' => '640',
558
+ 'description' => ' '
559
+ ),
560
+ 'height' => array (
561
+ 'id' => 'fancybox_YoutubeHeight',
562
+ 'title' => __('Height'),
563
+ 'label_for' => 'fancybox_YoutubeHeight',
564
+ 'input' => 'text',
565
+ 'class' => 'small-text',
566
+ 'default' => '385',
567
+ ),
568
+ 'padding' => array (
569
+ 'id' => 'fancybox_Youtubepadding',
570
+ 'title' => __('Border'),
571
+ 'label_for' => 'fancybox_Youtubepadding',
572
+ 'input' => 'text',
573
+ 'class' => 'small-text',
574
+ 'default' => '0',
575
+ 'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
576
+ ),
577
+ 'autoScale' => array (
578
+ 'noquotes' => true,
579
+ 'default' => 'false'
580
+ ),
581
+ 'titleShow' => array (
582
+ 'id' => 'fancybox_YoutubetitleShow',
583
+ 'input' => 'checkbox',
584
+ 'default' => '',
585
+ 'description' => __('Show title','easy-fancybox')
586
+ ),
587
+ 'titlePosition' => array (
588
+ 'id' => 'fancybox_YoutubetitlePosition',
589
+ 'title' => __('Title Position','easy-fancybox'),
590
+ 'label_for' => 'fancybox_YoutubetitlePosition',
591
+ 'input' => 'select',
592
+ 'options' => array(
593
+ 'float' => __('Float','easy-fancybox'), // same as 'float'
594
+ 'outside' => __('Outside','easy-fancybox'),
595
+ 'inside' => __('Inside','easy-fancybox')
596
+ //,'over' => __('Overlay','easy-fancybox')
597
+ ),
598
+ 'default' => 'float',
599
+ ),
600
+ 'titleFromAlt' => array (
601
+ 'id' => 'fancybox_YoutubetitleFromAlt',
602
+ 'input' => 'checkbox',
603
+ 'default' => '',
604
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
605
+ ),
606
+ 'transitionOut' => array (
607
+ 'id' => 'fancybox_YoutubetransitionOut',
608
+ 'title' => __('Transition Out','easy-fancybox'),
609
+ 'label_for' => 'fancybox_YoutubetransitionOut',
610
+ 'input' => 'select',
611
+ 'options' => array(
612
+ 'fade' => __('Fade','easy-fancybox'),
613
+ //'elastic' => __('Elastic','easy-fancybox'),
614
+ 'none' => __('None','easy-fancybox')
615
+ ),
616
+ 'default' => 'fade'
617
+ ),
618
+ 'easingIn' => array (
619
+ 'default' => 'swing'
620
+ ),
621
+ 'swf' => array (
622
+ 'noquotes' => true,
623
+ 'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
624
+ ),
625
+ 'onStart' => array (
626
+ 'noquotes' => true,
627
+ 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'youtu.be\', \'i\'), \'www.youtube.com/v\').replace(new RegExp(\'watch\\\?v=\', \'i\'), \'v/\') }'
628
+ )
629
+ )
630
  ),
631
+
632
+ 'Vimeo' => array(
633
+ 'title' => __('Vimeo','easy-fancybox'),
634
+ 'input' => 'multiple',
 
 
635
  'options' => array(
636
+ 'enable' => array (
637
+ 'id' => 'fancybox_enableVimeo',
638
+ 'input' => 'checkbox',
639
+ 'hide' => true,
640
+ 'default' => '',
641
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('Vimeo','easy-fancybox') . '</strong>'
642
+ ),
643
+ 'autoAttribute' => array (
644
+ 'id' => 'fancybox_autoAttributeVimeo',
645
+ 'input' => 'checkbox',
646
+ 'hide' => true,
647
+ 'default' => '',
648
+ 'selector' => 'href*="vimeo.com/"',
649
+ //'href-replace' => "return attr.replace(new RegExp('/([0-9])', 'i'), '/moogaloop.swf?clip_id=$1')",
650
+ 'description' => __('Auto-detect','easy-fancybox')
651
+ ),
652
+ 'class' => array (
653
+ 'hide' => true,
654
+ 'default' => 'fancybox-vimeo'
655
+ ),
656
+ 'intro' => array (
657
+ 'hide' => true,
658
+ 'description' => __('To make any Vimeo movie open in an overlay, switch on auto-detect or use the tag class="fancybox-vimeo" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
659
+ ),
660
+ 'type' => array(
661
+ 'default' => 'swf'
662
+ ),
663
+ 'width' => array (
664
+ 'id' => 'fancybox_VimeoWidth',
665
+ 'title' => __('Width'),
666
+ 'label_for' => 'fancybox_VimeoWidth',
667
+ 'input' => 'text',
668
+ 'class' => 'small-text',
669
+ 'default' => '640',
670
+ 'description' => ' '
671
+ ),
672
+ 'height' => array (
673
+ 'id' => 'fancybox_VimeoHeight',
674
+ 'title' => __('Height'),
675
+ 'label_for' => 'fancybox_VimeoHeight',
676
+ 'input' => 'text',
677
+ 'class' => 'small-text',
678
+ 'default' => '360'
679
+ ),
680
+ 'padding' => array (
681
+ 'id' => 'fancybox_Vimeopadding',
682
+ 'title' => __('Border'),
683
+ 'label_for' => 'fancybox_Vimeopadding',
684
+ 'input' => 'text',
685
+ 'class' => 'small-text',
686
+ 'default' => '0',
687
+ 'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
688
+ ),
689
+ 'autoScale' => array (
690
+ 'noquotes' => true,
691
+ 'default' => 'false'
692
+ ),
693
+ 'transitionOut' => array (
694
+ 'id' => 'fancybox_VimeotransitionOut',
695
+ 'title' => __('Transition Out','easy-fancybox'),
696
+ 'label_for' => 'fancybox_VimeotransitionOut',
697
+ 'input' => 'select',
698
+ 'options' => array(
699
+ 'fade' => __('Fade','easy-fancybox'),
700
+ //'elastic' => __('Elastic','easy-fancybox'),
701
+ 'none' => __('None','easy-fancybox')
702
+ ),
703
+ 'default' => 'fade',
704
+ 'description' => __('Transition effect when closing the overlay.','easy-fancybox')
705
+ ),
706
+ 'easingIn' => array (
707
+ 'default' => 'swing'
708
+ ),
709
+ 'titleShow' => array (
710
+ 'id' => 'fancybox_VimeotitleShow',
711
+ 'input' => 'checkbox',
712
+ 'default' => '',
713
+ 'description' => __('Show title','easy-fancybox')
714
+ ),
715
+ 'titlePosition' => array (
716
+ 'id' => 'fancybox_VimeotitlePosition',
717
+ 'title' => __('Title Position','easy-fancybox'),
718
+ 'label_for' => 'fancybox_VimeotitlePosition',
719
+ 'input' => 'select',
720
+ 'options' => array(
721
+ 'float' => __('Float','easy-fancybox'), // same as 'float'
722
+ 'outside' => __('Outside','easy-fancybox'),
723
+ 'inside' => __('Inside','easy-fancybox')
724
+ //,'over' => __('Overlay','easy-fancybox')
725
+ ),
726
+ 'default' => 'float',
727
+ ),
728
+ 'titleFromAlt' => array (
729
+ 'id' => 'fancybox_VimeotitleFromAlt',
730
+ 'input' => 'checkbox',
731
+ 'default' => '',
732
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
733
+ ),
734
+ 'transitionOut' => array (
735
+ 'id' => 'fancybox_VimeotransitionOut',
736
+ 'title' => __('Transition Out','easy-fancybox'),
737
+ 'label_for' => 'fancybox_VimeotransitionOut',
738
+ 'input' => 'select',
739
+ 'options' => array(
740
+ 'fade' => __('Fade','easy-fancybox'),
741
+ //'elastic' => __('Elastic','easy-fancybox'),
742
+ 'none' => __('None','easy-fancybox')
743
+ ),
744
+ 'default' => 'fade',
745
+ 'description' => __('Transition effect when closing the overlay.','easy-fancybox')
746
+ ),
747
+ 'easingIn' => array (
748
+ 'default' => 'swing'
749
+ ),
750
+ 'swf' => array (
751
+ 'noquotes' => true,
752
+ 'default' => '{\'wmode\':\'opaque\',\'allowfullscreen\':true}'
753
+ ),
754
+ 'onStart' => array (
755
+ 'noquotes' => true,
756
+ 'default' => 'function(selectedArray, selectedIndex, selectedOpts) { selectedOpts.href = selectedArray[selectedIndex].href.replace(new RegExp(\'/([0-9])\', \'i\'), \'/moogaloop.swf?clip_id=$1\') }'
757
+ )
758
+ )
759
  ),
760
+
761
+ /* 'Tudou' => array(
762
+ 'id' => 'fancybox_Tudou',
763
+ 'title' => __('Tudou','easy-fancybox'),
764
+ 'label_for' => '',
765
+ 'input' => 'multiple',
766
+ 'class' => '', 'description' => '',
767
+ 'options' => array(
768
+ 'autoAttributeTudou' => array (
769
+ 'id' => 'fancybox_autoAttributeTudou',
770
+ 'label_for' => '',
771
+ 'input' => 'checkbox',
772
+ 'class' => '',
773
+ 'options' => array(),
774
+ 'hide' => true,
775
+ 'default' => '1',
776
+ 'description' => __('Tudou links','easy-fancybox')
777
+ )
778
+ )
779
+ ),*/
780
+
781
+ /* 'Animoto' => array(),
782
+
783
+ Example ANIMOTO page link http://animoto.com/play/Kf9POzQMSOGWyu41gtOtsw should become
784
+ http://static.animoto.com/swf/w.swf?w=swf/vp1&f=Kf9POzQMSOGWyu41gtOtsw&i=m
785
+
786
+ */
787
+
788
+ 'iFrame' => array(
789
+ 'title' => __('iFrames','easy-fancybox'),
790
+ 'input' => 'multiple',
791
+ 'options' => array(
792
+ 'enable' => array (
793
+ 'id' => 'fancybox_enableiFrame',
794
+ 'input' => 'checkbox',
795
+ 'hide' => true,
796
+ 'default' => '',
797
+ 'description' => '<strong>' . __('Enable FancyBox for','easy-fancybox') . ' ' . __('iFrames','easy-fancybox') . '</strong>'
798
+ ),
799
+ 'class' => array (
800
+ 'hide' => true,
801
+ 'default' => 'fancybox-iframe'
802
+ ),
803
+ 'intro' => array (
804
+ 'hide' => true,
805
+ 'description' => __('To make a website or HTML document open in an overlay, use the tag class="fancybox-iframe" or class="fancybox iframe" for its link.','easy-fancybox') . ' ' . __('Adjust its specific settings below.','easy-fancybox') . '<br /><br />'
806
+ ),
807
+ 'type' => array (
808
+ 'default' => 'iframe'
809
+ ),
810
+ 'width' => array (
811
+ 'id' => 'fancybox_iFramewidth',
812
+ 'title' => __('Width'),
813
+ 'label_for' => 'fancybox_iFramewidth',
814
+ 'input' => 'text',
815
+ 'class' => 'small-text',
816
+ 'default' => '70%',
817
+ 'description' => ' '
818
+ ),
819
+ 'height' => array (
820
+ 'id' => 'fancybox_iFrameheight',
821
+ 'title' => __('Height'),
822
+ 'label_for' => 'fancybox_iFrameheight',
823
+ 'input' => 'text',
824
+ 'class' => 'small-text',
825
+ 'default' => '90%',
826
+ ),
827
+ 'padding' => array (
828
+ 'id' => 'fancybox_iFramepadding',
829
+ 'title' => __('Border'),
830
+ 'label_for' => 'fancybox_iFramepadding',
831
+ 'input' => 'text',
832
+ 'class' => 'small-text',
833
+ 'default' => '0',
834
+ 'description' => '<br />' . __('Width and height can be relative (%) or absolute sizes.','easy-fancybox') . ' ' . __('Set Border 0 to remove it.','easy-fancybox') . '<br />'
835
+ ),
836
+ 'scrolling' => array (
837
+ 'default' => 'auto'
838
+ ),
839
+ 'autoScale' => array (
840
+ 'noquotes' => true,
841
+ 'default' => 'false'
842
+ ),
843
+ 'titleShow' => array (
844
+ 'id' => 'fancybox_iFrametitleShow',
845
+ 'input' => 'checkbox',
846
+ 'default' => '',
847
+ 'description' => __('Show title','easy-fancybox')
848
+ ),
849
+ 'titlePosition' => array (
850
+ 'id' => 'fancybox_iFrametitlePosition',
851
+ 'title' => __('Title Position','easy-fancybox'),
852
+ 'label_for' => 'fancybox_iFrametitlePosition',
853
+ 'input' => 'select',
854
+ 'options' => array(
855
+ 'float' => __('Float','easy-fancybox'), // same as 'float'
856
+ 'outside' => __('Outside','easy-fancybox'),
857
+ 'inside' => __('Inside','easy-fancybox')
858
+ //,'over' => __('Overlay','easy-fancybox')
859
+ ),
860
+ 'default' => 'float',
861
+ ),
862
+ 'titleFromAlt' => array (
863
+ 'id' => 'fancybox_iFrametitleFromAlt',
864
+ 'input' => 'checkbox',
865
+ 'default' => '',
866
+ 'description' => __('Get title from the thumbnail alt tag','easy-fancybox')
867
+ ),
868
+ 'transitionOut' => array (
869
+ 'id' => 'fancybox_iFrametransitionOut',
870
+ 'title' => __('Transition Out','easy-fancybox'),
871
+ 'label_for' => 'fancybox_iFrametransitionOut',
872
+ 'input' => 'select',
873
+ 'options' => array(
874
+ 'fade' => __('Fade','easy-fancybox'),
875
+ //'elastic' => __('Elastic','easy-fancybox'),
876
+ 'none' => __('None','easy-fancybox')
877
+ ),
878
+ 'default' => 'fade'
879
+ ),
880
+ 'easingIn' => array (
881
+ 'default' => 'swing'
882
+ )
883
+ )
884
+ )
885
+
886
  );
887
  }
888
 
889
  function easy_fancybox() {
890
  $easy_fancybox_array = easy_fancybox_settings();
891
 
892
+ echo "
893
+ <!-- Easy FancyBox plugin for WordPress using FancyBox ".FANCYBOX_VERSION." - RavanH (http://4visions.nl/en/wordpress-plugins/easy-fancybox/) -->";
894
+
895
+ // check for any enabled sections
896
+ $do_fancybox = false;
897
+ foreach ($easy_fancybox_array as $value) {
898
+ if ( '1' == get_option($value['options']['enable']['id'],$value['options']['enable']['default']) ) {
899
+ $do_fancybox = true;
900
+ break;
901
+ }
902
+ }
903
+ if (!$do_fancybox) {
904
+ echo "
905
+ <!-- No sections enabled under Settings > Media > FancyBox -->
906
+
907
+ ";
908
+ return;
909
+ }
910
+
911
  // begin output FancyBox settings
912
  echo "
 
913
  <script type=\"text/javascript\">
914
  jQuery(document).ready(function($){";
915
+
916
+ /*
917
+ * Global settings routine
918
+ */
919
+ $more=0;
920
+ echo '
921
+ var fb_opts = {';
922
+ foreach ($easy_fancybox_array['Global']['options'] as $_key => $_values) {
923
+ $parm = ($_values['id']) ? get_option($_values['id'], $_values['default']) : $_values['default'];
924
+ $parm = ('checkbox'==$_values['input'] && ''==$parm) ? '0' : $parm;
925
+ if(!$_values['hide'] && $parm!='') {
926
+ $quote = (is_numeric($parm) || $_values['noquotes']) ? '' : '\'';
927
+ if ($more>0)
928
+ echo ',';
929
+ echo ' \''.$_key.'\' : ';
930
+ if ('checkbox'==$_values['input'])
931
+ echo ( '1' == $parm ) ? 'true' : 'false';
932
+ else
933
+ echo $quote.$parm.$quote;
934
+ $more++;
935
+ } else {
936
+ $$_key = $parm;
937
+ }
938
  }
939
+ echo ' };';
940
+
941
+ foreach ($easy_fancybox_array as $key => $value) {
942
+ // check if not enabled or hide=true then skip
943
+ if ( !get_option($value['options']['enable']['id'], $value['options']['enable']['default']) || $value['hide'] )
944
+ continue;
945
 
946
+ echo '
947
+ /* ' . $key . ' */';
948
+ /*
949
+ * Auto-detection routines (2x)
950
+ */
951
+ $autoAttribute = get_option( $value['options']['autoAttribute']['id'], $value['options']['autoAttribute']['default'] );
952
 
953
+ if(!empty($autoAttribute)) {
954
+ if(is_numeric($autoAttribute)) {
955
+ echo '
956
+ $(\'a['.$value['options']['autoAttribute']['selector'].']\')';
957
+ if ($value['options']['autoAttribute']['href-replace'])
958
+ echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttribute']['href-replace'].'})';
959
+ echo '.addClass(\''.$value['options']['class']['default'].'\');';
960
+ } else {
961
+ $file_types = array_filter( explode( ' ', $autoAttribute) );
962
+ $more=0;
963
+ echo '
964
+ var fb_'.$key.'_selector = \'';
965
+ foreach ($file_types as $type) {
966
+ if ($more>0)
967
+ echo ',';
968
+ echo 'a['.$value['options']['autoAttribute']['selector'].'".'.$type.'"],a['.$value['options']['autoAttribute']['selector'].'".'.strtoupper($type).'"]';
969
+ $more++;
970
+ }
971
+ echo '\';';
972
+ if ( is_single() || is_page() ) {
973
+ echo '
974
+ $(fb_'.$key.'_selector)'.$attributeLimit.'.addClass(\''.$value['options']['class']['default'].'\').attr(\'rel\', \'gallery\');';
975
+ } else {
976
+ echo '
977
+ var fb_'.$key.'_posts = jQuery(\'div.post\');
978
+ fb_'.$key.'_posts.each(function() { jQuery(this).find(fb_'.$key.'_selector)'.$attributeLimit.'.addClass(\''.$value['options']['class']['default'].'\').attr(\'rel\', \'gallery-\' + fb_'.$key.'_posts.index(this)); });';
979
+ }
980
+ }
981
+ }
982
+
983
+ $autoAttributeAlt = get_option( $value['options']['autoAttributeAlt']['id'], $value['options']['autoAttributeAlt']['default'] );
984
+ if(!empty($autoAttributeAlt) && is_numeric($autoAttributeAlt)) {
985
+ echo '
986
+ $(\'a['.$value['options']['autoAttributeAlt']['selector'].']\')';
987
+ if ($value['options']['autoAttributeAlt']['href-replace'])
988
+ echo '.attr(\'href\', function(index, attr){'.$value['options']['autoAttributeAlt']['href-replace']. '})';
989
+ echo '.addClass(\''.$value['options']['class']['default'].'\');';
990
+ }
991
+
992
+ /*
993
+ * Append .fancybox() routine
994
+ */
995
+ $more=0;
996
+ echo '
997
+ $(\'a.'.$value['options']['class']['default'].'\')'.$attributeLimit.'.fancybox( $.extend(fb_opts, {';
998
+ foreach ($value['options'] as $_key => $_values) {
999
+ $parm = ($_values['id']) ? get_option($_values['id'], $_values['default']) : $_values['default'];
1000
+ $parm = ('checkbox'==$_values['input'] && ''==$parm) ? '0' : $parm;
1001
+ if(!$_values['hide'] && $parm!='') {
1002
+ $quote = (is_numeric($parm) || $_values['noquotes']) ? '' : '\'';
1003
+ if ($more>0)
1004
+ echo ',';
1005
+ echo ' \''.$_key.'\' : ';
1006
+ if ('checkbox'==$_values['input'])
1007
+ echo ( '1' == $parm ) ? 'true' : 'false';
1008
+ else
1009
+ echo $quote.$parm.$quote;
1010
+ $more++;
1011
+ }
1012
+ }
1013
+ echo ' }) );';
1014
+
1015
+ }
1016
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1017
  echo"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1018
  });
1019
  </script>
1020
+
1021
  ";
1022
  }
1023
 
1024
  // FancyBox Media Settings Section on Settings > Media admin page
1025
  function easy_fancybox_settings_section() {
1026
+ echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ravanhagen%40gmail%2ecom&item_name=Easy%20FancyBox&item_number=&no_shipping=0&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=us" title="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'"><img src="https://www.paypal.com/en_US/i/btn/x-click-but7.gif" style="border:none;float:right;margin:0 0 10px 10px" alt="'.__('Donate to Easy FancyBox plugin development with PayPal - it\'s fast, free and secure!','easy-fancybox').'" width="72" height="29" /></a><p>'.__('The options in this section are provided by the plugin <strong><a href="http://4visions.nl/en/wordpress-plugins/easy-fancybox/">Easy FancyBox</a></strong> and determine the <strong>Media Lightbox</strong> overlay appearance and behaviour controlled by <strong><a href="http://fancybox.net/">FancyBox</a></strong>.','easy-fancybox').' '.__('First adjust the <strong>Global settings</strong>, then enable each of the other sub-sections that you need and adjust its specific settings.','easy-fancybox').'</p><p>'.__('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 for Title Position and Transition are unavailable for swf, video, pdf and iframe content to ensure browser compatibility and readability.','easy-fancybox').'</p>';
1027
  }
1028
+
1029
  // FancyBox Media Settings Fields
1030
  function easy_fancybox_settings_fields($args){
1031
  switch($args['input']) {
1035
  echo $args['description'];
1036
  break;
1037
  case 'select':
1038
+ if( !empty($args['label_for']) )
1039
+ echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
1040
+ else
1041
+ echo $args['title'];
1042
  echo '
1043
  <select name="'.$args['id'].'" id="'.$args['id'].'">';
1044
  foreach ($args['options'] as $optionkey => $optionvalue) {
1049
  echo '
1050
  </select> ';
1051
  if( empty($args['label_for']) )
1052
+ echo '<label for="'.$args['id'].'">'.$args['description'].'</label> ';
1053
  else
1054
+ echo $args['description'];
1055
  break;
1056
  case 'checkbox':
1057
+ if( !empty($args['label_for']) )
1058
+ echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
1059
+ else
1060
+ echo $args['title'];
1061
  $value = esc_attr( get_option($args['id'], $args['default']) );
1062
  if ($value == "1")
1063
  $checked = ' checked="checked"';
1067
  $default = __('Checked','easy-fancybox');
1068
  else
1069
  $default = __('Unchecked','easy-fancybox');
1070
+ if( empty($args['label_for']) )
1071
+ echo '
1072
+ <label><input type="checkbox" name="'.$args['id'].'" id="'.$args['id'].'" value="1" '.$checked.'/> '.$args['description'].'</label><br />';
1073
+ else
1074
+ echo '
1075
+ <input type="checkbox" name="'.$args['id'].'" id="'.$args['id'].'" value="1" '.$checked.'/> '.$args['description'].'<br />';
1076
  break;
1077
  case 'text':
1078
+ if( !empty($args['label_for']) )
1079
+ echo '<label for="'.$args['label_for'].'">'.$args['title'].'</label> ';
1080
+ else
1081
+ echo $args['title'];
1082
  echo '
1083
+ <input type="text" name="'.$args['id'].'" id="'.$args['id'].'" value="'.esc_attr( get_option($args['id'], $args['default']) ).'" class="'.$args['class'].'"/> ';
1084
  if( empty($args['label_for']) )
1085
+ echo '<label for="'.$args['id'].'">'.$args['description'].'</label> ';
1086
  else
1087
+ echo $args['description'];
1088
  break;
1089
  default:
1090
  echo $args['description'];
1101
  foreach ($easy_fancybox_array as $key => $value) {
1102
  add_settings_field( 'fancybox_'.$key, $value['title'], 'easy_fancybox_settings_fields', 'media', 'fancybox_section', $value);
1103
  if ($value['input']=='multiple')
1104
+ foreach ($value['options'] as $_value)
1105
+ if ($_value['id']) register_setting( 'media', $_value['id'] );
1106
  else
1107
+ if ($value['id']) register_setting( 'media', 'fancybox_'.$key );
1108
  }
1109
  }
1110
 
1111
  function easy_fancybox_enqueue() {
1112
+ $easy_fancybox_array = easy_fancybox_settings();
1113
+
1114
+ // check for any enabled sections plus the need for easing script
1115
+ $do_fancybox = false;
1116
+ $easing = false;
1117
+ foreach ($easy_fancybox_array as $value) {
1118
+ // anything enabled?
1119
+ if ( '1' == get_option($value['options']['enable']['id'],$value['options']['enable']['default']) )
1120
+ $do_fancybox = true;
1121
+ // easing anyone?
1122
+ if ( ( 'elastic' == get_option($value['options']['transitionIn']['id'],$value['options']['transitionIn']['default']) || 'elastic' == get_option($value['options']['transitionOut']['id'],$value['options']['transitionOut']['default']) ) && ( '' != get_option($value['options']['easingIn']['id'],$value['options']['easingIn']['default']) || '' != get_option($value['options']['easingOut']['id'],$value['options']['easingOut']['default']) ) )
1123
+ $easing = true;
1124
+ }
1125
+ if (!$do_fancybox)
1126
+ return;
1127
+
1128
+
1129
+ // check if easy-fancybox.php is moved one dir up like in WPMU's /mu-plugins/
1130
  // NOTE: don't use WP_PLUGIN_URL to avoid problems when installed in /mu-plugins/
1131
  $efb_subdir = (file_exists(dirname(__FILE__).'/easy-fancybox')) ? 'easy-fancybox' : '';
1132
 
1133
  // ENQUEUE
1134
  // register main fancybox script
1135
+ wp_enqueue_script('jquery.fancybox', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.fancybox-'.FANCYBOX_VERSION.'.pack.js', array('jquery'), FANCYBOX_VERSION);
1136
 
1137
+ foreach ($easy_fancybox_array as $value) {
1138
+ if( ( 'elastic' == get_option($value['options']['transitionIn']['id'],$value['options']['transitionIn']['default']) || 'elastic' == get_option($value['options']['transitionOut']['id'],$value['options']['transitionOut']['default']) ) && ( '' != get_option($value['options']['easingIn']['id'],$value['options']['easingIn']['default']) || '' != get_option($value['options']['easingOut']['id'],$value['options']['easingOut']['default']) ) ) {
1139
+ $easing = true;
1140
+ break;
1141
+ }
1142
+ }
1143
+ if ( $easing ) {
1144
  // first get rid of previously registered variants of jquery.easing (by other plugins)
1145
  wp_deregister_script('jquery.easing');
1146
  wp_deregister_script('jqueryeasing');
1147
  wp_deregister_script('jquery-easing');
1148
  wp_deregister_script('easing');
1149
  // then register our version
1150
+ wp_enqueue_script('jquery.easing', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.easing-'.EASING_VERSION.'.pack.js', array('jquery'), EASING_VERSION);
1151
  }
1152
 
1153
  // first get rid of previously registered variants of jquery.mousewheel (by other plugins)
1156
  wp_deregister_script('jquery-mousewheel');
1157
  wp_deregister_script('mousewheel');
1158
  // then register our version
1159
+ wp_enqueue_script('jquery.mousewheel', plugins_url($efb_subdir, __FILE__).'/fancybox/jquery.mousewheel-'.MOUSEWHEEL_VERSION.'.pack.js', array('jquery'), MOUSEWHEEL_VERSION);
1160
 
1161
  // register style
1162
+ wp_enqueue_style('easy-fancybox.css', plugins_url($efb_subdir, __FILE__).'/easy-fancybox.css.php', false, FANCYBOX_VERSION, 'screen');
1163
+
1164
+ }
1165
+
1166
+ // Hack to fix missing wmode in (auto)embed code based on Crantea Mihaita's work-around on
1167
+ // http://www.mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html
1168
+ if(!function_exists('add_video_wmode_opaque')) {
1169
+ function add_video_wmode_opaque($html, $url, $attr) {
1170
+ if (strpos($html, "<embed src=" ) !== false) {
1171
+ $html = str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html);
1172
+ return $html;
1173
+ } else {
1174
+ return $html;
1175
+ }
1176
+ }
1177
  }
1178
 
1179
  // HOOKS //
1180
 
1181
+ add_filter('embed_oembed_html', 'add_video_wmode_opaque', 10, 3);
1182
+
1183
  add_action('wp_enqueue_scripts', 'easy_fancybox_enqueue', 999);
1184
  add_action('wp_head', 'easy_fancybox');
1185
 
fancybox/jquery.fancybox-1.3.3.pack.js DELETED
@@ -1,46 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
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.3 (04/11/2010)
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
- ;(function(a){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,c={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=a.extend(a("<div/>")[0],{prop:0}),M=a.browser.msie&&a.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
19
- F()}},I=function(){var b=o[q],d,g,k,C,P,w;N();e=a.extend({},a.fn.fancybox.defaults,typeof a(b).data("fancybox")=="undefined"?e:a(b).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=a.extend(e,w);k=e.title||(b.nodeName?a(b).attr("title"):b.title)||"";if(b.nodeName&&!e.orig)e.orig=a(b).children("img:first").length?a(b).children("img:first"):a(b);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");d=e.href||(b.nodeName?a(b).attr("href"):b.href)||null;if(/^(?:javascript)/i.test(d)||
20
- d=="#")d=null;if(e.type){g=e.type;if(!d)d=e.content}else if(e.content)g="html";else if(d)g=d.match(J)?"image":d.match(W)?"swf":a(b).hasClass("iframe")?"iframe":d.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){b=d.substr(d.indexOf("#"));g=a(b).length>0?"inline":"ajax"}e.type=g;e.href=d;e.title=k;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;
21
- e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){a(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(a(b).parent().is("#fancybox-content")===true){h=false;break}a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(b)).bind("fancybox-cleanup",function(){a(this).replaceWith(j.children())}).bind("fancybox-cancel",
22
- function(){a(this).replaceWith(m.children())});a(b).appendTo(m);F();break;case "image":h=false;a.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;a("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=d;break;case "swf":e.scrolling="no";e.autoDimensions=false;C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+
23
- d+'"></param>';P="";a.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;a.fancybox.showActivity();e.ajax.win=e.ajax.success;G=a.ajax(a.extend({},e.ajax,{url:d,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
24
- "function"){w=e.ajax.win(d,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":e.autoDimensions=false;Q()}}else O()}},F=function(){m.wrapInner('<div style="width:'+(e.width=="auto"?"auto":e.width+"px")+";height:"+(e.height=="auto"?"auto":e.height+"px")+";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+'"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var b,d;t.hide();if(f.is(":visible")&&
25
- false===c.onCleanup(l,p,c)){a.event.trigger("fancybox-cancel");h=false}else{h=true;a(j.add(u)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");f.is(":visible")&&c.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;c=e;if(c.overlayShow){u.css({"background-color":c.overlayColor,opacity:c.overlayOpacity,cursor:c.hideOnOverlayClick?"pointer":"auto",height:a(document).height()});if(!u.is(":visible")){M&&a("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!==
26
- "hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=c.title||"";y=0;n.empty().removeAttr("style").removeClass();if(c.titleShow!==false){if(a.isFunction(c.titleFormat))b=c.titleFormat(s,l,p,c);else b=s&&s.length?c.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':
27
- '<div id="fancybox-title-'+c.titlePosition+'">'+s+"</div>":false;s=b;if(!(!s||s==="")){n.addClass("fancybox-title-"+c.titlePosition).html(s).appendTo("body").show();switch(c.titlePosition){case "inside":n.css({width:i.width-c.padding*2,marginLeft:c.padding,marginRight:c.padding});y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:c.padding,width:i.width-c.padding*2,bottom:c.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*
28
- -1).appendTo(f);break;default:n.css({width:i.width-c.padding*2,paddingLeft:c.padding,paddingRight:c.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){a(E.add(z).add(A)).hide();b=f.position();r={top:b.top,left:b.left,width:f.width(),height:f.height()};d=r.width==i.width&&r.height==i.height;j.fadeTo(c.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(c.changeFade,1,S)};a.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":c.padding,width:i.width-
29
- c.padding*2,height:e.autoDimensions?"auto":i.height-y-c.padding*2});if(d)g();else{B.prop=0;a(B).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",c.padding);if(c.transitionIn=="elastic"){r=V();j.html(m.contents());f.show();if(c.opacity)i.opacity=0;B.prop=0;a(B).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:T,complete:S})}else{c.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-c.padding*2,height:e.autoDimensions?
30
- "auto":i.height-y-c.padding*2}).html(m.contents());f.css(i).fadeIn(c.transitionIn=="none"?0:c.speedIn,S)}}}},Y=function(){if(c.enableEscapeButton||c.enableKeyboardNav)a(document).bind("keydown.fb",function(b){if(b.keyCode==27&&c.enableEscapeButton){b.preventDefault();a.fancybox.close()}else if((b.keyCode==37||b.keyCode==39)&&c.enableKeyboardNav&&b.target.tagName!=="INPUT"&&b.target.tagName!=="TEXTAREA"&&b.target.tagName!=="SELECT"){b.preventDefault();a.fancybox[b.keyCode==37?"prev":"next"]()}});if(c.showNavArrows){if(c.cyclic&&
31
- l.length>1||p!==0)z.show();if(c.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!a.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}if(e.autoDimensions){f.css("height","auto");j.css("height","auto")}s&&s.length&&n.show();c.showCloseButton&&E.show();Y();c.hideOnContentClick&&j.bind("click",a.fancybox.close);c.hideOnOverlayClick&&u.bind("click",a.fancybox.close);a(window).bind("resize.fb",a.fancybox.resize);c.centerOnScroll&&
32
- a(window).bind("scroll.fb",a.fancybox.center);if(c.type=="iframe")a('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(a.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+c.href+'"></iframe>').appendTo(j);f.show();h=false;a.fancybox.center();c.onComplete(l,p,c);var b,d;if(l.length-1>p){b=l[p+1].href;if(typeof b!=="undefined"&&b.match(J)){d=new Image;d.src=b}}if(p>0){b=l[p-1].href;if(typeof b!=="undefined"&&b.match(J)){d=
33
- new Image;d.src=b}}},T=function(b){var d={width:parseInt(r.width+(i.width-r.width)*b,10),height:parseInt(r.height+(i.height-r.height)*b,10),top:parseInt(r.top+(i.top-r.top)*b,10),left:parseInt(r.left+(i.left-r.left)*b,10)};if(typeof i.opacity!=="undefined")d.opacity=b<0.5?0.5:b;f.css(d);j.css({width:d.width-c.padding*2,height:d.height-y*b-c.padding*2})},U=function(){return[a(window).width()-c.margin*2,a(window).height()-c.margin*2,a(document).scrollLeft()+c.margin,a(document).scrollTop()+c.margin]},
34
- X=function(){var b=U(),d={},g=c.autoScale,k=c.padding*2;d.width=c.width.toString().indexOf("%")>-1?parseInt(b[0]*parseFloat(c.width)/100,10):c.width+k;d.height=c.height.toString().indexOf("%")>-1?parseInt(b[1]*parseFloat(c.height)/100,10):c.height+k;if(g&&(d.width>b[0]||d.height>b[1]))if(e.type=="image"||e.type=="swf"){g=c.width/c.height;if(d.width>b[0]){d.width=b[0];d.height=parseInt((d.width-k)/g+k,10)}if(d.height>b[1]){d.height=b[1];d.width=parseInt((d.height-k)*g+k,10)}}else{d.width=Math.min(d.width,
35
- b[0]);d.height=Math.min(d.height,b[1])}d.top=parseInt(Math.max(b[3]-20,b[3]+(b[1]-d.height-40)*0.5),10);d.left=parseInt(Math.max(b[2]-20,b[2]+(b[0]-d.width-40)*0.5),10);return d},V=function(){var b=e.orig?a(e.orig):false,d={};if(b&&b.length){d=b.offset();d.top+=parseInt(b.css("paddingTop"),10)||0;d.left+=parseInt(b.css("paddingLeft"),10)||0;d.top+=parseInt(b.css("border-top-width"),10)||0;d.left+=parseInt(b.css("border-left-width"),10)||0;d.width=b.width();d.height=b.height();d={width:d.width+c.padding*
36
- 2,height:d.height+c.padding*2,top:d.top-c.padding-20,left:d.left-c.padding-20}}else{b=U();d={width:c.padding*2,height:c.padding*2,top:parseInt(b[3]+b[1]*0.5,10),left:parseInt(b[2]+b[0]*0.5,10)}}return d},Z=function(){if(t.is(":visible")){a("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};a.fn.fancybox=function(b){if(!a(this).length)return this;a(this).data("fancybox",a.extend({},b,a.metadata?a(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();
37
- if(!h){h=true;a(this).blur();o=[];q=0;d=a(this).attr("rel")||"";if(!d||d==""||d==="nofollow")o.push(this);else{o=a("a[rel="+d+"], area[rel="+d+"]");q=o.index(this)}I()}});return this};a.fancybox=function(b,d){var g;if(!h){h=true;g=typeof d!=="undefined"?d:{};o=[];q=parseInt(g.index,10)||0;if(a.isArray(b)){for(var k=0,C=b.length;k<C;k++)if(typeof b[k]=="object")a(b[k]).data("fancybox",a.extend({},g,b[k]));else b[k]=a({}).data("fancybox",a.extend({content:b[k]},g));o=jQuery.merge(o,b)}else{if(typeof b==
38
- "object")a(b).data("fancybox",a.extend({},g,b));else b=a({}).data("fancybox",a.extend({content:b},g));o.push(b)}if(q>o.length||q<0)q=0;I()}};a.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};a.fancybox.hideActivity=function(){t.hide()};a.fancybox.next=function(){return a.fancybox.pos(p+1)};a.fancybox.prev=function(){return a.fancybox.pos(p-1)};a.fancybox.pos=function(b){if(!h){b=parseInt(b);o=l;if(b>-1&&b<l.length){q=b;I()}else if(c.cyclic&&l.length>1){q=b>=l.length?
39
- 0:l.length-1;I()}}};a.fancybox.cancel=function(){if(!h){h=true;a.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};a.fancybox.close=function(){function b(){u.fadeOut("fast");n.empty().hide();f.hide();a.event.trigger("fancybox-cleanup");j.empty();c.onClosed(l,p,c);l=e=[];p=q=0;c=e={};h=false}if(!(h||f.is(":hidden"))){h=true;if(c&&false===c.onCleanup(l,p,c))h=false;else{N();a(E.add(z).add(A)).hide();a(j.add(u)).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");
40
- j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");c.titlePosition!=="inside"&&n.empty();f.stop();if(c.transitionOut=="elastic"){r=V();var d=f.position();i={top:d.top,left:d.left,width:f.width(),height:f.height()};if(c.opacity)i.opacity=1;n.empty().hide();B.prop=1;a(B).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,step:T,complete:b})}else f.fadeOut(c.transitionOut=="none"?0:c.speedOut,b)}}};a.fancybox.resize=function(){u.is(":visible")&&
41
- u.css("height",a(document).height());a.fancybox.center(true)};a.fancybox.center=function(b){var d,g;if(!h){g=b===true?1:0;d=U();!g&&(f.width()>d[0]||f.height()>d[1])||f.stop().animate({top:parseInt(Math.max(d[3]-20,d[3]+(d[1]-j.height()-40)*0.5-c.padding)),left:parseInt(Math.max(d[2]-20,d[2]+(d[0]-j.width()-40)*0.5-c.padding))},typeof b=="number"?b:200)}};a.fancybox.init=function(){if(!a("#fancybox-wrap").length){a("body").append(m=a('<div id="fancybox-tmp"></div>'),t=a('<div id="fancybox-loading"><div></div></div>'),
42
- u=a('<div id="fancybox-overlay"></div>'),f=a('<div id="fancybox-wrap"></div>'));D=a('<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(f);
43
- D.append(j=a('<div id="fancybox-content"></div>'),E=a('<a id="fancybox-close"></a>'),n=a('<div id="fancybox-title"></div>'),z=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(a.fancybox.close);t.click(a.fancybox.cancel);z.click(function(b){b.preventDefault();a.fancybox.prev()});A.click(function(b){b.preventDefault();a.fancybox.next()});
44
- a.fn.mousewheel&&f.bind("mousewheel.fb",function(b,d){if(h||c.type=="image")b.preventDefault();a.fancybox[d>0?"prev":"next"]()});a.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");a('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};a.fn.fancybox.defaults={padding:10,margin:40,opacity:false,
45
- modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,
46
- enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};a(document).ready(function(){a.fancybox.init()})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/{jquery.fancybox-1.3.3.css → jquery.fancybox-1.3.4.css} RENAMED
@@ -7,7 +7,7 @@
7
  * Copyright (c) 2008 - 2010 Janis Skarnelis
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.3 (04/11/2010)
11
  * Requires: jQuery v1.3+
12
  *
13
  * Dual licensed under the MIT and GPL licenses:
7
  * Copyright (c) 2008 - 2010 Janis Skarnelis
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)
11
  * Requires: jQuery v1.3+
12
  *
13
  * Dual licensed under the MIT and GPL licenses:
fancybox/{jquery.fancybox-1.3.3.js → jquery.fancybox-1.3.4.js} RENAMED
@@ -3,11 +3,11 @@
3
  * Simple and fancy lightbox alternative
4
  *
5
  * Examples and documentation at: http://fancybox.net
6
- *
7
  * Copyright (c) 2008 - 2010 Janis Skarnelis
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.3 (04/11/2010)
11
  * Requires: jQuery v1.3+
12
  *
13