Gallery by BestWebSoft - Version 4.1.7

Version Description

  • 31.03.2014 =
  • Update : Fancybox is updated.
  • Budfix : We fixed the bug of navigation when Gallery Template is a static front page.
Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Gallery by BestWebSoft
Version 4.1.7
Comparing to
See all releases

Code changes from version 4.1.6 to 4.1.7

Files changed (53) hide show
  1. bws_menu/bws_menu.php +377 -616
  2. bws_menu/css/general_style.css +144 -0
  3. bws_menu/css/general_style_wp_before_3.8.css +148 -0
  4. bws_menu/css/style.css +1 -12
  5. bws_menu/icons/bws-google-analytics.png +0 -0
  6. bws_menu/icons/bws-google-maps.png +0 -0
  7. bws_menu/icons/contact-form-multi.png +0 -0
  8. bws_menu/icons/subscriber.png +0 -0
  9. {images → bws_menu/images}/icon_16.png +0 -0
  10. {images → bws_menu/images}/icon_16_b.png +0 -0
  11. {images → bws_menu/images}/icon_16_c.png +0 -0
  12. {images → bws_menu/images}/icon_16_single.png +0 -0
  13. {images → bws_menu/images}/icon_36.png +0 -0
  14. {images → bws_menu/images}/icon_36_b.png +0 -0
  15. css/{stylesheet.css → style.css} +0 -120
  16. css/style_wp_before_3.8.css +0 -127
  17. fancybox/fancy_close.png +0 -0
  18. fancybox/fancy_loading.png +0 -0
  19. fancybox/fancy_nav_left.png +0 -0
  20. fancybox/fancy_nav_right.png +0 -0
  21. fancybox/fancy_shadow_e.png +0 -0
  22. fancybox/fancy_shadow_n.png +0 -0
  23. fancybox/fancy_shadow_ne.png +0 -0
  24. fancybox/fancy_shadow_nw.png +0 -0
  25. fancybox/fancy_shadow_s.png +0 -0
  26. fancybox/fancy_shadow_se.png +0 -0
  27. fancybox/fancy_shadow_sw.png +0 -0
  28. fancybox/fancy_shadow_w.png +0 -0
  29. fancybox/fancy_title_left.png +0 -0
  30. fancybox/fancy_title_main.png +0 -0
  31. fancybox/fancy_title_over.png +0 -0
  32. fancybox/fancy_title_right.png +0 -0
  33. fancybox/fancybox-x.png +0 -0
  34. fancybox/fancybox-y.png +0 -0
  35. fancybox/fancybox.png +0 -0
  36. fancybox/fancybox_loading.gif +0 -0
  37. fancybox/fancybox_loading@2x.gif +0 -0
  38. fancybox/fancybox_overlay.png +0 -0
  39. fancybox/fancybox_sprite.png +0 -0
  40. fancybox/fancybox_sprite@2x.png +0 -0
  41. fancybox/jquery.fancybox-1.3.4.css +0 -359
  42. fancybox/jquery.fancybox-1.3.4.js +0 -1156
  43. fancybox/jquery.fancybox-1.3.4.pack.js +0 -46
  44. fancybox/jquery.fancybox.css +275 -0
  45. fancybox/jquery.fancybox.js +2020 -0
  46. fancybox/jquery.fancybox.pack.js +46 -0
  47. fancybox/jquery.mousewheel-3.0.4.pack.js +0 -14
  48. fancybox/jquery.mousewheel-3.0.6.pack.js +13 -0
  49. gallery-plugin.php +111 -87
  50. images/Thumbs.db +0 -0
  51. readme.txt +10 -3
  52. template/gallery-single-template.php +18 -15
  53. template/gallery-template.php +10 -6
bws_menu/bws_menu.php CHANGED
@@ -1,41 +1,17 @@
1
  <?php
2
  /*
3
- Function for displaying BestWebSoft menu
 
4
  */
 
5
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
6
  function bws_add_menu_render() {
7
  global $wpdb, $wpmu, $wp_version, $bws_plugin_info;
8
- $error = '';
9
- $message = '';
10
- $bwsmn_form_email = '';
11
  $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13';
12
 
13
- // install the option defaults
14
- if ( 1 == $wpmu ) {
15
- if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
16
- add_site_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
17
- $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
18
- } else {
19
- if ( !get_option( 'bstwbsftwppdtplgns_options' ) )
20
- add_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
21
- $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
22
- }
23
- if ( !isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
24
- $bstwbsftwppdtplgns_options['bws_menu_version'] = '1.1';
25
- update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
26
- }
27
-
28
- if ( isset( $_REQUEST['bwsmn_form_submit_switch'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ) ) {
29
- if ( $bstwbsftwppdtplgns_options['bws_menu_version'] == '1.1' )
30
- $bstwbsftwppdtplgns_options['bws_menu_version'] = 'old';
31
- else
32
- $bstwbsftwppdtplgns_options['bws_menu_version'] = '1.1';
33
- $bstwbsftwppdtplgns_options['bws_menu_time'] = strtotime('now');
34
- update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
35
- }
36
-
37
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
38
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
39
 
40
  $bws_plugins = array(
41
  'captcha/captcha.php' => array(
@@ -223,6 +199,38 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
223
  'download' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
224
  'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins',
225
  'settings' => 'admin.php?page=sndr_settings'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  )
227
  );
228
  $bws_plugins_pro = array(
@@ -301,112 +309,24 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
301
  $all_plugins = get_plugins();
302
  $active_plugins = get_option( 'active_plugins' );
303
 
304
- if ( '1.1' == $bstwbsftwppdtplgns_options['bws_menu_version'] ) {
305
-
306
- $recommend_plugins = array_diff_key( $bws_plugins, $all_plugins );
307
-
308
- foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
309
- if ( ! isset( $all_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
310
- unset( $recommend_plugins[ $key_plugin ] );
311
- }
312
- }
313
 
314
- foreach ( $all_plugins as $key_plugin => $value_plugin ) {
315
- if ( ! isset( $bws_plugins[ $key_plugin ] ) && ! isset( $bws_plugins_pro[ $key_plugin ] ) )
316
- unset( $all_plugins[ $key_plugin ] );
317
-
318
- if ( isset( $bws_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
319
- unset( $all_plugins[ $key_plugin ] );
320
- }
321
  }
322
- } else {
323
 
324
- $array_activate = array();
325
- $array_install = array();
326
- $array_recomend = array();
327
- $count_activate = $count_install = $count_recomend = 0;
328
 
329
- foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
330
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) {
331
- $array_activate[ $count_activate ]["title"] = $value_plugin['name'];
332
- $array_activate[ $count_activate ]["link"] = $value_plugin['link'];
333
- $array_activate[ $count_activate ]["href"] = $value_plugin['download'];
334
- $array_activate[ $count_activate ]["url"] = $value_plugin['settings'];
335
- $count_activate++;
336
- } else if ( array_key_exists( $key_plugin, $all_plugins ) ) {
337
- $array_install[ $count_install ]["title"] = $value_plugin['name'];
338
- $array_install[ $count_install ]["link"] = $value_plugin['link'];
339
- $array_install[ $count_install ]["href"] = $value_plugin['download'];
340
- $count_install++;
341
- } else {
342
- $array_recomend[ $count_recomend ]["title"] = $value_plugin['name'];
343
- $array_recomend[ $count_recomend ]["link"] = $value_plugin['link'];
344
- $array_recomend[ $count_recomend ]["href"] = $value_plugin['download'];
345
- $array_recomend[ $count_recomend ]["slug"] = $value_plugin['wp_install'];
346
- $count_recomend++;
347
- }
348
- }
349
-
350
- $array_activate_pro = array();
351
- $array_install_pro = array();
352
- $array_recomend_pro = array();
353
- $count_activate_pro = $count_install_pro = $count_recomend_pro = 0;
354
- foreach ( $bws_plugins_pro as $key_plugin => $value_plugin ) {
355
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) {
356
- $array_activate_pro[ $count_activate_pro ]["title"] = $value_plugin['name'];
357
- $array_activate_pro[ $count_activate_pro ]["link"] = $value_plugin['link'];
358
- $array_activate_pro[ $count_activate_pro ]["href"] = $value_plugin['purchase'];
359
- $array_activate_pro[ $count_activate_pro ]["url"] = $value_plugin['settings'];
360
- $count_activate_pro++;
361
- } else if ( array_key_exists( $key_plugin, $all_plugins ) ) {
362
- $array_install_pro[ $count_install_pro ]["title"] = $value_plugin['name'];
363
- $array_install_pro[ $count_install_pro ]["link"] = $value_plugin['link'];
364
- $array_install_pro[ $count_install_pro ]["href"] = $value_plugin['purchase'];
365
- $count_install_pro++;
366
- } else {
367
- $array_recomend_pro[ $count_recomend_pro ]["title"] = $value_plugin['name'];
368
- $array_recomend_pro[ $count_recomend_pro ]["link"] = $value_plugin['link'];
369
- $array_recomend_pro[ $count_recomend_pro ]["href"] = $value_plugin['purchase'];
370
- $count_recomend_pro++;
371
- }
372
- }
373
- if ( $wp_version >= '3.4' ) {
374
- $wp_list_table = _get_list_table( 'WP_Themes_List_Table' );
375
- $wp_list_table->prepare_items();
376
- $current_theme = wp_get_theme();
377
- $array_activate_theme = array();
378
- $array_install_theme = array();
379
- $array_recomend_theme = array();
380
- $count_activate_theme = $count_install_theme = $count_recomend_theme = 0;
381
- $array_theme = array(
382
- array( 'central', 'Central', 'http://bestwebsoft.com/theme/central/?k=77c0199aabdb1f601a0504e312bee220&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/central/?k=77c0199aabdb1f601a0504e312bee220&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&s=Central&search=Search' ),
383
- array( 'simple-classic', 'Simple Classic', 'http://bestwebsoft.com/theme/simple-classic/?k=b3990bfc85125747f48ece9f011f4cde&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/simple-classic/?k=b3990bfc85125747f48ece9f011f4cde&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=Simple+Classic&search=Search' ),
384
- array( 'reddish', 'Reddish', 'http://bestwebsoft.com/theme/reddish/?k=1ea187e3fd401fd278e23a333abaf4f6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/reddish/?k=1ea187e3fd401fd278e23a333abaf4f6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=reddish&search=Search' ),
385
- array( 'wordpost', 'Wordpost', 'http://bestwebsoft.com/theme/wordpost/?k=f0fc8c98135c9657751224562aca7a55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/wordpost/?k=f0fc8c98135c9657751224562aca7a55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=Wordpost&search=Search' )
386
- );
387
- foreach ( $array_theme as $theme ) {
388
- if ( $current_theme->get( 'Name' ) == $theme[1] ) {
389
- $array_activate_theme[ $count_activate_theme ]["title"] = $theme[1];
390
- $array_activate_theme[ $count_activate_theme ]["link"] = $theme[2];
391
- $array_activate_theme[ $count_activate_theme ]["href"] = $theme[3];
392
- $count_activate_theme++;
393
- } elseif ( array_key_exists( $theme[0], $wp_list_table->items ) ) {
394
- $array_install_theme[ $count_install_theme ]["title"] = $theme[1];
395
- $array_install_theme[ $count_install_theme ]["link"] = $theme[2];
396
- $array_install_theme[ $count_install_theme ]["href"] = $theme[3];
397
- $count_install_theme++;
398
- } else {
399
- $array_recomend_theme[ $count_recomend_theme ]["title"] = $theme[1];
400
- $array_recomend_theme[ $count_recomend_theme ]["link"] = $theme[2];
401
- $array_recomend_theme[ $count_recomend_theme ]["href"] = $theme[3];
402
- $array_recomend_theme[ $count_recomend_theme ]["slug"] = $theme[4];
403
- $count_recomend_theme++;
404
- }
405
- }
406
  }
407
  }
408
 
409
- if ( ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) || 'old' == $bstwbsftwppdtplgns_options['bws_menu_version'] ) {
410
  $all_plugins = get_plugins();
411
  $active_plugins = get_option( 'active_plugins' );
412
  $sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
@@ -556,520 +476,356 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
556
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
557
  }
558
  }
559
-
560
  ?>
561
  <div class="wrap">
562
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
563
- <h2>
564
- <span class="bws_main title">BestWebSoft</span>
565
- <?php if ( 'old' == $bstwbsftwppdtplgns_options['bws_menu_version'] && isset( $bstwbsftwppdtplgns_options['bws_menu_time'] ) && strtotime("-14 day") < $bstwbsftwppdtplgns_options['bws_menu_time'] ) { ?>
566
- <form method="post" action="admin.php?page=bws_plugins">
567
- <input type="hidden" name="bwsmn_form_submit_switch" value="submit" />
568
- <input type="submit" class="bws_switch_link" value="<?php _e( 'Switch to new interface', 'bestwebsoft' ) ?>" />
569
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ); ?>
570
- </form>
571
- </h2>
572
- <div class="clear"></div>
573
- <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
574
- <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
575
- <h3 style="color: blue;"><?php _e( 'Pro plugins', 'bestwebsoft' ); ?></h3>
576
- <?php if ( 0 < $count_activate_pro ) { ?>
577
- <div style="padding-left:15px;">
578
- <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4>
579
- <?php foreach ( $array_activate_pro as $activate_plugin ) { ?>
580
- <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p>
581
- <?php } ?>
582
- </div>
583
- <?php } ?>
584
- <?php if ( 0 < $count_install_pro ) { ?>
585
- <div style="padding-left:15px;">
586
- <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
587
- <?php foreach ( $array_install_pro as $install_plugin) { ?>
588
- <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
589
- <?php } ?>
590
- </div>
591
- <?php } ?>
592
- <?php if ( 0 < $count_recomend_pro ) { ?>
593
- <div style="padding-left:15px;">
594
- <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
595
- <?php foreach ( $array_recomend_pro as $recomend_plugin ) { ?>
596
- <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Purchase", 'bestwebsoft' ); ?></a></p>
597
- <?php } ?>
598
- </div>
599
- <?php } ?>
600
- <br />
601
- <h3 style="color: green"><?php _e( 'Free plugins', 'bestwebsoft' ); ?></h3>
602
- <?php if ( 0 < $count_activate ) { ?>
603
- <div style="padding-left:15px;">
604
- <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4>
605
- <?php foreach ( $array_activate as $activate_plugin ) { ?>
606
- <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p>
607
- <?php } ?>
608
- </div>
609
- <?php } ?>
610
- <?php if ( 0 < $count_install ) { ?>
611
- <div style="padding-left:15px;">
612
- <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
613
- <?php foreach ( $array_install as $install_plugin ) { ?>
614
- <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
615
- <?php } ?>
616
- </div>
617
  <?php } ?>
618
- <?php if ( 0 < $count_recomend ) { ?>
619
- <div style="padding-left:15px;">
620
- <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
621
- <?php foreach ( $array_recomend as $recomend_plugin ) { ?>
622
- <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Download", 'bestwebsoft' ); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_plugin["slug"]; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin["title"] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'bestwebsoft' ) ?></a></p>
623
- <?php } ?>
624
- </div>
625
- <?php } ?>
626
- <br />
627
- <?php if ( $wp_version >= '3.4' ) { ?>
628
- <h3 style="color: green"><?php _e( 'Free themes', 'bestwebsoft' ); ?></h3>
629
- <?php if ( 0 < $count_activate_theme ) { ?>
630
- <div style="padding-left:15px;">
631
- <h4><?php _e( 'Activated theme', 'bestwebsoft' ); ?></h4>
632
- <div style="float:left; width:200px;"><?php echo $array_activate_theme[0]["title"]; ?></div> <p><a href="<?php echo $array_activate_theme[0]["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo wp_customize_url(); ?>" title="<?php echo esc_attr( sprintf( __( 'Customize &#8220;%s&#8221;' ), $current_theme->display('Name') ) ); ?>"><?php _e( 'Customize' ); ?></a></p>
633
- </div>
634
- <?php } ?>
635
- <?php if ( 0 < $count_install_theme ) { ?>
636
- <div style="padding-left:15px;">
637
- <h4><?php _e( 'Installed themes', 'bestwebsoft' ); ?></h4>
638
- <?php foreach ( $array_install_theme as $install_theme ) { ?>
639
- <div style="float:left; width:200px;"><?php echo $install_theme["title"]; ?></div> <p><a href="<?php echo $install_theme["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
640
- <?php } ?>
641
- </div>
642
- <?php } ?>
643
- <?php if ( 0 < $count_recomend_theme ) { ?>
644
- <div style="padding-left:15px;">
645
- <h4><?php _e( 'Recommended themes', 'bestwebsoft' ); ?></h4>
646
- <?php foreach ( $array_recomend_theme as $recomend_theme ) { ?>
647
- <div style="float:left; width:200px;"><?php echo $recomend_theme["title"]; ?></div> <p><a href="<?php echo $recomend_theme["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_theme["href"]; ?>" target="_blank"><?php echo __( "Download", 'bestwebsoft' ); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_theme["slug"]; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_theme["title"] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'bestwebsoft' ) ?></a></p>
648
- <?php } ?>
649
- </div>
650
- <?php } ?>
651
- <br />
652
- <?php } ?>
653
- <span style="color: rgb(136, 136, 136); font-size: 10px;"><?php _e( 'If you have any questions, please contact us via', 'bestwebsoft' ); ?> <a href="http://support.bestwebsoft.com">http://support.bestwebsoft.com</a></span>
654
- <div id="poststuff" class="bws_system_info_meta_box">
655
- <div class="postbox">
656
- <div class="handlediv" title="Click to toggle">
657
- <br>
658
- </div>
659
- <h3 class="hndle">
660
- <span><?php _e( 'System status', 'bestwebsoft' ); ?></span>
661
- </h3>
662
- <div class="inside">
663
- <table class="bws_system_info">
664
- <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
665
- <tbody>
666
- <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
667
- <tr>
668
- <td scope="row"><?php echo $key; ?></td>
669
- <td scope="row"><?php echo $value; ?></td>
670
- </tr>
671
- <?php } ?>
672
- </tbody>
673
- </table>
674
- <table class="bws_system_info">
675
- <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
676
- <tbody>
677
- <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
678
- <tr>
679
- <td scope="row"><?php echo $key; ?></td>
680
- <td scope="row"><?php echo $value; ?></td>
681
- </tr>
682
- <?php } ?>
683
- </tbody>
684
- </table>
685
- <table class="bws_system_info">
686
- <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
687
- <tbody>
688
- <?php
689
- if ( ! empty( $system_info['inactive_plugins'] ) ) {
690
- foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
691
- <tr>
692
- <td scope="row"><?php echo $key; ?></td>
693
- <td scope="row"><?php echo $value; ?></td>
694
- </tr>
695
- <?php }
696
- } ?>
697
- </tbody>
698
- </table>
699
- <div class="clear"></div>
700
- <form method="post" action="admin.php?page=bws_plugins">
701
- <p>
702
- <input type="hidden" name="bwsmn_form_submit" value="submit" />
703
- <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
704
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
705
- </p>
706
- </form>
707
- <form method="post" action="admin.php?page=bws_plugins">
708
- <p>
709
- <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
710
- <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
711
- <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
712
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
713
- </p>
714
- </form>
715
- </div>
716
- </div>
717
- </div>
718
- <?php } else { ?>
719
- <form method="post" action="admin.php?page=bws_plugins">
720
- <input type="hidden" name="bwsmn_form_submit_switch" value="submit" />
721
- <input type="submit" class="bws_switch_link" value="<?php _e( 'Switch to old interface', 'bestwebsoft' ) ?>" />
722
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ); ?>
723
- </form>
724
- </h2>
725
- <div class="clear"></div>
726
- <h2 class="nav-tab-wrapper">
727
- <a class="nav-tab<?php if ( !isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a>
728
- <?php if ( $wp_version >= '3.4' ) { ?>
729
- <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'themes' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=themes"><?php _e( 'Themes', 'bestwebsoft' ); ?></a>
730
- <?php } ?>
731
- <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=system_status"><?php _e( 'System status', 'bestwebsoft' ); ?></a>
732
- </h2>
733
- <?php if ( !isset( $_GET['action'] ) ) { ?>
734
- <ul class="subsubsub">
735
- <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> |
736
- <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=installed"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> |
737
- <li><a <?php if ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=recommended"><?php _e( 'Recommended', 'bestwebsoft' ); ?></a></li>
738
- </ul>
739
- <div class="clear"></div>
740
- <?php if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
741
- <h4 class="bws_installed"><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
742
- <?php foreach ( $all_plugins as $key_plugin => $value_plugin ) {
743
-
744
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
745
- $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
746
- if ( isset( $key_plugin_explode[1] ) )
747
- $icon = $key_plugin_explode[0];
748
- else {
749
- $key_plugin_explode = explode( '-pro/', $key_plugin );
750
- $icon = $key_plugin_explode[0];
751
- }
752
- } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
753
- $key_plugin_explode = explode( '-plugin/', $key_plugin );
754
- if ( isset( $key_plugin_explode[1] ) )
755
- $icon = $key_plugin_explode[0];
756
- else {
757
- $key_plugin_explode = explode( '/', $key_plugin );
758
- $icon = $key_plugin_explode[0];
759
- }
760
  }
 
 
 
 
 
 
 
 
 
761
 
762
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) { ?>
763
- <?php if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
764
- <div class="bws_product_box bws_exist_overlay">
765
- <div class="bws_product">
766
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
767
- <div class="bws_product_content">
768
- <div class="bws_product_icon">
769
- <div class="bws_product_icon_pro"></div>
770
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
771
- </div>
772
- <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?></div>
773
- </div>
774
- <div class="clear"></div>
775
- </div>
776
- <div class="bws_product_links">
777
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
778
- <span> | </span>
779
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
780
  </div>
 
781
  </div>
782
- <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
783
- <div class="bws_product_box bws_product_free">
784
- <div class="bws_product">
785
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
786
- <div class="bws_product_content">
787
- <div class="bws_product_icon">
788
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
789
- </div>
790
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
791
  </div>
792
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
793
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
794
- <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
795
- </a>
796
- <?php } else { ?>
797
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
798
- <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
799
- </a>
800
- <?php } ?>
801
- <div class="clear"></div>
802
- </div>
803
- <div class="bws_product_links">
804
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
805
- <span> | </span>
806
- <a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
807
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  </div>
809
- <?php }
810
- } else {
811
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
812
- <div class="bws_product_box bws_product_deactivated">
813
- <div class="bws_product">
814
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
815
- <div class="bws_product_content">
816
- <div class="bws_product_icon">
817
- <div class="bws_product_icon_pro"></div>
818
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
819
- </div>
820
- <div class="bws_product_description"><?php echo $bws_plugins_pro[ $key_plugin ]["description"]; ?></div>
821
  </div>
822
- <div class="clear"></div>
823
- </div>
824
- <div class="bws_product_links">
825
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
826
- <span> | </span>
827
- <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
828
  </div>
 
829
  </div>
830
- <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
831
- <div class="bws_product_box bws_product_deactivated bws_product_free">
832
- <div class="bws_product">
833
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
834
- <div class="bws_product_content">
835
- <div class="bws_product_icon">
836
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
837
- </div>
838
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
839
  </div>
840
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
841
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
842
- <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
843
- </a>
844
- <?php } else { ?>
845
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
846
- <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
847
- </a>
848
- <?php } ?>
849
- <div class="clear"></div>
850
- </div>
851
- <div class="bws_product_links">
852
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
853
- <span> | </span>
854
- <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
855
  </div>
 
 
 
 
 
 
 
 
 
 
856
  </div>
857
- <?php }
858
- }
 
 
 
 
 
859
  }
860
- } ?>
861
- <div class="clear"></div>
862
- <?php if ( ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
863
- <h4 class="bws_recommended"><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
864
- <?php foreach ( $recommend_plugins as $key_plugin => $value_plugin ) {
865
-
866
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
867
- $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
868
- if ( isset( $key_plugin_explode[1] ) )
869
- $icon = $key_plugin_explode[0];
870
- else {
871
- $key_plugin_explode = explode( '-pro/', $key_plugin );
872
- $icon = $key_plugin_explode[0];
873
- }
874
- } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
875
- $key_plugin_explode = explode( '-plugin/', $key_plugin );
876
- if ( isset( $key_plugin_explode[1] ) )
877
- $icon = $key_plugin_explode[0];
878
- else {
879
- $key_plugin_explode = explode( '/', $key_plugin );
880
- $icon = $key_plugin_explode[0];
881
- }
882
  }
883
- ?>
884
- <div class="bws_product_box">
885
- <div class="bws_product">
886
- <div class="bws_product_title"><?php echo $value_plugin["name"]; ?></div>
887
- <div class="bws_product_content">
888
- <div class="bws_product_icon">
889
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
890
- <div class="bws_product_icon_pro"></div>
891
- <?php } ?>
892
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
893
- </div>
894
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
895
  </div>
896
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
897
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["link"]; ?>" target="_blank">
898
- <?php echo _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
899
- </a>
900
- <?php } else { ?>
901
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
902
- <strong><?php echo _e( 'DONATE', 'bestwebsoft' );?></strong>
903
- </a>
904
- <?php } ?>
905
- </div>
906
- <div class="clear"></div>
907
- <div class="bws_product_links">
908
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php echo __( "Learn more", 'bestwebsoft' ); ?></a>
909
- <span> | </span>
910
- <a href="<?php echo $bws_plugins[ $key_plugin ]["wp_install"]; ?>" target="_blank"><?php echo __( "Install now", 'bestwebsoft' ); ?></a>
911
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
  </div>
