Easy Modal - Version 0.9.0.8

Version Description

  • Bug Fix in JS (Missing " fixed)
Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 Easy Modal
Version 0.9.0.8
Comparing to
See all releases

Code changes from version 0.9.0.2 to 0.9.0.8

content/content.php CHANGED
@@ -1,26 +1,13 @@
1
  <?php
2
- /*
3
- * Easy Modal
4
- * http://wizardinternetsolutions.com/project/easy-modal/
5
- *
6
- * Copyright (c) 2011 Wizard Internet Solutions
7
- * http://wizardinternetsolutions.com
8
- *
9
- * Licensed under the MIT license:
10
- * http://www.opensource.org/licenses/mit-license.php
11
- */
12
-
13
- require( '../../../../wp-load.php' );
14
- global $eM;
15
- $options = $eM->getAdminOptions();
16
-
17
  ?>
18
- <div>
19
- <div class='eM-content'>
20
- <h1 class='eM-title'><?php echo $options['title'] ?></h1>
21
-
22
- <?php echo do_shortcode($options['content']) ?>
23
- </div>
24
- </div>
25
- <?php if(strstr($options['content'],'[contact-form')!= NULL){ ?>
26
- <?php } ?>
1
  <?php
2
+ /*
3
+ * Easy Modal
4
+ * http://wizardinternetsolutions.com/project/easy-modal/
5
+ */
6
+ require( '../../../../wp-load.php' );
7
+ global $eM;
8
+ $options = $eM->getAdminOptions();
 
 
 
 
 
 
 
 
9
  ?>
10
+ <div class='eM-content'>
11
+ <h1 class='eM-title'><?php echo $options['title'] ?></h1>
12
+ <?php echo do_shortcode($options['content']) ?>
13
+ </div>
 
 
 
 
 
css/easy-modal-admin.css ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Easy Modal
3
+ * http://wizardinternetsolutions.com/project/easy-modal/
4
+ */
5
+ .full{width:100%;}
6
+ .half{width:49%;float:left;}
7
+ .half.last{float:right;}
8
+ span.desc{font-weight:normal;font-size:.9em;margin-top:2px;display:block;}
9
+ input[type=radio]{margin:0 5px;}
10
+ input[type=radio]+h5{margin-right: 15px;}
11
+ .submit{border:none; padding:0;margin:5px 0;display:block;clear:both;overflow:auto;}
12
+ input[type=submit]{float:right;}
13
+ h5{display:inline-block;margin:0;}
14
+ h4{margin:10px 0 5px;}
css/easy-modal.css DELETED
@@ -1,18 +0,0 @@
1
- /*
2
- * Easy Modal
3
- * http://wizardinternetsolutions.com/project/easy-modal/
4
- *
5
- * Copyright (c) 2011 Wizard Internet Solutions
6
- * http://wizardinternetsolutions.com
7
- *
8
- * Licensed under the MIT license:
9
- * http://www.opensource.org/licenses/mit-license.php
10
- */
11
-
12
- /* Overlay */
13
- #eM-overlay {background-color:#000; cursor:wait;}
14
-
15
- /* Container */
16
- #eM-container {font: 16px/22px 'Trebuchet MS', Verdana, Arial; text-align:left; width:450px;}
17
- .eM-content {background-color:#333; color:#ddd;}
18
- .eM-title {color:#d76300; font-size:20px; line-height:20px; margin:0; padding:0 0 6px 12px; text-align:left;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
easy-modal.php CHANGED
@@ -1,452 +1,75 @@
1
  <?php
2
-
3
  /*
4
-
5
  Plugin Name: Easy Modal
6
-
7
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
8
-
9
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
10
-
11
  Author: Wizard Internet Solutions
12
-
13
- Version: 0.9.0.2
14
-
15
  Author URI: http://wizardinternetsolutions.com
16
-
17
  */
18
-
19
-
20
-
 
 
 
 
 
21
  add_action('wp_print_styles', 'easy_modal_styles');
22
-
23
-
24
-
25
  function easy_modal_styles()
26
-
27
  {
28
-
29
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
30
-
31
-
32
-
33
  if (!is_admin()) {
34
-
35
- wp_enqueue_style('easy-modal-style', $em_plugin_url.'/css/easy-modal.css');
36
-
37
  } else {
38
-
39
- wp_enqueue_style('farbtastic');
40
-
41
- }
42
-
43
  }
44
-
45
  add_action('wp_print_scripts', 'easy_modal_scripts');
46
-
47
-
48
-
49
- function easy_modal_scripts()
50
-
51
- {
52
-
53
  global $eM;
54
-
55
- $options = $eM->getAdminOptions();
56
-
57
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
58
-
59
-
60
-
61
  if (!is_admin()) {
62
-
63
  wp_enqueue_script('jquery');
64
-
65
  wp_enqueue_script('jquery-form', array('jquery'));
66
-
67
  wp_enqueue_script('jquery-simplemodal', $em_plugin_url.'/js/jquery.simplemodal.js', array('jquery'));
68
-
69
- wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js', array('jquery','jquery-simplemodal'));
70
-
71
- wp_localize_script( 'easy-modal-script', 'eMSettings', array(
72
-
73
- 'plugin_url' => $em_plugin_url,
74
-
75
- // Overlay Options
76
-
77
- 'overlayId' => $options['overlayId'],
78
-
79
- 'overlayColor' => $options['overlayColor'],
80
-
81
- 'overlayCss' => $options['overlayCss'],
82
-
83
- 'opacity' => $options['opacity'],
84
-
85
- // Container Options
86
-
87
- 'containerId' => $options['containerId'],
88
-
89
- 'minHeight' => $options['minHeight'],
90
-
91
- 'maxHeight' => $options['maxHeight'],
92
-
93
- 'minWidth' => $options['minWidth'],
94
-
95
- 'maxWidth' => $options['maxWidth'],
96
-
97
- // Content Options
98
-
99
- 'cf7form' => $options['cf7form'],
100
-
101
-
102
-
103
- ));
104
-
105
  } else {
106
-
107
- wp_enqueue_script( 'farbtastic' );
108
-
109
- }
110
-
111
- }
112
-
113
-
114
- class easy_modal {
115
-
116
- var $adminOptionsName = "easy_modalOptions";
117
-
118
- //Returns an array of admin options
119
-
120
- function getAdminOptions() {
121
-
122
- $easy_modalAdminOptions = array(
123
-
124
- 'title' => '',
125
-
126
- 'content' => '',
127
-
128
- 'overlayId' => 'eM-overlay',
129
-
130
- 'overlayColor' => '#000000',
131
-
132
- 'opacity' => '50',
133
-
134
- 'overlayCss' => '',
135
-
136
- 'containerId' => 'eM-container',
137
-
138
- 'minHeight' => '',
139
-
140
- 'maxHeight' => '',
141
-
142
- 'minWidth' => '',
143
-
144
- 'maxWidth' => '',
145
-
146
- 'cf7form' => false,
147
-
148
- );
149
-
150
- $eMOptions = get_option($this->adminOptionsName);
151
-
152
- if (!empty($eMOptions)) {
153
-
154
- foreach ($eMOptions as $key => $option)
155
-
156
- $easy_modalAdminOptions[$key] = $option;
157
-
158
- }
159
-
160
- update_option($this->adminOptionsName, $easy_modalAdminOptions);
161
-
162
- return $easy_modalAdminOptions;
163
-
164
- }
165
-
166
- // Plugin Initialization
167
-
168
- function init() {
169
-
170
- $this->getAdminOptions();
171
-
172
  }
173
-
174
- //Prints out the admin page
175
-
176
- function printAdminPage() {
177
-
178
- $eM_Options = $this->getAdminOptions();
179
-
180
- if (isset($_POST['update_eM_settings'])) {
181
-
182
- if (isset($_POST['eM_title'])) {
183
-
184
- $eM_Options['title'] = apply_filters('content_save_pre', $_POST['eM_title']);
185
-
186
- }
187
-
188
- if (isset($_POST['eM_content'])) {
189
-
190
- if(strstr($_POST['eM_content'],'[contact-form')!= NULL){ $eM_Options['cf7form'] = true; }
191
-
192
- else { $eM_Options['cf7form'] = false; }
193
-
194
- $eM_Options['content'] = $_POST['eM_content'];
195
-
196
- }
197
- // Validate Overlay Options
198
- if (isset($_POST['eM_overlayId'])) {
199
-
200
- $eM_Options['overlayId'] = $_POST['eM_overlayId'];
201
-
202
- }
203
-
204
- if (isset($_POST['eM_overlayColor'])) {
205
-
206
- //hex color is valid
207
-
208
- if(preg_match('/^#[a-f0-9]{6}$/i', $_POST['eM_overlayColor'])){
209
-
210
- $eM_Options['overlayColor'] = $_POST['eM_overlayColor'];
211
-
212
- }
213
-
214
- }
215
-
216
- if (isset($_POST['eM_opacity'])) {
217
-
218
- if ($_POST['eM_opacity']>=0 && $_POST['eM_opacity']<=100){
219
-
220
- $eM_Options['opacity'] = $_POST['eM_opacity'];
221
-
222
- }
223
-
224
- }
225
-
226
- if (isset($_POST['eM_overlayCss'])) {
227
-
228
- $eM_Options['overlayCss'] = $_POST['eM_overlayCss'];
229
-
230
- }
231
-
232
- if (isset($_POST['eM_overlayClose'])) {
233
-
234
- $eM_Options['overlayClose'] = $_POST['eM_overlayClose'];
235
-
236
- }
237
- // Validate Container Options
238
- if (isset($_POST['eM_containerId'])) {
239
-
240
- $eM_Options['containerId'] = $_POST['eM_containerId'];
241
-
242
- }
243
-
244
- if (isset($_POST['eM_minHeight'])) {
245
-
246
- $eM_Options['minHeight'] = $_POST['eM_minHeight'];
247
-
248
- }
249
-
250
- if (isset($_POST['eM_maxHeight'])) {
251
-
252
- $eM_Options['maxHeight'] = $_POST['eM_maxHeight'];
253
-
254
- }
255
-
256
- if (isset($_POST['eM_minWidth'])) {
257
-
258
- $eM_Options['minWidth'] = $_POST['eM_minWidth'];
259
-
260
- }
261
-
262
- if (isset($_POST['eM_maxWidth'])) {
263
-
264
- $eM_Options['maxWidth'] = $_POST['eM_maxWidth'];
265
-
266
- }
267
-
268
- $eM_Options = stripslashes_deep($eM_Options);
269
-
270
- update_option($this->adminOptionsName, $eM_Options);?>
271
-
272
- <div class="updated"><p><strong><?php _e('Settings Updated','easy-modal')?>.</strong></p></div><?php
273
-
274
- } ?>
275
-
276
- <div id="poststuff" class="metabox-holder has-right-sidebar wrap" style="width:600px;">
277
-
278
- <form method="post" action="<?php echo $_SERVER["REQUEST_URI"];?>">
279
-
280
- <h2><?php _e('Easy Modal','easy-modal')?></h2>
281
-
282
- <div class="postbox">
283
-
284
- <h3><?php _e('Modal','easy-modal')?></h3>
285
-
286
- <div class="inside">
287
-
288
- <h4><?php _e('Title','easy-modal')?></h4>
289
-
290
- <p><input type="text" name="eM_title" value="<?php echo $eM_Options['title'];?>" /></p>
291
-
292
- <h4 style="display:inline-block;"><?php _e('Content','easy-modal');?></h4> - <h5 style="display:inline-block;"><?php _e('Can contain shortcodes','easy-modal')?></h5>
293
-
294
- <p><textarea name="eM_content" style="width: 80%; height: 100px;"><?php echo $eM_Options['content']?></textarea></p>
295
-
296
- </div>
297
-
298
- </div>
299
-
300
- <div class="postbox">
301
-
302
- <h3><?php _e('Overlay Options','easy-modal')?></h3>
303
-
304
- <div class="inside">
305
-
306
- <h4><?php _e('CSS Id','easy-modal')?></h4>
307
-
308
- <p><input type="text" name="eM_overlayId" value="<?php echo $eM_Options['overlayId']?>" /></p>
309
-
310
- <h4><?php _e('Overlay Color', 'easy-modal');?></h4>
311
-
312
- <p>
313
- <input type="hidden" name="eM_overlayColor" value="<?php echo $eM_Options['overlayColor']?>" />
314
- <div id="colorSelector" style="height:36px;position:relative;width:36px;">
315
- <div style="background: url('<?php echo WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)) ?>/images/admin/color_selector.png') no-repeat center center transparent;background-color:<?php echo $eM_Options['overlayColor']?>;height: 30px;left: 3px; position: absolute;top: 3px;width: 30px;"></div>
316
- </div>
317
- <script type="text/javascript">
318
- jQuery(document).ready(function() {
319
- jQuery('#colorSelector').ColorPicker({
320
- color: '<?php echo $eM_Options['overlayColor']?>',
321
- onShow: function (colpkr) {
322
- jQuery(colpkr).fadeIn(500);
323
- return false;
324
- },
325
- onHide: function (colpkr) {
326
- jQuery(colpkr).fadeOut(500);
327
- return false;
328
- },
329
- onChange: function (hsb, hex, rgb) {
330
- jQuery('#colorSelector div').css('backgroundColor', '#' + hex);
331
- jQuery('input[name=eM_overlayColor]').val('#' + hex);
332
- }
333
- });
334
- });
335
- </script>
336
- </p>
337
-
338
- <h4><?php _e('Opacity', 'easy-modal');?></h4>
339
-
340
- <p><input type="text" name="eM_opacity" value="<?php echo $eM_Options['opacity']?>" /></p>
341
-
342
- </div>
343
-
344
- </div>
345
-
346
- <div class="postbox">
347
-
348
- <h3><?php _e('Container Options','easy-modal')?></h3>
349
-
350
- <div class="inside">
351
-
352
- <h4><?php _e('CSS Id','easy-modal')?></h4>
353
-
354
- <p><input type="text" name="eM_containerId" value="<?php echo $eM_Options['containerId']?>" /></p>
355
-
356
- <h4></h4>
357
-
358
- <p></p>
359
-
360
- <h4><?php _e('Height','easy-modal')?></h4>
361
-
362
- <p><?php _e('Min','easy-modal')?>: <input type="text" name="eM_minHeight" value="<?php echo $eM_Options['minHeight']?>" /> <?php _e('Max','easy-modal')?>: <input type="text" name="eM_maxHeight" value="<?php echo $eM_Options['maxHeight']?>" /></p>
363
-
364
- <h4><?php _e('Width','easy-modal')?></h4>
365
-
366
- <p><?php _e('Min','easy-modal')?>: <input type="text" name="eM_minWidth" value="<?php echo $eM_Options['minWidth']?>" /> <?php _e('Max','easy-modal')?>: <input type="text" name="eM_maxWidth" value="<?php echo $eM_Options['maxWidth']?>" /></p>
367
-
368
- </div>
369
-
370
- </div>
371
-
372
- <div class="submit">
373
-
374
- <input type="submit" name="update_eM_settings" value="<?php _e('Update Settings','easy-modal')?>" />
375
-
376
- </div>
377
-
378
- </form>
379
-
380
- </div><?php
381
-
382
- }//End function printAdminPage()
383
-
384
-
385
-
386
  }
387
-
388
-
389
  //Initialize the admin panel
390
  add_action('admin_menu', 'easy_modal_ap');
391
-
392
  if (!function_exists("easy_modal_ap")) {
393
-
394
  function easy_modal_ap() {
395
-
396
  global $eM;
397
-
398
  if (!isset($eM)) {
399
-
400
  return;
401
-
402
  }
403
-
404
  if (function_exists('add_options_page')) {
405
-
406
  add_options_page('Easy Modal', 'Easy Modal', 10, basename(__FILE__), array(&$eM, 'printAdminPage'));
407
-
408
  }
409
-
410
  }
411
-
412
  }
413
-
414
  // Display a Settings link on the main Plugins page
415
-
416
  add_filter( 'plugin_action_links', 'easy_modal_plugin_action_links', 10, 2 );
417
-
418
  function easy_modal_plugin_action_links( $links, $file ) {
419
-
420
  if ( $file == plugin_basename( __FILE__ ) ) {
421
-
422
  $posk_links = '<a href="'.get_admin_url().'options-general.php?page=easy-modal.php">'.__('Settings').'</a>';
423
-
424
  // make the 'Settings' link appear first
425
-
426
  array_unshift( $links, $posk_links );
427
-
428
  }
429
-
430
  return $links;
431
-
432
  }
433
-
434
-
435
- // Initialize i18n Support
436
-
437
  add_action( 'init', 'easy_modal_i18n' );
438
-
439
  if(!function_exists(easy_modal_i18n)){
440
-
441
  function easy_modal_i18n() {
442
-
443
  load_plugin_textdomain( 'easy-modal', false, 'easy-modal/languages' );
444
-
445
  }
446
-
447
- }
448
-
449
- $eM = new easy_modal;
450
  register_activation_hook(__FILE__, array(&$eM, 'init'));
451
-
452
  ?>
1
  <?php
 
2
  /*
 
3
  Plugin Name: Easy Modal
 
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
 
5
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
 
6
  Author: Wizard Internet Solutions
7
+ Version: 0.9.0.8
 
 
8
  Author URI: http://wizardinternetsolutions.com
 
9
  */
10
+ $pluginDIR = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
11
+ $pluginFILE = __FILE__;
12
+ if ( ! function_exists( 'get_plugin_data' ) )
13
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
14
+ $plugininfo=get_plugin_data($pluginFILE);
15
+ $cur_ver = $plugininfo['Version'];
16
+ require_once('includes/easy-modal.class.php');
17
+ $eM = new easy_modal;
18
  add_action('wp_print_styles', 'easy_modal_styles');
19
+ add_action( 'admin_init', 'easy_modal_styles' );
 
 
20
  function easy_modal_styles()
 
21
  {
 
22
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
 
 
 
23
  if (!is_admin()) {
24
+ wp_enqueue_style('easy-modal-theme', $em_plugin_url.'/themes/default/styles.css');
 
 
25
  } else {
26
+ wp_enqueue_style('easy-modal-admin-style', $em_plugin_url.'/css/easy-modal-admin.css');
27
+ }
 
 
 
28
  }
 
29
  add_action('wp_print_scripts', 'easy_modal_scripts');
30
+ add_action( 'admin_init', 'easy_modal_styles' );
31
+ function easy_modal_scripts(){
 
 
 
 
 
32
  global $eM;
 
 
 
33
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
 
 
 
34
  if (!is_admin()) {
 
35
  wp_enqueue_script('jquery');
 
36
  wp_enqueue_script('jquery-form', array('jquery'));
 
37
  wp_enqueue_script('jquery-simplemodal', $em_plugin_url.'/js/jquery.simplemodal.js', array('jquery'));
38
+ //wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js', array('jquery','jquery-simplemodal'));
39
+ wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js.php', array('jquery','jquery-simplemodal'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  } else {
41
+ //wp_enqueue_script( 'farbtastic' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
 
 
44
  //Initialize the admin panel
45
  add_action('admin_menu', 'easy_modal_ap');
 
46
  if (!function_exists("easy_modal_ap")) {
 
47
  function easy_modal_ap() {
 
48
  global $eM;
 
49
  if (!isset($eM)) {
 
50
  return;
 
51
  }
 
52
  if (function_exists('add_options_page')) {
 
53
  add_options_page('Easy Modal', 'Easy Modal', 10, basename(__FILE__), array(&$eM, 'printAdminPage'));
 
54
  }
 
55
  }
 
56
  }
 
57
  // Display a Settings link on the main Plugins page
 
58
  add_filter( 'plugin_action_links', 'easy_modal_plugin_action_links', 10, 2 );
 
59
  function easy_modal_plugin_action_links( $links, $file ) {
 
60
  if ( $file == plugin_basename( __FILE__ ) ) {
 
61
  $posk_links = '<a href="'.get_admin_url().'options-general.php?page=easy-modal.php">'.__('Settings').'</a>';
 
62
  // make the 'Settings' link appear first
 
63
  array_unshift( $links, $posk_links );
 
64
  }
 
65
  return $links;
 
66
  }
67
+ /* Initialize i18n Support
 
 
 
68
  add_action( 'init', 'easy_modal_i18n' );
 
69
  if(!function_exists(easy_modal_i18n)){
 
70
  function easy_modal_i18n() {
 
71
  load_plugin_textdomain( 'easy-modal', false, 'easy-modal/languages' );
 
72
  }
73
+ } */
 
 
 
74
  register_activation_hook(__FILE__, array(&$eM, 'init'));
 
75
  ?>
includes/easy-modal.class.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Easy Modal
4
+ * http://wizardinternetsolutions.com/project/easy-modal/
5
+ */
6
+ global $wp, $cur_ver;
7
+ if ( ! function_exists( 'get_plugin_data' ) )
8
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
9
+ $plugininfo=get_plugin_data($pluginFILE);
10
+ $cur_ver = $plugininfo['Version'];
11
+ class easy_modal {
12
+ var $adminOptionsName = "easy_modalOptions";
13
+ //Returns an array of admin options
14
+ function defaultAdminOptions(){
15
+ $easy_modalAdminOptions = array(
16
+ 'title' => '',
17
+ 'content' => '',
18
+ 'overlayId' => 'eM-overlay',
19
+ 'overlayColor' => '#000000',
20
+ 'opacity' => '50',
21
+ 'overlayCss' => '',
22
+ 'overlayClose' => true,
23
+ 'containerId' => 'eM-container',
24
+ 'autoPosition' => true,
25
+ 'positionX' => '',
26
+ 'positionY' => '',
27
+ 'autoResize' => true,
28
+ 'minHeight' => '370',
29
+ 'maxHeight' => '370',
30
+ 'minWidth' => '300',
31
+ 'maxWidth' => '400',
32
+ 'cf7form' => false,
33
+ );
34
+ return $easy_modalAdminOptions;
35
+ }
36
+ function getAdminOptions(){
37
+ $easy_modalAdminOptions = $this->defaultAdminOptions();
38
+ $eMOptions = get_option($this->adminOptionsName);
39
+ if (!empty($eMOptions)) {
40
+ foreach ($eMOptions as $key => $option)
41
+ $easy_modalAdminOptions[$key] = $option;
42
+ }
43
+ update_option($this->adminOptionsName, $easy_modalAdminOptions);
44
+ return $easy_modalAdminOptions;
45
+ }
46
+ function resetAdminOptions() {
47
+ $easy_modalAdminOptions = $this->defaultAdminOptions();
48
+ update_option($this->adminOptionsName, $easy_modalAdminOptions);
49
+ }
50
+ // Plugin Initialization
51
+ function init() {
52
+ global $cur_ver;
53
+ // Erase Settings For versions older than 0.9.0.4
54
+ if(!get_option('eM_version')) $overwrite = true;
55
+ if($overwrite == true) $this->resetAdminOptions();
56
+ update_option('eM_version', $cur_ver);
57
+ $this->getAdminOptions($cur_ver);
58
+ }
59
+ //Prints out the admin page
60
+ function printAdminPage() {
61
+ $eM_Options = $this->getAdminOptions();
62
+ if (isset($_POST['update_eM_settings'])) {
63
+ if (isset($_POST['eM_title'])) {
64
+ $eM_Options['title'] = apply_filters('content_save_pre', $_POST['eM_title']);
65
+ }
66
+ if (isset($_POST['eM_content'])) {
67
+ if(strstr($_POST['eM_content'],'[contact-form')!= NULL){ $eM_Options['cf7form'] = true; }
68
+ else { $eM_Options['cf7form'] = false; }
69
+ $eM_Options['content'] = $_POST['eM_content'];
70
+ }
71
+ // Validate Overlay Options
72
+ if (isset($_POST['eM_overlayId'])) {
73
+ $eM_Options['overlayId'] = $_POST['eM_overlayId'];
74
+ }
75
+ if (isset($_POST['eM_overlayColor'])) {
76
+ //hex color is valid
77
+ if(preg_match('/^#[a-f0-9]{6}$/i', $_POST['eM_overlayColor'])){
78
+ $eM_Options['overlayColor'] = $_POST['eM_overlayColor'];
79
+ }
80
+ }
81
+ if (isset($_POST['eM_opacity'])) {
82
+ if ($_POST['eM_opacity']>=0 && $_POST['eM_opacity']<=100){
83
+ $eM_Options['opacity'] = $_POST['eM_opacity'];
84
+ }
85
+ }
86
+ if (isset($_POST['eM_overlayCss'])) {
87
+ $eM_Options['overlayCss'] = $_POST['eM_overlayCss'];
88
+ }
89
+ if (isset($_POST['eM_overlayClose'])) {
90
+ $eM_Options['overlayClose'] = $_POST['eM_overlayClose'];
91
+ }
92
+ // Validate Container Options
93
+ if (isset($_POST['eM_containerId'])) {
94
+ $eM_Options['containerId'] = $_POST['eM_containerId'];
95
+ }
96
+ if (isset($_POST['eM_autoResize'])) {
97
+ $eM_Options['autoResize'] = $_POST['eM_autoResize'];
98
+ }
99
+ if (isset($_POST['eM_autoPosition'])) {
100
+ $eM_Options['autoPosition'] = $_POST['eM_autoPosition'];
101
+ }
102
+ if (isset($_POST['eM_positionX'])) {
103
+ $eM_Options['positionX'] = $_POST['eM_positionX'];
104
+ }
105
+ if (isset($_POST['eM_positionY'])) {
106
+ $eM_Options['positionY'] = $_POST['eM_positionY'];
107
+ }
108
+ if (isset($_POST['eM_minHeight'])) {
109
+ $eM_Options['minHeight'] = $_POST['eM_minHeight'];
110
+ }
111
+ if (isset($_POST['eM_maxHeight'])) {
112
+ $eM_Options['maxHeight'] = $_POST['eM_maxHeight'];
113
+ }
114
+ if (isset($_POST['eM_minWidth'])) {
115
+ $eM_Options['minWidth'] = $_POST['eM_minWidth'];
116
+ }
117
+ if (isset($_POST['eM_maxWidth'])) {
118
+ $eM_Options['maxWidth'] = $_POST['eM_maxWidth'];
119
+ }
120
+ $eM_Options = stripslashes_deep($eM_Options);
121
+ update_option($this->adminOptionsName, $eM_Options);?>
122
+ <div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
123
+ } ?>
124
+ <div id="poststuff" class="metabox-holder has-right-sidebar wrap">
125
+ <div id="side-info-column" class="inner-sidebar">
126
+ </div>
127
+ <div id="post-body">
128
+ <div id="post-body-content">
129
+ <form method="post" action="<?php echo $_SERVER["REQUEST_URI"];?>">
130
+ <h2><?php _e('Easy Modal','easy-modal')?></h2>
131
+ <div class="postbox full">
132
+ <h3><?php _e('Modal','easy-modal')?></h3>
133
+ <div class="inside">
134
+ <label for="eM_title"><h4><?php _e('Title','easy-modal')?><span class="desc"><?php _e('The title that appears in the modal window.','easy-modal')?></span></h4></label>
135
+ <input type="text" id="eM_title" name="eM_title" value="<?php echo $eM_Options['title'];?>" />
136
+ <label for="eM_content"><h4><?php _e('Content','easy-modal');?><span class="desc"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></span></h4></label>
137
+ <textarea id="eM_content" name="eM_content" style="width: 100%; height: auto;"><?php echo $eM_Options['content']?></textarea>
138
+ <div class="submit">
139
+ <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <div class="postbox half">
144
+ <h3><?php _e('Container Options','easy-modal')?></h3>
145
+ <div class="inside">
146
+ <h4><label for="eM_containerId"><?php _e('Container Id','easy-modal')?><span class="desc"><?php _e('The CSS Id for the container.','easy-modal')?></span></label></h4>
147
+ <input type="text" id="eM_containerId" name="eM_containerId" value="<?php echo $eM_Options['containerId']?>" />
148
+ <h4><?php _e('Auto Position','easy-modal')?><span class="desc"><?php _e('Automatically position the container upon creation and on window resize?','easy-modal')?></span></h4>
149
+ <input type="radio" id="eM_autoPosition1" name="eM_autoPosition" value="false" <?php echo $eM_Options['autoPosition'] == false ? 'checked="checked"' : '' ?> />
150
+ <h5><label for="eM_autoPosition1"><?php _e('False','easy-modal')?></label></h5>
151
+ <input type="radio" id="eM_autoPosition2" name="eM_autoPosition" value="true" <?php echo $eM_Options['autoPosition'] == true ? 'checked="checked"' : '' ?> />
152
+ <h5><label for="eM_autoPosition2"><?php _e('True','easy-modal')?></span></label></h5>
153
+ <h4><?php _e('Position','easy-modal')?><span class="desc"><?php _e('Position of container. Can be number of pixels (px) or percentage (%).','easy-modal')?></span></h4>
154
+ <h5><label for="eM_positionX"><?php _e('Top','easy-modal')?>:</label></h5>
155
+ <input type="text" id="eM_positionX" name="eM_positionX" value="<?php echo $eM_Options['positionX']?>" />
156
+ <h5><label for="eM_positionY"><?php _e('Left','easy-modal')?>:</label></h5>
157
+ <input type="text" id="eM_positionY" name="eM_positionY" value="<?php echo $eM_Options['positionY']?>" />
158
+ <h4><?php _e('Auto Resize','easy-modal')?><span class="desc"><?php _e('Resize the container if it exceeds the browser window dimensions?','easy-modal')?></span></h4>
159
+ <input type="radio" id="eM_autoResize1" name="eM_autoResize" value="false" <?php echo $eM_Options['autoResize'] == false ? 'checked="checked"' : '' ?> />
160
+ <h5><label for="eM_autoResize1"><?php _e('False','easy-modal')?></label></h5>
161
+ <input type="radio" id="eM_autoResize2" name="eM_autoResize" value="true" <?php echo $eM_Options['autoResize'] == true ? 'checked="checked"' : '' ?> />
162
+ <h5><label for="eM_autoResize2"><?php _e('True','easy-modal')?></label></h5>
163
+ <h4><?php _e('Height','easy-modal')?><span class="desc"><?php _e('The height for the container.','easy-modal')?></span></h4>
164
+ <h5><label for="eM_minHeight"><?php _e('Min','easy-modal')?>:</label></h5>
165
+ <input type="text" id="eM_minHeight" name="eM_minHeight" value="<?php echo $eM_Options['minHeight']?>" />
166
+ <h5><label for="eM_maxHeight"><?php _e('Max','easy-modal')?>:</label></h5>
167
+ <input type="text" id="eM_maxHeight" name="eM_maxHeight" value="<?php echo $eM_Options['maxHeight']?>" />
168
+ <h4><?php _e('Width','easy-modal')?><span class="desc"><?php _e('The width of the container.','easy-modal')?></span></h4>
169
+ <h5><label for="eM_minWidth"><?php _e('Min','easy-modal')?>:</label></h5>
170
+ <input type="text" id="eM_minWidth" name="eM_minWidth" value="<?php echo $eM_Options['minWidth']?>" />
171
+ <h5><label for="eM_maxWidth"><?php _e('Max','easy-modal')?>:</label></h5>
172
+ <input type="text" id="eM_maxWidth" name="eM_maxWidth" value="<?php echo $eM_Options['maxWidth']?>" />
173
+ <div class="submit">
174
+ <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <div class="postbox half last">
179
+ <h3><?php _e('Overlay Options','easy-modal')?></h3>
180
+ <div class="inside">
181
+ <h4><label for="eM_overlayId"><?php _e('Overlay Id','easy-modal')?><span class="desc"><?php _e('Choose the CSS Id for the overlay.','easy-modal')?></span></label></h4>
182
+ <input type="text" id="eM_overlayId" name="eM_overlayId" value="<?php echo $eM_Options['overlayId']?>" />
183
+ <h4><label for="colorSelector"><?php _e('Overlay Color', 'easy-modal');?><span class="desc"><?php _e('Choose the overlay color.','easy-modal')?></span></label></h4>
184
+ <input type="hidden" name="eM_overlayColor" value="<?php echo $eM_Options['overlayColor']?>" />
185
+ <div id="colorSelector" style="height:28px;position:relative;width:28px;">
186
+ <div style="background: url('<?php echo WP_PLUGIN_URL.'/' ?>easy-modal/images/admin/color_selector.png') no-repeat center center transparent;background-color:<?php echo $eM_Options['overlayColor']?>;height: 28px;width: 28px;"></div>
187
+ </div>
188
+ <script type="text/javascript">
189
+ jQuery(document).ready(function() {
190
+ jQuery('#colorSelector').ColorPicker({
191
+ color: '<?php echo $eM_Options['overlayColor']?>',
192
+ onShow: function (colpkr) {
193
+ jQuery(colpkr).fadeIn(500);
194
+ return false;
195
+ },
196
+ onHide: function (colpkr) {
197
+ jQuery(colpkr).fadeOut(500);
198
+ return false;
199
+ },
200
+ onChange: function (hsb, hex, rgb) {
201
+ jQuery('#colorSelector div').css('backgroundColor', '#' + hex);
202
+ jQuery('input[name=eM_overlayColor]').val('#' + hex);
203
+ }
204
+ });
205
+ });
206
+ </script>
207
+ <h4><label for="eM_opacity"><?php _e('Opacity', 'easy-modal');?><span class="desc"><?php _e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span></label></h4>
208
+ <input type="text" id="eM_opacity" name="eM_opacity" value="<?php echo $eM_Options['opacity']?>" />
209
+ <h4><?php _e('Close on Click','easy-modal')?><span class="desc"><?php _e('Allow click on overlay to close the dialog?','easy-modal')?></span></h4>
210
+ <input type="radio" id="eM_overlayClose1" name="eM_overlayClose" value="false" <?php echo $eM_Options['overlayClose'] == false ? 'checked="checked"' : '' ?> />
211
+ <label for="eM_overlayClose1"><?php _e('False','easy-modal')?></label>
212
+ <input type="radio" id="eM_overlayClose2" name="eM_overlayClose" value="true" <?php echo $eM_Options['overlayClose'] == true ? 'checked="checked"' : '' ?> />
213
+ <label for="eM_overlayClose2"><?php _e('True','easy-modal')?></label>
214
+ <div class="submit">
215
+ <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
216
+ </div>
217
+ </div>
218
+ </div>
219
+ </form>
220
+ </div>
221
+ </div>
222
+ </div><?php
223
+ }//End function printAdminPage()
224
+ }
225
+ ?>
js/{easy-modal.js → easy-modal.js.php} RENAMED
@@ -1,475 +1,175 @@
 
1
  /*
2
-
3
  * Easy Modal
4
-
5
  * http://wizardinternetsolutions.com/project/easy-modal/
6
-
7
  */
8
-
9
- eM_plugin_url = convertEntities(eMSettings.plugin_url);
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
- eM_overlayId = convertEntities(eMSettings.overlayId);
18
-
19
- eM_overlayColor = convertEntities(eMSettings.overlayColor);
20
-
21
- eM_opacity = convertEntities(eMSettings.opacity);
22
-
23
-
24
-
25
- eM_containerId = convertEntities(eMSettings.containerId);
26
-
27
- eM_minHeight = convertEntities(eMSettings.minHeight);
28
-
29
- eM_maxHeight = convertEntities(eMSettings.maxHeight);
30
-
31
- eM_minWidth = convertEntities(eMSettings.minWidth);
32
-
33
- eM_maxWidth = convertEntities(eMSettings.maxWidth);
34
-
35
-
36
-
37
-
38
-
39
- eM_cf7form = convertEntities(eMSettings.cf7form);
40
-
41
-
42
-
43
-
44
-
45
  jQuery(function ($) {
46
-
47
  var contact = {
48
-
49
  message: null,
50
-
51
  init: function () {
52
-
53
  $('.eModal').click(function (e) {
54
-
55
  e.preventDefault();
56
-
57
  // load the contact form using ajax
58
-
59
-
60
-
61
- $.get("/wp-content/plugins/easy-modal/content/content.php?plugin_url=" + eM_plugin_url, function(data){
62
-
63
  // create a modal dialog with the data
64
-
65
  $(data).modal({
66
-
67
- closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
68
-
69
  position: ["15%",],
70
-
71
  overlayId: eM_overlayId,
72
-
73
  overlayCss: {backgroundColor:eM_overlayColor},
74
-
75
  opacity : eM_opacity,
76
-
77
  containerId: eM_containerId,
78
-
 
 
79
  minHeight: eM_minHeight,
80
-
81
  maxHeight: eM_maxHeight,
82
-
83
  minWidth: eM_minWidth,
84
-
85
  maxWidth: eM_maxWidth,
86
-
87
  onOpen: contact.open,
88
-
89
  onShow: contact.show,
90
-
91
  onClose: contact.close
92
-
93
  });
94
-
95
  });
96
-
97
  });
98
-
99
  },
100
-
101
  open: function (dialog) {
102
-
103
  // add padding to the buttons in firefox/mozilla
104
-
105
  if ($.browser.mozilla) {
106
-
107
  $('#eM-container .contact-button').css({
108
-
109
  'padding-bottom': '2px'
110
-
111
  });
112
-
113
  }
114
-
115
  // input field font size
116
-
117
  if ($.browser.safari) {
118
-
119
  $('#eM-container .contact-input').css({
120
-
121
  'font-size': '.9em'
122
-
123
  });
124
-
125
  }
126
-
127
-
128
-
129
  // dynamically determine height
130
-
131
  var h = 280;
132
-
133
  if ($('#eM-subject').length) {
134
-
135
  h += 26;
136
-
137
  }
138
-
139
  if ($('#eM-cc').length) {
140
-
141
  h += 22;
142
-
143
  }
144
-
145
-
146
-
147
  var title = $('#eM-container .contact-title').html();
148
-
149
  $('#eM-container .contact-title').html('Loading...');
150
-
151
  dialog.overlay.fadeIn(200, function () {
152
-
153
  dialog.container.fadeIn(200, function () {
154
-
155
  dialog.data.fadeIn(200, function () {
156
-
157
  $('#eM-container .contact-content').animate({
158
-
159
  height: h
160
-
161
  }, function () {
162
-
163
  $('#eM-container .contact-title').html(title);
164
-
165
  $('#eM-container form').fadeIn(200, function () {
166
-
167
  $('#eM-container #eM-name').focus();
168
-
169
-
170
-
171
  $('#eM-container .contact-cc').click(function () {
172
-
173
  var cc = $('#eM-container #eM-cc');
174
-
175
  cc.is(':checked') ? cc.attr('checked', '') : cc.attr('checked', 'checked');
176
-
177
  });
178
-
179
-
180
-
181
  // fix png's for IE 6
182
-
183
  if ($.browser.msie && $.browser.version < 7) {
184
-
185
  $('#eM-container .contact-button').each(function () {
186
-
187
  if ($(this).css('backgroundImage').match(/^url[("']+(.*\.png)[)"']+$/i)) {
188
-
189
  var src = RegExp.$1;
190
-
191
  $(this).css({
192
-
193
  backgroundImage: 'none',
194
-
195
  filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + src + '", sizingMethod="crop")'
196
-
197
  });
198
-
199
  }
200
-
201
  });
202
-
203
  }
204
-
205
  });
206
-
207
  });
208
-
209
  });
210
-
211
  });
212
-
213
  });
214
-
215
  },
216
-
217
  show: function (dialog) {
218
-
219
  if(eM_cf7form == true){
220
-
221
  $('div.wpcf7 > form').ajaxForm({
222
-
223
-
224
-
225
  beforeSubmit: function(formData, jqForm, options) {
226
-
227
-
228
-
229
  jqForm.wpcf7ClearResponseOutput();
230
-
231
-
232
-
233
  jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
234
-
235
-
236
-
237
  return true;
238
-
239
-
240
-
241
  },
242
-
243
-
244
-
245
  beforeSerialize: function(jqForm, options) {
246
-
247
-
248
-
249
  jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
250
-
251
-
252
-
253
- $(n).val('');
254
-
255
-
256
-
257
  });
258
-
259
-
260
-
261
  return true;
262
-
263
-
264
-
265
  },
266
-
267
-
268
-
269
  data: { '_wpcf7_is_ajax_call': 1 },
270
-
271
-
272
-
273
  dataType: 'json',
274
-
275
-
276
-
277
  success: function(data) {
278
-
279
-
280
-
281
  var ro = $(data.into).find('div.wpcf7-response-output');
282
-
283
-
284
-
285
  $(data.into).wpcf7ClearResponseOutput();
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
  if (data.invalids) {
294
-
295
-
296
-
297
  $.each(data.invalids, function(i, n) {
298
-
299
-
300
-
301
  $(data.into).find(n.into).wpcf7NotValidTip(n.message);
302
-
303
-
304
-
305
  });
306
-
307
-
308
-
309
  ro.addClass('wpcf7-validation-errors');
310
-
311
-
312
-
313
  }
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
  if (data.captcha)
322
-
323
-
324
-
325
  $(data.into).wpcf7RefillCaptcha(data.captcha);
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
  if (data.quiz)
334
-
335
-
336
-
337
  $(data.into).wpcf7RefillQuiz(data.quiz);
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
  if (1 == data.spam)
346
-
347
-
348
-
349
  ro.addClass('wpcf7-spam-blocked');
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
  if (1 == data.mailSent) {
358
-
359
-
360
-
361
  $(data.into).find('form').resetForm().clearForm();
362
-
363
-
364
-
365
  ro.addClass('wpcf7-mail-sent-ok');
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
  if (data.onSentOk)
374
-
375
-
376
-
377
  $.each(data.onSentOk, function(i, n) { eval(n) });
378
-
379
-
380
-
381
  } else {
382
-
383
-
384
-
385
  ro.addClass('wpcf7-mail-sent-ng');
386
-
387
-
388
-
389
  }
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
  if (data.onSubmit)
398
-
399
-
400
-
401
  $.each(data.onSubmit, function(i, n) { eval(n) });
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
  $(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
410
-
411
-
412
-
413
  $(n).val($(n).attr('title'));
414
-
415
-
416
-
417
  });
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
  ro.append(data.message).slideDown('fast');
426
-
427
-
428
-
429
  }
430
-
431
-
432
-
433
  });
434
-
435
  }
436
-
437
  },
438
-
439
  close: function (dialog) {
440
-
441
  $('#eM-container').fadeOut();
442
-
443
  $('#eM-container .eM-content').animate({
444
-
445
  height: 40
446
-
447
  }, function () {
448
-
449
  dialog.data.fadeOut(200, function () {
450
-
451
  dialog.container.fadeOut(200, function () {
452
-
453
  dialog.overlay.fadeOut(200, function () {
454
-
455
  $.modal.close();
456
-
457
  });
458
-
459
  });
460
-
461
  });
462
-
463
  });
464
-
465
- },
466
-
467
  };
468
-
469
-
470
-
471
  contact.init();
472
-
473
-
474
-
475
  });
1
+ <?php
2
  /*
 
3
  * Easy Modal
 
4
  * http://wizardinternetsolutions.com/project/easy-modal/
5
+ * v 0.9.0.6
6
  */
7
+ header("content-type: application/x-javascript");
8
+ require('../../../../wp-load.php');
9
+ $opt = get_option('easy_modalOptions');
10
+ ?>
11
+ eM_overlayId = "<?php echo $opt['overlayId']?>";
12
+ eM_overlayColor = "<?php echo $opt['overlayColor']?>";
13
+ eM_opacity = "<?php echo $opt['opacity']?>";
14
+ eM_overlayClose = "<?php echo $opt['overlayClose']?>";
15
+ eM_containerId = "<?php echo $opt['containerId']?>";
16
+ eM_autoResize = "<?php echo $opt['autoResize']?>";
17
+ eM_autoPosition = "<?php echo $opt['autoPosition']?>";
18
+ eM_positionX = "<?php echo $opt['positionX']?>";
19
+ eM_positionY = "<?php echo $opt['positionY']?>";
20
+ eM_minHeight = "<?php echo $opt['minHeight']?>";
21
+ eM_maxHeight = "<?php echo $opt['maxHeight']?>";
22
+ eM_minWidth = "<?php echo $opt['minWidth']?>";
23
+ eM_maxWidth = "<?php echo $opt['maxWidth']?>";
24
+ eM_cf7form = "<?php echo $opt['cf7form']?>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  jQuery(function ($) {
 
26
  var contact = {
 
27
  message: null,
 
28
  init: function () {
 
29
  $('.eModal').click(function (e) {
 
30
  e.preventDefault();
 
31
  // load the contact form using ajax
32
+ $.get("<?php echo get_bloginfo('wpurl')?>/wp-content/plugins/easy-modal/content/content.php", function(data){
 
 
 
 
33
  // create a modal dialog with the data
 
34
  $(data).modal({
35
+ closeHTML: "<a href='#' title='Close' class='modal-close'></a>",
 
 
36
  position: ["15%",],
 
37
  overlayId: eM_overlayId,
 
38
  overlayCss: {backgroundColor:eM_overlayColor},
 
39
  opacity : eM_opacity,
40
+ overlayClose: eM_overlayClose,
41
  containerId: eM_containerId,
42
+ autoResize: eM_autoResize,
43
+ autoPosition: eM_autoPosition,
44
+ position: [eM_positionX, eM_positionY],
45
  minHeight: eM_minHeight,
 
46
  maxHeight: eM_maxHeight,
 
47
  minWidth: eM_minWidth,
 
48
  maxWidth: eM_maxWidth,
 
49
  onOpen: contact.open,
 
50
  onShow: contact.show,
 
51
  onClose: contact.close
 
52
  });
 
53
  });
 
54
  });
 
55
  },
 
56
  open: function (dialog) {
 
57
  // add padding to the buttons in firefox/mozilla
 
58
  if ($.browser.mozilla) {
 
59
  $('#eM-container .contact-button').css({
 
60
  'padding-bottom': '2px'
 
61
  });
 
62
  }
 
63
  // input field font size
 
64
  if ($.browser.safari) {
 
65
  $('#eM-container .contact-input').css({
 
66
  'font-size': '.9em'
 
67
  });
 
68
  }
 
 
 
69
  // dynamically determine height
 
70
  var h = 280;
 
71
  if ($('#eM-subject').length) {
 
72
  h += 26;
 
73
  }
 
74
  if ($('#eM-cc').length) {
 
75
  h += 22;
 
76
  }
 
 
 
77
  var title = $('#eM-container .contact-title').html();
 
78
  $('#eM-container .contact-title').html('Loading...');
 
79
  dialog.overlay.fadeIn(200, function () {
 
80
  dialog.container.fadeIn(200, function () {
 
81
  dialog.data.fadeIn(200, function () {
 
82
  $('#eM-container .contact-content').animate({
 
83
  height: h
 
84
  }, function () {
 
85
  $('#eM-container .contact-title').html(title);
 
86
  $('#eM-container form').fadeIn(200, function () {
 
87
  $('#eM-container #eM-name').focus();
 
 
 
88
  $('#eM-container .contact-cc').click(function () {
 
89
  var cc = $('#eM-container #eM-cc');
 
90
  cc.is(':checked') ? cc.attr('checked', '') : cc.attr('checked', 'checked');
 
91
  });
 
 
 
92
  // fix png's for IE 6
 
93
  if ($.browser.msie && $.browser.version < 7) {
 
94
  $('#eM-container .contact-button').each(function () {
 
95
  if ($(this).css('backgroundImage').match(/^url[("']+(.*\.png)[)"']+$/i)) {
 
96
  var src = RegExp.$1;
 
97
  $(this).css({
 
98
  backgroundImage: 'none',
 
99
  filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + src + '", sizingMethod="crop")'
 
100
  });
 
101
  }
 
102
  });
 
103
  }
 
104
  });
 
105
  });
 
106
  });
 
107
  });
 
108
  });
 
109
  },
 
110
  show: function (dialog) {
 
111
  if(eM_cf7form == true){
 
112
  $('div.wpcf7 > form').ajaxForm({
 
 
 
113
  beforeSubmit: function(formData, jqForm, options) {
 
 
 
114
  jqForm.wpcf7ClearResponseOutput();
 
 
 
115
  jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
 
 
 
116
  return true;
 
 
 
117
  },
 
 
 
118
  beforeSerialize: function(jqForm, options) {
 
 
 
119
  jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
120
+ $(n).val('');
 
 
 
 
 
 
121
  });
 
 
 
122
  return true;
 
 
 
123
  },
 
 
 
124
  data: { '_wpcf7_is_ajax_call': 1 },
 
 
 
125
  dataType: 'json',
 
 
 
126
  success: function(data) {
 
 
 
127
  var ro = $(data.into).find('div.wpcf7-response-output');
 
 
 
128
  $(data.into).wpcf7ClearResponseOutput();
 
 
 
 
 
 
 
129
  if (data.invalids) {
 
 
 
130
  $.each(data.invalids, function(i, n) {
 
 
 
131
  $(data.into).find(n.into).wpcf7NotValidTip(n.message);
 
 
 
132
  });
 
 
 
133
  ro.addClass('wpcf7-validation-errors');
 
 
 
134
  }
 
 
 
 
 
 
 
135
  if (data.captcha)
 
 
 
136
  $(data.into).wpcf7RefillCaptcha(data.captcha);
 
 
 
 
 
 
 
137
  if (data.quiz)
 
 
 
138
  $(data.into).wpcf7RefillQuiz(data.quiz);
 
 
 
 
 
 
 
139
  if (1 == data.spam)
 
 
 
140
  ro.addClass('wpcf7-spam-blocked');
 
 
 
 
 
 
 
141
  if (1 == data.mailSent) {
 
 
 
142
  $(data.into).find('form').resetForm().clearForm();
 
 
 
143
  ro.addClass('wpcf7-mail-sent-ok');
 
 
 
 
 
 
 
144
  if (data.onSentOk)
 
 
 
145
  $.each(data.onSentOk, function(i, n) { eval(n) });
 
 
 
146
  } else {
 
 
 
147
  ro.addClass('wpcf7-mail-sent-ng');
 
 
 
148
  }
 
 
 
 
 
 
 
149
  if (data.onSubmit)
 
 
 
150
  $.each(data.onSubmit, function(i, n) { eval(n) });
 
 
 
 
 
 
 
151
  $(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
 
 
 
152
  $(n).val($(n).attr('title'));
 
 
 
153
  });
 
 
 
 
 
 
 
154
  ro.append(data.message).slideDown('fast');
 
 
 
155
  }
 
 
 
156
  });
 
157
  }
 
158
  },
 
159
  close: function (dialog) {
 
160
  $('#eM-container').fadeOut();
 
161
  $('#eM-container .eM-content').animate({
 
162
  height: 40
 
163
  }, function () {
 
164
  dialog.data.fadeOut(200, function () {
 
165
  dialog.container.fadeOut(200, function () {
 
166
  dialog.overlay.fadeOut(200, function () {
 
167
  $.modal.close();
 
168
  });
 
169
  });
 
170
  });
 
171
  });
172
+ }
 
 
173
  };
 
 
 
174
  contact.init();
 
 
 
175
  });
js/jquery.simplemodal.js CHANGED
@@ -1,25 +1,25 @@
1
- /*
2
- * SimpleModal 1.4.1 - jQuery Plugin
3
- * http://www.ericmmartin.com/projects/simplemodal/
4
- * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin)
5
- * Dual licensed under the MIT and GPL licenses
6
- * Revision: $Id: jquery.simplemodal.js 259 2010-11-05 05:53:13Z emartin24 $
7
- */
8
- (function(d){var k=d.browser.msie&&parseInt(d.browser.version)===6&&typeof window.XMLHttpRequest!=="object",m=d.browser.msie&&parseInt(d.browser.version)===7,l=null,f=[];d.modal=function(a,b){return d.modal.impl.init(a,b)};d.modal.close=function(){d.modal.impl.close()};d.modal.focus=function(a){d.modal.impl.focus(a)};d.modal.setContainerDimensions=function(){d.modal.impl.setContainerDimensions()};d.modal.setPosition=function(){d.modal.impl.setPosition()};d.modal.update=function(a,b){d.modal.impl.update(a,
9
- b)};d.fn.modal=function(a){return d.modal.impl.init(this,a)};d.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1E3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,
10
- persist:false,modal:true,onOpen:null,onShow:null,onClose:null};d.modal.impl={d:{},init:function(a,b){var c=this;if(c.d.data)return false;l=d.browser.msie&&!d.boxModel;c.o=d.extend({},d.modal.defaults,b);c.zIndex=c.o.zIndex;c.occb=false;if(typeof a==="object"){a=a instanceof jQuery?a:d(a);c.d.placeholder=false;if(a.parent().parent().size()>0){a.before(d("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));c.d.placeholder=true;c.display=a.css("display");if(!c.o.persist)c.d.orig=
11
- a.clone(true)}}else if(typeof a==="string"||typeof a==="number")a=d("<div></div>").html(a);else{alert("SimpleModal Error: Unsupported data type: "+typeof a);return c}c.create(a);c.open();d.isFunction(c.o.onShow)&&c.o.onShow.apply(c,[c.d]);return c},create:function(a){var b=this;f=b.getDimensions();if(b.o.modal&&k)b.d.iframe=d('<iframe src="javascript:false;"></iframe>').css(d.extend(b.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:f[0],width:f[1],zIndex:b.o.zIndex,top:0,left:0})).appendTo(b.o.appendTo);
12
- b.d.overlay=d("<div></div>").attr("id",b.o.overlayId).addClass("simplemodal-overlay").css(d.extend(b.o.overlayCss,{display:"none",opacity:b.o.opacity/100,height:b.o.modal?f[0]:0,width:b.o.modal?f[1]:0,position:"fixed",left:0,top:0,zIndex:b.o.zIndex+1})).appendTo(b.o.appendTo);b.d.container=d("<div></div>").attr("id",b.o.containerId).addClass("simplemodal-container").css(d.extend(b.o.containerCss,{display:"none",position:"fixed",zIndex:b.o.zIndex+2})).append(b.o.close&&b.o.closeHTML?d(b.o.closeHTML).addClass(b.o.closeClass):
13
- "").appendTo(b.o.appendTo);b.d.wrap=d("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(b.d.container);b.d.data=a.attr("id",a.attr("id")||b.o.dataId).addClass("simplemodal-data").css(d.extend(b.o.dataCss,{display:"none"})).appendTo("body");b.setContainerDimensions();b.d.data.appendTo(b.d.wrap);if(k||l)b.fixIE()},bindEvents:function(){var a=this;d("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});
14
- a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});d(document).bind("keydown.simplemodal",function(b){if(a.o.modal&&b.keyCode===9)a.watchTab(b);else if(a.o.close&&a.o.escClose&&b.keyCode===27){b.preventDefault();a.close()}});d(window).bind("resize.simplemodal",function(){f=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();if(k||l)a.fixIE();else if(a.o.modal){a.d.iframe&&a.d.iframe.css({height:f[0],
15
- width:f[1]});a.d.overlay.css({height:f[0],width:f[1]})}})},unbindEvents:function(){d("."+this.o.closeClass).unbind("click.simplemodal");d(document).unbind("keydown.simplemodal");d(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this,b=a.o.position;d.each([a.d.iframe||null,!a.o.modal?null:a.d.overlay,a.d.container],function(c,h){if(h){var g=h[0].style;g.position="absolute";if(c<2){g.removeExpression("height");g.removeExpression("width");g.setExpression("height",
16
- 'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var e;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):h.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':
17
- parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){e=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");e=e.indexOf("%")===-1?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c=
18
- '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}g.removeExpression("top");g.removeExpression("left");g.setExpression("top",
19
- c);g.setExpression("left",e)}}})},focus:function(a){var b=this;a=a&&d.inArray(a,["first","last"])!==-1?a:"first";var c=d(":input:enabled:visible:"+a,b.d.wrap);setTimeout(function(){c.length>0?c.focus():b.d.wrap.focus()},10)},getDimensions:function(){var a=d(window);return[d.browser.opera&&d.browser.version>"9.5"&&d.fn.jquery<"1.3"||d.browser.opera&&d.browser.version<"9.5"&&d.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:
20
- a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?f[0]:f[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){var c=this;if(!c.d.data)return false;c.d.origHeight=c.getVal(a,"h");c.d.origWidth=c.getVal(b,"w");c.d.data.hide();a&&c.d.container.css("height",a);b&&c.d.container.css("width",b);c.setContainerDimensions();c.d.data.show();c.o.focus&&c.focus();c.unbindEvents();c.bindEvents()},setContainerDimensions:function(){var a=this,b=k||m,c=a.d.origHeight?a.d.origHeight:d.browser.opera?
21
- a.d.container.height():a.getVal(b?a.d.container[0].currentStyle.height:a.d.container.css("height"),"h");b=a.d.origWidth?a.d.origWidth:d.browser.opera?a.d.container.width():a.getVal(b?a.d.container[0].currentStyle.width:a.d.container.css("width"),"w");var h=a.d.data.outerHeight(true),g=a.d.data.outerWidth(true);a.d.origHeight=a.d.origHeight||c;a.d.origWidth=a.d.origWidth||b;var e=a.o.maxHeight?a.getVal(a.o.maxHeight,"h"):null,i=a.o.maxWidth?a.getVal(a.o.maxWidth,"w"):null;e=e&&e<f[0]?e:f[0];i=i&&i<
22
- f[1]?i:f[1];var j=a.o.minHeight?a.getVal(a.o.minHeight,"h"):"auto";c=c?a.o.autoResize&&c>e?e:c<j?j:c:h?h>e?e:a.o.minHeight&&j!=="auto"&&h<j?j:h:j;e=a.o.minWidth?a.getVal(a.o.minWidth,"w"):"auto";b=b?a.o.autoResize&&b>i?i:b<e?e:b:g?g>i?i:a.o.minWidth&&e!=="auto"&&g<e?e:g:e;a.d.container.css({height:c,width:b});a.d.wrap.css({overflow:h>c||g>b?"auto":"visible"});a.o.autoPosition&&a.setPosition()},setPosition:function(){var a=this,b,c;b=f[0]/2-a.d.container.outerHeight(true)/2;c=f[1]/2-a.d.container.outerWidth(true)/
23
- 2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){b=a.o.position[0]||b;c=a.o.position[1]||c}else{b=b;c=c}a.d.container.css({left:c,top:b})},watchTab:function(a){var b=this;if(d(a.target).parents(".simplemodal-container").length>0){b.inputs=d(":input:enabled:visible:first, :input:enabled:visible:last",b.d.data[0]);if(!a.shiftKey&&a.target===b.inputs[b.inputs.length-1]||a.shiftKey&&a.target===b.inputs[0]||b.inputs.length===0){a.preventDefault();b.focus(a.shiftKey?"last":
24
- "first")}}else{a.preventDefault();b.focus()}},open:function(){var a=this;a.d.iframe&&a.d.iframe.show();if(d.isFunction(a.o.onOpen))a.o.onOpen.apply(a,[a.d]);else{a.d.overlay.show();a.d.container.show();a.d.data.show()}a.o.focus&&a.focus();a.bindEvents()},close:function(){var a=this;if(!a.d.data)return false;a.unbindEvents();if(d.isFunction(a.o.onClose)&&!a.occb){a.occb=true;a.o.onClose.apply(a,[a.d])}else{if(a.d.placeholder){var b=d("#simplemodal-placeholder");if(a.o.persist)b.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",
25
- a.display));else{a.d.data.hide().remove();b.replaceWith(a.d.orig)}}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);
1
+ /*
2
+ * SimpleModal 1.4.1 - jQuery Plugin
3
+ * http://www.ericmmartin.com/projects/simplemodal/
4
+ * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin)
5
+ * Dual licensed under the MIT and GPL licenses
6
+ * Revision: $Id: jquery.simplemodal.js 259 2010-11-05 05:53:13Z emartin24 $
7
+ */
8
+ (function(d){var k=d.browser.msie&&parseInt(d.browser.version)===6&&typeof window.XMLHttpRequest!=="object",m=d.browser.msie&&parseInt(d.browser.version)===7,l=null,f=[];d.modal=function(a,b){return d.modal.impl.init(a,b)};d.modal.close=function(){d.modal.impl.close()};d.modal.focus=function(a){d.modal.impl.focus(a)};d.modal.setContainerDimensions=function(){d.modal.impl.setContainerDimensions()};d.modal.setPosition=function(){d.modal.impl.setPosition()};d.modal.update=function(a,b){d.modal.impl.update(a,
9
+ b)};d.fn.modal=function(a){return d.modal.impl.init(this,a)};d.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1E3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,
10
+ persist:false,modal:true,onOpen:null,onShow:null,onClose:null};d.modal.impl={d:{},init:function(a,b){var c=this;if(c.d.data)return false;l=d.browser.msie&&!d.boxModel;c.o=d.extend({},d.modal.defaults,b);c.zIndex=c.o.zIndex;c.occb=false;if(typeof a==="object"){a=a instanceof jQuery?a:d(a);c.d.placeholder=false;if(a.parent().parent().size()>0){a.before(d("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));c.d.placeholder=true;c.display=a.css("display");if(!c.o.persist)c.d.orig=
11
+ a.clone(true)}}else if(typeof a==="string"||typeof a==="number")a=d("<div></div>").html(a);else{alert("SimpleModal Error: Unsupported data type: "+typeof a);return c}c.create(a);c.open();d.isFunction(c.o.onShow)&&c.o.onShow.apply(c,[c.d]);return c},create:function(a){var b=this;f=b.getDimensions();if(b.o.modal&&k)b.d.iframe=d('<iframe src="javascript:false;"></iframe>').css(d.extend(b.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:f[0],width:f[1],zIndex:b.o.zIndex,top:0,left:0})).appendTo(b.o.appendTo);
12
+ b.d.overlay=d("<div></div>").attr("id",b.o.overlayId).addClass("simplemodal-overlay").css(d.extend(b.o.overlayCss,{display:"none",opacity:b.o.opacity/100,height:b.o.modal?f[0]:0,width:b.o.modal?f[1]:0,position:"fixed",left:0,top:0,zIndex:b.o.zIndex+1})).appendTo(b.o.appendTo);b.d.container=d("<div></div>").attr("id",b.o.containerId).addClass("simplemodal-container").css(d.extend(b.o.containerCss,{display:"none",position:"fixed",zIndex:b.o.zIndex+2})).append(b.o.close&&b.o.closeHTML?d(b.o.closeHTML).addClass(b.o.closeClass):
13
+ "").appendTo(b.o.appendTo);b.d.wrap=d("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(b.d.container);b.d.data=a.attr("id",a.attr("id")||b.o.dataId).addClass("simplemodal-data").css(d.extend(b.o.dataCss,{display:"none"})).appendTo("body");b.setContainerDimensions();b.d.data.appendTo(b.d.wrap);if(k||l)b.fixIE()},bindEvents:function(){var a=this;d("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});
14
+ a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});d(document).bind("keydown.simplemodal",function(b){if(a.o.modal&&b.keyCode===9)a.watchTab(b);else if(a.o.close&&a.o.escClose&&b.keyCode===27){b.preventDefault();a.close()}});d(window).bind("resize.simplemodal",function(){f=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();if(k||l)a.fixIE();else if(a.o.modal){a.d.iframe&&a.d.iframe.css({height:f[0],
15
+ width:f[1]});a.d.overlay.css({height:f[0],width:f[1]})}})},unbindEvents:function(){d("."+this.o.closeClass).unbind("click.simplemodal");d(document).unbind("keydown.simplemodal");d(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this,b=a.o.position;d.each([a.d.iframe||null,!a.o.modal?null:a.d.overlay,a.d.container],function(c,h){if(h){var g=h[0].style;g.position="absolute";if(c<2){g.removeExpression("height");g.removeExpression("width");g.setExpression("height",
16
+ 'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var e;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):h.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':
17
+ parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){e=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");e=e.indexOf("%")===-1?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c=
18
+ '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}g.removeExpression("top");g.removeExpression("left");g.setExpression("top",
19
+ c);g.setExpression("left",e)}}})},focus:function(a){var b=this;a=a&&d.inArray(a,["first","last"])!==-1?a:"first";var c=d(":input:enabled:visible:"+a,b.d.wrap);setTimeout(function(){c.length>0?c.focus():b.d.wrap.focus()},10)},getDimensions:function(){var a=d(window);return[d.browser.opera&&d.browser.version>"9.5"&&d.fn.jquery<"1.3"||d.browser.opera&&d.browser.version<"9.5"&&d.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:
20
+ a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?f[0]:f[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){var c=this;if(!c.d.data)return false;c.d.origHeight=c.getVal(a,"h");c.d.origWidth=c.getVal(b,"w");c.d.data.hide();a&&c.d.container.css("height",a);b&&c.d.container.css("width",b);c.setContainerDimensions();c.d.data.show();c.o.focus&&c.focus();c.unbindEvents();c.bindEvents()},setContainerDimensions:function(){var a=this,b=k||m,c=a.d.origHeight?a.d.origHeight:d.browser.opera?
21
+ a.d.container.height():a.getVal(b?a.d.container[0].currentStyle.height:a.d.container.css("height"),"h");b=a.d.origWidth?a.d.origWidth:d.browser.opera?a.d.container.width():a.getVal(b?a.d.container[0].currentStyle.width:a.d.container.css("width"),"w");var h=a.d.data.outerHeight(true),g=a.d.data.outerWidth(true);a.d.origHeight=a.d.origHeight||c;a.d.origWidth=a.d.origWidth||b;var e=a.o.maxHeight?a.getVal(a.o.maxHeight,"h"):null,i=a.o.maxWidth?a.getVal(a.o.maxWidth,"w"):null;e=e&&e<f[0]?e:f[0];i=i&&i<
22
+ f[1]?i:f[1];var j=a.o.minHeight?a.getVal(a.o.minHeight,"h"):"auto";c=c?a.o.autoResize&&c>e?e:c<j?j:c:h?h>e?e:a.o.minHeight&&j!=="auto"&&h<j?j:h:j;e=a.o.minWidth?a.getVal(a.o.minWidth,"w"):"auto";b=b?a.o.autoResize&&b>i?i:b<e?e:b:g?g>i?i:a.o.minWidth&&e!=="auto"&&g<e?e:g:e;a.d.container.css({height:c,width:b});a.d.wrap.css({overflow:h>c||g>b?"auto":"visible"});a.o.autoPosition&&a.setPosition()},setPosition:function(){var a=this,b,c;b=f[0]/2-a.d.container.outerHeight(true)/2;c=f[1]/2-a.d.container.outerWidth(true)/
23
+ 2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){b=a.o.position[0]||b;c=a.o.position[1]||c}else{b=b;c=c}a.d.container.css({left:c,top:b})},watchTab:function(a){var b=this;if(d(a.target).parents(".simplemodal-container").length>0){b.inputs=d(":input:enabled:visible:first, :input:enabled:visible:last",b.d.data[0]);if(!a.shiftKey&&a.target===b.inputs[b.inputs.length-1]||a.shiftKey&&a.target===b.inputs[0]||b.inputs.length===0){a.preventDefault();b.focus(a.shiftKey?"last":
24
+ "first")}}else{a.preventDefault();b.focus()}},open:function(){var a=this;a.d.iframe&&a.d.iframe.show();if(d.isFunction(a.o.onOpen))a.o.onOpen.apply(a,[a.d]);else{a.d.overlay.show();a.d.container.show();a.d.data.show()}a.o.focus&&a.focus();a.bindEvents()},close:function(){var a=this;if(!a.d.data)return false;a.unbindEvents();if(d.isFunction(a.o.onClose)&&!a.occb){a.occb=true;a.o.onClose.apply(a,[a.d])}else{if(a.d.placeholder){var b=d("#simplemodal-placeholder");if(a.o.persist)b.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",
25
+ a.display));else{a.d.data.hide().remove();b.replaceWith(a.d.orig)}}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);
readme.txt CHANGED
@@ -4,29 +4,40 @@ Donate link: http://wizardinternetsolutions.com/
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
  Tested up to: 3.1.3
7
- Stable tag: 0.9.0.2
8
 
9
- This plugin allows you to easily add a Modal window with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
10
 
11
  == Description ==
12
 
13
  This plugin allows you to easily add a Modal window with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
14
 
15
- If you like the plugin please rate it.
 
 
 
 
16
 
 
17
 
18
- [easyModal Page](http://wizardinternetsolutions.com/plugins/easy-modal/ "easyModal Page - Info, Demo and Discussion") - Info, Demo and Feature Discussion
19
 
20
  [Wizard Internet Solutions](http://wizardinternetsolutions.com/ "Website Design & Development") - Developers Site
21
 
 
 
22
  == Installation ==
23
 
24
- 1. Upload `easy-Modal` folder to the `/wp-content/plugins/` directory
25
  2. Activate the plugin through the 'Plugins' menu in WordPress
26
  3. Add `eModal` class to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
27
 
28
  == Frequently Asked Questions ==
29
 
 
 
 
 
30
  = Does this work with CF7 =
31
 
32
  Yes, this will work with any custom form shortcode and uses ajax submit features.
@@ -37,10 +48,35 @@ We have only included some basic styling for the modal at this point. We will be
37
 
38
  == Screenshots ==
39
 
40
- 1. easy-Modal Example used on our site.
 
41
 
42
  == Changelog ==
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  = 0.9.0.2 =
45
  * Added Overlay Color Picker.
46
 
@@ -50,8 +86,9 @@ We have only included some basic styling for the modal at this point. We will be
50
  = 0.9 =
51
  * Initial Release
52
 
53
-
54
  == Upgrade Notice ==
55
 
 
 
56
  = 0.9 =
57
  * Initial Release
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
  Tested up to: 3.1.3
7
+ Stable tag: 0.9.0.8
8
 
9
+ This plugin allows you to easily add a Modal window with just about any content including Contact Form 7 using ajax submission.
10
 
11
  == Description ==
12
 
13
  This plugin allows you to easily add a Modal window with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
14
 
15
+ Basic theme for Contact Form 7 default form. Will be adding theme options in future releases.
16
+
17
+ For feature requests please visit our Easy Modal page at the link below
18
+
19
+ v0.9.0.4 comes with a basic theme to style default CF7 Form. See Screenshots.
20
 
21
+ If you like the plugin please rate it.
22
 
23
+ [Easy Modal Page](http://wizardinternetsolutions.com/plugins/easy-modal/ "Easy Modal Page - Info, Demo and Discussion") - Info, Demo and Feature Discussion
24
 
25
  [Wizard Internet Solutions](http://wizardinternetsolutions.com/ "Website Design & Development") - Developers Site
26
 
27
+ To be notified of plugin updates, [follow us on Twitter](http://twitter.com/wizard_is "Wizard Internet Solutions on Twitter")!
28
+
29
  == Installation ==
30
 
31
+ 1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
32
  2. Activate the plugin through the 'Plugins' menu in WordPress
33
  3. Add `eModal` class to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
34
 
35
  == Frequently Asked Questions ==
36
 
37
+ = The screen changes but my modal never shows. =
38
+
39
+ This is usually because the width and height are not set. Try checking the settings page in the admin area to see if there is a minimum width and height.
40
+
41
  = Does this work with CF7 =
42
 
43
  Yes, this will work with any custom form shortcode and uses ajax submit features.
48
 
49
  == Screenshots ==
50
 
51
+ 1. Easy Modal with default "Contact Fom 7" form.
52
+ 2. Shows CF7 Inline validation used during ajax submit
53
 
54
  == Changelog ==
55
 
56
+ = 0.9.0.8 =
57
+ * Bug Fix in JS (Missing " fixed)
58
+
59
+ = 0.9.0.7 =
60
+ * Bug Fix in JS (Affected loading of content into window)
61
+
62
+ = 0.9.0.6 =
63
+ * Bug Fix in JS (Affected WordPress versions below 3.1)
64
+
65
+ = 0.9.0.5 =
66
+ * Bug Fix in JS (Affected IE7).
67
+
68
+ = 0.9.0.4 =
69
+ * Added "Default" Theme for Modal windows. Includes CF7 Styles and Inline AJAX Styleing. See Screenshots.
70
+ * Default Options Tweaked for better OOB Experience.
71
+ * Added Version to WP Options table to provide better update functionality.
72
+
73
+ = 0.9.0.3 =
74
+ * Overlay Click to Close Option
75
+ * Auto Position Option
76
+ * Position Top Option
77
+ * Position Left Option
78
+ * Auto Resize Option
79
+
80
  = 0.9.0.2 =
81
  * Added Overlay Color Picker.
82
 
86
  = 0.9 =
87
  * Initial Release
88
 
 
89
  == Upgrade Notice ==
90
 
91
+ = 0.9.0.4 =
92
+ * Options will be overwritten with default options.
93
  = 0.9 =
94
  * Initial Release
screenshot-1.jpg ADDED
Binary file
screenshot-2.jpg ADDED
Binary file
themes/default/PIE.htc ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ PIE: CSS3 rendering for IE
3
+ Version 1.0beta4
4
+ http://css3pie.com
5
+ Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
6
+ -->
7
+ <PUBLIC:COMPONENT lightWeight="true">
8
+ <PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" />
9
+ <PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" />
10
+ <PUBLIC:ATTACH EVENT="ondetach" FOR="element" ONEVENT="cleanup()" />
11
+ <script type="text/javascript">
12
+ var doc = element.document;var g=window.PIE;
13
+ if(!g){g=window.PIE={F:"-pie-",Sa:"Pie",Pa:"pie_",Jb:{TD:1,TH:1}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(L){}g.J=function(){for(var a=4,b=doc.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",c[0];);return a}();if(g.J===6)g.F=g.F.replace(/^-/,"");g.Ab=doc.documentMode||g.J;(function(){var a,b=0,c={};g.p={Ga:function(e){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+e)},
14
+ ta:function(e){return e&&e._pieId||(e._pieId=++b)},fb:function(e){var f,h,j,d,i=arguments;f=1;for(h=i.length;f<h;f++){d=i[f];for(j in d)if(d.hasOwnProperty(j))e[j]=d[j]}return e},Pb:function(e,f,h){var j=c[e],d,i;if(j)Object.prototype.toString.call(j)==="[object Array]"?j.push([f,h]):f.call(h,j);else{i=c[e]=[[f,h]];d=new Image;d.onload=function(){j=c[e]={i:d.width,f:d.height};for(var k=0,m=i.length;k<m;k++)i[k][0].call(i[k][1],j);d.onload=null};d.src=e}}}})();g.ia=function(){this.hb=[];this.Db={}};
15
+ g.ia.prototype={aa:function(a){var b=g.p.ta(a),c=this.Db,e=this.hb;if(!(b in c)){c[b]=e.length;e.push(a)}},Ma:function(a){a=g.p.ta(a);var b=this.Db;if(a&&a in b){delete this.hb[b[a]];delete b[a]}},Ia:function(){for(var a=this.hb,b=a.length;b--;)a[b]&&a[b]()}};g.ya=new g.ia;g.ya.Tc=function(){var a=this;if(!a.Uc){setInterval(function(){a.Ia()},250);a.Uc=1}};g.G=new g.ia;window.attachEvent("onbeforeunload",function(){g.G.Ia()});g.G.Ea=function(a,b,c){a.attachEvent(b,c);this.aa(function(){a.detachEvent(b,
16
+ c)})};(function(){function a(){g.za.Ia()}g.za=new g.ia;g.G.Ea(window,"onresize",a)})();(function(){function a(){g.Ra.Ia()}g.Ra=new g.ia;g.G.Ea(window,"onscroll",a);g.za.aa(a)})();(function(){function a(){c=g.Qa.wc()}function b(){if(c){for(var e=0,f=c.length;e<f;e++)g.attach(c[e]);c=0}}var c;g.G.Ea(window,"onbeforeprint",a);g.G.Ea(window,"onafterprint",b)})();g.hd=function(){function a(i){this.V=i}var b=doc.createElement("length-calc"),c=doc.documentElement,e=b.style,f={},h=["mm","cm","in","pt","pc"],
17
+ j=h.length,d={};e.position="absolute";e.top=e.left="-9999px";for(c.appendChild(b);j--;){b.style.width="100"+h[j];f[h[j]]=b.offsetWidth/100}c.removeChild(b);a.prototype={ib:/(px|em|ex|mm|cm|in|pt|pc|%)$/,vb:function(){var i=this.Lc;if(i===void 0)i=this.Lc=parseFloat(this.V);return i},ab:function(){var i=this.ad;if(!i)i=this.ad=(i=this.V.match(this.ib))&&i[0]||"px";return i},a:function(i,k){var m=this.vb(),l=this.ab();switch(l){case "px":return m;case "%":return m*(typeof k==="function"?k():k)/100;
18
+ case "em":return m*this.tb(i);case "ex":return m*this.tb(i)/2;default:return m*f[l]}},tb:function(i){var k=i.currentStyle.fontSize;if(k.indexOf("px")>0)return parseFloat(k);else{b.style.width="1em";i.appendChild(b);k=b.offsetWidth;b.parentNode===i&&i.removeChild(b);return k}}};g.k=function(i){return d[i]||(d[i]=new a(i))};return a}();g.Na=function(){function a(f){this.U=f}var b=g.k("50%"),c={top:1,center:1,bottom:1},e={left:1,center:1,right:1};a.prototype={Dc:function(){if(!this.sb){var f=this.U,
19
+ h=f.length,j=g.u,d=j.ja,i=g.k("0");d=d.fa;i=["left",i,"top",i];if(h===1){f.push(new j.Ta(d,"center"));h++}if(h===2){d&(f[0].h|f[1].h)&&f[0].d in c&&f[1].d in e&&f.push(f.shift());if(f[0].h&d)if(f[0].d==="center")i[1]=b;else i[0]=f[0].d;else if(f[0].Y())i[1]=g.k(f[0].d);if(f[1].h&d)if(f[1].d==="center")i[3]=b;else i[2]=f[1].d;else if(f[1].Y())i[3]=g.k(f[1].d)}this.sb=i}return this.sb},coords:function(f,h,j){var d=this.Dc(),i=d[1].a(f,h);f=d[3].a(f,j);return{x:d[0]==="right"?h-i:i,y:d[2]==="bottom"?
20
+ j-f:f}}};return a}();g.Rb=function(){function a(b){this.V=b}a.prototype={ib:/[a-z]+$/i,ab:function(){return this.lc||(this.lc=this.V.match(this.ib)[0].toLowerCase())},vc:function(){var b=this.fc,c;if(b===undefined){b=this.ab();c=parseFloat(this.V,10);b=this.fc=b==="deg"?c:b==="rad"?c/Math.PI*180:b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();g.$b=function(){function a(c){this.V=c}var b={};a.Sc=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.gb=
21
+ {aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",
22
+ darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",
23
+ indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",
24
+ mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",
25
+ peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",
26
+ whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ca){var c=this.V,e;if(e=c.match(a.Sc)){this.Ca="rgb("+e[1]+","+e[2]+","+e[3]+")";this.qb=parseFloat(e[4])}else{if((e=c.toLowerCase())in a.gb)c="#"+a.gb[e];this.Ca=c;this.qb=c==="transparent"?0:1}}},O:function(c){this.parse();return this.Ca==="currentColor"?c.currentStyle.color:this.Ca},la:function(){this.parse();return this.qb}};g.pa=function(c){return b[c]||(b[c]=new a(c))};return a}();g.u=function(){function a(c){this.Ha=
27
+ c;this.ch=0;this.U=[];this.wa=0}var b=a.ja={xa:1,ob:2,ea:4,ac:8,pb:16,fa:32,A:64,ga:128,ha:256,Aa:512,dc:1024,URL:2048};a.Ta=function(c,e){this.h=c;this.d=e};a.Ta.prototype={db:function(){return this.h&b.A||this.h&b.ga&&this.d==="0"},Y:function(){return this.db()||this.h&b.Aa}};a.prototype={dd:/\s/,Mc:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,zb:/^\-?[_a-z][\w-]*/i,Yc:/^("([^"]*)"|'([^']*)')/,Fc:/^#([\da-f]{6}|[\da-f]{3})/i,bd:{px:b.A,em:b.A,ex:b.A,mm:b.A,cm:b.A,
28
+ "in":b.A,pt:b.A,pc:b.A,deg:b.xa,rad:b.xa,grad:b.xa},sc:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function e(t,n){t=new a.Ta(t,n);if(!c){k.U.push(t);k.wa++}return t}function f(){k.wa++;return null}var h,j,d,i,k=this;if(this.wa<this.U.length)return this.U[this.wa++];for(;this.dd.test(this.Ha.charAt(this.ch));)this.ch++;if(this.ch>=this.Ha.length)return f();j=this.ch;h=this.Ha.substring(this.ch);d=h.charAt(0);switch(d){case "#":if(i=h.match(this.Fc)){this.ch+=i[0].length;return e(b.ea,i[0])}break;
29
+ case '"':case "'":if(i=h.match(this.Yc)){this.ch+=i[0].length;return e(b.dc,i[2]||i[3]||"")}break;case "/":case ",":this.ch++;return e(b.ha,d);case "u":if(i=h.match(this.url)){this.ch+=i[0].length;return e(b.URL,i[2]||i[3]||i[4]||"")}}if(i=h.match(this.Mc)){d=i[0];this.ch+=d.length;if(h.charAt(d.length)==="%"){this.ch++;return e(b.Aa,d+"%")}if(i=h.substring(d.length).match(this.zb)){d+=i[0];this.ch+=i[0].length;return e(this.bd[i[0].toLowerCase()]||b.ac,d)}return e(b.ga,d)}if(i=h.match(this.zb)){d=
30
+ i[0];this.ch+=d.length;if(d.toLowerCase()in g.$b.gb||d==="currentColor")return e(b.ea,d);if(h.charAt(d.length)==="("){this.ch++;if(d.toLowerCase()in this.sc){h=function(t){return t&&t.h&b.ga};i=function(t){return t&&t.h&(b.ga|b.Aa)};var m=function(t,n){return t&&t.d===n},l=function(){return k.next(1)};if((d.charAt(0)==="r"?i(l()):h(l()))&&m(l(),",")&&i(l())&&m(l(),",")&&i(l())&&(d==="rgb"||d==="hsa"||m(l(),",")&&h(l()))&&m(l(),")"))return e(b.ea,this.Ha.substring(j,this.ch));return f()}return e(b.pb,
31
+ d)}return e(b.fa,d)}this.ch++;return e(b.ob,d)},z:function(){return this.U[this.wa-- -2]},all:function(){for(;this.next(););return this.U},da:function(c,e){for(var f=[],h,j;h=this.next();){if(c(h)){j=true;this.z();break}f.push(h)}return e&&!j?null:f}};return a}();var M=function(a){this.e=a};M.prototype={K:0,Qc:function(){var a=this.Ua,b;return!a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Vc:function(){var a=this.Ua,b;return!a||(b=this.o())&&(a.i!==b.i||a.f!==b.f)},ub:function(){var a=this.e.getBoundingClientRect();
32
+ return{x:a.left,y:a.top,i:a.right-a.left,f:a.bottom-a.top}},o:function(){return this.K?this.Da||(this.Da=this.ub()):this.ub()},Ec:function(){return!!this.Ua},Ja:function(){++this.K},La:function(){if(!--this.K){if(this.Da)this.Ua=this.Da;this.Da=null}}};(function(){function a(b){var c=g.p.ta(b);return function(){if(this.K){var e=this.rb||(this.rb={});return c in e?e[c]:(e[c]=b.call(this))}else return b.call(this)}}g.s={K:0,$:function(b){function c(e){this.e=e}g.p.fb(c.prototype,g.s,b);c.kc={};return c},
33
+ m:function(){var b=this.qa(),c=this.constructor.kc;return b?b in c?c[b]:(c[b]=this.ba(b)):null},qa:a(function(){var b=this.e,c=this.constructor,e=b.style;b=b.currentStyle;var f=this.na,h=this.va,j=c.ic||(c.ic=g.F+f);c=c.jc||(c.jc=g.Sa+h.charAt(0).toUpperCase()+h.substring(1));return e[c]||b.getAttribute(j)||e[h]||b.getAttribute(f)}),g:a(function(){return!!this.m()}),D:a(function(){var b=this.qa(),c=b!==this.gc;this.gc=b;return c}),ma:a,Ja:function(){++this.K},La:function(){--this.K||delete this.rb}}})();
34
+ g.Tb=g.s.$({na:g.F+"background",va:g.Sa+"Background",nc:{scroll:1,fixed:1,local:1},Ka:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},Nc:{"padding-box":1,"border-box":1,"content-box":1},rc:{"padding-box":1,"border-box":1},Rc:{top:1,right:1,bottom:1,left:1,center:1},Wc:{contain:1,cover:1},ba:function(a){function b(u){return u.Y()||u.h&i&&u.d in t}function c(u){return u.Y()&&g.k(u.d)||u.d==="auto"&&"auto"}var e=this.e.currentStyle,f,h,j=g.u.ja,d=j.ha,i=j.fa,k=j.ea,m,l,t=this.Rc,n,p,s=null;if(this.$a()){a=
35
+ new g.u(a);s={M:[]};for(h={};f=a.next();){m=f.h;l=f.d;if(!h.P&&m&j.pb&&l==="linear-gradient"){n={ca:[],P:l};for(p={};f=a.next();){m=f.h;l=f.d;if(m&j.ob&&l===")"){p.color&&n.ca.push(p);n.ca.length>1&&g.p.fb(h,n);break}if(m&k){if(n.Xa||n.bb){f=a.z();if(f.h!==d)break;a.next()}p={color:g.pa(l)};f=a.next();if(f.Y())p.Fb=g.k(f.d);else a.z()}else if(m&j.xa&&!n.Xa&&!p.color&&!n.ca.length)n.Xa=new g.Rb(f.d);else if(b(f)&&!n.bb&&!p.color&&!n.ca.length){a.z();n.bb=new g.Na(a.da(function(u){return!b(u)},false))}else if(m&
36
+ d&&l===","){if(p.color){n.ca.push(p);p={}}}else break}}else if(!h.P&&m&j.URL){h.Cb=l;h.P="image"}else if(b(f)&&!h.size){a.z();h.Ya=new g.Na(a.da(function(u){return!b(u)},false))}else if(m&i)if(l in this.Ka)h.Bb=l;else if(l in this.Nc){h.kd=l;if(l in this.rc)h.clip=l}else{if(l in this.nc)h.jd=l}else if(m&k&&!s.color)s.color=g.pa(l);else if(m&d)if(l==="/"){f=a.next();m=f.h;l=f.d;if(m&i&&l in this.Wc)h.size=l;else if(l=c(f))h.size={i:l,f:c(a.next())||a.z()&&l}}else{if(l===","&&h.P){s.M.push(h);h={}}}else return null}h.P&&
37
+ s.M.push(h)}else this.Nb(function(){var u=e.backgroundPositionX,w=e.backgroundPositionY,r=e.backgroundImage,o=e.backgroundColor;s={};if(o!=="transparent")s.color=g.pa(o);if(r!=="none")s.M=[{P:"image",Cb:(new g.u(r)).next().d,Bb:e.backgroundRepeat,Ya:new g.Na((new g.u(u+" "+w)).all())}]});return s&&(s.color||s.M&&s.M[0])?s:null},Nb:function(a){var b=this.e.runtimeStyle,c=b.backgroundImage,e=b.backgroundColor;if(c)b.backgroundImage="";if(e)b.backgroundColor="";a=a.call(this);if(c)b.backgroundImage=
38
+ c;if(e)b.backgroundColor=e;return a},qa:g.s.ma(function(){return this.$a()||this.Nb(function(){var a=this.e.currentStyle;return a.backgroundColor+" "+a.backgroundImage+" "+a.backgroundRepeat+" "+a.backgroundPositionX+" "+a.backgroundPositionY})}),$a:g.s.ma(function(){var a=this.e;return a.style[this.va]||a.currentStyle.getAttribute(this.na)}),Eb:function(){var a=0;if(g.J<7){a=this.e;a=""+(a.style[g.Sa+"PngFix"]||a.currentStyle.getAttribute(g.F+"png-fix"))==="true"}return a},g:g.s.ma(function(){return(this.$a()||
39
+ this.Eb())&&!!this.m()})});g.Xb=g.s.$({Ib:["Top","Right","Bottom","Left"],Kc:{thin:"1px",medium:"3px",thick:"5px"},ba:function(){var a={},b={},c={},e=false,f=true,h=true,j=true;this.Ob(function(){for(var d=this.e.currentStyle,i=0,k,m,l,t,n,p,s;i<4;i++){l=this.Ib[i];s=l.charAt(0).toLowerCase();k=b[s]=d["border"+l+"Style"];m=d["border"+l+"Color"];l=d["border"+l+"Width"];if(i>0){if(k!==t)h=false;if(m!==n)f=false;if(l!==p)j=false}t=k;n=m;p=l;c[s]=g.pa(m);l=a[s]=g.k(b[s]==="none"?"0":this.Kc[l]||l);if(l.a(this.e)>
40
+ 0)e=true}});return e?{nb:a,Zc:b,tc:c,ed:j,uc:f,$c:h}:null},qa:g.s.ma(function(){var a=this.e,b=a.currentStyle,c;a.tagName in g.Jb&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Ob(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Ob:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,e=b.borderColor;if(c)b.borderWidth="";if(e)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(e)b.borderColor=e;return a}});(function(){g.Oa=g.s.$({na:"border-radius",
41
+ va:"borderRadius",ba:function(b){var c=null,e,f,h,j,d=false;if(b){f=new g.u(b);var i=function(){for(var k=[],m;(h=f.next())&&h.Y();){j=g.k(h.d);m=j.vb();if(m<0)return null;if(m>0)d=true;k.push(j)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=i()){if(h){if(h.h&g.u.ja.ha&&h.d==="/")e=i()}else e=b;if(d&&b&&e)c={x:b,y:e}}}return c}});var a=g.k("0");a={tl:a,tr:a,br:a,bl:a};g.Oa.Qb={x:a,y:a}})();g.Vb=g.s.$({na:"border-image",va:"borderImage",Ka:{stretch:1,
42
+ round:1,repeat:1,space:1},ba:function(a){var b=null,c,e,f,h,j,d,i=0,k,m=g.u.ja,l=m.fa,t=m.ga,n=m.A,p=m.Aa;if(a){c=new g.u(a);b={};for(var s=function(r){return r&&r.h&m.ha&&r.d==="/"},u=function(r){return r&&r.h&l&&r.d==="fill"},w=function(){h=c.da(function(r){return!(r.h&(t|p))});if(u(c.next())&&!b.fill)b.fill=true;else c.z();if(s(c.next())){i++;j=c.da(function(){return!(e.h&(t|p|n))&&!(e.h&l&&e.d==="auto")});if(s(c.next())){i++;d=c.da(function(){return!(e.h&(t|n))})}}else c.z()};e=c.next();){a=e.h;
43
+ f=e.d;if(a&(t|p)&&!h){c.z();w()}else if(u(e)&&!b.fill){b.fill=true;w()}else if(a&l&&this.Ka[f]&&!b.repeat){b.repeat={f:f};if(e=c.next())if(e.h&l&&this.Ka[e.d])b.repeat.kb=e.d;else c.z()}else if(a&m.URL&&!b.src)b.src=f;else return null}if(!b.src||!h||h.length<1||h.length>4||j&&j.length>4||i===1&&j.length<1||d&&d.length>4||i===2&&d.length<1)return null;if(!b.repeat)b.repeat={f:"stretch"};if(!b.repeat.kb)b.repeat.kb=b.repeat.f;a=function(r,o){return{T:o(r[0]),S:o(r[1]||r[0]),L:o(r[2]||r[0]),Q:o(r[3]||
44
+ r[1]||r[0])}};b.slice=a(h,function(r){return g.k(r.h&t?r.d+"px":r.d)});b.width=j&&j.length>0?a(j,function(r){return r.h&(n|p)?g.k(r.d):r.d}):(k=this.e.currentStyle)&&{T:g.k(k.borderTopWidth),S:g.k(k.borderRightWidth),L:g.k(k.borderBottomWidth),Q:g.k(k.borderLeftWidth)};b.ua=a(d||[0],function(r){return r.h&n?g.k(r.d):r.d})}return b}});g.Zb=g.s.$({na:"box-shadow",va:"boxShadow",ba:function(a){var b,c=g.k,e=g.u.ja,f;if(a){f=new g.u(a);b={ua:[],cb:[]};for(a=function(){for(var h,j,d,i,k,m;h=f.next();){d=
45
+ h.d;j=h.h;if(j&e.ha&&d===",")break;else if(h.db()&&!k){f.z();k=f.da(function(l){return!l.db()})}else if(j&e.ea&&!i)i=d;else if(j&e.fa&&d==="inset"&&!m)m=true;else return false}h=k&&k.length;if(h>1&&h<5){(m?b.cb:b.ua).push({fd:c(k[0].d),gd:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Xc:c(k[3]?k[3].d:"0"),color:g.pa(i||"currentColor")});return true}return false};a(););}return b&&(b.cb.length||b.ua.length)?b:null}});g.ec=g.s.$({qa:g.s.ma(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),
46
+ ba:function(){var a=this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,e;b.visibility="";e=a.visibility;b.visibility=c;return{cd:e!=="hidden",xc:a.display!=="none"}},g:function(){return false}});g.B={Z:function(a){function b(c,e,f,h){this.e=c;this.q=e;this.j=f;this.parent=h}g.p.fb(b.prototype,g.B,a);return b},eb:false,R:function(){return false},Kb:function(){this.n();this.g()&&this.X()},jb:function(){this.eb=true},Lb:function(){this.g()?this.X():this.n()},Wa:function(a,b){this.Hb(a);for(var c=
47
+ this.ka||(this.ka=[]),e=a+1,f=c.length,h;e<f;e++)if(h=c[e])break;c[a]=b;this.w().insertBefore(b,h||null)},ra:function(a){var b=this.ka;return b&&b[a]||null},Hb:function(a){var b=this.ra(a),c=this.Ba;if(b&&c){c.removeChild(b);this.ka[a]=null}},sa:function(a,b,c,e){var f=this.Va||(this.Va={}),h=f[a];if(!h){h=f[a]=g.p.Ga("shape");if(b)h.appendChild(h[b]=g.p.Ga(b));if(e){c=this.ra(e);if(!c){this.Wa(e,doc.createElement("group"+e));c=this.ra(e)}}c.appendChild(h);a=h.style;a.position="absolute";a.left=a.top=
48
+ 0;a.behavior="url(#default#VML)"}return h},Za:function(a){var b=this.Va,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},xb:function(a){var b=this.e,c=this.q.o(),e=c.i,f=c.f,h,j,d,i,k,m;c=a.x.tl.a(b,e);h=a.y.tl.a(b,f);j=a.x.tr.a(b,e);d=a.y.tr.a(b,f);i=a.x.br.a(b,e);k=a.y.br.a(b,f);m=a.x.bl.a(b,e);a=a.y.bl.a(b,f);e=Math.min(e/(c+j),f/(d+k),e/(m+i),f/(h+a));if(e<1){c*=e;h*=e;j*=e;d*=e;i*=e;k*=e;m*=e;a*=e}return{x:{tl:c,tr:j,br:i,bl:m},y:{tl:h,tr:d,br:k,bl:a}}},oa:function(a,b,c){b=
49
+ b||1;var e,f,h=this.q.o();f=h.i*b;h=h.f*b;var j=this.j.v,d=Math.floor,i=Math.ceil,k=a?a.T*b:0,m=a?a.S*b:0,l=a?a.L*b:0;a=a?a.Q*b:0;var t,n,p,s,u;if(c||j.g()){e=this.xb(c||j.m());c=e.x.tl*b;j=e.y.tl*b;t=e.x.tr*b;n=e.y.tr*b;p=e.x.br*b;s=e.y.br*b;u=e.x.bl*b;b=e.y.bl*b;f="m"+d(a)+","+d(j)+"qy"+d(c)+","+d(k)+"l"+i(f-t)+","+d(k)+"qx"+i(f-m)+","+d(n)+"l"+i(f-m)+","+i(h-s)+"qy"+i(f-p)+","+i(h-l)+"l"+d(u)+","+i(h-l)+"qx"+d(a)+","+i(h-b)+" x e"}else f="m"+d(a)+","+d(k)+"l"+i(f-m)+","+d(k)+"l"+i(f-m)+","+i(h-
50
+ l)+"l"+d(a)+","+i(h-l)+"xe";return f},w:function(){var a=this.parent.ra(this.C),b;if(!a){a=doc.createElement(this.Fa);b=a.style;b.position="absolute";b.top=b.left=0;this.parent.Wa(this.C,a)}return a},n:function(){this.parent.Hb(this.C);delete this.Va;delete this.ka}};g.cc=g.B.Z({g:function(){var a=this.oc;for(var b in a)if(a.hasOwnProperty(b)&&a[b].g())return true;return false},R:function(){return this.j.lb.D()},jb:function(){if(this.g()){var a=this.wb(),b=a,c;a=a.currentStyle;var e=a.position,f=
51
+ this.w().style,h=0,j=0;j=this.q.o();if(e==="fixed"&&g.J>6){h=j.x;j=j.y;b=e}else{do b=b.offsetParent;while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;h=j.x-c.left-(parseFloat(b.borderLeftWidth)||0);j=j.y-c.top-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;h=j.x+b.scrollLeft-b.clientLeft;j=j.y+b.scrollTop-b.clientTop}b="absolute"}f.position=b;f.left=h;f.top=j;f.zIndex=e==="static"?-1:a.zIndex;this.eb=true}},Lb:function(){},Mb:function(){var a=
52
+ this.j.lb.m();this.w().style.display=a.cd&&a.xc?"":"none"},Kb:function(){this.g()?this.Mb():this.n()},wb:function(){var a=this.e;return a.tagName in g.Jb?a.offsetParent:a},w:function(){var a=this.Ba,b;if(!a){b=this.wb();a=this.Ba=doc.createElement("css3-container");a.style.direction="ltr";this.Mb();b.parentNode.insertBefore(a,b)}return a},n:function(){var a=this.Ba,b;if(a&&(b=a.parentNode))b.removeChild(a);delete this.Ba;delete this.ka}});g.Sb=g.B.Z({C:2,Fa:"background",R:function(){var a=this.j;
53
+ return a.H.D()||a.v.D()},g:function(){var a=this.j;return a.N.g()||a.v.g()||a.H.g()||a.W.g()&&a.W.m().cb},X:function(){var a=this.q.o();if(a.i&&a.f){this.yc();this.zc()}},yc:function(){var a=this.j.H.m(),b=this.q.o(),c=this.e,e=a&&a.color,f,h;if(e&&e.la()>0){this.yb();a=this.sa("bgColor","fill",this.w(),1);f=b.i;b=b.f;a.stroked=false;a.coordsize=f*2+","+b*2;a.coordorigin="1,1";a.path=this.oa(null,2);h=a.style;h.width=f;h.height=b;a.fill.color=e.O(c);c=e.la();if(c<1)a.fill.opacity=c}else this.Za("bgColor")},
54
+ zc:function(){var a=this.j.H.m(),b=this.q.o();a=a&&a.M;var c,e,f,h,j;if(a){this.yb();e=b.i;f=b.f;for(j=a.length;j--;){b=a[j];c=this.sa("bgImage"+j,"fill",this.w(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=e*2+","+f*2;c.coordorigin="1,1";c.path=this.oa(0,2);h=c.style;h.width=e;h.height=f;if(b.P==="linear-gradient")this.mc(c,b);else{c.fill.src=b.Cb;this.Pc(c,j)}}}for(j=a?a.length:0;this.Za("bgImage"+j++););},Pc:function(a,b){g.p.Pb(a.fill.src,function(c){var e=a.fill,f=this.e,
55
+ h=this.q.o(),j=h.i;h=h.f;var d=this.j,i=d.I.m(),k=i&&i.nb;i=k?k.t.a(f):0;var m=k?k.r.a(f):0,l=k?k.b.a(f):0;k=k?k.l.a(f):0;d=d.H.m().M[b];f=d.Ya?d.Ya.coords(f,j-c.i-k-m,h-c.f-i-l):{x:0,y:0};d=d.Bb;l=m=0;var t=j+1,n=h+1,p=g.J===8?0:1;k=Math.round(f.x)+k+0.5;i=Math.round(f.y)+i+0.5;e.position=k/j+","+i/h;if(d&&d!=="repeat"){if(d==="repeat-x"||d==="no-repeat"){m=i+1;n=i+c.f+p}if(d==="repeat-y"||d==="no-repeat"){l=k+1;t=k+c.i+p}a.style.clip="rect("+m+"px,"+t+"px,"+n+"px,"+l+"px)"}},this)},mc:function(a,
56
+ b){function c(B,C,z,F,H){if(z===0||z===180)return[F,C];else if(z===90||z===270)return[B,H];else{z=Math.tan(-z*t/180);B=z*B-C;C=-1/z;F=C*F-H;H=C-z;return[(F-B)/H,(z*F-C*B)/H]}}function e(){w=m>=90&&m<270?i:0;r=m<180?k:0;o=i-w;x=k-r}function f(){for(;m<0;)m+=360;m%=360}function h(B,C){var z=C[0]-B[0];B=C[1]-B[1];return Math.abs(z===0?B:B===0?z:Math.sqrt(z*z+B*B))}var j=this.e,d=this.q.o(),i=d.i,k=d.f;a=a.fill;var m=b.Xa,l=b.bb;b=b.ca;d=b.length;var t=Math.PI,n,p,s,u,w,r,o,x,q,y,A,D;if(l){l=l.coords(j,
57
+ i,k);n=l.x;p=l.y}if(m){m=m.vc();f();e();if(!l){n=w;p=r}l=c(n,p,m,o,x);s=l[0];u=l[1]}else if(l){s=i-n;u=k-p}else{n=p=s=0;u=k}l=s-n;q=u-p;if(m===void 0){m=!l?q<0?90:270:!q?l<0?180:0:-Math.atan2(q,l)/t*180;f();e()}l=m%90?Math.atan2(l*i/k,q)/t*180:m+90;l+=180;l%=360;y=h([n,p],[s,u]);s=h([w,r],c(w,r,m,o,x));u=[];p=h([n,p],c(n,p,m,w,r))/s*100;n=[];for(q=0;q<d;q++)n.push(b[q].Fb?b[q].Fb.a(j,y):q===0?0:q===d-1?y:null);for(q=1;q<d;q++){if(n[q]===null){A=n[q-1];y=q;do D=n[++y];while(D===null);n[q]=A+(D-A)/
58
+ (y-q+1)}n[q]=Math.max(n[q],n[q-1])}for(q=0;q<d;q++)u.push(p+n[q]/s*100+"% "+b[q].color.O(j));a.angle=l;a.type="gradient";a.method="sigma";a.color=b[0].color.O(j);a.color2=b[d-1].color.O(j);a.colors.value=u.join(",")},yb:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},n:function(){g.B.n.call(this);var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});g.Wb=g.B.Z({C:4,Fa:"border",qc:{TABLE:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,
59
+ IMG:1,HR:1,FIELDSET:1},Jc:{submit:1,button:1,reset:1},R:function(){var a=this.j;return a.I.D()||a.v.D()},g:function(){var a=this.j;return(a.N.g()||a.v.g()||a.H.g())&&a.I.g()},X:function(){var a=this.e,b=this.j.I.m(),c=this.q.o(),e=c.i;c=c.f;var f,h,j,d,i;if(b){this.Hc();b=this.Bc(2);d=0;for(i=b.length;d<i;d++){j=b[d];f=this.sa("borderPiece"+d,j.stroke?"stroke":"fill",this.w());f.coordsize=e*2+","+c*2;f.coordorigin="1,1";f.path=j.path;h=f.style;h.width=e;h.height=c;f.filled=!!j.fill;f.stroked=!!j.stroke;
60
+ if(j.stroke){f=f.stroke;f.weight=j.mb+"px";f.color=j.color.O(a);f.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";f.linestyle=j.stroke==="double"&&j.mb>2?"ThinThin":"Single"}else f.fill.color=j.fill.O(a)}for(;this.Za("borderPiece"+d++););}},Hc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,e=a.tagName,f=g.J===6,h;if(f&&e in this.qc||e==="BUTTON"||e==="INPUT"&&a.type in this.Jc){c.borderWidth="";e=this.j.I.Ib;for(h=e.length;h--;){f=e[h];c["padding"+f]="";c["padding"+
61
+ f]=g.k(b["padding"+f]).a(a)+g.k(b["border"+f+"Width"]).a(a)+(!g.J===8&&h%2?1:0)}c.borderWidth=0}else if(f){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");e=b.style;e.visibility="visible";for(e.zoom=1;e=a.firstChild;)b.appendChild(e);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},Bc:function(a){var b=this.e,c,e,f,h=this.j.I,j=[],d,i,k,m,l=Math.round,t,n,p;if(h.g()){c=h.m();h=c.nb;n=c.Zc;p=c.tc;if(c.ed&&c.$c&&c.uc){if(p.t.la()>
62
+ 0){c=h.t.a(b);k=c/2;j.push({path:this.oa({T:k,S:k,L:k,Q:k},a),stroke:n.t,color:p.t,mb:c})}}else{a=a||1;c=this.q.o();e=c.i;f=c.f;c=l(h.t.a(b));k=l(h.r.a(b));m=l(h.b.a(b));b=l(h.l.a(b));var s={t:c,r:k,b:m,l:b};b=this.j.v;if(b.g())t=this.xb(b.m());d=Math.floor;i=Math.ceil;var u=function(o,x){return t?t[o][x]:0},w=function(o,x,q,y,A,D){var B=u("x",o),C=u("y",o),z=o.charAt(1)==="r";o=o.charAt(0)==="b";return B>0&&C>0?(D?"al":"ae")+(z?i(e-B):d(B))*a+","+(o?i(f-C):d(C))*a+","+(d(B)-x)*a+","+(d(C)-q)*a+","+
63
+ y*65535+","+2949075*(A?1:-1):(D?"m":"l")+(z?e-x:x)*a+","+(o?f-q:q)*a},r=function(o,x,q,y){var A=o==="t"?d(u("x","tl"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+d(u("y","tr"))*a:o==="b"?i(e-u("x","br"))*a+","+d(f-x)*a:d(x)*a+","+i(f-u("y","bl"))*a;o=o==="t"?i(e-u("x","tr"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+i(f-u("y","br"))*a:o==="b"?d(u("x","bl"))*a+","+d(f-x)*a:d(x)*a+","+d(u("y","tl"))*a;return q?(y?"m"+o:"")+"l"+A:(y?"m"+A:"")+"l"+o};b=function(o,x,q,y,A,D){var B=o==="l"||o==="r",C=s[o],z,F;if(C>0&&n[o]!==
64
+ "none"&&p[o].la()>0){z=s[B?o:x];x=s[B?x:o];F=s[B?o:q];q=s[B?q:o];if(n[o]==="dashed"||n[o]==="dotted"){j.push({path:w(y,z,x,D+45,0,1)+w(y,0,0,D,1,0),fill:p[o]});j.push({path:r(o,C/2,0,1),stroke:n[o],mb:C,color:p[o]});j.push({path:w(A,F,q,D,0,1)+w(A,0,0,D-45,1,0),fill:p[o]})}else j.push({path:w(y,z,x,D+45,0,1)+r(o,C,0,0)+w(A,F,q,D,0,0)+(n[o]==="double"&&C>2?w(A,F-d(F/3),q-d(q/3),D-45,1,0)+r(o,i(C/3*2),1,0)+w(y,z-d(z/3),x-d(x/3),D,1,0)+"x "+w(y,d(z/3),d(x/3),D+45,0,1)+r(o,d(C/3),1,0)+w(A,d(F/3),d(q/
65
+ 3),D,0,0):"")+w(A,0,0,D-45,1,0)+r(o,0,1,0)+w(y,0,0,D,1,0),fill:p[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return j},n:function(){g.B.n.call(this);this.e.runtimeStyle.borderColor=""}});g.Ub=g.B.Z({C:5,Oc:["t","tr","r","br","b","bl","l","tl","c"],R:function(){return this.j.N.D()},g:function(){return this.j.N.g()},X:function(){this.w();var a=this.j.N.m(),b=this.q.o(),c=this.e,e=this.Gb;g.p.Pb(a.src,function(f){function h(w,
66
+ r,o,x,q){w=e[w].style;var y=Math.max;w.width=y(r,0);w.height=y(o,0);w.left=x;w.top=q}function j(w,r,o){for(var x=0,q=w.length;x<q;x++)e[w[x]].imagedata[r]=o}var d=b.i,i=b.f,k=a.width,m=k.T.a(c),l=k.S.a(c),t=k.L.a(c);k=k.Q.a(c);var n=a.slice,p=n.T.a(c),s=n.S.a(c),u=n.L.a(c);n=n.Q.a(c);h("tl",k,m,0,0);h("t",d-k-l,m,k,0);h("tr",l,m,d-l,0);h("r",l,i-m-t,d-l,m);h("br",l,t,d-l,i-t);h("b",d-k-l,t,k,i-t);h("bl",k,t,0,i-t);h("l",k,i-m-t,0,m);h("c",d-k-l,i-m-t,k,m);j(["tl","t","tr"],"cropBottom",(f.f-p)/f.f);
67
+ j(["tl","l","bl"],"cropRight",(f.i-n)/f.i);j(["bl","b","br"],"cropTop",(f.f-u)/f.f);j(["tr","r","br"],"cropLeft",(f.i-s)/f.i);if(a.repeat.kb==="stretch"){j(["l","r","c"],"cropTop",p/f.f);j(["l","r","c"],"cropBottom",u/f.f)}if(a.repeat.f==="stretch"){j(["t","b","c"],"cropLeft",n/f.i);j(["t","b","c"],"cropRight",s/f.i)}e.c.style.display=a.fill?"":"none"},this)},w:function(){var a=this.parent.ra(this.C),b,c,e,f=this.Oc,h=f.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";
68
+ this.Gb={};for(e=0;e<h;e++){c=this.Gb[f[e]]=g.p.Ga("rect");c.appendChild(g.p.Ga("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.j.N.m().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.Wa(this.C,a)}return a}});g.Yb=g.B.Z({C:1,Fa:"outset-box-shadow",R:function(){var a=this.j;return a.W.D()||a.v.D()},g:function(){var a=this.j.W;return a.g()&&a.m().ua[0]},X:function(){function a(z,F,H,K,J,v,E){z=b.sa("shadow"+z+F,"fill",
69
+ e,j-z);F=z.fill;z.coordsize=m*2+","+l*2;z.coordorigin="1,1";z.stroked=false;z.filled=true;F.color=J.O(c);if(v){F.type="gradienttitle";F.color2=F.color;F.opacity=0}z.path=E;u=z.style;u.left=H;u.top=K;u.width=m;u.height=l;return z}var b=this,c=this.e,e=this.w(),f=this.j,h=f.W.m().ua;f=f.v.m();var j=h.length,d=j,i,k=this.q.o(),m=k.i,l=k.f;k=g.J===8?1:0;for(var t=["tl","tr","br","bl"],n,p,s,u,w,r,o,x,q,y,A,D,B,C;d--;){p=h[d];w=p.fd.a(c);r=p.gd.a(c);i=p.Xc.a(c);o=p.blur.a(c);p=p.color;x=-i-o;if(!f&&o)f=
70
+ g.Oa.Qb;x=this.oa({T:x,S:x,L:x,Q:x},2,f);if(o){q=(i+o)*2+m;y=(i+o)*2+l;A=o*2/q;D=o*2/y;if(o-i>m/2||o-i>l/2)for(i=4;i--;){n=t[i];B=n.charAt(0)==="b";C=n.charAt(1)==="r";n=a(d,n,w,r,p,o,x);s=n.fill;s.focusposition=(C?1-A:A)+","+(B?1-D:D);s.focussize="0,0";n.style.clip="rect("+((B?y/2:0)+k)+"px,"+(C?q:q/2)+"px,"+(B?y:y/2)+"px,"+((C?q/2:0)+k)+"px)"}else{n=a(d,"",w,r,p,o,x);s=n.fill;s.focusposition=A+","+D;s.focussize=1-A*2+","+(1-D*2)}}else{n=a(d,"",w,r,p,o,x);w=p.la();if(w<1)n.fill.opacity=w}}}});g.bc=
71
+ g.B.Z({C:6,Fa:"imgEl",R:function(){var a=this.j;return this.e.src!==this.hc||a.v.D()},g:function(){var a=this.j;return a.v.g()||a.H.Eb()},X:function(){this.hc=j;this.Gc();var a=this.sa("img","fill",this.w()),b=a.fill,c=this.q.o(),e=c.i;c=c.f;var f=this.j.I.m();f=f&&f.nb;var h=this.e,j=h.src,d=Math.round;a.stroked=false;b.type="frame";b.src=j;b.position=(e?0.5/e:0)+","+(c?0.5/c:0);a.coordsize=e*2+","+c*2;a.coordorigin="1,1";a.path=this.oa(f?{T:d(f.t.a(h)),S:d(f.r.a(h)),L:d(f.b.a(h)),Q:d(f.l.a(h))}:
72
+ 0,2);a=a.style;a.width=e;a.height=c},Gc:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},n:function(){g.B.n.call(this);this.e.runtimeStyle.filter=""}});g.Qa=function(){function a(d){function i(){if(!z){var v,E,G=d.currentStyle,I=G.getAttribute(c)==="true";J=G.getAttribute(e);J=g.Ab===8?J!=="false":J==="true";if(!C){C=1;d.runtimeStyle.zoom=1;G=d;for(var O=1;G=G.previousSibling;)if(G.nodeType===1){O=0;break}if(O)d.className+=" "+g.Pa+"first-child"}y.Ja();if(I&&(E=y.o())&&(v=doc.documentElement||
73
+ doc.body)&&(E.y>v.clientHeight||E.x>v.clientWidth||E.y+E.f<0||E.x+E.i<0)){if(!H){H=1;g.Ra.aa(i)}}else{z=1;H=C=0;g.Ra.Ma(i);A={H:new g.Tb(d),I:new g.Xb(d),N:new g.Vb(d),v:new g.Oa(d),W:new g.Zb(d),lb:new g.ec(d)};D=[A.H,A.I,A.N,A.v,A.W,A.lb];v=new g.cc(d,y,A);E=[new g.Yb(d,y,A,v),new g.Sb(d,y,A,v),new g.Wb(d,y,A,v),new g.Ub(d,y,A,v)];d.tagName==="IMG"&&E.push(new g.bc(d,y,A,v));v.oc=E;q=[v].concat(E);if(v=d.currentStyle.getAttribute(g.F+"watch-ancestors")){B=[];v=parseInt(v,10);E=0;for(I=d.parentNode;I&&
74
+ (v==="NaN"||E++<v);){B.push(I);I.attachEvent("onpropertychange",u);I.attachEvent("onmouseenter",p);I.attachEvent("onmouseleave",s);I=I.parentNode}}if(J){g.ya.aa(m);g.ya.Tc()}m(1)}if(!F){F=1;d.attachEvent("onmove",k);d.attachEvent("onresize",k);d.attachEvent("onpropertychange",l);d.attachEvent("onmouseenter",p);d.attachEvent("onmouseleave",s);g.za.aa(k);g.G.aa(o)}y.La()}}function k(){y&&y.Ec()&&m()}function m(v){if(!K)if(z){var E,G;w();if(v||y.Qc()){E=0;for(G=q.length;E<G;E++)q[E].jb()}if(v||y.Vc()){E=
75
+ 0;for(G=q.length;E<G;E++)q[E].Lb()}r()}else C||i()}function l(){var v,E,G;v=event;if(!K&&!(v&&v.propertyName in j))if(z){w();v=0;for(E=q.length;v<E;v++){G=q[v];G.eb||G.jb();G.R()&&G.Kb()}r()}else C||i()}function t(){if(d)d.className+=f}function n(){if(d)d.className=d.className.replace(h,"")}function p(){setTimeout(t,0)}function s(){setTimeout(n,0)}function u(){var v=event.propertyName;if(v==="className"||v==="id")l()}function w(){y.Ja();for(var v=D.length;v--;)D[v].Ja()}function r(){for(var v=D.length;v--;)D[v].La();
76
+ y.La()}function o(){if(F){if(B)for(var v=0,E=B.length,G;v<E;v++){G=B[v];G.detachEvent("onpropertychange",u);G.detachEvent("onmouseenter",p);G.detachEvent("onmouseleave",s)}d.detachEvent("onmove",m);d.detachEvent("onresize",m);d.detachEvent("onpropertychange",l);d.detachEvent("onmouseenter",p);d.detachEvent("onmouseleave",s);g.G.Ma(o);F=0}}function x(){if(!K){var v,E;o();K=1;if(q){v=0;for(E=q.length;v<E;v++)q[v].n()}J&&g.ya.Ma(m);g.za.Ma(m);q=y=A=D=B=d=null}}var q,y=new M(d),A,D,B,C,z,F,H,K,J;this.Ic=
77
+ i;this.update=m;this.n=x;this.Ac=d}var b={},c=g.F+"lazy-init",e=g.F+"poll",f=" "+g.Pa+"hover",h=new RegExp("\\b"+g.Pa+"hover\\b","g"),j={background:1,bgColor:1,display:1};a.Cc=function(d){var i=g.p.ta(d);return b[i]||(b[i]=new a(d))};a.n=function(d){d=g.p.ta(d);var i=b[d];if(i){i.n();delete b[d]}};a.wc=function(){var d=[],i;if(b){for(var k in b)if(b.hasOwnProperty(k)){i=b[k];d.push(i.Ac);i.n()}b={}}return d};return a}();g.attach=function(a){g.Ab<9&&g.Qa.Cc(a).Ic()};g.detach=function(a){g.Qa.n(a)}};
78
+ var N=window.PIE,P=element;function init(){N&&doc.media!=="print"&&N.attach(P)}function cleanup(){if(N){N.detach(P);N=P=0}}P.readyState==="complete"&&init();
79
+ </script>
80
+ </PUBLIC:COMPONENT>
themes/default/close.png ADDED
Binary file
themes/default/close_hover.png ADDED
Binary file
themes/default/styles.css ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Easy Modal
3
+ * http://wizardinternetsolutions.com/project/easy-modal/
4
+ * v 0.9.0.6
5
+ * Default Theme
6
+ */
7
+ #eM-overlay{background-color:#000; cursor:wait;}
8
+ #eM-container{text-align:left;font:'Trebuchet MS', Verdana, Arial;border:3px solid #fff;-webkit-border-radius:10px;-moz-border-radius:10px; border-radius:10px;behavior:url(PIE.htc);}
9
+ #eM-container .eM-content{background-color:#333;color:#ddd;width:100%;height:100%;}
10
+ #eM-container .simplemodal-wrap{background:#666;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;behavior:url(PIE.htc);}
11
+ #eM-container .simplemodal-data{width:100%;height:100%;}
12
+ #eM-container .eM-title{color:#fff;font-size:20px;line-height:20px;margin:0;padding:5px 0 3px 10px;text-align:left;}
13
+ #eM-container p{margin:0;}
14
+ #eM-container .wpcf7-form-control-wrap{width:95%;margin:0 auto;}
15
+ #eM-container .wpcf7-form-control-wrap input, #eM-container .wpcf7-form-control-wrap textarea{width:100%;margin:0 auto;padding:2px 0;display:inline;border:none;}
16
+ #eM-container .wpcf7-form-control-wrap textarea{height:175px;}
17
+ #eM-container .modal-close{background:url(close.png) no-repeat transparent;cursor:pointer;display:inline;height:20px;position:absolute;right:-12px;top:-12px;width:20px;z-index: 3200;}
18
+ #eM-container .modal-close:hover{background-image:url(close_hover.png);}
19
+ #eM-container .wpcf7-response-output{bottom:-65px;left:-1.5%;position:absolute;width:90%;background:#000;color:#fff;}
20
+ #eM-container .wpcf7-not-valid-tip{background:#666;color:#fff;border:1px solid #FF0000;bottom:-3px;font-size:10pt;left:0;padding:0;position:absolute;top:-3px;width:100%;z-index:100;}
21
+ #eM-container .wpcf7-submit{float:right;background:#000;border:1px solid #fff;color:#fff;font-weight:bold;padding:2px 15px;margin-top:4px;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; behavior: url(PIE.htc);}
22
+ #eM-container .wpcf7{margin:0 auto;width:90%;}