913
- <?php }
914
- } ?>
915
- <?php } elseif ( 'themes' == $_GET['action'] ) { ?>
916
- <div id="availablethemes">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
917
  <?php
918
- global $tabs, $tab, $paged, $type, $theme_field_defaults;
919
- include( ABSPATH . 'wp-admin/includes/theme-install.php' );
920
- include( ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php' );
921
- include( ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php' );
922
-
923
- $theme_class = new WP_Theme_Install_List_Table();
924
- $paged = $theme_class->get_pagenum();
925
- $per_page = 36;
926
- $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults );
927
- $args['author'] = 'bestwebsoft';
928
- $args = apply_filters( 'install_themes_table_api_args_search', $args );
929
- $api = themes_api( 'query_themes', $args );
930
-
931
- if ( is_wp_error( $api ) )
932
- wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' );
933
-
934
- $theme_class->items = $api->themes;
935
- $theme_class->set_pagination_args( array(
936
- 'total_items' => $api->info['results'],
937
- 'per_page' => $per_page,
938
- 'infinite_scroll' => true,
939
- ) );
940
- $themes = $theme_class->items;
941
- foreach ( $themes as $theme ) {
942
- ?><div class="available-theme installable-theme"><?php
943
- global $themes_allowedtags;
944
- if ( empty( $theme ) )
945
- return;
946
-
947
- $name = wp_kses( $theme->name, $themes_allowedtags );
948
- $author = wp_kses( $theme->author, $themes_allowedtags );
949
- $preview_title = sprintf( __('Preview &#8220;%s&#8221;'), $name );
950
- $preview_url = add_query_arg( array(
951
- 'tab' => 'theme-information',
952
- 'theme' => $theme->slug,
953
- ), self_admin_url( 'theme-install.php' ) );
954
-
955
- $actions = array();
956
-
957
- $install_url = add_query_arg( array(
958
- 'action' => 'install-theme',
959
- 'theme' => $theme->slug,
960
- ), self_admin_url( 'update.php' ) );
961
-
962
- $update_url = add_query_arg( array(
963
- 'action' => 'upgrade-theme',
964
- 'theme' => $theme->slug,
965
- ), self_admin_url( 'update.php' ) );
966
-
967
- $status = 'install';
968
- $installed_theme = wp_get_theme( $theme->slug );
969
- if ( $installed_theme->exists() ) {
970
- if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
971
- $status = 'latest_installed';
972
- elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
973
- $status = 'newer_installed';
974
- else
975
- $status = 'update_available';
976
- }
977
- switch ( $status ) {
978
- default:
979
- case 'install':
980
- $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
981
- break;
982
- case 'update_available':
983
- $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
984
- break;
985
- case 'newer_installed':
986
- case 'latest_installed':
987
- $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
988
- break;
989
- }
990
- $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
991
- $actions = apply_filters( 'theme_install_actions', $actions, $theme );
992
- ?>
993
- <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
994
- <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
995
- </a>
996
- <h3><?php echo $name; ?></h3>
997
- <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
998
- <div class="action-links">
999
- <ul>
1000
- <?php foreach ( $actions as $action ): ?>
1001
- <li><?php echo $action; ?></li>
1002
- <?php endforeach; ?>
1003
- <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
1004
- </ul>
1005
- </div>
1006
- <?php $theme_class->install_theme_info( $theme );
1007
- ?></div>
1008
- <?php }
1009
- // end foreach $theme_names
1010
- $theme_class->theme_installer();
1011
- ?>
1012
- </div>
1013
- <?php } elseif ( 'system_status' == $_GET['action'] ) { ?>
1014
- <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
1015
- <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
1016
- <h3><?php _e( 'System status', 'bestwebsoft' ); ?></h3>
1017
- <div class="inside">
1018
- <table class="bws_system_info">
1019
- <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
1020
- <tbody>
1021
- <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
1022
  <tr>
1023
  <td scope="row"><?php echo $key; ?></td>
1024
  <td scope="row"><?php echo $value; ?></td>
1025
  </tr>
1026
- <?php } ?>
1027
- </tbody>
1028
- </table>
1029
- <table class="bws_system_info">
1030
- <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
1031
- <tbody>
1032
- <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
1033
- <tr>
1034
- <td scope="row"><?php echo $key; ?></td>
1035
- <td scope="row"><?php echo $value; ?></td>
1036
- </tr>
1037
- <?php } ?>
1038
- </tbody>
1039
- </table>
1040
- <table class="bws_system_info">
1041
- <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
1042
- <tbody>
1043
- <?php
1044
- if ( ! empty( $system_info['inactive_plugins'] ) ) {
1045
- foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
1046
- <tr>
1047
- <td scope="row"><?php echo $key; ?></td>
1048
- <td scope="row"><?php echo $value; ?></td>
1049
- </tr>
1050
- <?php }
1051
- } ?>
1052
- </tbody>
1053
- </table>
1054
- <div class="clear"></div>
1055
- <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
1056
- <p>
1057
- <input type="hidden" name="bwsmn_form_submit" value="submit" />
1058
- <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
1059
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
1060
- </p>
1061
- </form>
1062
- <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
1063
- <p>
1064
- <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
1065
- <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
1066
- <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
1067
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
1068
- </p>
1069
- </form>
1070
- </div>
1071
- <?php }
1072
- } ?>
1073
  </div>
1074
  <?php }
1075
  }
@@ -1084,9 +840,14 @@ if ( ! function_exists ( 'bws_plugin_init' ) ) {
1084
  if ( ! function_exists ( 'bws_admin_head' ) ) {
1085
  function bws_admin_head() {
1086
  global $wp_version;
 
 
 
 
 
1087
  if ( isset( $_GET['page'] ) && $_GET['page'] == "bws_plugins" ) {
1088
  wp_enqueue_style( 'bws_menu_style', plugins_url( 'css/style.css', __FILE__ ) );
1089
- wp_enqueue_script( 'bws_menu_script', plugins_url( 'js/bws_menu.js' , __FILE__ ) );
1090
  if ( $wp_version >= '3.8' )
1091
  wp_enqueue_script( 'theme-install' );
1092
  elseif ( $wp_version >= '3.4' )
1
  <?php
2
  /*
3
+ * Function for displaying BestWebSoft menu
4
+ * Version: 1.2.3
5
  */
6
+
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
8
  function bws_add_menu_render() {
9
  global $wpdb, $wpmu, $wp_version, $bws_plugin_info;
10
+ $error = $message = $bwsmn_form_email = '';
 
 
11
  $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13';
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
14
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
15
 
16
  $bws_plugins = array(
17
  'captcha/captcha.php' => array(
199
  'download' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
200
  'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins',
201
  'settings' => 'admin.php?page=sndr_settings'
202
+ ),
203
+ 'subscriber/subscriber.php' => array(
204
+ 'name' => 'Subscriber',
205
+ 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',
206
+ 'link' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
207
+ 'download' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
208
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins',
209
+ 'settings' => 'admin.php?page=sbscrbr_settings_page'
210
+ ),
211
+ 'contact-form-multi/contact-form-multi.php' => array(
212
+ 'name' => 'Contact Form Multi',
213
+ 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',
214
+ 'link' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
215
+ 'download' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
216
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+Multi+Bestwebsoft&plugin-search-input=Search+Plugins',
217
+ 'settings' => ''
218
+ ),
219
+ 'bws-google-maps/bws-google-maps.php' => array(
220
+ 'name' => 'BestWebSoft Google Maps',
221
+ 'description' => 'Easy to set up and insert Google Maps to your website.',
222
+ 'link' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
223
+ 'download' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
224
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Maps&plugin-search-input=Search+Plugins',
225
+ 'settings' => 'admin.php?page=bws-google-maps.php'
226
+ ),
227
+ 'bws-google-analytics/bws-google-analytics.php' => array(
228
+ 'name' => 'BestWebSoft Google Analytics',
229
+ 'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.',
230
+ 'link' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
231
+ 'download' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
232
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Analytics&plugin-search-input=Search+Plugins',
233
+ 'settings' => 'admin.php?page=bws-google-analytics.php'
234
  )
235
  );
236
  $bws_plugins_pro = array(
309
  $all_plugins = get_plugins();
310
  $active_plugins = get_option( 'active_plugins' );
311
 
312
+ $recommend_plugins = array_diff_key( $bws_plugins, $all_plugins );
 
 
 
 
 
 
 
 
313
 
314
+ foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
315
+ if ( ! isset( $all_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
316
+ unset( $recommend_plugins[ $key_plugin ] );
 
 
 
 
317
  }
318
+ }
319
 
320
+ foreach ( $all_plugins as $key_plugin => $value_plugin ) {
321
+ if ( ! isset( $bws_plugins[ $key_plugin ] ) && ! isset( $bws_plugins_pro[ $key_plugin ] ) )
322
+ unset( $all_plugins[ $key_plugin ] );
 
323
 
324
+ if ( isset( $bws_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
325
+ unset( $all_plugins[ $key_plugin ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
  }
328
 
329
+ if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) {
330
  $all_plugins = get_plugins();
331
  $active_plugins = get_option( 'active_plugins' );
332
  $sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
476
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
477
  }
478
  }
 
479
  ?>
480
  <div class="wrap">
481
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
482
+ <h2>BestWebSoft</h2>
483
+ <h2 class="nav-tab-wrapper">
484
+ <a class="nav-tab<?php if ( !isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a>
485
+ <?php if ( $wp_version >= '3.4' ) { ?>
486
+ <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'themes' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=themes"><?php _e( 'Themes', 'bestwebsoft' ); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  <?php } ?>
488
+ <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=system_status"><?php _e( 'System status', 'bestwebsoft' ); ?></a>
489
+ </h2>
490
+ <?php if ( !isset( $_GET['action'] ) ) { ?>
491
+ <ul class="subsubsub">
492
+ <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> |
493
+ <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=installed"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> |
494
+ <li><a <?php if ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=recommended"><?php _e( 'Recommended', 'bestwebsoft' ); ?></a></li>
495
+ </ul>
496
+ <div class="clear"></div>
497
+ <?php if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
498
+ <h4 class="bws_installed"><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
499
+ <?php foreach ( $all_plugins as $key_plugin => $value_plugin ) {
500
+
501
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
502
+ $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
503
+ if ( isset( $key_plugin_explode[1] ) )
504
+ $icon = $key_plugin_explode[0];
505
+ else {
506
+ $key_plugin_explode = explode( '-pro/', $key_plugin );
507
+ $icon = $key_plugin_explode[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  }
509
+ } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
510
+ $key_plugin_explode = explode( '-plugin/', $key_plugin );
511
+ if ( isset( $key_plugin_explode[1] ) )
512
+ $icon = $key_plugin_explode[0];
513
+ else {
514
+ $key_plugin_explode = explode( '/', $key_plugin );
515
+ $icon = $key_plugin_explode[0];
516
+ }
517
+ }
518
 
519
+ if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) { ?>
520
+ <?php if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
521
+ <div class="bws_product_box bws_exist_overlay">
522
+ <div class="bws_product">
523
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
524
+ <div class="bws_product_content">
525
+ <div class="bws_product_icon">
526
+ <div class="bws_product_icon_pro"></div>
527
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
528
+ </div>
529
+ <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?></div>
 
 
 
 
 
 
 
530
  </div>
531
+ <div class="clear"></div>
532
  </div>
533
+ <div class="bws_product_links">
534
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
535
+ <span> | </span>
536
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
537
+ </div>
538
+ </div>
539
+ <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
540
+ <div class="bws_product_box bws_product_free">
541
+ <div class="bws_product">
542
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
543
+ <div class="bws_product_content">
544
+ <div class="bws_product_icon">
545
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
546
  </div>
547
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  </div>
549
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
550
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
551
+ <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
552
+ </a>
553
+ <?php } else { ?>
554
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
555
+ <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
556
+ </a>
557
+ <?php } ?>
558
+ <div class="clear"></div>
559
+ </div>
560
+ <div class="bws_product_links">
561
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
562
+ <span> | </span>
563
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
564
  </div>
565
+ </div>
566
+ <?php }
567
+ } else {
568
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
569
+ <div class="bws_product_box bws_product_deactivated">
570
+ <div class="bws_product">
571
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
572
+ <div class="bws_product_content">
573
+ <div class="bws_product_icon">
574
+ <div class="bws_product_icon_pro"></div>
575
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
 
576
  </div>
577
+ <div class="bws_product_description"><?php echo $bws_plugins_pro[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
578
  </div>
579
+ <div class="clear"></div>
580
  </div>
581
+ <div class="bws_product_links">
582
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
583
+ <span> | </span>
584
+ <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
585
+ </div>
586
+ </div>
587
+ <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
588
+ <div class="bws_product_box bws_product_deactivated bws_product_free">
589
+ <div class="bws_product">
590
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
591
+ <div class="bws_product_content">
592
+ <div class="bws_product_icon">
593
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
594
  </div>
595
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  </div>
597
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
598
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
599
+ <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
600
+ </a>
601
+ <?php } else { ?>
602
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
603
+ <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
604
+ </a>
605
+ <?php } ?>
606
+ <div class="clear"></div>
607
  </div>
608
+ <div class="bws_product_links">
609
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
610
+ <span> | </span>
611
+ <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
612
+ </div>
613
+ </div>
614
+ <?php }
615
  }
616
+ }
617
+ } ?>
618
+ <div class="clear"></div>
619
+ <?php if ( ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
620
+ <h4 class="bws_recommended"><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
621
+ <?php foreach ( $recommend_plugins as $key_plugin => $value_plugin ) {
622
+
623
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
624
+ $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
625
+ if ( isset( $key_plugin_explode[1] ) )
626
+ $icon = $key_plugin_explode[0];
627
+ else {
628
+ $key_plugin_explode = explode( '-pro/', $key_plugin );
629
+ $icon = $key_plugin_explode[0];
 
 
 
 
 
 
 
 
630
  }
631
+ } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
632
+ $key_plugin_explode = explode( '-plugin/', $key_plugin );
633
+ if ( isset( $key_plugin_explode[1] ) )
634
+ $icon = $key_plugin_explode[0];
635
+ else {
636
+ $key_plugin_explode = explode( '/', $key_plugin );
637
+ $icon = $key_plugin_explode[0];
638
+ }
639
+ }
640
+ ?>
641
+ <div class="bws_product_box">
642
+ <div class="bws_product">
643
+ <div class="bws_product_title"><?php echo $value_plugin["name"]; ?></div>
644
+ <div class="bws_product_content">
645
+ <div class="bws_product_icon">
646
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
647
+ <div class="bws_product_icon_pro"></div>
648
+ <?php } ?>
649
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
650
  </div>
651
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
652
  </div>
653
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
654
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["link"]; ?>" target="_blank">
655
+ <?php echo _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
656
+ </a>
657
+ <?php } else { ?>
658
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
659
+ <strong><?php echo _e( 'DONATE', 'bestwebsoft' );?></strong>
660
+ </a>
661
+ <?php } ?>
662
+ </div>
663
+ <div class="clear"></div>
664
+ <div class="bws_product_links">
665
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php echo __( "Learn more", 'bestwebsoft' ); ?></a>
666
+ <span> | </span>
667
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["wp_install"]; ?>" target="_blank"><?php echo __( "Install now", 'bestwebsoft' ); ?></a>
668
  </div>
669
+ </div>
670
+ <?php }
671
+ } ?>
672
+ <?php } elseif ( 'themes' == $_GET['action'] ) { ?>
673
+ <div id="availablethemes">
674
+ <?php
675
+ global $tabs, $tab, $paged, $type, $theme_field_defaults;
676
+ include( ABSPATH . 'wp-admin/includes/theme-install.php' );
677
+ include( ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php' );
678
+ include( ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php' );
679
+
680
+ $theme_class = new WP_Theme_Install_List_Table();
681
+ $paged = $theme_class->get_pagenum();
682
+ $per_page = 36;
683
+ $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults );
684
+ $args['author'] = 'bestwebsoft';
685
+ $args = apply_filters( 'install_themes_table_api_args_search', $args );
686
+ $api = themes_api( 'query_themes', $args );
687
+
688
+ if ( is_wp_error( $api ) )
689
+ wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' );
690
+
691
+ $theme_class->items = $api->themes;
692
+ $theme_class->set_pagination_args( array(
693
+ 'total_items' => $api->info['results'],
694
+ 'per_page' => $per_page,
695
+ 'infinite_scroll' => true,
696
+ ) );
697
+ $themes = $theme_class->items;
698
+ foreach ( $themes as $theme ) {
699
+ ?><div class="available-theme installable-theme"><?php
700
+ global $themes_allowedtags;
701
+ if ( empty( $theme ) )
702
+ return;
703
+
704
+ $name = wp_kses( $theme->name, $themes_allowedtags );
705
+ $author = wp_kses( $theme->author, $themes_allowedtags );
706
+ $preview_title = sprintf( __('Preview &#8220;%s&#8221;'), $name );
707
+ $preview_url = add_query_arg( array(
708
+ 'tab' => 'theme-information',
709
+ 'theme' => $theme->slug,
710
+ ), self_admin_url( 'theme-install.php' ) );
711
+
712
+ $actions = array();
713
+
714
+ $install_url = add_query_arg( array(
715
+ 'action' => 'install-theme',
716
+ 'theme' => $theme->slug,
717
+ ), self_admin_url( 'update.php' ) );
718
+
719
+ $update_url = add_query_arg( array(
720
+ 'action' => 'upgrade-theme',
721
+ 'theme' => $theme->slug,
722
+ ), self_admin_url( 'update.php' ) );
723
+
724
+ $status = 'install';
725
+ $installed_theme = wp_get_theme( $theme->slug );
726
+ if ( $installed_theme->exists() ) {
727
+ if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
728
+ $status = 'latest_installed';
729
+ elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
730
+ $status = 'newer_installed';
731
+ else
732
+ $status = 'update_available';
733
+ }
734
+ switch ( $status ) {
735
+ default:
736
+ case 'install':
737
+ $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
738
+ break;
739
+ case 'update_available':
740
+ $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
741
+ break;
742
+ case 'newer_installed':
743
+ case 'latest_installed':
744
+ $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
745
+ break;
746
+ }
747
+ $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
748
+ $actions = apply_filters( 'theme_install_actions', $actions, $theme );
749
+ ?>
750
+ <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
751
+ <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
752
+ </a>
753
+ <h3><?php echo $name; ?></h3>
754
+ <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
755
+ <div class="action-links">
756
+ <ul>
757
+ <?php foreach ( $actions as $action ): ?>
758
+ <li><?php echo $action; ?></li>
759
+ <?php endforeach; ?>
760
+ <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
761
+ </ul>
762
+ </div>
763
+ <?php $theme_class->install_theme_info( $theme );
764
+ ?></div>
765
+ <?php }
766
+ // end foreach $theme_names
767
+ $theme_class->theme_installer();
768
+ ?>
769
+ </div>
770
+ <?php } elseif ( 'system_status' == $_GET['action'] ) { ?>
771
+ <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
772
+ <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
773
+ <h3><?php _e( 'System status', 'bestwebsoft' ); ?></h3>
774
+ <div class="inside">
775
+ <table class="bws_system_info">
776
+ <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
777
+ <tbody>
778
+ <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
779
+ <tr>
780
+ <td scope="row"><?php echo $key; ?></td>
781
+ <td scope="row"><?php echo $value; ?></td>
782
+ </tr>
783
+ <?php } ?>
784
+ </tbody>
785
+ </table>
786
+ <table class="bws_system_info">
787
+ <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
788
+ <tbody>
789
+ <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
790
+ <tr>
791
+ <td scope="row"><?php echo $key; ?></td>
792
+ <td scope="row"><?php echo $value; ?></td>
793
+ </tr>
794
+ <?php } ?>
795
+ </tbody>
796
+ </table>
797
+ <table class="bws_system_info">
798
+ <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
799
+ <tbody>
800
  <?php
801
+ if ( ! empty( $system_info['inactive_plugins'] ) ) {
802
+ foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
  <tr>
804
  <td scope="row"><?php echo $key; ?></td>
805
  <td scope="row"><?php echo $value; ?></td>
806
  </tr>
807
+ <?php }
808
+ } ?>
809
+ </tbody>
810
+ </table>
811
+ <div class="clear"></div>
812
+ <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
813
+ <p>
814
+ <input type="hidden" name="bwsmn_form_submit" value="submit" />
815
+ <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
816
+ <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
817
+ </p>
818
+ </form>
819
+ <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
820
+ <p>
821
+ <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
822
+ <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
823
+ <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
824
+ <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
825
+ </p>
826
+ </form>
827
+ </div>
828
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  </div>
830
  <?php }
831
  }
840
  if ( ! function_exists ( 'bws_admin_head' ) ) {
841
  function bws_admin_head() {
842
  global $wp_version;
843
+ if ( $wp_version < 3.8 )
844
+ wp_enqueue_style( 'pdfprnt-stylesheet', plugins_url( 'css/general_style_wp_before_3.8.css', __FILE__ ) );
845
+ else
846
+ wp_enqueue_style( 'pdfprnt-stylesheet', plugins_url( 'css/general_style.css', __FILE__ ) );
847
+
848
  if ( isset( $_GET['page'] ) && $_GET['page'] == "bws_plugins" ) {
849
  wp_enqueue_style( 'bws_menu_style', plugins_url( 'css/style.css', __FILE__ ) );
850
+ wp_enqueue_script( 'bws_menu_script', plugins_url( 'js/bws_menu.js' , __FILE__ ) );
851
  if ( $wp_version >= '3.8' )
852
  wp_enqueue_script( 'theme-install' );
853
  elseif ( $wp_version >= '3.4' )
bws_menu/css/general_style.css ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
2
+ .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
3
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
4
+ #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
5
+ background: url("../images/icon_16_single.png") no-repeat scroll center center transparent;
6
+ }
7
+ #adminmenu #toplevel_page_bws_plugins.wp-not-current-submenu div.wp-menu-image {
8
+ opacity: 0.7;
9
+ }
10
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
11
+ display: none;
12
+ }
13
+ /*
14
+ * styles for rate-support div on the settings page
15
+ */
16
+ .bws-plugin-reviews {
17
+ background: none repeat scroll 0 0 #BEE1F1;
18
+ border: 1px solid #70A8C2;
19
+ border-radius: 3px;
20
+ max-width: 700px;
21
+ }
22
+ .bws-plugin-reviews-rate {
23
+ padding: 10px;
24
+ border-bottom: 1px dashed #70A8C2;
25
+ }
26
+ .bws-plugin-reviews-support {
27
+ padding: 10px;
28
+ }
29
+ /*
30
+ * styles for Go PRO tab
31
+ */
32
+ .bws_go_pro_tab {
33
+ background-color: #2A95C5;
34
+ border-color: #11688F;
35
+ color: #FFFFFF;
36
+ font-weight: normal;
37
+ text-shadow: none;
38
+ }
39
+ .bws_go_pro_tab:hover {
40
+ background-color: #2080AB;
41
+ color: #FFFFFF;
42
+ border-color: #11688F;
43
+ }
44
+ .bws_go_pro_tab.nav-tab-active {
45
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
46
+ border-color: #CCCCCC #CCCCCC #F1F1F1;
47
+ color: #000000;
48
+ }
49
+ /*
50
+ * styles for pro_version settings and tooltip
51
+ */
52
+ table.bws_pro_version {
53
+ background: #E0E0E0;
54
+ border: 1px solid #AAA;
55
+ margin-bottom: 5px;
56
+ width: auto !important;
57
+ float: left;
58
+ }
59
+ table.bws_pro_version th,
60
+ table.bws_pro_version td {
61
+ color: #555;
62
+ padding-left: 10px;
63
+ }
64
+ td.bws_pro_version {
65
+ background: #E0E0E0;
66
+ border: 1px solid #AAA;
67
+ }
68
+ .bws_pro_version_tooltip {
69
+ background: #FFF;
70
+ border: 1px solid #AAA;
71
+ }
72
+ .form-table.bws_pro_version .bws_pro_version_tooltip th {
73
+ font-weight: normal;
74
+ padding-bottom: 10px;
75
+ }
76
+ /*
77
+ * styles for banner
78
+ */
79
+ .bws_banner_on_plugin_page {
80
+ border: 1px solid #d4d4d4;
81
+ margin: 12px 0;
82
+ background: #FFF;
83
+ position: relative;
84
+ overflow: hidden
85
+ }
86
+ .bws_banner_on_plugin_page .text {
87
+ color: #000;
88
+ font-size: 15px;
89
+ line-height: 26px;
90
+ margin: 18px 18px 14px;
91
+ float: left;
92
+ width: auto;
93
+ max-width: 80%;
94
+ }
95
+ .bws_banner_on_plugin_page .text span {
96
+ font-size: 12px;
97
+ opacity: 0.7;
98
+ }
99
+ .bws_banner_on_plugin_page .button {
100
+ float: left;
101
+ border: none;
102
+ font-size: 14px;
103
+ margin: 18px 0 18px 16px;
104
+ padding: 12px 0;
105
+ color: #FFF;
106
+ text-shadow: none;
107
+ font-weight: bold;
108
+ background: #0074A2;
109
+ -moz-border-radius: 3px;
110
+ border-radius: 3px;
111
+ -webkit-border-radius: 3px;
112
+ text-decoration: none;
113
+ height: 50px;
114
+ text-align: center;
115
+ text-transform: uppercase;
116
+ width: 147px;
117
+ box-shadow: none;
118
+ line-height: 26px;
119
+ }
120
+ .bws_banner_on_plugin_page .button:hover,
121
+ .bws_banner_on_plugin_page .button:focus {
122
+ background: #222;
123
+ color: #FFF;
124
+ }
125
+ .bws_banner_on_plugin_page .icon {
126
+ float: right;
127
+ margin: 12px 8px 8px 0;
128
+ }
129
+ .bws_banner_on_plugin_page .close_icon {
130
+ float: right;
131
+ margin: 8px;
132
+ cursor: pointer;
133
+ }
134
+ /* #### Mobile Phones Portrait or Landscape #### */
135
+ @media screen and (max-device-width: 640px) {
136
+ .bws_banner_on_plugin_page .text,
137
+ .bws_banner_on_plugin_page .icon,
138
+ .bws_banner_on_plugin_page .button_div,
139
+ .bws_banner_on_plugin_page .button {
140
+ float: none;
141
+ text-align: center;
142
+ max-width: 100%;
143
+ }
144
+ }
bws_menu/css/general_style_wp_before_3.8.css ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
2
+ background: url("../images/icon_16.png") no-repeat scroll center center transparent;
3
+ }
4
+ #wpadminbar li#wp-admin-bar-pdfprnt-bar-menu a:hover span.admin-bar-menu-bws-icon {
5
+ background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
6
+ }
7
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
8
+ #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
9
+ background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
10
+ }
11
+ .wrap #icon-options-general.icon32-bws {
12
+ background: url("../images/icon_36.png") no-repeat scroll left top transparent;
13
+ }
14
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
15
+ display: none;
16
+ }
17
+ /*
18
+ * styles for rate-support div on the settings page
19
+ */
20
+ .bws-plugin-reviews {
21
+ background: none repeat scroll 0 0 #BEE1F1;
22
+ border: 1px solid #70A8C2;
23
+ border-radius: 3px;
24
+ max-width: 700px;
25
+ }
26
+ .bws-plugin-reviews-rate {
27
+ padding: 10px;
28
+ border-bottom: 1px dashed #70A8C2;
29
+ }
30
+ .bws-plugin-reviews-support {
31
+ padding: 10px;
32
+ }
33
+ /*
34
+ * styles for Go PRO tab
35
+ */
36
+ .bws_go_pro_tab {
37
+ background-color: #2A95C5;
38
+ border-color: #11688F;
39
+ color: #FFFFFF;
40
+ font-weight: normal !important;
41
+ text-shadow: none;
42
+ }
43
+ .bws_go_pro_tab:hover {
44
+ background-color: #2080AB;
45
+ color: #FFFFFF;
46
+ border-color: #11688F;
47
+ }
48
+ /*
49
+ * styles for pro_version settings and tooltip
50
+ */
51
+ table.bws_pro_version {
52
+ background: #E0E0E0;
53
+ border: 1px solid #AAA;
54
+ margin-bottom: 5px;
55
+ width: auto !important;
56
+ float: left;
57
+ }
58
+ table.bws_pro_version th,
59
+ table.bws_pro_version td {
60
+ color: #555;
61
+ padding-left: 10px;
62
+ }
63
+ td.bws_pro_version {
64
+ background: #E0E0E0;
65
+ border: 1px solid #AAA;
66
+ }
67
+ .bws_pro_version_tooltip {
68
+ background: #FFF;
69
+ border: 1px solid #AAA;
70
+ }
71
+ .form-table.bws_pro_version .bws_pro_version_tooltip th {
72
+ font-weight: normal;
73
+ padding-bottom: 10px;
74
+ }
75
+ /*
76
+ * styles for banner
77
+ */
78
+ .bws_banner_on_plugin_page {
79
+ border: 1px solid #d4d4d4;
80
+ background: #FFF;
81
+ position: relative;
82
+ overflow: hidden;
83
+ margin: 12px 0;
84
+ background: #ECECEC;
85
+ -moz-border-radius: 3px;
86
+ -webkit-border-radius: 3px;
87
+ border-radius: 3px;
88
+ }
89
+ .bws_banner_on_plugin_page .text {
90
+ color: #000;
91
+ font-size: 15px;
92
+ line-height: 26px;
93
+ margin: 18px 18px 14px;
94
+ float: left;
95
+ width: auto;
96
+ max-width: 80%;
97
+ }
98
+ .bws_banner_on_plugin_page .text span {
99
+ font-size: 12px;
100
+ opacity: 0.7;
101
+ }
102
+ .bws_banner_on_plugin_page .button {
103
+ float: left;
104
+ border: none;
105
+ font-size: 14px;
106
+ margin: 18px 0 18px 16px;
107
+ padding: 14px 0;
108
+ color: #FFF;
109
+ text-shadow: none;
110
+ font-weight: bold;
111
+ background: #0074A2;
112
+ -moz-border-radius: 3px;
113
+ border-radius: 3px;
114
+ -webkit-border-radius: 3px;
115
+ text-decoration: none;
116
+ height: 50px;
117
+ text-align: center;
118
+ text-transform: uppercase;
119
+ width: 147px;
120
+ box-shadow: none;
121
+ -moz-box-sizing: border-box;
122
+ -webkit-box-sizing: border-box;
123
+ box-sizing: border-box;
124
+ }
125
+ .bws_banner_on_plugin_page .button:hover,
126
+ .bws_banner_on_plugin_page .button:focus {
127
+ background: #222;
128
+ color: #FFF;
129
+ }
130
+ .bws_banner_on_plugin_page .icon {
131
+ float: right;
132
+ margin: 12px 8px 8px 0;
133
+ }
134
+ .bws_banner_on_plugin_page .close_icon {
135
+ float: right;
136
+ margin: 8px;
137
+ cursor: pointer;
138
+ }
139
+ /* #### Mobile Phones Portrait or Landscape #### */
140
+ @media screen and (max-device-width: 640px) {
141
+ .bws_banner_on_plugin_page .text,
142
+ .bws_banner_on_plugin_page .icon,
143
+ .bws_banner_on_plugin_page .button_div,
144
+ .bws_banner_on_plugin_page .button {
145
+ float: none;
146
+ text-align: center;
147
+ }
148
+ }
bws_menu/css/style.css CHANGED
@@ -86,7 +86,7 @@ h4.bws_recommended {
86
  padding: 0 10px;
87
  color: #a7a7a7;
88
  display: none;
89
- font-size: 13px;
90
  }
91
  .bws_product_links {
92
  padding: 10px 6px 12px;
@@ -136,15 +136,4 @@ h4.bws_recommended {
136
  }
137
  .bws_product_button.bws_donate_button:hover {
138
  background: #D69108 !important;
139
- }
140
- .bws_switch_link {
141
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
142
- border: medium none;
143
- color: #0074A2;
144
- float: right;
145
- cursor: pointer;
146
- font-size: 13px;
147
- }
148
- .bws_switch_link:hover {
149
- color: #2ea2cc;
150
  }
86
  padding: 0 10px;
87
  color: #a7a7a7;
88
  display: none;
89
+ font-size: 12px;
90
  }
91
  .bws_product_links {
92
  padding: 10px 6px 12px;
136
  }
137
  .bws_product_button.bws_donate_button:hover {
138
  background: #D69108 !important;
 
 
 
 
 
 
 
 
 
 
 
139
  }
bws_menu/icons/bws-google-analytics.png ADDED
Binary file
bws_menu/icons/bws-google-maps.png ADDED
Binary file
bws_menu/icons/contact-form-multi.png ADDED
Binary file
bws_menu/icons/subscriber.png ADDED
Binary file
{images → bws_menu/images}/icon_16.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_b.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_c.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_single.png RENAMED
File without changes
{images → bws_menu/images}/icon_36.png RENAMED
File without changes
{images → bws_menu/images}/icon_36_b.png RENAMED
File without changes
css/{stylesheet.css → style.css} RENAMED
@@ -1,58 +1,12 @@
1
- #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
2
- .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
3
- #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
4
- #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
5
- background: url("../images/icon_16_single.png") no-repeat scroll center center transparent;
6
- }
7
  #adminmenu #menu-posts-gallery:hover div.wp-menu-image:before,
8
  #adminmenu #menu-posts-gallery.wp-has-current-submenu div.wp-menu-image:before,
9
  #adminmenu #menu-posts-gallery div.wp-menu-image:before {
10
  background: url("../images/menu_single.png") no-repeat scroll center 8px transparent;
11
  content: '';
12
  }
13
- #adminmenu #toplevel_page_bws_plugins.wp-not-current-submenu div.wp-menu-image,
14
  #adminmenu #menu-posts-gallery.wp-not-current-submenu div.wp-menu-image {
15
  opacity: 0.7;
16
  }
17
- #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
18
- display: none;
19
- }
20
- /*
21
- * Tab GO PRO
22
- */
23
- .bws_go_pro_tab {
24
- background-color: #2A95C5;
25
- border-color: #11688F;
26
- color: #FFFFFF;
27
- font-weight: normal;
28
- text-shadow: none;
29
- }
30
- .bws_go_pro_tab:hover {
31
- background-color: #2080AB;
32
- color: #FFFFFF;
33
- border-color: #11688F;
34
- }
35
- .bws_go_pro_tab.nav-tab-active {
36
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
37
- border-color: #CCCCCC #CCCCCC #F1F1F1;
38
- color: #000000;
39
- }
40
- /*
41
- * styles for rate-support div on the settings page
42
- */
43
- .bws-plugin-reviews {
44
- background: none repeat scroll 0 0 #BEE1F1;
45
- border: 1px solid #70A8C2;
46
- border-radius: 3px;
47
- max-width: 700px;
48
- }
49
- .bws-plugin-reviews-rate {
50
- padding: 10px;
51
- border-bottom: 1px dashed #70A8C2;
52
- }
53
- .bws-plugin-reviews-support {
54
- padding: 10px;
55
- }
56
  /*
57
  * styles for pro_version settings, banner and tooltip
58
  */
@@ -65,80 +19,6 @@ div.gllr_pro_version {
65
  background: #E0E0E0;
66
  padding: 2px 3px;
67
  }
68
- table.bws_pro_version {
69
- background: #E0E0E0;
70
- border: 1px solid #AAA;
71
- margin-bottom: 5px;
72
- width: auto !important;
73
- float: left;
74
- }
75
- table.bws_pro_version th,
76
- table.bws_pro_version td {
77
- color: #555;
78
- padding-left: 10px;
79
- }
80
- .bws_pro_version_tooltip {
81
- background: #FFF;
82
- border: 1px solid #AAA;
83
- }
84
- .form-table.bws_pro_version .bws_pro_version_tooltip th {
85
- font-weight: normal;
86
- padding-bottom: 10px;
87
- }
88
- /* banner on the plugins page */
89
- .bws_banner_on_plugin_page {
90
- border: 1px solid #d4d4d4;
91
- margin: 12px 0;
92
- background: #FFF;
93
- position: relative;
94
- overflow: hidden
95
- }
96
- .bws_banner_on_plugin_page .text {
97
- color: #000;
98
- font-size: 15px;
99
- line-height: 26px;
100
- margin: 18px 18px 14px;
101
- float: left;
102
- width: 80%;
103
- }
104
- .bws_banner_on_plugin_page .text span {
105
- font-size: 12px;
106
- opacity: 0.7;
107
- }
108
- .bws_banner_on_plugin_page .button {
109
- float: left;
110
- border: none;
111
- font-size: 14px;
112
- margin: 18px 0 18px 16px;
113
- padding: 12px 0;
114
- color: #FFF;
115
- text-shadow: none;
116
- font-weight: bold;
117
- background: #0074A2;
118
- -moz-border-radius: 3px;
119
- border-radius: 3px;
120
- -webkit-border-radius: 3px;
121
- text-decoration: none;
122
- height: 50px;
123
- text-align: center;
124
- text-transform: uppercase;
125
- width: 147px;
126
- box-shadow: none;
127
- }
128
- .bws_banner_on_plugin_page .button:hover,
129
- .bws_banner_on_plugin_page .button:focus {
130
- background: #222;
131
- color: #FFF;
132
- }
133
- .bws_banner_on_plugin_page .icon {
134
- float: right;
135
- margin: 18px 8px 8px 0;
136
- }
137
- .bws_banner_on_plugin_page .close_icon {
138
- float: right;
139
- margin: 8px;
140
- cursor: pointer;
141
- }
142
  /*
143
  * styles for gallery page
144
  */
 
 
 
 
 
 
1
  #adminmenu #menu-posts-gallery:hover div.wp-menu-image:before,
2
  #adminmenu #menu-posts-gallery.wp-has-current-submenu div.wp-menu-image:before,
3
  #adminmenu #menu-posts-gallery div.wp-menu-image:before {
4
  background: url("../images/menu_single.png") no-repeat scroll center 8px transparent;
5
  content: '';
6
  }
 
7
  #adminmenu #menu-posts-gallery.wp-not-current-submenu div.wp-menu-image {
8
  opacity: 0.7;
9
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /*
11
  * styles for pro_version settings, banner and tooltip
12
  */
19
  background: #E0E0E0;
20
  padding: 2px 3px;
21
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /*
23
  * styles for gallery page
24
  */
css/style_wp_before_3.8.css CHANGED
@@ -1,18 +1,3 @@
1
- #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
2
- background: url("../images/icon_16.png") no-repeat scroll center center transparent;
3
- }
4
- .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
5
- background: url("../images/icon_16_b.png") no-repeat scroll center center transparent;
6
- }
7
- #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image, #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
8
- background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
9
- }
10
- .wrap #icon-options-general.icon32-bws {
11
- background: url("../images/icon_36.png") no-repeat scroll left top transparent;
12
- }
13
- .admin-color-classic .wrap #icon-options-general.icon32-bws {
14
- background: url("../images/icon_36_b.png") no-repeat scroll left top transparent;
15
- }
16
  .wrap #icon-edit.icon32-posts-gallery {
17
  background: url("../images/icons_32.png") no-repeat scroll left top transparent;
18
  }
@@ -31,40 +16,6 @@
31
  .admin-color-classic #adminmenu #menu-posts-gallery div.wp-menu-image {
32
  background: url("../images/menu_b.png?ver=20100531") no-repeat scroll left -32px transparent;
33
  }
34
- #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
35
- display: none;
36
- }
37
- /*
38
- * Tab GO PRO
39
- */
40
- .bws_go_pro_tab {
41
- background-color: #2A95C5;
42
- border-color: #11688F;
43
- color: #FFFFFF;
44
- font-weight: normal !important;
45
- text-shadow: none;
46
- }
47
- .bws_go_pro_tab:hover {
48
- background-color: #2080AB;
49
- color: #FFFFFF;
50
- border-color: #11688F;
51
- }
52
- /*
53
- * styles for rate-support div on the settings page
54
- */
55
- .bws-plugin-reviews {
56
- background: none repeat scroll 0 0 #BEE1F1;
57
- border: 1px solid #70A8C2;
58
- border-radius: 3px;
59
- max-width: 700px;
60
- }
61
- .bws-plugin-reviews-rate {
62
- padding: 10px;
63
- border-bottom: 1px dashed #70A8C2;
64
- }
65
- .bws-plugin-reviews-support {
66
- padding: 10px;
67
- }
68
  /*
69
  * styles for pro_version settings, banner and tooltip
70
  */
@@ -77,84 +28,6 @@ div.gllr_pro_version {
77
  background: #E0E0E0;
78
  padding: 2px 3px;
79
  }
80
- table.bws_pro_version {
81
- background: #E0E0E0;
82
- border: 1px solid #AAA;
83
- margin-bottom: 5px;
84
- width: auto !important;
85
- float: left;
86
- }
87
- table.bws_pro_version th,
88
- table.bws_pro_version td {
89
- color: #555;
90
- padding-left: 10px;
91
- }
92
- .bws_pro_version_tooltip {
93
- background: #FFF;
94
- border: 1px solid #AAA;
95
- }
96
- .form-table.bws_pro_version .bws_pro_version_tooltip th {
97
- font-weight: normal;
98
- padding-bottom: 10px;
99
- }
100
- /* banner on the plugins page */
101
- .bws_banner_on_plugin_page {
102
- border: 1px solid #d4d4d4;
103
- background: #FFF;
104
- position: relative;
105
- overflow: hidden;
106
- margin: 12px 0;
107
- background: #ECECEC;
108
- -moz-border-radius: 3px;
109
- -webkit-border-radius: 3px;
110
- border-radius: 3px;
111
- }
112
- .bws_banner_on_plugin_page .text {
113
- color: #000;
114
- font-size: 15px;
115
- line-height: 26px;
116
- margin: 18px 18px 14px;
117
- float: left;
118
- width: 80%;
119
- }
120
- .bws_banner_on_plugin_page .text span {
121
- font-size: 12px;
122
- opacity: 0.7;
123
- }
124
- .bws_banner_on_plugin_page .button {
125
- float: left;
126
- border: none;
127
- font-size: 14px;
128
- margin: 18px 0 18px 16px;
129
- padding: 14px 0;
130
- color: #FFF;
131
- text-shadow: none;
132
- font-weight: bold;
133
- background: #0074A2;
134
- -moz-border-radius: 3px;
135
- border-radius: 3px;
136
- -webkit-border-radius: 3px;
137
- text-decoration: none;
138
- height: 50px;
139
- text-align: center;
140
- text-transform: uppercase;
141
- width: 147px;
142
- box-shadow: none;
143
- }
144
- .bws_banner_on_plugin_page .button:hover,
145
- .bws_banner_on_plugin_page .button:focus {
146
- background: #222;
147
- color: #FFF;
148
- }
149
- .bws_banner_on_plugin_page .icon {
150
- float: right;
151
- margin: 18px 8px 8px 0;
152
- }
153
- .bws_banner_on_plugin_page .close_icon {
154
- float: right;
155
- margin: 8px;
156
- cursor: pointer;
157
- }
158
  /*
159
  * styles for gallery page
160
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .wrap #icon-edit.icon32-posts-gallery {
2
  background: url("../images/icons_32.png") no-repeat scroll left top transparent;
3
  }
16
  .admin-color-classic #adminmenu #menu-posts-gallery div.wp-menu-image {
17
  background: url("../images/menu_b.png?ver=20100531") no-repeat scroll left -32px transparent;
18
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  /*
20
  * styles for pro_version settings, banner and tooltip
21
  */
28
  background: #E0E0E0;
29
  padding: 2px 3px;
30
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  /*
32
  * styles for gallery page
33
  */
fancybox/fancy_close.png DELETED
Binary file
fancybox/fancy_loading.png DELETED
Binary file
fancybox/fancy_nav_left.png DELETED
Binary file
fancybox/fancy_nav_right.png DELETED
Binary file
fancybox/fancy_shadow_e.png DELETED
Binary file
fancybox/fancy_shadow_n.png DELETED
Binary file
fancybox/fancy_shadow_ne.png DELETED
Binary file
fancybox/fancy_shadow_nw.png DELETED
Binary file
fancybox/fancy_shadow_s.png DELETED
Binary file
fancybox/fancy_shadow_se.png DELETED
Binary file
fancybox/fancy_shadow_sw.png DELETED
Binary file
fancybox/fancy_shadow_w.png DELETED
Binary file
fancybox/fancy_title_left.png DELETED
Binary file
fancybox/fancy_title_main.png DELETED
Binary file
fancybox/fancy_title_over.png DELETED
Binary file
fancybox/fancy_title_right.png DELETED
Binary file
fancybox/fancybox-x.png DELETED
Binary file
fancybox/fancybox-y.png DELETED
Binary file
fancybox/fancybox.png DELETED
Binary file
fancybox/fancybox_loading.gif ADDED
Binary file
fancybox/fancybox_loading@2x.gif ADDED
Binary file
fancybox/fancybox_overlay.png ADDED
Binary file
fancybox/fancybox_sprite.png ADDED
Binary file
fancybox/fancybox_sprite@2x.png ADDED
Binary file
fancybox/jquery.fancybox-1.3.4.css DELETED
@@ -1,359 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
8
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
- *
10
- * Version: 1.3.4 (11/11/2010)
11
- * Requires: jQuery v1.3+
12
- *
13
- * Dual licensed under the MIT and GPL licenses:
14
- * http://www.opensource.org/licenses/mit-license.php
15
- * http://www.gnu.org/licenses/gpl.html
16
- */
17
-
18
- #fancybox-loading {
19
- position: fixed;
20
- top: 50%;
21
- left: 50%;
22
- width: 40px;
23
- height: 40px;
24
- margin-top: -20px;
25
- margin-left: -20px;
26
- cursor: pointer;
27
- overflow: hidden;
28
- z-index: 1104;
29
- display: none;
30
- }
31
-
32
- #fancybox-loading div {
33
- position: absolute;
34
- top: 0;
35
- left: 0;
36
- width: 40px;
37
- height: 480px;
38
- background-image: url('fancybox.png');
39
- }
40
-
41
- #fancybox-overlay {
42
- position: absolute;
43
- top: 0;
44
- left: 0;
45
- width: 100%;
46
- z-index: 1100;
47
- display: none;
48
- }
49
-
50
- #fancybox-tmp {
51
- padding: 0;
52
- margin: 0;
53
- border: 0;
54
- overflow: auto;
55
- display: none;
56
- }
57
-
58
- #fancybox-wrap {
59
- position: absolute;
60
- top: 0;
61
- left: 0;
62
- padding: 20px;
63
- z-index: 1101;
64
- outline: none;
65
- display: none;
66
- }
67
-
68
- #fancybox-outer {
69
- position: relative;
70
- width: 100%;
71
- height: 100%;
72
- background: #fff;
73
- }
74
-
75
- #fancybox-content {
76
- width: 0;
77
- height: 0;
78
- padding: 0;
79
- outline: none;
80
- position: relative;
81
- overflow: hidden;
82
- z-index: 1102;
83
- border: 0px solid #fff;
84
- }
85
-
86
- #fancybox-hide-sel-frame {
87
- position: absolute;
88
- top: 0;
89
- left: 0;
90
- width: 100%;
91
- height: 100%;
92
- background: transparent;
93
- z-index: 1101;
94
- }
95
-
96
- #fancybox-close {
97
- position: absolute;
98
- top: -15px;
99
- right: -15px;
100
- width: 30px;
101
- height: 30px;
102
- background: transparent url('fancybox.png') -40px 0px;
103
- cursor: pointer;
104
- z-index: 1103;
105
- display: none;
106
- }
107
-
108
- #fancybox-error {
109
- color: #444;
110
- font: normal 12px/20px Arial;
111
- padding: 14px;
112
- margin: 0;
113
- }
114
-
115
- #fancybox-img {
116
- width: 100%;
117
- height: 100%;
118
- padding: 0;
119
- margin: 0;
120
- border: none;
121
- outline: none;
122
- line-height: 0;
123
- vertical-align: top;
124
- }
125
-
126
- #fancybox-frame {
127
- width: 100%;
128
- height: 100%;
129
- border: none;
130
- display: block;
131
- }
132
-
133
- #fancybox-left, #fancybox-right {
134
- position: absolute;
135
- bottom: 0px;
136
- height: 100%;
137
- width: 35%;
138
- cursor: pointer;
139
- outline: none;
140
- background: transparent url('blank.gif');
141
- z-index: 1102;
142
- display: none;
143
- }
144
-
145
- #fancybox-left {
146
- left: 0px;
147
- }
148
-
149
- #fancybox-right {
150
- right: 0px;
151
- }
152
-
153
- #fancybox-left-ico, #fancybox-right-ico {
154
- position: absolute;
155
- top: 50%;
156
- left: -9999px;
157
- width: 30px;
158
- height: 30px;
159
- margin-top: -15px;
160
- cursor: pointer;
161
- z-index: 1102;
162
- display: block;
163
- }
164
-
165
- #fancybox-left-ico {
166
- background-image: url('fancybox.png');
167
- background-position: -40px -30px;
168
- }
169
-
170
- #fancybox-right-ico {
171
- background-image: url('fancybox.png');
172
- background-position: -40px -60px;
173
- }
174
-
175
- #fancybox-left:hover, #fancybox-right:hover {
176
- visibility: visible; /* IE6 */
177
- }
178
-
179
- #fancybox-left:hover span {
180
- left: 20px;
181
- }
182
-
183
- #fancybox-right:hover span {
184
- left: auto;
185
- right: 20px;
186
- }
187
-
188
- .fancybox-bg {
189
- position: absolute;
190
- padding: 0;
191
- margin: 0;
192
- border: 0;
193
- width: 20px;
194
- height: 20px;
195
- z-index: 1001;
196
- }
197
-
198
- #fancybox-bg-n {
199
- top: -20px;
200
- left: 0;
201
- width: 100%;
202
- background-image: url('fancybox-x.png');
203
- }
204
-
205
- #fancybox-bg-ne {
206
- top: -20px;
207
- right: -20px;
208
- background-image: url('fancybox.png');
209
- background-position: -40px -162px;
210
- }
211
-
212
- #fancybox-bg-e {
213
- top: 0;
214
- right: -20px;
215
- height: 100%;
216
- background-image: url('fancybox-y.png');
217
- background-position: -20px 0px;
218
- }
219
-
220
- #fancybox-bg-se {
221
- bottom: -20px;
222
- right: -20px;
223
- background-image: url('fancybox.png');
224
- background-position: -40px -182px;
225
- }
226
-
227
- #fancybox-bg-s {
228
- bottom: -20px;
229
- left: 0;
230
- width: 100%;
231
- background-image: url('fancybox-x.png');
232
- background-position: 0px -20px;
233
- }
234
-
235
- #fancybox-bg-sw {
236
- bottom: -20px;
237
- left: -20px;
238
- background-image: url('fancybox.png');
239
- background-position: -40px -142px;
240
- }
241
-
242
- #fancybox-bg-w {
243
- top: 0;
244
- left: -20px;
245
- height: 100%;
246
- background-image: url('fancybox-y.png');
247
- }
248
-
249
- #fancybox-bg-nw {
250
- top: -20px;
251
- left: -20px;
252
- background-image: url('fancybox.png');
253
- background-position: -40px -122px;
254
- }
255
-
256
- #fancybox-title {
257
- font-family: Helvetica;
258
- font-size: 12px;
259
- z-index: 1102;
260
- }
261
-
262
- .fancybox-title-inside {
263
- padding-bottom: 10px;
264
- text-align: center;
265
- color: #333;
266
- background: #fff;
267
- position: relative;
268
- }
269
-
270
- .fancybox-title-outside {
271
- padding-top: 10px;
272
- color: #fff;
273
- }
274
-
275
- .fancybox-title-over {
276
- position: absolute;
277
- bottom: 0;
278
- left: 0;
279
- color: #FFF;
280
- text-align: left;
281
- }
282
-
283
- #fancybox-title-over {
284
- padding: 10px;
285
- background-image: url('fancy_title_over.png');
286
- display: block;
287
- }
288
-
289
- .fancybox-title-float {
290
- position: absolute;
291
- left: 0;
292
- bottom: -20px;
293
- height: 32px;
294
- }
295
-
296
- #fancybox-title-float-wrap {
297
- border: none;
298
- border-collapse: collapse;
299
- width: auto;
300
- }
301
-
302
- #fancybox-title-float-wrap td {
303
- border: none;
304
- white-space: nowrap;
305
- }
306
-
307
- #fancybox-title-float-left {
308
- padding: 0 0 0 15px;
309
- background: url('fancybox.png') -40px -90px no-repeat;
310
- }
311
-
312
- #fancybox-title-float-main {
313
- color: #FFF;
314
- line-height: 29px;
315
- font-weight: bold;
316
- padding: 0 0 3px 0;
317
- background: url('fancybox-x.png') 0px -40px;
318
- }
319
-
320
- #fancybox-title-float-right {
321
- padding: 0 0 0 15px;
322
- background: url('fancybox.png') -55px -90px no-repeat;
323
- }
324
-
325
- /* IE6 */
326
-
327
- .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
328
-
329
- .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
- .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331
-
332
- .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
- .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
- .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
- .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
336
-
337
- .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
- height: expression(this.parentNode.clientHeight + "px");
339
- }
340
-
341
- #fancybox-loading.fancybox-ie6 {
342
- position: absolute; margin-top: 0;
343
- top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
- }
345
-
346
- #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
347
-
348
- /* IE6, IE7, IE8 */
349
-
350
- .fancybox-ie .fancybox-bg { background: transparent !important; }
351
-
352
- .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
- .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
- .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
- .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
- .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
- .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
- .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
- .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/jquery.fancybox-1.3.4.js DELETED
@@ -1,1156 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
8
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
- *
10
- * Version: 1.3.4 (11/11/2010)
11
- * Requires: jQuery v1.3+
12
- *
13
- * Dual licensed under the MIT and GPL licenses:
14
- * http://www.opensource.org/licenses/mit-license.php
15
- * http://www.gnu.org/licenses/gpl.html
16
- */
17
-
18
- ;(function($) {
19
- var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
20
-
21
- selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
22
-
23
- ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
24
-
25
- loadingTimer, loadingFrame = 1,
26
-
27
- titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
28
-
29
- isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
30
-
31
- /*
32
- * Private methods
33
- */
34
-
35
- _abort = function() {
36
- loading.hide();
37
-
38
- imgPreloader.onerror = imgPreloader.onload = null;
39
-
40
- if (ajaxLoader) {
41
- ajaxLoader.abort();
42
- }
43
-
44
- tmp.empty();
45
- },
46
-
47
- _error = function() {
48
- if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
49
- loading.hide();
50
- busy = false;
51
- return;
52
- }
53
-
54
- selectedOpts.titleShow = false;
55
-
56
- selectedOpts.width = 'auto';
57
- selectedOpts.height = 'auto';
58
-
59
- tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
60
-
61
- _process_inline();
62
- },
63
-
64
- _start = function() {
65
- var obj = selectedArray[ selectedIndex ],
66
- href,
67
- type,
68
- title,
69
- str,
70
- emb,
71
- ret;
72
-
73
- _abort();
74
-
75
- selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
76
-
77
- ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
78
-
79
- if (ret === false) {
80
- busy = false;
81
- return;
82
- } else if (typeof ret == 'object') {
83
- selectedOpts = $.extend(selectedOpts, ret);
84
- }
85
-
86
- title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
87
-
88
- if (obj.nodeName && !selectedOpts.orig) {
89
- selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
90
- }
91
-
92
- if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
93
- title = selectedOpts.orig.attr('alt');
94
- }
95
-
96
- href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
97
-
98
- if ((/^(?:javascript)/i).test(href) || href == '#') {
99
- href = null;
100
- }
101
-
102
- if (selectedOpts.type) {
103
- type = selectedOpts.type;
104
-
105
- if (!href) {
106
- href = selectedOpts.content;
107
- }
108
-
109
- } else if (selectedOpts.content) {
110
- type = 'html';
111
-
112
- } else if (href) {
113
- if (href.match(imgRegExp)) {
114
- type = 'image';
115
-
116
- } else if (href.match(swfRegExp)) {
117
- type = 'swf';
118
-
119
- } else if ($(obj).hasClass("iframe")) {
120
- type = 'iframe';
121
-
122
- } else if (href.indexOf("#") === 0) {
123
- type = 'inline';
124
-
125
- } else {
126
- type = 'ajax';
127
- }
128
- }
129
-
130
- if (!type) {
131
- _error();
132
- return;
133
- }
134
-
135
- if (type == 'inline') {
136
- obj = href.substr(href.indexOf("#"));
137
- type = $(obj).length > 0 ? 'inline' : 'ajax';
138
- }
139
-
140
- selectedOpts.type = type;
141
- selectedOpts.href = href;
142
- selectedOpts.title = title;
143
-
144
- if (selectedOpts.autoDimensions) {
145
- if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
146
- selectedOpts.width = 'auto';
147
- selectedOpts.height = 'auto';
148
- } else {
149
- selectedOpts.autoDimensions = false;
150
- }
151
- }
152
-
153
- if (selectedOpts.modal) {
154
- selectedOpts.overlayShow = true;
155
- selectedOpts.hideOnOverlayClick = false;
156
- selectedOpts.hideOnContentClick = false;
157
- selectedOpts.enableEscapeButton = false;
158
- selectedOpts.showCloseButton = false;
159
- }
160
-
161
- selectedOpts.padding = parseInt(selectedOpts.padding, 10);
162
- selectedOpts.margin = parseInt(selectedOpts.margin, 10);
163
-
164
- tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
165
-
166
- $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
167
- $(this).replaceWith(content.children());
168
- });
169
-
170
- switch (type) {
171
- case 'html' :
172
- tmp.html( selectedOpts.content );
173
- _process_inline();
174
- break;
175
-
176
- case 'inline' :
177
- if ( $(obj).parent().is('#fancybox-content') === true) {
178
- busy = false;
179
- return;
180
- }
181
-
182
- $('<div class="fancybox-inline-tmp" />')
183
- .hide()
184
- .insertBefore( $(obj) )
185
- .bind('fancybox-cleanup', function() {
186
- $(this).replaceWith(content.children());
187
- }).bind('fancybox-cancel', function() {
188
- $(this).replaceWith(tmp.children());
189
- });
190
-
191
- $(obj).appendTo(tmp);
192
-
193
- _process_inline();
194
- break;
195
-
196
- case 'image':
197
- busy = false;
198
-
199
- $.fancybox.showActivity();
200
-
201
- imgPreloader = new Image();
202
-
203
- imgPreloader.onerror = function() {
204
- _error();
205
- };
206
-
207
- imgPreloader.onload = function() {
208
- busy = true;
209
-
210
- imgPreloader.onerror = imgPreloader.onload = null;
211
-
212
- _process_image();
213
- };
214
-
215
- imgPreloader.src = href;
216
- break;
217
-
218
- case 'swf':
219
- selectedOpts.scrolling = 'no';
220
-
221
- str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
222
- emb = '';
223
-
224
- $.each(selectedOpts.swf, function(name, val) {
225
- str += '<param name="' + name + '" value="' + val + '"></param>';
226
- emb += ' ' + name + '="' + val + '"';
227
- });
228
-
229
- str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
230
-
231
- tmp.html(str);
232
-
233
- _process_inline();
234
- break;
235
-
236
- case 'ajax':
237
- busy = false;
238
-
239
- $.fancybox.showActivity();
240
-
241
- selectedOpts.ajax.win = selectedOpts.ajax.success;
242
-
243
- ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
244
- url : href,
245
- data : selectedOpts.ajax.data || {},
246
- error : function(XMLHttpRequest, textStatus, errorThrown) {
247
- if ( XMLHttpRequest.status > 0 ) {
248
- _error();
249
- }
250
- },
251
- success : function(data, textStatus, XMLHttpRequest) {
252
- var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
253
- if (o.status == 200) {
254
- if ( typeof selectedOpts.ajax.win == 'function' ) {
255
- ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
256
-
257
- if (ret === false) {
258
- loading.hide();
259
- return;
260
- } else if (typeof ret == 'string' || typeof ret == 'object') {
261
- data = ret;
262
- }
263
- }
264
-
265
- tmp.html( data );
266
- _process_inline();
267
- }
268
- }
269
- }));
270
-
271
- break;
272
-
273
- case 'iframe':
274
- _show();
275
- break;
276
- }
277
- },
278
-
279
- _process_inline = function() {
280
- var
281
- w = selectedOpts.width,
282
- h = selectedOpts.height;
283
-
284
- if (w.toString().indexOf('%') > -1) {
285
- w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
286
-
287
- } else {
288
- w = w == 'auto' ? 'auto' : w + 'px';
289
- }
290
-
291
- if (h.toString().indexOf('%') > -1) {
292
- h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
293
-
294
- } else {
295
- h = h == 'auto' ? 'auto' : h + 'px';
296
- }
297
-
298
- tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
299
-
300
- selectedOpts.width = tmp.width();
301
- selectedOpts.height = tmp.height();
302
-
303
- _show();
304
- },
305
-
306
- _process_image = function() {
307
- selectedOpts.width = imgPreloader.width;
308
- selectedOpts.height = imgPreloader.height;
309
-
310
- $("<img />").attr({
311
- 'id' : 'fancybox-img',
312
- 'src' : imgPreloader.src,
313
- 'alt' : selectedOpts.title
314
- }).appendTo( tmp );
315
-
316
- _show();
317
- },
318
-
319
- _show = function() {
320
- var pos, equal;
321
-
322
- loading.hide();
323
-
324
- if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
325
- $.event.trigger('fancybox-cancel');
326
-
327
- busy = false;
328
- return;
329
- }
330
-
331
- busy = true;
332
-
333
- $(content.add( overlay )).unbind();
334
-
335
- $(window).unbind("resize.fb scroll.fb");
336
- $(document).unbind('keydown.fb');
337
-
338
- if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
339
- wrap.css('height', wrap.height());
340
- }
341
-
342
- currentArray = selectedArray;
343
- currentIndex = selectedIndex;
344
- currentOpts = selectedOpts;
345
-
346
- if (currentOpts.overlayShow) {
347
- overlay.css({
348
- 'background-color' : currentOpts.overlayColor,
349
- 'opacity' : currentOpts.overlayOpacity,
350
- 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
351
- 'height' : $(document).height()
352
- });
353
-
354
- if (!overlay.is(':visible')) {
355
- if (isIE6) {
356
- $('select:not(#fancybox-tmp select)').filter(function() {
357
- return this.style.visibility !== 'hidden';
358
- }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
359
- this.style.visibility = 'inherit';
360
- });
361
- }
362
-
363
- overlay.show();
364
- }
365
- } else {
366
- overlay.hide();
367
- }
368
-
369
- final_pos = _get_zoom_to();
370
-
371
- _process_title();
372
-
373
- if (wrap.is(":visible")) {
374
- $( close.add( nav_left ).add( nav_right ) ).hide();
375
-
376
- pos = wrap.position(),
377
-
378
- start_pos = {
379
- top : pos.top,
380
- left : pos.left,
381
- width : wrap.width(),
382
- height : wrap.height()
383
- };
384
-
385
- equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
386
-
387
- content.fadeTo(currentOpts.changeFade, 0.3, function() {
388
- var finish_resizing = function() {
389
- content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
390
- };
391
-
392
- $.event.trigger('fancybox-change');
393
-
394
- content
395
- .empty()
396
- .removeAttr('filter')
397
- .css({
398
- 'border-width' : currentOpts.padding,
399
- 'width' : final_pos.width - currentOpts.padding * 2,
400
- 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
401
- });
402
-
403
- if (equal) {
404
- finish_resizing();
405
-
406
- } else {
407
- fx.prop = 0;
408
-
409
- $(fx).animate({prop: 1}, {
410
- duration : currentOpts.changeSpeed,
411
- easing : currentOpts.easingChange,
412
- step : _draw,
413
- complete : finish_resizing
414
- });
415
- }
416
- });
417
-
418
- return;
419
- }
420
-
421
- wrap.removeAttr("style");
422
-
423
- content.css('border-width', currentOpts.padding);
424
-
425
- if (currentOpts.transitionIn == 'elastic') {
426
- start_pos = _get_zoom_from();
427
-
428
- content.html( tmp.contents() );
429
-
430
- wrap.show();
431
-
432
- if (currentOpts.opacity) {
433
- final_pos.opacity = 0;
434
- }
435
-
436
- fx.prop = 0;
437
-
438
- $(fx).animate({prop: 1}, {
439
- duration : currentOpts.speedIn,
440
- easing : currentOpts.easingIn,
441
- step : _draw,
442
- complete : _finish
443
- });
444
-
445
- return;
446
- }
447
-
448
- if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
449
- title.show();
450
- }
451
-
452
- content
453
- .css({
454
- 'width' : final_pos.width - currentOpts.padding * 2,
455
- 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
456
- })
457
- .html( tmp.contents() );
458
-
459
- wrap
460
- .css(final_pos)
461
- .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
462
- },
463
-
464
- _format_title = function(title) {
465
- if (title && title.length) {
466
- if (currentOpts.titlePosition == 'float') {
467
- return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
468
- }
469
-
470
- return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
471
- }
472
-
473
- return false;
474
- },
475
-
476
- _process_title = function() {
477
- titleStr = currentOpts.title || '';
478
- titleHeight = 0;
479
-
480
- title
481
- .empty()
482
- .removeAttr('style')
483
- .removeClass();
484
-
485
- if (currentOpts.titleShow === false) {
486
- title.hide();
487
- return;
488
- }
489
-
490
- titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
491
-
492
- if (!titleStr || titleStr === '') {
493
- title.hide();
494
- return;
495
- }
496
-
497
- title
498
- .addClass('fancybox-title-' + currentOpts.titlePosition)
499
- .html( titleStr )
500
- .appendTo( 'body' )
501
- .show();
502
-
503
- switch (currentOpts.titlePosition) {
504
- case 'inside':
505
- title
506
- .css({
507
- 'width' : final_pos.width - (currentOpts.padding * 2),
508
- 'marginLeft' : currentOpts.padding,
509
- 'marginRight' : currentOpts.padding
510
- });
511
-
512
- titleHeight = title.outerHeight(true);
513
-
514
- title.appendTo( outer );
515
-
516
- final_pos.height += titleHeight;
517
- break;
518
-
519
- case 'over':
520
- title
521
- .css({
522
- 'marginLeft' : currentOpts.padding,
523
- 'width' : final_pos.width - (currentOpts.padding * 2),
524
- 'bottom' : currentOpts.padding
525
- })
526
- .appendTo( outer );
527
- break;
528
-
529
- case 'float':
530
- title
531
- .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
532
- .appendTo( wrap );
533
- break;
534
-
535
- default:
536
- title
537
- .css({
538
- 'width' : final_pos.width - (currentOpts.padding * 2),
539
- 'paddingLeft' : currentOpts.padding,
540
- 'paddingRight' : currentOpts.padding
541
- })
542
- .appendTo( wrap );
543
- break;
544
- }
545
-
546
- title.hide();
547
- },
548
-
549
- _set_navigation = function() {
550
- if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
551
- $(document).bind('keydown.fb', function(e) {
552
- if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
553
- e.preventDefault();
554
- $.fancybox.close();
555
-
556
- } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
557
- e.preventDefault();
558
- $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
559
- }
560
- });
561
- }
562
-
563
- if (!currentOpts.showNavArrows) {
564
- nav_left.hide();
565
- nav_right.hide();
566
- return;
567
- }
568
-
569
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
570
- nav_left.show();
571
- }
572
-
573
- if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
574
- nav_right.show();
575
- }
576
- },
577
-
578
- _finish = function () {
579
- if (!$.support.opacity) {
580
- content.get(0).style.removeAttribute('filter');
581
- wrap.get(0).style.removeAttribute('filter');
582
- }
583
-
584
- if (selectedOpts.autoDimensions) {
585
- content.css('height', 'auto');
586
- }
587
-
588
- wrap.css('height', 'auto');
589
-
590
- if (titleStr && titleStr.length) {
591
- title.show();
592
- }
593
-
594
- if (currentOpts.showCloseButton) {
595
- close.show();
596
- }
597
-
598
- _set_navigation();
599
-
600
- if (currentOpts.hideOnContentClick) {
601
- content.bind('click', $.fancybox.close);
602
- }
603
-
604
- if (currentOpts.hideOnOverlayClick) {
605
- overlay.bind('click', $.fancybox.close);
606
- }
607
-
608
- $(window).bind("resize.fb", $.fancybox.resize);
609
-
610
- if (currentOpts.centerOnScroll) {
611
- $(window).bind("scroll.fb", $.fancybox.center);
612
- }
613
-
614
- if (currentOpts.type == 'iframe') {
615
- $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
616
- }
617
-
618
- wrap.show();
619
-
620
- busy = false;
621
-
622
- $.fancybox.center();
623
-
624
- currentOpts.onComplete(currentArray, currentIndex, currentOpts);
625
-
626
- _preload_images();
627
- },
628
-
629
- _preload_images = function() {
630
- var href,
631
- objNext;
632
-
633
- if ((currentArray.length -1) > currentIndex) {
634
- href = currentArray[ currentIndex + 1 ].href;
635
-
636
- if (typeof href !== 'undefined' && href.match(imgRegExp)) {
637
- objNext = new Image();
638
- objNext.src = href;
639
- }
640
- }
641
-
642
- if (currentIndex > 0) {
643
- href = currentArray[ currentIndex - 1 ].href;
644
-
645
- if (typeof href !== 'undefined' && href.match(imgRegExp)) {
646
- objNext = new Image();
647
- objNext.src = href;
648
- }
649
- }
650
- },
651
-
652
- _draw = function(pos) {
653
- var dim = {
654
- width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
655
- height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
656
-
657
- top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
658
- left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
659
- };
660
-
661
- if (typeof final_pos.opacity !== 'undefined') {
662
- dim.opacity = pos < 0.5 ? 0.5 : pos;
663
- }
664
-
665
- wrap.css(dim);
666
-
667
- content.css({
668
- 'width' : dim.width - currentOpts.padding * 2,
669
- 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
670
- });
671
- },
672
-
673
- _get_viewport = function() {
674
- return [
675
- $(window).width() - (currentOpts.margin * 2),
676
- $(window).height() - (currentOpts.margin * 2),
677
- $(document).scrollLeft() + currentOpts.margin,
678
- $(document).scrollTop() + currentOpts.margin
679
- ];
680
- },
681
-
682
- _get_zoom_to = function () {
683
- var view = _get_viewport(),
684
- to = {},
685
- resize = currentOpts.autoScale,
686
- double_padding = currentOpts.padding * 2,
687
- ratio;
688
-
689
- if (currentOpts.width.toString().indexOf('%') > -1) {
690
- to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
691
- } else {
692
- to.width = currentOpts.width + double_padding;
693
- }
694
-
695
- if (currentOpts.height.toString().indexOf('%') > -1) {
696
- to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
697
- } else {
698
- to.height = currentOpts.height + double_padding;
699
- }
700
-
701
- if (resize && (to.width > view[0] || to.height > view[1])) {
702
- if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
703
- ratio = (currentOpts.width ) / (currentOpts.height );
704
-
705
- if ((to.width ) > view[0]) {
706
- to.width = view[0];
707
- to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
708
- }
709
-
710
- if ((to.height) > view[1]) {
711
- to.height = view[1];
712
- to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
713
- }
714
-
715
- } else {
716
- to.width = Math.min(to.width, view[0]);
717
- to.height = Math.min(to.height, view[1]);
718
- }
719
- }
720
-
721
- to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
722
- to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
723
-
724
- return to;
725
- },
726
-
727
- _get_obj_pos = function(obj) {
728
- var pos = obj.offset();
729
-
730
- pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
731
- pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
732
-
733
- pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
734
- pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
735
-
736
- pos.width = obj.width();
737
- pos.height = obj.height();
738
-
739
- return pos;
740
- },
741
-
742
- _get_zoom_from = function() {
743
- var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
744
- from = {},
745
- pos,
746
- view;
747
-
748
- if (orig && orig.length) {
749
- pos = _get_obj_pos(orig);
750
-
751
- from = {
752
- width : pos.width + (currentOpts.padding * 2),
753
- height : pos.height + (currentOpts.padding * 2),
754
- top : pos.top - currentOpts.padding - 20,
755
- left : pos.left - currentOpts.padding - 20
756
- };
757
-
758
- } else {
759
- view = _get_viewport();
760
-
761
- from = {
762
- width : currentOpts.padding * 2,
763
- height : currentOpts.padding * 2,
764
- top : parseInt(view[3] + view[1] * 0.5, 10),
765
- left : parseInt(view[2] + view[0] * 0.5, 10)
766
- };
767
- }
768
-
769
- return from;
770
- },
771
-
772
- _animate_loading = function() {
773
- if (!loading.is(':visible')){
774
- clearInterval(loadingTimer);
775
- return;
776
- }
777
-
778
- $('div', loading).css('top', (loadingFrame * -40) + 'px');
779
-
780
- loadingFrame = (loadingFrame + 1) % 12;
781
- };
782
-
783
- /*
784
- * Public methods
785
- */
786
-
787
- $.fn.fancybox = function(options) {
788
- if (!$(this).length) {
789
- return this;
790
- }
791
-
792
- $(this)
793
- .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
794
- .unbind('click.fb')
795
- .bind('click.fb', function(e) {
796
- e.preventDefault();
797
-
798
- if (busy) {
799
- return;
800
- }
801
-
802
- busy = true;
803
-
804
- $(this).blur();
805
-
806
- selectedArray = [];
807
- selectedIndex = 0;
808
-
809
- var rel = $(this).attr('rel') || '';
810
-
811
- if (!rel || rel == '' || rel === 'nofollow') {
812
- selectedArray.push(this);
813
-
814
- } else {
815
- selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
816
- selectedIndex = selectedArray.index( this );
817
- }
818
-
819
- _start();
820
-
821
- return;
822
- });
823
-
824
- return this;
825
- };
826
-
827
- $.fancybox = function(obj) {
828
- var opts;
829
-
830
- if (busy) {
831
- return;
832
- }
833
-
834
- busy = true;
835
- opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
836
-
837
- selectedArray = [];
838
- selectedIndex = parseInt(opts.index, 10) || 0;
839
-
840
- if ($.isArray(obj)) {
841
- for (var i = 0, j = obj.length; i < j; i++) {
842
- if (typeof obj[i] == 'object') {
843
- $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
844
- } else {
845
- obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
846
- }
847
- }
848
-
849
- selectedArray = jQuery.merge(selectedArray, obj);
850
-
851
- } else {
852
- if (typeof obj == 'object') {
853
- $(obj).data('fancybox', $.extend({}, opts, obj));
854
- } else {
855
- obj = $({}).data('fancybox', $.extend({content : obj}, opts));
856
- }
857
-
858
- selectedArray.push(obj);
859
- }
860
-
861
- if (selectedIndex > selectedArray.length || selectedIndex < 0) {
862
- selectedIndex = 0;
863
- }
864
-
865
- _start();
866
- };
867
-
868
- $.fancybox.showActivity = function() {
869
- clearInterval(loadingTimer);
870
-
871
- loading.show();
872
- loadingTimer = setInterval(_animate_loading, 66);
873
- };
874
-
875
- $.fancybox.hideActivity = function() {
876
- loading.hide();
877
- };
878
-
879
- $.fancybox.next = function() {
880
- return $.fancybox.pos( currentIndex + 1);
881
- };
882
-
883
- $.fancybox.prev = function() {
884
- return $.fancybox.pos( currentIndex - 1);
885
- };
886
-
887
- $.fancybox.pos = function(pos) {
888
- if (busy) {
889
- return;
890
- }
891
-
892
- pos = parseInt(pos);
893
-
894
- selectedArray = currentArray;
895
-
896
- if (pos > -1 && pos < currentArray.length) {
897
- selectedIndex = pos;
898
- _start();
899
-
900
- } else if (currentOpts.cyclic && currentArray.length > 1) {
901
- selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
902
- _start();
903
- }
904
-
905
- return;
906
- };
907
-
908
- $.fancybox.cancel = function() {
909
- if (busy) {
910
- return;
911
- }
912
-
913
- busy = true;
914
-
915
- $.event.trigger('fancybox-cancel');
916
-
917
- _abort();
918
-
919
- selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
920
-
921
- busy = false;
922
- };
923
-
924
- // Note: within an iframe use - parent.$.fancybox.close();
925
- $.fancybox.close = function() {
926
- if (busy || wrap.is(':hidden')) {
927
- return;
928
- }
929
-
930
- busy = true;
931
-
932
- if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
933
- busy = false;
934
- return;
935
- }
936
-
937
- _abort();
938
-
939
- $(close.add( nav_left ).add( nav_right )).hide();
940
-
941
- $(content.add( overlay )).unbind();
942
-
943
- $(window).unbind("resize.fb scroll.fb");
944
- $(document).unbind('keydown.fb');
945
-
946
- content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
947
-
948
- if (currentOpts.titlePosition !== 'inside') {
949
- title.empty();
950
- }
951
-
952
- wrap.stop();
953
-
954
- function _cleanup() {
955
- overlay.fadeOut('fast');
956
-
957
- title.empty().hide();
958
- wrap.hide();
959
-
960
- $.event.trigger('fancybox-cleanup');
961
-
962
- content.empty();
963
-
964
- currentOpts.onClosed(currentArray, currentIndex, currentOpts);
965
-
966
- currentArray = selectedOpts = [];
967
- currentIndex = selectedIndex = 0;
968
- currentOpts = selectedOpts = {};
969
-
970
- busy = false;
971
- }
972
-
973
- if (currentOpts.transitionOut == 'elastic') {
974
- start_pos = _get_zoom_from();
975
-
976
- var pos = wrap.position();
977
-
978
- final_pos = {
979
- top : pos.top ,
980
- left : pos.left,
981
- width : wrap.width(),
982
- height : wrap.height()
983
- };
984
-
985
- if (currentOpts.opacity) {
986
- final_pos.opacity = 1;
987
- }
988
-
989
- title.empty().hide();
990
-
991
- fx.prop = 1;
992
-
993
- $(fx).animate({ prop: 0 }, {
994
- duration : currentOpts.speedOut,
995
- easing : currentOpts.easingOut,
996
- step : _draw,
997
- complete : _cleanup
998
- });
999
-
1000
- } else {
1001
- wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
1002
- }
1003
- };
1004
-
1005
- $.fancybox.resize = function() {
1006
- if (overlay.is(':visible')) {
1007
- overlay.css('height', $(document).height());
1008
- }
1009
-
1010
- $.fancybox.center(true);
1011
- };
1012
-
1013
- $.fancybox.center = function() {
1014
- var view, align;
1015
-
1016
- if (busy) {
1017
- return;
1018
- }
1019
-
1020
- align = arguments[0] === true ? 1 : 0;
1021
- view = _get_viewport();
1022
-
1023
- if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1024
- return;
1025
- }
1026
-
1027
- wrap
1028
- .stop()
1029
- .animate({
1030
- 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
1031
- 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
1032
- }, typeof arguments[0] == 'number' ? arguments[0] : 200);
1033
- };
1034
-
1035
- $.fancybox.init = function() {
1036
- if ($("#fancybox-wrap").length) {
1037
- return;
1038
- }
1039
-
1040
- $('body').append(
1041
- tmp = $('<div id="fancybox-tmp"></div>'),
1042
- loading = $('<div id="fancybox-loading"><div></div></div>'),
1043
- overlay = $('<div id="fancybox-overlay"></div>'),
1044
- wrap = $('<div id="fancybox-wrap"></div>')
1045
- );
1046
-
1047
- outer = $('<div id="fancybox-outer"></div>')
1048
- .append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
1049
- .appendTo( wrap );
1050
-
1051
- outer.append(
1052
- content = $('<div id="fancybox-content"></div>'),
1053
- close = $('<a id="fancybox-close"></a>'),
1054
- title = $('<div id="fancybox-title"></div>'),
1055
-
1056
- nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
1057
- nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
1058
- );
1059
-
1060
- close.click($.fancybox.close);
1061
- loading.click($.fancybox.cancel);
1062
-
1063
- nav_left.click(function(e) {
1064
- e.preventDefault();
1065
- $.fancybox.prev();
1066
- });
1067
-
1068
- nav_right.click(function(e) {
1069
- e.preventDefault();
1070
- $.fancybox.next();
1071
- });
1072
-
1073
- if ($.fn.mousewheel) {
1074
- wrap.bind('mousewheel.fb', function(e, delta) {
1075
- if (busy) {
1076
- e.preventDefault();
1077
-
1078
- } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
1079
- e.preventDefault();
1080
- $.fancybox[ delta > 0 ? 'prev' : 'next']();
1081
- }
1082
- });
1083
- }
1084
-
1085
- if (!$.support.opacity) {
1086
- wrap.addClass('fancybox-ie');
1087
- }
1088
-
1089
- if (isIE6) {
1090
- loading.addClass('fancybox-ie6');
1091
- wrap.addClass('fancybox-ie6');
1092
-
1093
- $('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
1094
- }
1095
- };
1096
-
1097
- $.fn.fancybox.defaults = {
1098
- padding : 10,
1099
- margin : 40,
1100
- opacity : false,
1101
- modal : false,
1102
- cyclic : false,
1103
- scrolling : 'auto', // 'auto', 'yes' or 'no'
1104
-
1105
- width : 560,
1106
- height : 340,
1107
-
1108
- autoScale : true,
1109
- autoDimensions : true,
1110
- centerOnScroll : false,
1111
-
1112
- ajax : {},
1113
- swf : { wmode: 'transparent' },
1114
-
1115
- hideOnOverlayClick : true,
1116
- hideOnContentClick : false,
1117
-
1118
- overlayShow : true,
1119
- overlayOpacity : 0.7,
1120
- overlayColor : '#777',
1121
-
1122
- titleShow : true,
1123
- titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
1124
- titleFormat : null,
1125
- titleFromAlt : false,
1126
-
1127
- transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1128
- transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1129
-
1130
- speedIn : 300,
1131
- speedOut : 300,
1132
-
1133
- changeSpeed : 300,
1134
- changeFade : 'fast',
1135
-
1136
- easingIn : 'swing',
1137
- easingOut : 'swing',
1138
-
1139
- showCloseButton : true,
1140
- showNavArrows : true,
1141
- enableEscapeButton : true,
1142
- enableKeyboardNav : true,
1143
-
1144
- onStart : function(){},
1145
- onCancel : function(){},
1146
- onComplete : function(){},
1147
- onCleanup : function(){},
1148
- onClosed : function(){},
1149
- onError : function(){}
1150
- };
1151
-
1152
- $(document).ready(function() {
1153
- $.fancybox.init();
1154
- });
1155
-
1156
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/jquery.fancybox-1.3.4.pack.js DELETED
@@ -1,46 +0,0 @@
1
- /*
2
- * FancyBox - jQuery Plugin
3
- * Simple and fancy lightbox alternative
4
- *
5
- * Examples and documentation at: http://fancybox.net
6
- *
7
- * Copyright (c) 2008 - 2010 Janis Skarnelis
8
- * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
- *
10
- * Version: 1.3.4 (11/11/2010)
11
- * Requires: jQuery v1.3+
12
- *
13
- * Dual licensed under the MIT and GPL licenses:
14
- * http://www.opensource.org/licenses/mit-license.php
15
- * http://www.gnu.org/licenses/gpl.html
16
- */
17
-
18
- ;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
19
- F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
20
- c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
21
- false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
22
- function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
23
- '"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
24
- "function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
25
- ";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
26
- opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
27
- d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
28
- y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
29
- i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
30
- f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
31
- 37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
32
- s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
33
- f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
34
- j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
35
- "image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
36
- 10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
37
- b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
38
- 0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
39
- 1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
40
- true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
41
- b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
42
- d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
43
- D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
44
- b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
45
- b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
46
- easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/jquery.fancybox.css ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ .fancybox-wrap,
3
+ .fancybox-skin,
4
+ .fancybox-outer,
5
+ .fancybox-inner,
6
+ .fancybox-image,
7
+ .fancybox-wrap iframe,
8
+ .fancybox-wrap object,
9
+ .fancybox-nav,
10
+ .fancybox-nav span,
11
+ .fancybox-tmp
12
+ {
13
+ padding: 0;
14
+ margin: 0;
15
+ border: 0;
16
+ outline: none;
17
+ vertical-align: top;
18
+ }
19
+
20
+ .fancybox-wrap {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ z-index: 8020;
25
+ }
26
+
27
+ .fancybox-skin {
28
+ position: relative;
29
+ background: #f9f9f9;
30
+ color: #444;
31
+ text-shadow: none;
32
+ -webkit-border-radius: 4px;
33
+ -moz-border-radius: 4px;
34
+ border-radius: 4px;
35
+ }
36
+
37
+ .fancybox-opened {
38
+ z-index: 8030;
39
+ }
40
+
41
+ .fancybox-opened .fancybox-skin {
42
+ -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
43
+ -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
44
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
45
+ }
46
+
47
+ .fancybox-outer, .fancybox-inner {
48
+ position: relative;
49
+ }
50
+
51
+ .fancybox-inner {
52
+ overflow: hidden;
53
+ }
54
+
55
+ .fancybox-type-iframe .fancybox-inner {
56
+ -webkit-overflow-scrolling: touch;
57
+ }
58
+
59
+ .fancybox-error {
60
+ color: #444;
61
+ font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
62
+ margin: 0;
63
+ padding: 15px;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .fancybox-image, .fancybox-iframe {
68
+ display: block;
69
+ width: 100%;
70
+ height: 100%;
71
+ }
72
+
73
+ .fancybox-image {
74
+ max-width: 100%;
75
+ max-height: 100%;
76
+ }
77
+
78
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
79
+ background-image: url('fancybox_sprite.png');
80
+ }
81
+
82
+ #fancybox-loading {
83
+ position: fixed;
84
+ top: 50%;
85
+ left: 50%;
86
+ margin-top: -22px;
87
+ margin-left: -22px;
88
+ background-position: 0 -108px;
89
+ opacity: 0.8;
90
+ cursor: pointer;
91
+ z-index: 8060;
92
+ }
93
+
94
+ #fancybox-loading div {
95
+ width: 44px;
96
+ height: 44px;
97
+ background: url('fancybox_loading.gif') center center no-repeat;
98
+ }
99
+
100
+ .fancybox-close {
101
+ position: absolute;
102
+ top: -18px;
103
+ right: -18px;
104
+ width: 36px;
105
+ height: 36px;
106
+ cursor: pointer;
107
+ z-index: 8040;
108
+ }
109
+
110
+ .fancybox-nav {
111
+ position: absolute;
112
+ top: 0;
113
+ width: 40%;
114
+ height: 100%;
115
+ cursor: pointer;
116
+ text-decoration: none;
117
+ background: transparent url('blank.gif'); /* helps IE */
118
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
119
+ z-index: 8040;
120
+ }
121
+
122
+ .fancybox-prev {
123
+ left: 0;
124
+ }
125
+
126
+ .fancybox-next {
127
+ right: 0;
128
+ }
129
+
130
+ .fancybox-nav span {
131
+ position: absolute;
132
+ top: 50%;
133
+ width: 36px;
134
+ height: 34px;
135
+ margin-top: -18px;
136
+ cursor: pointer;
137
+ z-index: 8040;
138
+ visibility: hidden;
139
+ }
140
+
141
+ .fancybox-prev span {
142
+ left: 10px;
143
+ background-position: 0 -36px;
144
+ }
145
+
146
+ .fancybox-next span {
147
+ right: 10px;
148
+ background-position: 0 -72px;
149
+ }
150
+
151
+ .fancybox-nav:hover span {
152
+ visibility: visible;
153
+ }
154
+
155
+ .fancybox-tmp {
156
+ position: absolute;
157
+ top: -99999px;
158
+ left: -99999px;
159
+ visibility: hidden;
160
+ max-width: 99999px;
161
+ max-height: 99999px;
162
+ overflow: visible !important;
163
+ }
164
+
165
+ /* Overlay helper */
166
+
167
+ .fancybox-lock {
168
+ overflow: hidden !important;
169
+ width: auto;
170
+ }
171
+
172
+ .fancybox-lock body {
173
+ overflow: hidden !important;
174
+ }
175
+
176
+ .fancybox-lock-test {
177
+ overflow-y: hidden !important;
178
+ }
179
+
180
+ .fancybox-overlay {
181
+ position: absolute;
182
+ top: 0;
183
+ left: 0;
184
+ overflow: hidden;
185
+ display: none;
186
+ z-index: 8010;
187
+ background: url('fancybox_overlay.png');
188
+ }
189
+
190
+ .fancybox-overlay-fixed {
191
+ position: fixed;
192
+ bottom: 0;
193
+ right: 0;
194
+ }
195
+
196
+ .fancybox-lock .fancybox-overlay {
197
+ overflow: auto;
198
+ overflow-y: scroll;
199
+ }
200
+
201
+ /* Title helper */
202
+
203
+ .fancybox-title {
204
+ visibility: hidden;
205
+ font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
206
+ position: relative;
207
+ text-shadow: none;
208
+ z-index: 8050;
209
+ text-align: center;
210
+ }
211
+
212
+ .fancybox-opened .fancybox-title {
213
+ visibility: visible;
214
+ }
215
+
216
+ .fancybox-title-float-wrap {
217
+ position: absolute;
218
+ bottom: 0;
219
+ right: 50%;
220
+ margin-bottom: -35px;
221
+ z-index: 8050;
222
+ text-align: center;
223
+ }
224
+
225
+ .fancybox-title-float-wrap .child {
226
+ display: inline-block;
227
+ margin-right: -100%;
228
+ padding: 2px 20px;
229
+ background: transparent; /* Fallback for web browsers that doesn't support RGBa */
230
+ background: rgba(0, 0, 0, 0.8);
231
+ -webkit-border-radius: 15px;
232
+ -moz-border-radius: 15px;
233
+ border-radius: 15px;
234
+ text-shadow: 0 1px 2px #222;
235
+ color: #FFF;
236
+ font-weight: bold;
237
+ line-height: 24px;
238
+ white-space: nowrap;
239
+ }
240
+
241
+ .fancybox-title-outside-wrap {
242
+ position: relative;
243
+ margin-top: 10px;
244
+ color: #fff;
245
+ }
246
+
247
+ .fancybox-title-inside-wrap {
248
+ padding-top: 10px;
249
+ }
250
+
251
+ .fancybox-title-over-wrap {
252
+ position: absolute;
253
+ bottom: 0;
254
+ left: 0;
255
+ color: #fff;
256
+ padding: 10px;
257
+ background: #000;
258
+ background: rgba(0, 0, 0, .8);
259
+ }
260
+
261
+ /*Retina graphics!*/
262
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
263
+ only screen and (min--moz-device-pixel-ratio: 1.5),
264
+ only screen and (min-device-pixel-ratio: 1.5){
265
+
266
+ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
267
+ background-image: url('fancybox_sprite@2x.png');
268
+ background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
269
+ }
270
+
271
+ #fancybox-loading div {
272
+ background-image: url('fancybox_loading@2x.gif');
273
+ background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
274
+ }
275
+ }
fancybox/jquery.fancybox.js ADDED
@@ -0,0 +1,2020 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * fancyBox - jQuery Plugin
3
+ * version: 2.1.5 (Fri, 14 Jun 2013)
4
+ * @requires jQuery v1.6 or later
5
+ *
6
+ * Examples at http://fancyapps.com/fancybox/
7
+ * License: www.fancyapps.com/fancybox/#license
8
+ *
9
+ * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
10
+ *
11
+ */
12
+
13
+ (function (window, document, $, undefined) {
14
+ "use strict";
15
+
16
+ var H = $("html"),
17
+ W = $(window),
18
+ D = $(document),
19
+ F = $.fancybox = function () {
20
+ F.open.apply( this, arguments );
21
+ },
22
+ IE = navigator.userAgent.match(/msie/i),
23
+ didUpdate = null,
24
+ isTouch = document.createTouch !== undefined,
25
+
26
+ isQuery = function(obj) {
27
+ return obj && obj.hasOwnProperty && obj instanceof $;
28
+ },
29
+ isString = function(str) {
30
+ return str && $.type(str) === "string";
31
+ },
32
+ isPercentage = function(str) {
33
+ return isString(str) && str.indexOf('%') > 0;
34
+ },
35
+ isScrollable = function(el) {
36
+ return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
37
+ },
38
+ getScalar = function(orig, dim) {
39
+ var value = parseInt(orig, 10) || 0;
40
+
41
+ if (dim && isPercentage(orig)) {
42
+ value = F.getViewport()[ dim ] / 100 * value;
43
+ }
44
+
45
+ return Math.ceil(value);
46
+ },
47
+ getValue = function(value, dim) {
48
+ return getScalar(value, dim) + 'px';
49
+ };
50
+
51
+ $.extend(F, {
52
+ // The current version of fancyBox
53
+ version: '2.1.5',
54
+
55
+ defaults: {
56
+ padding : 15,
57
+ margin : 20,
58
+
59
+ width : 800,
60
+ height : 600,
61
+ minWidth : 100,
62
+ minHeight : 100,
63
+ maxWidth : 9999,
64
+ maxHeight : 9999,
65
+ pixelRatio: 1, // Set to 2 for retina display support
66
+
67
+ autoSize : true,
68
+ autoHeight : false,
69
+ autoWidth : false,
70
+
71
+ autoResize : true,
72
+ autoCenter : !isTouch,
73
+ fitToView : true,
74
+ aspectRatio : false,
75
+ topRatio : 0.5,
76
+ leftRatio : 0.5,
77
+
78
+ scrolling : 'auto', // 'auto', 'yes' or 'no'
79
+ wrapCSS : '',
80
+
81
+ arrows : true,
82
+ closeBtn : true,
83
+ closeClick : false,
84
+ nextClick : false,
85
+ mouseWheel : true,
86
+ autoPlay : false,
87
+ playSpeed : 3000,
88
+ preload : 3,
89
+ modal : false,
90
+ loop : true,
91
+
92
+ ajax : {
93
+ dataType : 'html',
94
+ headers : { 'X-fancyBox': true }
95
+ },
96
+ iframe : {
97
+ scrolling : 'auto',
98
+ preload : true
99
+ },
100
+ swf : {
101
+ wmode: 'transparent',
102
+ allowfullscreen : 'true',
103
+ allowscriptaccess : 'always'
104
+ },
105
+
106
+ keys : {
107
+ next : {
108
+ 13 : 'left', // enter
109
+ 34 : 'up', // page down
110
+ 39 : 'left', // right arrow
111
+ 40 : 'up' // down arrow
112
+ },
113
+ prev : {
114
+ 8 : 'right', // backspace
115
+ 33 : 'down', // page up
116
+ 37 : 'right', // left arrow
117
+ 38 : 'down' // up arrow
118
+ },
119
+ close : [27], // escape key
120
+ play : [32], // space - start/stop slideshow
121
+ toggle : [70] // letter "f" - toggle fullscreen
122
+ },
123
+
124
+ direction : {
125
+ next : 'left',
126
+ prev : 'right'
127
+ },
128
+
129
+ scrollOutside : true,
130
+
131
+ // Override some properties
132
+ index : 0,
133
+ type : null,
134
+ href : null,
135
+ content : null,
136
+ title : null,
137
+
138
+ // HTML templates
139
+ tpl: {
140
+ wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
141
+ image : '<img class="fancybox-image" src="{href}" alt="" />',
142
+ iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>',
143
+ error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
144
+ closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
145
+ next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
146
+ prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
147
+ },
148
+
149
+ // Properties for each animation type
150
+ // Opening fancyBox
151
+ openEffect : 'fade', // 'elastic', 'fade' or 'none'
152
+ openSpeed : 250,
153
+ openEasing : 'swing',
154
+ openOpacity : true,
155
+ openMethod : 'zoomIn',
156
+
157
+ // Closing fancyBox
158
+ closeEffect : 'fade', // 'elastic', 'fade' or 'none'
159
+ closeSpeed : 250,
160
+ closeEasing : 'swing',
161
+ closeOpacity : true,
162
+ closeMethod : 'zoomOut',
163
+
164
+ // Changing next gallery item
165
+ nextEffect : 'elastic', // 'elastic', 'fade' or 'none'
166
+ nextSpeed : 250,
167
+ nextEasing : 'swing',
168
+ nextMethod : 'changeIn',
169
+
170
+ // Changing previous gallery item
171
+ prevEffect : 'elastic', // 'elastic', 'fade' or 'none'
172
+ prevSpeed : 250,
173
+ prevEasing : 'swing',
174
+ prevMethod : 'changeOut',
175
+
176
+ // Enable default helpers
177
+ helpers : {
178
+ overlay : true,
179
+ title : true
180
+ },
181
+
182
+ // Callbacks
183
+ onCancel : $.noop, // If canceling
184
+ beforeLoad : $.noop, // Before loading
185
+ afterLoad : $.noop, // After loading
186
+ beforeShow : $.noop, // Before changing in current item
187
+ afterShow : $.noop, // After opening
188
+ beforeChange : $.noop, // Before changing gallery item
189
+ beforeClose : $.noop, // Before closing
190
+ afterClose : $.noop // After closing
191
+ },
192
+
193
+ //Current state
194
+ group : {}, // Selected group
195
+ opts : {}, // Group options
196
+ previous : null, // Previous element
197
+ coming : null, // Element being loaded
198
+ current : null, // Currently loaded element
199
+ isActive : false, // Is activated
200
+ isOpen : false, // Is currently open
201
+ isOpened : false, // Have been fully opened at least once
202
+
203
+ wrap : null,
204
+ skin : null,
205
+ outer : null,
206
+ inner : null,
207
+
208
+ player : {
209
+ timer : null,
210
+ isActive : false
211
+ },
212
+
213
+ // Loaders
214
+ ajaxLoad : null,
215
+ imgPreload : null,
216
+
217
+ // Some collections
218
+ transitions : {},
219
+ helpers : {},
220
+
221
+ /*
222
+ * Static methods
223
+ */
224
+
225
+ open: function (group, opts) {
226
+ if (!group) {
227
+ return;
228
+ }
229
+
230
+ if (!$.isPlainObject(opts)) {
231
+ opts = {};
232
+ }
233
+
234
+ // Close if already active
235
+ if (false === F.close(true)) {
236
+ return;
237
+ }
238
+
239
+ // Normalize group
240
+ if (!$.isArray(group)) {
241
+ group = isQuery(group) ? $(group).get() : [group];
242
+ }
243
+
244
+ // Recheck if the type of each element is `object` and set content type (image, ajax, etc)
245
+ $.each(group, function(i, element) {
246
+ var obj = {},
247
+ href,
248
+ title,
249
+ content,
250
+ type,
251
+ rez,
252
+ hrefParts,
253
+ selector;
254
+
255
+ if ($.type(element) === "object") {
256
+ // Check if is DOM element
257
+ if (element.nodeType) {
258
+ element = $(element);
259
+ }
260
+
261
+ if (isQuery(element)) {
262
+ obj = {
263
+ href : element.data('fancybox-href') || element.attr('href'),
264
+ title : element.data('fancybox-title') || element.attr('title'),
265
+ isDom : true,
266
+ element : element
267
+ };
268
+
269
+ if ($.metadata) {
270
+ $.extend(true, obj, element.metadata());
271
+ }
272
+
273
+ } else {
274
+ obj = element;
275
+ }
276
+ }
277
+
278
+ href = opts.href || obj.href || (isString(element) ? element : null);
279
+ title = opts.title !== undefined ? opts.title : obj.title || '';
280
+
281
+ content = opts.content || obj.content;
282
+ type = content ? 'html' : (opts.type || obj.type);
283
+
284
+ if (!type && obj.isDom) {
285
+ type = element.data('fancybox-type');
286
+
287
+ if (!type) {
288
+ rez = element.prop('class').match(/fancybox\.(\w+)/);
289
+ type = rez ? rez[1] : null;
290
+ }
291
+ }
292
+
293
+ if (isString(href)) {
294
+ // Try to guess the content type
295
+ if (!type) {
296
+ if (F.isImage(href)) {
297
+ type = 'image';
298
+
299
+ } else if (F.isSWF(href)) {
300
+ type = 'swf';
301
+
302
+ } else if (href.charAt(0) === '#') {
303
+ type = 'inline';
304
+
305
+ } else if (isString(element)) {
306
+ type = 'html';
307
+ content = element;
308
+ }
309
+ }
310
+
311
+ // Split url into two pieces with source url and content selector, e.g,
312
+ // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id"
313
+ if (type === 'ajax') {
314
+ hrefParts = href.split(/\s+/, 2);
315
+ href = hrefParts.shift();
316
+ selector = hrefParts.shift();
317
+ }
318
+ }
319
+
320
+ if (!content) {
321
+ if (type === 'inline') {
322
+ if (href) {
323
+ content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7
324
+
325
+ } else if (obj.isDom) {
326
+ content = element;
327
+ }
328
+
329
+ } else if (type === 'html') {
330
+ content = href;
331
+
332
+ } else if (!type && !href && obj.isDom) {
333
+ type = 'inline';
334
+ content = element;
335
+ }
336
+ }
337
+
338
+ $.extend(obj, {
339
+ href : href,
340
+ type : type,
341
+ content : content,
342
+ title : title,
343
+ selector : selector
344
+ });
345
+
346
+ group[ i ] = obj;
347
+ });
348
+
349
+ // Extend the defaults
350
+ F.opts = $.extend(true, {}, F.defaults, opts);
351
+
352
+ // All options are merged recursive except keys
353
+ if (opts.keys !== undefined) {
354
+ F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false;
355
+ }
356
+
357
+ F.group = group;
358
+
359
+ return F._start(F.opts.index);
360
+ },
361
+
362
+ // Cancel image loading or abort ajax request
363
+ cancel: function () {
364
+ var coming = F.coming;
365
+
366
+ if (!coming || false === F.trigger('onCancel')) {
367
+ return;
368
+ }
369
+
370
+ F.hideLoading();
371
+
372
+ if (F.ajaxLoad) {
373
+ F.ajaxLoad.abort();
374
+ }
375
+
376
+ F.ajaxLoad = null;
377
+
378
+ if (F.imgPreload) {
379
+ F.imgPreload.onload = F.imgPreload.onerror = null;
380
+ }
381
+
382
+ if (coming.wrap) {
383
+ coming.wrap.stop(true, true).trigger('onReset').remove();
384
+ }
385
+
386
+ F.coming = null;
387
+
388
+ // If the first item has been canceled, then clear everything
389
+ if (!F.current) {
390
+ F._afterZoomOut( coming );
391
+ }
392
+ },
393
+
394
+ // Start closing animation if is open; remove immediately if opening/closing
395
+ close: function (event) {
396
+ F.cancel();
397
+
398
+ if (false === F.trigger('beforeClose')) {
399
+ return;
400
+ }
401
+
402
+ F.unbindEvents();
403
+
404
+ if (!F.isActive) {
405
+ return;
406
+ }
407
+
408
+ if (!F.isOpen || event === true) {
409
+ $('.fancybox-wrap').stop(true).trigger('onReset').remove();
410
+
411
+ F._afterZoomOut();
412
+
413
+ } else {
414
+ F.isOpen = F.isOpened = false;
415
+ F.isClosing = true;
416
+
417
+ $('.fancybox-item, .fancybox-nav').remove();
418
+
419
+ F.wrap.stop(true, true).removeClass('fancybox-opened');
420
+
421
+ F.transitions[ F.current.closeMethod ]();
422
+ }
423
+ },
424
+
425
+ // Manage slideshow:
426
+ // $.fancybox.play(); - toggle slideshow
427
+ // $.fancybox.play( true ); - start
428
+ // $.fancybox.play( false ); - stop
429
+ play: function ( action ) {
430
+ var clear = function () {
431
+ clearTimeout(F.player.timer);
432
+ },
433
+ set = function () {
434
+ clear();
435
+
436
+ if (F.current && F.player.isActive) {
437
+ F.player.timer = setTimeout(F.next, F.current.playSpeed);
438
+ }
439
+ },
440
+ stop = function () {
441
+ clear();
442
+
443
+ D.unbind('.player');
444
+
445
+ F.player.isActive = false;
446
+
447
+ F.trigger('onPlayEnd');
448
+ },
449
+ start = function () {
450
+ if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) {
451
+ F.player.isActive = true;
452
+
453
+ D.bind({
454
+ 'onCancel.player beforeClose.player' : stop,
455
+ 'onUpdate.player' : set,
456
+ 'beforeLoad.player' : clear
457
+ });
458
+
459
+ set();
460
+
461
+ F.trigger('onPlayStart');
462
+ }
463
+ };
464
+
465
+ if (action === true || (!F.player.isActive && action !== false)) {
466
+ start();
467
+ } else {
468
+ stop();
469
+ }
470
+ },
471
+
472
+ // Navigate to next gallery item
473
+ next: function ( direction ) {
474
+ var current = F.current;
475
+
476
+ if (current) {
477
+ if (!isString(direction)) {
478
+ direction = current.direction.next;
479
+ }
480
+
481
+ F.jumpto(current.index + 1, direction, 'next');
482
+ }
483
+ },
484
+
485
+ // Navigate to previous gallery item
486
+ prev: function ( direction ) {
487
+ var current = F.current;
488
+
489
+ if (current) {
490
+ if (!isString(direction)) {
491
+ direction = current.direction.prev;
492
+ }
493
+
494
+ F.jumpto(current.index - 1, direction, 'prev');
495
+ }
496
+ },
497
+
498
+ // Navigate to gallery item by index
499
+ jumpto: function ( index, direction, router ) {
500
+ var current = F.current;
501
+
502
+ if (!current) {
503
+ return;
504
+ }
505
+
506
+ index = getScalar(index);
507
+
508
+ F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ];
509
+ F.router = router || 'jumpto';
510
+
511
+ if (current.loop) {
512
+ if (index < 0) {
513
+ index = current.group.length + (index % current.group.length);
514
+ }
515
+
516
+ index = index % current.group.length;
517
+ }
518
+
519
+ if (current.group[ index ] !== undefined) {
520
+ F.cancel();
521
+
522
+ F._start(index);
523
+ }
524
+ },
525
+
526
+ // Center inside viewport and toggle position type to fixed or absolute if needed
527
+ reposition: function (e, onlyAbsolute) {
528
+ var current = F.current,
529
+ wrap = current ? current.wrap : null,
530
+ pos;
531
+
532
+ if (wrap) {
533
+ pos = F._getPosition(onlyAbsolute);
534
+
535
+ if (e && e.type === 'scroll') {
536
+ delete pos.position;
537
+
538
+ wrap.stop(true, true).animate(pos, 200);
539
+
540
+ } else {
541
+ wrap.css(pos);
542
+
543
+ current.pos = $.extend({}, current.dim, pos);
544
+ }
545
+ }
546
+ },
547
+
548
+ update: function (e) {
549
+ var type = (e && e.type),
550
+ anyway = !type || type === 'orientationchange';
551
+
552
+ if (anyway) {
553
+ clearTimeout(didUpdate);
554
+
555
+ didUpdate = null;
556
+ }
557
+
558
+ if (!F.isOpen || didUpdate) {
559
+ return;
560
+ }
561
+
562
+ didUpdate = setTimeout(function() {
563
+ var current = F.current;
564
+
565
+ if (!current || F.isClosing) {
566
+ return;
567
+ }
568
+
569
+ F.wrap.removeClass('fancybox-tmp');
570
+
571
+ if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) {
572
+ F._setDimension();
573
+ }
574
+
575
+ if (!(type === 'scroll' && current.canShrink)) {
576
+ F.reposition(e);
577
+ }
578
+
579
+ F.trigger('onUpdate');
580
+
581
+ didUpdate = null;
582
+
583
+ }, (anyway && !isTouch ? 0 : 300));
584
+ },
585
+
586
+ // Shrink content to fit inside viewport or restore if resized
587
+ toggle: function ( action ) {
588
+ if (F.isOpen) {
589
+ F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView;
590
+
591
+ // Help browser to restore document dimensions
592
+ if (isTouch) {
593
+ F.wrap.removeAttr('style').addClass('fancybox-tmp');
594
+
595
+ F.trigger('onUpdate');
596
+ }
597
+
598
+ F.update();
599
+ }
600
+ },
601
+
602
+ hideLoading: function () {
603
+ D.unbind('.loading');
604
+
605
+ $('#fancybox-loading').remove();
606
+ },
607
+
608
+ showLoading: function () {
609
+ var el, viewport;
610
+
611
+ F.hideLoading();
612
+
613
+ el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');
614
+
615
+ // If user will press the escape-button, the request will be canceled
616
+ D.bind('keydown.loading', function(e) {
617
+ if ((e.which || e.keyCode) === 27) {
618
+ e.preventDefault();
619
+
620
+ F.cancel();
621
+ }
622
+ });
623
+
624
+ if (!F.defaults.fixed) {
625
+ viewport = F.getViewport();
626
+
627
+ el.css({
628
+ position : 'absolute',
629
+ top : (viewport.h * 0.5) + viewport.y,
630
+ left : (viewport.w * 0.5) + viewport.x
631
+ });
632
+ }
633
+ },
634
+
635
+ getViewport: function () {
636
+ var locked = (F.current && F.current.locked) || false,
637
+ rez = {
638
+ x: W.scrollLeft(),
639
+ y: W.scrollTop()
640
+ };
641
+
642
+ if (locked) {
643
+ rez.w = locked[0].clientWidth;
644
+ rez.h = locked[0].clientHeight;
645
+
646
+ } else {
647
+ // See http://bugs.jquery.com/ticket/6724
648
+ rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width();
649
+ rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height();
650
+ }
651
+
652
+ return rez;
653
+ },
654
+
655
+ // Unbind the keyboard / clicking actions
656
+ unbindEvents: function () {
657
+ if (F.wrap && isQuery(F.wrap)) {
658
+ F.wrap.unbind('.fb');
659
+ }
660
+
661
+ D.unbind('.fb');
662
+ W.unbind('.fb');
663
+ },
664
+
665
+ bindEvents: function () {
666
+ var current = F.current,
667
+ keys;
668
+
669
+ if (!current) {
670
+ return;
671
+ }
672
+
673
+ // Changing document height on iOS devices triggers a 'resize' event,
674
+ // that can change document height... repeating infinitely
675
+ W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update);
676
+
677
+ keys = current.keys;
678
+
679
+ if (keys) {
680
+ D.bind('keydown.fb', function (e) {
681
+ var code = e.which || e.keyCode,
682
+ target = e.target || e.srcElement;
683
+
684
+ // Skip esc key if loading, because showLoading will cancel preloading
685
+ if (code === 27 && F.coming) {
686
+ return false;
687
+ }
688
+
689
+ // Ignore key combinations and key events within form elements
690
+ if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) {
691
+ $.each(keys, function(i, val) {
692
+ if (current.group.length > 1 && val[ code ] !== undefined) {
693
+ F[ i ]( val[ code ] );
694
+
695
+ e.preventDefault();
696
+ return false;
697
+ }
698
+
699
+ if ($.inArray(code, val) > -1) {
700
+ F[ i ] ();
701
+
702
+ e.preventDefault();
703
+ return false;
704
+ }
705
+ });
706
+ }
707
+ });
708
+ }
709
+
710
+ if ($.fn.mousewheel && current.mouseWheel) {
711
+ F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) {
712
+ var target = e.target || null,
713
+ parent = $(target),
714
+ canScroll = false;
715
+
716
+ while (parent.length) {
717
+ if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) {
718
+ break;
719
+ }
720
+
721
+ canScroll = isScrollable( parent[0] );
722
+ parent = $(parent).parent();
723
+ }
724
+
725
+ if (delta !== 0 && !canScroll) {
726
+ if (F.group.length > 1 && !current.canShrink) {
727
+ if (deltaY > 0 || deltaX > 0) {
728
+ F.prev( deltaY > 0 ? 'down' : 'left' );
729
+
730
+ } else if (deltaY < 0 || deltaX < 0) {
731
+ F.next( deltaY < 0 ? 'up' : 'right' );
732
+ }
733
+
734
+ e.preventDefault();
735
+ }
736
+ }
737
+ });
738
+ }
739
+ },
740
+
741
+ trigger: function (event, o) {
742
+ var ret, obj = o || F.coming || F.current;
743
+
744
+ if (!obj) {
745
+ return;
746
+ }
747
+
748
+ if ($.isFunction( obj[event] )) {
749
+ ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));
750
+ }
751
+
752
+ if (ret === false) {
753
+ return false;
754
+ }
755
+
756
+ if (obj.helpers) {
757
+ $.each(obj.helpers, function (helper, opts) {
758
+ if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) {
759
+ F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);
760
+ }
761
+ });
762
+ }
763
+
764
+ D.trigger(event);
765
+ },
766
+
767
+ isImage: function (str) {
768
+ return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
769
+ },
770
+
771
+ isSWF: function (str) {
772
+ return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i);
773
+ },
774
+
775
+ _start: function (index) {
776
+ var coming = {},
777
+ obj,
778
+ href,
779
+ type,
780
+ margin,
781
+ padding;
782
+
783
+ index = getScalar( index );
784
+ obj = F.group[ index ] || null;
785
+
786
+ if (!obj) {
787
+ return false;
788
+ }
789
+
790
+ coming = $.extend(true, {}, F.opts, obj);
791
+
792
+ // Convert margin and padding properties to array - top, right, bottom, left
793
+ margin = coming.margin;
794
+ padding = coming.padding;
795
+
796
+ if ($.type(margin) === 'number') {
797
+ coming.margin = [margin, margin, margin, margin];
798
+ }
799
+
800
+ if ($.type(padding) === 'number') {
801
+ coming.padding = [padding, padding, padding, padding];
802
+ }
803
+
804
+ // 'modal' propery is just a shortcut
805
+ if (coming.modal) {
806
+ $.extend(true, coming, {
807
+ closeBtn : false,
808
+ closeClick : false,
809
+ nextClick : false,
810
+ arrows : false,
811
+ mouseWheel : false,
812
+ keys : null,
813
+ helpers: {
814
+ overlay : {
815
+ closeClick : false
816
+ }
817
+ }
818
+ });
819
+ }
820
+
821
+ // 'autoSize' property is a shortcut, too
822
+ if (coming.autoSize) {
823
+ coming.autoWidth = coming.autoHeight = true;
824
+ }
825
+
826
+ if (coming.width === 'auto') {
827
+ coming.autoWidth = true;
828
+ }
829
+
830
+ if (coming.height === 'auto') {
831
+ coming.autoHeight = true;
832
+ }
833
+
834
+ /*
835
+ * Add reference to the group, so it`s possible to access from callbacks, example:
836
+ * afterLoad : function() {
837
+ * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
838
+ * }
839
+ */
840
+
841
+ coming.group = F.group;
842
+ coming.index = index;
843
+
844
+ // Give a chance for callback or helpers to update coming item (type, title, etc)
845
+ F.coming = coming;
846
+
847
+ if (false === F.trigger('beforeLoad')) {
848
+ F.coming = null;
849
+
850
+ return;
851
+ }
852
+
853
+ type = coming.type;
854
+ href = coming.href;
855
+
856
+ if (!type) {
857
+ F.coming = null;
858
+
859
+ //If we can not determine content type then drop silently or display next/prev item if looping through gallery
860
+ if (F.current && F.router && F.router !== 'jumpto') {
861
+ F.current.index = index;
862
+
863
+ return F[ F.router ]( F.direction );
864
+ }
865
+
866
+ return false;
867
+ }
868
+
869
+ F.isActive = true;
870
+
871
+ if (type === 'image' || type === 'swf') {
872
+ coming.autoHeight = coming.autoWidth = false;
873
+ coming.scrolling = 'visible';
874
+ }
875
+
876
+ if (type === 'image') {
877
+ coming.aspectRatio = true;
878
+ }
879
+
880
+ if (type === 'iframe' && isTouch) {
881
+ coming.scrolling = 'scroll';
882
+ }
883
+
884
+ // Build the neccessary markup
885
+ coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' );
886
+
887
+ $.extend(coming, {
888
+ skin : $('.fancybox-skin', coming.wrap),
889
+ outer : $('.fancybox-outer', coming.wrap),
890
+ inner : $('.fancybox-inner', coming.wrap)
891
+ });
892
+
893
+ $.each(["Top", "Right", "Bottom", "Left"], function(i, v) {
894
+ coming.skin.css('padding' + v, getValue(coming.padding[ i ]));
895
+ });
896
+
897
+ F.trigger('onReady');
898
+
899
+ // Check before try to load; 'inline' and 'html' types need content, others - href
900
+ if (type === 'inline' || type === 'html') {
901
+ if (!coming.content || !coming.content.length) {
902
+ return F._error( 'content' );
903
+ }
904
+
905
+ } else if (!href) {
906
+ return F._error( 'href' );
907
+ }
908
+
909
+ if (type === 'image') {
910
+ F._loadImage();
911
+
912
+ } else if (type === 'ajax') {
913
+ F._loadAjax();
914
+
915
+ } else if (type === 'iframe') {
916
+ F._loadIframe();
917
+
918
+ } else {
919
+ F._afterLoad();
920
+ }
921
+ },
922
+
923
+ _error: function ( type ) {
924
+ $.extend(F.coming, {
925
+ type : 'html',
926
+ autoWidth : true,
927
+ autoHeight : true,
928
+ minWidth : 0,
929
+ minHeight : 0,
930
+ scrolling : 'no',
931
+ hasError : type,
932
+ content : F.coming.tpl.error
933
+ });
934
+
935
+ F._afterLoad();
936
+ },
937
+
938
+ _loadImage: function () {
939
+ // Reset preload image so it is later possible to check "complete" property
940
+ var img = F.imgPreload = new Image();
941
+
942
+ img.onload = function () {
943
+ this.onload = this.onerror = null;
944
+
945
+ F.coming.width = this.width / F.opts.pixelRatio;
946
+ F.coming.height = this.height / F.opts.pixelRatio;
947
+
948
+ F._afterLoad();
949
+ };
950
+
951
+ img.onerror = function () {
952
+ this.onload = this.onerror = null;
953
+
954
+ F._error( 'image' );
955
+ };
956
+
957
+ img.src = F.coming.href;
958
+
959
+ if (img.complete !== true) {
960
+ F.showLoading();
961
+ }
962
+ },
963
+
964
+ _loadAjax: function () {
965
+ var coming = F.coming;
966
+
967
+ F.showLoading();
968
+
969
+ F.ajaxLoad = $.ajax($.extend({}, coming.ajax, {
970
+ url: coming.href,
971
+ error: function (jqXHR, textStatus) {
972
+ if (F.coming && textStatus !== 'abort') {
973
+ F._error( 'ajax', jqXHR );
974
+
975
+ } else {
976
+ F.hideLoading();
977
+ }
978
+ },
979
+ success: function (data, textStatus) {
980
+ if (textStatus === 'success') {
981
+ coming.content = data;
982
+
983
+ F._afterLoad();
984
+ }
985
+ }
986
+ }));
987
+ },
988
+
989
+ _loadIframe: function() {
990
+ var coming = F.coming,
991
+ iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
992
+ .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling)
993
+ .attr('src', coming.href);
994
+
995
+ // This helps IE
996
+ $(coming.wrap).bind('onReset', function () {
997
+ try {
998
+ $(this).find('iframe').hide().attr('src', '//about:blank').end().empty();
999
+ } catch (e) {}
1000
+ });
1001
+
1002
+ if (coming.iframe.preload) {
1003
+ F.showLoading();
1004
+
1005
+ iframe.one('load', function() {
1006
+ $(this).data('ready', 1);
1007
+
1008
+ // iOS will lose scrolling if we resize
1009
+ if (!isTouch) {
1010
+ $(this).bind('load.fb', F.update);
1011
+ }
1012
+
1013
+ // Without this trick:
1014
+ // - iframe won't scroll on iOS devices
1015
+ // - IE7 sometimes displays empty iframe
1016
+ $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();
1017
+
1018
+ F._afterLoad();
1019
+ });
1020
+ }
1021
+
1022
+ coming.content = iframe.appendTo( coming.inner );
1023
+
1024
+ if (!coming.iframe.preload) {
1025
+ F._afterLoad();
1026
+ }
1027
+ },
1028
+
1029
+ _preloadImages: function() {
1030
+ var group = F.group,
1031
+ current = F.current,
1032
+ len = group.length,
1033
+ cnt = current.preload ? Math.min(current.preload, len - 1) : 0,
1034
+ item,
1035
+ i;
1036
+
1037
+ for (i = 1; i <= cnt; i += 1) {
1038
+ item = group[ (current.index + i ) % len ];
1039
+
1040
+ if (item.type === 'image' && item.href) {
1041
+ new Image().src = item.href;
1042
+ }
1043
+ }
1044
+ },
1045
+
1046
+ _afterLoad: function () {
1047
+ var coming = F.coming,
1048
+ previous = F.current,
1049
+ placeholder = 'fancybox-placeholder',
1050
+ current,
1051
+ content,
1052
+ type,
1053
+ scrolling,
1054
+ href,
1055
+ embed;
1056
+
1057
+ F.hideLoading();
1058
+
1059
+ if (!coming || F.isActive === false) {
1060
+ return;
1061
+ }
1062
+
1063
+ if (false === F.trigger('afterLoad', coming, previous)) {
1064
+ coming.wrap.stop(true).trigger('onReset').remove();
1065
+
1066
+ F.coming = null;
1067
+
1068
+ return;
1069
+ }
1070
+
1071
+ if (previous) {
1072
+ F.trigger('beforeChange', previous);
1073
+
1074
+ previous.wrap.stop(true).removeClass('fancybox-opened')
1075
+ .find('.fancybox-item, .fancybox-nav')
1076
+ .remove();
1077
+ }
1078
+
1079
+ F.unbindEvents();
1080
+
1081
+ current = coming;
1082
+ content = coming.content;
1083
+ type = coming.type;
1084
+ scrolling = coming.scrolling;
1085
+
1086
+ $.extend(F, {
1087
+ wrap : current.wrap,
1088
+ skin : current.skin,
1089
+ outer : current.outer,
1090
+ inner : current.inner,
1091
+ current : current,
1092
+ previous : previous
1093
+ });
1094
+
1095
+ href = current.href;
1096
+
1097
+ switch (type) {
1098
+ case 'inline':
1099
+ case 'ajax':
1100
+ case 'html':
1101
+ if (current.selector) {
1102
+ content = $('<div>').html(content).find(current.selector);
1103
+
1104
+ } else if (isQuery(content)) {
1105
+ if (!content.data(placeholder)) {
1106
+ content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );
1107
+ }
1108
+
1109
+ content = content.show().detach();
1110
+
1111
+ current.wrap.bind('onReset', function () {
1112
+ if ($(this).find(content).length) {
1113
+ content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);
1114
+ }
1115
+ });
1116
+ }
1117
+ break;
1118
+
1119
+ case 'image':
1120
+ content = current.tpl.image.replace('{href}', href);
1121
+ break;
1122
+
1123
+ case 'swf':
1124
+ content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';
1125
+ embed = '';
1126
+
1127
+ $.each(current.swf, function(name, val) {
1128
+ content += '<param name="' + name + '" value="' + val + '"></param>';
1129
+ embed += ' ' + name + '="' + val + '"';
1130
+ });
1131
+
1132
+ content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';
1133
+ break;
1134
+ }
1135
+
1136
+ if (!(isQuery(content) && content.parent().is(current.inner))) {
1137
+ current.inner.append( content );
1138
+ }
1139
+
1140
+ // Give a chance for helpers or callbacks to update elements
1141
+ F.trigger('beforeShow');
1142
+
1143
+ // Set scrolling before calculating dimensions
1144
+ current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling));
1145
+
1146
+ // Set initial dimensions and start position
1147
+ F._setDimension();
1148
+
1149
+ F.reposition();
1150
+
1151
+ F.isOpen = false;
1152
+ F.coming = null;
1153
+
1154
+ F.bindEvents();
1155
+
1156
+ if (!F.isOpened) {
1157
+ $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();
1158
+
1159
+ } else if (previous.prevMethod) {
1160
+ F.transitions[ previous.prevMethod ]();
1161
+ }
1162
+
1163
+ F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ]();
1164
+
1165
+ F._preloadImages();
1166
+ },
1167
+
1168
+ _setDimension: function () {
1169
+ var viewport = F.getViewport(),
1170
+ steps = 0,
1171
+ canShrink = false,
1172
+ canExpand = false,
1173
+ wrap = F.wrap,
1174
+ skin = F.skin,
1175
+ inner = F.inner,
1176
+ current = F.current,
1177
+ width = current.width,
1178
+ height = current.height,
1179
+ minWidth = current.minWidth,
1180
+ minHeight = current.minHeight,
1181
+ maxWidth = current.maxWidth,
1182
+ maxHeight = current.maxHeight,
1183
+ scrolling = current.scrolling,
1184
+ scrollOut = current.scrollOutside ? current.scrollbarWidth : 0,
1185
+ margin = current.margin,
1186
+ wMargin = getScalar(margin[1] + margin[3]),
1187
+ hMargin = getScalar(margin[0] + margin[2]),
1188
+ wPadding,
1189
+ hPadding,
1190
+ wSpace,
1191
+ hSpace,
1192
+ origWidth,
1193
+ origHeight,
1194
+ origMaxWidth,
1195
+ origMaxHeight,
1196
+ ratio,
1197
+ width_,
1198
+ height_,
1199
+ maxWidth_,
1200
+ maxHeight_,
1201
+ iframe,
1202
+ body;
1203
+
1204
+ // Reset dimensions so we could re-check actual size
1205
+ wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');
1206
+
1207
+ wPadding = getScalar(skin.outerWidth(true) - skin.width());
1208
+ hPadding = getScalar(skin.outerHeight(true) - skin.height());
1209
+
1210
+ // Any space between content and viewport (margin, padding, border, title)
1211
+ wSpace = wMargin + wPadding;
1212
+ hSpace = hMargin + hPadding;
1213
+
1214
+ origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width;
1215
+ origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height;
1216
+
1217
+ if (current.type === 'iframe') {
1218
+ iframe = current.content;
1219
+
1220
+ if (current.autoHeight && iframe.data('ready') === 1) {
1221
+ try {
1222
+ if (iframe[0].contentWindow.document.location) {
1223
+ inner.width( origWidth ).height(9999);
1224
+
1225
+ body = iframe.contents().find('body');
1226
+
1227
+ if (scrollOut) {
1228
+ body.css('overflow-x', 'hidden');
1229
+ }
1230
+
1231
+ origHeight = body.outerHeight(true);
1232
+ }
1233
+
1234
+ } catch (e) {}
1235
+ }
1236
+
1237
+ } else if (current.autoWidth || current.autoHeight) {
1238
+ inner.addClass( 'fancybox-tmp' );
1239
+
1240
+ // Set width or height in case we need to calculate only one dimension
1241
+ if (!current.autoWidth) {
1242
+ inner.width( origWidth );
1243
+ }
1244
+
1245
+ if (!current.autoHeight) {
1246
+ inner.height( origHeight );
1247
+ }
1248
+
1249
+ if (current.autoWidth) {
1250
+ origWidth = inner.width();
1251
+ }
1252
+
1253
+ if (current.autoHeight) {
1254
+ origHeight = inner.height();
1255
+ }
1256
+
1257
+ inner.removeClass( 'fancybox-tmp' );
1258
+ }
1259
+
1260
+ width = getScalar( origWidth );
1261
+ height = getScalar( origHeight );
1262
+
1263
+ ratio = origWidth / origHeight;
1264
+
1265
+ // Calculations for the content
1266
+ minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth);
1267
+ maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth);
1268
+
1269
+ minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight);
1270
+ maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight);
1271
+
1272
+ // These will be used to determine if wrap can fit in the viewport
1273
+ origMaxWidth = maxWidth;
1274
+ origMaxHeight = maxHeight;
1275
+
1276
+ if (current.fitToView) {
1277
+ maxWidth = Math.min(viewport.w - wSpace, maxWidth);
1278
+ maxHeight = Math.min(viewport.h - hSpace, maxHeight);
1279
+ }
1280
+
1281
+ maxWidth_ = viewport.w - wMargin;
1282
+ maxHeight_ = viewport.h - hMargin;
1283
+
1284
+ if (current.aspectRatio) {
1285
+ if (width > maxWidth) {
1286
+ width = maxWidth;
1287
+ height = getScalar(width / ratio);
1288
+ }
1289
+
1290
+ if (height > maxHeight) {
1291
+ height = maxHeight;
1292
+ width = getScalar(height * ratio);
1293
+ }
1294
+
1295
+ if (width < minWidth) {
1296
+ width = minWidth;
1297
+ height = getScalar(width / ratio);
1298
+ }
1299
+
1300
+ if (height < minHeight) {
1301
+ height = minHeight;
1302
+ width = getScalar(height * ratio);
1303
+ }
1304
+
1305
+ } else {
1306
+ width = Math.max(minWidth, Math.min(width, maxWidth));
1307
+
1308
+ if (current.autoHeight && current.type !== 'iframe') {
1309
+ inner.width( width );
1310
+
1311
+ height = inner.height();
1312
+ }
1313
+
1314
+ height = Math.max(minHeight, Math.min(height, maxHeight));
1315
+ }
1316
+
1317
+ // Try to fit inside viewport (including the title)
1318
+ if (current.fitToView) {
1319
+ inner.width( width ).height( height );
1320
+
1321
+ wrap.width( width + wPadding );
1322
+
1323
+ // Real wrap dimensions
1324
+ width_ = wrap.width();
1325
+ height_ = wrap.height();
1326
+
1327
+ if (current.aspectRatio) {
1328
+ while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) {
1329
+ if (steps++ > 19) {
1330
+ break;
1331
+ }
1332
+
1333
+ height = Math.max(minHeight, Math.min(maxHeight, height - 10));
1334
+ width = getScalar(height * ratio);
1335
+
1336
+ if (width < minWidth) {
1337
+ width = minWidth;
1338
+ height = getScalar(width / ratio);
1339
+ }
1340
+
1341
+ if (width > maxWidth) {
1342
+ width = maxWidth;
1343
+ height = getScalar(width / ratio);
1344
+ }
1345
+
1346
+ inner.width( width ).height( height );
1347
+
1348
+ wrap.width( width + wPadding );
1349
+
1350
+ width_ = wrap.width();
1351
+ height_ = wrap.height();
1352
+ }
1353
+
1354
+ } else {
1355
+ width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_)));
1356
+ height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_)));
1357
+ }
1358
+ }
1359
+
1360
+ if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) {
1361
+ width += scrollOut;
1362
+ }
1363
+
1364
+ inner.width( width ).height( height );
1365
+
1366
+ wrap.width( width + wPadding );
1367
+
1368
+ width_ = wrap.width();
1369
+ height_ = wrap.height();
1370
+
1371
+ canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight;
1372
+ canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight));
1373
+
1374
+ $.extend(current, {
1375
+ dim : {
1376
+ width : getValue( width_ ),
1377
+ height : getValue( height_ )
1378
+ },
1379
+ origWidth : origWidth,
1380
+ origHeight : origHeight,
1381
+ canShrink : canShrink,
1382
+ canExpand : canExpand,
1383
+ wPadding : wPadding,
1384
+ hPadding : hPadding,
1385
+ wrapSpace : height_ - skin.outerHeight(true),
1386
+ skinSpace : skin.height() - height
1387
+ });
1388
+
1389
+ if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) {
1390
+ inner.height('auto');
1391
+ }
1392
+ },
1393
+
1394
+ _getPosition: function (onlyAbsolute) {
1395
+ var current = F.current,
1396
+ viewport = F.getViewport(),
1397
+ margin = current.margin,
1398
+ width = F.wrap.width() + margin[1] + margin[3],
1399
+ height = F.wrap.height() + margin[0] + margin[2],
1400
+ rez = {
1401
+ position: 'absolute',
1402
+ top : margin[0],
1403
+ left : margin[3]
1404
+ };
1405
+
1406
+ if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) {
1407
+ rez.position = 'fixed';
1408
+
1409
+ } else if (!current.locked) {
1410
+ rez.top += viewport.y;
1411
+ rez.left += viewport.x;
1412
+ }
1413
+
1414
+ rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio)));
1415
+ rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio)));
1416
+
1417
+ return rez;
1418
+ },
1419
+
1420
+ _afterZoomIn: function () {
1421
+ var current = F.current;
1422
+
1423
+ if (!current) {
1424
+ return;
1425
+ }
1426
+
1427
+ F.isOpen = F.isOpened = true;
1428
+
1429
+ F.wrap.css('overflow', 'visible').addClass('fancybox-opened');
1430
+
1431
+ F.update();
1432
+
1433
+ // Assign a click event
1434
+ if ( current.closeClick || (current.nextClick && F.group.length > 1) ) {
1435
+ F.inner.css('cursor', 'pointer').bind('click.fb', function(e) {
1436
+ if (!$(e.target).is('a') && !$(e.target).parent().is('a')) {
1437
+ e.preventDefault();
1438
+
1439
+ F[ current.closeClick ? 'close' : 'next' ]();
1440
+ }
1441
+ });
1442
+ }
1443
+
1444
+ // Create a close button
1445
+ if (current.closeBtn) {
1446
+ $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) {
1447
+ e.preventDefault();
1448
+
1449
+ F.close();
1450
+ });
1451
+ }
1452
+
1453
+ // Create navigation arrows
1454
+ if (current.arrows && F.group.length > 1) {
1455
+ if (current.loop || current.index > 0) {
1456
+ $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev);
1457
+ }
1458
+
1459
+ if (current.loop || current.index < F.group.length - 1) {
1460
+ $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next);
1461
+ }
1462
+ }
1463
+
1464
+ F.trigger('afterShow');
1465
+
1466
+ // Stop the slideshow if this is the last item
1467
+ if (!current.loop && current.index === current.group.length - 1) {
1468
+ F.play( false );
1469
+
1470
+ } else if (F.opts.autoPlay && !F.player.isActive) {
1471
+ F.opts.autoPlay = false;
1472
+
1473
+ F.play();
1474
+ }
1475
+ },
1476
+
1477
+ _afterZoomOut: function ( obj ) {
1478
+ obj = obj || F.current;
1479
+
1480
+ $('.fancybox-wrap').trigger('onReset').remove();
1481
+
1482
+ $.extend(F, {
1483
+ group : {},
1484
+ opts : {},
1485
+ router : false,
1486
+ current : null,
1487
+ isActive : false,
1488
+ isOpened : false,
1489
+ isOpen : false,
1490
+ isClosing : false,
1491
+ wrap : null,
1492
+ skin : null,
1493
+ outer : null,
1494
+ inner : null
1495
+ });
1496
+
1497
+ F.trigger('afterClose', obj);
1498
+ }
1499
+ });
1500
+
1501
+ /*
1502
+ * Default transitions
1503
+ */
1504
+
1505
+ F.transitions = {
1506
+ getOrigPosition: function () {
1507
+ var current = F.current,
1508
+ element = current.element,
1509
+ orig = current.orig,
1510
+ pos = {},
1511
+ width = 50,
1512
+ height = 50,
1513
+ hPadding = current.hPadding,
1514
+ wPadding = current.wPadding,
1515
+ viewport = F.getViewport();
1516
+
1517
+ if (!orig && current.isDom && element.is(':visible')) {
1518
+ orig = element.find('img:first');
1519
+
1520
+ if (!orig.length) {
1521
+ orig = element;
1522
+ }
1523
+ }
1524
+
1525
+ if (isQuery(orig)) {
1526
+ pos = orig.offset();
1527
+
1528
+ if (orig.is('img')) {
1529
+ width = orig.outerWidth();
1530
+ height = orig.outerHeight();
1531
+ }
1532
+
1533
+ } else {
1534
+ pos.top = viewport.y + (viewport.h - height) * current.topRatio;
1535
+ pos.left = viewport.x + (viewport.w - width) * current.leftRatio;
1536
+ }
1537
+
1538
+ if (F.wrap.css('position') === 'fixed' || current.locked) {
1539
+ pos.top -= viewport.y;
1540
+ pos.left -= viewport.x;
1541
+ }
1542
+
1543
+ pos = {
1544
+ top : getValue(pos.top - hPadding * current.topRatio),
1545
+ left : getValue(pos.left - wPadding * current.leftRatio),
1546
+ width : getValue(width + wPadding),
1547
+ height : getValue(height + hPadding)
1548
+ };
1549
+
1550
+ return pos;
1551
+ },
1552
+
1553
+ step: function (now, fx) {
1554
+ var ratio,
1555
+ padding,
1556
+ value,
1557
+ prop = fx.prop,
1558
+ current = F.current,
1559
+ wrapSpace = current.wrapSpace,
1560
+ skinSpace = current.skinSpace;
1561
+
1562
+ if (prop === 'width' || prop === 'height') {
1563
+ ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start);
1564
+
1565
+ if (F.isClosing) {
1566
+ ratio = 1 - ratio;
1567
+ }
1568
+
1569
+ padding = prop === 'width' ? current.wPadding : current.hPadding;
1570
+ value = now - padding;
1571
+
1572
+ F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) );
1573
+ F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) );
1574
+ }
1575
+ },
1576
+
1577
+ zoomIn: function () {
1578
+ var current = F.current,
1579
+ startPos = current.pos,
1580
+ effect = current.openEffect,
1581
+ elastic = effect === 'elastic',
1582
+ endPos = $.extend({opacity : 1}, startPos);
1583
+
1584
+ // Remove "position" property that breaks older IE
1585
+ delete endPos.position;
1586
+
1587
+ if (elastic) {
1588
+ startPos = this.getOrigPosition();
1589
+
1590
+ if (current.openOpacity) {
1591
+ startPos.opacity = 0.1;
1592
+ }
1593
+
1594
+ } else if (effect === 'fade') {
1595
+ startPos.opacity = 0.1;
1596
+ }
1597
+
1598
+ F.wrap.css(startPos).animate(endPos, {
1599
+ duration : effect === 'none' ? 0 : current.openSpeed,
1600
+ easing : current.openEasing,
1601
+ step : elastic ? this.step : null,
1602
+ complete : F._afterZoomIn
1603
+ });
1604
+ },
1605
+
1606
+ zoomOut: function () {
1607
+ var current = F.current,
1608
+ effect = current.closeEffect,
1609
+ elastic = effect === 'elastic',
1610
+ endPos = {opacity : 0.1};
1611
+
1612
+ if (elastic) {
1613
+ endPos = this.getOrigPosition();
1614
+
1615
+ if (current.closeOpacity) {
1616
+ endPos.opacity = 0.1;
1617
+ }
1618
+ }
1619
+
1620
+ F.wrap.animate(endPos, {
1621
+ duration : effect === 'none' ? 0 : current.closeSpeed,
1622
+ easing : current.closeEasing,
1623
+ step : elastic ? this.step : null,
1624
+ complete : F._afterZoomOut
1625
+ });
1626
+ },
1627
+
1628
+ changeIn: function () {
1629
+ var current = F.current,
1630
+ effect = current.nextEffect,
1631
+ startPos = current.pos,
1632
+ endPos = { opacity : 1 },
1633
+ direction = F.direction,
1634
+ distance = 200,
1635
+ field;
1636
+
1637
+ startPos.opacity = 0.1;
1638
+
1639
+ if (effect === 'elastic') {
1640
+ field = direction === 'down' || direction === 'up' ? 'top' : 'left';
1641
+
1642
+ if (direction === 'down' || direction === 'right') {
1643
+ startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance);
1644
+ endPos[ field ] = '+=' + distance + 'px';
1645
+
1646
+ } else {
1647
+ startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance);
1648
+ endPos[ field ] = '-=' + distance + 'px';
1649
+ }
1650
+ }
1651
+
1652
+ // Workaround for http://bugs.jquery.com/ticket/12273
1653
+ if (effect === 'none') {
1654
+ F._afterZoomIn();
1655
+
1656
+ } else {
1657
+ F.wrap.css(startPos).animate(endPos, {
1658
+ duration : current.nextSpeed,
1659
+ easing : current.nextEasing,
1660
+ complete : F._afterZoomIn
1661
+ });
1662
+ }
1663
+ },
1664
+
1665
+ changeOut: function () {
1666
+ var previous = F.previous,
1667
+ effect = previous.prevEffect,
1668
+ endPos = { opacity : 0.1 },
1669
+ direction = F.direction,
1670
+ distance = 200;
1671
+
1672
+ if (effect === 'elastic') {
1673
+ endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px';
1674
+ }
1675
+
1676
+ previous.wrap.animate(endPos, {
1677
+ duration : effect === 'none' ? 0 : previous.prevSpeed,
1678
+ easing : previous.prevEasing,
1679
+ complete : function () {
1680
+ $(this).trigger('onReset').remove();
1681
+ }
1682
+ });
1683
+ }
1684
+ };
1685
+
1686
+ /*
1687
+ * Overlay helper
1688
+ */
1689
+
1690
+ F.helpers.overlay = {
1691
+ defaults : {
1692
+ closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay
1693
+ speedOut : 200, // duration of fadeOut animation
1694
+ showEarly : true, // indicates if should be opened immediately or wait until the content is ready
1695
+ css : {}, // custom CSS properties
1696
+ locked : !isTouch, // if true, the content will be locked into overlay
1697
+ fixed : true // if false, the overlay CSS position property will not be set to "fixed"
1698
+ },
1699
+
1700
+ overlay : null, // current handle
1701
+ fixed : false, // indicates if the overlay has position "fixed"
1702
+ el : $('html'), // element that contains "the lock"
1703
+
1704
+ // Public methods
1705
+ create : function(opts) {
1706
+ opts = $.extend({}, this.defaults, opts);
1707
+
1708
+ if (this.overlay) {
1709
+ this.close();
1710
+ }
1711
+
1712
+ this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent );
1713
+ this.fixed = false;
1714
+
1715
+ if (opts.fixed && F.defaults.fixed) {
1716
+ this.overlay.addClass('fancybox-overlay-fixed');
1717
+
1718
+ this.fixed = true;
1719
+ }
1720
+ },
1721
+
1722
+ open : function(opts) {
1723
+ var that = this;
1724
+
1725
+ opts = $.extend({}, this.defaults, opts);
1726
+
1727
+ if (this.overlay) {
1728
+ this.overlay.unbind('.overlay').width('auto').height('auto');
1729
+
1730
+ } else {
1731
+ this.create(opts);
1732
+ }
1733
+
1734
+ if (!this.fixed) {
1735
+ W.bind('resize.overlay', $.proxy( this.update, this) );
1736
+
1737
+ this.update();
1738
+ }
1739
+
1740
+ if (opts.closeClick) {
1741
+ this.overlay.bind('click.overlay', function(e) {
1742
+ if ($(e.target).hasClass('fancybox-overlay')) {
1743
+ if (F.isActive) {
1744
+ F.close();
1745
+ } else {
1746
+ that.close();
1747
+ }
1748
+
1749
+ return false;
1750
+ }
1751
+ });
1752
+ }
1753
+
1754
+ this.overlay.css( opts.css ).show();
1755
+ },
1756
+
1757
+ close : function() {
1758
+ var scrollV, scrollH;
1759
+
1760
+ W.unbind('resize.overlay');
1761
+
1762
+ if (this.el.hasClass('fancybox-lock')) {
1763
+ $('.fancybox-margin').removeClass('fancybox-margin');
1764
+
1765
+ scrollV = W.scrollTop();
1766
+ scrollH = W.scrollLeft();
1767
+
1768
+ this.el.removeClass('fancybox-lock');
1769
+
1770
+ W.scrollTop( scrollV ).scrollLeft( scrollH );
1771
+ }
1772
+
1773
+ $('.fancybox-overlay').remove().hide();
1774
+
1775
+ $.extend(this, {
1776
+ overlay : null,
1777
+ fixed : false
1778
+ });
1779
+ },
1780
+
1781
+ // Private, callbacks
1782
+
1783
+ update : function () {
1784
+ var width = '100%', offsetWidth;
1785
+
1786
+ // Reset width/height so it will not mess
1787
+ this.overlay.width(width).height('100%');
1788
+
1789
+ // jQuery does not return reliable result for IE
1790
+ if (IE) {
1791
+ offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
1792
+
1793
+ if (D.width() > offsetWidth) {
1794
+ width = D.width();
1795
+ }
1796
+
1797
+ } else if (D.width() > W.width()) {
1798
+ width = D.width();
1799
+ }
1800
+
1801
+ this.overlay.width(width).height(D.height());
1802
+ },
1803
+
1804
+ // This is where we can manipulate DOM, because later it would cause iframes to reload
1805
+ onReady : function (opts, obj) {
1806
+ var overlay = this.overlay;
1807
+
1808
+ $('.fancybox-overlay').stop(true, true);
1809
+
1810
+ if (!overlay) {
1811
+ this.create(opts);
1812
+ }
1813
+
1814
+ if (opts.locked && this.fixed && obj.fixed) {
1815
+ if (!overlay) {
1816
+ this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
1817
+ }
1818
+
1819
+ obj.locked = this.overlay.append( obj.wrap );
1820
+ obj.fixed = false;
1821
+ }
1822
+
1823
+ if (opts.showEarly === true) {
1824
+ this.beforeShow.apply(this, arguments);
1825
+ }
1826
+ },
1827
+
1828
+ beforeShow : function(opts, obj) {
1829
+ var scrollV, scrollH;
1830
+
1831
+ if (obj.locked) {
1832
+ if (this.margin !== false) {
1833
+ $('*').filter(function(){
1834
+ return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") );
1835
+ }).addClass('fancybox-margin');
1836
+
1837
+ this.el.addClass('fancybox-margin');
1838
+ }
1839
+
1840
+ scrollV = W.scrollTop();
1841
+ scrollH = W.scrollLeft();
1842
+
1843
+ this.el.addClass('fancybox-lock');
1844
+
1845
+ W.scrollTop( scrollV ).scrollLeft( scrollH );
1846
+ }
1847
+
1848
+ this.open(opts);
1849
+ },
1850
+
1851
+ onUpdate : function() {
1852
+ if (!this.fixed) {
1853
+ this.update();
1854
+ }
1855
+ },
1856
+
1857
+ afterClose: function (opts) {
1858
+ // Remove overlay if exists and fancyBox is not opening
1859
+ // (e.g., it is not being open using afterClose callback)
1860
+ //if (this.overlay && !F.isActive) {
1861
+ if (this.overlay && !F.coming) {
1862
+ this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));
1863
+ }
1864
+ }
1865
+ };
1866
+
1867
+ /*
1868
+ * Title helper
1869
+ */
1870
+
1871
+ F.helpers.title = {
1872
+ defaults : {
1873
+ type : 'float', // 'float', 'inside', 'outside' or 'over',
1874
+ position : 'bottom' // 'top' or 'bottom'
1875
+ },
1876
+
1877
+ beforeShow: function (opts) {
1878
+ var current = F.current,
1879
+ text = current.title,
1880
+ type = opts.type,
1881
+ title,
1882
+ target;
1883
+
1884
+ if ($.isFunction(text)) {
1885
+ text = text.call(current.element, current);
1886
+ }
1887
+
1888
+ if (!isString(text) || $.trim(text) === '') {
1889
+ return;
1890
+ }
1891
+
1892
+ title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>');
1893
+
1894
+ switch (type) {
1895
+ case 'inside':
1896
+ target = F.skin;
1897
+ break;
1898
+
1899
+ case 'outside':
1900
+ target = F.wrap;
1901
+ break;
1902
+
1903
+ case 'over':
1904
+ target = F.inner;
1905
+ break;
1906
+
1907
+ default: // 'float'
1908
+ target = F.skin;
1909
+
1910
+ title.appendTo('body');
1911
+
1912
+ if (IE) {
1913
+ title.width( title.width() );
1914
+ }
1915
+
1916
+ title.wrapInner('<span class="child"></span>');
1917
+
1918
+ //Increase bottom margin so this title will also fit into viewport
1919
+ F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) );
1920
+ break;
1921
+ }
1922
+
1923
+ title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target);
1924
+ }
1925
+ };
1926
+
1927
+ // jQuery plugin initialization
1928
+ $.fn.fancybox = function (options) {
1929
+ var index,
1930
+ that = $(this),
1931
+ selector = this.selector || '',
1932
+ run = function(e) {
1933
+ var what = $(this).blur(), idx = index, relType, relVal;
1934
+
1935
+ if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) {
1936
+ relType = options.groupAttr || 'data-fancybox-group';
1937
+ relVal = what.attr(relType);
1938
+
1939
+ if (!relVal) {
1940
+ relType = 'rel';
1941
+ relVal = what.get(0)[ relType ];
1942
+ }
1943
+
1944
+ if (relVal && relVal !== '' && relVal !== 'nofollow') {
1945
+ what = selector.length ? $(selector) : that;
1946
+ what = what.filter('[' + relType + '="' + relVal + '"]');
1947
+ idx = what.index(this);
1948
+ }
1949
+
1950
+ options.index = idx;
1951
+
1952
+ // Stop an event from bubbling if everything is fine
1953
+ if (F.open(what, options) !== false) {
1954
+ e.preventDefault();
1955
+ }
1956
+ }
1957
+ };
1958
+
1959
+ options = options || {};
1960
+ index = options.index || 0;
1961
+
1962
+ if (!selector || options.live === false) {
1963
+ that.unbind('click.fb-start').bind('click.fb-start', run);
1964
+
1965
+ } else {
1966
+ D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);
1967
+ }
1968
+
1969
+ this.filter('[data-fancybox-start=1]').trigger('click');
1970
+
1971
+ return this;
1972
+ };
1973
+
1974
+ // Tests that need a body at doc ready
1975
+ D.ready(function() {
1976
+ var w1, w2;
1977
+
1978
+ if ( $.scrollbarWidth === undefined ) {
1979
+ // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
1980
+ $.scrollbarWidth = function() {
1981
+ var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),
1982
+ child = parent.children(),
1983
+ width = child.innerWidth() - child.height( 99 ).innerWidth();
1984
+
1985
+ parent.remove();
1986
+
1987
+ return width;
1988
+ };
1989
+ }
1990
+
1991
+ if ( $.support.fixedPosition === undefined ) {
1992
+ $.support.fixedPosition = (function() {
1993
+ var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'),
1994
+ fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 );
1995
+
1996
+ elem.remove();
1997
+
1998
+ return fixed;
1999
+ }());
2000
+ }
2001
+
2002
+ $.extend(F.defaults, {
2003
+ scrollbarWidth : $.scrollbarWidth(),
2004
+ fixed : $.support.fixedPosition,
2005
+ parent : $('body')
2006
+ });
2007
+
2008
+ //Get real width of page scroll-bar
2009
+ w1 = $(window).width();
2010
+
2011
+ H.addClass('fancybox-lock-test');
2012
+
2013
+ w2 = $(window).width();
2014
+
2015
+ H.removeClass('fancybox-lock-test');
2016
+
2017
+ $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head");
2018
+ });
2019
+
2020
+ }(window, document, jQuery));
fancybox/jquery.fancybox.pack.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2
+ (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
3
+ width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
4
+ keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
5
+ (I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
6
+ openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
7
+ isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
8
+ c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
9
+ k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
10
+ b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
11
+ setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
12
+ d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
13
+ a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
14
+ b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
15
+ y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
16
+ if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
17
+ (h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
18
+ {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
19
+ mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
20
+ !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
21
+ "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
22
+ this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
23
+ f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
24
+ e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
25
+ outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
26
+ g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
27
+ "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
28
+ h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
29
+ h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
30
+ "iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
31
+ y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
32
+ !a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
33
+ b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
34
+ a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
35
+ (c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
36
+ f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
37
+ {duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
38
+ b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
39
+ f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
40
+ b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
41
+ p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
42
+ f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
43
+ b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
44
+ e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
45
+ ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
46
+ d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
fancybox/jquery.mousewheel-3.0.4.pack.js DELETED
@@ -1,14 +0,0 @@
1
- /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2
- * Licensed under the MIT License (LICENSE.txt).
3
- *
4
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
- * Thanks to: Seamus Leahy for adding deltaX and deltaY
7
- *
8
- * Version: 3.0.4
9
- *
10
- * Requires: 1.2.2+
11
- */
12
-
13
- (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
14
- f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fancybox/jquery.mousewheel-3.0.6.pack.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
2
+ * Licensed under the MIT License (LICENSE.txt).
3
+ *
4
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
7
+ *
8
+ * Version: 3.0.6
9
+ *
10
+ * Requires: 1.2.2+
11
+ */
12
+ (function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=
13
+ d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
gallery-plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Gallery
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
- Version: 4.1.6
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -25,10 +25,49 @@ License: GPLv2 or later
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
- require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
29
-
30
  if ( ! function_exists( 'add_gllr_admin_menu' ) ) {
31
  function add_gllr_admin_menu() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "images/px.png", __FILE__ ), 1001);
33
  add_submenu_page( 'bws_plugins', __( 'Gallery', 'gallery' ), __( 'Gallery', 'gallery' ), 'manage_options', "gallery-plugin.php", 'gllr_settings_page' );
34
  }
@@ -47,14 +86,15 @@ if ( ! function_exists ( 'gllr_admin_init' ) ) {
47
  function gllr_admin_init() {
48
  global $bws_plugin_info, $gllr_plugin_info;
49
  /* Add variable for bws_menu */
50
- $gllr_plugin_info = get_plugin_data( __FILE__ );
 
51
  if ( ! isset( $bws_plugin_info ) || empty( $bws_plugin_info ) ) {
52
  $bws_plugin_info = array( 'id' => '79', 'version' => $gllr_plugin_info["Version"] );
53
- }
54
- /* Call register settings function */
55
- gllr_settings();
56
  /* Function check if plugin is compatible with current WP version */
57
  gllr_version_check();
 
 
58
  /* add error if templates were not found in the theme directory */
59
  gllr_admin_error();
60
  }
@@ -123,9 +163,7 @@ if ( ! function_exists( 'gllr_settings' ) ) {
123
  if ( ! function_exists ( 'gllr_version_check' ) ) {
124
  function gllr_version_check() {
125
  global $wp_version, $gllr_plugin_info;
126
- if ( ! $gllr_plugin_info )
127
- $gllr_plugin_info = get_plugin_data( __FILE__, false );
128
- $require_wp = "3.0"; /* Wordpress at least requires version */
129
  $plugin = plugin_basename( __FILE__ );
130
  if ( version_compare( $wp_version, $require_wp, "<" ) ) {
131
  if ( is_plugin_active( $plugin ) ) {
@@ -379,7 +417,9 @@ if ( ! function_exists( 'gllr_post_custom_box' ) ) {
379
  echo '<br />' . __( "Alt tag", "gallery" ) . '<br /><input type="text" name="gllr_image_alt_tag[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $alt_tag_key, TRUE ) . '" class="gllr_image_alt_tag" />';
380
  echo '<br />' . __( "URL", "gallery" ) . '<br /><input type="text" name="gllr_link_url[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $link_key, TRUE ).'" class="gllr_link_text" /><br /><span class="small_text">' . __( "(by click on image opens a link in a new window)", "gallery" ) . '</span>';
381
  echo '<a class="gllr_pro_version" href="http://bestwebsoft.com/plugin/gallery-pro/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="' . __( 'This setting is available in Pro version', 'gallery' ) . '"><br />' .
382
- '<div class="gllr_pro_version">' . __( "Open the link", "gallery" ) . '<br/><input disabled type="radio" value="_self" > ' . __( "Current window", "gallery" ) . '<br/><input disabled type="radio" value="_blank" > ' . __( "New window", "gallery" ) . '</div></a>';
 
 
383
  echo '<div class="delete"><a href="javascript:void(0);" onclick="img_delete(' . $page->ID . ');">' . __( "Delete", "gallery" ) . '</a><div/>';
384
  echo '</div></li>';
385
  endforeach; ?>
@@ -784,19 +824,9 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
784
 
785
  /* GO PRO */
786
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
787
- global $wpmu;
788
 
789
  $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
790
- $bstwbsftwppdtplgns_options_defaults = array();
791
- if ( 1 == $wpmu ) {
792
- if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
793
- add_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options_defaults, '', 'yes' );
794
- $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
795
- } else {
796
- if ( !get_option( 'bstwbsftwppdtplgns_options' ) )
797
- add_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options_defaults, '', 'yes' );
798
- $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
799
- }
800
 
801
  if ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) {
802
  if ( '' != $bws_license_key ) {
@@ -847,8 +877,7 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
847
  $error = __( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'gallery' );
848
  }
849
  }
850
- if ( '' == $error ) {
851
- global $wpmu;
852
  $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
853
 
854
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
@@ -919,7 +948,7 @@ if ( ! function_exists( 'gllr_settings_page' ) ) {
919
  <div id="gllr_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e( "Notice:", 'gallery' ); ?></strong> <?php _e( "The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'gallery' ); ?></p></div>
920
  <p><?php _e( "If you would like to add a Single Gallery to your page or post, just copy and paste this shortcode into your post or page:", 'gallery' ); ?> [print_gllr id=Your_gallery_post_id]</p>
921
  <noscript>
922
- <p><?php echo __( 'Please enable JavaScript to use the option to renew images.', 'gallery' ); ?></p>
923
  </noscript>
924
  <table class="form-table">
925
  <tr valign="top">
@@ -1242,9 +1271,10 @@ if ( ! function_exists( 'gllr_plugin_action_links' ) ) {
1242
  function gllr_plugin_action_links( $links, $file ) {
1243
  /* Static so we don't call plugin_basename on every plugin row. */
1244
  static $this_plugin;
1245
- if ( ! $this_plugin ) $this_plugin = plugin_basename( __FILE__ );
 
1246
 
1247
- if ( $file == $this_plugin ){
1248
  $settings_link = '<a href="admin.php?page=gallery-plugin.php">' . __( 'Settings', 'gallery' ) . '</a>';
1249
  array_unshift( $links, $settings_link );
1250
  }
@@ -1312,11 +1342,11 @@ if ( ! function_exists ( 'gllr_admin_head' ) ) {
1312
  function gllr_admin_head() {
1313
  global $wp_version;
1314
  if ( 3.8 > $wp_version )
1315
- wp_enqueue_style( 'gllrStylesheet', plugins_url( 'css/style_wp_before_3.8.css', __FILE__ ) );
1316
  else
1317
- wp_enqueue_style( 'gllrStylesheet', plugins_url( 'css/stylesheet.css', __FILE__ ) );
1318
 
1319
- wp_enqueue_style( 'gllrFileuploaderCss', plugins_url( 'upload/fileuploader.css', __FILE__ ) );
1320
 
1321
  wp_enqueue_script( 'jquery' );
1322
  if ( 3.5 > $wp_version ) {
@@ -1324,38 +1354,19 @@ if ( ! function_exists ( 'gllr_admin_head' ) ) {
1324
  wp_enqueue_script( 'farbtastic' );
1325
  }
1326
  wp_enqueue_script( 'jquery-ui-sortable' );
1327
- wp_enqueue_script( 'gllrFileuploaderJs', plugins_url( 'upload/fileuploader.js', __FILE__ ), array( 'jquery' ) );
1328
 
1329
  if ( isset( $_GET['page'] ) && "gallery-plugin.php" == $_GET['page'] )
1330
- wp_enqueue_script( 'gllrScript', plugins_url( 'js/script.js', __FILE__ ) );
1331
  }
1332
  }
1333
 
1334
  if ( ! function_exists ( 'gllr_wp_head' ) ) {
1335
  function gllr_wp_head() {
1336
- wp_enqueue_style( 'gllrStylesheet', plugins_url( 'css/stylesheet.css', __FILE__ ) );
1337
- wp_enqueue_style( 'gllrFancyboxStylesheet', plugins_url( 'fancybox/jquery.fancybox-1.3.4.css', __FILE__ ) );
1338
- wp_enqueue_script( 'jquery' );
1339
- wp_enqueue_script( 'gllrFancyboxMousewheelJs', plugins_url( 'fancybox/jquery.mousewheel-3.0.4.pack.js', __FILE__ ), array( 'jquery' ) );
1340
- wp_enqueue_script( 'gllrFancyboxJs', plugins_url( 'fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__ ), array( 'jquery' ) );
1341
- }
1342
- }
1343
-
1344
- if ( ! function_exists( 'gllr_add_for_ios' ) ) {
1345
- function gllr_add_for_ios() { ?>
1346
- <!-- Start ios -->
1347
- <script type="text/javascript">
1348
- (function($){
1349
- $(document).ready( function() {
1350
- $( '#fancybox-overlay' ).css({
1351
- 'width' : $(document).width()
1352
- });
1353
- });
1354
- })(jQuery);
1355
- </script>
1356
- <!-- End ios -->
1357
- <?php
1358
- }
1359
  }
1360
 
1361
  if ( ! function_exists ( 'gllr_shortcode' ) ) {
@@ -1480,27 +1491,29 @@ if ( ! function_exists ( 'gllr_shortcode' ) ) {
1480
  <?php } else { ?>
1481
  <div class="return_link"><a href="<?php echo $gllr_options["return_link_url"]; ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1482
  <?php }
1483
- }
1484
- ?>
1485
  <script type="text/javascript">
1486
- (function($) {
1487
- $(document).ready( function() {
1488
- $( "a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]" ).fancybox( {
1489
- 'transitionIn' : 'elastic',
1490
- 'transitionOut' : 'elastic',
1491
- 'titlePosition' : 'inside',
1492
- 'speedIn' : 500,
1493
- 'speedOut' : 300,
1494
- 'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {
1495
- return '<div id="fancybox-title-inside">' + ( title.length ? '<span id="bws_gallery_image_title">' + title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( currentOpts.orig ).attr( 'rel' ) + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>';
1496
- }<?php if ( 1 == $gllr_options['start_slideshow'] ) { ?>,
1497
- 'onComplete': function() {
1498
- clearTimeout( jQuery.fancybox.slider );
1499
- jQuery.fancybox.slider = setTimeout( "jQuery.fancybox.next()",<?php echo empty( $gllr_options['slideshow_interval'] )? 2000 : $gllr_options['slideshow_interval'] ; ?> );
1500
- }<?php } ?>
 
 
 
 
1501
  });
1502
- });
1503
- })(jQuery);
1504
  </script>
1505
  <?php }
1506
  $gllr_output = ob_get_clean();
@@ -1909,8 +1922,9 @@ if ( ! function_exists ( 'gllr_image_resize_dimensions' ) ) {
1909
 
1910
  if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
1911
  function gllr_plugin_banner() {
1912
- global $hook_suffix, $gllr_plugin_info;
1913
- if ( 'plugins.php' == $hook_suffix ) {
 
1914
  $banner_array = array(
1915
  array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),
1916
  array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),
@@ -1926,39 +1940,50 @@ if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
1926
  array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
1927
  );
1928
  if ( ! $gllr_plugin_info )
1929
- $gllr_plugin_info = get_plugin_data( __FILE__ );
 
1930
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
1931
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
 
1932
  $active_plugins = get_option( 'active_plugins' );
1933
  $all_plugins = get_plugins();
1934
  $this_banner = 'gllr_hide_banner_on_plugin_page';
1935
  foreach ( $banner_array as $key => $value ) {
1936
  if ( $this_banner == $value[0] ) {
1937
  global $wp_version;
1938
- echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
1939
- <script type="text/javascript" src="' . plugins_url( 'js/c_o_o_k_i_e.js', __FILE__ ) . '"></script>
1940
- <script type="text/javascript">
 
 
1941
  (function($) {
1942
  $(document).ready( function() {
1943
  var hide_message = $.cookie( "gllr_hide_banner_on_plugin_page" );
1944
  if ( hide_message == "true" ) {
1945
  $( ".gllr_message" ).css( "display", "none" );
1946
- };
 
 
1947
  $( ".gllr_close_icon" ).click( function() {
1948
  $( ".gllr_message" ).css( "display", "none" );
1949
  $.cookie( "gllr_hide_banner_on_plugin_page", "true", { expires: 32 } );
1950
  });
1951
  });
1952
  })(jQuery);
1953
- </script>
1954
- <div class="gllr_message bws_banner_on_plugin_page">
 
1955
  <img class="close_icon gllr_close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
1956
- <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/gallery-pro/?k=01a04166048e9416955ce1cbe9d5ca16&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '">' . __( 'Learn More', 'gallery' ) . '</a>
 
 
1957
  <div class="text">' .
1958
  __( 'It’s time to upgrade your <strong>Gallery plugin</strong> to <strong>PRO</strong> version!', 'gallery' ) . '<br />
1959
  <span>' . __( 'Extend standard plugin functionality with new great options.', 'gallery' ) . '</span>
1960
- </div>
1961
- <img class="icon" title="" src="' . plugins_url( 'images/banner.png', __FILE__ ) . '" alt=""/>
 
 
1962
  </div>
1963
  </div>';
1964
  break;
@@ -2000,7 +2025,6 @@ add_action( 'manage_gallery_posts_custom_column', 'gllr_custom_columns', 10, 2 )
2000
  add_action( 'admin_head', 'gllr_add_admin_script' );
2001
  add_action( 'admin_enqueue_scripts', 'gllr_admin_head' );
2002
  add_action( 'wp_enqueue_scripts', 'gllr_wp_head' );
2003
- add_action( 'wp_head', 'gllr_add_for_ios' );
2004
 
2005
  add_shortcode( 'print_gllr', 'gllr_shortcode' );
2006
  add_filter( 'widget_text', 'do_shortcode' );
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: This plugin allows you to implement gallery page into web site.
6
  Author: BestWebSoft
7
+ Version: 4.1.7
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
 
 
28
  if ( ! function_exists( 'add_gllr_admin_menu' ) ) {
29
  function add_gllr_admin_menu() {
30
+ global $bstwbsftwppdtplgns_options, $wpmu, $bstwbsftwppdtplgns_added_menu;
31
+ $bws_menu_version = '1.2.3';
32
+ $base = plugin_basename( __FILE__ );
33
+
34
+ if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
35
+ if ( 1 == $wpmu ) {
36
+ if ( ! get_site_option( 'bstwbsftwppdtplgns_options' ) )
37
+ add_site_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
38
+ $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
39
+ } else {
40
+ if ( ! get_option( 'bstwbsftwppdtplgns_options' ) )
41
+ add_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
42
+ $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
43
+ }
44
+ }
45
+
46
+ if ( isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
47
+ $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
48
+ unset( $bstwbsftwppdtplgns_options['bws_menu_version'] );
49
+ update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
50
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
51
+ } else if ( ! isset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] ) || $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] < $bws_menu_version ) {
52
+ $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
53
+ update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
54
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
55
+ } else if ( ! isset( $bstwbsftwppdtplgns_added_menu ) ) {
56
+ $plugin_with_newer_menu = $base;
57
+ foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version'] as $key => $value ) {
58
+ if ( $bws_menu_version < $value && is_plugin_active( $base ) ) {
59
+ $plugin_with_newer_menu = $key;
60
+ }
61
+ }
62
+ $plugin_with_newer_menu = explode( '/', $plugin_with_newer_menu );
63
+ $wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? basename( WP_CONTENT_DIR ) : 'wp-content';
64
+ if ( file_exists( ABSPATH . $wp_content_dir . '/plugins/' . $plugin_with_newer_menu[0] . '/bws_menu/bws_menu.php' ) )
65
+ require_once( ABSPATH . $wp_content_dir . '/plugins/' . $plugin_with_newer_menu[0] . '/bws_menu/bws_menu.php' );
66
+ else
67
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
68
+ $bstwbsftwppdtplgns_added_menu = true;
69
+ }
70
+
71
  add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "images/px.png", __FILE__ ), 1001);
72
  add_submenu_page( 'bws_plugins', __( 'Gallery', 'gallery' ), __( 'Gallery', 'gallery' ), 'manage_options', "gallery-plugin.php", 'gllr_settings_page' );
73
  }
86
  function gllr_admin_init() {
87
  global $bws_plugin_info, $gllr_plugin_info;
88
  /* Add variable for bws_menu */
89
+ $gllr_plugin_info = get_plugin_data( __FILE__ );
90
+
91
  if ( ! isset( $bws_plugin_info ) || empty( $bws_plugin_info ) ) {
92
  $bws_plugin_info = array( 'id' => '79', 'version' => $gllr_plugin_info["Version"] );
93
+ }
 
 
94
  /* Function check if plugin is compatible with current WP version */
95
  gllr_version_check();
96
+ /* Call register settings function */
97
+ gllr_settings();
98
  /* add error if templates were not found in the theme directory */
99
  gllr_admin_error();
100
  }
163
  if ( ! function_exists ( 'gllr_version_check' ) ) {
164
  function gllr_version_check() {
165
  global $wp_version, $gllr_plugin_info;
166
+ $require_wp = "3.2"; /* Wordpress at least requires version */
 
 
167
  $plugin = plugin_basename( __FILE__ );
168
  if ( version_compare( $wp_version, $require_wp, "<" ) ) {
169
  if ( is_plugin_active( $plugin ) ) {
417
  echo '<br />' . __( "Alt tag", "gallery" ) . '<br /><input type="text" name="gllr_image_alt_tag[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $alt_tag_key, TRUE ) . '" class="gllr_image_alt_tag" />';
418
  echo '<br />' . __( "URL", "gallery" ) . '<br /><input type="text" name="gllr_link_url[' . $page->ID . ']" value="' . get_post_meta( $page->ID, $link_key, TRUE ).'" class="gllr_link_text" /><br /><span class="small_text">' . __( "(by click on image opens a link in a new window)", "gallery" ) . '</span>';
419
  echo '<a class="gllr_pro_version" href="http://bestwebsoft.com/plugin/gallery-pro/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="' . __( 'This setting is available in Pro version', 'gallery' ) . '"><br />' .
420
+ '<div class="gllr_pro_version">' . __( "Open the URL", "gallery" ) . '<br/><input disabled type="radio" value="_self" > ' . __( "Current window", "gallery" ) . '<br/><input disabled type="radio" value="_blank" > ' . __( "New window", "gallery" ) . '<br/>' .
421
+ __( "Lightbox button URL", "gallery" ) . '<br><input class="gllrprfssnl_link_text" disabled type="text" value="" name="gllrprfssnl_lightbox_button_url"><br/>' .
422
+ __( "Description", "gallery" ) . '<br><input class="gllrprfssnl_link_text" disabled type="text" value="" name="gllrprfssnl_description"></div></a>';
423
  echo '<div class="delete"><a href="javascript:void(0);" onclick="img_delete(' . $page->ID . ');">' . __( "Delete", "gallery" ) . '</a><div/>';
424
  echo '</div></li>';
425
  endforeach; ?>
824
 
825
  /* GO PRO */
826
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
827
+ global $wpmu, $bstwbsftwppdtplgns_options;
828
 
829
  $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
 
 
 
 
 
 
 
 
 
 
830
 
831
  if ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) {
832
  if ( '' != $bws_license_key ) {
877
  $error = __( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'gallery' );
878
  }
879
  }
880
+ if ( '' == $error ) {
 
881
  $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
882
 
883
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
948
  <div id="gllr_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e( "Notice:", 'gallery' ); ?></strong> <?php _e( "The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'gallery' ); ?></p></div>
949
  <p><?php _e( "If you would like to add a Single Gallery to your page or post, just copy and paste this shortcode into your post or page:", 'gallery' ); ?> [print_gllr id=Your_gallery_post_id]</p>
950
  <noscript>
951
+ <p><?php _e( 'Please enable JavaScript to use the option to renew images.', 'gallery' ); ?></p>
952
  </noscript>
953
  <table class="form-table">
954
  <tr valign="top">
1271
  function gllr_plugin_action_links( $links, $file ) {
1272
  /* Static so we don't call plugin_basename on every plugin row. */
1273
  static $this_plugin;
1274
+ if ( ! $this_plugin )
1275
+ $this_plugin = plugin_basename( __FILE__ );
1276
 
1277
+ if ( $file == $this_plugin ) {
1278
  $settings_link = '<a href="admin.php?page=gallery-plugin.php">' . __( 'Settings', 'gallery' ) . '</a>';
1279
  array_unshift( $links, $settings_link );
1280
  }
1342
  function gllr_admin_head() {
1343
  global $wp_version;
1344
  if ( 3.8 > $wp_version )
1345
+ wp_enqueue_style( 'gllr_stylesheet', plugins_url( 'css/style_wp_before_3.8.css', __FILE__ ) );
1346
  else
1347
+ wp_enqueue_style( 'gllr_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
1348
 
1349
+ wp_enqueue_style( 'gllr_FileuploaderCss', plugins_url( 'upload/fileuploader.css', __FILE__ ) );
1350
 
1351
  wp_enqueue_script( 'jquery' );
1352
  if ( 3.5 > $wp_version ) {
1354
  wp_enqueue_script( 'farbtastic' );
1355
  }
1356
  wp_enqueue_script( 'jquery-ui-sortable' );
1357
+ wp_enqueue_script( 'gllr_FileuploaderJs', plugins_url( 'upload/fileuploader.js', __FILE__ ), array( 'jquery' ) );
1358
 
1359
  if ( isset( $_GET['page'] ) && "gallery-plugin.php" == $_GET['page'] )
1360
+ wp_enqueue_script( 'gllr_script', plugins_url( 'js/script.js', __FILE__ ) );
1361
  }
1362
  }
1363
 
1364
  if ( ! function_exists ( 'gllr_wp_head' ) ) {
1365
  function gllr_wp_head() {
1366
+ wp_enqueue_style( 'gllr_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
1367
+ wp_enqueue_style( 'gllr_fancybox_stylesheet', plugins_url( 'fancybox/jquery.fancybox.css', __FILE__ ) );
1368
+ wp_enqueue_script( 'gllr_fancybox_mousewheel_js', plugins_url( 'fancybox/jquery.mousewheel-3.0.6.pack.js', __FILE__ ), array( 'jquery' ) );
1369
+ wp_enqueue_script( 'gllr_fancybox_js', plugins_url( 'fancybox/jquery.fancybox.pack.js', __FILE__ ), array( 'jquery' ) ); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1370
  }
1371
 
1372
  if ( ! function_exists ( 'gllr_shortcode' ) ) {
1491
  <?php } else { ?>
1492
  <div class="return_link"><a href="<?php echo $gllr_options["return_link_url"]; ?>"><?php echo $gllr_options['return_link_text']; ?></a></div>
1493
  <?php }
1494
+ } ?>
 
1495
  <script type="text/javascript">
1496
+ (function($) {
1497
+ $(document).ready( function() {
1498
+ $( "a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]" ).fancybox( {
1499
+ openSpeed : 500,
1500
+ closeSpeed : 300,
1501
+ helpers : {
1502
+ title : { type : 'inside' }
1503
+ },
1504
+ prevEffect : 'fade',
1505
+ nextEffect : 'fade',
1506
+ openEffect : 'elastic',
1507
+ closeEffect : 'elastic',
1508
+ beforeLoad: function() {
1509
+ this.title = '<div id="fancybox-title-inside">' + ( this.title.length ? '<span id="bws_gallery_image_title">' + this.title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( this.index + 1 ) + ' / ' + this.group.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( this.element ).find('img').attr( 'rel' ) + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>'
1510
+ }<?php if ( 1 == $gllr_options['start_slideshow'] ) { ?>,
1511
+ autoPlay : true,
1512
+ playSpeed : <?php echo empty( $gllr_options['slideshow_interval'] )? 2000 : $gllr_options['slideshow_interval'] ; ?>
1513
+ <?php } ?>
1514
+ });
1515
  });
1516
+ })(jQuery);
 
1517
  </script>
1518
  <?php }
1519
  $gllr_output = ob_get_clean();
1922
 
1923
  if ( ! function_exists ( 'gllr_plugin_banner' ) ) {
1924
  function gllr_plugin_banner() {
1925
+ global $hook_suffix;
1926
+ if ( 'plugins.php' == $hook_suffix ) {
1927
+ global $bstwbsftwppdtplgns_cookie_add, $gllr_plugin_info;
1928
  $banner_array = array(
1929
  array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),
1930
  array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),
1940
  array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
1941
  );
1942
  if ( ! $gllr_plugin_info )
1943
+ $gllr_plugin_info = get_plugin_data( __FILE__ );
1944
+
1945
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
1946
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
1947
+
1948
  $active_plugins = get_option( 'active_plugins' );
1949
  $all_plugins = get_plugins();
1950
  $this_banner = 'gllr_hide_banner_on_plugin_page';
1951
  foreach ( $banner_array as $key => $value ) {
1952
  if ( $this_banner == $value[0] ) {
1953
  global $wp_version;
1954
+ if ( ! isset( $bstwbsftwppdtplgns_cookie_add ) ) {
1955
+ echo '<script type="text/javascript" src="' . plugins_url( 'js/c_o_o_k_i_e.js', __FILE__ ) . '"></script>';
1956
+ $bstwbsftwppdtplgns_cookie_add = true;
1957
+ }
1958
+ echo '<script type="text/javascript">
1959
  (function($) {
1960
  $(document).ready( function() {
1961
  var hide_message = $.cookie( "gllr_hide_banner_on_plugin_page" );
1962
  if ( hide_message == "true" ) {
1963
  $( ".gllr_message" ).css( "display", "none" );
1964
+ } else {
1965
+ $( ".gllr_message" ).css( "display", "block" );
1966
+ }
1967
  $( ".gllr_close_icon" ).click( function() {
1968
  $( ".gllr_message" ).css( "display", "none" );
1969
  $.cookie( "gllr_hide_banner_on_plugin_page", "true", { expires: 32 } );
1970
  });
1971
  });
1972
  })(jQuery);
1973
+ </script>
1974
+ <div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
1975
+ <div class="gllr_message bws_banner_on_plugin_page" style="display: none;">
1976
  <img class="close_icon gllr_close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
1977
+ <div class="button_div">
1978
+ <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/gallery-pro/?k=01a04166048e9416955ce1cbe9d5ca16&pn=79&v=' . $gllr_plugin_info["Version"] . '&wp_v=' . $wp_version . '">' . __( 'Learn More', 'gallery' ) . '</a>
1979
+ </div>
1980
  <div class="text">' .
1981
  __( 'It’s time to upgrade your <strong>Gallery plugin</strong> to <strong>PRO</strong> version!', 'gallery' ) . '<br />
1982
  <span>' . __( 'Extend standard plugin functionality with new great options.', 'gallery' ) . '</span>
1983
+ </div>
1984
+ <div class="icon">
1985
+ <img title="" src="' . plugins_url( 'images/banner.png', __FILE__ ) . '" alt=""/>
1986
+ </div>
1987
  </div>
1988
  </div>';
1989
  break;
2025
  add_action( 'admin_head', 'gllr_add_admin_script' );
2026
  add_action( 'admin_enqueue_scripts', 'gllr_admin_head' );
2027
  add_action( 'wp_enqueue_scripts', 'gllr_wp_head' );
 
2028
 
2029
  add_shortcode( 'print_gllr', 'gllr_shortcode' );
2030
  add_filter( 'widget_text', 'do_shortcode' );
images/Thumbs.db ADDED
Binary file
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: bestwebsoft
3
  Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13
4
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery
5
- Requires at least: 3.0
6
  Tested up to: 3.8.1
7
- Stable tag: 4.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -160,7 +160,7 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
160
  1. the link to the page where the problem occurs
161
  2. the name of the plugin and its version. If you are using a pro version - your order number.
162
  3. the version of your WordPress installation
163
- 4. copy and paste into the message your system status report. Please read more here: <a href="http://bestwebsoft.com/wp-content/uploads/manual/wp_plugin/general/System_Status.pdf" target="_blank">System_Status.pdf</a>
164
 
165
  == Screenshots ==
166
 
@@ -172,6 +172,10 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
172
 
173
  == Changelog ==
174
 
 
 
 
 
175
  = V4.1.6 - 05.03.2014 =
176
  * Budfix : Plugin optimization is done.
177
  * Budfix : Gallery Template is updated.
@@ -422,6 +426,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
422
 
423
  == Upgrade Notice ==
424
 
 
 
 
425
  = V4.1.6 =
426
  Plugin optimization is done. Gallery Template is updated. The French language file is updated. Spanish language file are added to the plugin.
427
 
2
  Contributors: bestwebsoft
3
  Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13
4
  Tags: gallery, image, gallery image, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery
5
+ Requires at least: 3.2
6
  Tested up to: 3.8.1
7
+ Stable tag: 4.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
160
  1. the link to the page where the problem occurs
161
  2. the name of the plugin and its version. If you are using a pro version - your order number.
162
  3. the version of your WordPress installation
163
+ 4. copy and paste into the message your system status report. Please read more here: <a href="https://docs.google.com/document/d/1Wi2X8RdRGXk9kMszQy1xItJrpN0ncXgioH935MaBKtc/edit" target="_blank">System_Status.pdf</a>
164
 
165
  == Screenshots ==
166
 
172
 
173
  == Changelog ==
174
 
175
+ = V4.1.7 - 31.03.2014 =
176
+ * Update : Fancybox is updated.
177
+ * Budfix : We fixed the bug of navigation when Gallery Template is a static front page.
178
+
179
  = V4.1.6 - 05.03.2014 =
180
  * Budfix : Plugin optimization is done.
181
  * Budfix : Gallery Template is updated.
426
 
427
  == Upgrade Notice ==
428
 
429
+ = V4.1.7 =
430
+ Fancybox is updated. We fixed the bug of navigation when Gallery Template is a static front page.
431
+
432
  = V4.1.6 =
433
  Plugin optimization is done. Gallery Template is updated. The French language file is updated. Spanish language file are added to the plugin.
434
 
template/gallery-single-template.php CHANGED
@@ -9,14 +9,14 @@
9
  'name' => $wp_query->query_vars['name'],
10
  'posts_per_page' => 1
11
  );
12
- $second_query = new WP_Query( $args );
13
  $gllr_options = get_option( 'gllr_options' );
14
  $gllr_download_link_title = addslashes( __( 'Download high resolution image', 'gallery' ) );
15
  if ( $second_query->have_posts() ) : while ( $second_query->have_posts() ) : $second_query->the_post(); ?>
16
  <h1 class="home_page_title entry-header"><?php the_title(); ?></h1>
17
  <div class="gallery_box_single entry-content">
18
  <?php the_content();
19
- $posts = get_posts(array(
20
  "showposts" => -1,
21
  "what_to_show" => "posts",
22
  "post_status" => "inherit",
@@ -93,19 +93,22 @@
93
  <script type="text/javascript">
94
  (function($){
95
  $(document).ready(function(){
96
- $("a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]").fancybox({
97
- 'transitionIn' : 'elastic',
98
- 'transitionOut' : 'elastic',
99
- 'titlePosition' : 'inside',
100
- 'speedIn' : 500,
101
- 'speedOut' : 300,
102
- 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
103
- return '<div id="fancybox-title-inside">' + ( title.length ? '<span id="bws_gallery_image_title">' + title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( currentOpts.orig ).attr('rel') + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>';
104
- }<?php if ( $gllr_options['start_slideshow'] == 1 ) { ?>,
105
- 'onComplete': function() {
106
- clearTimeout( jQuery.fancybox.slider );
107
- jQuery.fancybox.slider = setTimeout("jQuery.fancybox.next()",<?php echo empty( $gllr_options['slideshow_interval'] )? 2000 : $gllr_options['slideshow_interval'] ; ?>);
108
- }<?php } ?>
 
 
 
109
  });
110
  });
111
  })(jQuery);
9
  'name' => $wp_query->query_vars['name'],
10
  'posts_per_page' => 1
11
  );
12
+ $second_query = new WP_Query( $args );
13
  $gllr_options = get_option( 'gllr_options' );
14
  $gllr_download_link_title = addslashes( __( 'Download high resolution image', 'gallery' ) );
15
  if ( $second_query->have_posts() ) : while ( $second_query->have_posts() ) : $second_query->the_post(); ?>
16
  <h1 class="home_page_title entry-header"><?php the_title(); ?></h1>
17
  <div class="gallery_box_single entry-content">
18
  <?php the_content();
19
+ $posts = get_posts( array(
20
  "showposts" => -1,
21
  "what_to_show" => "posts",
22
  "post_status" => "inherit",
93
  <script type="text/javascript">
94
  (function($){
95
  $(document).ready(function(){
96
+ $( "a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]" ).fancybox( {
97
+ openSpeed : 500,
98
+ closeSpeed : 300,
99
+ helpers : {
100
+ title : { type : 'inside' }
101
+ },
102
+ prevEffect : 'fade',
103
+ nextEffect : 'fade',
104
+ openEffect : 'elastic',
105
+ closeEffect : 'elastic',
106
+ beforeLoad: function() {
107
+ this.title = '<div id="fancybox-title-inside">' + ( this.title.length ? '<span id="bws_gallery_image_title">' + this.title + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery"); ?> ' + ( this.index + 1 ) + ' / ' + this.group.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + $( this.element ).find('img').attr( 'rel' ) + '" target="_blank"><?php echo $gllr_download_link_title; ?> </a><?php } ?>'
108
+ }<?php if ( 1 == $gllr_options['start_slideshow'] ) { ?>,
109
+ autoPlay : true,
110
+ playSpeed : <?php echo empty( $gllr_options['slideshow_interval'] )? 2000 : $gllr_options['slideshow_interval'] ; ?>
111
+ <?php } ?>
112
  });
113
  });
114
  })(jQuery);
template/gallery-template.php CHANGED
@@ -3,7 +3,6 @@
3
  Template Name: Gallery Template
4
  */
5
  ?>
6
-
7
  <?php get_header(); ?>
8
  <div id="container" class="site-content">
9
  <div id="content" class="hentry">
@@ -13,16 +12,21 @@ Template Name: Gallery Template
13
  <div class="gallery_box entry-content">
14
  <ul>
15
  <?php global $post, $wpdb, $wp_query, $request;
16
- $paged = $wp_query->query_vars["paged"];
 
 
 
 
 
 
 
 
17
  $permalink = get_permalink();
18
  $gllr_options = get_option( 'gllr_options' );
19
  $count = 0;
20
  $per_page = $showitems = get_option( 'posts_per_page' );
21
  $count_all_albums = $wpdb->get_var( "SELECT COUNT(*) FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'gallery' AND (wp_posts.post_status = 'publish')" );
22
 
23
- if ( $paged == 0 )
24
- $paged = 1;
25
-
26
  if ( substr( $permalink, strlen( $permalink ) -1 ) != "/" ) {
27
  if ( strpos( $permalink, "?" ) !== false ) {
28
  $permalink = substr( $permalink, 0, strpos( $permalink, "?" ) -1 )."/";
@@ -50,7 +54,7 @@ Template Name: Gallery Template
50
  $attachments = get_post_thumbnail_id( $post->ID );
51
  if ( empty ( $attachments ) ) {
52
  $attachments = get_children( 'post_parent='.$post->ID.'&post_type=attachment&post_mime_type=image&numberposts=1' );
53
- $id = key($attachments);
54
  $image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
55
  } else {
56
  $image_attributes = wp_get_attachment_image_src( $attachments, 'album-thumb' );
3
  Template Name: Gallery Template
4
  */
5
  ?>
 
6
  <?php get_header(); ?>
7
  <div id="container" class="site-content">
8
  <div id="content" class="hentry">
12
  <div class="gallery_box entry-content">
13
  <ul>
14
  <?php global $post, $wpdb, $wp_query, $request;
15
+
16
+ if ( get_query_var( 'paged' ) ) {
17
+ $paged = get_query_var( 'paged' );
18
+ } elseif ( get_query_var( 'page' ) ) {
19
+ $paged = get_query_var( 'page' );
20
+ } else {
21
+ $paged = 1;
22
+ }
23
+
24
  $permalink = get_permalink();
25
  $gllr_options = get_option( 'gllr_options' );
26
  $count = 0;
27
  $per_page = $showitems = get_option( 'posts_per_page' );
28
  $count_all_albums = $wpdb->get_var( "SELECT COUNT(*) FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'gallery' AND (wp_posts.post_status = 'publish')" );
29
 
 
 
 
30
  if ( substr( $permalink, strlen( $permalink ) -1 ) != "/" ) {
31
  if ( strpos( $permalink, "?" ) !== false ) {
32
  $permalink = substr( $permalink, 0, strpos( $permalink, "?" ) -1 )."/";
54
  $attachments = get_post_thumbnail_id( $post->ID );
55
  if ( empty ( $attachments ) ) {
56
  $attachments = get_children( 'post_parent='.$post->ID.'&post_type=attachment&post_mime_type=image&numberposts=1' );
57
+ $id = key( $attachments );
58
  $image_attributes = wp_get_attachment_image_src( $id, 'album-thumb' );
59
  } else {
60
  $image_attributes = wp_get_attachment_image_src( $attachments, 'album-thumb' );