Slide Anything – Responsive Content / HTML Slider and Carousel - Version 2.3.20

Version Description

  • Added a new feature 'Slide Goto Links', which allows the creation of links (or buttons) that when clicked will go to a specific slide within your slider.

=

Download this release

Release Info

Developer simonpedge
Plugin Icon 128x128 Slide Anything – Responsive Content / HTML Slider and Carousel
Version 2.3.20
Comparing to
See all releases

Code changes from version 2.3.19 to 2.3.20

Files changed (65) hide show
  1. css/slide-anything-admin.css +40 -0
  2. owl-carousel/sa-owl-theme.css +1 -0
  3. php/slide-anything-admin.php +15 -0
  4. php/slide-anything-frontend.php +10 -0
  5. readme.txt +7 -1
  6. slide-anything.php +1 -1
  7. trunk/css/admin-user-interface.min.css +7 -0
  8. trunk/css/slide-anything-admin.css +1938 -0
  9. trunk/css/tinymce_style.css +15 -0
  10. trunk/images/bg_placeholder.png +0 -0
  11. trunk/images/black_icon_next.png +0 -0
  12. trunk/images/black_icon_prev.png +0 -0
  13. trunk/images/black_lightbox_video.png +0 -0
  14. trunk/images/black_lightbox_zoom.png +0 -0
  15. trunk/images/black_slide_link.png +0 -0
  16. trunk/images/icon_copy.png +0 -0
  17. trunk/images/icon_info.png +0 -0
  18. trunk/images/icon_next.png +0 -0
  19. trunk/images/icon_prev.png +0 -0
  20. trunk/images/image_placeholder.jpg +0 -0
  21. trunk/images/image_placeholder_popup.jpg +0 -0
  22. trunk/images/lightbox_video.png +0 -0
  23. trunk/images/lightbox_zoom.png +0 -0
  24. trunk/images/padding_bottom.png +0 -0
  25. trunk/images/padding_left.png +0 -0
  26. trunk/images/padding_left_right.png +0 -0
  27. trunk/images/padding_right.png +0 -0
  28. trunk/images/padding_top.png +0 -0
  29. trunk/images/padding_top_bottom.png +0 -0
  30. trunk/images/sample_logo1.png +0 -0
  31. trunk/images/sample_logo2.png +0 -0
  32. trunk/images/sample_logo3.png +0 -0
  33. trunk/images/sample_logo4.png +0 -0
  34. trunk/images/sample_logo5.png +0 -0
  35. trunk/images/sample_logo6.png +0 -0
  36. trunk/images/sample_logo7.png +0 -0
  37. trunk/images/sample_logo8.png +0 -0
  38. trunk/images/slide_any_post_logo.png +0 -0
  39. trunk/images/slide_anything_pro_product_image.png +0 -0
  40. trunk/images/slide_link.png +0 -0
  41. trunk/images/ui-icons_444444_256x240.png +0 -0
  42. trunk/images/ui-icons_555555_256x240.png +0 -0
  43. trunk/images/ui-icons_777620_256x240.png +0 -0
  44. trunk/images/ui-icons_777777_256x240.png +0 -0
  45. trunk/images/ui-icons_cc0000_256x240.png +0 -0
  46. trunk/images/ui-icons_ffffff_256x240.png +0 -0
  47. trunk/images/video_placeholder.jpg +0 -0
  48. trunk/images/video_placeholder_admin.jpg +0 -0
  49. trunk/js/add_tinymce_button.js +36 -0
  50. trunk/js/slide-anything-admin.js +1299 -0
  51. trunk/magnific-popup/jquery.magnific-popup.min.js +4 -0
  52. trunk/magnific-popup/magnific-popup.css +346 -0
  53. trunk/owl-carousel/animate.min.css +7 -0
  54. trunk/owl-carousel/owl.carousel.css +189 -0
  55. trunk/owl-carousel/owl.carousel.min.js +7 -0
  56. trunk/owl-carousel/owl.carousel2.thumbs.min.js +2 -0
  57. trunk/owl-carousel/owl.video.play.png +0 -0
  58. trunk/owl-carousel/sa-owl-theme.css +383 -0
  59. trunk/php/single-page.php +22 -0
  60. trunk/php/slide-anything-admin.php +3188 -0
  61. trunk/php/slide-anything-frontend.php +1237 -0
  62. trunk/readme.txt +676 -0
  63. trunk/slide-anything.php +43 -0
  64. trunk/spectrum/spectrum.css +507 -0
  65. trunk/spectrum/spectrum.js +2323 -0
css/slide-anything-admin.css CHANGED
@@ -690,6 +690,46 @@ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important
690
  .html_popup_wrapper .slide_popup_settings_line strong { display:none; }
691
  }
692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
 
694
 
695
  /* ### SLIDE BUTTONS (DELETE SLIDE, DUPLICATE SLIDE) ### */
690
  .html_popup_wrapper .slide_popup_settings_line strong { display:none; }
691
  }
692
 
693
+ /* ##### METABOX 'Slides' - TAB 4 (Slide Goto Link) ##### */
694
+ .slide_goto_link_content p {
695
+ font-weight:400;
696
+ font-size:14px;
697
+ line-height:22px;
698
+ color:#303030;
699
+ padding-top:10px;
700
+ }
701
+ .slide_goto_link_content p:first-child {
702
+ padding-top:0px;
703
+ font-size:16px;
704
+ line-height:24px;
705
+ }
706
+ .slide_goto_link_content p strong {
707
+ font-weight:700;
708
+ }
709
+ .slide_goto_link_content p a {
710
+ color:#007fff;
711
+ text-decoration:none;
712
+ transition:all .3s ease-in-out;
713
+ -webkit-transition:all .3s ease-in-out;
714
+ -moz-transition:all .3s ease-in-out;
715
+ -o-transition:all .3s ease-in-out;
716
+ }
717
+ .slide_goto_link_content p a:hover {
718
+ color:#000000;
719
+ }
720
+ .slide_goto_link_content .slide_goto_class {
721
+ margin:7px 0px 10px 10px;
722
+ }
723
+ .slide_goto_link_content .slide_goto_class span {
724
+ display:inline-block;
725
+ padding:7px 12px;
726
+ background-color:#f0f0f0;
727
+ font-size:14px;
728
+ line-height:20px;
729
+ color: firebrick;
730
+ border-radius:5px;
731
+ }
732
+
733
 
734
 
735
  /* ### SLIDE BUTTONS (DELETE SLIDE, DUPLICATE SLIDE) ### */
owl-carousel/sa-owl-theme.css CHANGED
@@ -295,6 +295,7 @@
295
  position:absolute;
296
  top:50%;
297
  transform:translate(0px,-50%);
 
298
  }
299
 
300
  /* THUMBNAIL PAGINATION (SA PRO) */
295
  position:absolute;
296
  top:50%;
297
  transform:translate(0px,-50%);
298
+ width:100%;
299
  }
300
 
301
  /* THUMBNAIL PAGINATION (SA PRO) */
php/slide-anything-admin.php CHANGED
@@ -875,6 +875,7 @@ function cpt_slider_slides_content($post) {
875
  echo "<li><a href='#slide".$tabs_num."_background_tab'>Slide Background</a></li>\n";
876
  echo "<li><a href='#slide".$tabs_num."_link_tab'>Slide Link</a></li>\n";
877
  echo "<li><a href='#slide".$tabs_num."_popup_tab'>Slide Popup</a></li>\n";
 
878
  echo "</ul>\n";
879
 
880
  // ####### SLIDE TAB 1 - SLIDE BACKGROUND #######
@@ -1372,6 +1373,20 @@ function cpt_slider_slides_content($post) {
1372
  echo "</div>\n";
1373
  }
1374
  echo "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1375
 
1376
  // ############################
1377
  // ##### SLIDE TABS - END #####
875
  echo "<li><a href='#slide".$tabs_num."_background_tab'>Slide Background</a></li>\n";
876
  echo "<li><a href='#slide".$tabs_num."_link_tab'>Slide Link</a></li>\n";
877
  echo "<li><a href='#slide".$tabs_num."_popup_tab'>Slide Popup</a></li>\n";
878
+ echo "<li><a href='#slide".$tabs_num."_goto_tab'>Slide Goto Link</a></li>\n";
879
  echo "</ul>\n";
880
 
881
  // ####### SLIDE TAB 1 - SLIDE BACKGROUND #######
1373
  echo "</div>\n";
1374
  }
1375
  echo "</div>\n";
1376
+
1377
+ // ####### SLIDE TAB 4 - SLIDE GOTO LINK #######
1378
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1379
+ $goto_class = $css_id."_goto".($i+1);
1380
+ $eg_link = "https://edgewebpages.com/slide-goto-links";
1381
+ echo "<div id='slide".$tabs_num."_goto_tab' class='sa_slide_tab'>\n";
1382
+ echo "<div class='slide_goto_link_content'>\n";
1383
+ echo "<p><strong>Create a link or button to link directly to this slide</strong></p>\n";
1384
+ echo "<p>To do this, give your link or button the following <strong>CSS Class:</strong></p>\n";
1385
+ echo "<div class='slide_goto_class'><span>".$goto_class."</span></div>\n";
1386
+ echo "<p>To see an example of how a '<strong>Slide Goto Link</strong>' works ";
1387
+ echo "<a href='".$eg_link."' target='_blank'>CLICK HERE</a></p>\n";
1388
+ echo "</div>\n";
1389
+ echo "</div>\n";
1390
 
1391
  // ############################
1392
  // ##### SLIDE TABS - END #####
php/slide-anything-frontend.php CHANGED
@@ -962,6 +962,16 @@ function slide_anything_shortcode($atts) {
962
 
963
 
964
 
 
 
 
 
 
 
 
 
 
 
965
  // ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
966
  if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
967
 
962
 
963
 
964
 
965
+ // JAVASCRIPT FOR 'SLIDE GOTO LINKS"
966
+ $output .= " var owl_goto = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
967
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
968
+ $output .= " jQuery('.".esc_attr($slide_data['css_id'])."_goto".$i."').click(function(event){\n";
969
+ $output .= " owl_goto.trigger('to.owl.carousel', ".($i-1).");\n";
970
+ $output .= " });\n";
971
+ }
972
+
973
+
974
+
975
  // ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
976
  if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
977
 
readme.txt CHANGED
@@ -353,6 +353,9 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
353
  = 2.3.19 =
354
  * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
355
 
 
 
 
356
  == Upgrade Notice ==
357
 
358
  = 1.0 =
@@ -607,4 +610,7 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
607
  * Call the JavaScript 'window resize' event when the Owl Carousel 'initialized' event is executed - this resolves an issue some uses have been experiencing with slides not being sized correctly after page load
608
 
609
  = 2.3.19 =
610
- * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
 
 
 
353
  = 2.3.19 =
354
  * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
355
 
356
+ = 2.3.20 =
357
+ * Added a new feature 'Slide Goto Links', which allows the creation of links (or buttons) that when clicked will go to a specific slide within your slider.
358
+
359
  == Upgrade Notice ==
360
 
361
  = 1.0 =
610
  * Call the JavaScript 'window resize' event when the Owl Carousel 'initialized' event is executed - this resolves an issue some uses have been experiencing with slides not being sized correctly after page load
611
 
612
  = 2.3.19 =
613
+ * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
614
+
615
+ = 2.3.20 =
616
+ * Added a new feature 'Slide Goto Links', which allows the creation of links (or buttons) that when clicked will go to a specific slide within your slider.
slide-anything.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wordpress.org/plugins/slide-anything/
5
  * Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
6
  * Author: Simon Edge
7
- * Version: 2.3.19
8
  * License: GPLv2 or later
9
  */
10
 
4
  * Plugin URI: https://wordpress.org/plugins/slide-anything/
5
  * Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
6
  * Author: Simon Edge
7
+ * Version: 2.3.20
8
  * License: GPLv2 or later
9
  */
10
 
trunk/css/admin-user-interface.min.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.4 - 2015-12-12
2
+ * http://jqueryui.com
3
+ * Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, button.css, dialog.css, slider.css, spinner.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("../images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("../images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
trunk/css/slide-anything-admin.css ADDED
@@ -0,0 +1,1938 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ##################################################################
3
+ ### SLIDE ANYTHING PLUGIN - JAVASCRIPT FOR WORDPRESS DASHBOARD ###
4
+ ##################################################################
5
+ */
6
+
7
+ /* ### GENERAL STYLE ### */
8
+ .postbox-container .meta-box-sortables .postbox h3 span {
9
+ font-family:'Open Sans', sans-serif !important;
10
+ font-weight:600 !important;
11
+ font-size:20px !important;
12
+ line-height:26px !important;
13
+ }
14
+ .sa_hidden {
15
+ display:none !important;
16
+ }
17
+
18
+ /* ### METABOX 'Slider Settings' ### */
19
+ #sa_slider_settings {
20
+ padding:10px 0px 0px;
21
+ }
22
+ #sa_slider_settings hr {
23
+ margin:20px 0px !important;
24
+ border-top-style:none !important;
25
+ border-bottom:solid 1px #e8e8e8 !important;
26
+ }
27
+ #sa_slider_settings .sa_slider_value {
28
+ position:relative;
29
+ margin:0px 5px 15px;
30
+ }
31
+ #sa_slider_settings .sa_slider_value span {
32
+ display:inline-block;
33
+ padding-right:10px;
34
+ color:#303030;
35
+ font-family:'Open Sans', sans-serif;
36
+ font-size:14px;
37
+ line-height:20px;
38
+ }
39
+ #sa_slider_settings .sa_slider_value .sa_tooltip {
40
+ position:absolute;
41
+ top:4px;
42
+ margin-left:5px !important;
43
+ cursor:help;
44
+ }
45
+ #sa_slider_settings .sa_slider_value input {
46
+ width:40px !important;
47
+ margin:0px !important;
48
+ border-style:none !important;
49
+ border-radius:3px !important;
50
+ outline-color:transparent !important;
51
+ box-shadow:none !important;
52
+ -webkit-box-shadow:none !important;
53
+ background-color:#f0f0f0 !important;
54
+ }
55
+ #sa_slider_settings .sa_slider_value em {
56
+ display:inline-block;
57
+ padding-left:5px;
58
+ color:#a0a0a0;
59
+ font-family:'Open Sans', sans-serif;
60
+ font-size:14px;
61
+ line-height:20px;
62
+ }
63
+ #sa_slider_settings .jquery_ui_slider {
64
+ margin:0px 5px 5px !important;
65
+ background-color:#007fff !important;
66
+ border-radius:0px !important;
67
+ }
68
+ #sa_slider_settings .jquery_ui_slider .ui-slider-handle {
69
+ outline-color:transparent !important;
70
+ background-color:#f0f0f0 !important;
71
+ border-color:#c0c0c0 !important;
72
+ transition:background .3s ease-in-out;
73
+ -webkit-transition:background .3s ease-in-out;
74
+ -moz-transition:background .3s ease-in-out;
75
+ -o-transition:background .3s ease-in-out;
76
+ }
77
+ #sa_slider_settings .jquery_ui_slider .ui-slider-handle:hover,
78
+ #sa_slider_settings .jquery_ui_slider .ui-slider-handle:focus {
79
+ background-color:#d0d0d0 !important;
80
+ }
81
+ #sa_slider_settings .jquery_ui_slider .ui-slider-range {
82
+ border-radius:0px !important;
83
+ }
84
+ .half_width_column {
85
+ float:left;
86
+ width:50%;
87
+ }
88
+ .half_width_column .sa_setting_checkbox {
89
+ position:relative;
90
+ padding:0px 5px 10px 5px;
91
+ }
92
+ .half_width_column .sa_setting_checkbox span {
93
+ display:inline-block;
94
+ width:125px;
95
+ color:#303030;
96
+ font-family:'Open Sans', sans-serif;
97
+ font-size:14px;
98
+ line-height:20px;
99
+ }
100
+ .half_width_column .sa_setting_checkbox .sa_tooltip {
101
+ position:absolute;
102
+ top:2px;
103
+ margin-left:5px !important;
104
+ cursor:help;
105
+ }
106
+ @media only screen and (max-width:479px) {
107
+ .half_width_column { float:none; width:100%; }
108
+ }
109
+
110
+ /* ### METABOX 'Slides' - DISABLE VISUAL EDITOR CHECKBOX ### */
111
+ #sa_visual_editor_checkbox {
112
+ padding:10px 5px 0px;
113
+ }
114
+ #sa_visual_editor_checkbox span {
115
+ display:inline-block;
116
+ padding-right:10px;
117
+ color:#303030;
118
+ font-family:'Open Sans', sans-serif;
119
+ font-size:14px;
120
+ line-height:20px;
121
+ }
122
+ /* ### METABOX 'Slides' - ACCORDION CONTAINING SLIDE CONTENT ### */
123
+ #slider_accordion {
124
+ margin:20px 0px 10px !important;
125
+ }
126
+ #slider_accordion > h3 {
127
+ margin-top:3px !important;
128
+ padding:7px 10px !important;
129
+ font-family:Arial, Helvetica, sans-serif !important;
130
+ font-weight:normal !important;
131
+ font-size:16px !important;
132
+ line-height:22px !important;
133
+ letter-spacing:1px;
134
+ text-transform:uppercase !important;
135
+ background-color:#f0f0f0;
136
+ border-color:#e0e0e0;
137
+ color:#505050;
138
+ outline:none;
139
+ box-shadow:none;
140
+ -webkit-box-shadow:none;
141
+ transition:all .3s ease-in-out;
142
+ -webkit-transition:all .3s ease-in-out;
143
+ -moz-transition:all .3s ease-in-out;
144
+ -o-transition:all .3s ease-in-out;
145
+ }
146
+ #slider_accordion > h3 span {
147
+ float:right !important;
148
+ display:block !important;
149
+ padding:2px 0px 0px 10px !important;
150
+ font-weight:400 !important;
151
+ font-size:12px !important;
152
+ line-height:18px !important;
153
+ text-transform:none !important;
154
+ color:#a0a0a0;
155
+ }
156
+ #slider_accordion > h3:hover {
157
+ background-color:#e8e8e8;
158
+ }
159
+ #slider_accordion > h3.ui-state-active {
160
+ background-color:#007fff;
161
+ color:#f0f0f0;
162
+ }
163
+ #slider_accordion > h3.ui-state-active span {
164
+ color:#f0f0f0;
165
+ }
166
+ #slider_accordion > h3 .ui-accordion-header-icon {
167
+ display:none !important;
168
+ }
169
+ #slider_accordion > div {
170
+ padding:15px 15px !important;
171
+ }
172
+ #slider_accordion > div .wp-editor-container {
173
+ border-color:#e0e0e0;
174
+ border-radius:3px;
175
+ }
176
+ #slider_accordion > div .wp-editor-container .mce-tinymce > .mce-container-body > .mce-edit-area > iframe,
177
+ #slider_accordion > div .wp-editor-container > .mce-tinymce textarea.sa_slide_content {
178
+ min-height:240px !important;
179
+ }
180
+
181
+ /* ### METABOX 'Slides' - TABS FOR EACH SLIDE ### */
182
+ .sa_slide_tabs {
183
+ border:solid 1px #e0e0e0;
184
+ margin:5px 0px 0px;
185
+ }
186
+ .sa_slide_tabs .ui-tabs-nav {
187
+ border-style:none;
188
+ }
189
+ .sa_slide_tabs .ui-tabs-nav {
190
+ padding:0px 3px;
191
+ background-color:#f0f0f0;
192
+ border-bottom:solid 1px #e0e0e0;
193
+ }
194
+ .sa_slide_tabs .ui-tabs-nav li {
195
+ display:block;
196
+ float:left;
197
+ width:130px;
198
+ margin:0px;
199
+ border-style:none;
200
+ outline:none;
201
+ box-shadow:none;
202
+ -webkit-box-shadow:none;
203
+ margin:5px 2px;
204
+ }
205
+ .sa_slide_tabs .ui-tabs-nav li a {
206
+ display:inline-block;
207
+ width:100%;
208
+ text-align:center;
209
+ color:#707070;
210
+ background-color:#ffffff;
211
+ font-size:14px;
212
+ line-height:14px;
213
+ padding:5px 0px;
214
+ box-shadow:none;
215
+ -webkit-box-shadow:none;
216
+ transition:all .3s ease-in-out;
217
+ -webkit-transition:all .3s ease-in-out;
218
+ -moz-transition:all .3s ease-in-out;
219
+ -o-transition:all .3s ease-in-out;
220
+ }
221
+ .sa_slide_tabs .ui-tabs-nav li a:hover {
222
+ color:#000000;
223
+ }
224
+ .sa_slide_tabs .ui-tabs-nav li.ui-state-active a {
225
+ background-color:#007fff;
226
+ color:#f0f0f0;
227
+ }
228
+ .sa_slide_tabs .sa_slide_tab {
229
+ padding:15px;
230
+ border-style:none;
231
+ }
232
+ .sa_slide_tabs .sa_slide_tab p {
233
+ margin:0px;
234
+ }
235
+
236
+ /* ##### METABOX 'Slides' - TAB 1 (Slide Background) ##### */
237
+ .popup_background_wrapper {
238
+ display:inline-block;
239
+ margin:0px 0px 15px;
240
+ padding:10px;
241
+ width:auto;
242
+ background-color:#f5f5f5;
243
+ border:solid 1px #e0e0e0;
244
+ border-radius:5px;
245
+ }
246
+ .popup_background_wrapper div {
247
+ position:relative;
248
+ width:auto;
249
+ padding:0px 21px 5px 0px;
250
+ color:#303030;
251
+ font-family:'Open Sans', sans-serif;
252
+ font-weight:400;
253
+ font-size:13px;
254
+ line-height:18px;
255
+ }
256
+ .popup_background_wrapper div .sa_tooltip {
257
+ position:absolute;
258
+ top:0px;
259
+ margin-left:5px;
260
+ cursor:help;
261
+ }
262
+ #slide1_background_tab .popup_background_wrapper select {
263
+ box-sizing:border-box !important;
264
+ height:auto !important;
265
+ font-size:13px !important;
266
+ line-height:26px !important;
267
+ padding-top:0px !important;
268
+ padding-bottom:0px !important;
269
+ color:#000000 !important;
270
+ border:solid 1px #e0e0e0 !important;
271
+ outline:none !important;
272
+ box-shadow:none !important;
273
+ }
274
+ .sa_slide_bg_popup {
275
+ display:none;
276
+ position:relative;
277
+ float:left;
278
+ margin-right:15px;
279
+ border:solid 1px #e0e0e0;
280
+ padding:5px;
281
+ background-color:#f3f3f3;
282
+ }
283
+ .sa_slide_bg_popup div {
284
+ width:170px;
285
+ height:170px;
286
+ background:transparent url('../images/image_placeholder_popup.jpg') no-repeat top left;
287
+ background-size:cover;
288
+ }
289
+ .sa_slide_bg_wrapper .sa_slide_thumb {
290
+ position:relative;
291
+ float:left;
292
+ margin-right:15px;
293
+ border:solid 1px #e0e0e0;
294
+ padding:5px;
295
+ background-color:#f3f3f3;
296
+ }
297
+ .sa_slide_bg_wrapper .sa_slide_thumb > div {
298
+ height:170px;
299
+ width:170px;
300
+ background-repeat:no-repeat;
301
+ background-position:top left;
302
+ background-size:100% auto;
303
+ }
304
+ .sa_slide_bg_wrapper .sa_slide_thumb > span {
305
+ display:inline-block;
306
+ position:absolute;
307
+ top:0px;
308
+ right:0px;
309
+ font-family:Arial, Helvetica, sans-serif;
310
+ font-size:14px;
311
+ line-height:14px;
312
+ padding:3px 3px;
313
+ background-color:rgba(0,0,0,0.5);
314
+ color:#ffffff;
315
+ cursor:pointer;
316
+ transition:all .3s ease-in-out;
317
+ -webkit-transition:all .3s ease-in-out;
318
+ -moz-transition:all .3s ease-in-out;
319
+ -o-transition:all .3s ease-in-out;
320
+ }
321
+ .sa_slide_bg_wrapper .sa_slide_thumb > span:hover {
322
+ background-color:crimson;
323
+ }
324
+ .sa_slide_bg_wrapper .slide_image_add {
325
+ margin:3px 0px 0px !important;
326
+ }
327
+ .sa_slide_bg_wrapper .slide_image_settings_line {
328
+ margin:7px 0px 0px 197px;
329
+ }
330
+ .sa_slide_bg_wrapper .slide_image_settings_line span {
331
+ display:inline-block;
332
+ width:140px;
333
+ color:#303030;
334
+ font-family:'Open Sans', sans-serif;
335
+ font-weight:400;
336
+ font-size:13px;
337
+ }
338
+ .sa_slide_bg_wrapper .slide_image_settings_line select {
339
+ min-width:120px;
340
+ box-sizing:border-box !important;
341
+ height:auto !important;
342
+ font-size:13px !important;
343
+ line-height:26px !important;
344
+ padding-top:0px !important;
345
+ padding-bottom:0px !important;
346
+ color:#000000 !important;
347
+ border:solid 1px #e0e0e0 !important;
348
+ outline:none !important;
349
+ box-shadow:none !important;
350
+ }
351
+ .sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer { /* spectrum color picker */
352
+ background-color:#f0f0f0 !important;
353
+ border:solid 1px #e0e0e0 !important;
354
+ margin:2px 1px !important;
355
+ padding:2px !important;
356
+ border-radius:3px !important;
357
+ }
358
+ .sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer .sp-preview { /* spectrum color picker */
359
+ width:97px !important;
360
+ height:18px !important;
361
+ border:solid 1px #c0c0c0 !important;
362
+ margin-right:3px !important;
363
+ }
364
+ .sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer .sp-dd { /* spectrum color picker */
365
+ height:18px !important;
366
+ padding:0px !important;
367
+ margin-right:2px !important;
368
+ }
369
+
370
+ /* ##### METABOX 'Slides' - TAB 2 (Slide Link) ##### */
371
+ .slide_link_settings_wrapper {
372
+ padding:0px;
373
+ }
374
+ .slide_link_settings_wrapper p {
375
+ font-weight:600;
376
+ font-size:14px;
377
+ line-height:20px;
378
+ color:#303030;
379
+ padding-bottom:5px;
380
+ }
381
+ .slide_link_settings_wrapper div {
382
+ padding:10px 0px 0px;
383
+ }
384
+ .slide_link_settings_wrapper div span {
385
+ display:inline-block;
386
+ width:100%;
387
+ padding:0px 0px 2px 2px;
388
+ font-weight:400;
389
+ font-size:13px;
390
+ line-height:18px;
391
+ color:#505050;
392
+ }
393
+ .slide_link_settings_wrapper div input[type=text] {
394
+ box-sizing:border-box !important;
395
+ width:100%;
396
+ height:auto !important;
397
+ margin:0px;
398
+ font-size:14px !important;
399
+ line-height:30px !important;
400
+ padding:0px 7px !important;
401
+ color:#000000 !important;
402
+ border:solid 1px #c0c0c0 !important;
403
+ outline:none !important;
404
+ box-shadow:none !important;
405
+ }
406
+ .slide_link_settings_wrapper div select {
407
+ min-width:130px !important;
408
+ box-sizing:border-box !important;
409
+ padding-top:0px !important;
410
+ padding-bottom:0px !important;
411
+ font-size:13px !important;
412
+ line-height:28px;
413
+ height:auto !important;
414
+ color:#000000 !important;
415
+ border:solid 1px #c0c0c0 !important;
416
+ outline:none !important;
417
+ box-shadow:none !important;
418
+ }
419
+
420
+ /* ##### METABOX 'Slides' - TAB 3 (Slide Popup) ##### */
421
+ /* pro version info message */
422
+ .slide_popup_pro_version > h4 {
423
+ margin:5px 0px 15px;
424
+ padding:5px 0px;
425
+ text-align:center;
426
+ font-size:16px;
427
+ line-height:22px;
428
+ font-weight:normal;
429
+ background-color:#f0f0f0;
430
+ color:crimson;
431
+ border:solid 1px #e0e0e0;
432
+ border-radius:5px;
433
+ }
434
+ .slide_popup_pro_version > p {
435
+ margin:0px;
436
+ padding:0px;
437
+ font-size:14px;
438
+ line-height:22px;
439
+ color:#606060;
440
+ }
441
+ .slide_popup_pro_version ul {
442
+ margin:0px 0px 10px 30px;
443
+ padding:0px;
444
+ list-style-type: disc;
445
+ }
446
+ .slide_popup_pro_version ul li {
447
+ margin:0px;
448
+ padding:2px 0px 0px;
449
+ font-size:14px;
450
+ line-height:22px;
451
+ color:#606060;
452
+ }
453
+ .slide_popup_pro_version > p a {
454
+ font-weight:bold;
455
+ text-decoration:none;
456
+ letter-spacing:1px;
457
+ color:#007fff;
458
+ }
459
+ .slide_popup_pro_version > p a:hover {
460
+ text-decoration:underline;
461
+ }
462
+ /* popup settings - general */
463
+ .slide_popup_settings_line {
464
+ position:relative;
465
+ margin:0px 0px 10px;
466
+ }
467
+ .slide_popup_settings_line span {
468
+ display:inline-block;
469
+ width:130px;
470
+ color:#303030;
471
+ font-family:'Open Sans', sans-serif;
472
+ font-weight:400;
473
+ font-size:13px;
474
+ }
475
+ .slide_popup_settings_line select {
476
+ box-sizing:border-box !important;
477
+ height:auto !important;
478
+ min-width:110px;
479
+ padding-top:0px !important;
480
+ padding-bottom:0px !important;
481
+ color:#000000 !important;
482
+ font-size:14px !important;
483
+ line-height:28px !important;
484
+ border:solid 1px #c0c0c0 !important;
485
+ background-color:#f5f5f5 !important;
486
+ outline:none !important;
487
+ box-shadow:none !important;
488
+ }
489
+ .slide_popup_settings_line .sa_tooltip {
490
+ position:absolute;
491
+ top:-2px;
492
+ margin-left:5px !important;
493
+ cursor:help;
494
+ }
495
+ /* image popup settings */
496
+ .image_popup_wrapper {
497
+ }
498
+ .image_popup_wrapper .slide_popup_thumb {
499
+ position:relative;
500
+ float:left;
501
+ max-width:320px;
502
+ margin:5px 10px 0px 0px;
503
+ padding:5px;
504
+ border:solid 1px #e0e0e0;
505
+ border-radius:5px;
506
+ background-color:#ffffff;
507
+ }
508
+ .image_popup_wrapper .slide_popup_thumb img {
509
+ display:block;
510
+ width:100%;
511
+ }
512
+ .image_popup_wrapper .slide_popup_thumb span {
513
+ display:inline-block;
514
+ position:absolute;
515
+ top:0px;
516
+ right:0px;
517
+ font-family:Arial, Helvetica, sans-serif;
518
+ font-size:14px;
519
+ line-height:14px;
520
+ padding:3px 3px;
521
+ background-color:rgba(0,0,0,0.5);
522
+ color:#ffffff;
523
+ cursor:pointer;
524
+ transition:all .3s ease-in-out;
525
+ -webkit-transition:all .3s ease-in-out;
526
+ -moz-transition:all .3s ease-in-out;
527
+ -o-transition:all .3s ease-in-out;
528
+ }
529
+ .image_popup_wrapper .slide_popup_thumb span:hover {
530
+ background-color:crimson;
531
+ }
532
+ .image_popup_wrapper .slide_popup_image_preview {
533
+ display:inline-block;
534
+ }
535
+ .image_popup_wrapper .slide_popup_info {
536
+ padding:0px;
537
+ }
538
+ .image_popup_wrapper .sa_slide_popup_imagetitle {
539
+ width:300px;
540
+ margin:10px 0px 0px;
541
+ font-size:14px !important;
542
+ line-height:28px !important;
543
+ padding:0px 7px !important;
544
+ color:#000000 !important;
545
+ border:solid 1px #c0c0c0 !important;
546
+ outline:none !important;
547
+ box-shadow:none !important;
548
+ }
549
+ input.sa_slide_popup_imagetitle::-webkit-input-placeholder { color:#c0c0c0 !important; }
550
+ input.sa_slide_popup_imagetitle:-moz-placeholder { color:#c0c0c0 !important; }
551
+ input.sa_slide_popup_imagetitle::-moz-placeholder { color:#c0c0c0 !important; }
552
+ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important; }
553
+ @media only screen and (max-width:1279px) {
554
+ .image_popup_wrapper .slide_popup_thumb { max-width:200px; }
555
+ .image_popup_wrapper .sa_slide_popup_imagetitle { width:200px; }
556
+ }
557
+ @media only screen and (max-width:1049px) {
558
+ .image_popup_wrapper .slide_popup_thumb { float:none !important; }
559
+ .image_popup_wrapper .popup_image_add { clear:both; }
560
+ .image_popup_wrapper .sa_slide_popup_imagetitle { clear:both; width:100%; }
561
+ }
562
+ .image_popup_wrapper .slide_popup_info div {
563
+ padding:10px 0px 0px;
564
+ font-size:13px;
565
+ line-height:16px;
566
+ color:#707070;
567
+ }
568
+ /* video popup settings */
569
+ .video_popup_wrapper {
570
+ }
571
+ .video_popup_wrapper .slide_video_thumb {
572
+ float:left;
573
+ box-sizing:content-box;
574
+ width:320px;
575
+ height:180px;
576
+ margin:5px 10px 0px 0px;
577
+ padding:5px;
578
+ border:solid 1px #e0e0e0;
579
+ border-radius:5px;
580
+ background-color:transparent;
581
+ }
582
+ .video_popup_wrapper .slide_video_thumb > img,
583
+ .video_popup_wrapper .slide_video_thumb > iframe {
584
+ width:100%;
585
+ height:100%;
586
+ }
587
+ .video_popup_wrapper .sa_slide_video_url input {
588
+ width:400px;
589
+ margin:10px 0px 5px;
590
+ font-size:14px !important;
591
+ line-height:30px !important;
592
+ padding:0px 7px !important;
593
+ color:#000000 !important;
594
+ border:solid 1px #c0c0c0 !important;
595
+ outline:none !important;
596
+ box-shadow:none !important;
597
+ }
598
+ .video_popup_wrapper .sa_popup_video_invalid_url {
599
+ display:none;
600
+ padding:10px 0px 0px;
601
+ color:crimson;
602
+ font-family:'Open Sans', sans-serif;
603
+ font-weight:400;
604
+ font-size:13px;
605
+ }
606
+ .video_popup_wrapper .slide_popup_video_preview {
607
+ display:inline-block !important;
608
+ }
609
+ .video_popup_wrapper .sa_slide_video_url input::-webkit-input-placeholder { color:#c0c0c0 !important; }
610
+ .video_popup_wrapper .sa_slide_video_url input:-moz-placeholder { color:#c0c0c0 !important; }
611
+ .video_popup_wrapper .sa_slide_video_url input::-moz-placeholder { color:#c0c0c0 !important; }
612
+ .video_popup_wrapper .sa_slide_video_url input:-ms-input-placeholder { color:#c0c0c0 !important; }
613
+ @media only screen and (max-width:1399px) {
614
+ .video_popup_wrapper .sa_slide_video_url input { width:300px !important; }
615
+ }
616
+ @media only screen and (max-width:1279px) {
617
+ .video_popup_wrapper .sa_slide_video_url input { clear:both !important; width:100% !important; margin-top:10px !important; }
618
+ }
619
+ /* content popup settings */
620
+ .html_popup_wrapper textarea {
621
+ box-sizing:border-box !important;
622
+ width:100%;
623
+ margin:5px 0px 10px;
624
+ padding:4px 6px;
625
+ font-size:13px;
626
+ line-height:20px;
627
+ height:150px;
628
+ background-color:#fcfcfc;
629
+ }
630
+ .html_popup_wrapper .slide_popup_settings_line .sp-replacer { /* spectrum color picker */
631
+ background-color:#fafafa !important;
632
+ border:solid 1px #e0e0e0 !important;
633
+ margin:2px 1px !important;
634
+ padding:2px !important;
635
+ border-radius:5px !important;
636
+ }
637
+ .html_popup_wrapper .slide_popup_settings_line .sp-replacer .sp-preview { /* spectrum color picker */
638
+ width:87px !important;
639
+ height:18px !important;
640
+ border:solid 1px #c0c0c0 !important;
641
+ margin-right:3px !important;
642
+ }
643
+ .html_popup_wrapper .slide_popup_settings_line .sp-replacer .sp-dd { /* spectrum color picker */
644
+ height:18px !important;
645
+ padding:0px !important;
646
+ margin-right:2px !important;
647
+ }
648
+ .html_popup_wrapper .slide_popup_settings_line .ui-spinner {
649
+ width:auto !important;
650
+ }
651
+ .html_popup_wrapper .slide_popup_settings_line .ui-spinner-input {
652
+ box-sizing:border-box !important;
653
+ height:auto !important;
654
+ min-height:0px !important;
655
+ width:40px !important;
656
+ margin:0px 20px 0px 5px !important;
657
+ padding:0px !important;
658
+ outline-style:none !important;
659
+ border-style:none !important;
660
+ box-shadow:none !important;
661
+ -webkit-box-shadow:none !important;
662
+ color:#303030 !important;
663
+ font-size:13px !important;
664
+ line-height:26px !important;
665
+ }
666
+ .html_popup_wrapper .slide_popup_settings_line em,
667
+ .html_popup_wrapper .slide_popup_settings_line strong {
668
+ display: inline-block;
669
+ padding: 0px 10px 0px 5px;
670
+ font-style: normal;
671
+ font-weight: normal;
672
+ color: #a0a0a0;
673
+ font-family: 'Open Sans', sans-serif;
674
+ font-size: 14px;
675
+ line-height: 18px;
676
+ }
677
+ .html_popup_wrapper .slide_popup_css {
678
+ box-sizing:border-box !important;
679
+ height:auto !important;
680
+ display:inline-block !important;
681
+ padding: 0px 10px 0px 33px !important;
682
+ background: #f0f0f0 url(../images/icon_copy.png) no-repeat 5px 2px;
683
+ font-size: 13px !important;
684
+ line-height: 28px !important;
685
+ color: #000000;
686
+ border-radius:5px !important;
687
+ cursor: pointer !important;
688
+ }
689
+ @media only screen and (max-width:1199px) {
690
+ .html_popup_wrapper .slide_popup_settings_line strong { display:none; }
691
+ }
692
+
693
+ /* ##### METABOX 'Slides' - TAB 4 (Slide Goto Link) ##### */
694
+ .slide_goto_link_content p {
695
+ font-weight:400;
696
+ font-size:14px;
697
+ line-height:22px;
698
+ color:#303030;
699
+ padding-top:10px;
700
+ }
701
+ .slide_goto_link_content p:first-child {
702
+ padding-top:0px;
703
+ font-size:16px;
704
+ line-height:24px;
705
+ }
706
+ .slide_goto_link_content p strong {
707
+ font-weight:700;
708
+ }
709
+ .slide_goto_link_content p a {
710
+ color:#007fff;
711
+ text-decoration:none;
712
+ transition:all .3s ease-in-out;
713
+ -webkit-transition:all .3s ease-in-out;
714
+ -moz-transition:all .3s ease-in-out;
715
+ -o-transition:all .3s ease-in-out;
716
+ }
717
+ .slide_goto_link_content p a:hover {
718
+ color:#000000;
719
+ }
720
+ .slide_goto_link_content .slide_goto_class {
721
+ margin:7px 0px 10px 10px;
722
+ }
723
+ .slide_goto_link_content .slide_goto_class span {
724
+ display:inline-block;
725
+ padding:7px 12px;
726
+ background-color:#f0f0f0;
727
+ font-size:14px;
728
+ line-height:20px;
729
+ color: firebrick;
730
+ border-radius:5px;
731
+ }
732
+
733
+
734
+
735
+ /* ### SLIDE BUTTONS (DELETE SLIDE, DUPLICATE SLIDE) ### */
736
+ #slider_accordion > div .button-secondary {
737
+ margin:10px 0px 0px;
738
+ }
739
+
740
+ /* ### METABOX 'Slider Shortcode' ### */
741
+ #sa_slider_shortcode {
742
+ display:block;
743
+ margin:10px 0px 0px;
744
+ padding:7px 10px;
745
+ background-color:#f0f0f0;
746
+ color:firebrick;
747
+ font-family:'Open Sans', sans-serif;
748
+ font-weight:normal;
749
+ font-size:14px;
750
+ line-height:20px;
751
+ border-radius:3px;
752
+ text-align:center;
753
+ cursor:default;
754
+ }
755
+ #sa_shortcode_copy {
756
+ float:none;
757
+ margin:10px 0px 0px;
758
+ }
759
+ #sa_preview_slider {
760
+ float:right;
761
+ margin:10px 0px 0px;
762
+ }
763
+ #sa_preview_popup {
764
+ position:fixed;
765
+ top:0px;
766
+ left:0px;
767
+ width:100%;
768
+ height:100%;
769
+ background-color:rgba(0,0,0,0.9);
770
+ z-index:100041;
771
+ }
772
+ #sa_preview_popup #sa_preview_wrapper {
773
+ position:absolute;
774
+ box-sizing:border-box;
775
+ width:96%;
776
+ height:96%;
777
+ top:2%;
778
+ left:2%;
779
+ background-color:#ffffff;
780
+ }
781
+ #sa_preview_popup #sa_preview_wrapper #sa_preview_close {
782
+ position:absolute;
783
+ top:0px;
784
+ right:0px;
785
+ width:40px;
786
+ text-align:center;
787
+ font-weight:normal;
788
+ font-size:22px;
789
+ line-height:40px;
790
+ background-color:rgba(0,0,0,0.5);
791
+ color:#ffffff;
792
+ cursor:pointer;
793
+ z-index:2;
794
+ transition:background .3s ease-in-out;
795
+ -webkit-transition:background .3s ease-in-out;
796
+ -moz-transition:background .3s ease-in-out;
797
+ -o-transition:background .3s ease-in-out;
798
+ }
799
+ #sa_preview_popup #sa_preview_wrapper #sa_preview_close:hover {
800
+ background-color:#000000;
801
+ }
802
+ #sa_preview_popup #sa_preview_wrapper #sa_preview_content {
803
+ position:absolute;
804
+ top:0px;
805
+ left:0px;
806
+ width:100%;
807
+ height:100%;
808
+ box-sizing:content-box;
809
+ z-index:1;
810
+ }
811
+ #sa_preview_popup #sa_preview_wrapper #sa_preview_content iframe {
812
+ width:100%;
813
+ height:100%;
814
+ }
815
+
816
+ /* ### METABOX 'Items Displayed' ### */
817
+ #items_displayed_metabox > h4 {
818
+ color:#303030;
819
+ margin:10px 0px 5px;
820
+ font-family:'Open Sans', sans-serif;
821
+ font-size:14px;
822
+ font-weight:600;
823
+ line-height:20px;
824
+ }
825
+ #items_displayed_metabox > div {
826
+ clear:both;
827
+ padding:3px 0px !important;
828
+ }
829
+ #items_displayed_metabox > div em {
830
+ display:block;
831
+ float:left;
832
+ margin-left:10px;
833
+ line-height:30px !important;
834
+ height:30px !important;
835
+ background-position:0px 8px !important;
836
+ cursor:help;
837
+ }
838
+ #items_displayed_metabox > div span {
839
+ display:block;
840
+ float:left;
841
+ padding-left:5px;
842
+ color:#303030;
843
+ width:120px;
844
+ font-family:'Open Sans', sans-serif;
845
+ font-weight:400;
846
+ font-size:13px;
847
+ line-height:30px;
848
+ height:32px !important;
849
+ }
850
+ #items_displayed_metabox > div select {
851
+ box-sizing:border-box !important;
852
+ height:auto !important;
853
+ max-width:65px !important;
854
+ margin:0px !important;
855
+ padding-top:0px !important;
856
+ padding-bottom:0px !important;
857
+ font-size:13px !important;
858
+ line-height:28px !important;
859
+ color:#000000 !important;
860
+ border:solid 1px #e0e0e0 !important;
861
+ outline:none !important;
862
+ box-shadow:none !important;
863
+ }
864
+ /* hero slider */
865
+ #items_displayed_metabox #sa_hero_slider_wrapper {
866
+ margin:10px 0px 0px !important;
867
+ padding:10px 0px 10px !important;
868
+ background-color:#f5f5f5 !important;
869
+ }
870
+ #items_displayed_metabox #sa_hero_slider_wrapper > span {
871
+ padding-left:10px !important;
872
+ font-weight:700 !important;
873
+ font-size:14px !important;
874
+ line-height:16px !important;
875
+ height:16px !important;
876
+ }
877
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note {
878
+ clear:both !important;
879
+ float:none !important;
880
+ margin:0px !important;
881
+ padding:5px 0px 0px 10px !important;
882
+ }
883
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol {
884
+ margin:3px 0px 0px 15px !important;
885
+ padding:0px !important;
886
+ }
887
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol li {
888
+ margin:2px 0px !important;
889
+ padding:0px !important;
890
+ font-size:13px !important;
891
+ line-height:16px !important;
892
+ }
893
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol li em {
894
+ display:inline-block !important;
895
+ float:none !important;
896
+ margin-left:5px !important;
897
+ font-size:13px !important;
898
+ line-height:16px !important;
899
+ height:16px !important;
900
+ background-position:0px 0px !important;
901
+ }
902
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo {
903
+ padding:0px 10px !important;
904
+ clear:both !important;
905
+ float:none !important;
906
+ }
907
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo h4 {
908
+ margin:0px !important;
909
+ padding:10px 0px 0px !important;
910
+ font-size:14px !important;
911
+ line-height:18px !important;
912
+ color:#000000 !important;
913
+ }
914
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p {
915
+ margin:0px !important;
916
+ padding:10px 0px 0px !important;
917
+ }
918
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p strong {
919
+ color:#000000 !important;
920
+ }
921
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p a {
922
+ display:inline-block !important;
923
+ padding-left:10px !important;
924
+ font-weight:700 !important;
925
+ font-size:14px !important;
926
+ color:#007fff !important;
927
+ text-decoration:none !important;
928
+ transition:all 0.3s ease-in-out;
929
+ -webkit-transition:all 0.3s ease-in-out;
930
+ -moz-transition:all 0.3s ease-in-out;
931
+ -o-transition:all 0.3s ease-in-out;
932
+ }
933
+ #items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p a:hover {
934
+ color:#000000 !important;
935
+ }
936
+ /* showcase carousel */
937
+ #items_displayed_metabox #sa_showcase_slider_wrapper {
938
+ margin:10px 0px 0px !important;
939
+ padding:10px 0px 0px !important;
940
+ background-color:#f5f5f5 !important;
941
+ }
942
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line {
943
+ margin:0px !important;
944
+ padding:0px 0px 10px !important;
945
+ height:24px !important;
946
+ }
947
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line span {
948
+ display:inline-block !important;
949
+ width:140px !important;
950
+ padding-left:10px !important;
951
+ font-size:14px !important;
952
+ line-height:28px !important;
953
+ height:28px !important;
954
+ }
955
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line em {
956
+ float:none !important;
957
+ margin:0px 0px 0px 5px !important;
958
+ display:inline-block !important;
959
+ font-size:14px !important;
960
+ line-height:28px !important;
961
+ height:28px !important;
962
+ }
963
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line input[type='checkbox'] {
964
+ margin:2px 0px 0px !important;
965
+ width:16px !important;
966
+ height:16px !important;
967
+ }
968
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line input[type='text'] {
969
+ width:40px !important;
970
+ margin:0px !important;
971
+ height:auto !important;
972
+ min-height:0px !important;
973
+ padding:0px 0px 0px 5px !important;
974
+ outline-style:none !important;
975
+ border-style:none !important;
976
+ box-shadow:none !important;
977
+ -webkit-box-shadow:none !important;
978
+ color:#303030 !important;
979
+ font-size:13px !important;
980
+ line-height:26px !important;
981
+ }
982
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_line .ui-spinner {
983
+ width:55px !important;
984
+ padding:0px !important;
985
+ height:auto !important;
986
+ min-height:0px !important;
987
+ line-height:26px !important;
988
+ }
989
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_css_line {
990
+ margin:0px !important;
991
+ padding:5px 10px 10px !important;
992
+ }
993
+ #items_displayed_metabox #sa_showcase_slider_wrapper .sa_ss_css_line #ss_css_value {
994
+ margin:7px 0px 0px;
995
+ padding:4px 5px 4px 32px;
996
+ background:#f0f0f0 url('../images/icon_copy.png') no-repeat 2px 2px;
997
+ border:solid 1px #e8e8e8;
998
+ border-radius:5px;
999
+ font-size:13px;
1000
+ line-height:20px;
1001
+ height:20px;
1002
+ color:firebrick;
1003
+ cursor:pointer;
1004
+ }
1005
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo {
1006
+ padding:0px 10px 10px !important;
1007
+ clear:both !important;
1008
+ float:none !important;
1009
+ }
1010
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo h4 {
1011
+ margin:0px !important;
1012
+ padding:0px !important;
1013
+ font-size:14px !important;
1014
+ line-height:18px !important;
1015
+ color:#000000 !important;
1016
+ }
1017
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo p {
1018
+ margin:0px !important;
1019
+ padding:10px 0px 0px !important;
1020
+ }
1021
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo p strong {
1022
+ color:#000000 !important;
1023
+ }
1024
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo p a {
1025
+ display:inline-block !important;
1026
+ padding-left:10px !important;
1027
+ font-weight:700 !important;
1028
+ font-size:14px !important;
1029
+ color:#007fff !important;
1030
+ text-decoration:none !important;
1031
+ transition:all 0.3s ease-in-out;
1032
+ -webkit-transition:all 0.3s ease-in-out;
1033
+ -moz-transition:all 0.3s ease-in-out;
1034
+ -o-transition:all 0.3s ease-in-out;
1035
+ }
1036
+ #items_displayed_metabox #sa_showcase_slider_wrapper #sa_showcase_slider_promo p a:hover {
1037
+ color:#000000 !important;
1038
+ }
1039
+
1040
+
1041
+
1042
+
1043
+ /* ### METABOX 'Slider Style' ### */
1044
+ #slider_style_metabox h4 {
1045
+ position:relative;
1046
+ color:#303030;
1047
+ margin:15px 0px 8px;
1048
+ font-family:'Open Sans', sans-serif;
1049
+ font-size:14px;
1050
+ font-weight:600;
1051
+ line-height:20px;
1052
+ }
1053
+ #slider_style_metabox h4 span {
1054
+ color:#909090 !important;
1055
+ font-weight:400;
1056
+ }
1057
+ #slider_style_metabox h4 span {
1058
+ color:firebrick;
1059
+ }
1060
+ #slider_style_metabox h4 em {
1061
+ display:inline-block;
1062
+ position:absolute;
1063
+ top:1px;
1064
+ width:16px;
1065
+ height:16px;
1066
+ background-position:0px 0px !important;
1067
+ cursor:help;
1068
+ margin-left:5px;
1069
+ }
1070
+ #slider_style_metabox #sa_css_id {
1071
+ box-sizing:border-box !important;
1072
+ height:auto !important;
1073
+ width:100%;
1074
+ margin-bottom:15px;
1075
+ font-size:14px !important;
1076
+ line-height:30px !important;
1077
+ padding:0px 7px !important;
1078
+ color:#000000 !important;
1079
+ border:solid 1px #d0d0d0 !important;
1080
+ outline:none !important;
1081
+ box-shadow:none !important;
1082
+ }
1083
+ #slider_style_metabox #css_note_text {
1084
+ padding-left:3px;
1085
+ padding-bottom:5px;
1086
+ }
1087
+ #slider_style_metabox #css_note_value {
1088
+ margin-left:3px;
1089
+ margin-bottom:25px !important;
1090
+ padding:4px 5px 4px 32px;
1091
+ background:#f0f0f0 url('../images/icon_copy.png') no-repeat 2px 2px;
1092
+ font-size:13px;
1093
+ line-height:20px;
1094
+ height:20px;
1095
+ color:firebrick;
1096
+ cursor:pointer;
1097
+ }
1098
+ #slider_style_metabox .ca_style_hr {
1099
+ border-top:solid 1px #e0e0e0;
1100
+ width:80%;
1101
+ margin:0px 10%;
1102
+ }
1103
+ /* slider padding*/
1104
+ #slider_style_metabox .ca_style_padding > div {
1105
+ float:left;
1106
+ display:inline-block;
1107
+ background-color:transparent;
1108
+ background-repeat:no-repeat;
1109
+ background-position:0px 7px;
1110
+ width:42px;
1111
+ height:26px;
1112
+ padding:4px 0px 0px 20px;
1113
+ }
1114
+ #slider_style_metabox .ca_style_padding #padd_top { background-image:url('../images/padding_top.png'); }
1115
+ #slider_style_metabox .ca_style_padding #padd_right { background-image:url('../images/padding_right.png'); }
1116
+ #slider_style_metabox .ca_style_padding #padd_bottom { background-image:url('../images/padding_bottom.png'); }
1117
+ #slider_style_metabox .ca_style_padding #padd_left { background-image:url('../images/padding_left.png'); }
1118
+
1119
+ #slider_style_metabox .ca_style_padding div input {
1120
+ box-sizing:border-box !important;
1121
+ width:38px !important;
1122
+ height:auto !important;
1123
+ min-height:0px !important;
1124
+ margin:0px !important;
1125
+ padding:0px 15px 0px 3px !important;
1126
+ font-size:13px !important;
1127
+ line-height:24px !important;
1128
+ outline-style:none !important;
1129
+ border-style:none !important;
1130
+ box-shadow:none !important;
1131
+ -webkit-box-shadow:none !important;
1132
+ color:#303030 !important;
1133
+ font-size:13px !important;
1134
+ }
1135
+ /* slide style & Style for Slides */
1136
+ #slider_style_metabox .ca_style_setting_line {
1137
+ padding-left:5px;
1138
+ padding-bottom:10px;
1139
+ }
1140
+ #slider_style_metabox .ca_style_setting_line span {
1141
+ display:inline-block;
1142
+ width:110px;
1143
+ font-family:'Open Sans', sans-serif;
1144
+ font-size:13px;
1145
+ }
1146
+ #slider_style_metabox .ca_style_setting_line .ui-spinner {
1147
+ width:auto !important;
1148
+ }
1149
+ #slider_style_metabox .ca_style_setting_line input[type='text'] {
1150
+ box-sizing:border-box !important;
1151
+ width:45px !important;
1152
+ height:auto !important;
1153
+ min-height:0px !important;
1154
+ margin:0px !important;
1155
+ padding:0px 15px 0px 4px !important;
1156
+ outline-style:none !important;
1157
+ border-style:none !important;
1158
+ box-shadow:none !important;
1159
+ -webkit-box-shadow:none !important;
1160
+ color:#303030 !important;
1161
+ font-size:13px !important;
1162
+ line-height:24px !important;
1163
+ }
1164
+ #slider_style_metabox .ca_style_setting_line input[type='checkbox'] {
1165
+ margin-left:5px !important;
1166
+ margin-right:5px !important;
1167
+ }
1168
+ #slider_style_metabox .ca_style_setting_line em {
1169
+ display:inline-block;
1170
+ padding:0px 10px 0px 3px;
1171
+ font-style:normal;
1172
+ color:#a0a0a0;
1173
+ font-family:'Open Sans', sans-serif;
1174
+ font-size:14px;
1175
+ }
1176
+ #slider_style_metabox .ca_style_setting_line select {
1177
+ box-sizing:border-box !important;
1178
+ height:auto !important;
1179
+ font-size:13px !important;
1180
+ line-height:26px !important;
1181
+ padding-top:0px !important;
1182
+ padding-bottom:0px !important;
1183
+ color:#000000 !important;
1184
+ border:solid 1px #e0e0e0 !important;
1185
+ outline:none !important;
1186
+ box-shadow:none !important;
1187
+ }
1188
+ #slider_style_metabox .ca_style_setting_line .sp-replacer { /* spectrum color picker */
1189
+ background-color:#f0f0f0 !important;
1190
+ border:solid 1px #e0e0e0 !important;
1191
+ padding:2px !important;
1192
+ border-radius:3px !important;
1193
+ }
1194
+ #slider_style_metabox .ca_style_setting_line .sp-replacer .sp-preview { /* spectrum color picker */
1195
+ width:28px !important;
1196
+ height:16px !important;
1197
+ border:solid 1px #c0c0c0 !important;
1198
+ margin-right:3px !important;
1199
+ }
1200
+ #slider_style_metabox .ca_style_setting_line .sp-replacer .sp-dd { /* spectrum color picker */
1201
+ height:16px !important;
1202
+ padding:0px !important;
1203
+ margin-right:2px !important;
1204
+ }
1205
+ #slider_style_metabox #sa_border_width,
1206
+ #slider_style_metabox #sa_border_radius {
1207
+ width:45px !important;
1208
+ line-height:22px !important;
1209
+ }
1210
+ #slider_style_metabox #ca_style_min_height span {
1211
+ width:80px;
1212
+ background-position:0px 1px !important;
1213
+ height:20px !important;
1214
+ padding-left:20px !important;
1215
+ padding-bottom:3px !important;
1216
+ cursor:help;
1217
+ }
1218
+ #slider_style_metabox #ca_style_min_height em {
1219
+ padding:0px 8px 0px 0px !important;
1220
+ color:#404040 !important;
1221
+ font-size:13px !important;
1222
+ line-height:18px !important;
1223
+ }
1224
+ #slider_style_metabox #ca_style_padding_top_bottom {
1225
+ background:transparent url('../images/padding_top_bottom.png') no-repeat 5px 0px !important;
1226
+ padding-left:28px !important;
1227
+ }
1228
+ #slider_style_metabox #ca_style_padding_left_right,
1229
+ #slider_style_metabox #ca_style_margin_left_right {
1230
+ background:transparent url('../images/padding_left_right.png') no-repeat 5px 0px !important;
1231
+ padding-left:28px !important;
1232
+ }
1233
+ #slider_style_metabox #ca_style_padding_top_bottom > span,
1234
+ #slider_style_metabox #ca_style_padding_left_right > span,
1235
+ #slider_style_metabox #ca_style_margin_left_right > span {
1236
+ width:87px;
1237
+ background-position:67px 2px !important;
1238
+ height:22px !important;
1239
+ cursor:help;
1240
+ }
1241
+ /* other settings */
1242
+ #slider_style_metabox #sa_window_onload_line {
1243
+ padding:5px 0px 10px 0px !important;
1244
+ font-size:13px !important;
1245
+ line-height:18px !important;
1246
+ cursor:help !important;
1247
+ }
1248
+ #slider_style_metabox #sa_window_onload_line span {
1249
+ margin-right:5px;
1250
+ float:left !important;
1251
+ display:block !important;
1252
+ }
1253
+ #slider_style_metabox #sa_window_onload_line input[type=checkbox] {
1254
+ margin-left:10px !important;
1255
+ margin-right:0px !important;
1256
+ }
1257
+ #slider_style_metabox #sa_window_onload_line select {
1258
+ box-sizing:border-box !important;
1259
+ height:auto !important;
1260
+ min-height:0px !important;
1261
+ width:auto !important;
1262
+ min-width:45px !important;
1263
+ max-width:60px !important;
1264
+ margin:0px !important;
1265
+ padding-top:0px !important;
1266
+ padding-bottom:0px !important;
1267
+ font-size:12px !important;
1268
+ line-height:22px !important;
1269
+ color:#000000 !important;
1270
+ border:solid 1px #e0e0e0 !important;
1271
+ outline:none !important;
1272
+ box-shadow:none !important;
1273
+ }
1274
+
1275
+ /* ### METABOX 'Thumbnail Pagination' ### */
1276
+ #cpt_slider_thumbs .inside {
1277
+ margin:0px !important;
1278
+ padding:15px 12px 10px !important;
1279
+ background-color:#f5f5f5 !important;
1280
+ }
1281
+ #cpt_slider_thumbs .sa_thumbs_line {
1282
+ padding:0px 0px 10px !important;
1283
+ }
1284
+ #cpt_slider_thumbs .sa_thumbs_line span:first-child {
1285
+ display:inline-block !important;
1286
+ min-width:120px !important;
1287
+ padding-right:10px !important;
1288
+ font-family:'Open Sans', sans-serif !important;
1289
+ font-size:13px !important;
1290
+ line-height:24px !important;
1291
+ }
1292
+ #cpt_slider_thumbs #sa_thumbs_settings {
1293
+ padding:10px 0px 0px !important;
1294
+ }
1295
+ #cpt_slider_thumbs #sa_thumbs_settings h4 {
1296
+ color:#303030;
1297
+ margin:10px 0px;
1298
+ font-family:'Open Sans', sans-serif;
1299
+ font-size:13px;
1300
+ font-weight:600;
1301
+ line-height:18px;
1302
+ }
1303
+ #sa_thumbs_settings .sa_thumbs_line input[type=text] {
1304
+ box-sizing:border-box !important;
1305
+ height:auto !important;
1306
+ min-height:0px !important;
1307
+ width:60px !important;
1308
+ margin:0px !important;
1309
+ padding:0px 15px 0px 5px !important;
1310
+ outline-style:none !important;
1311
+ border-style:none !important;
1312
+ box-shadow:none !important;
1313
+ -webkit-box-shadow:none !important;
1314
+ color:#303030 !important;
1315
+ font-size:13px !important;
1316
+ line-height:24px !important;
1317
+ }
1318
+ #sa_thumbs_settings .sa_thumbs_line em {
1319
+ display:inline-block !important;
1320
+ padding-left:5px !important;
1321
+ font-style:normal !important;
1322
+ color:#a0a0a0 !important;
1323
+ font-size:13px !important;
1324
+ line-height:24px !important;
1325
+ }
1326
+ #sa_thumbs_settings .sa_thumbs_line select {
1327
+ box-sizing:border-box !important;
1328
+ height:auto !important;
1329
+ font-size:13px !important;
1330
+ line-height:28px !important;
1331
+ margin-top:3px !important;
1332
+ padding-top:0px !important;
1333
+ padding-bottom:0px !important;
1334
+ color:#000000 !important;
1335
+ border:solid 1px #e0e0e0 !important;
1336
+ outline:none !important;
1337
+ box-shadow:none !important;
1338
+ }
1339
+ #sa_thumbs_settings .sa_thumbs_line #sa_thumbs_image_size {
1340
+ margin-top:3px !important;
1341
+ }
1342
+ #sa_thumbs_settings .sa_thumbs_line .sp-replacer { /* spectrum color picker */
1343
+ background-color:#f0f0f0 !important;
1344
+ border:solid 1px #e0e0e0 !important;
1345
+ padding:2px !important;
1346
+ border-radius:3px !important;
1347
+ }
1348
+ #sa_thumbs_settings .sa_thumbs_line .sp-replacer .sp-preview { /* spectrum color picker */
1349
+ width:40px !important;
1350
+ height:18px !important;
1351
+ border:solid 1px #c0c0c0 !important;
1352
+ margin-right:3px !important;
1353
+ }
1354
+ #sa_thumbs_settings .sa_thumbs_line .sp-replacer .sp-dd { /* spectrum color picker */
1355
+ height:14px !important;
1356
+ padding:0px !important;
1357
+ margin-right:2px !important;
1358
+ }
1359
+ #cpt_slider_thumbs #sa_thumbs_promo {
1360
+ margin:-3px !important;
1361
+ padding:0px 5px 8px !important;
1362
+ }
1363
+ #cpt_slider_thumbs #sa_thumbs_promo h4 {
1364
+ margin:0px !important;
1365
+ padding:0px !important;
1366
+ font-size:14px !important;
1367
+ line-height:18px !important;
1368
+ color:#000000 !important;
1369
+ }
1370
+ #cpt_slider_thumbs #sa_thumbs_promo p {
1371
+ margin:0px !important;
1372
+ padding:10px 0px 0px !important;
1373
+ }
1374
+ #cpt_slider_thumbs #sa_thumbs_promo p strong {
1375
+ color:#000000 !important;
1376
+ }
1377
+ #cpt_slider_thumbs #sa_thumbs_promo p a {
1378
+ display:inline-block !important;
1379
+ padding-left:10px !important;
1380
+ font-weight:700 !important;
1381
+ font-size:14px !important;
1382
+ color:#007fff !important;
1383
+ text-decoration:none !important;
1384
+ transition:all 0.3s ease-in-out;
1385
+ -webkit-transition:all 0.3s ease-in-out;
1386
+ -moz-transition:all 0.3s ease-in-out;
1387
+ -o-transition:all 0.3s ease-in-out;
1388
+ }
1389
+ #cpt_slider_thumbs #sa_thumbs_promo p a:hover {
1390
+ color:#000000 !important;
1391
+ }
1392
+
1393
+ /* ### METABOX 'Information' - 'SLIDE ADDED', 'SLIDE DELETED', 'SLIDE DUPLICATED' & 'SLIDE MOVED' INFO MESSAGES ### */
1394
+ #sa_slide_added_mess,
1395
+ #sa_slide_duplicated_mess,
1396
+ #sa_slide_moved_mess {
1397
+ margin:0px !important;
1398
+ color:#4285F4;
1399
+ font-family:'Open Sans', sans-serif;
1400
+ font-weight:normal;
1401
+ font-size:20px !important;
1402
+ line-height:26px !important;
1403
+ }
1404
+ #sa_slide_deleted_mess {
1405
+ margin:0px !important;
1406
+ color:crimson;
1407
+ font-family:'Open Sans', sans-serif;
1408
+ font-weight:normal;
1409
+ font-size:20px !important;
1410
+ line-height:26px !important;
1411
+ }
1412
+
1413
+ /* ### METABOX 'Slide Any Post' PROMOTION ### */
1414
+ #cpt_slide_any_post {
1415
+ margin:0px !important;
1416
+ border-color:#c0c0c0 !important;
1417
+ }
1418
+ #cpt_slide_any_post h2.hndle {
1419
+ padding:12px !important;
1420
+ background-color:#3498db !important;
1421
+ color:#ffffff !important;
1422
+ border-color:#c0c0c0 !important;
1423
+ font-weight:700 !important;
1424
+ font-size:18px !important;
1425
+ line-height:24px !important;
1426
+ }
1427
+ #cpt_slide_any_post button {
1428
+ margin-top:5px !important;
1429
+ }
1430
+ #cpt_slide_any_post button .toggle-indicator {
1431
+ color:#ffffff !important;
1432
+ }
1433
+ #cpt_slide_any_post .inside {
1434
+ margin:0px !important;
1435
+ padding:12px !important;
1436
+ background-color:#3498db !important;
1437
+ }
1438
+ #cpt_slide_any_post .inside #sapn_image {
1439
+ float:left !important;
1440
+ width:250px !important;
1441
+ padding:30px 10px !important;
1442
+ }
1443
+ #cpt_slide_any_post .inside #sapn_image img {
1444
+ width:100% !important;
1445
+ height:auto !important;
1446
+ }
1447
+ #cpt_slide_any_post .inside #sapn_text {
1448
+ width:600px !important;
1449
+ width:calc(100% - 250px) !important;
1450
+ max-width:800px !important;
1451
+ margin-left:250px !important;
1452
+ }
1453
+ #cpt_slide_any_post .inside #sapn_text h3 {
1454
+ margin:0px !important;
1455
+ padding:0px 10px 10px !important;
1456
+ font-weight:700 !important;
1457
+ font-size:22px !important;
1458
+ line-height:28px !important;
1459
+ color:#ffffff !important;
1460
+ text-align:center !important;
1461
+ }
1462
+ #cpt_slide_any_post .inside #sapn_text h5 {
1463
+ margin:0px !important;
1464
+ padding:0px 10px 10px !important;
1465
+ font-weight:400 !important;
1466
+ font-size:16px !important;
1467
+ line-height:22px !important;
1468
+ color:#ffffff !important;
1469
+ text-align:center !important;
1470
+ }
1471
+ #cpt_slide_any_post .inside #sapn_text div {
1472
+ text-align:center !important;
1473
+ }
1474
+ #cpt_slide_any_post .inside #sapn_text div a {
1475
+ display:inline-block !important;
1476
+ margin:10px !important;
1477
+ padding:10px 15px !important;
1478
+ font-weight:400 !important;
1479
+ font-size:14px !important;
1480
+ line-height:100% !important;
1481
+ text-decoration:none !important;
1482
+ border-radius:5px !important;
1483
+ color:#ffffff !important;
1484
+ transition:all 0.3s ease-in-out;
1485
+ -webkit-transition:all 0.3s ease-in-out;
1486
+ -moz-transition:all 0.3s ease-in-out;
1487
+ -o-transition:all 0.3s ease-in-out;
1488
+ }
1489
+ #cpt_slide_any_post .inside #sapn_text div #sapn_link {
1490
+ background-color:crimson !important;
1491
+ }
1492
+ #cpt_slide_any_post .inside #sapn_text div #sapn_dismiss {
1493
+ background-color:#c0c0c0 !important;
1494
+ }
1495
+ #cpt_slide_any_post .inside #sapn_text div #sapn_link:hover,
1496
+ #cpt_slide_any_post .inside #sapn_text div #sapn_dismiss:hover {
1497
+ background-color:#000000 !important;
1498
+ }
1499
+ @media only screen and (max-width:1439px) {
1500
+ #cpt_slide_any_post .inside #sapn_image { width:220px !important; padding:30px 0px !important; }
1501
+ #cpt_slide_any_post .inside #sapn_text {
1502
+ width:550px !important; width:calc(100% - 220px) !important; margin-left:220px !important; }
1503
+ #cpt_slide_any_post .inside #sapn_text h3 { font-size:20px !important; line-height:26px !important; }
1504
+ #cpt_slide_any_post .inside #sapn_text h5 { font-size:15px !important; line-height:20px !important; }
1505
+ }
1506
+ @media only screen and (max-width:1339px) {
1507
+ #cpt_slide_any_post .inside #sapn_image {
1508
+ float:none !important; width:100% !important; padding:10px 0px !important;
1509
+ text-align:center !important; }
1510
+ #cpt_slide_any_post .inside #sapn_image img { width:220px !important;}
1511
+ #cpt_slide_any_post .inside #sapn_text {
1512
+ float:none !important; width:100% !important; margin-left:0px !important; }
1513
+ }
1514
+ @media only screen and (max-width:1099px) {
1515
+ #cpt_slide_any_post h2.hndle { font-size:16px !important; line-height:22px !important; }
1516
+ #cpt_slide_any_post .inside #sapn_text h3 { font-size:18px !important; line-height:24px !important; }
1517
+ #cpt_slide_any_post .inside #sapn_text h5 { font-size:14px !important; line-height:20px !important; }
1518
+ #cpt_slide_any_post .inside #sapn_text div a { padding:8px 10px !important; font-size:13px !important; }
1519
+ }
1520
+
1521
+ /* ### JQUERY UI - TOOLTIPS ### */
1522
+ .sa_tooltip {
1523
+ display:inline-block;
1524
+ width:16px;
1525
+ height:16px;
1526
+ background:transparent url('../images/icon_info.png') no-repeat top left;
1527
+ }
1528
+
1529
+ /* ### JQUERY UI - CONFIRMATION DIALOG BOXES ### */
1530
+ #sa_dialog_box {
1531
+ display:none;
1532
+ }
1533
+ .ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar {
1534
+ padding:7px 12px !important;
1535
+ line-height:22px !important;
1536
+ height:22px !important;
1537
+ }
1538
+ .ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar .ui-dialog-title {
1539
+ color:#333333 !important;
1540
+ font-family:Arial, Helvetica, sans-serif !important;
1541
+ font-weight:bold !important;
1542
+ font-size:16px !important;
1543
+ line-height:22px !important;
1544
+ }
1545
+ .ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar button:before {
1546
+ font-size:16px !important;
1547
+ line-height:16px !important;
1548
+ height:16px !important;
1549
+ width:16px !important;
1550
+ }
1551
+ .ui-dialog[aria-describedby='sa_dialog_box'] #sa_dialog_box {
1552
+ padding:15px 10px 10px !important;
1553
+ }
1554
+
1555
+ /* ### JQUERY UI - PREVIEW SLIDER DIALOG BOX ### */
1556
+ #sa_preview_box {
1557
+ display:none;
1558
+ }
1559
+ .ui-dialog[aria-describedby='sa_preview_box'] {
1560
+ position:fixed !important;
1561
+ width:90% !important;
1562
+ top:60px !important;
1563
+ z-index:9999 !important;
1564
+ }
1565
+ .ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar {
1566
+ padding:7px 12px !important;
1567
+ line-height:22px !important;
1568
+ height:22px !important;
1569
+ }
1570
+ .ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar .ui-dialog-title {
1571
+ color:#333333 !important;
1572
+ font-family:Arial, Helvetica, sans-serif !important;
1573
+ font-weight:bold !important;
1574
+ font-size:16px !important;
1575
+ line-height:22px !important;
1576
+ }
1577
+ .ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar button:before {
1578
+ font-size:16px !important;
1579
+ line-height:16px !important;
1580
+ height:16px !important;
1581
+ width:16px !important;
1582
+ }
1583
+ .ui-dialog[aria-describedby='sa_preview_box'] #sa_preview_box {
1584
+ padding:20px 15px 15px !important;
1585
+ }
1586
+ .ui-dialog[aria-describedby='sa_preview_box'] #sa_preview_box #sa_preview_note {
1587
+ padding-top:20px;
1588
+ font-size:13px;
1589
+ line-height:20px;
1590
+ color:#a0a0a0;
1591
+ }
1592
+ .ui-widget-overlay {
1593
+ background-color:rgba(0,0,0,0.7) !important;
1594
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
1595
+ filter:alpha(opacity=100);
1596
+ -moz-opacity:1.0;
1597
+ -khtml-opacity:1.0;
1598
+ opacity:1.0;
1599
+ }
1600
+
1601
+ /* ### JQUERY UI - SPINNER ### */
1602
+ .ui-state-default .ui-icon {
1603
+ background-image:url('../images/ui-icons_777777_256x240.png') !important;
1604
+ }
1605
+ .ui-state-hover .ui-icon {
1606
+ background-image:url('../images/ui-icons_444444_256x240.png') !important;
1607
+ }
1608
+
1609
+
1610
+
1611
+ /*
1612
+ ####################################
1613
+ ### SLIDE ANYTHING SETTINGS PAGE ###
1614
+ ####################################
1615
+ */
1616
+ #sa_settings_page_wrapper h1 {
1617
+ margin:0px;
1618
+ padding:20px 0px 10px;
1619
+ font-size:26px !important;
1620
+ line-height:32px !important;
1621
+ }
1622
+ #sa_settings_page_wrapper h2 {
1623
+ margin:0px;
1624
+ padding:20px 0px 20px;
1625
+ font-size:18px !important;
1626
+ line-height:24px !important;
1627
+ }
1628
+ #sa_settings_page_wrapper > p,
1629
+ #sa_settings_page_wrapper > form > p {
1630
+ margin:0px;
1631
+ padding:0px 0px 10px;
1632
+ font-size:15px;
1633
+ line-height:22px;
1634
+ }
1635
+ #sa_settings_page_wrapper > p a {
1636
+ color:#0073aa;
1637
+ text-decoration:none;
1638
+ }
1639
+ #sa_settings_page_wrapper > p a:hover {
1640
+ text-decoration:underline;
1641
+ }
1642
+ #sa_settings_page_wrapper ol {
1643
+ margin:0px 0px 0px 20px;
1644
+ }
1645
+ #sa_settings_page_wrapper ol li {
1646
+ font-size:15px;
1647
+ line-height:22px;
1648
+ margin:2px 0px 0px;
1649
+ padding:0px;
1650
+ }
1651
+ #sa_settings_page_wrapper ol li h4 {
1652
+ margin:0px;
1653
+ padding:0px;
1654
+ font-size:15px !important;
1655
+ line-height:22px !important;
1656
+ }
1657
+ #sa_settings_page_wrapper ol li p {
1658
+ margin:0px;
1659
+ padding:0px;
1660
+ font-size:14px;
1661
+ line-height:22px;
1662
+ }
1663
+ #sa_settings_page_wrapper ol li ul {
1664
+ list-style-type:disc;
1665
+ margin:0px 0px 10px 25px;
1666
+ }
1667
+ #sa_settings_page_wrapper ol li ul li {
1668
+ margin:0px;
1669
+ padding:0px;
1670
+ font-size:14px !important;
1671
+ line-height:22px !important;
1672
+ }
1673
+ #sa_settings_page_wrapper > form > table {
1674
+ margin:0px;
1675
+ }
1676
+ #sa_settings_page_wrapper > form > table tr th {
1677
+ width:180px;
1678
+ padding:10px 10px 10px 20px;
1679
+ line-height:27px;
1680
+ }
1681
+ #sa_settings_page_wrapper > form > table tr td {
1682
+ padding:10px 0px 10px 10px;
1683
+ }
1684
+ #sa_settings_page_wrapper > form > table tr td input[type=text] {
1685
+ width:300px;
1686
+ max-width:90%;
1687
+ }
1688
+ #sa_settings_page_wrapper > form input[type=submit] {
1689
+ margin:10px 0px 0px 20px;
1690
+ }
1691
+ #sa_settings_page_wrapper #sa_settings_page_message {
1692
+ display:inline-block;
1693
+ margin:20px 0px 0px 20px;
1694
+ padding:7px 12px;
1695
+ background-color:#ffffff;
1696
+ color:green;
1697
+ border:solid 1px #d8d8d8;
1698
+ border-radius:5px;
1699
+ font-size:18px;
1700
+ line-height:24px;
1701
+ font-weight:normal;
1702
+ }
1703
+ @media screen and (max-width:782px) {
1704
+ #sa_settings_page_wrapper > form > table tr th { padding:10px 0px 0px 2px; }
1705
+ #sa_settings_page_wrapper > form > table tr td { padding:0px 0px 10px 0px; }
1706
+ #sa_settings_page_wrapper #sa_settings_page_message { margin:20px 0px 0px 0px; font-size:16px; line-height:22px; }
1707
+ }
1708
+
1709
+
1710
+
1711
+ /* ##### THE 'RE-ORDER SLIDES' SUB-PAGE IN THE WORDPRESS DASHBOARD ##### */
1712
+ #sa_reorder_slides {
1713
+ padding-right:20px !important;
1714
+ }
1715
+ #sa_reorder_slides > h1 {
1716
+ margin:0px !important;
1717
+ padding:20px 0px !important;
1718
+ font-weight:700 !important;
1719
+ font-size:24px !important;
1720
+ line-height:30px !important;
1721
+ color:#000000 !important;
1722
+ }
1723
+ /* FORM CONTAINING SA SLIDER SELECT DROPDOWN */
1724
+ #sa_reorder_slides #sar_slider_form p {
1725
+ margin:0px !important;
1726
+ padding:0px 0px 10px !important;
1727
+ font-weight:400 !important;
1728
+ font-size:16px !important;
1729
+ line-height:24px !important;
1730
+ color:#808080 !important;
1731
+ }
1732
+ #sa_reorder_slides #sar_slider_form div {
1733
+ font-weight:400 !important;
1734
+ font-size:18px !important;
1735
+ line-height:24px !important;
1736
+ color:#808080 !important;
1737
+ font-style:italic !important;
1738
+ }
1739
+ #sa_reorder_slides #sar_slider_form div select {
1740
+ margin:5px 0px 25px !important;
1741
+ padding:0px 8px !important;
1742
+ min-width:300px !important;
1743
+ font-size:18px !important;
1744
+ line-height:42px !important;
1745
+ height:42px !important;
1746
+ color:#000000 !important;
1747
+ outline-color:transparent !important;
1748
+ box-shadow:none !important;
1749
+ border:solid 1px #e0e0e0 !important;
1750
+ border-radius:5px !important;
1751
+ }
1752
+ #sa_reorder_slides input[type=submit] {
1753
+ padding:12px 18px !important;
1754
+ font-weight:400 !important;
1755
+ font-size:16px !important;
1756
+ line-height:16px !important;
1757
+ color:#ffffff !important;
1758
+ background-color:#00519c !important;
1759
+ border-style:none !important;
1760
+ border-radius:5px !important;
1761
+ outline-color:transparent !important;
1762
+ box-shadow:none !important;
1763
+ cursor:pointer !important;
1764
+ transition:all 0.3s ease-in-out;
1765
+ -webkit-transition:all 0.3s ease-in-out;
1766
+ -moz-transition:all 0.3s ease-in-out;
1767
+ -o-transition:all 0.3s ease-in-out;
1768
+ }
1769
+ #sa_reorder_slides #sar_update_but {
1770
+ background-color:#00519c !important;
1771
+ }
1772
+ #sa_reorder_slides #sar_delete_but {
1773
+ display:none;
1774
+ background-color:crimson !important;
1775
+ }
1776
+ #sa_reorder_slides input[type=submit]:hover,
1777
+ #sa_reorder_slides #sar_update_but:hover,
1778
+ #sa_reorder_slides #sar_delete_but:hover {
1779
+ background-color:#000000 !important;
1780
+ }
1781
+ #sa_reorder_slides #sar_no_sliders_found {
1782
+ margin:0px !important;
1783
+ padding:10px 0px !important;
1784
+ font-weight:700 !important;
1785
+ font-size:20px !important;
1786
+ line-height:26px !important;
1787
+ color:crimson !important;
1788
+ }
1789
+ /* SORTABLE LIST OF SLIDES */
1790
+ #sa_reorder_slides #sar_success_message {
1791
+ display:inline-block !important;
1792
+ margin:0px 0px 15px !important;
1793
+ padding:10px 15px !important;
1794
+ font-weight:700 !important;
1795
+ font-size:16px !important;
1796
+ line-height:16px !important;
1797
+ background-color:#228b22 !important;
1798
+ color:#ffffff !important;
1799
+ border-radius:5px !important;
1800
+ }
1801
+ #sa_reorder_slides #sar_slider_title {
1802
+ margin:0px !important;
1803
+ padding:0px 0px 10px !important;
1804
+ font-weight:700 !important;
1805
+ font-size:20px !important;
1806
+ line-height:26px !important;
1807
+ color:#000000 !important;
1808
+ }
1809
+ #sa_reorder_slides #sar_drag_message {
1810
+ margin:0px !important;
1811
+ padding:0px 0px 10px !important;
1812
+ font-weight:400 !important;
1813
+ font-size:18px !important;
1814
+ line-height:24px !important;
1815
+ color:crimson !important;
1816
+ font-style:italic !important;
1817
+ }
1818
+ #sa_reorder_slides #sar_sortable {
1819
+ list-style-type:none !important;
1820
+ margin:0px !important;
1821
+ padding:0px !important;
1822
+ width:100% !important;
1823
+ box-sizing:border-box !important;
1824
+ }
1825
+ #sa_reorder_slides #sar_sortable li {
1826
+ position:relative !important;
1827
+ width:100% !important;
1828
+ clear:both !important;
1829
+ margin:0px 0px 5px !important;
1830
+ padding:10px !important;
1831
+ background-color:#f8f8f8 !important;
1832
+ border:solid 1px #e0e0e0 !important;
1833
+ border-radius:5px !important;
1834
+ box-sizing:border-box !important;
1835
+ transition:all 0.3s ease-in-out;
1836
+ -webkit-transition:all 0.3s ease-in-out;
1837
+ -moz-transition:all 0.3s ease-in-out;
1838
+ -o-transition:all 0.3s ease-in-out;
1839
+ }
1840
+ #sa_reorder_slides #sar_sortable li.ui-state-highlight {
1841
+ height:140px !important;
1842
+ padding:10px !important;
1843
+ border:solid 1px #e0e0e0 !important;
1844
+ background-color:#ffffe0 !important;
1845
+ box-sizing:border-box !important;
1846
+ opacity:1.0 !important;
1847
+ }
1848
+ #sa_reorder_slides #sar_sortable li:hover {
1849
+ cursor:pointer !important;
1850
+ opacity:0.7 !important;
1851
+ }
1852
+ #sa_reorder_slides #sar_sortable li.ui-sortable-helper {
1853
+ cursor: move;
1854
+ }
1855
+ #sa_reorder_slides #sar_sortable li .sar_image {
1856
+ float:left !important;
1857
+ width:120px !important;
1858
+ height:120px !important;
1859
+ margin-right:10px !important;
1860
+ background-color:#f0f0f0 !important;
1861
+ background-position:center !important;
1862
+ background-size:cover !important;
1863
+ background-repeat:no-repeat !important;
1864
+ }
1865
+ #sa_reorder_slides #sar_sortable li .sar_content .sar_slide_num {
1866
+ margin:0px !important;
1867
+ padding:2px 0px 6px !important;
1868
+ font-weight:700 !important;
1869
+ font-size:16px !important;
1870
+ line-height:16px !important;
1871
+ color:#000000 !important;
1872
+ }
1873
+ #sa_reorder_slides #sar_sortable li .sar_content .sar_del_slide {
1874
+ position:absolute !important;
1875
+ top:10px !important;
1876
+ right:10px !important;
1877
+ font-weight:700 !important;
1878
+ font-size:13px !important;
1879
+ line-height:100% !important;
1880
+ color:crimson !important;
1881
+ }
1882
+ #sa_reorder_slides #sar_sortable li .sar_content .sar_del_slide input[type=checkbox] {
1883
+ margin-left:10px !important;
1884
+ width:16px !important;
1885
+ height:16px !important;
1886
+ border-color:crimson !important;
1887
+ background-color:#ffffff !important;
1888
+ }
1889
+ #sa_reorder_slides #sar_sortable li .sar_content .sar_slide_html {
1890
+ height:96px !important;
1891
+ padding:8px !important;
1892
+ font-weight:400 !important;
1893
+ font-size:14px !important;
1894
+ line-height:20px !important;
1895
+ background-color:#ffffff !important;
1896
+ color:#808080 !important;
1897
+ box-sizing:border-box !important;
1898
+ overflow-y:auto !important;
1899
+ }
1900
+ #sa_reorder_slides #sar_no_slides_found {
1901
+ margin:0px !important;
1902
+ padding:10px 0px 30px !important;
1903
+ font-weight:700 !important;
1904
+ font-size:20px !important;
1905
+ line-height:26px !important;
1906
+ color:crimson !important;
1907
+ }
1908
+ #sa_reorder_slides .sar_back_button {
1909
+ display:inline-block;
1910
+ padding:8px 12px !important;
1911
+ font-weight:400 !important;
1912
+ font-size:14px !important;
1913
+ line-height:14px !important;
1914
+ text-decoration:none !important;
1915
+ background-color:#a0a0a0 !important;
1916
+ color:#ffffff !important;
1917
+ border-radius:5px !important;
1918
+ outline-color:transparent !important;
1919
+ box-shadow:none !important;
1920
+ transition:all 0.3s ease-in-out;
1921
+ -webkit-transition:all 0.3s ease-in-out;
1922
+ -moz-transition:all 0.3s ease-in-out;
1923
+ -o-transition:all 0.3s ease-in-out;
1924
+ }
1925
+ #sa_reorder_slides .sar_back_button:hover {
1926
+ background-color:#000000 !important;
1927
+ }
1928
+ @media only screen and (max-width:479px) {
1929
+ #sa_reorder_slides > h1 { font-size:20px !important; line-height:26px !important; }
1930
+ #sa_reorder_slides #sar_slider_form div select {
1931
+ max-width:320px !important; font-size:16px !important; line-height:38px !important;
1932
+ height:38px !important; }
1933
+ #sa_reorder_slides input[type=submit] {
1934
+ padding:10px 16px !important; font-size:14px !important; line-height:14px !important; }
1935
+ #sa_reorder_slides #sar_slider_title { font-size:18px !important; line-height:26px !important; }
1936
+ #sa_reorder_slides #sar_drag_message { font-size:16px !important; line-height:22px !important; }
1937
+ #sa_reorder_slides #sar_sortable li .sar_content .sar_del_slide span { display:none !important; }
1938
+ }
trunk/css/tinymce_style.css ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ################################################################
3
+ ### SLIDE ANYTHING PLUGIN - STYLE FOR TINYMCE EDITOR BUTTOND ###
4
+ ################################################################
5
+ */
6
+ i.mce-i-icon {
7
+ font:400 20px/1 dashicons;
8
+ padding:0px;
9
+ vertical-align:top;
10
+ speak:none;
11
+ -webkit-font-smoothing:antialiased;
12
+ -moz-osx-font-smoothing:grayscale;
13
+ margin-left:-2px;
14
+ padding-right:2px
15
+ }
trunk/images/bg_placeholder.png ADDED
Binary file
trunk/images/black_icon_next.png ADDED
Binary file
trunk/images/black_icon_prev.png ADDED
Binary file
trunk/images/black_lightbox_video.png ADDED
Binary file
trunk/images/black_lightbox_zoom.png ADDED
Binary file
trunk/images/black_slide_link.png ADDED
Binary file
trunk/images/icon_copy.png ADDED
Binary file
trunk/images/icon_info.png ADDED
Binary file
trunk/images/icon_next.png ADDED
Binary file
trunk/images/icon_prev.png ADDED
Binary file
trunk/images/image_placeholder.jpg ADDED
Binary file
trunk/images/image_placeholder_popup.jpg ADDED
Binary file
trunk/images/lightbox_video.png ADDED
Binary file
trunk/images/lightbox_zoom.png ADDED
Binary file
trunk/images/padding_bottom.png ADDED
Binary file
trunk/images/padding_left.png ADDED
Binary file
trunk/images/padding_left_right.png ADDED
Binary file
trunk/images/padding_right.png ADDED
Binary file
trunk/images/padding_top.png ADDED
Binary file
trunk/images/padding_top_bottom.png ADDED
Binary file
trunk/images/sample_logo1.png ADDED
Binary file
trunk/images/sample_logo2.png ADDED
Binary file
trunk/images/sample_logo3.png ADDED
Binary file
trunk/images/sample_logo4.png ADDED
Binary file
trunk/images/sample_logo5.png ADDED
Binary file
trunk/images/sample_logo6.png ADDED
Binary file
trunk/images/sample_logo7.png ADDED
Binary file
trunk/images/sample_logo8.png ADDED
Binary file
trunk/images/slide_any_post_logo.png ADDED
Binary file
trunk/images/slide_anything_pro_product_image.png ADDED
Binary file
trunk/images/slide_link.png ADDED
Binary file
trunk/images/ui-icons_444444_256x240.png ADDED
Binary file
trunk/images/ui-icons_555555_256x240.png ADDED
Binary file
trunk/images/ui-icons_777620_256x240.png ADDED
Binary file
trunk/images/ui-icons_777777_256x240.png ADDED
Binary file
trunk/images/ui-icons_cc0000_256x240.png ADDED
Binary file
trunk/images/ui-icons_ffffff_256x240.png ADDED
Binary file
trunk/images/video_placeholder.jpg ADDED
Binary file
trunk/images/video_placeholder_admin.jpg ADDED
Binary file
trunk/js/add_tinymce_button.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ############################################################################
3
+ ### SLIDE ANYTHING PLUGIN - JAVASCRIPT/JQUERY FOR TINYMCE EDITOR BUTTOND ###
4
+ ############################################################################
5
+ */
6
+ (function() {
7
+ tinymce.PluginManager.add('tinymce_button', function(editor, url) {
8
+ // get a list of shortcode values from previously defined array 'sa_title_arr' and 'sa_id_arr'
9
+ var shortcode_values = [];
10
+ jQuery.each(sa_title_arr, function(i) {
11
+ shortcode_values.push({text: sa_title_arr[i], value:sa_id_arr[i]});
12
+ });
13
+
14
+ // add TinyMCE editor button, which opens a popup containing a dropdown list of slider titles
15
+ // when a slider title is selected the corresponing SA shortcode is generated and displayed within the editor content
16
+ editor.addButton('tinymce_button', {
17
+ title: 'Slide Anything Sliders',
18
+ type: 'menubutton',
19
+ icon: 'icon dashicons-images-alt2',
20
+ onClick: function() {
21
+ editor.windowManager.open({
22
+ title: 'Insert Slider Anywhere Shortcode',
23
+ body: [{
24
+ type: 'listbox',
25
+ name: 'sa_id',
26
+ label: 'Slider Title',
27
+ values: shortcode_values
28
+ }],
29
+ onsubmit: function(e) {
30
+ editor.insertContent("[slide-anything id='" + e.data.sa_id + "']");
31
+ }
32
+ });
33
+ }
34
+ });
35
+ });
36
+ })();
trunk/js/slide-anything-admin.js ADDED
@@ -0,0 +1,1299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // ##################################################################
2
+ // ### SLIDE ANYTHING PLUGIN - JAVASCRIPT FOR WORDPRESS DASHBOARD ###
3
+ // ##################################################################
4
+
5
+ jQuery(function() {
6
+ // ##### JQUERY-UI TOOLTIPS #####
7
+ jQuery(".sa_tooltip").tooltip();
8
+
9
+ // ##### JQUERY-UI - SLIDE DURATION SLIDER/INPUT #####
10
+ var init_value = jQuery("#sa_slide_duration").val();
11
+ jQuery("#jq_slider_duration").slider({
12
+ range:"max",
13
+ min:0,
14
+ max:30,
15
+ step:0.1,
16
+ value:init_value,
17
+ slide:function(event, ui) {
18
+ jQuery("#sa_slide_duration").val(ui.value);
19
+ }
20
+ });
21
+ jQuery("#sa_slide_duration").val(jQuery("#jq_slider_duration").slider("value"));
22
+
23
+ // ##### JQUERY-UI - SLIDE BY SLIDER/INPUT #####
24
+ var init_value = jQuery("#sa_slide_by").val();
25
+ jQuery("#jq_slider_by").slider({
26
+ range:"max",
27
+ min:0,
28
+ max:12,
29
+ step:1,
30
+ value:init_value,
31
+ slide:function(event, ui) {
32
+ jQuery("#sa_slide_by").val(ui.value);
33
+ }
34
+ });
35
+ jQuery("#sa_slide_by").val(jQuery("#jq_slider_by").slider("value"));
36
+
37
+ // ##### JQUERY-UI - SLIDE TRANSITION SLIDER/INPUT #####
38
+ var init_value = jQuery("#sa_slide_transition").val();
39
+ jQuery("#jq_slider_transition").slider({
40
+ range:"max",
41
+ min:0,
42
+ max:3,
43
+ step:0.1,
44
+ value:init_value,
45
+ slide:function(event, ui) {
46
+ jQuery("#sa_slide_transition").val(ui.value);
47
+ }
48
+ });
49
+ jQuery("#sa_slide_transition").val(jQuery("#jq_slider_transition").slider("value"));
50
+
51
+ // ##### CHANGE EVENT HANDLER FOR 'Disable Visual Editor' CHECKBOX #####
52
+ jQuery('#sa_disable_visual_editor').change(function() {
53
+ // save the custom post type
54
+ jQuery('#sa_disable_visual_editor').css('cursor', 'wait');
55
+ jQuery('body').css('cursor', 'wait');
56
+ jQuery('#publish').click();
57
+ })
58
+
59
+ // ##### JQUERY-UI ACCORDION CONTAINING CONTENT FOR ALL SLIDES #####
60
+ jQuery("#slider_accordion").accordion({
61
+ heightStyle: "content"
62
+ });
63
+
64
+ // ##### JQUERY-UI TABS FOR EACH SLIDE #####
65
+ var slide_count = jQuery("#num_slides_id").val();
66
+ for (i = 1; i <= slide_count; i++) {
67
+ var slide_tabs_id = 'slide_' + i + '_tabs';
68
+ jQuery('#' + slide_tabs_id).tabs();
69
+ change_slide_popup_background(i);
70
+ }
71
+
72
+ // ##### CLICK EVENT HANDLER FOR THE 'Add Slide' BUTTON #####
73
+ // increment the hidden 'number of slides' input field and save the custom post type
74
+ jQuery('#sa_add_slide').click(function() {
75
+ var num = jQuery("#num_slides_id").val();
76
+ var num = parseInt(num) + 1;
77
+ jQuery("#num_slides_id").val(num);
78
+ // set hidden input field to notify that a status message must be displayed
79
+ var info_added = document.getElementById('sa_info_added');
80
+ info_added.value = "1";
81
+ // save the custom post type
82
+ jQuery('#sa_add_slide').css('cursor', 'wait');
83
+ jQuery('body').css('cursor', 'wait');
84
+ jQuery('#publish').click();
85
+ });
86
+
87
+ // ##### CLICK EVENT HANDLER FOR THE SHORTCODE 'Copy to Clipboard' BUTTON #####
88
+ jQuery('#sa_shortcode_copy').click(function() {
89
+ var shortcode = document.getElementById('sa_slider_shortcode').innerHTML;
90
+ var aux = document.createElement("input"); // Create a "hidden" input
91
+ aux.setAttribute("value", shortcode); // Assign it the value of the specified element
92
+ document.body.appendChild(aux); // Append it to the body
93
+ aux.select(); // Highlight its content
94
+ document.execCommand("copy"); // Copy the highlighted text
95
+ document.body.removeChild(aux); // Remove it from the body
96
+ // DISPLAY 'Shortcode Copied' message
97
+ document.getElementById('sa_slider_shortcode').innerHTML = "Copied!";
98
+ setTimeout(function(){ document.getElementById('sa_slider_shortcode').innerHTML = shortcode; }, 1000);
99
+ });
100
+
101
+ // ##### CHANGE EVENT HANDLER FOR CSS ID INPUT BOX #####
102
+ jQuery('#sa_css_id').change(function() {
103
+ var css_id = document.getElementById('sa_css_id').value;
104
+ document.getElementById('css_note_value').innerHTML = '#' + css_id + ' .owl-item';
105
+ });
106
+
107
+ // ##### CLICK EVENT HANDLER FOR THE CSS SELECTOR 'Copy to Clipboard' BUTTON #####
108
+ jQuery('#css_note_value').click(function() {
109
+ var css_selector = document.getElementById('css_note_value').innerHTML;
110
+ var aux = document.createElement("input"); // Create a "hidden" input
111
+ aux.setAttribute("value", css_selector); // Assign it the value of the specified element
112
+ document.body.appendChild(aux); // Append it to the body
113
+ aux.select(); // Highlight its content
114
+ document.execCommand("copy"); // Copy the highlighted text
115
+ document.body.removeChild(aux); // Remove it from the body
116
+ // DISPLAY 'Shortcode Copied' message
117
+ document.getElementById('css_note_value').innerHTML = "Copied!";
118
+ setTimeout(function(){ document.getElementById('css_note_value').innerHTML = css_selector; }, 1000);
119
+ });
120
+
121
+ // ##### SPECTRUM COLOR PICKER - SLIDER BACKGROUND COLOR #####
122
+ if (document.getElementById('sa_background_color')) {
123
+ var background_color = document.getElementById('sa_background_color').value;
124
+ jQuery("#sa_background_color").spectrum({
125
+ showPaletteOnly: true,
126
+ togglePaletteOnly: true,
127
+ togglePaletteMoreText: 'more',
128
+ togglePaletteLessText: 'less',
129
+ showInput: true,
130
+ allowEmpty:true,
131
+ preferredFormat: "rgb",
132
+ showAlpha: true,
133
+ color: background_color,
134
+ palette: [
135
+ ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
136
+ ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
137
+ ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
138
+ ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
139
+ ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
140
+ ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
141
+ ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
142
+ ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
143
+ ]
144
+ });
145
+ }
146
+
147
+ // ##### JQUERY-UI SPINNER - SLIDER BORDER WIDTH #####
148
+ jQuery("#sa_border_width").spinner({
149
+ step: 1,
150
+ min: 0,
151
+ max: 10,
152
+ numberFormat: "n"
153
+ });
154
+ // ##### CHANGE EVENT HANDLER - SLIDER BORDER WIDTH #####
155
+ jQuery('#sa_border_width').change(function() {
156
+ var border_width = document.getElementById('sa_border_width').value;
157
+ if (jQuery.isNumeric(border_width)) {
158
+ if ((border_width >= 0) && (border_width <= 10)) {
159
+ // valid number
160
+ } else {
161
+ document.getElementById('sa_border_width').value = '0'; // number out of range
162
+ }
163
+ } else {
164
+ document.getElementById('sa_border_width').value = '0'; // not a valid number
165
+ }
166
+ });
167
+ // ##### SPECTRUM COLOR PICKER - SLIDER BORDER COLOR #####
168
+ if (document.getElementById('sa_border_color')) {
169
+ var border_color = document.getElementById('sa_border_color').value;
170
+ jQuery("#sa_border_color").spectrum({
171
+ showPaletteOnly: true,
172
+ togglePaletteOnly: true,
173
+ togglePaletteMoreText: 'more',
174
+ togglePaletteLessText: 'less',
175
+ showInput: true,
176
+ allowEmpty:true,
177
+ preferredFormat: "rgb",
178
+ showAlpha: true,
179
+ color: border_color,
180
+ palette: [
181
+ ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
182
+ ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
183
+ ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
184
+ ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
185
+ ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
186
+ ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
187
+ ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
188
+ ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
189
+ ]
190
+ });
191
+ }
192
+
193
+ // ##### JQUERY-UI SPINNER - SLIDER BORDER RADIUS #####
194
+ jQuery("#sa_border_radius").spinner({
195
+ step: 1,
196
+ min: 0,
197
+ max: 20,
198
+ numberFormat: "n"
199
+ });
200
+ // ##### CHANGE EVENT HANDLER - SLIDER BORDER RADIUS #####
201
+ jQuery('#sa_border_radius').change(function() {
202
+ var border_radius = document.getElementById('sa_border_radius').value;
203
+ if (jQuery.isNumeric(border_radius)) {
204
+ if ((border_radius >= 0) && (border_radius <= 20)) {
205
+ // valid number
206
+ } else {
207
+ document.getElementById('sa_border_radius').value = '0'; // number out of range
208
+ }
209
+ } else {
210
+ document.getElementById('sa_border_radius').value = '0'; // not a valid number
211
+ }
212
+ });
213
+
214
+ // ##### JQUERY-UI SPINNERS - WRAPPER PADDING (TOP, RIGHT, BOTTOM, LEFT) #####
215
+ jQuery("#sa_wrapper_padd_top").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
216
+ jQuery("#sa_wrapper_padd_right").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
217
+ jQuery("#sa_wrapper_padd_bottom").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
218
+ jQuery("#sa_wrapper_padd_left").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
219
+ // ##### CHANGE EVENT HANDLER - WRAPPER PADDING TOP #####
220
+ jQuery('#sa_wrapper_padd_top').change(function() {
221
+ var wrapper_padding = document.getElementById('sa_wrapper_padd_top').value;
222
+ if (jQuery.isNumeric(wrapper_padding)) {
223
+ if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
224
+ // valid number
225
+ } else {
226
+ document.getElementById('sa_wrapper_padd_top').value = '0'; // number out of range
227
+ }
228
+ } else {
229
+ document.getElementById('sa_wrapper_padd_top').value = '0'; // not a valid number
230
+ }
231
+ });
232
+ // ##### CHANGE EVENT HANDLER - WRAPPER PADDING RIGHT #####
233
+ jQuery('#sa_wrapper_padd_right').change(function() {
234
+ var wrapper_padding = document.getElementById('sa_wrapper_padd_right').value;
235
+ if (jQuery.isNumeric(wrapper_padding)) {
236
+ if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
237
+ // valid number
238
+ } else {
239
+ document.getElementById('sa_wrapper_padd_right').value = '0'; // number out of range
240
+ }
241
+ } else {
242
+ document.getElementById('sa_wrapper_padd_right').value = '0'; // not a valid number
243
+ }
244
+ });
245
+ // ##### CHANGE EVENT HANDLER - WRAPPER PADDING BOTTOM #####
246
+ jQuery('#sa_wrapper_padd_bottom').change(function() {
247
+ var wrapper_padding = document.getElementById('sa_wrapper_padd_bottom').value;
248
+ if (jQuery.isNumeric(wrapper_padding)) {
249
+ if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
250
+ // valid number
251
+ } else {
252
+ document.getElementById('sa_wrapper_padd_bottom').value = '0'; // number out of range
253
+ }
254
+ } else {
255
+ document.getElementById('sa_wrapper_padd_bottom').value = '0'; // not a valid number
256
+ }
257
+ });
258
+ // ##### CHANGE EVENT HANDLER - WRAPPER PADDING LEFT #####
259
+ jQuery('#sa_wrapper_padd_left').change(function() {
260
+ var wrapper_padding = document.getElementById('sa_wrapper_padd_left').value;
261
+ if (jQuery.isNumeric(wrapper_padding)) {
262
+ if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
263
+ // valid number
264
+ } else {
265
+ document.getElementById('sa_wrapper_padd_left').value = '0'; // number out of range
266
+ }
267
+ } else {
268
+ document.getElementById('sa_wrapper_padd_left').value = '0'; // not a valid number
269
+ }
270
+ });
271
+
272
+ // ##### CHANGE EVENT FOR SLIDE MINIMUM HEIGHT RADIO BUTTONS #####
273
+ jQuery('.sa_slide_min_height_type').change(function() {
274
+ var slide_min_height_type = this.value;
275
+ if (slide_min_height_type == "percent") {
276
+ document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
277
+ document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
278
+ document.getElementById('mh_suffix').innerHTML = '%';
279
+ } else if (slide_min_height_type == 'px') {
280
+ document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
281
+ document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
282
+ document.getElementById('mh_suffix').innerHTML = 'px';
283
+ } else if (slide_min_height_type == '43') {
284
+ document.getElementById('sa_slide_min_height').value = 'aspect43';
285
+ document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
286
+ } else if (slide_min_height_type == '169') {
287
+ document.getElementById('sa_slide_min_height').value = 'aspect169';
288
+ document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
289
+ }
290
+ });
291
+
292
+ // ##### JQUERY-UI SPINNER FOR SLIDE MINIMUM HEIGHT (PIXELS) #####
293
+ jQuery("#sa_slide_min_height").spinner({
294
+ step: 1,
295
+ min: 0,
296
+ max: 999,
297
+ numberFormat: "n"
298
+ });
299
+ jQuery('#sa_slide_min_height_wrapper .ui-spinner-button').click(function() {
300
+ jQuery(this).siblings('input').change();
301
+ });
302
+ // ##### CHANGE EVENT HANDLER FOR SLIDE MINIMUM HEIGHT (PERCENT/PIXELS) #####
303
+ jQuery('#sa_slide_min_height').change(function() {
304
+ var slide_min_height = document.getElementById('sa_slide_min_height').value;
305
+ var min_height_type = jQuery('input[name=sa_slide_min_height_type]:checked').val();
306
+ if (jQuery.isNumeric(slide_min_height)) {
307
+ if ((slide_min_height >= 0) && (slide_min_height <= 999)) {
308
+ // valid number
309
+ if (min_height_type == 'percent') {
310
+ document.getElementById('sa_slide_min_height_hidden').value = slide_min_height;
311
+ } else {
312
+ document.getElementById('sa_slide_min_height_hidden').value = slide_min_height + 'px';
313
+ }
314
+ } else {
315
+ document.getElementById('sa_slide_min_height').value = '0'; // number out of range
316
+ document.getElementById('sa_slide_min_height_hidden').value = '0';
317
+ }
318
+ } else {
319
+ document.getElementById('sa_slide_min_height').value = '0'; // not a valid number
320
+ document.getElementById('sa_slide_min_height_hidden').value = '0';
321
+ }
322
+ });
323
+
324
+ // ##### JQUERY-UI SPINNER FOR SLIDE PADDING TOP/BOTTOM #####
325
+ jQuery("#sa_slide_padding_tb").spinner({
326
+ step: 0.1,
327
+ min: 0,
328
+ max: 30,
329
+ numberFormat: "n"
330
+ });
331
+ // ##### CHANGE EVENT HANDLER FOR SLIDE PADDING TOP/BOTTOM #####
332
+ jQuery('#sa_slide_padding_tb').change(function() {
333
+ var slide_padding_tb = document.getElementById('sa_slide_padding_tb').value;
334
+ if (jQuery.isNumeric(slide_padding_tb)) {
335
+ if ((slide_padding_tb >= 0) && (slide_padding_tb <= 30)) {
336
+ // valid number
337
+ } else {
338
+ document.getElementById('sa_slide_padding_tb').value = '0'; // number out of range
339
+ }
340
+ } else {
341
+ document.getElementById('sa_slide_padding_tb').value = '0'; // not a valid number
342
+ }
343
+ });
344
+
345
+ // ##### JQUERY-UI SPINNER FOR SLIDE PADDING LEFT/RIGHT #####
346
+ jQuery("#sa_slide_padding_lr").spinner({
347
+ step: 0.1,
348
+ min: 0,
349
+ max: 30,
350
+ numberFormat: "n"
351
+ });
352
+ // ##### CHANGE EVENT HANDLER FOR SLIDE PADDING LEFT/RIGHT #####
353
+ jQuery('#sa_slide_padding_lr').change(function() {
354
+ var slide_padding_lr = document.getElementById('sa_slide_padding_lr').value;
355
+ if (jQuery.isNumeric(slide_padding_lr)) {
356
+ if ((slide_padding_lr >= 0) && (slide_padding_lr <= 30)) {
357
+ // valid number
358
+ } else {
359
+ document.getElementById('sa_slide_padding_lr').value = '0'; // number out of range
360
+ }
361
+ } else {
362
+ document.getElementById('sa_slide_padding_lr').value = '0'; // not a valid number
363
+ }
364
+ });
365
+
366
+ // ##### JQUERY-UI SPINNER FOR SLIDE MARGIN LEFT/RIGHT #####
367
+ jQuery("#sa_slide_margin_lr").spinner({
368
+ step: 0.1,
369
+ min: 0,
370
+ max: 20,
371
+ numberFormat: "n"
372
+ });
373
+ // ##### CHANGE EVENT HANDLER FOR SLIDE MARGIN LEFT/RIGHT #####
374
+ jQuery('#sa_slide_margin_lr').change(function() {
375
+ var slide_margin_lr = document.getElementById('sa_slide_margin_lr').value;
376
+ if (jQuery.isNumeric(slide_margin_lr)) {
377
+ if ((slide_margin_lr >= 0) && (slide_margin_lr <= 20)) {
378
+ // valid number
379
+ } else {
380
+ document.getElementById('sa_slide_margin_lr').value = '0'; // number out of range
381
+ }
382
+ } else {
383
+ document.getElementById('sa_slide_margin_lr').value = '0'; // not a valid number
384
+ }
385
+ });
386
+
387
+ // ##### CHANGE EVENT FOR ANY OF THE ITEMS DISPLAYED DROPDOWNS #####
388
+ jQuery("select[name='sa_items_width1']").change(function() { items_displayed_changed(); });
389
+ jQuery("select[name='sa_items_width2']").change(function() { items_displayed_changed(); });
390
+ jQuery("select[name='sa_items_width3']").change(function() { items_displayed_changed(); });
391
+ jQuery("select[name='sa_items_width4']").change(function() { items_displayed_changed(); });
392
+ jQuery("select[name='sa_items_width5']").change(function() { items_displayed_changed(); });
393
+ jQuery("select[name='sa_items_width6']").change(function() { items_displayed_changed(); });
394
+
395
+ // ##### CHANGE EVENT FOR 'Hero Slider' CHECKBOX #####
396
+ jQuery('#sa_hero_slider').click(function() {
397
+ if (document.getElementById('sa_hero_slider').checked) {
398
+ document.getElementById('sa_hero_slider_note').style.display = 'block';
399
+ } else {
400
+ document.getElementById('sa_hero_slider_note').style.display = 'none';
401
+ }
402
+ });
403
+
404
+ // ##### CHANGE EVENT FOR 'Showcase Carousel' CHECKBOX #####
405
+ jQuery('#sa_showcase_slider').click(function() {
406
+ if (document.getElementById('sa_showcase_slider').checked) {
407
+ document.getElementById('sa_showcase_slider_pro').style.display = 'block';
408
+ } else {
409
+ document.getElementById('sa_showcase_slider_pro').style.display = 'none';
410
+ }
411
+ });
412
+
413
+ // ##### JQUERY-UI SPINNER - SHOWCASE CAROUSEL CONTAINER WIDTH #####
414
+ jQuery("#sa_showcase_width").spinner({
415
+ step: 1,
416
+ min: 100,
417
+ max: 180,
418
+ numberFormat: "n"
419
+ });
420
+ // ##### CHANGE EVENT HANDLER - SHOWCASE CAROUSEL CONTAINER WIDTH #####
421
+ jQuery('#sa_showcase_width').change(function() {
422
+ var showcase_width = document.getElementById('sa_showcase_width').value;
423
+ if (jQuery.isNumeric(showcase_width)) {
424
+ if ((showcase_width >= 100) && (showcase_width <= 180)) {
425
+ // valid number
426
+ } else {
427
+ document.getElementById('sa_showcase_width').value = '120'; // number out of range
428
+ }
429
+ } else {
430
+ document.getElementById('sa_showcase_width').value = '120'; // not a valid number
431
+ }
432
+ });
433
+
434
+ // ##### JQUERY-UI SPINNER - SHOWCASE CAROUSEL CONTAINER WIDTH (TABLET) #####
435
+ jQuery("#sa_showcase_width_tab").spinner({
436
+ step: 1,
437
+ min: 100,
438
+ max: 180,
439
+ numberFormat: "n"
440
+ });
441
+ // ##### CHANGE EVENT HANDLER - SHOWCASE CAROUSEL CONTAINER WIDTH (TABLET) #####
442
+ jQuery('#sa_showcase_width_tab').change(function() {
443
+ var showcase_width_tab = document.getElementById('sa_showcase_width_tab').value;
444
+ if (jQuery.isNumeric(showcase_width_tab)) {
445
+ if ((showcase_width_tab >= 100) && (showcase_width_tab <= 180)) {
446
+ // valid number
447
+ } else {
448
+ document.getElementById('sa_showcase_width_tab').value = '130'; // number out of range
449
+ }
450
+ } else {
451
+ document.getElementById('sa_showcase_width_tab').value = '130'; // not a valid number
452
+ }
453
+ });
454
+
455
+ // ##### JQUERY-UI SPINNER - SHOWCASE CAROUSEL CONTAINER WIDTH (MOBILE) #####
456
+ jQuery("#sa_showcase_width_mob").spinner({
457
+ step: 1,
458
+ min: 100,
459
+ max: 180,
460
+ numberFormat: "n"
461
+ });
462
+ // ##### CHANGE EVENT HANDLER - SHOWCASE CAROUSEL CONTAINER WIDTH (MOBILE) #####
463
+ jQuery('#sa_showcase_width_mob').change(function() {
464
+ var showcase_width_mob = document.getElementById('sa_showcase_width_mob').value;
465
+ if (jQuery.isNumeric(showcase_width_mob)) {
466
+ if ((showcase_width_mob >= 100) && (showcase_width_mob <= 180)) {
467
+ // valid number
468
+ } else {
469
+ document.getElementById('sa_showcase_width_mob').value = '140'; // number out of range
470
+ }
471
+ } else {
472
+ document.getElementById('sa_showcase_width_mob').value = '140'; // not a valid number
473
+ }
474
+ });
475
+
476
+ // ##### CLICK EVENT HANDLER FOR THE SHOWCASE CSS 'Copy to Clipboard' BUTTON #####
477
+ jQuery('#ss_css_value').click(function() {
478
+ var css_selector = document.getElementById('ss_css_value').innerHTML;
479
+ var aux = document.createElement("input"); // Create a "hidden" input
480
+ aux.setAttribute("value", css_selector); // Assign it the value of the specified element
481
+ document.body.appendChild(aux); // Append it to the body
482
+ aux.select(); // Highlight its content
483
+ document.execCommand("copy"); // Copy the highlighted text
484
+ document.body.removeChild(aux); // Remove it from the body
485
+ // DISPLAY 'Shortcode Copied' message
486
+ document.getElementById('ss_css_value').innerHTML = "Copied!";
487
+ setTimeout(function(){ document.getElementById('ss_css_value').innerHTML = css_selector; }, 1000);
488
+ });
489
+
490
+ // ##### CHANGE EVENT FOR 'Use Thumbnail Pagination' CHECKBOX #####
491
+ jQuery('#sa_thumbs_active').click(function() {
492
+ if (document.getElementById('sa_thumbs_active').checked) {
493
+ document.getElementById('sa_thumbs_settings').style.display = 'block';
494
+ jQuery('#sa_pagination').prop('checked', false); // uncheck 'Show Pagination' checkbox
495
+ } else {
496
+ document.getElementById('sa_thumbs_settings').style.display = 'none';
497
+ }
498
+ });
499
+
500
+ // ##### JQUERY-UI SPINNER - THUMBS CONTAINER PADDING #####
501
+ jQuery("#sa_thumbs_padding").spinner({
502
+ step: 0.1,
503
+ min: 0,
504
+ max: 10,
505
+ numberFormat: "n"
506
+ });
507
+ // ##### CHANGE EVENT HANDLER FOR THUMBS CONTAINER PADDING #####
508
+ jQuery('#sa_thumbs_padding').change(function() {
509
+ var thumbs_padding = document.getElementById('sa_thumbs_padding').value;
510
+ if (jQuery.isNumeric(thumbs_padding)) {
511
+ if ((thumbs_padding >= 0) && (thumbs_padding <= 10)) {
512
+ // valid number
513
+ } else {
514
+ document.getElementById('sa_thumbs_padding').value = '3'; // number out of range
515
+ }
516
+ } else {
517
+ document.getElementById('sa_thumbs_padding').value = '3'; // not a valid number
518
+ }
519
+ });
520
+
521
+ // ##### JQUERY-UI SPINNER - THUMBS WIDTH #####
522
+ jQuery("#sa_thumbs_width").spinner({
523
+ step: 1,
524
+ min: 10,
525
+ max: 300,
526
+ numberFormat: "n"
527
+ });
528
+ // ##### CHANGE EVENT HANDLER - THUMBS WIDTH #####
529
+ jQuery('#sa_thumbs_width').change(function() {
530
+ var thumbs_width = document.getElementById('sa_thumbs_width').value;
531
+ if (jQuery.isNumeric(thumbs_width)) {
532
+ if ((thumbs_width >= 10) && (thumbs_width <= 300)) {
533
+ // valid number
534
+ } else {
535
+ document.getElementById('sa_thumbs_width').value = '150'; // number out of range
536
+ }
537
+ } else {
538
+ document.getElementById('sa_thumbs_width').value = '150'; // not a valid number
539
+ }
540
+ });
541
+
542
+ // ##### JQUERY-UI SPINNER - THUMBS HEIGHT #####
543
+ jQuery("#sa_thumbs_height").spinner({
544
+ step: 1,
545
+ min: 10,
546
+ max: 300,
547
+ numberFormat: "n"
548
+ });
549
+ // ##### CHANGE EVENT HANDLER - THUMBS HEIGHT #####
550
+ jQuery('#sa_thumbs_height').change(function() {
551
+ var thumbs_height = document.getElementById('sa_thumbs_height').value;
552
+ if (jQuery.isNumeric(thumbs_height)) {
553
+ if ((thumbs_height >= 10) && (thumbs_height <= 300)) {
554
+ // valid number
555
+ } else {
556
+ document.getElementById('sa_thumbs_height').value = '85'; // number out of range
557
+ }
558
+ } else {
559
+ document.getElementById('sa_thumbs_height').value = '85'; // not a valid number
560
+ }
561
+ });
562
+
563
+ // ##### JQUERY-UI SPINNER - THUMBS OPACITY #####
564
+ jQuery("#sa_thumbs_opacity").spinner({
565
+ step: 1,
566
+ min: 0,
567
+ max: 100,
568
+ numberFormat: "n"
569
+ });
570
+ // ##### CHANGE EVENT HANDLER - THUMBS OPACITY #####
571
+ jQuery('#sa_thumbs_opacity').change(function() {
572
+ var thumbs_opacity = document.getElementById('sa_thumbs_opacity').value;
573
+ if (jQuery.isNumeric(thumbs_opacity)) {
574
+ if ((thumbs_opacity >= 0) && (thumbs_opacity <= 100)) {
575
+ // valid number
576
+ } else {
577
+ document.getElementById('sa_thumbs_opacity').value = '50'; // number out of range
578
+ }
579
+ } else {
580
+ document.getElementById('sa_thumbs_opacity').value = '50'; // not a valid number
581
+ }
582
+ });
583
+
584
+ // ##### JQUERY-UI SPINNER - THUMBS BORDER WIDTH #####
585
+ jQuery("#sa_thumbs_border_width").spinner({
586
+ step: 1,
587
+ min: 0,
588
+ max: 10,
589
+ numberFormat: "n"
590
+ });
591
+ // ##### CHANGE EVENT HANDLER - THUMBS BORDER WIDTH #####
592
+ jQuery('#sa_thumbs_border_width').change(function() {
593
+ var thumbs_border_width = document.getElementById('sa_thumbs_border_width').value;
594
+ if (jQuery.isNumeric(thumbs_border_width)) {
595
+ if ((thumbs_border_width >= 0) && (thumbs_border_width <= 10)) {
596
+ // valid number
597
+ } else {
598
+ document.getElementById('sa_thumbs_border_width').value = '0'; // number out of range
599
+ }
600
+ } else {
601
+ document.getElementById('sa_thumbs_border_width').value = '0'; // not a valid number
602
+ }
603
+ });
604
+
605
+ // ##### SPECTRUM COLOR PICKER - THUMBS BORDER COLOR #####
606
+ if (document.getElementById('sa_thumbs_border_color')) {
607
+ var thumbs_border_color = document.getElementById('sa_thumbs_border_color').value;
608
+ jQuery("#sa_thumbs_border_color").spectrum({
609
+ showPaletteOnly: true,
610
+ togglePaletteOnly: true,
611
+ togglePaletteMoreText: 'more',
612
+ togglePaletteLessText: 'less',
613
+ showInput: true,
614
+ allowEmpty:true,
615
+ preferredFormat: "rgb",
616
+ showAlpha: true,
617
+ color: thumbs_border_color,
618
+ palette: [
619
+ ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
620
+ ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
621
+ ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
622
+ ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
623
+ ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
624
+ ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
625
+ ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
626
+ ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
627
+ ]
628
+ });
629
+ }
630
+
631
+ // ##### JQUERY-UI SPINNER - TABLET THUMBS SIZE (PERCENTAGE) #####
632
+ jQuery("#sa_thumbs_resp_tablet").spinner({
633
+ step: 1,
634
+ min: 0,
635
+ max: 100,
636
+ numberFormat: "n"
637
+ });
638
+ // ##### CHANGE EVENT HANDLER - TABLET THUMBS SIZE (PERCENTAGE) #####
639
+ jQuery('#sa_thumbs_resp_tablet').change(function() {
640
+ var thumbs_resp_tablet = document.getElementById('sa_thumbs_resp_tablet').value;
641
+ if (jQuery.isNumeric(thumbs_resp_tablet)) {
642
+ if ((thumbs_resp_tablet >= 0) && (thumbs_resp_tablet <= 100)) {
643
+ // valid number
644
+ } else {
645
+ document.getElementById('sa_thumbs_resp_tablet').value = '75'; // number out of range
646
+ }
647
+ } else {
648
+ document.getElementById('sa_thumbs_resp_tablet').value = '75'; // not a valid number
649
+ }
650
+ });
651
+
652
+ // ##### JQUERY-UI SPINNER - MOBILE THUMBS SIZE (PERCENTAGE) #####
653
+ jQuery("#sa_thumbs_resp_mobile").spinner({
654
+ step: 1,
655
+ min: 0,
656
+ max: 100,
657
+ numberFormat: "n"
658
+ });
659
+ // ##### CHANGE EVENT HANDLER - MOBILE THUMBS SIZE (PERCENTAGE) #####
660
+ jQuery('#sa_thumbs_resp_mobile').change(function() {
661
+ var thumbs_resp_mobile = document.getElementById('sa_thumbs_resp_mobile').value;
662
+ if (jQuery.isNumeric(thumbs_resp_mobile)) {
663
+ if ((thumbs_resp_mobile >= 0) && (thumbs_resp_mobile <= 100)) {
664
+ // valid number
665
+ } else {
666
+ document.getElementById('sa_thumbs_resp_mobile').value = '50'; // number out of range
667
+ }
668
+ } else {
669
+ document.getElementById('sa_thumbs_resp_mobile').value = '50'; // not a valid number
670
+ }
671
+ });
672
+
673
+
674
+
675
+ // ################################
676
+ // ##### RE-ORDER SLIDES PAGE #####
677
+ // ################################
678
+
679
+ // ##### RE-ORDER SLIDES PAGE - JQUERY-UI SORTABLE ELEMENT #####
680
+ jQuery("#sar_sortable").sortable({
681
+ placeholder: 'ui-state-highlight',
682
+ cursor: 'move',
683
+ opacity: 0.7,
684
+ update: function(event, ui) {
685
+ var slide_order = jQuery(this).sortable('toArray').toString();
686
+ slide_order = slide_order.replace(/sar/g, "");
687
+ document.getElementById('sar_sort_order').value = slide_order;
688
+ }
689
+ });
690
+ jQuery("#sar_sortable" ).disableSelection();
691
+
692
+ // ##### RE-ORDER SLIDES PAGE - A 'DELETE SLIDE' CHECKBOX HAS BEEN CLICKED #####
693
+ jQuery('.sar_del_checkbox').click(function(event) {
694
+ var clicked_id = event.target.id;
695
+ var del_list = '';
696
+
697
+ // loop thought all 'delete slide' checkboxes looking for ones that have been checked
698
+ jQuery('.sar_del_checkbox').each(function (index, value) {
699
+ var checkbox_id = jQuery(this).attr('id');
700
+ if (jQuery('#' + checkbox_id).is(":checked")) {
701
+ var slide_no = checkbox_id.replace("sar_del", "");
702
+ if (del_list != '') { del_list += ','; }
703
+ del_list += slide_no;
704
+ }
705
+ });
706
+
707
+ // update the hidden 'delete slides' input box in the form
708
+ document.getElementById("sar_del_slides").value = del_list;
709
+
710
+ if (del_list == '') {
711
+ document.getElementById("sar_delete_but").style.display = 'none';
712
+ document.getElementById("sar_update_but").style.display = 'inline-block';
713
+ } else {
714
+ document.getElementById("sar_delete_but").style.display = 'inline-block';
715
+ document.getElementById("sar_update_but").style.display = 'none';
716
+ }
717
+ });
718
+
719
+ // ##### RE-ORDER SLIDES PAGE - 'UPDATE ORDER' BUTTON CLICKED #####
720
+ jQuery('#sar_update_but').click(function(event) {
721
+ document.getElementById("sar_del_slides").value = '';
722
+ });
723
+
724
+ // ##### RE-ORDER SLIDES PAGE - 'DELETE SLIDES' BUTTON CLICKED #####
725
+ jQuery('#sar_delete_but').click(function(event) {
726
+ document.getElementById("sar_sort_order").value = '';
727
+ });
728
+ })
729
+
730
+
731
+
732
+ // ##### ONE OF THE ITEMS DISPLAYED DROPDOWNS HAVE CHANGED #####
733
+ function items_displayed_changed() {
734
+ var width1 = jQuery("select[name='sa_items_width1']").val();
735
+ var width2 = jQuery("select[name='sa_items_width2']").val();
736
+ var width3 = jQuery("select[name='sa_items_width3']").val();
737
+ var width4 = jQuery("select[name='sa_items_width4']").val();
738
+ var width5 = jQuery("select[name='sa_items_width5']").val();
739
+ var width6 = jQuery("select[name='sa_items_width6']").val();
740
+ if ((width1 == '1') && (width2 == '1') && (width3 == '1') && (width4 == '1') && (width5 == '1') && (width6 == '1')) {
741
+ jQuery(".sa_items_all_one").css("display","block");
742
+ jQuery("#sa_showcase_slider_wrapper").css("display","none");
743
+ jQuery('#sa_showcase_slider').prop('checked', false); // uncheck 'Showcase Carousel' checkbox
744
+ jQuery("#sa_showcase_slider_pro").css("display","none");
745
+ } else {
746
+ jQuery(".sa_items_all_one").css("display","none");
747
+ jQuery('#sa_hero_slider').prop('checked', false); // uncheck 'Hero Slider' checkbox
748
+ jQuery("#sa_hero_slider_note").css("display","none");
749
+ jQuery("#sa_showcase_slider_wrapper").css("display","block");
750
+ }
751
+ }
752
+
753
+
754
+
755
+ // ##### CHANGE EVENT HANDLER FOR 'Use Popup Image as Slide Background' #####
756
+ function change_slide_popup_background(slide_no) {
757
+ var pro_version = document.getElementById('sa_pro_version').value;
758
+ if (pro_version == '1') {
759
+ var curr_value = jQuery('#sa_slide'+slide_no+'_popup_background').val();
760
+ if (curr_value != 'no') {
761
+ jQuery("#slide"+slide_no+"_thumb").css("display", "none");
762
+ jQuery("#slide"+slide_no+"_image_add").css("display", "none");
763
+ jQuery("#slide"+slide_no+"_imagebg_popup").css("display", "block");
764
+ } else {
765
+ jQuery("#slide"+slide_no+"_thumb").css("display", "block");
766
+ jQuery("#slide"+slide_no+"_image_add").css("display", "inline-block");
767
+ jQuery("#slide"+slide_no+"_imagebg_popup").css("display", "none");
768
+ }
769
+ }
770
+ }
771
+
772
+
773
+
774
+ jQuery(function() {
775
+ // THE VAIRABLE THAT HOLDS THE IFRAME FOR WORDPRESS MEDIA UPLOADS
776
+ var frame;
777
+
778
+ // ##### CLICK EVENT HANDLER - 'Set Background Image' LINK (BUTTON) FOR ALL SLIDES #####
779
+ jQuery('.slide_image_add').click(function(event) {
780
+ // GET THE SLIDE NUMBER (GET parameter within anchor 'href' attribute)
781
+ var anchor_element = event.target;
782
+ var upload_url = anchor_element.getAttribute('href');
783
+ var split_arr = upload_url.split("&slide=");
784
+ var slide_no = split_arr[1];
785
+
786
+ // PREVENT THE ANCHOR LINK FROM OPENING HREF TARGET PAGE
787
+ event.preventDefault();
788
+
789
+ // SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
790
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
791
+ var image_id = "#sa_slide" + slide_no + "_image_id";
792
+ var del_img_but = "#slide" + slide_no + "_image_del";
793
+
794
+ // CREATE A NEW MEDIA UPLOAD FRAME
795
+ frame = wp.media({
796
+ title: 'Select the background image for your slide',
797
+ button: {
798
+ text: 'Use selected image'
799
+ },
800
+ multiple: false // only a single file may be selected
801
+ });
802
+
803
+ // AN IMAGE HAS BEEN SELECTED WITHIN THE MEDIA UPLOAD FRAME...
804
+ frame.on('select', function() {
805
+ // Get media attachment details from the frame state
806
+ var attachment = frame.state().get('selection').first().toJSON();
807
+ // Set the background image of the thumbnail preview DIV to the attachment URL
808
+ if (attachment.sizes.medium && attachment.sizes.medium.url) {
809
+ jQuery(thumb_preview).css('background-image', 'url(' + attachment.sizes.medium.url + ')');
810
+ } else {
811
+ jQuery(thumb_preview).css('background-image', 'url(' + attachment.sizes.full.url + ')');
812
+ }
813
+ // Send the attachment id to our hidden input box
814
+ jQuery(image_id).val(attachment.id);
815
+ // Unhide the delete image button
816
+ jQuery(del_img_but).removeClass('sa_hidden');
817
+ });
818
+ // Finally, open the modal on click
819
+ frame.open();
820
+ });
821
+ })
822
+
823
+
824
+
825
+ // ##### CLICK EVENT HANDLER - 'Remove Background Image' BUTTON FOR ALL SLIDES #####
826
+ function remove_slide_bg_image(slide_no) {
827
+ // SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
828
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
829
+ var image_id = "#sa_slide" + slide_no + "_image_id";
830
+ var del_img_but = "#slide" + slide_no + "_image_del";
831
+
832
+ // Reset the background image of the thumbnail preview div
833
+ jQuery(thumb_preview).css('background-image', '');
834
+ // Delete the image id from the hidden input
835
+ jQuery(image_id).val('');
836
+ // Hide the delete image button
837
+ jQuery(del_img_but).addClass('sa_hidden');
838
+ }
839
+
840
+
841
+
842
+ // ##### CHANGE EVENT HANDLER - BACKGROUND POSITION DROPDOWN FOR ALL SLIDES #####
843
+ function change_slide_image_pos(slide_no) {
844
+ var background_pos = document.getElementById("sa_slide" + slide_no + "_image_pos").value;
845
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
846
+ jQuery(thumb_preview).css('background-position', background_pos);
847
+ }
848
+
849
+
850
+
851
+ // ##### CHANGE EVENT HANDLER - BACKGROUND SIZE DROPDOWN FOR ALL SLIDES #####
852
+ function change_slide_image_size(slide_no) {
853
+ var background_size = document.getElementById("sa_slide" + slide_no + "_image_size").value;
854
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
855
+ jQuery(thumb_preview).css('background-size', background_size);
856
+ }
857
+
858
+
859
+
860
+ // ##### CHANGE EVENT HANDLER - BACKGROUND REPEAT DROPDOWN FOR ALL SLIDES #####
861
+ function change_slide_image_repeat(slide_no) {
862
+ var background_repeat = document.getElementById("sa_slide" + slide_no + "_image_repeat").value;
863
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
864
+ jQuery(thumb_preview).css('background-repeat', background_repeat);
865
+ }
866
+
867
+
868
+
869
+ jQuery(function() {
870
+ if (document.getElementById('num_slides_id')) {
871
+ var num_slides = parseInt(document.getElementById('num_slides_id').value);
872
+ // ##### LOOP THRU EACH SLIDE #####
873
+ for (i = 1; i <= num_slides; i++) {
874
+ // ##### SPECTRUM COLOR PICKER - SLIDE BACKGROUND COLOR #####
875
+ var color_picker_id = 'sa_slide' + i + '_image_color';
876
+ var background_color = document.getElementById(color_picker_id).value;
877
+ jQuery('#' + color_picker_id).spectrum({
878
+ showPaletteOnly: true,
879
+ togglePaletteOnly: true,
880
+ togglePaletteMoreText: 'more',
881
+ togglePaletteLessText: 'less',
882
+ showInput: true,
883
+ allowEmpty: true,
884
+ preferredFormat: "rgb",
885
+ showAlpha: true,
886
+ color: background_color,
887
+ palette: [
888
+ ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
889
+ ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
890
+ ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
891
+ ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
892
+ ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
893
+ ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
894
+ ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
895
+ ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
896
+ ]
897
+ });
898
+ }
899
+ }
900
+ })
901
+ // ##### CHANGE EVENT HANDLER - SLIDE BACKGROUND COLOR PICKER #####
902
+ function change_slide_image_color(slide_no) {
903
+ var background_color = document.getElementById("sa_slide" + slide_no + "_image_color").value;
904
+ var thumb_preview = "#slide" + slide_no + "_thumb div";
905
+ jQuery(thumb_preview).css('background-color', background_color);
906
+ }
907
+
908
+
909
+ // ##############################################
910
+ // ##### SLIDE POPUP TAB - IMAGE POPUP TYPE #####
911
+ // ##############################################
912
+
913
+ // ##### CHANGE EVENT HANDLER - SA POPUP TYPE #####
914
+ function change_slide_popup_type(slide_no) {
915
+ var popup_type = document.getElementById("sa_slide" + slide_no + "_popup_type").value;
916
+ var image_popup_wrapper = "#slide" + slide_no + "_image_popup_wrapper";
917
+ var video_popup_wrapper = "#slide" + slide_no + "_video_popup_wrapper";
918
+ var html_popup_wrapper = "#slide" + slide_no + "_html_popup_wrapper";
919
+ if (popup_type == 'IMAGE') {
920
+ jQuery(image_popup_wrapper).css('display', 'block');
921
+ jQuery(video_popup_wrapper).css('display', 'none');
922
+ jQuery(html_popup_wrapper).css('display', 'none');
923
+ } else if (popup_type == 'VIDEO') {
924
+ jQuery(image_popup_wrapper).css('display', 'none');
925
+ jQuery(video_popup_wrapper).css('display', 'block');
926
+ jQuery(html_popup_wrapper).css('display', 'none');
927
+ } else if (popup_type == 'HTML') {
928
+ jQuery(image_popup_wrapper).css('display', 'none');
929
+ jQuery(video_popup_wrapper).css('display', 'none');
930
+ jQuery(html_popup_wrapper).css('display', 'block');
931
+ } else {
932
+ jQuery(image_popup_wrapper).css('display', 'none');
933
+ jQuery(video_popup_wrapper).css('display', 'none');
934
+ jQuery(html_popup_wrapper).css('display', 'none');
935
+ }
936
+ }
937
+
938
+ jQuery(function() {
939
+ if (jQuery('#sa_pro_version').length > 0) {
940
+ var pro_version = document.getElementById('sa_pro_version').value;
941
+ if (pro_version == '1') {
942
+ // THE VAIRABLE THAT HOLDS THE IFRAME FOR WORDPRESS MEDIA UPLOADS
943
+ var frame;
944
+
945
+ // ##### CLICK EVENT HANDLER - SLIDE IMAGE POPUP 'Set Image' BUTTON FOR ALL SLIDES #####
946
+ jQuery('.popup_image_add').click(function(event) {
947
+ // GET THE SLIDE NUMBER (GET parameter within anchor 'href' attribute)
948
+ var anchor_element = event.target;
949
+ var upload_url = anchor_element.getAttribute('href');
950
+ var split_arr = upload_url.split("&popup=");
951
+ var slide_no = split_arr[1];
952
+
953
+ // PREVENT THE ANCHOR LINK FROM OPENING HREF TARGET PAGE
954
+ event.preventDefault();
955
+
956
+ // SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
957
+ var thumb_preview = "#slide" + slide_no + "_popup_thumb";
958
+ var image_id = "#sa_slide" + slide_no + "_popup_imageid";
959
+ var del_img_but = "#slide" + slide_no + "_popup_image_del";
960
+ var preview_img_but = "#slide" + slide_no + "_popup_image_preview";
961
+ var info_dim = "#slide" + slide_no + "_popup_info_dim";
962
+ var info_size = "#slide" + slide_no + "_popup_info_size";
963
+
964
+ // CREATE A NEW MEDIA UPLOAD FRAME
965
+ frame = wp.media({
966
+ title: 'Select the popup image for your slide',
967
+ button: {
968
+ text: 'Use selected image'
969
+ },
970
+ multiple: false // only a single file may be selected
971
+ });
972
+
973
+ // AN IMAGE HAS BEEN SELECTED WITHIN THE MEDIA UPLOAD FRAME...
974
+ frame.on('select', function() {
975
+ // Get media attachment details from the frame state
976
+ var attachment = frame.state().get('selection').first().toJSON();
977
+ // Set the image source of the thumbnail preview IMG to the attachment URL
978
+ if (attachment.sizes.medium && attachment.sizes.medium.url) {
979
+ jQuery(thumb_preview+" div").html("<img src='" + attachment.sizes.medium.url + "'/>");
980
+ } else {
981
+ jQuery(thumb_preview+" div").html("<img src='" + attachment.sizes.full.url + "'/>");
982
+ }
983
+ // Send the attachment id to our hidden input box
984
+ jQuery(image_id).val(attachment.id);
985
+ // Unhide the delete image button
986
+ jQuery(del_img_but).removeClass('sa_hidden');
987
+ // Set the image URL for the popup
988
+ jQuery(preview_img_but + " a").attr("href", attachment.url);
989
+ // Update image info for the popup image
990
+ display_image_info(attachment.url, info_dim, info_size);
991
+ });
992
+ // Finally, open the modal on click
993
+ frame.open();
994
+ });
995
+ }
996
+ }
997
+ })
998
+
999
+ // ##### CLICK EVENT HANDLER - 'Remove Popup Image' BUTTON FOR ALL SLIDES #####
1000
+ function remove_popup_image(slide_no, placeholder) {
1001
+ // SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
1002
+ var thumb_preview = "#slide" + slide_no + "_popup_thumb";
1003
+ var image_id = "#sa_slide" + slide_no + "_popup_imageid";
1004
+ var del_img_but = "#slide" + slide_no + "_popup_image_del";
1005
+ var preview_img_but = "#slide" + slide_no + "_popup_image_preview";
1006
+ var info_dim = "#slide" + slide_no + "_popup_info_dim";
1007
+ var info_size = "#slide" + slide_no + "_popup_info_size";
1008
+
1009
+ // Reset the image source of the thumbnail preview div
1010
+ jQuery(thumb_preview+" div").html("<div><img src='" + placeholder + "'/></div>");
1011
+ // Delete the image id from the hidden input
1012
+ jQuery(image_id).val('');
1013
+ // Hide the delete image button
1014
+ jQuery(del_img_but).addClass('sa_hidden');
1015
+ // Set the image URL for the popup to a placeholder image
1016
+ jQuery(preview_img_but + " a").attr("href", placeholder);
1017
+ // clear image info
1018
+ jQuery(info_dim).html('<strong>Dimensions:</strong>');
1019
+ jQuery(info_size).html('<strong>File Size:</strong>');
1020
+ }
1021
+
1022
+ // ##### CHANGE EVENT HANDLER - 'Popup Title' TEXT INPUT BOX #####
1023
+ function change_popup_image_title(new_title, preview_img_but) {
1024
+ var preview_link = "#" + preview_img_but + " a";
1025
+ jQuery(preview_link).attr("title", new_title);
1026
+ }
1027
+
1028
+ // ###### GET IMAGE INFO (WIDTH, HEIGHT, SIZE) FOR PROVIDED IMAGE URL AND DISPLAY WITHIN PROVIDED DIV ID ######
1029
+ function display_image_info(image_url, info_dim, info_size) {
1030
+ var img = new Image();
1031
+ var img_width = 0;
1032
+ var img_height = 0;
1033
+ img.onload = function() {
1034
+ img_width = this.width;
1035
+ img_height = this.height;
1036
+ jQuery(info_dim).html("<strong>Dimensions:</strong> " + img_width + " x " + img_height + " pixels");
1037
+ };
1038
+ img.src = image_url;
1039
+
1040
+ var request;
1041
+ request = jQuery.ajax({
1042
+ type: "HEAD",
1043
+ url: image_url,
1044
+ success: function () {
1045
+ var img_size = request.getResponseHeader("Content-Length");
1046
+ if ((img_size != '') && (img_size != 'null') && (img_size != 0)) {
1047
+ var unit = 'bytes';
1048
+ if (img_size > 1048576) {
1049
+ img_size = img_size / 1048576;
1050
+ img_size = Math.round(img_size * 10) / 10;
1051
+ unit = 'MB';
1052
+ } else if (img_size > 1024) {
1053
+ img_size = img_size / 1024;
1054
+ img_size = Math.round(img_size * 10) / 10;
1055
+ unit = 'kb';
1056
+ }
1057
+ jQuery(info_size).html("<strong>File Size:</strong> " + img_size + " " + unit);
1058
+ }
1059
+ }
1060
+ });
1061
+ }
1062
+
1063
+
1064
+
1065
+ // ##############################################
1066
+ // ##### SLIDE POPUP TAB - VIDEO POPUP TYPE #####
1067
+ // ##############################################
1068
+
1069
+ // ##### CLICK EVENT HANDLER - SLIDE VIDEO POPUP 'Set Video' BUTTON #####
1070
+ function update_popup_video(slide_no) {
1071
+ // Get the contents of video URL input box
1072
+ var video_url = document.getElementById("sa_slide" + slide_no + "_video_url").value;
1073
+ var preview_button = "#slide" + slide_no + "_popup_video_preview a";
1074
+ var video_type = '';
1075
+ if (video_url != '') {
1076
+ // Check if the URL is a valid YouTube URL - if so then extract YouTube ID
1077
+ var video_id = video_url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);
1078
+ if (video_id != null) {
1079
+ valid_video_id = video_id[1];
1080
+ video_type = 'youtube';
1081
+ } else {
1082
+ // Check if the URL is a valid Vimeo URL - if so then extract Vimeo ID
1083
+ var regex = new RegExp(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);
1084
+ if (regex.test(video_url)) {
1085
+ valid_video_id = regex.exec(video_url)[5];
1086
+ video_type = 'vimeo';
1087
+ } else {
1088
+ // URL entered is not a valid YouTube or Vimeo video URL
1089
+ document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
1090
+ document.getElementById("sa_slide" + slide_no + "_video_invalid_url").style.display = "block";
1091
+ setTimeout(function(){ document.getElementById("sa_slide" + slide_no + "_video_invalid_url").style.display = "none"; }, 3000);
1092
+ }
1093
+ }
1094
+ }
1095
+ if (video_type == 'youtube') {
1096
+ // ##### SET SLIDE BACKGROUND IMAGE TO YOUTUBE THUMB IMAGE - 14 MAY 2020 - START #####
1097
+ // Get the YouTube video thumbnail image
1098
+ var youtube_thumb = "https://img.youtube.com/vi/" + valid_video_id + "/hqdefault.jpg";
1099
+ // Set the "Use Popup Image as Slide Background" dropdown to "No"
1100
+ var popup_bg_dropdown = "#sa_slide" + slide_no + "_popup_background";
1101
+ jQuery(popup_bg_dropdown).val('no');
1102
+ // Set the slide background "Set Image" button to be visible
1103
+ var set_image_button = "#slide" + slide_no + "_image_add";
1104
+ jQuery(set_image_button).css("display", "inline-block");
1105
+ // Set slide background IMAGE ID to 99999999 (this value indicates the YouTube thumb must be used)
1106
+ var slide_image_id = "#sa_slide" + slide_no + "_image_id";
1107
+ jQuery(slide_image_id).val(99999999);
1108
+ // Set the slide background "Preview Image" DIV background image to the YouTube Thumbnail
1109
+ var slide_imagebg_popup = "#slide" + slide_no + "_imagebg_popup";
1110
+ var slide_thumb = "#slide" + slide_no + "_thumb";
1111
+ jQuery(slide_thumb + " > div").css("background-image", "url('" + youtube_thumb + "')");
1112
+ jQuery(slide_imagebg_popup).css("display", "none");
1113
+ jQuery(slide_thumb).css("display", "block");
1114
+ // ##### SET SLIDE BACKGROUND IMAGE TO YOUTUBE THUMB IMAGE - 14 MAY 2020 - END #####
1115
+
1116
+ // clear video url input field
1117
+ document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
1118
+ // update hidden video id and video type fields
1119
+ document.getElementById("sa_slide" + slide_no + "_popup_video_id").value = valid_video_id;
1120
+ document.getElementById("sa_slide" + slide_no + "_popup_video_type").value = 'youtube';
1121
+ // Display YouTube video within video preview DIV
1122
+ var embed_html = "<iframe src='https://www.youtube.com/embed/" + valid_video_id + "' frameborder='0' allowfullscreen></iframe>";
1123
+ document.getElementById("slide" + slide_no + "_video_thumb").innerHTML = embed_html;
1124
+ // Set the video URL for the preview popup
1125
+ jQuery(preview_button).attr("href", "http://www.youtube.com/watch?v=" + valid_video_id);
1126
+ }
1127
+ if (video_type == 'vimeo') {
1128
+ // clear video url input field
1129
+ document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
1130
+ // update hidden video id and video type fields
1131
+ document.getElementById("sa_slide" + slide_no + "_popup_video_id").value = valid_video_id;
1132
+ document.getElementById("sa_slide" + slide_no + "_popup_video_type").value = 'vimeo';
1133
+ // Display Vimeo video within video preview DIV
1134
+ var embed_html = "<iframe src='https://player.vimeo.com/video/" + valid_video_id + "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
1135
+ document.getElementById("slide" + slide_no + "_video_thumb").innerHTML = embed_html;
1136
+ // Set the video URL for the preview popup
1137
+ jQuery(preview_button).attr("href", "http://vimeo.com/" + valid_video_id);
1138
+ }
1139
+ }
1140
+
1141
+
1142
+
1143
+ // #############################################
1144
+ // ##### SLIDE POPUP TAB - HTML POPUP TYPE #####
1145
+ // #############################################
1146
+
1147
+ // ##### SLIDE HTML POPUP 'Background Color' & 'Popup Width' #####
1148
+ jQuery(function() {
1149
+ if (jQuery('#sa_pro_version').length > 0) {
1150
+ var pro_version = document.getElementById('sa_pro_version').value;
1151
+ if (pro_version == '1') {
1152
+ var num_slides = parseInt(document.getElementById('num_slides_id').value);
1153
+ // ##### LOOP THRU EACH SLIDE #####
1154
+ for (i = 1; i <= num_slides; i++) {
1155
+ // ##### SPECTRUM COLOR PICKER - SLIDE HTML POPUP 'Background Color' #####
1156
+ var color_picker_id = 'sa_slide' + i + '_popup_bgcol';
1157
+ var background_color = document.getElementById(color_picker_id).value;
1158
+ jQuery('#' + color_picker_id).spectrum({
1159
+ showPaletteOnly: true,
1160
+ togglePaletteOnly: true,
1161
+ togglePaletteMoreText: 'more',
1162
+ togglePaletteLessText: 'less',
1163
+ showInput: true,
1164
+ allowEmpty: true,
1165
+ preferredFormat: "rgb",
1166
+ showAlpha: true,
1167
+ color: background_color,
1168
+ palette: [
1169
+ ["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
1170
+ ["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
1171
+ ["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
1172
+ ["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
1173
+ ["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
1174
+ ["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
1175
+ ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
1176
+ ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
1177
+ ]
1178
+ });
1179
+ // ##### JQUERY-UI SPINNER - SLIDE HTML POPUP 'Popup Width' #####
1180
+ var spinner_id = 'sa_slide' + i + '_popup_width';
1181
+ jQuery("#" + spinner_id).spinner({
1182
+ step: 1,
1183
+ min: 200,
1184
+ max: 2000,
1185
+ numberFormat: "n"
1186
+ });
1187
+
1188
+ // ##### CLICK EVENT FOR 'Popup CSS ID' (HTML POPUP) #####
1189
+ var popup_cssid = 'sa_slide' + i + '_popup_css';
1190
+ jQuery("#" + popup_cssid).click(function() {
1191
+ var css_selector = jQuery(this).html();
1192
+ var aux = document.createElement("input"); // Create a "hidden" input
1193
+ aux.setAttribute("value", css_selector); // Assign it the value of the specified element
1194
+ document.body.appendChild(aux); // Append it to the body
1195
+ aux.select(); // Highlight its content
1196
+ document.execCommand("copy"); // Copy the highlighted text
1197
+ document.body.removeChild(aux); // Remove it from the body
1198
+ var curr_col = jQuery(this).css("color");
1199
+ if (curr_col == "rgb(0, 0, 0)") {
1200
+ jQuery(this).css("color", "firebrick");
1201
+ } else {
1202
+ jQuery(this).css("color", "#000000");
1203
+ }
1204
+ });
1205
+ }
1206
+ }
1207
+ }
1208
+ })
1209
+
1210
+
1211
+
1212
+ // ##### CLICK EVENT HANDLER FOR THE 'Delete Slide' BUTTON (FOR EACH SLIDE) #####
1213
+ // Set the hidden 'delete status' input field to zero and save the custom post type
1214
+ function delete_sa_slide(delete_id) {
1215
+ jQuery(function() {
1216
+ var dialog_box = document.getElementById('sa_dialog_box');
1217
+ dialog_box.innerHTML = "Click the <strong>OK</strong> button to delete this slide.";
1218
+ jQuery("#sa_dialog_box").dialog({ title: 'DELETE SLIDE' });
1219
+ jQuery("#sa_dialog_box").dialog({
1220
+ buttons: {
1221
+ OK: function() {
1222
+ var del_status = document.getElementById(delete_id);
1223
+ del_status.value = "0";
1224
+ // set hidden input field to notify that a status message must be displayed
1225
+ var info_deleted = document.getElementById('sa_info_deleted');
1226
+ info_deleted.value = "1";
1227
+ // save the custom post type
1228
+ jQuery('body').css('cursor', 'wait');
1229
+ jQuery('.ui-button').css('cursor', 'wait');
1230
+ jQuery('#publish').click();
1231
+ },
1232
+ Cancel: function() {
1233
+ jQuery(this).dialog("close");
1234
+ }
1235
+ }
1236
+ });
1237
+ jQuery("#sa_dialog_box").dialog("open");
1238
+ })
1239
+ }
1240
+
1241
+ // ##### CLICK EVENT HANDLER FOR THE 'Duplicate Slide' BUTTON (FOR EACH SLIDE) #####
1242
+ // Set the hidden 'duplicate slide' input field to the slide number to be duplicated and save the custom post type
1243
+ function duplicate_slide(slide_no) {
1244
+ jQuery(function() {
1245
+ var dialog_box = document.getElementById('sa_dialog_box');
1246
+ dialog_box.innerHTML = "Click the <strong>OK</strong> button to make a duplicate (copy) of this slide.";
1247
+ jQuery("#sa_dialog_box").dialog({ title: 'DUPLICATE SLIDE' });
1248
+ jQuery("#sa_dialog_box").dialog({
1249
+ buttons: {
1250
+ OK: function() {
1251
+ // set hidden 'duplicate slide' input field to the slide number to be duplicated
1252
+ var duplicate_slide = document.getElementById('sa_duplicate_slide');
1253
+ duplicate_slide.value = slide_no;
1254
+ // set hidden input field to notify that a status message must be displayed
1255
+ var info_duplicated = document.getElementById('sa_info_duplicated');
1256
+ info_duplicated.value = "1";
1257
+ // save the custom post type
1258
+ jQuery('body').css('cursor', 'wait');
1259
+ jQuery('.ui-button').css('cursor', 'wait');
1260
+ jQuery('#publish').click();
1261
+ },
1262
+ Cancel: function() {
1263
+ jQuery(this).dialog("close");
1264
+ }
1265
+ }
1266
+ });
1267
+ jQuery("#sa_dialog_box").dialog("open");
1268
+ })
1269
+ }
1270
+
1271
+ // ##### CLICK EVENT HANDLER FOR THE 'Move Slide Up' BUTTON (FOR EACH SLIDE) #####
1272
+ // Set the hidden 'move slide up' input field to the slide number to be moved up and save the custom post type
1273
+ function move_slide_up(slide_no) {
1274
+ jQuery(function() {
1275
+ var dialog_box = document.getElementById('sa_dialog_box');
1276
+ dialog_box.innerHTML = "Click the <strong>OK</strong> button to move this slide up within the slide order.";
1277
+ jQuery("#sa_dialog_box").dialog({ title: 'MOVE SLIDE UP' });
1278
+ jQuery("#sa_dialog_box").dialog({
1279
+ buttons: {
1280
+ OK: function() {
1281
+ // set hidden 'move slide up' input field to the slide number to be moved
1282
+ var move_slide_up = document.getElementById('sa_move_slide_up');
1283
+ move_slide_up.value = slide_no;
1284
+ // set hidden input field to notify that a status message must be displayed
1285
+ var info_moved = document.getElementById('sa_info_moved');
1286
+ info_moved.value = "1";
1287
+ // save the custom post type
1288
+ jQuery('body').css('cursor', 'wait');
1289
+ jQuery('.ui-button').css('cursor', 'wait');
1290
+ jQuery('#publish').click();
1291
+ },
1292
+ Cancel: function() {
1293
+ jQuery(this).dialog("close");
1294
+ }
1295
+ }
1296
+ });
1297
+ jQuery("#sa_dialog_box").dialog("open");
1298
+ })
1299
+ }
trunk/magnific-popup/jquery.magnific-popup.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! Magnific Popup - v1.1.0 - 2016-02-20
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2016 Dmitry Semenov; */
4
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
trunk/magnific-popup/magnific-popup.css ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Magnific Popup CSS */
2
+ .mfp-bg {
3
+ top: 0px !important;
4
+ left: 0px !important;
5
+ width: 100% !important;
6
+ height: 100% !important;
7
+ z-index: 100042 !important;
8
+ overflow: hidden !important;
9
+ position: fixed !important;
10
+ background: #000000 !important;
11
+ opacity: 0.8 !important;
12
+ }
13
+ .sa_popup {
14
+ top: 0 !important;
15
+ left: 0 !important;
16
+ width: 100% !important;
17
+ height: 100% !important;
18
+ z-index: 100043 !important;
19
+ position: fixed !important;
20
+ outline: none !important;
21
+ -webkit-backface-visibility: hidden !important;
22
+ }
23
+ .sa_popup .mfp-container {
24
+ text-align: center !important;
25
+ position: absolute !important;
26
+ width: 100% !important;
27
+ height: 100% !important;
28
+ left: 0px !important;
29
+ top: 0px !important;
30
+ padding: 0 8px !important;
31
+ box-sizing: border-box !important;
32
+ }
33
+ .sa_popup .mfp-container:before {
34
+ content: '' !important;
35
+ display: inline-block !important;
36
+ height: 100% !important;
37
+ vertical-align: middle !important;
38
+ }
39
+ .sa_popup .mfp-align-top .mfp-container:before {
40
+ display: none !important;
41
+ }
42
+ .sa_popup .mfp-content {
43
+ position: relative !important;
44
+ display: inline-block !important;
45
+ vertical-align: middle !important;
46
+ margin: 0px auto !important;
47
+ text-align: left !important;
48
+ z-index: 100045 !important;
49
+ }
50
+ .sa_popup .mfp-inline-holder .mfp-content,
51
+ .sa_popup .mfp-ajax-holder .mfp-content {
52
+ width: 100% !important;
53
+ cursor: auto !important;
54
+ }
55
+ .sa_popup .mfp-ajax-cur {
56
+ cursor: progress !important;
57
+ }
58
+ .sa_popup .mfp-zoom-out-cur, .sa_popup .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
59
+ cursor: -moz-zoom-out !important;
60
+ cursor: -webkit-zoom-out !important;
61
+ cursor: zoom-out !important;
62
+ }
63
+ .sa_popup .mfp-zoom {
64
+ cursor: pointer !important;
65
+ cursor: -webkit-zoom-in !important;
66
+ cursor: -moz-zoom-in !important;
67
+ cursor: zoom-in !important;
68
+ }
69
+ .sa_popup .mfp-auto-cursor .mfp-content {
70
+ cursor: auto !important;
71
+ }
72
+ .sa_popup .mfp-close,
73
+ .sa_popup .mfp-arrow,
74
+ .sa_popup .mfp-preloader,
75
+ .sa_popup .mfp-counter {
76
+ -webkit-user-select: none !important;
77
+ -moz-user-select: none !important;
78
+ user-select: none !important;
79
+ }
80
+ .sa_popup .mfp-loading.mfp-figure {
81
+ display: none !important;
82
+ }
83
+ .sa_popup .mfp-hide {
84
+ display: none !important;
85
+ }
86
+ .sa_popup .mfp-preloader {
87
+ color: #cccccc !important;
88
+ position: absolute !important;
89
+ top: 50% !important;
90
+ width: auto !important;
91
+ text-align: center !important;
92
+ margin-top: -0.8em !important;
93
+ left: 8px !important;
94
+ right: 8px !important;
95
+ z-index: 100044 !important;
96
+ }
97
+ .sa_popup .mfp-preloader a {
98
+ color: #cccccc !important;
99
+ }
100
+ .sa_popup .mfp-preloader a:hover {
101
+ color: #ffffff !important;
102
+ }
103
+ .sa_popup .mfp-s-ready .mfp-preloader {
104
+ display: none !important;
105
+ }
106
+ .sa_popup .mfp-s-error .mfp-content {
107
+ display: none !important;
108
+ }
109
+ .sa_popup button.mfp-close,
110
+ .sa_popup button.mfp-arrow {
111
+ overflow: visible !important;
112
+ cursor: pointer !important;
113
+ background: transparent !important;
114
+ border: 0 !important;
115
+ -webkit-appearance: none !important;
116
+ display: block !important;
117
+ outline: none !important;
118
+ padding: 0 !important;
119
+ z-index: 100046 !important;
120
+ box-shadow: none !important;
121
+ touch-action: manipulation !important;
122
+ }
123
+ .sa_popup button::-moz-focus-inner {
124
+ padding: 0 !important;
125
+ border: 0 !important;
126
+ }
127
+ .sa_popup .mfp-close {
128
+ width: 44px !important;
129
+ height: 44px !important;
130
+ line-height: 44px !important;
131
+ position: absolute !important;
132
+ right: 0px !important;
133
+ top: 0px !important;
134
+ text-decoration: none !important;
135
+ text-align: center !important;
136
+ opacity: 0.6 !important;
137
+ padding:0px 5px 0px 0px !important;
138
+ color: #ffff !important;
139
+ font-style: normal !important;
140
+ font-size: 32px !important;
141
+ font-family: Arial, Baskerville, monospace !important;
142
+ }
143
+ .sa_popup .mfp-close:hover {
144
+ opacity: 1.0 !important;
145
+ }
146
+ .sa_popup .mfp-close-btn-in .mfp-close {
147
+ color: #333 !important;
148
+ }
149
+ .sa_popup .mfp-image-holder .mfp-close,
150
+ .sa_popup .mfp-iframe-holder .mfp-close {
151
+ color: #ffffff !important;
152
+ right: 0px !important;
153
+ text-align: right !important;
154
+ padding-right: 0px !important;
155
+ width: 100% !important;
156
+ transition:all .3s ease-in-out;
157
+ -webkit-transition:all .3s ease-in-out;
158
+ -moz-transition:all .3s ease-in-out;
159
+ -o-transition:all .3s ease-in-out;
160
+ }
161
+ .sa_popup .mfp-counter {
162
+ position: absolute !important;
163
+ top: 0px !important;
164
+ right: 3px !important;
165
+ color: #c0c0c0 !important;
166
+ font-size: 12px !important;
167
+ line-height: 18px !important;
168
+ white-space: nowrap !important;
169
+ }
170
+ .sa_popup .mfp-arrow {
171
+ position: absolute !important;
172
+ opacity: 0.6 !important;
173
+ margin: 0 !important;
174
+ top: 50% !important;
175
+ margin-top: -24px !important;
176
+ padding: 0 !important;
177
+ width: 48px !important;
178
+ height: 48px !important;
179
+ background-color:rgba(255,255,255,0.0) !important;
180
+ -webkit-tap-highlight-color: transparent;
181
+ transition:all .3s ease-in-out;
182
+ -webkit-transition:all .3s ease-in-out;
183
+ -moz-transition:all .3s ease-in-out;
184
+ -o-transition:all .3s ease-in-out;
185
+ }
186
+ .sa_popup .mfp-container .mfp-arrow:hover {
187
+ opacity: 1.0 !important;
188
+ background-color:rgba(255,255,255,0.2) !important;
189
+ }
190
+ .sa_popup .mfp-arrow:before,
191
+ .sa_popup .mfp-arrow:after {
192
+ content: '' !important;
193
+ display: block !important;
194
+ width: 0 !important;
195
+ height: 0 !important;
196
+ position: absolute !important;
197
+ left: 0 !important;
198
+ top: 0 !important;
199
+ margin-top: 11px !important;
200
+ margin-left: 35px !important;
201
+ border: medium inset transparent;
202
+ }
203
+ .sa_popup .mfp-arrow:after {
204
+ display:none !important;
205
+ border-top-width: 13px !important;
206
+ border-bottom-width: 13px !important;
207
+ }
208
+ .sa_popup .mfp-arrow:before {
209
+ border-top-width: 13px !important;
210
+ border-bottom-width: 13px !important;
211
+ opacity: 1.0 !important;
212
+ }
213
+ .sa_popup .mfp-arrow-left {
214
+ left: 0 !important;
215
+ }
216
+ .sa_popup .mfp-arrow-left:before {
217
+ margin-left: 12px !important;
218
+ margin-right: 16px !important;
219
+ border-right: 17px solid #ffffff !important;
220
+ }
221
+ .sa_popup .mfp-arrow-left:after {
222
+ border-right: 17px solid #ffffff !important;
223
+ margin-left: 31px !important;
224
+ margin-right: 0px !important;
225
+ }
226
+ .sa_popup .mfp-arrow-right {
227
+ right: 0 !important;
228
+ }
229
+ .sa_popup .mfp-arrow-right:before {
230
+ margin-left: 16px !important;
231
+ margin-right: 12px !important;
232
+ border-left: 17px solid #ffffff !important;
233
+ }
234
+ .sa_popup .mfp-arrow-right:after {
235
+ border-left: 17px solid #ffffff !important;
236
+ margin-left: 39px !important;
237
+ margin-right: 0px !important;
238
+ }
239
+ .sa_popup .mfp-iframe-holder {
240
+ padding-top: 40px !important;
241
+ padding-bottom: 40px !important;
242
+ }
243
+ .sa_popup .mfp-iframe-holder .mfp-content {
244
+ line-height: 0 !important;
245
+ width: 100% !important;
246
+ max-width: 900px !important;
247
+ }
248
+ .sa_popup .mfp-iframe-holder .mfp-close {
249
+ top: -40px !important;
250
+ }
251
+ .sa_popup .mfp-iframe-scaler {
252
+ width: 100% !important;
253
+ height: 0 !important;
254
+ overflow: hidden !important;
255
+ padding-top: 56.25% !important;
256
+ }
257
+ .sa_popup .mfp-iframe-scaler iframe {
258
+ position: absolute !important;
259
+ display: block !important;
260
+ top: 0px !important;
261
+ left: 0px !important;
262
+ width: 100% !important;
263
+ height: 100% !important;
264
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !important;
265
+ background: #000000 !important;
266
+ }
267
+ /* Main image in popup */
268
+ .sa_popup img.mfp-img {
269
+ width: auto !important;
270
+ max-width: 100% !important;
271
+ height: auto !important;
272
+ display: block !important;
273
+ line-height: 0 !important;
274
+ box-sizing: border-box !important;
275
+ padding: 40px 0 40px !important;
276
+ margin: 0 auto !important;
277
+ }
278
+ /* The shadow behind the image */
279
+ .sa_popup .mfp-figure {
280
+ line-height: 0 !important;
281
+ }
282
+ .sa_popup .mfp-figure:after {
283
+ content: '' !important;
284
+ position: absolute !important;
285
+ left: 0 !important;
286
+ top: 40px !important;
287
+ bottom: 40px !important;
288
+ display: block !important;
289
+ right: 0px !important;
290
+ width: auto !important;
291
+ height: auto !important;
292
+ z-index: -1 !important;
293
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !important;
294
+ background: #444444 !important;
295
+ }
296
+ .sa_popup .mfp-figure small {
297
+ color: #c0c0c0 !important;
298
+ display: block !important;
299
+ font-size: 12px !important;
300
+ line-height: 14px !important;
301
+ }
302
+ .sa_popup .mfp-figure figure {
303
+ margin: 0 !important;
304
+ }
305
+ .sa_popup .mfp-bottom-bar {
306
+ box-sizing: border-box !important;
307
+ margin-top: -36px !important;
308
+ padding: 0px 3px !important;
309
+ position: absolute !important;
310
+ top: 100% !important;
311
+ left: 0 !important;
312
+ width: 100% !important;
313
+ cursor: auto !important;
314
+ }
315
+ .sa_popup .mfp-title {
316
+ text-align: left !important;
317
+ font-size:16px !important;
318
+ line-height: 20px !important;
319
+ color: #ffffff !important;
320
+ word-wrap: break-word !important;
321
+ padding-right: 45px !important;
322
+ }
323
+ .sa_popup .mfp-image-holder .mfp-content {
324
+ max-width: 100% !important;
325
+ }
326
+ .sa_popup .mfp-gallery .mfp-image-holder .mfp-figure {
327
+ cursor: pointer !important;
328
+ }
329
+
330
+ @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
331
+ /* Remove all paddings around the image on small screen */
332
+ .sa_popup .mfp-img-mobile .mfp-image-holder { padding-left: 0px !important; padding-right: 0px !important; }
333
+ .sa_popup .mfp-img-mobile img.mfp-img { padding: 0px !important; }
334
+ .sa_popup .mfp-img-mobile .mfp-figure:after { top: 0px !important; bottom: 0px !important; }
335
+ .sa_popup .mfp-img-mobile .mfp-figure small { display: inline !important; margin-left: 5px !important; }
336
+ .sa_popup .mfp-img-mobile .mfp-bottom-bar {
337
+ background: rgba(0, 0, 0, 0.6) !important; bottom: 0px !important; margin: 0px !important; top: auto !important;
338
+ padding: 3px 5px !important; position: fixed !important; box-sizing: border-box !important; }
339
+ }
340
+ @media all and (max-width: 767px) {
341
+ .sa_popup .mfp-title { font-size: 14px !important; line-height: 18px !important; }
342
+ .sa_popup .mfp-arrow { -webkit-transform: scale(0.75) !important; transform: scale(0.75) !important; }
343
+ .sa_popup .mfp-arrow-left { -webkit-transform-origin: 0 !important; transform-origin: 0 !important; }
344
+ .sa_popup .mfp-arrow-right { -webkit-transform-origin: 100% !important; transform-origin: 100% !important; }
345
+ .sa_popup .mfp-container { padding-left: 5px !important; padding-right: 5px !important; }
346
+ }
trunk/owl-carousel/animate.min.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ @charset "UTF-8";/*!
2
+ * animate.css -http://daneden.me/animate
3
+ * Version - 3.5.1
4
+ * Licensed under the MIT license - http://opensource.org/licenses/MIT
5
+ *
6
+ * Copyright (c) 2016 Daniel Eden
7
+ */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}@keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}@keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}@keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}.flipInY,.flipOutX{-webkit-backface-visibility:visible!important}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}
trunk/owl-carousel/owl.carousel.css ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Owl Carousel v2.3.4
3
+ * Copyright 2013-2018 David Deutsch
4
+ * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
+ */
6
+ /*
7
+ * Owl Carousel - Core
8
+ */
9
+ .owl-carousel {
10
+ display: none;
11
+ width: 100%;
12
+ -webkit-tap-highlight-color: transparent;
13
+ /* position relative and z-index fix webkit rendering fonts issue */
14
+ position: relative;
15
+ z-index: 1; }
16
+ .owl-carousel .owl-stage {
17
+ position: relative;
18
+ -ms-touch-action: pan-Y;
19
+ touch-action: manipulation;
20
+ -moz-backface-visibility: hidden;
21
+ /* fix firefox animation glitch */ }
22
+ .owl-carousel .owl-stage:after {
23
+ content: ".";
24
+ display: block;
25
+ clear: both;
26
+ visibility: hidden;
27
+ line-height: 0;
28
+ height: 0; }
29
+ .owl-carousel .owl-stage-outer {
30
+ position: relative;
31
+ overflow: hidden;
32
+ /* fix for flashing background */
33
+ -webkit-transform: translate3d(0px, 0px, 0px); }
34
+ .owl-carousel .owl-wrapper,
35
+ .owl-carousel .owl-item {
36
+ -webkit-backface-visibility: hidden;
37
+ -moz-backface-visibility: hidden;
38
+ -ms-backface-visibility: hidden;
39
+ -webkit-transform: translate3d(0, 0, 0);
40
+ -moz-transform: translate3d(0, 0, 0);
41
+ -ms-transform: translate3d(0, 0, 0); }
42
+ .owl-carousel .owl-item {
43
+ position: relative;
44
+ min-height: 1px;
45
+ float: left;
46
+ -webkit-backface-visibility: hidden;
47
+ -webkit-tap-highlight-color: transparent;
48
+ -webkit-touch-callout: none; }
49
+ /* CHANGED CSS STYLE USED FOR SLIDE IMAGES - SLIDE ANYTHING (SIMON EDGE) - 26/02/2018 */
50
+ .owl-carousel .owl-item img {
51
+ display: inline;
52
+ width: auto;
53
+ height: auto;
54
+ max-width: 100%; }
55
+ .owl-carousel .owl-nav.disabled,
56
+ .owl-carousel .owl-dots.disabled {
57
+ display: none; }
58
+ .owl-carousel .owl-nav .owl-prev,
59
+ .owl-carousel .owl-nav .owl-next,
60
+ .owl-carousel .owl-dot {
61
+ cursor: pointer;
62
+ -webkit-user-select: none;
63
+ -khtml-user-select: none;
64
+ -moz-user-select: none;
65
+ -ms-user-select: none;
66
+ user-select: none; }
67
+ .owl-carousel .owl-nav button.owl-prev,
68
+ .owl-carousel .owl-nav button.owl-next,
69
+ .owl-carousel button.owl-dot {
70
+ background: none;
71
+ color: inherit;
72
+ border: none;
73
+ padding: 0 !important;
74
+ font: inherit; }
75
+ .owl-carousel.owl-loaded {
76
+ display: block; }
77
+ .owl-carousel.owl-loading {
78
+ opacity: 0;
79
+ display: block; }
80
+ .owl-carousel.owl-hidden {
81
+ opacity: 0; }
82
+ .owl-carousel.owl-refresh .owl-item {
83
+ visibility: hidden; }
84
+ .owl-carousel.owl-drag .owl-item {
85
+ -ms-touch-action: pan-y;
86
+ touch-action: pan-y;
87
+ -webkit-user-select: none;
88
+ -moz-user-select: none;
89
+ -ms-user-select: none;
90
+ user-select: none; }
91
+ .owl-carousel.owl-grab {
92
+ cursor: move;
93
+ cursor: grab; }
94
+ .owl-carousel.owl-rtl {
95
+ direction: rtl; }
96
+ .owl-carousel.owl-rtl .owl-item {
97
+ float: right; }
98
+
99
+ /* No Js */
100
+ .no-js .owl-carousel {
101
+ display: block; }
102
+
103
+ /*
104
+ * Owl Carousel - Animate Plugin
105
+ */
106
+ .owl-carousel .animated {
107
+ animation-duration: 1000ms;
108
+ animation-fill-mode: both; }
109
+
110
+ .owl-carousel .owl-animated-in {
111
+ z-index: 0; }
112
+
113
+ .owl-carousel .owl-animated-out {
114
+ z-index: 1; }
115
+
116
+ .owl-carousel .fadeOut {
117
+ animation-name: fadeOut; }
118
+
119
+ @keyframes fadeOut {
120
+ 0% {
121
+ opacity: 1; }
122
+ 100% {
123
+ opacity: 0; } }
124
+
125
+ /*
126
+ * Owl Carousel - Auto Height Plugin
127
+ */
128
+ .owl-height {
129
+ transition: height 500ms ease-in-out; }
130
+
131
+ /*
132
+ * Owl Carousel - Lazy Load Plugin
133
+ */
134
+ .owl-carousel .owl-item {
135
+ /**
136
+ This is introduced due to a bug in IE11 where lazy loading combined with autoheight plugin causes a wrong
137
+ calculation of the height of the owl-item that breaks page layouts
138
+ */ }
139
+ .owl-carousel .owl-item .owl-lazy {
140
+ opacity: 0;
141
+ transition: opacity 400ms ease; }
142
+ .owl-carousel .owl-item .owl-lazy[src^=""], .owl-carousel .owl-item .owl-lazy:not([src]) {
143
+ max-height: 0; }
144
+ .owl-carousel .owl-item img.owl-lazy {
145
+ transform-style: preserve-3d; }
146
+
147
+ /*
148
+ * Owl Carousel - Video Plugin
149
+ */
150
+ .owl-carousel .owl-video-wrapper {
151
+ position: relative;
152
+ height: 100%;
153
+ background: #000; }
154
+
155
+ .owl-carousel .owl-video-play-icon {
156
+ position: absolute;
157
+ height: 80px;
158
+ width: 80px;
159
+ left: 50%;
160
+ top: 50%;
161
+ margin-left: -40px;
162
+ margin-top: -40px;
163
+ background: url("owl.video.play.png") no-repeat;
164
+ cursor: pointer;
165
+ z-index: 1;
166
+ -webkit-backface-visibility: hidden;
167
+ transition: transform 100ms ease; }
168
+
169
+ .owl-carousel .owl-video-play-icon:hover {
170
+ -ms-transform: scale(1.3, 1.3);
171
+ transform: scale(1.3, 1.3); }
172
+
173
+ .owl-carousel .owl-video-playing .owl-video-tn,
174
+ .owl-carousel .owl-video-playing .owl-video-play-icon {
175
+ display: none; }
176
+
177
+ .owl-carousel .owl-video-tn {
178
+ opacity: 0;
179
+ height: 100%;
180
+ background-position: center center;
181
+ background-repeat: no-repeat;
182
+ background-size: contain;
183
+ transition: opacity 400ms ease; }
184
+
185
+ .owl-carousel .owl-video-frame {
186
+ position: relative;
187
+ z-index: 1;
188
+ height: 100%;
189
+ width: 100%; }
trunk/owl-carousel/owl.carousel.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /**
2
+ * Owl Carousel v2.3.4
3
+ * Copyright 2013-2018 David Deutsch
4
+ * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
+ */
6
+ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
7
+ animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
trunk/owl-carousel/owl.carousel2.thumbs.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! owl.carousel2.thumbs - v0.1.8 | (c) 2016 @gijsroge | MIT license | https://github.com/gijsroge/OwlCarousel2-Thumbs */
2
+ !function(a,b,c,d){"use strict";var e=function(b){this.owl=b,this._thumbcontent=[],this._identifier=0,this.owl_currentitem=this.owl.options.startPosition,this.$element=this.owl.$element,this._handlers={"prepared.owl.carousel":a.proxy(function(b){if(!b.namespace||!this.owl.options.thumbs||this.owl.options.thumbImage||this.owl.options.thumbsPrerendered||this.owl.options.thumbImage){if(b.namespace&&this.owl.options.thumbs&&this.owl.options.thumbImage){var c=a(b.content).find("img");this._thumbcontent.push(c)}}else a(b.content).find("[data-thumb]").attr("data-thumb")!==d&&this._thumbcontent.push(a(b.content).find("[data-thumb]").attr("data-thumb"))},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this.owl.options.thumbs&&(this.render(),this.listen(),this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this.owl.options.thumbs&&(this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this)},this.owl.options=a.extend({},e.Defaults,this.owl.options),this.owl.$element.on(this._handlers)};e.Defaults={thumbs:!0,thumbImage:!1,thumbContainerClass:"owl-thumbs",thumbItemClass:"owl-thumb-item",moveThumbsInside:!1},e.prototype.listen=function(){var b=this.owl.options;b.thumbsPrerendered&&(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass)),a(this._thumbcontent._thumbcontainer).on("click",this._thumbcontent._thumbcontainer.children(),a.proxy(function(c){this._identifier=a(c.target).closest("."+b.thumbContainerClass).data("slider-id");var d=a(c.target).parent().is(this._thumbcontent._thumbcontainer)?a(c.target).index():a(c.target).closest("."+b.thumbItemClass).index();b.thumbsPrerendered?a("[data-slider-id="+this._identifier+"]").trigger("to.owl.carousel",[d,b.dotsSpeed,!0]):this.owl.to(d,b.dotsSpeed),c.preventDefault()},this))},e.prototype.render=function(){var b=this.owl.options;b.thumbsPrerendered?(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass),b.moveThumbsInside&&this._thumbcontent._thumbcontainer.appendTo(this.$element)):this._thumbcontent._thumbcontainer=a("<div>").addClass(b.thumbContainerClass).appendTo(this.$element);var c;if(b.thumbImage)for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+'><img src="'+this._thumbcontent[c].attr("src")+'" alt="'+this._thumbcontent[c].attr("alt")+'" /></button>');else for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+">"+this._thumbcontent[c]+"</button>")},e.prototype.setActive=function(){this.owl_currentitem=this.owl._current-this.owl._clones.length/2,this.owl_currentitem===this.owl._items.length&&(this.owl_currentitem=0);var b=this.owl.options,c=b.thumbsPrerendered?a("."+b.thumbContainerClass+'[data-slider-id="'+this._identifier+'"]'):this._thumbcontent._thumbcontainer;c.children().filter(".active").removeClass("active"),c.children().eq(this.owl_currentitem).addClass("active")},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this.owl.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Thumbs=e}(window.Zepto||window.jQuery,window,document);
trunk/owl-carousel/owl.video.play.png ADDED
Binary file
trunk/owl-carousel/sa-owl-theme.css ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ##############################################################
3
+ ### OWL CAROUSEL THEME (CSS) FOR THE SLIDE ANYTHING PLUGIN ###
4
+ ##############################################################
5
+ */
6
+
7
+ .owl-carousel .owl-stage-outer {
8
+ width:100% !important;
9
+ }
10
+ .owl-carousel .owl-wrapper-outer{
11
+ z-index:1 !important;
12
+ }
13
+ /* ### ERROR MESSAGES ### */
14
+ #sa_invalid_postid {
15
+ width:100% !important;
16
+ padding:20px 0px !important;
17
+ font-size:16px !important;
18
+ line-height:22px !important;
19
+ color:crimson !important;
20
+ }
21
+ /* ### USING UL/LI CONTAINERS ### */
22
+ .sa_owl_theme ul.owl-stage {
23
+ margin:0px !important;
24
+ padding:0px !important;
25
+ }
26
+ .sa_owl_theme ul.owl-stage li.owl-item {
27
+ display:block !important;
28
+ list-style-type:none !important;
29
+ }
30
+ /* ### PAGINATION BUTTONS ### */
31
+ .sa_owl_theme .owl-dots {
32
+ position:absolute;
33
+ width:100%;
34
+ display:block !important;
35
+ padding:10px 0px 0px !important;
36
+ bottom:-22px !important;
37
+ text-align:center !important;
38
+ font-size:12px !important;
39
+ line-height:12px !important;
40
+ }
41
+ .sa_owl_theme .owl-dots .owl-dot {
42
+ display: inline-block !important;
43
+ }
44
+ .sa_owl_theme .owl-dots .owl-dot span {
45
+ display:inline-block !important;
46
+ border-style:none !important;
47
+ background-color:rgba(0,0,0,0.2) !important;
48
+ width:10px !important;
49
+ height:10px !important;
50
+ border-radius:50% !important;
51
+ margin:0px 3px !important;
52
+ transition:all .3s ease-in-out !important;
53
+ -webkit-transition:all .3s ease-in-out !important;
54
+ -moz-transition:all .3s ease-in-out !important;
55
+ -o-transition:all .3s ease-in-out !important;
56
+ }
57
+ .sa_owl_theme .owl-dots .active span {
58
+ background-color:rgba(0,0,0,0.5) !important;
59
+ }
60
+ .sa_owl_theme .owl-dots .owl-dot span:hover {
61
+ background-color:rgba(0,0,0,0.5) !important;
62
+ }
63
+ .owl-pagination-true {
64
+ margin-bottom:22px !important;
65
+ }
66
+
67
+ /* ### PREVIOUS AND NEXT ARROW BUTTONS ### */
68
+ .sa_owl_theme .owl-nav {
69
+ display:block !important;
70
+ }
71
+ .autohide-arrows .owl-nav {
72
+ display:none !important;
73
+ }
74
+ .autohide-arrows:hover .owl-nav {
75
+ display:block !important;
76
+ }
77
+ .sa_owl_theme .owl-nav div,
78
+ .sa_owl_theme .owl-nav button {
79
+ position:absolute;
80
+ top:50%;
81
+ padding:2px 0px !important;
82
+ display:inline-block;
83
+ margin-top:-20px !important;
84
+ line-height:30px !important;
85
+ height:40px !important;
86
+ width:30px !important;
87
+ color:transparent !important;
88
+ transition:all .3s ease-in-out !important;
89
+ -webkit-transition:all .3s ease-in-out !important;
90
+ -moz-transition:all .3s ease-in-out !important;
91
+ -o-transition:all .3s ease-in-out !important;
92
+ }
93
+ .sa_owl_theme .owl-nav .owl-prev {
94
+ left:10px;
95
+ }
96
+ .sa_owl_theme .owl-nav .owl-next {
97
+ right:10px;
98
+ }
99
+ .sa_owl_theme .disabled .owl-prev,
100
+ .sa_owl_theme .disabled .owl-next {
101
+ display:none !important;
102
+ }
103
+ /* WHITE COLOR SCHEME */
104
+ .white .sa_owl_theme .owl-nav .owl-prev {
105
+ background:rgba(0,0,0,0.3) url('../images/icon_prev.png') no-repeat center center !important;
106
+ }
107
+ .white .sa_owl_theme .owl-nav .owl-next {
108
+ background:rgba(0,0,0,0.3) url('../images/icon_next.png') no-repeat center center !important;
109
+ }
110
+ .white .sa_owl_theme .owl-nav .owl-prev:hover,
111
+ .white .sa_owl_theme .owl-nav .owl-next:hover {
112
+ background-color:rgba(0,0,0,0.8) !important;
113
+ }
114
+ /* BLACK COLOR SCHEME */
115
+ .black .sa_owl_theme .owl-nav .owl-prev {
116
+ background:rgba(255,255,255,0.3) url('../images/black_icon_prev.png') no-repeat center center !important;
117
+ }
118
+ .black .sa_owl_theme .owl-nav .owl-next {
119
+ background:rgba(255,255,255,0.3) url('../images/black_icon_next.png') no-repeat center center !important;
120
+ }
121
+ .black .sa_owl_theme .owl-nav .owl-prev:hover,
122
+ .black .sa_owl_theme .owl-nav .owl-next:hover {
123
+ background-color:rgba(255,255,255,0.8) !important;
124
+ }
125
+
126
+ /* ### LINK, ZOOM AND VIDEO POPUP ICONS ### */
127
+ .sa_owl_theme .owl-item .sa_hover_container .sa_hover_buttons {
128
+ width:auto;
129
+ height:auto;
130
+ position:absolute;
131
+ border-radius:0px !important;
132
+ z-index:2;
133
+ cursor:pointer;
134
+ background:transparent !important;
135
+ }
136
+ .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
137
+ .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
138
+ .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
139
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon,
140
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon,
141
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
142
+ display:block;
143
+ float:left;
144
+ width:40px;
145
+ height:40px;
146
+ }
147
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
148
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
149
+ .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
150
+ transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
151
+ -webkit-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
152
+ -moz-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
153
+ -o-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
154
+ }
155
+ /* WHITE COLOR SCHEME */
156
+ .white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
157
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon {
158
+ background:rgba(0,0,0,0.3) url('../images/slide_link.png') no-repeat center center !important;
159
+ }
160
+ .white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
161
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon {
162
+ background:rgba(0,0,0,0.3) url('../images/lightbox_zoom.png') no-repeat center center !important;
163
+ }
164
+ .white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
165
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
166
+ background:rgba(0,0,0,0.3) url('../images/lightbox_video.png') no-repeat center center !important;
167
+ }
168
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
169
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
170
+ .white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
171
+ background-color:rgba(0,0,0,0.8) !important;
172
+ }
173
+ /* BLACK COLOR SCHEME */
174
+ .black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
175
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon {
176
+ background:rgba(255,255,255,0.3) url('../images/black_slide_link.png') no-repeat center center !important;
177
+ }
178
+ .black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
179
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon {
180
+ background:rgba(255,255,255,0.3) url('../images/black_lightbox_zoom.png') no-repeat center center !important;
181
+ }
182
+ .black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
183
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
184
+ background:rgba(255,255,255,0.3) url('../images/black_lightbox_video.png') no-repeat center center !important;
185
+ }
186
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
187
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
188
+ .black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
189
+ background-color:rgba(255,255,255,0.8) !important;
190
+ }
191
+
192
+ /* HERO SLIDER (SA PRO) */
193
+ .white .sa_hero_slider,
194
+ .black .sa_hero_slider {
195
+ height:100vh !important;
196
+ }
197
+ .white .sa_hero_slider .owl-stage-outer,
198
+ .black .sa_hero_slider .owl-stage-outer,
199
+ .white .sa_hero_slider .owl-stage-outer .owl-stage,
200
+ .black .sa_hero_slider .owl-stage-outer .owl-stage,
201
+ .white .sa_hero_slider .owl-stage-outer .owl-stage .owl-item,
202
+ .black .sa_hero_slider .owl-stage-outer .owl-stage .owl-item,
203
+ .white .sa_hero_slider .owl-stage-outer .owl-stage .owl-item .sa_hover_container,
204
+ .black .sa_hero_slider .owl-stage-outer .owl-stage .owl-item .sa_hover_container {
205
+ height:100% !important;
206
+ }
207
+
208
+ /* SHOWCASE CAROUSEL (SA PRO) */
209
+ .white,
210
+ .black {
211
+ position:relative !important;
212
+ }
213
+ .white > .showcase_nav,
214
+ .black > .showcase_nav {
215
+ display:block !important;
216
+ z-index:2 !important;
217
+ }
218
+ .white > .showcase_nav.autohide_arrows,
219
+ .black > .showcase_nav.autohide_arrows {
220
+ display:none !important;
221
+ }
222
+ .white:hover > .showcase_nav,
223
+ .black:hover > .showcase_nav {
224
+ display:block !important;
225
+ }
226
+ .showcase_nav div,
227
+ .showcase_nav button {
228
+ position:absolute;
229
+ top:50%;
230
+ border-style:none !important;
231
+ padding:2px 0px !important;
232
+ display:inline-block;
233
+ margin-top:-20px !important;
234
+ line-height:30px !important;
235
+ height:40px !important;
236
+ width:30px !important;
237
+ cursor:pointer !important;
238
+ z-index:2 !important;
239
+ transition:all .3s ease-in-out !important;
240
+ -webkit-transition:all .3s ease-in-out !important;
241
+ -moz-transition:all .3s ease-in-out !important;
242
+ -o-transition:all .3s ease-in-out !important;
243
+ }
244
+ .showcase_nav .owl-prev {
245
+ left:10px;
246
+ }
247
+ .showcase_nav .owl-next {
248
+ right:10px;
249
+ }
250
+ .white > .disabled .owl-prev,
251
+ .white > .disabled .owl-next,
252
+ .black > .disabled .owl-prev,
253
+ .black > .disabled .owl-next {
254
+ display:none !important;
255
+ }
256
+ .sa_owl_theme .disabled .owl-prev,
257
+ .sa_owl_theme .disabled .owl-next {
258
+ display:none !important;
259
+ }
260
+ /* WHITE COLOR SCHEME */
261
+ .white > .showcase_nav .owl-prev {
262
+ background:rgba(0,0,0,0.3) url('../images/icon_prev.png') no-repeat center center !important;
263
+ }
264
+ .white > .showcase_nav .owl-next {
265
+ background:rgba(0,0,0,0.3) url('../images/icon_next.png') no-repeat center center !important;
266
+ }
267
+ .white > .showcase_nav .owl-prev:hover,
268
+ .white > .showcase_nav .owl-next:hover {
269
+ background-color:rgba(0,0,0,0.8) !important;
270
+ }
271
+ /* BLACK COLOR SCHEME */
272
+ .black > .showcase_nav .owl-prev {
273
+ background:rgba(255,255,255,0.3) url('../images/black_icon_prev.png') no-repeat center center !important;
274
+ }
275
+ .black > .showcase_nav .owl-next {
276
+ background:rgba(255,255,255,0.3) url('../images/black_icon_next.png') no-repeat center center !important;
277
+ }
278
+ .black > .showcase_nav .owl-prev:hover,
279
+ .black > .showcase_nav .owl-next:hover {
280
+ background-color:rgba(255,255,255,0.8) !important;
281
+ }
282
+ @media only screen and (max-width:999px) {
283
+ .showcase_tablet { width:var(--widthtab) !important; left:var(--lefttab) !important; }
284
+ .showcase_hide_tablet { width:100% !important; left:0px !important; }
285
+ }
286
+ @media only screen and (max-width:767px) {
287
+ .showcase_mobile { width:var(--widthmob) !important; left:var(--leftmob) !important; }
288
+ .showcase_hide_mobile { width:100% !important; left:0px !important; }
289
+ }
290
+
291
+ /* VERTICAL CENTER SLIDE CONTENT FEATURE */
292
+ .sa_owl_theme .owl-item .sa_vert_center_wrap {
293
+ position:relative;
294
+ }
295
+ .sa_owl_theme .owl-item .sa_vert_center_wrap .sa_vert_center {
296
+ position:absolute;
297
+ top:50%;
298
+ transform:translate(0px,-50%);
299
+ width:100%;
300
+ }
301
+
302
+ /* THUMBNAIL PAGINATION (SA PRO) */
303
+ .sa_owl_thumbs_wrap {
304
+ display:block !important;
305
+ z-index:2 !important;
306
+ text-align:center !important;
307
+ }
308
+ .sa_owl_thumbs_wrap .owl-thumbs {
309
+ display:block !important;
310
+ margin:auto !important;
311
+ text-align:center !important;
312
+ font-size:0px !important;
313
+ line-height:0px !important;
314
+ }
315
+ .sa_owl_thumbs_wrap .owl-thumbs .owl-thumb-item {
316
+ display:inline-block !important;
317
+ cursor:pointer;
318
+ transition:all .3s ease-in-out !important;
319
+ -webkit-transition:all .3s ease-in-out !important;
320
+ -moz-transition:all .3s ease-in-out !important;
321
+ -o-transition:all .3s ease-in-out !important;
322
+ }
323
+ .sa_owl_thumbs_wrap .owl-thumbs .active,
324
+ .sa_owl_thumbs_wrap .owl-thumbs .owl-thumb-item:hover {
325
+ opacity:1.0 !important;
326
+ }
327
+ .sa_thumbs_inside_bottom,
328
+ .sa_thumbs_inside_top {
329
+ position:absolute !important;
330
+ width:100% !important;
331
+ }
332
+ .sa_thumbs_inside_bottom {
333
+ bottom:0px !important;
334
+ }
335
+ .sa_thumbs_inside_top {
336
+ top:0px !important;
337
+ }
338
+ .sa_thumbs_inside_left,
339
+ .sa_thumbs_inside_right {
340
+ position:absolute !important;
341
+ top:0px !important;
342
+ height:100% !important;
343
+ padding:0px !important;
344
+ box-sizing:content-box !important;
345
+ padding-top:0px !important;
346
+ padding-bottom:0px !important;
347
+ overflow:hidden !important;
348
+ }
349
+ .sa_thumbs_inside_left .owl-thumbs,
350
+ .sa_thumbs_inside_right .owl-thumbs {
351
+ position:absolute !important;
352
+ top:50% !important;
353
+ transform:translate(0px,-50%) !important;
354
+ max-height:100% !important;
355
+ box-sizing:content-box !important;
356
+ width:100% !important;
357
+ padding-right:20px !important;
358
+ overflow-y:scroll !important;
359
+ overflow-x:hidden !important;
360
+ }
361
+ .sa_thumbs_outside_bottom {
362
+ position:relative !important;
363
+ width:100% !important;
364
+ }
365
+ @media only screen and (max-width:999px) {
366
+ .white .sa_thumbs_hide_tablet,
367
+ .black .sa_thumbs_hide_tablet { display:none !important; }
368
+ }
369
+ @media only screen and (max-width:767px) {
370
+ .white .sa_thumbs_hide_mobile,
371
+ .black .sa_thumbs_hide_mobile { display:none !important; }
372
+ }
373
+
374
+ /* MAGNIFIC POPUP */
375
+ .sa_custom_popup {
376
+ position:relative;
377
+ padding:20px;
378
+ width:auto;
379
+ margin:20px auto;
380
+ }
381
+ .mfp-hide {
382
+ display: none !important;
383
+ }
trunk/php/single-page.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template Name: Slide Anything Preview Page
4
+ * This template will only display the page content (and no header, footer or sidebar)
5
+ */
6
+ ?>
7
+ <!DOCTYPE html>
8
+ <html <?php language_attributes(); ?>>
9
+ <head>
10
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
11
+ <meta name="viewport" content="width=device-width, initial-scale=1">
12
+ <?php wp_head(); ?>
13
+ </head>
14
+ <body class="cleanpage">
15
+ <?php
16
+ while (have_posts()) : the_post();
17
+ the_content();
18
+ endwhile;
19
+ ?>
20
+ <?php wp_footer(); ?>
21
+ </body>
22
+ </html>
trunk/php/slide-anything-admin.php ADDED
@@ -0,0 +1,3188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // #####################################################################
3
+ // ### SLIDE ANYTHING PLUGIN - PHP FUNCTIONS FOR WORDPRESS DASHBOARD ###
4
+ // #####################################################################
5
+
6
+ // ##### PLUGIN REGISTRATION HOOK - RUN WHEN THE PLUGIN IS ACTIVATED #####
7
+ function cpt_slider_plugin_activation() {
8
+ $sa_pro_version = validate_slide_anything_pro_registration();
9
+
10
+ // INSERT A 'SAMPLE SLIDER' CUSTOM POST INTO THE DATABASE
11
+ $sample_post_title = 'Sample Slider';
12
+
13
+ // check if the 'sample slider' already exists (plugin has been activated before)
14
+ $cpt_post = get_page_by_title($sample_post_title, 'OBJECT', 'sa_slider');
15
+
16
+ if (is_null($cpt_post)) {
17
+ // create the post object
18
+ $sample_post = array(
19
+ 'post_title' => $sample_post_title,
20
+ 'post_content' => '',
21
+ 'post_status' => 'publish',
22
+ 'post_type' => 'sa_slider'
23
+ );
24
+ // insert the post into the database
25
+ $cpt_id = wp_insert_post($sample_post);
26
+
27
+ // insert meta data for the 'sample slider' slides
28
+ for ($i = 1; $i <= 8; $i++) {
29
+ if ($i == 1) {
30
+ $color = "#f4cccc"; $image = "sample_logo1.png";
31
+ } elseif ($i == 2) {
32
+ $color = "#d9ead3"; $image = "sample_logo2.png";
33
+ } elseif ($i == 3) {
34
+ $color = "#fce5cd"; $image = "sample_logo3.png";
35
+ } elseif ($i == 4) {
36
+ $color = "#d0e0e3"; $image = "sample_logo4.png";
37
+ } elseif ($i == 5) {
38
+ $color = "#fff2cc"; $image = "sample_logo5.png";
39
+ } elseif ($i == 6) {
40
+ $color = "#cfe2f3"; $image = "sample_logo6.png";
41
+ } elseif ($i == 7) {
42
+ $color = "#d9d2e9"; $image = "sample_logo7.png";
43
+ } elseif ($i == 8) {
44
+ $color = "#ead1dc"; $image = "sample_logo8.png";
45
+ }
46
+ $content = "<div style='text-align: center; padding-bottom: 10px;'>\n";
47
+ $content .= "<div><img src='".plugins_url()."/slide-anything/images/".$image."' alt='Logo ".$i."' /></div>\n";
48
+ $content .= "<h3>Company Name</h3>\n";
49
+ $content .= "<p>Lorem ipsum dolor sit amet, cu usu cibo vituperata, id ius probo maiestatis inciderint, sit eu vide volutpat.</p>\n";
50
+ $content .= "</div>\n";
51
+ update_post_meta($cpt_id, "sa_slide".$i."_content", $content);
52
+ $image_data = "~left top~contain~no-repeat~".$color;
53
+ update_post_meta($cpt_id, "sa_slide".$i."_image_data", $image_data);
54
+ update_post_meta($cpt_id, "sa_slide".$i."_link_url", "");
55
+ update_post_meta($cpt_id, "sa_slide".$i."_link_target", "_self");
56
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_type", "NONE");
57
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_imageid", "");
58
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_imagetitle", "");
59
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_video_id", "");
60
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_video_type", "");
61
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_background", "no");
62
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_html", "");
63
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_shortcode", "0");
64
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_bgcol", "#ffffff");
65
+ update_post_meta($cpt_id, "sa_slide".$i."_popup_width", "600");
66
+ }
67
+ // insert meta data for the 'sample slider' configuration
68
+ update_post_meta($cpt_id, 'sa_disable_visual_editor', '0');
69
+ update_post_meta($cpt_id, 'sa_num_slides', 8);
70
+ update_post_meta($cpt_id, 'sa_slide_duration', 4);
71
+ update_post_meta($cpt_id, 'sa_slide_transition', 0.3);
72
+ update_post_meta($cpt_id, 'sa_slide_by', 1);
73
+ update_post_meta($cpt_id, 'sa_loop_slider', '1');
74
+ update_post_meta($cpt_id, 'sa_stop_hover', '1');
75
+ update_post_meta($cpt_id, 'sa_nav_arrows', '1');
76
+ update_post_meta($cpt_id, 'sa_pagination', '1');
77
+ update_post_meta($cpt_id, 'sa_shortcodes', '0');
78
+ update_post_meta($cpt_id, 'sa_random_order', '1');
79
+ update_post_meta($cpt_id, 'sa_reverse_order', '0');
80
+ update_post_meta($cpt_id, 'sa_mouse_drag', '0');
81
+ update_post_meta($cpt_id, 'sa_touch_drag', '1');
82
+ update_post_meta($cpt_id, 'sa_click_advance', '0');
83
+ update_post_meta($cpt_id, 'sa_auto_height', '0');
84
+ update_post_meta($cpt_id, 'sa_vert_center', '0');
85
+ update_post_meta($cpt_id, 'sa_items_width1', 1);
86
+ update_post_meta($cpt_id, 'sa_items_width2', 2);
87
+ update_post_meta($cpt_id, 'sa_items_width3', 3);
88
+ update_post_meta($cpt_id, 'sa_items_width4', 4);
89
+ update_post_meta($cpt_id, 'sa_items_width5', 4);
90
+ update_post_meta($cpt_id, 'sa_items_width6', 4);
91
+ update_post_meta($cpt_id, 'sa_transition', 'fade');
92
+ update_post_meta($cpt_id, 'sa_hero_slider', '0');
93
+ update_post_meta($cpt_id, 'sa_showcase_slider', '0');
94
+ update_post_meta($cpt_id, 'sa_showcase_width', '120');
95
+ update_post_meta($cpt_id, 'sa_showcase_tablet', '1');
96
+ update_post_meta($cpt_id, 'sa_showcase_width_tab', '130');
97
+ update_post_meta($cpt_id, 'sa_showcase_mobile', '0');
98
+ update_post_meta($cpt_id, 'sa_showcase_width_mob', '140');
99
+ update_post_meta($cpt_id, 'sa_css_id', 'sample_slider');
100
+ update_post_meta($cpt_id, 'sa_background_color', '#fafafa');
101
+ update_post_meta($cpt_id, 'sa_border_width', 1);
102
+ update_post_meta($cpt_id, 'sa_border_color', '#f0f0f0');
103
+ update_post_meta($cpt_id, 'sa_border_radius', 5);
104
+ update_post_meta($cpt_id, 'sa_wrapper_padd_top', 8);
105
+ update_post_meta($cpt_id, 'sa_wrapper_padd_right', 8);
106
+ update_post_meta($cpt_id, 'sa_wrapper_padd_bottom', 8);
107
+ update_post_meta($cpt_id, 'sa_wrapper_padd_left', 8);
108
+ update_post_meta($cpt_id, 'sa_slide_min_height_perc', 50);
109
+ update_post_meta($cpt_id, 'sa_slide_padding_tb', 5);
110
+ update_post_meta($cpt_id, 'sa_slide_padding_lr', 5);
111
+ update_post_meta($cpt_id, 'sa_slide_margin_lr', 0);
112
+ update_post_meta($cpt_id, 'sa_autohide_arrows', '1');
113
+ update_post_meta($cpt_id, 'sa_dot_per_slide', '0');
114
+ update_post_meta($cpt_id, 'sa_slide_icons_location', 'Center Center');
115
+ update_post_meta($cpt_id, 'sa_slide_icons_visible', '0');
116
+ update_post_meta($cpt_id, 'sa_slide_icons_color', 'white');
117
+ update_post_meta($cpt_id, 'sa_thumbs_active', '0');
118
+ update_post_meta($cpt_id, 'sa_thumbs_location', 'Inside Bottom');
119
+ update_post_meta($cpt_id, 'sa_thumbs_image_size', 'thumbnail');
120
+ update_post_meta($cpt_id, 'sa_thumbs_padding', 3);
121
+ update_post_meta($cpt_id, 'sa_thumbs_width', 150);
122
+ update_post_meta($cpt_id, 'sa_thumbs_height', 85);
123
+ update_post_meta($cpt_id, 'sa_thumbs_opacity', 50);
124
+ update_post_meta($cpt_id, 'sa_thumbs_border_width', 0);
125
+ update_post_meta($cpt_id, 'sa_thumbs_border_color', '#ffffff');
126
+ update_post_meta($cpt_id, 'sa_thumbs_resp_tablet', 75);
127
+ update_post_meta($cpt_id, 'sa_thumbs_resp_mobile', 50);
128
+ }
129
+ }
130
+
131
+ // SLIDE ANYTHING PRO NOTICE
132
+ function version_20_upgrade_notice() {
133
+ global $current_user ;
134
+ $user_id = $current_user->ID;
135
+ $sa_pro_version = validate_slide_anything_pro_registration();
136
+
137
+ if (!$sa_pro_version) {
138
+ if (current_user_can('administrator')) {
139
+ /* Check that the user hasn't already clicked to ignore the message */
140
+ if (!get_user_meta($user_id, 'sa_ignore_notice')) {
141
+ echo "<div class='notice notice-info' style='padding-top:10px;'>";
142
+
143
+ echo "<div style='float:left; width:170px; margin-right:15px;'><a href='https://edgewebpages.com/' target='_blank'>";
144
+ echo "<img style='width:100%;' src='".get_site_url()."/wp-content/plugins/slide-anything/images/slide_anything_pro_product_image.png' /></a></div>";
145
+ echo "<h3 style='margin:0px !important; padding:10px 0px !important;'>SLIDE ANYTHING PRO</h3>";
146
+ echo "<p style='margin:0px 0px 10px !important;'><strong>SLIDE ANYTHING PRO</strong> adds POPUPS into the mix!!";
147
+ echo "<br/><strong>SLIDE ANYTHING PRO</strong> also adds Hero Sliders & Thumbnail Pagination!!";
148
+ echo "<br/><strong>SLIDE ANYTHING PRO</strong> allows you to create Showcase Carousels!!</p>";
149
+
150
+ echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
151
+ echo "each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup ";
152
+ echo "containing HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to ";
153
+ echo "Slide Anything, if you are wanting to create Image or Video galleries for your websites.</p>";
154
+
155
+ echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
156
+ echo "you can now create a HERO SLIDER, which is a slider that always is 100% of the width/height of the device it's ";
157
+ echo "being viewed on. You can now also add THUMBNAIL PAGINATION to your sliders. Thumbnail Pagination are small ";
158
+ echo "clickable thumbnail images, with each thumbnail representing a single slide which can be clicked in order to ";
159
+ echo "navigate to.</p>";
160
+
161
+ echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
162
+ echo "you can also create a SHOWCASE CAROUSEL, which has a container width that exceeds the screen/window width. ";
163
+ echo "The leftmost/rightmost visible slides therefore become partially visible.</p>";
164
+
165
+ echo "<p style='margin:0px !important;'>For more information, click on the DEMO links below:</p>";
166
+ echo "<p style='margin:0px !important;'>";
167
+ echo "<a href='https://edgewebpages.com/' target='_blank'>MODAL POPUPS DEMO</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
168
+ echo "<a href='https://edgewebpages.com/hero-slider-with-thumbnails/' target='_blank'>HERO SLIDER WITH THUMBNAILS</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
169
+ echo "<a href='https://edgewebpages.com/showcase-carousel-demo/' target='_blank'>SHOWCASE CAROUSEL</a></p>";
170
+
171
+ echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
172
+ echo "<a style='display:inline-block; float:right; padding:7px 10px; background:crimson; color:white; text-decoration:none; ";
173
+ echo "border-radius:5px; font-size:16px;' href='".get_site_url()."/wp-admin/edit.php?post_type=sa_slider&sa_nag_ignore=0'>Hide this notice</a>";
174
+ echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
175
+
176
+ echo "</div>";
177
+ }
178
+ }
179
+ }
180
+ }
181
+ function slide_anything_notice_ignore() {
182
+ global $current_user;
183
+ $user_id = $current_user->ID;
184
+ // If user clicks to ignore the Slide Anything PRO notice, add that to their user meta
185
+ if (isset($_GET['sa_nag_ignore']) && ($_GET['sa_nag_ignore'] == '0')) {
186
+ add_user_meta($user_id, 'sa_ignore_notice', 'true', true);
187
+ }
188
+ // If user clicks to ignore the Slide Any Post notice, add that to their user meta
189
+ if (isset($_GET['sapost_ignore']) && ($_GET['sapost_ignore'] == '0')) {
190
+ add_user_meta($user_id, 'sa_ignore_sapost_notice', 'true', true);
191
+ }
192
+ }
193
+
194
+ // ADD A CHECKBOX OPTION UNDER "Settings -> Writing" CALLED "Disable TinyMCE Button"
195
+ function slide_anything_disable_tinymce_button_setting() {
196
+ // REGISTER WORDPRESS SETTING
197
+ register_setting(
198
+ 'writing',
199
+ 'sa-disable-tinymce-button',
200
+ 'sa_settings_sanitize'
201
+ );
202
+ // CREATE SETTINGS SECTION (within "Settings->Writing")
203
+ add_settings_section(
204
+ 'sa-writing-settings-section',
205
+ 'Slide Anything Settings',
206
+ 'sa_writing_settings_section_description',
207
+ 'writing'
208
+ );
209
+ // CREATE SETTINGS INPUT FIELD
210
+ add_settings_field(
211
+ 'sa-settings-field1',
212
+ 'Disable TinyMCE Button',
213
+ 'sa_settings_field1_callback',
214
+ 'writing',
215
+ 'sa-writing-settings-section'
216
+ );
217
+ }
218
+ // SANATIZE SETTINGS CALLBACK FUNCTION
219
+ function sa_settings_sanitize($input) {
220
+ return isset($input) ? true : false;
221
+ }
222
+ // SETTING SECTION DESCRIPTION
223
+ function sa_writing_settings_section_description(){
224
+ echo wpautop("Disable the 'Slide Anything Sliders' button within the toolbar of the WordPress Classic Editor when editing pages and posts.");
225
+ }
226
+ // SETTINGS INPUT FIELD CALLBACK
227
+ function sa_settings_field1_callback(){
228
+ ?>
229
+ <label for="sa-disable-tinymce-input">
230
+ <input id="sa-disable-tinymce-input" type="checkbox" value="1" name="sa-disable-tinymce-button" <?php checked(get_option('sa-disable-tinymce-button', false)); ?>>
231
+ </label>
232
+ <?php
233
+ }
234
+
235
+ /* ##### ACTION HOOK - REGISTER SCRIPTS (JS AND CSS) FOR WORDPRESS DASHBOARD ONLY ##### */
236
+ function cpt_register_admin_scripts() {
237
+ $sa_pro_version = validate_slide_anything_pro_registration();
238
+ $screen = get_current_screen();
239
+ if ($screen->post_type == 'sa_slider') {
240
+ // ONLY LOAD SCRIPTS (JS & CSS) WITHIN 'Slide Anything' SCREENS IN WORDPRESS DASHBOARD
241
+ // enqueues all scripts, styles & settings required in order to use the WordPress Media JS APIs
242
+ wp_enqueue_media();
243
+ // load 'wordpress jquery-ui' scripts
244
+ wp_enqueue_script( 'jquery-ui-core' );
245
+ wp_enqueue_script( 'jquery-ui-accordion' );
246
+ wp_enqueue_script( 'jquery-ui-tabs' );
247
+ wp_enqueue_script( 'jquery-ui-slider' );
248
+ wp_enqueue_script( 'jquery-ui-sortable' );
249
+ wp_enqueue_script( 'jquery-ui-draggable' );
250
+ wp_enqueue_script( 'jquery-ui-droppable' );
251
+ wp_enqueue_script( 'jquery-ui-resize' );
252
+ wp_enqueue_script( 'jquery-ui-dialog' );
253
+ wp_enqueue_script( 'jquery-ui-button' );
254
+ wp_enqueue_script( 'jquery-ui-tooltip' );
255
+ wp_enqueue_script( 'jquery-ui-spinner' );
256
+ // load 'spectrum colorpicker' script and css
257
+ wp_register_script('spectrum_js', SA_PLUGIN_PATH.'spectrum/spectrum.js', array('jquery'));
258
+ wp_enqueue_script('spectrum_js');
259
+ wp_register_style('spectrum_css', SA_PLUGIN_PATH.'spectrum/spectrum.css');
260
+ wp_enqueue_style('spectrum_css');
261
+ // load 'jquery-ui' css
262
+ wp_register_style('admin_ui_css', SA_PLUGIN_PATH.'css/admin-user-interface.min.css');
263
+ wp_enqueue_style('admin_ui_css');
264
+ // load 'slide-anything' custom javasript and css for wordpress admin
265
+ wp_register_script('sa-slider-admin-script', SA_PLUGIN_PATH.'js/slide-anything-admin.js', array( 'jquery' ));
266
+ wp_enqueue_script('sa-slider-admin-script');
267
+ wp_register_style('sa-slider-admin-css', SA_PLUGIN_PATH.'css/slide-anything-admin.css', array(), '2.0', 'all');
268
+ wp_enqueue_style('sa-slider-admin-css');
269
+ if ($sa_pro_version) {
270
+ // load 'magnific popup' script and css
271
+ wp_register_script('magnific-popup_js', SA_PLUGIN_PATH.'magnific-popup/jquery.magnific-popup.min.js', array('jquery'));
272
+ wp_enqueue_script('magnific-popup_js');
273
+ wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css');
274
+ wp_enqueue_style('magnific-popup_css');
275
+ }
276
+ // DISABLE AUTOSAVE FOR THIS CUSTOM POST TYPE (causes issues with preview modal popup)
277
+ wp_dequeue_script('autosave');
278
+ }
279
+ if ($screen->id == 'settings_page_sa-settings-page') {
280
+ // SLIDE ANYTHING SETTINGS PAGE - load custom css script
281
+ wp_register_style('sa-slider-admin-css', SA_PLUGIN_PATH.'css/slide-anything-admin.css');
282
+ wp_enqueue_style('sa-slider-admin-css');
283
+ }
284
+ // style for TINYMCE editor 'Slide Anything sliders' button
285
+ wp_register_style('tinymce-css', SA_PLUGIN_PATH.'css/tinymce_style.css');
286
+ wp_enqueue_style('tinymce-css');
287
+ }
288
+
289
+
290
+
291
+ // ##### ACTION HOOK - REGISTER THE 'Slide Anything' CUSTOM POST TYPE #####
292
+ function cpt_slider_register() {
293
+ $labels = array(
294
+ 'name' => _x('SA Sliders', 'post type general name', 'sa_slider_textdomain'),
295
+ 'singular_name' => _x('Slider', 'post type singular name', 'sa_slider_textdomain'),
296
+ 'menu_name' => __('SA Sliders', 'sa_slider_textdomain'),
297
+ 'add_new' => __('Add New Slider', 'sa_slider_textdomain'),
298
+ 'add_new_item' => __('Add New Slider', 'sa_slider_textdomain'),
299
+ 'edit_item' => __('Edit Slider', 'sa_slider_textdomain'),
300
+ 'new_item' => __('New Slider', 'sa_slider_textdomain'),
301
+ 'view_item' => __('View Slider', 'sa_slider_textdomain'),
302
+ 'not_found' => __('No sliders found', 'sa_slider_textdomain'),
303
+ 'not_found_in_trash' => __('No sliders found in Trash', 'sa_slider_textdomain'),
304
+ );
305
+ $args = array(
306
+ 'labels' => $labels,
307
+ 'description' => __('Slide Anything carousel/slider', 'sa_slider_textdomain'),
308
+ 'public' => false,
309
+ 'exclude_from_search' => true,
310
+ 'publicly_queryable' => false,
311
+ 'show_ui' => true,
312
+ 'show_in_nav_menus' => false,
313
+ 'show_in_menu' => true,
314
+ 'menu_position' => 10,
315
+ 'menu_icon' => 'dashicons-images-alt2',
316
+ 'hierarchical' => false,
317
+ 'supports' => array('title'),
318
+ 'has_archive' => false,
319
+ 'query_var' => false,
320
+ 'can_export' => true,
321
+ 'rewrite' => true,
322
+ 'capability_type' => 'post'
323
+ );
324
+ register_post_type('sa_slider', $args);
325
+ }
326
+
327
+
328
+
329
+ // ##### WP DASHBOARD - SLIDER LIST PAGE #####
330
+ // ACTION HOOK - ADD/REMOVE (HOVER-OVER) ROW ACTIONS WHEN THIS CUSTOM POST TYPE IS LISTED IN DASHBOARD
331
+ function cpt_slider_row_actions($actions, $post) {
332
+ if ($post->post_type == 'sa_slider') {
333
+ // REMOVE 'Quick Edit' ROW ACTION
334
+ unset($actions['inline hide-if-no-js']);
335
+ }
336
+ return $actions;
337
+ }
338
+ // FILTER TO ADD/REMOVE COLUMNS DISPLAYED FOR THIS CUSTOM POST TYPE WITHIN THE DASHBOARD
339
+ function cpt_slider_modify_columns($columns) {
340
+ // new columns to be added
341
+ $new_columns = array(
342
+ 'slides' => 'Slides',
343
+ 'shortcode' => 'Shortcode',
344
+ 'css-id' => 'CSS ID'
345
+ );
346
+ $columns = array_slice($columns, 0, 2, true) + $new_columns + array_slice($columns, 2, NULL, true);
347
+ return $columns;
348
+ }
349
+ // DEFINE OUTPUT FOR EACH CUSTOM COLUMN DISPLAYED FOR THIS CUSTOM POST TYPE WITHIN THE DASHBOARD
350
+ function cpt_slider_custom_column_content($column) {
351
+ // get post object for this row
352
+ global $post;
353
+
354
+ // output for the 'Slides' column
355
+ if ($column == 'slides') {
356
+ $num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
357
+ if ($num_slides == '') {
358
+ $num_slides = '-';
359
+ }
360
+ echo esc_html($num_slides);
361
+ }
362
+
363
+ // output for the 'Shortcode' column
364
+ if ($column == 'shortcode') {
365
+ $shortcode = "[slide-anything id='".$post->ID."']";
366
+ echo esc_html($shortcode);
367
+ }
368
+
369
+ // output for the 'CSS ID' column
370
+ if ($column == 'css-id') {
371
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
372
+ if ($css_id == '') {
373
+ $css_id = '-';
374
+ } else {
375
+ $css_id = "#".$css_id;
376
+ }
377
+ echo esc_html($css_id);
378
+ }
379
+ }
380
+
381
+
382
+
383
+ // ##### ADD A CUSTOM BUTTON TO WORDPRESS TINYMCE EDITOR (ON PAGES AND POSTS ONLY) #####
384
+ function add_tinymce_button() {
385
+ global $typenow;
386
+ // check user permissions
387
+ if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
388
+ return;
389
+ }
390
+ // verify the post type - only display button on posts and pages
391
+ if (!in_array($typenow, array('post', 'page'))) {
392
+ return;
393
+ }
394
+ // check if WYSIWYG is enabled
395
+ if (get_user_option('rich_editing') == 'true') {
396
+ add_filter('mce_external_plugins', 'add_tinymce_plugin');
397
+ add_filter('mce_buttons', 'register_tinymce_button');
398
+ }
399
+ }
400
+ function add_tinymce_plugin($plugin_array) {
401
+ $plugin_array['tinymce_button'] = SA_PLUGIN_PATH.'js/add_tinymce_button.js';
402
+ return $plugin_array;
403
+ }
404
+ function register_tinymce_button($buttons) {
405
+ array_push($buttons, 'tinymce_button');
406
+ return $buttons;
407
+ }
408
+ function get_tinymce_shortcode_array() {
409
+ $screen = get_current_screen();
410
+ if ($screen->post_type != 'envira') { // ### BUG FIX - CLASHING WITH ENVIRA GALLERY (VER 2.0.13) ###
411
+ // display 2 javascript arrays (in footer) containing all the slide anything post titles and post ids
412
+ // these 2 arrays are used to display the shortcode options by the TinyMCE button
413
+ echo "<script type='text/javascript'>\n";
414
+ echo "var sa_title_arr = new Array();\n";
415
+ echo "var sa_id_arr = new Array();\n";
416
+
417
+ $args = array('post_type' => 'sa_slider', 'post_status' => 'publish', 'posts_per_page' => -1);
418
+ $sa_slider_query = new WP_Query($args);
419
+ $count = 0;
420
+ foreach ($sa_slider_query->posts as $sa_post) {
421
+ $title = $sa_post->post_title;
422
+ echo "sa_title_arr[".$count."] = '".$title."';\n";
423
+ echo "sa_id_arr[".$count."] = '".$sa_post->ID."';\n";
424
+ $count++;
425
+ }
426
+ echo "</script>\n";
427
+ }
428
+ }
429
+
430
+
431
+
432
+ // ##### ACTION HOOK - ADD META BOXES TO THE 'Slide Anything' CUSTOM POST TYPE #####
433
+ function cpt_slider_add_meta_boxes() {
434
+ global $post;
435
+ global $current_user;
436
+
437
+ $info_added = get_post_meta($post->ID, 'sa_info_added', true);
438
+ $info_deleted = get_post_meta($post->ID, 'sa_info_deleted', true);
439
+ $info_duplicated = get_post_meta($post->ID, 'sa_info_duplicated', true);
440
+ $info_moved = get_post_meta($post->ID, 'sa_info_moved', true);
441
+ if ($info_added == '1') {
442
+ add_meta_box('cpt_slide_added', __('Information'), 'cpt_slide_added_content', 'sa_slider', 'normal', 'high');
443
+ update_post_meta($post->ID, 'sa_info_added', '0');
444
+ }
445
+ if ($info_deleted == '1') {
446
+ add_meta_box('cpt_slide_deleted', __('Information'), 'cpt_slide_deleted_content', 'sa_slider', 'normal', 'high');
447
+ update_post_meta($post->ID, 'sa_info_deleted', '0');
448
+ }
449
+ if ($info_duplicated == '1') {
450
+ add_meta_box('cpt_slide_duplicated', __('Information'), 'cpt_slide_duplicated_content', 'sa_slider', 'normal', 'high');
451
+ update_post_meta($post->ID, 'sa_info_duplicated', '0');
452
+ }
453
+ if ($info_moved == '1') {
454
+ add_meta_box('cpt_slide_moved', __('Information'), 'cpt_slide_moved_content', 'sa_slider', 'normal', 'high');
455
+ update_post_meta($post->ID, 'sa_info_moved', '0');
456
+ }
457
+ add_meta_box('cpt_slider_settings', __('Slider Settings'), 'cpt_slider_settings_content', 'sa_slider', 'normal', 'high');
458
+ add_meta_box('cpt_slider_slides', __('Slides'), 'cpt_slider_slides_content', 'sa_slider', 'normal', 'high');
459
+ add_meta_box('cpt_slider_shortcode', __('Shortcode / Preview'), 'cpt_slider_shortcode_content', 'sa_slider', 'side', 'high');
460
+ add_meta_box('cpt_slider_items', __('Items Displayed'), 'cpt_slider_items_content', 'sa_slider', 'side', 'default');
461
+ add_meta_box('cpt_slider_style', __('Slider Style'), 'cpt_slider_style_content', 'sa_slider', 'side', 'default');
462
+ add_meta_box('cpt_slider_thumbs', __('Thumbnail Pagination'), 'cpt_slider_thumbs_content', 'sa_slider', 'side', 'default');
463
+ remove_meta_box( 'mymetabox_revslider_0', 'sa_slider', 'normal' ); // remove revolution slider meta box
464
+ // ### SLIDE ANY POST PROMOTIONAL META BOX ###
465
+ $sa_pro_version = validate_slide_anything_pro_registration();
466
+ if (!$sa_pro_version) {
467
+ $user_id = $current_user->ID;
468
+ //delete_user_meta($user_id, 'sa_ignore_sapost_notice', 'true'); // FOR TESTING ONLY!!!
469
+ if (!get_user_meta($user_id, 'sa_ignore_sapost_notice')) {
470
+ add_meta_box('cpt_slide_any_post', __('Slide Any Post Plugin - Just Launched!'), 'cpt_slide_any_post_content', 'sa_slider', 'normal', 'default');
471
+ }
472
+ }
473
+ }
474
+
475
+
476
+
477
+ // ##### META BOX CONTENT - 'Information' (slide added) BOX #####
478
+ function cpt_slide_added_content() {
479
+ echo "<h3 id='sa_slide_added_mess'>A new slide has been added to this slider.</h3>";
480
+ }
481
+
482
+
483
+
484
+ // ##### META BOX CONTENT - 'Information' (slide deleted) BOX #####
485
+ function cpt_slide_deleted_content() {
486
+ echo "<h3 id='sa_slide_deleted_mess'>A slide has been deleted from this slider.</h3>";
487
+ }
488
+
489
+
490
+
491
+ // ##### META BOX CONTENT - 'Information' (slide duplicated) BOX #####
492
+ function cpt_slide_duplicated_content() {
493
+ echo "<h3 id='sa_slide_duplicated_mess'>A slide has been duplicated (copied) within this slider.</h3>";
494
+ }
495
+
496
+
497
+
498
+ // ##### META BOX CONTENT - 'Information' (slide moved) BOX #####
499
+ function cpt_slide_moved_content() {
500
+ echo "<h3 id='sa_slide_moved_mess'>The slide order of this slider has been has changed.</h3>";
501
+ }
502
+
503
+
504
+
505
+ // ##### META BOX CONTENT - 'Slider Settings' BOX #####
506
+ function cpt_slider_settings_content($post) {
507
+ $num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
508
+ $sa_pro_version = validate_slide_anything_pro_registration();
509
+
510
+ echo "<div id='sa_slider_settings'>\n";
511
+ // NONCE TO PREVENT CSRF SECURITY ATTACKS
512
+ wp_nonce_field(basename(__FILE__), 'nonce_save_slider');
513
+
514
+ // HIDDEN FIELD - NUMBER OF SLIDES
515
+ if ($num_slides == '') {
516
+ // new slider is being created
517
+ echo "<input type='hidden' id='num_slides_id' name='sa_num_slides' value='3'/>\n";
518
+ } else {
519
+ // existing slider
520
+ $num_slides = intval($num_slides);
521
+ echo "<input type='hidden' id='num_slides_id' name='sa_num_slides' value='".esc_attr($num_slides)."'/>\n";
522
+ }
523
+ // HIDDEN FIELD - SLIDE ADDED INDICATOR
524
+ echo "<input type='hidden' id='sa_info_added' name='sa_info_added' value='0'/>\n";
525
+ // HIDDEN FIELD - SLIDE DELETED INDICATOR
526
+ echo "<input type='hidden' id='sa_info_deleted' name='sa_info_deleted' value='0'/>\n";
527
+ // HIDDEN FIELD - SLIDE DUPLICATED INDICATOR
528
+ echo "<input type='hidden' id='sa_info_duplicated' name='sa_info_duplicated' value='0'/>\n";
529
+ // HIDDEN FIELD - SLIDE MOVED UP INDICATOR
530
+ echo "<input type='hidden' id='sa_info_moved' name='sa_info_moved' value='0'/>\n";
531
+ // HIDDEN FIELD - DUPLICATE SLIDE NUMBER
532
+ echo "<input type='hidden' id='sa_duplicate_slide' name='sa_duplicate_slide' value='0'/>\n";
533
+ // HIDDEN FIELD - MOVE SLIDE UP (SLIDE NUMBER)
534
+ echo "<input type='hidden' id='sa_move_slide_up' name='sa_move_slide_up' value='0'/>\n";
535
+ // HIDDEN FIELD - PRO VERSION
536
+ if ($sa_pro_version) {
537
+ echo "<input type='hidden' id='sa_pro_version' name='sa_pro_version' value='1'/>\n";
538
+ } else {
539
+ echo "<input type='hidden' id='sa_pro_version' name='sa_pro_version' value='0'/>\n";
540
+ }
541
+ // SLIDE DURATION
542
+ $slide_duration = get_post_meta($post->ID, 'sa_slide_duration', true);
543
+ if ($slide_duration == '') {
544
+ $slide_duration = 5;
545
+ }
546
+ echo "<div class='sa_slider_value'><span>Slide Duration:</span>";
547
+ echo "<input type='text' id='sa_slide_duration' name='sa_slide_duration' readonly value='".esc_attr($slide_duration)."'><em>seconds (0 = manual navigation)</em>";
548
+ echo "<em class='sa_tooltip' href='' title='Set to 0 to disable slider autoplay (manual slider navigation only)'></em></div>\n";
549
+ echo "<div class='jquery_ui_slider' id='jq_slider_duration'></div><hr/>\n";
550
+ // SLIDE TRANSITION
551
+ $slide_transition = get_post_meta($post->ID, 'sa_slide_transition', true);
552
+ if ($slide_transition == '') {
553
+ $slide_transition = 0.2;
554
+ }
555
+ echo "<div class='sa_slider_value'><span>Slide Transition:</span>";
556
+ echo "<input type='text' id='sa_slide_transition' name='sa_slide_transition' readonly value='".esc_attr($slide_transition)."'><em>seconds</em>\n";
557
+ echo "<em class='sa_tooltip' href='' title='The time it takes to change from one slide to the next slide'></em></div>\n";
558
+ echo "<div class='jquery_ui_slider' id='jq_slider_transition'></div><hr/>\n";
559
+ // SLIDE BY
560
+ $slide_by = get_post_meta($post->ID, 'sa_slide_by', true);
561
+ if ($slide_by == '') {
562
+ $slide_by = 1;
563
+ }
564
+ echo "<div class='sa_slider_value'><span>Slide By:</span>";
565
+ echo "<input type='text' id='sa_slide_by' name='sa_slide_by' readonly value='".esc_attr($slide_by)."'><em>slides (0 = slide by page)</em>";
566
+ echo "<em class='sa_tooltip' href='' title='The number of slides to slide per transition. Set to 0 to enable the Slide by Page option.'></em></div>\n";
567
+ echo "<div class='jquery_ui_slider' id='jq_slider_by'></div><hr/>\n";
568
+ echo "<div class='half_width_column'>\n";
569
+ // LOOP SLIDER
570
+ $loop_slider = get_post_meta($post->ID, 'sa_loop_slider', true);
571
+ if ($loop_slider == '') {
572
+ $loop_slider = '1';
573
+ }
574
+ echo "<div class='sa_setting_checkbox'><span>Loop Slider:</span>";
575
+ if ($loop_slider == '1') {
576
+ echo "<input type='checkbox' id='sa_loop_slider' name='sa_loop_slider' value='1' checked/>";
577
+ } else {
578
+ echo "<input type='checkbox' id='sa_loop_slider' name='sa_loop_slider' value='1'/>";
579
+ }
580
+ echo "<em class='sa_tooltip' href='' title='Only applies when slide duration is NOT zero (loops back to first slide after last slide is displayed)'></em>";
581
+ echo "</div>\n";
582
+ // STOP ON HOVER
583
+ $stop_hover = get_post_meta($post->ID, 'sa_stop_hover', true);
584
+ if ($stop_hover == '') {
585
+ $stop_hover = '1';
586
+ }
587
+ echo "<div class='sa_setting_checkbox'><span>Stop on Hover:</span>";
588
+ if ($stop_hover == '1') {
589
+ echo "<input type='checkbox' id='sa_stop_hover' name='sa_stop_hover' value='1' checked/>";
590
+ } else {
591
+ echo "<input type='checkbox' id='sa_stop_hover' name='sa_stop_hover' value='1'/>";
592
+ }
593
+ echo "<em class='sa_tooltip' href='' title='Only applies when slide duration is NOT zero (slideshow is paused when hovering over a slide)'></em>";
594
+ echo "</div>\n";
595
+ // RANDOM ORDER
596
+ $random_order = get_post_meta($post->ID, 'sa_random_order', true);
597
+ if ($random_order == '') {
598
+ $random_order = '0';
599
+ }
600
+ echo "<div class='sa_setting_checkbox'><span>Random Order:</span>";
601
+ if ($random_order == '1') {
602
+ echo "<input type='checkbox' id='sa_random_order' name='sa_random_order' value='1' checked/>";
603
+ } else {
604
+ echo "<input type='checkbox' id='sa_random_order' name='sa_random_order' value='1'/>";
605
+ }
606
+ echo "<em class='sa_tooltip' title='When checked slides will be randomly re-ordered whenever the slider is displayed'></em>";
607
+ echo "</div>\n";
608
+ // REVERSE ORDER
609
+ $reverse_order = get_post_meta($post->ID, 'sa_reverse_order', true);
610
+ if ($reverse_order == '') {
611
+ $reverse_order = '0';
612
+ }
613
+ echo "<div class='sa_setting_checkbox'><span>Reverse Order:</span>";
614
+ if ($reverse_order == '1') {
615
+ echo "<input type='checkbox' id='sa_reverse_order' name='sa_reverse_order' value='1' checked/>";
616
+ } else {
617
+ echo "<input type='checkbox' id='sa_reverse_order' name='sa_reverse_order' value='1'/>";
618
+ }
619
+ echo "<em class='sa_tooltip' title='When checked your slides will be shown in the reverse order (i.e. last slide first)'></em>";
620
+ echo "</div>\n";
621
+ // ALLOW SHORTCODES
622
+ $shortcodes = get_post_meta($post->ID, 'sa_shortcodes', true);
623
+ if ($shortcodes == '') {
624
+ $shortcodes = '0';
625
+ }
626
+ echo "<div class='sa_setting_checkbox'><span>Allow Shortcodes:</span>";
627
+ if ($shortcodes == '1') {
628
+ echo "<input type='checkbox' id='sa_shortcodes' name='sa_shortcodes' value='1' checked/>";
629
+ } else {
630
+ echo "<input type='checkbox' id='sa_shortcodes' name='sa_shortcodes' value='1'/>";
631
+ }
632
+ echo "<em class='sa_tooltip' href='' title='Include WordPree shorcodes within slide content. NOTE: Running shortcodes in Slide Anything may cause issues with some Wordpress Page Builders'></em>\n";
633
+ echo "</div>\n";
634
+ // VERTICAL CENTER
635
+ $vert_center = get_post_meta($post->ID, 'sa_vert_center', true);
636
+ if ($vert_center == '') {
637
+ $vert_center = '0';
638
+ }
639
+ echo "<div class='sa_setting_checkbox'><span>Vertical Center:</span>";
640
+ if ($vert_center == '1') {
641
+ echo "<input type='checkbox' id='sa_vert_center' name='sa_vert_center' value='1' checked/>";
642
+ } else {
643
+ echo "<input type='checkbox' id='sa_vert_center' name='sa_vert_center' value='1'/>";
644
+ }
645
+ echo "<em class='sa_tooltip' title='Vertically center content within slides. Only use this setting if you have set a Min Height for your slider (which sets a minimum height for each slide).'></em>";
646
+ echo "</div>\n";
647
+ echo "</div>\n";
648
+ echo "<div class='half_width_column'>\n";
649
+ // NAVIGATE ARROWS
650
+ $nav_arrows = get_post_meta($post->ID, 'sa_nav_arrows', true);
651
+ if ($nav_arrows == '') {
652
+ $nav_arrows = '1';
653
+ }
654
+ echo "<div class='sa_setting_checkbox'><span>Navigate Arrows:</span>";
655
+ if ($nav_arrows == '1') {
656
+ echo "<input type='checkbox' id='sa_nav_arrows' name='sa_nav_arrows' value='1' checked/>";
657
+ } else {
658
+ echo "<input type='checkbox' id='sa_nav_arrows' name='sa_nav_arrows' value='1'/>";
659
+ }
660
+ echo "<em class='sa_tooltip' href='' title='Display the \"next slide\" amd \"previous slide\" buttons'></em>\n";
661
+ echo "</div>\n";
662
+ // SHOW PAGINATION
663
+ $pagination = get_post_meta($post->ID, 'sa_pagination', true);
664
+ if ($pagination == '') {
665
+ $pagination = '1';
666
+ }
667
+ echo "<div class='sa_setting_checkbox'><span>Show Pagination:</span>";
668
+ if ($pagination == '1') {
669
+ echo "<input type='checkbox' id='sa_pagination' name='sa_pagination' value='1' checked/>";
670
+ } else {
671
+ echo "<input type='checkbox' id='sa_pagination' name='sa_pagination' value='1'/>";
672
+ }
673
+ echo "<em class='sa_tooltip' href='' title='Display slider pagination below the slider'></em>\n";
674
+ echo "</div>\n";
675
+
676
+ // MOUSE DRAG
677
+ $mouse_drag = get_post_meta($post->ID, 'sa_mouse_drag', true);
678
+ if ($mouse_drag == '') {
679
+ $mouse_drag = '0';
680
+ }
681
+ echo "<div class='sa_setting_checkbox'><span>Mouse Drag:</span>";
682
+ if ($mouse_drag == '1') {
683
+ echo "<input type='checkbox' id='sa_mouse_drag' name='sa_mouse_drag' value='1' checked/>";
684
+ } else {
685
+ echo "<input type='checkbox' id='sa_mouse_drag' name='sa_mouse_drag' value='1'/>";
686
+ }
687
+ echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides by holding down left mouse button and dragging left/right. (NOTE: Enabling this option will disable vertical touch-drag scrolling on mobile devices)'></em>\n";
688
+ echo "</div>\n";
689
+ // TOUCH DRAG
690
+ $touch_drag = get_post_meta($post->ID, 'sa_touch_drag', true);
691
+ if ($touch_drag == '') {
692
+ $touch_drag = '1';
693
+ }
694
+ echo "<div class='sa_setting_checkbox'><span>Touch Drag:</span>";
695
+ if ($touch_drag == '1') {
696
+ echo "<input type='checkbox' id='sa_touch_drag' name='sa_touch_drag' value='1' checked/>";
697
+ } else {
698
+ echo "<input type='checkbox' id='sa_touch_drag' name='sa_touch_drag' value='1'/>";
699
+ }
700
+ echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides on mobile devices by touching screen and dragging left/right'></em>\n";
701
+ echo "</div>\n";
702
+ // CLICK TO ADVANCE
703
+ $click_advance = get_post_meta($post->ID, 'sa_click_advance', true);
704
+ if ($click_advance == '') {
705
+ $click_advance = '0';
706
+ }
707
+ echo "<div class='sa_setting_checkbox'><span>Click to Advance:</span>";
708
+ if ($click_advance == '1') {
709
+ echo "<input type='checkbox' id='sa_click_advance' name='sa_click_advance' value='1' checked/>";
710
+ } else {
711
+ echo "<input type='checkbox' id='sa_click_advance' name='sa_click_advance' value='1'/>";
712
+ }
713
+ echo "<em class='sa_tooltip' href='' title='Clicking on the slider advances to the next slide. NOTE: Only works when the Mouse Drag and Touch Drag options are NOT checked.'></em>\n";
714
+ echo "</div>\n";
715
+ // AUTO HEIGHT
716
+ $auto_height = get_post_meta($post->ID, 'sa_auto_height', true);
717
+ if ($auto_height == '') {
718
+ $auto_height = '0';
719
+ }
720
+ echo "<div class='sa_setting_checkbox'><span>Auto Height:</span>";
721
+ if ($auto_height == '1') {
722
+ echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1' checked/>";
723
+ } else {
724
+ echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1'/>";
725
+ }
726
+ echo "<em class='sa_tooltip' title='Only works with 1 item on the screen. When checked the height of slider is automatically changed to match the height for each slide.'></em>";
727
+ echo "</div>\n";
728
+ echo "</div>\n";
729
+ echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
730
+ echo "</div>\n";
731
+ }
732
+
733
+
734
+
735
+ // ##### META BOX CONTENT - 'Slides' BOX #####
736
+ function cpt_slider_slides_content($post) {
737
+ $num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
738
+ $slider_css_id = get_post_meta($post->ID, 'sa_css_id', true);
739
+ $sa_pro_version = validate_slide_anything_pro_registration();
740
+ // DISABLE VISUAL EDITOR CHECKBOX
741
+ $disable_visual_editor = get_post_meta($post->ID, 'sa_disable_visual_editor', true);
742
+ if ($disable_visual_editor == '') {
743
+ $disable_visual_editor = '0';
744
+ }
745
+ echo "<div id='sa_visual_editor_checkbox'><span>Disable Visual Editor:</span>";
746
+ if ($disable_visual_editor == '1') {
747
+ echo "<input type='checkbox' id='sa_disable_visual_editor' name='sa_disable_visual_editor' value='1' checked/></div>\n";
748
+ } else {
749
+ echo "<input type='checkbox' id='sa_disable_visual_editor' name='sa_disable_visual_editor' value='1'/></div>\n";
750
+ }
751
+ // SLIDER EDITOR BOX SETTINGS
752
+ if ($disable_visual_editor == '1') {
753
+ $editor_args = array('tinymce' => false, 'wpautop' => false, 'media_buttons' => true, 'editor_class' => 'sa_slide_content', 'editor_height' => '250');
754
+ } else {
755
+ $editor_args = array('tinymce' => true, 'wpautop' => false, 'media_buttons' => true, 'editor_class' => 'sa_slide_content', 'editor_height' => '250');
756
+ }
757
+ if ($num_slides == '') {
758
+ // A NEW SLIDER IS BEING CREATED - ADD 3 INITIAL SLIDES
759
+ $num_slides = 3;
760
+ $slide_data[0]['edit_id'] = "sa_slide1_content";
761
+ $slide_data[0]['content'] = "Slide content";
762
+ $slide_data[0]['del_id'] = "sa_slide1_delete";
763
+ $slide_data[0]['image_data'] = "sa_slide1_image_data";
764
+ $slide_data[0]['image_id'] = "sa_slide1_image_id";
765
+ $slide_data[0]['thumb'] = "slide1_thumb";
766
+ $slide_data[0]['image_del'] = "slide1_image_del";
767
+ $slide_data[0]['image_pos'] = "sa_slide1_image_pos";
768
+ $slide_data[0]['image_size'] = "sa_slide1_image_size";
769
+ $slide_data[0]['image_repeat'] = "sa_slide1_image_repeat";
770
+ $slide_data[0]['image_color'] = "sa_slide1_image_color";
771
+ $slide_data[0]['link_url'] = "sa_slide1_link_url";
772
+ $slide_data[0]['link_target'] = "sa_slide1_link_target";
773
+ $slide_data[0]['slide_no'] = 1;
774
+ $slide_data[1]['edit_id'] = "sa_slide2_content";
775
+ $slide_data[1]['content'] = "Slide content";
776
+ $slide_data[1]['del_id'] = "sa_slide2_delete";
777
+ $slide_data[1]['image_data'] = "sa_slide2_image_data";
778
+ $slide_data[1]['image_id'] = "sa_slide2_image_id";
779
+ $slide_data[1]['thumb'] = "slide2_thumb";
780
+ $slide_data[1]['image_del'] = "slide2_image_del";
781
+ $slide_data[1]['image_pos'] = "sa_slide2_image_pos";
782
+ $slide_data[1]['image_size'] = "sa_slide2_image_size";
783
+ $slide_data[1]['image_repeat'] = "sa_slide2_image_repeat";
784
+ $slide_data[1]['image_color'] = "sa_slide2_image_color";
785
+ $slide_data[1]['link_url'] = "sa_slide2_link_url";
786
+ $slide_data[1]['link_target'] = "sa_slide2_link_target";
787
+ $slide_data[1]['slide_no'] = 2;
788
+ $slide_data[2]['edit_id'] = "sa_slide3_content";
789
+ $slide_data[2]['content'] = "Slide content";
790
+ $slide_data[2]['del_id'] = "sa_slide3_delete";
791
+ $slide_data[2]['image_data'] = "sa_slide3_image_data";
792
+ $slide_data[2]['image_id'] = "sa_slide3_image_id";
793
+ $slide_data[2]['thumb'] = "slide3_thumb";
794
+ $slide_data[2]['image_del'] = "slide3_image_del";
795
+ $slide_data[2]['image_pos'] = "sa_slide3_image_pos";
796
+ $slide_data[2]['image_size'] = "sa_slide3_image_size";
797
+ $slide_data[2]['image_repeat'] = "sa_slide3_image_repeat";
798
+ $slide_data[2]['image_color'] = "sa_slide3_image_color";
799
+ $slide_data[2]['link_url'] = "sa_slide3_link_url";
800
+ $slide_data[2]['link_target'] = "sa_slide3_link_target";
801
+ $slide_data[2]['slide_no'] = 3;
802
+ if ($sa_pro_version) {
803
+ $slide_data[0]['popup_type'] = "sa_slide1_popup_type";
804
+ $slide_data[0]['popup_imageid'] = "sa_slide1_popup_imageid";
805
+ $slide_data[0]['popup_imagetitle'] = "sa_slide1_popup_imagetitle";
806
+ $slide_data[0]['popup_video_id'] = "sa_slide1_popup_video_id";
807
+ $slide_data[0]['popup_video_type'] = "sa_slide1_popup_video_type";
808
+ $slide_data[0]['popup_background'] = "sa_slide1_popup_background";
809
+ $slide_data[0]['popup_html'] = "sa_slide1_popup_html";
810
+ $slide_data[0]['popup_shortcode'] = "sa_slide1_popup_shortcode";
811
+ $slide_data[0]['popup_bgcol'] = "sa_slide1_popup_bgcol";
812
+ $slide_data[0]['popup_width'] = "sa_slide1_popup_width";
813
+ $slide_data[1]['popup_type'] = "sa_slide2_popup_type";
814
+ $slide_data[1]['popup_imageid'] = "sa_slide2_popup_imageid";
815
+ $slide_data[1]['popup_imagetitle'] = "sa_slide2_popup_imagetitle";
816
+ $slide_data[1]['popup_video_id'] = "sa_slide2_popup_video_id";
817
+ $slide_data[1]['popup_video_type'] = "sa_slide2_popup_video_type";
818
+ $slide_data[1]['popup_background'] = "sa_slide2_popup_background";
819
+ $slide_data[1]['popup_html'] = "sa_slide2_popup_html";
820
+ $slide_data[1]['popup_shortcode'] = "sa_slide2_popup_shortcode";
821
+ $slide_data[1]['popup_bgcol'] = "sa_slide2_popup_bgcol";
822
+ $slide_data[1]['popup_width'] = "sa_slide2_popup_width";
823
+ $slide_data[2]['popup_type'] = "sa_slide3_popup_type";
824
+ $slide_data[2]['popup_imageid'] = "sa_slide3_popup_imageid";
825
+ $slide_data[2]['popup_imagetitle'] = "sa_slide3_popup_imagetitle";
826
+ $slide_data[2]['popup_video_id'] = "sa_slide3_popup_video_id";
827
+ $slide_data[2]['popup_video_type'] = "sa_slide3_popup_video_type";
828
+ $slide_data[2]['popup_background'] = "sa_slide3_popup_background";
829
+ $slide_data[2]['popup_html'] = "sa_slide3_popup_html";
830
+ $slide_data[2]['popup_shortcode'] = "sa_slide3_popup_shortcode";
831
+ $slide_data[2]['popup_bgcol'] = "sa_slide3_popup_bgcol";
832
+ $slide_data[2]['popup_width'] = "sa_slide3_popup_width";
833
+ }
834
+ } else {
835
+ // AN EXISTING SLIDER - GET SLIDE DATA FROM THE DATABASE AND SAVE WITHIN AN ARRAY
836
+ $num_slides = intval($num_slides);
837
+ $slide_data = array();
838
+ $count = 0;
839
+ for ($i = 1; $i <= $num_slides; $i++) {
840
+ $slide_edit_id = "sa_slide".$i."_content";
841
+ $slide_char_count = "sa_slide".$i."_char_count";
842
+ $slide_data[$count]['edit_id'] = $slide_edit_id;
843
+ $slide_data[$count]['content'] = get_post_meta($post->ID, $slide_edit_id, true);
844
+ $slide_data[$count]['char_count'] = get_post_meta($post->ID, $slide_char_count, true);
845
+ $slide_data[$count]['del_id'] = "sa_slide".$i."_delete";
846
+ $slide_data[$count]['thumb'] = "slide".$i."_thumb";
847
+ $slide_data[$count]['image_del'] = "slide".$i."_image_del";
848
+ $slide_data[$count]['image_data'] = "sa_slide".$i."_image_data";
849
+ $slide_data[$count]['image_id'] = "sa_slide".$i."_image_id";
850
+ $slide_data[$count]['image_pos'] = "sa_slide".$i."_image_pos";
851
+ $slide_data[$count]['image_size'] = "sa_slide".$i."_image_size";
852
+ $slide_data[$count]['image_repeat'] = "sa_slide".$i."_image_repeat";
853
+ $slide_data[$count]['image_color'] = "sa_slide".$i."_image_color";
854
+ $slide_data[$count]['image_data'] = "sa_slide".$i."_image_data";
855
+ $slide_data[$count]['link_url'] = "sa_slide".$i."_link_url";
856
+ $slide_data[$count]['link_target'] = "sa_slide".$i."_link_target";
857
+ if ($sa_pro_version) {
858
+ $slide_data[$count]['popup_type'] = "sa_slide".$i."_popup_type";
859
+ $slide_data[$count]['popup_imageid'] = "sa_slide".$i."_popup_imageid";
860
+ $slide_data[$count]['popup_imagetitle'] = "sa_slide".$i."_popup_imagetitle";
861
+ $slide_data[$count]['popup_video_id'] = "sa_slide".$i."_popup_video_id";
862
+ $slide_data[$count]['popup_video_type'] = "sa_slide".$i."_popup_video_type";
863
+ $slide_data[$count]['popup_background'] = "sa_slide".$i."_popup_background";
864
+ $slide_data[$count]['popup_html'] = "sa_slide".$i."_popup_html";
865
+ $slide_data[$count]['popup_shortcode'] = "sa_slide".$i."_popup_shortcode";
866
+ $slide_data[$count]['popup_bgcol'] = "sa_slide".$i."_popup_bgcol";
867
+ $slide_data[$count]['popup_width'] = "sa_slide".$i."_popup_width";
868
+ }
869
+ $slide_data[$count]['slide_no'] = $i;
870
+ $count++;
871
+ }
872
+ }
873
+ // GET AVAILABLE WORDPRESS IMAGE SIZES AND SAVE WITHIN AN ARRAY
874
+ if ($sa_pro_version) {
875
+ // SLIDE ANYTHING PRO VERSION ONLY
876
+ global $_wp_additional_image_sizes;
877
+ $image_size_arr = array();
878
+ $image_size_arr[0]['value'] = "no";
879
+ $image_size_arr[0]['desc'] = "NO";
880
+ $count = 1;
881
+ foreach (get_intermediate_image_sizes() as $image_size) {
882
+ if (in_array($image_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
883
+ $width = get_option("{$image_size}_size_w");
884
+ $height = get_option("{$image_size}_size_h");
885
+ } elseif (isset($_wp_additional_image_sizes[$image_size])) {
886
+ $width = $_wp_additional_image_sizes[$image_size]['width'];
887
+ $height = $_wp_additional_image_sizes[$image_size]['height'];
888
+ }
889
+ if (($width != 0) && ($height != 0)) {
890
+ $image_size_arr[$count]['value'] = $image_size;
891
+ $image_size_arr[$count]['desc'] = $image_size." (".$width."&times;".$height.")";
892
+ $count++;
893
+ }
894
+ }
895
+ }
896
+
897
+ // ###### LOOP TO DISPLAY INPUT ELEMENTS FOR EACH SLIDE ######
898
+ echo "<div id='slider_accordion'>\n";
899
+ for ($i = 0; $i < count($slide_data); $i++) {
900
+ // DISPLAY ACCORDION HEADING
901
+ echo "<h3>Slide ".$slide_data[$i]['slide_no'];
902
+ $css_id = $slider_css_id."_slide".sprintf('%02d', $slide_data[$i]['slide_no']);
903
+ // display CSS ID for the current slide
904
+ echo "<span>#".$css_id."</span>";
905
+ echo "</h3>\n";
906
+ echo "<div>\n";
907
+
908
+ // ### DISPLAY THE SLIDE CONTENT EDITOR (textarea field) ###
909
+ //wp_editor($slide_data[$i]['content'], wp_kses_post($slide_data[$i]['edit_id']), $editor_args);
910
+ wp_editor($slide_data[$i]['content'], $slide_data[$i]['edit_id'], $editor_args);
911
+
912
+ // ##############################
913
+ // ##### SLIDE TABS - START #####
914
+ // ##############################
915
+ $tabs_num = $i + 1;
916
+ echo "<div id='slide_".$tabs_num."_tabs' class='sa_slide_tabs'>\n";
917
+ echo "<ul>\n";
918
+ echo "<li><a href='#slide".$tabs_num."_background_tab'>Slide Background</a></li>\n";
919
+ echo "<li><a href='#slide".$tabs_num."_link_tab'>Slide Link</a></li>\n";
920
+ echo "<li><a href='#slide".$tabs_num."_popup_tab'>Slide Popup</a></li>\n";
921
+ echo "<li><a href='#slide".$tabs_num."_goto_tab'>Slide Goto Link</a></li>\n";
922
+ echo "</ul>\n";
923
+
924
+ // ####### SLIDE TAB 1 - SLIDE BACKGROUND #######
925
+ echo "<div id='slide".$tabs_num."_background_tab' class='sa_slide_tab'>\n";
926
+
927
+ // GET BACKGROUND IMAGE DATA FOR THIS SLIDE (image id, position, size, repeat and color) FROM DATABASE
928
+ $slide_image_data = get_post_meta($post->ID, $slide_data[$i]['image_data'], true);
929
+ if (isset($slide_image_data) && ($slide_image_data != '')) {
930
+ $data_arr = explode("~", $slide_image_data);
931
+ $slide_image_id = $data_arr[0];
932
+ $slide_image_pos = $data_arr[1];
933
+ $slide_image_size = $data_arr[2];
934
+ $slide_image_repeat = $data_arr[3];
935
+ $slide_image_color = $data_arr[4];
936
+ } else {
937
+ $slide_image_id = get_post_meta($post->ID, $slide_data[$i]['image_id'], true);
938
+ $slide_image_pos = get_post_meta($post->ID, $slide_data[$i]['image_pos'], true);
939
+ $slide_image_size = get_post_meta($post->ID, $slide_data[$i]['image_size'], true);
940
+ $slide_image_repeat = get_post_meta($post->ID, $slide_data[$i]['image_repeat'], true);
941
+ $slide_image_color = get_post_meta($post->ID, $slide_data[$i]['image_color'], true);
942
+ }
943
+ if ($slide_image_pos == '') {
944
+ $slide_image_pos = 'left top';
945
+ }
946
+ if ($slide_image_size == '') {
947
+ $slide_image_size = 'contain';
948
+ }
949
+ if ($slide_image_repeat == '') {
950
+ $slide_image_repeat = 'no-repeat';
951
+ }
952
+ if ($slide_image_color == '') {
953
+ $slide_image_color = "rgba(0,0,0,0)";
954
+ }
955
+
956
+ echo "<div class='sa_slide_bg_wrapper'>\n";
957
+
958
+ // ### 'USE POPUP IMAGE AS SLIDE BACKGROUND' SETTING ###
959
+ if ($sa_pro_version) {
960
+ // SLIDE ANYTHING PRO VERSION ONLY
961
+ $slide_popup_background = get_post_meta($post->ID, $slide_data[$i]['popup_background'], true);
962
+ if ($slide_popup_background == '') {
963
+ $slide_popup_background = 'no';
964
+ }
965
+ echo "<div class='popup_background_wrapper'>\n";
966
+ echo "<div>Use Popup Image as Slide Background:";
967
+ $tooltip = "Allows you to use the same image you defined as the popup image as the slide background image. You can use a smaller version of the popup image.";
968
+ echo "<em class='sa_tooltip' href='' title='".$tooltip."'></em></div>\n";
969
+ echo "<select id='".esc_attr($slide_data[$i]['popup_background'])."' name='".esc_attr($slide_data[$i]['popup_background'])."' ";
970
+ echo "onChange='change_slide_popup_background(".esc_attr($slide_data[$i]['slide_no']).");'>";
971
+ for ($j = 0; $j < count($image_size_arr); $j++) {
972
+ if ($slide_popup_background == $image_size_arr[$j]['value']) {
973
+ echo "<option value='".esc_attr($image_size_arr[$j]['value'])."' selected>".esc_html($image_size_arr[$j]['desc'])."</option>";
974
+ } else {
975
+ echo "<option value='".esc_attr($image_size_arr[$j]['value'])."'>".esc_html($image_size_arr[$j]['desc'])."</option>";
976
+ }
977
+ }
978
+ echo "</select>";
979
+ echo "</div>\n"; // .popup_background_wrapper
980
+ echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
981
+ echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_imagebg_popup' class='sa_slide_bg_popup'><div></div></div>\n";
982
+ }
983
+
984
+ // SLIDE BACKGROUND IMAGE - THUMBNAIL AND 'SET IMAGE' BUTTON
985
+ // get wordpress media upload frame url
986
+ $upload_frame_url = esc_url(get_upload_iframe_src('image', $post->ID)."&slide=".$slide_data[$i]['slide_no']);
987
+ // Get image src for slide background image
988
+ $slide_image_src = wp_get_attachment_image_src($slide_image_id, 'medium');
989
+ // check if the slide background image id already exists
990
+ $image_exists = is_array($slide_image_src);
991
+ // slide backround image - thumbnail (and delete button)
992
+ echo "<div id='".$slide_data[$i]['thumb']."' class='sa_slide_thumb'>\n";
993
+ if ($image_exists) {
994
+ echo "<div style='background-image:url(\"".esc_attr($slide_image_src[0])."\"); background-size:".esc_attr($slide_image_size)."; ";
995
+ echo "background-repeat:".esc_attr($slide_image_repeat)."; background-color:".esc_attr($slide_image_color)."; ";
996
+ echo "background-position:".esc_attr($slide_image_pos).";'></div>\n";
997
+ echo "<span id='".esc_attr($slide_data[$i]['image_del'])."' onClick='remove_slide_bg_image(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Delete the background image for this slide'>X</span>\n";
998
+ echo "</div>\n";
999
+ } else {
1000
+ if (isset($slide_data[$i]['popup_type'])) {
1001
+ $slide_popup_type = get_post_meta($post->ID, $slide_data[$i]['popup_type'], true);
1002
+ $popup_video_type = get_post_meta($post->ID, $slide_data[$i]['popup_video_type'], true);
1003
+ $popup_video_id = get_post_meta($post->ID, $slide_data[$i]['popup_video_id'], true);
1004
+ } else {
1005
+ $slide_popup_type = 'NONE';
1006
+ $popup_video_type = '';
1007
+ $popup_video_id = '';
1008
+ }
1009
+ if (($slide_image_id == "99999999") && ($slide_popup_type == "VIDEO") && ($popup_video_type == "youtube")) {
1010
+ $youtube_thumb = "https://img.youtube.com/vi/".$popup_video_id."/hqdefault.jpg";
1011
+ echo "<div style='background-image:url(\"".$youtube_thumb."\"); background-size:".esc_attr($slide_image_size)."; ";
1012
+ echo "background-repeat:".esc_attr($slide_image_repeat)."; background-color:".esc_attr($slide_image_color)."; ";
1013
+ echo "background-position:".esc_attr($slide_image_pos).";'></div>\n";
1014
+ echo "<span id='".esc_attr($slide_data[$i]['image_del'])."' onClick='remove_slide_bg_image(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Delete the background image for this slide'>X</span>\n";
1015
+ echo "</div>\n";
1016
+ } else {
1017
+ echo "<div style='background-color:#ffffff; background-size:".esc_attr($slide_image_size)."; ";
1018
+ echo "background-repeat:".esc_attr($slide_image_repeat)."; background-color:".esc_attr($slide_image_color)."; ";
1019
+ echo "background-position:".esc_attr($slide_image_pos).";'></div>\n";
1020
+ echo "<span id='".esc_attr($slide_data[$i]['image_del'])."' class='sa_hidden' onClick='remove_slide_bg_image(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Delete the background image for this slide'>X</span>\n";
1021
+ echo "</div>\n";
1022
+ }
1023
+ }
1024
+ // slide background image - 'set image' button
1025
+ echo "<a class='button button-secondary slide_image_add' id='slide".esc_attr($slide_data[$i]['slide_no'])."_image_add' ";
1026
+ echo "href='".esc_attr($upload_frame_url)."' title='Set the background image for this slide'>Set Image</a>\n";
1027
+ // slide background image - image id hidden field
1028
+ echo "<input type='hidden' id='".esc_attr($slide_data[$i]['image_id'])."' name='".esc_attr($slide_data[$i]['image_id'])."' value='".esc_attr($slide_image_id)."'/>\n";
1029
+
1030
+ // SLIDE BACKGROUND IMAGE - BACKGROUND POSITION (dropdown box)
1031
+ echo "<div class='slide_image_settings_line'>";
1032
+ echo "<span>Background Position:</span>";
1033
+ $option_arr = array();
1034
+ $option_arr[0]['desc'] = 'Top Left'; $option_arr[0]['value'] = 'left top';
1035
+ $option_arr[1]['desc'] = 'Top Center'; $option_arr[1]['value'] = 'center top';
1036
+ $option_arr[2]['desc'] = 'Top Right'; $option_arr[2]['value'] = 'right top';
1037
+ $option_arr[3]['desc'] = 'Center Left'; $option_arr[3]['value'] = 'left center';
1038
+ $option_arr[4]['desc'] = 'Center'; $option_arr[4]['value'] = 'center center';
1039
+ $option_arr[5]['desc'] = 'Center Right'; $option_arr[5]['value'] = 'right center';
1040
+ $option_arr[6]['desc'] = 'Bottom Left'; $option_arr[6]['value'] = 'left bottom';
1041
+ $option_arr[7]['desc'] = 'Bottom Center'; $option_arr[7]['value'] = 'center bottom';
1042
+ $option_arr[8]['desc'] = 'Bottom Right'; $option_arr[8]['value'] = 'right bottom';
1043
+ echo "<select id='".esc_attr($slide_data[$i]['image_pos'])."' name='".esc_attr($slide_data[$i]['image_pos'])."' onChange='change_slide_image_pos(".esc_attr($slide_data[$i]['slide_no']).");'>";
1044
+ for ($j = 0; $j < count($option_arr); $j++) {
1045
+ if ($slide_image_pos == $option_arr[$j]['value']) {
1046
+ echo "<option value='".esc_attr($option_arr[$j]['value'])."' selected>".esc_html($option_arr[$j]['desc'])."</option>";
1047
+ } else {
1048
+ echo "<option value='".esc_attr($option_arr[$j]['value'])."'>".esc_html($option_arr[$j]['desc'])."</option>";
1049
+ }
1050
+ }
1051
+ echo "</select>";
1052
+ echo "</div>\n";
1053
+
1054
+ // SLIDE BACKGROUND IMAGE - BACKGROUND SIZE (dropdown box)
1055
+ echo "<div class='slide_image_settings_line'>";
1056
+ echo "<span>Background Size:</span>";
1057
+ $option_arr = array();
1058
+ $option_arr[0]['value'] = 'auto'; $option_arr[0]['desc'] = 'no resize';
1059
+ $option_arr[1]['value'] = 'contain'; $option_arr[1]['desc'] = 'contain';
1060
+ $option_arr[2]['value'] = 'cover'; $option_arr[2]['desc'] = 'cover';
1061
+ $option_arr[3]['value'] = '100% 100%'; $option_arr[3]['desc'] = '100%';
1062
+ $option_arr[4]['value'] = '100% auto'; $option_arr[4]['desc'] = '100% width';
1063
+ $option_arr[5]['value'] = 'auto 100%'; $option_arr[5]['desc'] = '100% height';
1064
+ echo "<select id='".esc_attr($slide_data[$i]['image_size'])."' name='".esc_attr($slide_data[$i]['image_size'])."' onChange='change_slide_image_size(".esc_attr($slide_data[$i]['slide_no']).");'>";
1065
+ for ($j = 0; $j < count($option_arr); $j++) {
1066
+ if ($slide_image_size == $option_arr[$j]['value']) {
1067
+ echo "<option value='".esc_attr($option_arr[$j]['value'])."' selected>".esc_html($option_arr[$j]['desc'])."</option>";
1068
+ } else {
1069
+ echo "<option value='".esc_attr($option_arr[$j]['value'])."'>".esc_html($option_arr[$j]['desc'])."</option>";
1070
+ }
1071
+ }
1072
+ echo "</select>";
1073
+ echo "</div>\n";
1074
+
1075
+ // SLIDER BACKGROUND IMAGE - BACKGROUND REPEAT (dropdown box)
1076
+ echo "<div class='slide_image_settings_line'>";
1077
+ echo "<span>Background Repeat:</span>";
1078
+ $option_arr = array();
1079
+ $option_arr[0] = 'no-repeat';
1080
+ $option_arr[1] = 'repeat';
1081
+ $option_arr[2] = 'repeat-x';
1082
+ $option_arr[3] = 'repeat-y';
1083
+ echo "<select id='".esc_attr($slide_data[$i]['image_repeat'])."' name='".esc_attr($slide_data[$i]['image_repeat'])."' ";
1084
+ echo "onChange='change_slide_image_repeat(".esc_attr($slide_data[$i]['slide_no']).");'>";
1085
+ for ($j = 0; $j < count($option_arr); $j++) {
1086
+ if ($slide_image_repeat == $option_arr[$j]) {
1087
+ echo "<option value='".esc_attr($option_arr[$j])."' selected>".esc_html($option_arr[$j])."</option>";
1088
+ } else {
1089
+ echo "<option value='".esc_attr($option_arr[$j])."'>".esc_html($option_arr[$j])."</option>";
1090
+ }
1091
+ }
1092
+ echo "</select>";
1093
+ echo "</div>\n";
1094
+
1095
+ // SLIDER BACKGROUND IMAGE - BACKGROUND COLOR (color picker)
1096
+ echo "<div class='slide_image_settings_line'>";
1097
+ echo "<span>Background Color:</span>";
1098
+ echo "<input type='text' id='".esc_attr($slide_data[$i]['image_color'])."' name='".esc_attr($slide_data[$i]['image_color'])."' value='".esc_attr($slide_image_color)."' ";
1099
+ echo "onChange='change_slide_image_color(".esc_attr($slide_data[$i]['slide_no']).");'>";
1100
+ echo "</div>\n";
1101
+
1102
+ echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
1103
+ echo "</div>\n";
1104
+ echo "</div>\n";
1105
+
1106
+ // ####### SLIDE TAB 2 - SLIDE LINK #######
1107
+ echo "<div id='slide".$tabs_num."_link_tab' class='sa_slide_tab'>\n";
1108
+
1109
+ // GET SLIDE LINK DATA FOR THIS SLIDE FROM THE DATABASE
1110
+ $slide_link_url = get_post_meta($post->ID, $slide_data[$i]['link_url'], true);
1111
+ $slide_link_target = get_post_meta($post->ID, $slide_data[$i]['link_target'], true);
1112
+ if ($slide_link_target == '') {
1113
+ $slide_link_target = '_self';
1114
+ }
1115
+
1116
+ // DISPLAY INPUT FIELDS FOR SLIDE LINK SETTINGS
1117
+ echo "<div class='slide_link_settings_wrapper'>";
1118
+ echo "<p>Specify a link URL that this slide opens</h3>";
1119
+ // LINK URL
1120
+ echo "<div><span>Link URL:</span>";
1121
+ echo "<input type='text' id='".esc_attr($slide_data[$i]['link_url'])."' name='".esc_attr($slide_data[$i]['link_url'])."' ";
1122
+ echo "value='".esc_attr($slide_link_url)."'/></div>\n";
1123
+ // LINK TARGET
1124
+ echo "<div><span>Link Target:</span>";
1125
+ echo "<select id='".esc_attr($slide_data[$i]['link_target'])."' name='".esc_attr($slide_data[$i]['link_target'])."'>";
1126
+ if ($slide_link_target == '_blank') {
1127
+ echo "<option value='_self'>Same Tab/Window</option>";
1128
+ echo "<option value='_blank' selected>New Tab/Window</option>";
1129
+ } else {
1130
+ echo "<option value='_self' selected>Same Tab/Window</option>";
1131
+ echo "<option value='_blank'>New Tab/Window</option>";
1132
+ }
1133
+ echo "</select>";
1134
+ echo "</div>\n";
1135
+
1136
+ // URL HASH NAVIGATION
1137
+ /*
1138
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1139
+ $data_hash = "#".$css_id."_slide".sprintf('%02d', $slide_data[$i]['slide_no']);
1140
+ echo "<p style='padding:20px 0px 0px;'>URL Hash Navigation</h3>";
1141
+ echo "<div><span><em>URL Hash Navication</em> is an Owl Carousel 2.0 feature where you can create links or buttons to navigate ";
1142
+ echo "to a specific slide within your slider. See this <a href='https://owlcarousel2.github.io/OwlCarousel2/demos/urlhashnav.html' ";
1143
+ echo "target='_blank' style='color:blue;'>EXAMPLE</a> to see how this works.<br/>The link for this slide is:</span>";
1144
+ echo "<strong style='padding-left:3px; color:firebrick;'>".$data_hash."</strong></div>";
1145
+ */
1146
+ echo "</div>\n";
1147
+ echo "</div>\n";
1148
+
1149
+ // ####### SLIDE TAB 3 - SLIDE POPUP #######
1150
+ echo "<div id='slide".$tabs_num."_popup_tab' class='sa_slide_tab'>\n";
1151
+
1152
+ if ($sa_pro_version) {
1153
+ // ### SLIDE ANYTHING PRO VERSION ONLY ###
1154
+
1155
+ // GET SLIDE POPUP DATA FOR THIS SLIDE FROM THE DATABASE
1156
+ $slide_popup_type = get_post_meta($post->ID, $slide_data[$i]['popup_type'], true);
1157
+ if ($slide_popup_type == '') {
1158
+ $slide_popup_type = 'NONE';
1159
+ }
1160
+ $popup_imageid = intval(get_post_meta($post->ID, $slide_data[$i]['popup_imageid'], true));
1161
+ $popup_video_id = get_post_meta($post->ID, $slide_data[$i]['popup_video_id'], true);
1162
+ $popup_video_type = get_post_meta($post->ID, $slide_data[$i]['popup_video_type'], true);
1163
+ $popup_imagetitle = get_post_meta($post->ID, $slide_data[$i]['popup_imagetitle'], true);
1164
+ $popup_html = get_post_meta($post->ID, $slide_data[$i]['popup_html'], true);
1165
+ $popup_shortcode = get_post_meta($post->ID, $slide_data[$i]['popup_shortcode'], true);
1166
+ $popup_bgcol = get_post_meta($post->ID, $slide_data[$i]['popup_bgcol'], true);
1167
+ $popup_width = intval(get_post_meta($post->ID, $slide_data[$i]['popup_width'], true));
1168
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1169
+
1170
+ // POPUP TYPE
1171
+ echo "<div class='slide_popup_settings_line'>";
1172
+ echo "<span>SA Popup Type:</span>";
1173
+ $option_arr = array();
1174
+ $option_arr[0] = 'NONE';
1175
+ $option_arr[1] = 'IMAGE';
1176
+ $option_arr[2] = 'VIDEO';
1177
+ $option_arr[3] = 'HTML';
1178
+ echo "<select id='".esc_attr($slide_data[$i]['popup_type'])."' name='".esc_attr($slide_data[$i]['popup_type'])."' ";
1179
+ echo "onChange='change_slide_popup_type(".esc_attr($slide_data[$i]['slide_no']).");'>";
1180
+ for ($j = 0; $j < count($option_arr); $j++) {
1181
+ if ($slide_popup_type == $option_arr[$j]) {
1182
+ echo "<option value='".esc_attr($option_arr[$j])."' selected>".esc_html($option_arr[$j])."</option>";
1183
+ } else {
1184
+ echo "<option value='".esc_attr($option_arr[$j])."'>".esc_html($option_arr[$j])."</option>";
1185
+ }
1186
+ }
1187
+ echo "</select>";
1188
+ echo "</div>\n";
1189
+
1190
+ // A) IMAGE POPUP SETTINGS
1191
+ if ($slide_popup_type == 'IMAGE') {
1192
+ echo "<div id='slide".($i+1)."_image_popup_wrapper' class='image_popup_wrapper'>\n";
1193
+ } else {
1194
+ echo "<div id='slide".($i+1)."_image_popup_wrapper' class='image_popup_wrapper' style='display:none;'>\n";
1195
+ }
1196
+ // get wordpress media upload frame url
1197
+ $upload_popup_frame_url = esc_url(get_upload_iframe_src('image', $post->ID)."&popup=".$slide_data[$i]['slide_no']);
1198
+ // Get image src for slide popup image
1199
+ $popup_image_src = wp_get_attachment_image_src($popup_imageid, 'medium');
1200
+ // check if the slide background image id already exists
1201
+ $image_exists = is_array($popup_image_src);
1202
+ echo "<div id='slide".($i+1)."_popup_thumb' class='slide_popup_thumb'>\n";
1203
+ $placeholder = SA_PLUGIN_PATH."images/image_placeholder.jpg";
1204
+ if ($image_exists) {
1205
+ // media library image id exists - display thumbnail image
1206
+ echo "<div><img src='".$popup_image_src[0]."'/></div>";
1207
+ // display image delete button
1208
+ echo "<span onClick='remove_popup_image(\"".esc_attr($slide_data[$i]['slide_no'])."\", \"".$placeholder."\");' ";
1209
+ echo "id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_del' title='Delete the popup image for this slide'>X</span>\n";
1210
+ // get popup image info (size & dimensions)
1211
+ $popup_image_meta = wp_get_attachment_metadata($popup_imageid);
1212
+ $image_width = $popup_image_meta['width'];
1213
+ $image_height = $popup_image_meta['height'];
1214
+ $info_dim = $image_width." x ".$image_height." pixels";
1215
+ $popup_image_full = wp_get_attachment_image_src($popup_imageid, 'full');
1216
+ $img_headers = get_headers($popup_image_full[0], 1);
1217
+ $info_size = $img_headers["Content-Length"];
1218
+ if ($info_size != '') {
1219
+ $size_unit = 'bytes';
1220
+ if ($info_size > 1048576) {
1221
+ if (!is_array($info_size)) {
1222
+ $info_size = round($info_size / 1048576)." MB";
1223
+ } else {
1224
+ $info_size = '';
1225
+ }
1226
+ } else if ($info_size > 1024) {
1227
+ if (!is_array($info_size)) {
1228
+ $info_size = round($info_size / 1024)." kb";
1229
+ } else {
1230
+ $info_size = '';
1231
+ }
1232
+ }
1233
+ }
1234
+ } else {
1235
+ // no image selected yet - display placeholder image
1236
+ $popup_image_id = 0;
1237
+ echo "<div><img src='".$placeholder."'/></div>";
1238
+ // display image delete button (hidden state)
1239
+ echo "<span class='sa_hidden' onClick='remove_popup_image(\"".esc_attr($slide_data[$i]['slide_no'])."\", \"".esc_attr($placeholder)."\");' ";
1240
+ echo "id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_del' title='Delete the popup image for this slide'>X</span>\n";
1241
+ // reset popup image info (size & dimensions)
1242
+ $info_dim = '';
1243
+ $info_size = '';
1244
+ }
1245
+ echo "</div>\n";
1246
+ // slide popup image - 'set image' button
1247
+ echo "<a class='button button-secondary popup_image_add' href='".esc_attr($upload_popup_frame_url)."' ";
1248
+ echo "title='Set the background image for this slide'>Set Image</a>\n";
1249
+ // slide popup image - 'preview' button
1250
+ $preview_button = "slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_preview";
1251
+ echo "<div id='".esc_attr($preview_button)."' class='slide_popup_image_preview'>";
1252
+ if ($image_exists) {
1253
+ echo "<a class='button button-secondary' href='".esc_attr($popup_image_full[0])."' title='".esc_attr($popup_imagetitle)."'>Preview</a>";
1254
+ } else {
1255
+ echo "<a class='button button-secondary' href='".esc_attr($placeholder)."' title='".esc_attr($popup_imagetitle)."'>Preview</a>";
1256
+ }
1257
+ echo "</div>\n";
1258
+ // slide popup image - jquery code to generate 'magnific popup' preview
1259
+ echo "<script type='text/javascript'>\n";
1260
+ echo "jQuery(document).ready(function() {\n";
1261
+ echo " jQuery('#".esc_attr($preview_button)." a').magnificPopup({\n";
1262
+ echo " mainClass: 'sa_popup',\n";
1263
+ echo " closeBtnInside: true,\n";
1264
+ echo " type: 'image'\n";
1265
+ echo " });\n";
1266
+ echo "});\n";
1267
+ echo "</script>\n";
1268
+ // slide popup image - popup image id hidden field
1269
+ echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_imageid'])."' name='".esc_attr($slide_data[$i]['popup_imageid']);
1270
+ echo "' value='".esc_attr($popup_imageid)."' />\n";
1271
+ // slide popup image - popup image info (title, dimensions & size)
1272
+ echo "<div class='slide_popup_info'>\n";
1273
+ // popup image title
1274
+ echo "<input class='sa_slide_popup_imagetitle' type='text' id='".esc_attr($slide_data[$i]['popup_imagetitle'])."' ";
1275
+ echo "name='".esc_attr($slide_data[$i]['popup_imagetitle'])."' value='".esc_attr($popup_imagetitle)."' ";
1276
+ echo "onChange='change_popup_image_title(this.value, \"".$preview_button."\")' placeholder='Enter popup title'/>\n";
1277
+ // popup dimensions
1278
+ echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_info_dim' class='slide_popup_info_dim'>";
1279
+ echo "<strong>Dimensions:</strong> ".$info_dim."</div>\n";
1280
+ // popup file size
1281
+ echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_info_size' class='slide_popup_info_size'>";
1282
+ if ($info_size != '') {
1283
+ echo "<strong>File Size:</strong> ".$info_size;
1284
+ }
1285
+ echo "</div>\n";
1286
+ echo "</div>\n";
1287
+ echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
1288
+ echo "</div>\n";
1289
+
1290
+ // B) VIDEO POPUP SETTINGS
1291
+ if ($slide_popup_type == 'VIDEO') {
1292
+ echo "<div id='slide".($i+1)."_video_popup_wrapper' class='video_popup_wrapper'>\n";
1293
+ } else {
1294
+ echo "<div id='slide".($i+1)."_video_popup_wrapper' class='video_popup_wrapper' style='display:none;'>\n";
1295
+ }
1296
+ // set default video values
1297
+ if (($popup_video_type != 'youtube') && ($popup_video_type != 'vimeo')) {
1298
+ $popup_video_type = '';
1299
+ $popup_video_id = '';
1300
+ }
1301
+ if ($popup_video_id == '') {
1302
+ $popup_video_type = '';
1303
+ }
1304
+ // video preview
1305
+ echo "<div id='slide".($i+1)."_video_thumb' class='slide_video_thumb'>\n";
1306
+ if ($popup_video_id != '') {
1307
+ if ($popup_video_type == 'youtube') {
1308
+ echo "<iframe src='https://www.youtube.com/embed/".$popup_video_id."' frameborder='0' allowfullscreen></iframe>\n";
1309
+ } elseif ($popup_video_type == 'vimeo') {
1310
+ echo "<iframe src='https://player.vimeo.com/video/".$popup_video_id."' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
1311
+ } else {
1312
+ echo "<img src='".SA_PLUGIN_PATH."images/video_placeholder.jpg'/>";
1313
+ }
1314
+ } else {
1315
+ echo "<img src='".SA_PLUGIN_PATH."images/video_placeholder.jpg'/>";
1316
+ }
1317
+ echo "<div style='float:none; clear:both; width:100%; height:1px;'></div>\n";
1318
+ echo "</div>\n";
1319
+ // video url (youtube/vimeo) input text box
1320
+ echo "<div class='sa_slide_video_url'>";
1321
+ echo "<input type='text' id='sa_slide".($i+1)."_video_url' name='sa_slide".($i+1)."_video_url' ";
1322
+ echo "placeholder='Enter YouTube or Vimeo URL'/></div>\n";
1323
+ // 'update video' button
1324
+ echo "<a class='button button-secondary' title='Update popup video using the above video URL' ";
1325
+ echo "onClick='update_popup_video(".($i+1).");'>Set Video</a>\n";
1326
+
1327
+ // slide popup video - 'preview' button
1328
+ $video_preview_url = SA_PLUGIN_PATH."images/video_placeholder_admin.jpg";
1329
+ if ($popup_video_id != '') {
1330
+ if ($popup_video_type == 'youtube') {
1331
+ $video_preview_url = "http://www.youtube.com/watch?v=".$popup_video_id;
1332
+ } elseif ($popup_video_type == 'vimeo') {
1333
+ $video_preview_url = "http://vimeo.com/".$popup_video_id;
1334
+ }
1335
+ }
1336
+ $preview_button = "slide".esc_attr($slide_data[$i]['slide_no'])."_popup_video_preview";
1337
+ echo "<div id='".esc_attr($preview_button)."' class='slide_popup_video_preview'>";
1338
+ echo "<a class='button button-secondary' href='".$video_preview_url."'>Preview</a>";
1339
+ echo "</div>\n";
1340
+ // slide popup image - jquery code to generate 'magnific popup' preview
1341
+ echo "<script type='text/javascript'>\n";
1342
+ echo "jQuery(document).ready(function() {\n";
1343
+ echo " jQuery('#".esc_attr($preview_button)." a').magnificPopup({\n";
1344
+ echo " mainClass: 'sa_popup',\n";
1345
+ echo " closeBtnInside: true,\n";
1346
+ echo " type: 'iframe'\n";
1347
+ echo " });\n";
1348
+ echo "});\n";
1349
+ echo "</script>\n";
1350
+ // invalid url error message
1351
+ echo "<div id='sa_slide".($i+1)."_video_invalid_url' class='sa_popup_video_invalid_url'>";
1352
+ echo "URL entered is NOT a valid YouTube or Vimeo URL!</div>\n";
1353
+ // hidden video id text field
1354
+ echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_video_id'])."' name='".esc_attr($slide_data[$i]['popup_video_id'])."' ";
1355
+ echo "value='".esc_attr($popup_video_id)."'/>\n";
1356
+ // hidden video type (youtube/vimeo) text field
1357
+ echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_video_type'])."' name='".esc_attr($slide_data[$i]['popup_video_type'])."' ";
1358
+ echo "value='".esc_attr($popup_video_type)."'/>\n";
1359
+ echo "<div style='float:none; clear:both; width:100%; height:1px;'></div>\n";
1360
+ echo "</div>\n";
1361
+
1362
+ // C) CONTENT POPUP SETTINGS
1363
+ if ($slide_popup_type == 'HTML') {
1364
+ echo "<div id='slide".($i+1)."_html_popup_wrapper' class='html_popup_wrapper'>\n";
1365
+ } else {
1366
+ echo "<div id='slide".($i+1)."_html_popup_wrapper' class='html_popup_wrapper' style='display:none;'>\n";
1367
+ }
1368
+ // content popup - html
1369
+ echo "<textarea id='".esc_attr($slide_data[$i]['popup_html'])."' name='".esc_attr($slide_data[$i]['popup_html'])."' ";
1370
+ echo "placeholder='Enter HTML Code or WordPress Shortcode'>".esc_attr($popup_html)."</textarea>\n";
1371
+ // content popup - shortcode
1372
+ if ($popup_shortcode == '') {
1373
+ $popup_shortcode = '0';
1374
+ }
1375
+ echo "<div class='slide_popup_settings_line' style='margin:3px 0px 15px;'><span>Shortcode Content:</span>";
1376
+ if ($popup_shortcode == '1') {
1377
+ echo "<input type='checkbox' id='".esc_attr($slide_data[$i]['popup_shortcode'])."' name='".esc_attr($slide_data[$i]['popup_shortcode'])."' value='1' checked/>";
1378
+ } else {
1379
+ echo "<input type='checkbox' id='".esc_attr($slide_data[$i]['popup_shortcode'])."' name='".esc_attr($slide_data[$i]['popup_shortcode'])."' value='1'/>";
1380
+ }
1381
+ echo "<em class='sa_tooltip' href='' title='Use a WordPress shortcode instead of HTML as your popup content'></em>\n";
1382
+ echo "</div>\n";
1383
+ // content popup - css id
1384
+ $popup_id = $css_id."_popup".($i+1);
1385
+ echo "<div class='slide_popup_settings_line'>";
1386
+ echo "<span>Popup CSS ID:</span><div id='sa_slide".($i+1)."_popup_css' class='slide_popup_css'>#".$popup_id."</div>";
1387
+ echo "<strong>(click to copy to clipboard)</strong></div>";
1388
+ // content popup - background color
1389
+ if ($popup_bgcol == '') {
1390
+ $popup_bgcol = "#ffffff";
1391
+ }
1392
+ echo "<div class='slide_popup_settings_line'>";
1393
+ echo "<span>Background Color:</span>";
1394
+ echo "<input type='text' id='".esc_attr($slide_data[$i]['popup_bgcol'])."' name='".esc_attr($slide_data[$i]['popup_bgcol'])."' ";
1395
+ echo "value='".esc_attr($popup_bgcol)."'>";
1396
+ echo "</div>\n";
1397
+ // content popup - width
1398
+ if ($popup_width== '') {
1399
+ $popup_width = '600';
1400
+ }
1401
+ echo "<div class='slide_popup_settings_line'>";
1402
+ echo "<span>Popup Width:</span>";
1403
+ echo "<input type='text' id='".esc_attr($slide_data[$i]['popup_width'])."' name='".esc_attr($slide_data[$i]['popup_width'])."' ";
1404
+ echo "value='".esc_attr($popup_width)."'><em>px</em>";
1405
+ echo "</div>\n";
1406
+
1407
+ echo "</div>\n";
1408
+ } else {
1409
+ // ### SLIDE ANYTHING FREE VERSION - DISPLAY PRO INFORMATION ###
1410
+ echo "<div class='slide_popup_pro_version'>\n";
1411
+ echo "<h4>Available in the PRO VERSION only!</h4>\n";
1412
+ echo "<p>With <strong>SLIDE ANYTHING PRO </strong> each slide can now open a <strong>MODAL POPUP</strong>, which may be one ";
1413
+ echo "of the following:</p>\n";
1414
+ echo "<ul>\n";
1415
+ echo "<li>An <strong>IMAGE</strong> popup, and with multiple image popups you can create a lightbox image gallery.</li>\n";
1416
+ echo "<li>An embedded <strong>VIDEO</strong> popup or gallery, which can contain <em>YouTube</em> or <em>Vimeo</em> videos.</li>\n";
1417
+ echo "<li>Popups containing any custom <strong>HTML</strong> content or WordPress <strong>SHORTCODES</strong> (such as an HTML form).</li>\n";
1418
+ echo "<li>Or your Slide Anything sliders can conatin a combination of image, video, HTML and shortcode popups!</li>\n";
1419
+ echo "</ul>\n";
1420
+ echo "<p>To find out more about <strong>SLIDE ANYTHING PRO</strong>, view demos or get your hands on a copy, click ";
1421
+ echo "<a href='https://edgewebpages.com' title='Slide Anything PRO' target='_blank'>HERE</a>.</p>";
1422
+ echo "</div>\n";
1423
+ }
1424
+ echo "</div>\n";
1425
+
1426
+ // ####### SLIDE TAB 4 - SLIDE GOTO LINK #######
1427
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1428
+ $goto_class = $css_id."_goto".($i+1);
1429
+ $eg_link = "https://edgewebpages.com/slide-goto-links";
1430
+ echo "<div id='slide".$tabs_num."_goto_tab' class='sa_slide_tab'>\n";
1431
+ echo "<div class='slide_goto_link_content'>\n";
1432
+ echo "<p><strong>Create a link or button to link directly to this slide</strong></p>\n";
1433
+ echo "<p>To do this, give your link or button the following <strong>CSS Class:</strong></p>\n";
1434
+ echo "<div class='slide_goto_class'><span>".$goto_class."</span></div>\n";
1435
+ echo "<p>To see an example of how a '<strong>Slide Goto Link</strong>' works ";
1436
+ echo "<a href='".$eg_link."' target='_blank'>CLICK HERE</a></p>\n";
1437
+ echo "</div>\n";
1438
+ echo "</div>\n";
1439
+
1440
+ // ############################
1441
+ // ##### SLIDE TABS - END #####
1442
+ // ############################
1443
+ echo "</div>\n";
1444
+
1445
+ // 3. DELETE STATUS FIELD (hidden) AND DELETE SLIDE BUTTON
1446
+ echo "<input type='hidden' id='".esc_attr($slide_data[$i]['del_id'])."' name='".esc_attr($slide_data[$i]['del_id'])."' value='1'/>\n";
1447
+ echo "<div class='button button-secondary' onClick='delete_sa_slide(\"".esc_attr($slide_data[$i]['del_id'])."\");' title='Delete this slide'>Delete Slide</div>\n";
1448
+
1449
+ // 4. DUPLICATE SLIDE BUTTON
1450
+ echo "<div class='button button-secondary' onClick='duplicate_slide(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Duplicate this slide'>Duplicate Slide</div>\n";
1451
+
1452
+ // 5. MOVE SLIDE UP BUTTON
1453
+ if ($slide_data[$i]['slide_no'] != 1) {
1454
+ echo "<div class='button button-secondary' onClick='move_slide_up(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Move this slide up within the slide order'>Move Slide Up</div>\n";
1455
+ }
1456
+
1457
+ echo "</div>\n";
1458
+ }
1459
+ echo "</div>\n";
1460
+
1461
+ // ADD SLIDE BUTTON
1462
+ if ($num_slides < 99) {
1463
+ // a maximum of 99 slides allowed
1464
+ echo "<div id='sa_add_slide' class='button button-primary button-large' title='Add a new slide'>Add Slide</div>\n";
1465
+ }
1466
+
1467
+ // JQUERY-UI DIALOG BOX DIV - FOR CONFIRMATION DIALOG BOXES
1468
+ echo "<div id='sa_dialog_box'></div>\n";
1469
+ }
1470
+
1471
+
1472
+
1473
+ // ##### META BOX CONTENT - 'Slider Preview/Shortcode' BOX #####
1474
+ function cpt_slider_shortcode_content($post) {
1475
+ $post_status = get_post_status($post->ID);
1476
+ $allow_shortcodes = get_post_meta($post->ID, 'sa_shortcodes', true);
1477
+ $shortcode = '[slide-anything id="'.$post->ID.'"]';
1478
+ echo "<div id='sa_slider_shortcode'>".esc_html($shortcode)."</div>\n";
1479
+ echo "<div id='sa_shortcode_copy' class='button button-secondary'>Copy to Clipboard</div>\n";
1480
+
1481
+ // get value of 'Disable Preview Feature' checkbox
1482
+ $disable_preview = '0';
1483
+ $other_settings = get_post_meta($post->ID, 'sa_other_settings', true);
1484
+ if ($other_settings != '') {
1485
+ $other_settings_arr = explode("|", $other_settings);
1486
+ }
1487
+ if (isset($other_settings_arr) && ($other_settings_arr[5] != '')) {
1488
+ $disable_preview = $other_settings_arr[5];
1489
+ }
1490
+
1491
+ if (($post_status == 'publish') && ($disable_preview == '0')) {
1492
+ // CHECK IF THE PREVIEW PAGE ALREADY EXISTS
1493
+ $preview_page_created = 1;
1494
+ $preview_page = get_page_by_title('Slide Anything Popup Preview');
1495
+ $preview_id = $preview_page->ID;
1496
+ if ($preview_id != '') {
1497
+ // PREVIEW PAGE EXISTS - UPDATE PAGE CONTENT TO CONTAIN THIS SA SHORTCODE
1498
+ wp_untrash_post($preview_id); // remove preview page from trash (if applicable)
1499
+ $page_content = "[slide-anything id='".$post->ID."']";
1500
+ $page_data = array(
1501
+ 'ID' => $preview_id,
1502
+ 'post_content' => $page_content
1503
+ );
1504
+ $page_id = wp_update_post($page_data);
1505
+ if (is_wp_error($page_id)) {
1506
+ $preview_page_created = 0;
1507
+ }
1508
+ } else {
1509
+ // PREVIEW PAGE DOES NOT EXIST - CREATE PREVIEW PAGE WITH SA SHORTCODE CONTENT
1510
+ $page_content = "[slide-anything id='".$post->ID."']";
1511
+ $curr_user_id = get_current_user_id();
1512
+ $page_data = array(
1513
+ 'post_title' => 'Slide Anything Popup Preview',
1514
+ 'post_content' => $page_content,
1515
+ 'post_status' => 'publish',
1516
+ 'post_type' => 'page',
1517
+ 'post_author' => $curr_user_id,
1518
+ 'menu_order' => 9999
1519
+ );
1520
+ $page_id = wp_insert_post($page_data);
1521
+ if (is_wp_error($page_id)) {
1522
+ $preview_page_created = 0;
1523
+ }
1524
+ }
1525
+ if ($preview_page_created == 1) {
1526
+ // DISPLAY SLIDER PREVIEW BUTTON
1527
+ if ($post_status == 'publish') {
1528
+ echo "<div id='sa_preview_slider' class='button button-secondary' ";
1529
+ echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"block\";'>Preview Slider</div>\n";
1530
+ }
1531
+ // DISPLAY SLIDER PREVIEW POPUP
1532
+ $preview_page_url = get_page_link($page_id);
1533
+ echo "<div id='sa_preview_popup' style='display:none;'>\n";
1534
+ echo "<div id='sa_preview_wrapper'>\n";
1535
+ echo "<div id='sa_preview_close' title='Close Slider Preview' ";
1536
+ echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"none\";'>X</div>\n";
1537
+ echo "<div id='sa_preview_content'>";
1538
+ echo "<iframe src='".$preview_page_url."'></iframe>\n";
1539
+ echo "</div>\n"; // #sa_preview_content
1540
+ echo "</div>\n"; // #sa_preview_wrapper
1541
+ echo "</div>\n";
1542
+ }
1543
+ }
1544
+ }
1545
+
1546
+
1547
+
1548
+ // ##### META BOX CONTENT - 'Items Displayed' BOX #####
1549
+ function cpt_slider_items_content($post) {
1550
+ $sa_pro_version = validate_slide_anything_pro_registration();
1551
+ $items_width1 = intval(get_post_meta($post->ID, 'sa_items_width1', true));
1552
+ $items_width2 = intval(get_post_meta($post->ID, 'sa_items_width2', true));
1553
+ $items_width3 = intval(get_post_meta($post->ID, 'sa_items_width3', true));
1554
+ $items_width4 = intval(get_post_meta($post->ID, 'sa_items_width4', true));
1555
+ $items_width5 = intval(get_post_meta($post->ID, 'sa_items_width5', true));
1556
+ $items_width6 = intval(get_post_meta($post->ID, 'sa_items_width6', true));
1557
+ if ($items_width1 == 0) { $items_width1 = 1; }
1558
+ if ($items_width2 == 0) { $items_width2 = 1; }
1559
+ if ($items_width3 == 0) { $items_width3 = 1; }
1560
+ if ($items_width4 == 0) { $items_width4 = 1; }
1561
+ if ($items_width5 == 0) { $items_width5 = 1; }
1562
+ if ($items_width6 == 0) { $items_width6 = $items_width5; }
1563
+
1564
+ echo "<div id='items_displayed_metabox'>\n";
1565
+ echo "<h4>Browser/Device Width:</h4>\n";
1566
+ // items for browser width category 1
1567
+ echo "<div><em class='sa_tooltip' href='' title='Up to 479 pixels'></em><span>Mobile Portrait</span><select name='sa_items_width1'>";
1568
+ for ($i = 1; $i <= 12; $i++) {
1569
+ if ($i == $items_width1) {
1570
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1571
+ } else {
1572
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1573
+ }
1574
+ }
1575
+ echo "</select></div>\n";
1576
+ // items for browser width category 2
1577
+ echo "<div><em class='sa_tooltip' href='' title='480 to 767 pixels'></em><span>Mobile Landscape</span><select name='sa_items_width2'>";
1578
+ for ($i = 1; $i <= 12; $i++) {
1579
+ if ($i == $items_width2) {
1580
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1581
+ } else {
1582
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1583
+ }
1584
+ }
1585
+ echo "</select></div>\n";
1586
+ // items for browser width category 3
1587
+ echo "<div><em class='sa_tooltip' href='' title='768 to 979 pixels'></em><span>Tablet Portrait</span><select name='sa_items_width3'>";
1588
+ for ($i = 1; $i <= 12; $i++) {
1589
+ if ($i == $items_width3) {
1590
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1591
+ } else {
1592
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1593
+ }
1594
+ }
1595
+ echo "</select></div>\n";
1596
+ // items for browser width category 4
1597
+ echo "<div><em class='sa_tooltip' href='' title='980 to 1199 pixels'></em><span>Desktop Small</span><select name='sa_items_width4'>";
1598
+ for ($i = 1; $i <= 12; $i++) {
1599
+ if ($i == $items_width4) {
1600
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1601
+ } else {
1602
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1603
+ }
1604
+ }
1605
+ echo "</select></div>\n";
1606
+ // items for browser width category 5
1607
+ echo "<div><em class='sa_tooltip' href='' title='1200 to 1499 pixels'></em><span>Desktop Large</span><select name='sa_items_width5'>";
1608
+ for ($i = 1; $i <= 12; $i++) {
1609
+ if ($i == $items_width5) {
1610
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1611
+ } else {
1612
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1613
+ }
1614
+ }
1615
+ echo "</select></div>\n";
1616
+ // items for browser width category 6
1617
+ echo "<div><em class='sa_tooltip' href='' title='Over 1500 pixels'></em><span>Desktop X-Large</span><select name='sa_items_width6'>";
1618
+ for ($i = 1; $i <= 12; $i++) {
1619
+ if ($i == $items_width6) {
1620
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
1621
+ } else {
1622
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
1623
+ }
1624
+ }
1625
+ echo "</select></div>\n";
1626
+ // slide transition effect
1627
+ $transition = get_post_meta($post->ID, 'sa_transition', true);
1628
+ if ($transition == '') {
1629
+ $transition = 'fade';
1630
+ }
1631
+ $option_arr = array();
1632
+ $option_arr[0] = 'Slide';
1633
+ $option_arr[1] = 'Fade';
1634
+ $option_arr[2] = 'Zoom In';
1635
+ $option_arr[3] = 'Zoom Out';
1636
+ $option_arr[4] = 'Flip Out X';
1637
+ $option_arr[5] = 'Flip Out Y';
1638
+ $option_arr[6] = 'Rotate Left';
1639
+ $option_arr[7] = 'Rotate Right';
1640
+ $option_arr[8] = 'Bounce Out';
1641
+ $option_arr[9] = 'Roll Out';
1642
+ $option_arr[10] = 'Slide Down';
1643
+ if (($items_width1 == 1) && ($items_width2 == 1) && ($items_width3 == 1) && ($items_width4 == 1) && ($items_width5 == 1) && ($items_width6 == 1)) {
1644
+ echo "<div class='sa_items_all_one' style='display:block;'>";
1645
+ } else {
1646
+ echo "<div class='sa_items_all_one' style='display:none;'>";
1647
+ }
1648
+ echo "<em class='sa_tooltip' href='' title='NOTE: Slide transitions only work when the above items displayed are ALL SET TO 1'></em>";
1649
+ echo "<span style='color:firebrick !important;'>Slide Transition</span><select style='max-width:100px !important;' name='sa_transition'>";
1650
+ for ($i = 0; $i < count($option_arr); $i++) {
1651
+ if ($transition == $option_arr[$i]) {
1652
+ echo "<option value='".esc_attr($option_arr[$i])."' selected>".esc_html($option_arr[$i])."</option>";
1653
+ } else {
1654
+ echo "<option value='".esc_attr($option_arr[$i])."'>".esc_html($option_arr[$i])."</option>";
1655
+ }
1656
+ }
1657
+ echo "</select></div>\n";
1658
+
1659
+ // HERO SLIDER
1660
+ $hero_slider = get_post_meta($post->ID, 'sa_hero_slider', true);
1661
+ if ($hero_slider != '1') {
1662
+ $hero_slider = '0';
1663
+ }
1664
+ if (($items_width1 == 1) && ($items_width2 == 1) && ($items_width3 == 1) && ($items_width4 == 1) && ($items_width5 == 1) && ($items_width6 == 1)) {
1665
+ echo "<div id='sa_hero_slider_wrapper' class='sa_items_all_one' style='display:block;'>";
1666
+ } else {
1667
+ echo "<div id='sa_hero_slider_wrapper' class='sa_items_all_one' style='display:none;'>";
1668
+ }
1669
+ echo "<span>Hero Slider</span>";
1670
+ if ($sa_pro_version) {
1671
+ // hero slider checkbox
1672
+ if ($hero_slider == '1') {
1673
+ echo "<input type='checkbox' id='sa_hero_slider' name='sa_hero_slider' value='1' checked/>";
1674
+ } else {
1675
+ echo "<input type='checkbox' id='sa_hero_slider' name='sa_hero_slider' value='1'/>";
1676
+ }
1677
+ $hs_note1 = "Most WP Theme &apos;Page Builders&apos; (Visual Composer, Divi, Elementor, SiteOrigin...) allow you create full-width sections in your content. If you are not using a page builder then you will have to manually create a PHP template file to include a full-width container.";
1678
+ $hs_note2 = "The slider height is set to 100% screen/device height using CSS &apos;vh&apos; (viewport height). Just about all browsers now support CSS viewport units, except Opera Mini which was installed on the old &apos;button&apos; phones.";
1679
+ if ($hero_slider == '1') {
1680
+ echo "<div id='sa_hero_slider_note' style='display:block;'>";
1681
+ } else {
1682
+ echo "<div id='sa_hero_slider_note' style='display:none;'>";
1683
+ }
1684
+ echo "<strong>Please Note:</strong>";
1685
+ echo "<ol><li>Shortcode should be inserted into a full-width section<em class='sa_tooltip' title='".$hs_note1."'></em></li>";
1686
+ echo "<li>Only works on browsers that support Viewport units - see <a href='https://caniuse.com/#feat=viewport-units' target='_blank'>here</a>";
1687
+ echo "<em class='sa_tooltip' title='".$hs_note2."'></em></li></ol></div>";
1688
+ } else {
1689
+ // display slide anything pro promotional text
1690
+ echo "<div id='sa_hero_slider_promo'>";
1691
+ echo "<h4>Available in the PRO VERSION only!</h4>\n";
1692
+ echo "<p>With <strong>Slide Anything PRO </strong> you can create full width/height <strong>Hero Sliders</strong> ";
1693
+ echo "which auto-resize depending on device/screen.</p>";
1694
+ echo "<p>To view a Hero Slider DEMO click:</p>";
1695
+ echo "<p style='padding-top:2px !important;'><a href='https://edgewebpages.com/hero-slider-with-thumbnails' target='_blank'>HERO SLIDER DEMO</a></p>";
1696
+ echo "</div>";
1697
+ }
1698
+ echo "</div>\n";
1699
+
1700
+ // SHOWCASE SLIDER
1701
+ if (($items_width1 == 1) && ($items_width2 == 1) && ($items_width3 == 1) && ($items_width4 == 1) && ($items_width5 == 1) && ($items_width6 == 1)) {
1702
+ echo "<div id='sa_showcase_slider_wrapper' style='display:none;'>";
1703
+ } else {
1704
+ echo "<div id='sa_showcase_slider_wrapper' style='display:block;'>";
1705
+ }
1706
+ // showcase slider checkbox
1707
+ $showcase_slider = get_post_meta($post->ID, 'sa_showcase_slider', true);
1708
+ if ($showcase_slider != '1') {
1709
+ $showcase_slider = '0';
1710
+ }
1711
+ echo "<div class='sa_ss_line'><span><strong>Showcase Carousel</strong></span>";
1712
+ if ($sa_pro_version) {
1713
+ echo "<input type='checkbox' id='sa_showcase_slider' name='sa_showcase_slider' value='1'";
1714
+ if ($showcase_slider == '1') { echo " checked"; }
1715
+ echo " />";
1716
+ }
1717
+ echo "</div>";
1718
+ if ($sa_pro_version) {
1719
+ if ($showcase_slider == '1') {
1720
+ echo "<div id='sa_showcase_slider_pro' style='display:block;'>";
1721
+ } else {
1722
+ echo "<div id='sa_showcase_slider_pro' style='display:none;'>";
1723
+
1724
+ }
1725
+ // showcase slider - desktop width
1726
+ $showcase_width = get_post_meta($post->ID, 'sa_showcase_width', true);
1727
+ if ($showcase_width == '') {
1728
+ $showcase_width = '120';
1729
+ }
1730
+ echo "<div class='sa_ss_line'><span>Desktop Width</span>";
1731
+ echo "<input type='text' id='sa_showcase_width' name='sa_showcase_width' value='".esc_attr($showcase_width)."'>";
1732
+ echo "<em>%</em></div>\n";
1733
+ // showcase slider - use on tablets
1734
+ $showcase_tablet = get_post_meta($post->ID, 'sa_showcase_tablet', true);
1735
+ if (($showcase_tablet != '0') && ($showcase_tablet != '1')) {
1736
+ $showcase_tablet = '1';
1737
+ }
1738
+ echo "<div class='sa_ss_line'><span>Use on Tablets</span>";
1739
+ if ($showcase_tablet == '1') {
1740
+ echo "<input type='checkbox' id='sa_showcase_tablet' name='sa_showcase_tablet' value='1' checked />";
1741
+ } else {
1742
+ echo "<input type='checkbox' id='sa_showcase_tablet' name='sa_showcase_tablet' value='1' />";
1743
+ }
1744
+ echo "</div>\n";
1745
+ // showcase slider - tablet width
1746
+ $showcase_width_tab = get_post_meta($post->ID, 'sa_showcase_width_tab', true);
1747
+ if ($showcase_width_tab == '') {
1748
+ $showcase_width_tab = '130';
1749
+ }
1750
+ echo "<div class='sa_ss_line'><span>Tablet Width</span>";
1751
+ echo "<input type='text' id='sa_showcase_width_tab' name='sa_showcase_width_tab' value='".esc_attr($showcase_width_tab)."'>";
1752
+ echo "<em>%</em></div>\n";
1753
+ // showcase slider - use on mobiles
1754
+ $showcase_mobile = get_post_meta($post->ID, 'sa_showcase_mobile', true);
1755
+ if ($showcase_mobile != '1') {
1756
+ $showcase_mobile = '0';
1757
+ }
1758
+ echo "<div class='sa_ss_line'><span>Use on Mobiles</span>";
1759
+ if ($showcase_mobile == '1') {
1760
+ echo "<input type='checkbox' id='sa_showcase_mobile' name='sa_showcase_mobile' value='1' checked />";
1761
+ } else {
1762
+ echo "<input type='checkbox' id='sa_showcase_mobile' name='sa_showcase_mobile' value='1' />";
1763
+ }
1764
+ echo "</div>\n";
1765
+ // showcase slider - mobile width
1766
+ $showcase_width_mob = get_post_meta($post->ID, 'sa_showcase_width_mob', true);
1767
+ if ($showcase_width_mob == '') {
1768
+ $showcase_width_mob = '140';
1769
+ }
1770
+ echo "<div class='sa_ss_line'><span>Mobile Width</span>";
1771
+ echo "<input type='text' id='sa_showcase_width_mob' name='sa_showcase_width_mob' value='".esc_attr($showcase_width_mob)."'>";
1772
+ echo "<em>%</em></div>\n";
1773
+ // showcase slider - css to style left/rightmost slides
1774
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1775
+ echo "<div class='sa_ss_css_line'>CSS to target left+right partial slides:";
1776
+ echo "<div id='ss_css_value'>#".esc_html($css_id)." .sc_partial</div>";
1777
+ echo "</div>\n";
1778
+ echo "</div>"; // #sa_showcase_slider_pro
1779
+ } else {
1780
+ // display slide anything pro promotional text
1781
+ echo "<div id='sa_showcase_slider_promo'>";
1782
+ echo "<h4>Available in the PRO VERSION only!</h4>\n";
1783
+ echo "<p>A <strong>Showcase Carousels</strong> has a container width that exceeds the screen/window width. ";
1784
+ echo "The leftmost/rightmost visible slides therefore become partially visible.</p>";
1785
+ echo "<p>Showcase Carousel DEMO:</p>";
1786
+ echo "<p style='padding-top:2px !important;'><a href='https://edgewebpages.com/showcase-carousel-demo/' target='_blank'>SHOWCASE CAROUSEL DEMO</a></p>";
1787
+ echo "</div>";
1788
+ }
1789
+ echo "</div>\n";
1790
+
1791
+ echo "</div>\n";
1792
+ }
1793
+
1794
+
1795
+
1796
+ // ##### META BOX CONTENT - 'Slider Style' BOX #####
1797
+ function cpt_slider_style_content($post) {
1798
+ // CSS ID
1799
+ $css_id = get_post_meta($post->ID, 'sa_css_id', true);
1800
+ if ($css_id == '') {
1801
+ $css_id = "slider_".$post->ID;
1802
+ }
1803
+ echo "<div id='slider_style_metabox'>\n";
1804
+ echo "<h4>CSS <span>#id</span> for Slider:</h4>\n";
1805
+ echo "<div style='padding-bottom:10px; color:#909090;'>Must consist of letters (upper/lowercase) or Underscore '_' characters <span style='color:firebrick;'>ONLY!</span></div>\n";
1806
+ echo "<input type='text' id='sa_css_id' name='sa_css_id' value='".esc_attr($css_id)."'/>\n";
1807
+ echo "<div id='css_note_text'>To style slides use CSS selector:</div>";
1808
+ echo "<div id='css_note_value'>#".esc_html($css_id)." .owl-item</div>";
1809
+ echo "<div class='ca_style_hr'></div>\n";
1810
+
1811
+ // SLIDER PADDING (TOP, RIGHT, BOTTOM, LEFT)
1812
+ $wrapper_padd_top = get_post_meta($post->ID, 'sa_wrapper_padd_top', true);
1813
+ if ($wrapper_padd_top == '') { $wrapper_padd_top = '0'; }
1814
+ $wrapper_padd_right = get_post_meta($post->ID, 'sa_wrapper_padd_right', true);
1815
+ if ($wrapper_padd_right == '') { $wrapper_padd_right = '0'; }
1816
+ $wrapper_padd_bottom = get_post_meta($post->ID, 'sa_wrapper_padd_bottom', true);
1817
+ if ($wrapper_padd_bottom == '') { $wrapper_padd_bottom = '0'; }
1818
+ $wrapper_padd_left = get_post_meta($post->ID, 'sa_wrapper_padd_left', true);
1819
+ if ($wrapper_padd_left == '') { $wrapper_padd_left = '0'; }
1820
+ $tooltip = "Padding space around the entire carousel/slider";
1821
+ echo "<h4>Padding <span>(pixels)</span>:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
1822
+ echo "<div class='ca_style_padding'>";
1823
+ echo "<div id='padd_top'>";
1824
+ echo "<input type='text' id='sa_wrapper_padd_top' name='sa_wrapper_padd_top' value='".esc_attr($wrapper_padd_top)."'></div>";
1825
+ echo "<div id='padd_right'>";
1826
+ echo "<input type='text' id='sa_wrapper_padd_right' name='sa_wrapper_padd_right' value='".esc_attr($wrapper_padd_right)."'></div>";
1827
+ echo "<div type='text' id='padd_bottom'>";
1828
+ echo "<input type='text' id='sa_wrapper_padd_bottom' name='sa_wrapper_padd_bottom' value='".esc_attr($wrapper_padd_bottom)."'></div>";
1829
+ echo "<div id='padd_left'>";
1830
+ echo "<input type='text' id='sa_wrapper_padd_left' name='sa_wrapper_padd_left' value='".esc_attr($wrapper_padd_left)."'></div>";
1831
+ echo "</div>\n";
1832
+ echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
1833
+
1834
+ $tooltip = "Style settings for the slider navigation arrows and slider pagination";
1835
+ echo "<h4>Slider Navigation:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
1836
+
1837
+ // AUTOHIDE ARROWS
1838
+ $autohide_arrows = get_post_meta($post->ID, 'sa_autohide_arrows', true);
1839
+ if ($autohide_arrows == '') {
1840
+ $autohide_arrows = '1';
1841
+ }
1842
+ echo "<div class='ca_style_setting_line'><span style='width:140px;'>Autohide Arrows</span>";
1843
+ if ($autohide_arrows == '1') {
1844
+ echo "<input type='checkbox' id='sa_autohide_arrows' name='sa_autohide_arrows' value='1' checked/>";
1845
+ } else {
1846
+ echo "<input type='checkbox' id='sa_autohide_arrows' name='sa_autohide_arrows' value='1'/>";
1847
+ }
1848
+ echo "</div>\n";
1849
+
1850
+ // SHOW DOT PER SLIDE
1851
+ $dot_per_slide = get_post_meta($post->ID, 'sa_dot_per_slide', true);
1852
+ if ($dot_per_slide == '') {
1853
+ $dot_per_slide = '0';
1854
+ }
1855
+ echo "<div class='ca_style_setting_line'><span style='width:140px;'>Show 1 Dot Per Slide</span>";
1856
+ if ($dot_per_slide == '1') {
1857
+ echo "<input type='checkbox' id='sa_dot_per_slide' name='sa_dot_per_slide' value='1' checked/>";
1858
+ } else {
1859
+ echo "<input type='checkbox' id='sa_dot_per_slide' name='sa_dot_per_slide' value='1'/>";
1860
+ }
1861
+ echo "</div>\n";
1862
+
1863
+ $tooltip = "The background color and border around the entire carousel/slider";
1864
+ echo "<h4>Background/Border:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
1865
+
1866
+ // SLIDER BACKGROUND COLOR
1867
+ $background_color = get_post_meta($post->ID, 'sa_background_color', true);
1868
+ if ($background_color == '') {
1869
+ $background_color = 'rgba(0,0,0,0)';
1870
+ }
1871
+ echo "<div class='ca_style_setting_line'><span>Background:</span>";
1872
+ echo "<input type='text' id='sa_background_color' name='sa_background_color' value='".esc_attr($background_color)."'></div>\n";
1873
+
1874
+ // SLIDER BORDER (WIDTH & COLOR)
1875
+ $border_width = get_post_meta($post->ID, 'sa_border_width', true);
1876
+ if ($border_width == '') {
1877
+ $border_width = '0';
1878
+ }
1879
+ $border_color = get_post_meta($post->ID, 'sa_border_color', true);
1880
+ if ($border_color == '') {
1881
+ $border_color = 'rgba(0,0,0,0)';
1882
+ }
1883
+ echo "<div class='ca_style_setting_line'><span>Border Style:</span>";
1884
+ echo "<input type='text' id='sa_border_width' name='sa_border_width' value='".esc_attr($border_width)."'><em>px</em>";
1885
+ echo "<input type='text' id='sa_border_color' name='sa_border_color' value='".esc_attr($border_color)."'></div>\n";
1886
+
1887
+ // SLIDER BORDER RADIUS
1888
+ $border_radius = get_post_meta($post->ID, 'sa_border_radius', true);
1889
+ if ($border_radius == '') {
1890
+ $border_radius = '0';
1891
+ }
1892
+ echo "<div class='ca_style_setting_line'><span>Border Radius:</span>";
1893
+ echo "<input type='text' id='sa_border_radius' name='sa_border_radius' value='".esc_attr($border_radius)."'></div>\n";
1894
+
1895
+ echo "<div class='ca_style_hr' style='margin-top:10px;'></div>\n";
1896
+
1897
+ $tooltip = "The style settings for all slides (within the slider/carousel)";
1898
+ echo "<h4>Slide Style:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
1899
+
1900
+ // SLIDE - MINIMUM HEIGHT
1901
+ $slide_min_height = get_post_meta($post->ID, 'sa_slide_min_height_perc', true);
1902
+ if ($slide_min_height == '') {
1903
+ $slide_min_height = '50';
1904
+ }
1905
+ echo "<div style='padding:5px 0px 10px;'>\n";
1906
+ $tooltip = "The minimum height of each slide. Can be set to a percentage of the slide width, or for image sliders set to a 4:3 or 16:9 aspect ratio.";
1907
+ echo "<div class='ca_style_setting_line' id='ca_style_min_height' style='padding-bottom:7px !important;'>";
1908
+ echo "<span class='sa_tooltip' title='".esc_attr($tooltip)."'>Min Height:</span><br/>";
1909
+ if ($slide_min_height == 'aspect43') {
1910
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
1911
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
1912
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43' checked/><em>4:3</em>";
1913
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
1914
+ } elseif ($slide_min_height == 'aspect169') {
1915
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
1916
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
1917
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
1918
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169' checked/><em>16:9</em>";
1919
+ } elseif (strpos($slide_min_height, 'px') !== false) {
1920
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
1921
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px' checked/><em>px</em>";
1922
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
1923
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
1924
+ } else {
1925
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;' checked/><em>%</em>";
1926
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
1927
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
1928
+ echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
1929
+ }
1930
+ echo "</div>\n";
1931
+ if (($slide_min_height == 'aspect43') || ($slide_min_height == 'aspect169')) {
1932
+ echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper' style='display:none;'>";
1933
+ echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($slide_min_height)."'/>";
1934
+ echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
1935
+ echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='0'/>\n";
1936
+ } else {
1937
+ if (strpos($slide_min_height, 'px') !== false) {
1938
+ $mh_value = str_replace('px', '', $slide_min_height);
1939
+ $mh_suffix = 'px';
1940
+ } else {
1941
+ $mh_value = $slide_min_height;
1942
+ $mh_suffix = '%';
1943
+ }
1944
+ echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper'><span style='width:20px;'>&nbsp;</span>";
1945
+ echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($mh_value)."'/>";
1946
+ echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
1947
+ echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='".esc_attr($mh_value)."'/>\n";
1948
+ }
1949
+ echo "</div>\n";
1950
+
1951
+ // SLIDE - PADDING TOP/BOTTOM
1952
+ $slide_padding_tb = get_post_meta($post->ID, 'sa_slide_padding_tb', true);
1953
+ if ($slide_padding_tb == '') {
1954
+ $slide_padding_tb = '5';
1955
+ }
1956
+ $tooltip = "Padding space top/bottom for each individual slide";
1957
+ echo "<div class='ca_style_setting_line' id='ca_style_padding_top_bottom'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Padding:</span>";
1958
+ echo "<input type='text' id='sa_slide_padding_tb' name='sa_slide_padding_tb' value='".esc_attr($slide_padding_tb)."'><em>%</em></div>\n";
1959
+
1960
+ // SLIDE - PADDING LEFT/RIGHT
1961
+ $slide_padding_lr = get_post_meta($post->ID, 'sa_slide_padding_lr', true);
1962
+ if ($slide_padding_lr == '') {
1963
+ $slide_padding_lr = '5';
1964
+ }
1965
+ $tooltip = "Padding space left/right for each individual slide";
1966
+ echo "<div class='ca_style_setting_line' id='ca_style_padding_left_right'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Padding:</span>";
1967
+ echo "<input type='text' id='sa_slide_padding_lr' name='sa_slide_padding_lr' value='".esc_attr($slide_padding_lr)."'><em>%</em></div>\n";
1968
+
1969
+ // SLIDE - MARGIN LEFT/RIGHT
1970
+ $slide_margin_lr = get_post_meta($post->ID, 'sa_slide_margin_lr', true);
1971
+ if ($slide_margin_lr == '') {
1972
+ $slide_margin_lr = '0';
1973
+ }
1974
+ $tooltip = "Margin space left and right of each slide";
1975
+ echo "<div class='ca_style_setting_line' id='ca_style_margin_left_right'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Margin:</span>";
1976
+ echo "<input type='text' id='sa_slide_margin_lr' name='sa_slide_margin_lr' value='".esc_attr($slide_margin_lr)."'><em>%</em></div>\n";
1977
+
1978
+ $tooltip = "The link/popup buttons that appear on a slide";
1979
+ echo "<h4>Link/Popup Icons:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
1980
+
1981
+ // LINK/POPUP ICONS - ICON LOCATION
1982
+ $slide_icons_location = get_post_meta($post->ID, 'sa_slide_icons_location', true);
1983
+ if ($slide_icons_location == '') {
1984
+ $slide_icons_location = 'Center Center';
1985
+ }
1986
+ echo "<div class='ca_style_setting_line'><span>Icon Location</span>";
1987
+ echo "<select id='sa_slide_icons_location' name='sa_slide_icons_location'>";
1988
+ $option_arr = array();
1989
+ $option_arr[0] = 'Center Center';
1990
+ $option_arr[1] = 'Top Left';
1991
+ $option_arr[2] = 'Top Center';
1992
+ $option_arr[3] = 'Top Right';
1993
+ $option_arr[4] = 'Bottom Left';
1994
+ $option_arr[5] = 'Bottom Center';
1995
+ $option_arr[6] = 'Bottom Right';
1996
+ for ($i = 0; $i < count($option_arr); $i++) {
1997
+ if ($option_arr[$i] == $slide_icons_location) {
1998
+ echo "<option value='".$option_arr[$i]."' selected>".$option_arr[$i]."</option>";
1999
+ } else {
2000
+ echo "<option value='".$option_arr[$i]."'>".$option_arr[$i]."</option>";
2001
+ }
2002
+ }
2003
+ echo "</select></div>\n";
2004
+
2005
+ // LINK/POPUP ICONS - ALWAYS VISIBLE
2006
+ $slide_icons_visible = get_post_meta($post->ID, 'sa_slide_icons_visible', true);
2007
+ if ($slide_icons_visible != '1') {
2008
+ $slide_icons_visible = '0';
2009
+ }
2010
+ echo "<div class='ca_style_setting_line'><span>Always Visible</span>";
2011
+ if ($slide_icons_visible == '1') {
2012
+ echo "<input type='checkbox' id='sa_slide_icons_visible' name='sa_slide_icons_visible' value='1' checked/>";
2013
+ } else {
2014
+ echo "<input type='checkbox' id='sa_slide_icons_visible' name='sa_slide_icons_visible' value='1'/>";
2015
+ }
2016
+ echo "</div>\n";
2017
+
2018
+ // LINK/POPUP ICONS - COLOR SCHEME
2019
+ $slide_icons_color = get_post_meta($post->ID, 'sa_slide_icons_color', true);
2020
+ if ($slide_icons_color == '') {
2021
+ $slide_icons_location = 'white';
2022
+ }
2023
+ echo "<div class='ca_style_setting_line'><span>Color Scheme</span>";
2024
+ echo "<select id='sa_slide_icons_color' name='sa_slide_icons_color'>";
2025
+ if ($slide_icons_color == 'black') {
2026
+ echo "<option value='white'>White</option>";
2027
+ echo "<option value='black' selected>Black</option>";
2028
+ } else {
2029
+ echo "<option value='white selected'>White</option>";
2030
+ echo "<option value='black'>Black</option>";
2031
+ }
2032
+ echo "</select></div>\n";
2033
+
2034
+ // ##### OTHER SETTINGS #####
2035
+
2036
+ echo "<h4 style='margin-top:10px !important;'>Other Settings:</h4>";
2037
+
2038
+ // FETCH OTHER SETTINGS POST META
2039
+ $other_settings = get_post_meta($post->ID, 'sa_other_settings', true);
2040
+ if ($other_settings != '') {
2041
+ $other_settings_arr = explode("|", $other_settings);
2042
+ }
2043
+ // setting 1 - sa_window_onload
2044
+ if (isset($other_settings_arr) && ($other_settings_arr[0] != '')) {
2045
+ $window_onload = $other_settings_arr[0];
2046
+ } else {
2047
+ $window_onload = get_post_meta($post->ID, 'sa_window_onload', true);
2048
+ if ($window_onload == '') {
2049
+ $window_onload = '0';
2050
+ }
2051
+ }
2052
+ // setting 2 - sa_strip_javascript
2053
+ if (isset($other_settings_arr) && ($other_settings_arr[1] != '')) {
2054
+ $strip_javascript = $other_settings_arr[1];
2055
+ } else {
2056
+ $strip_javascript = get_post_meta($post->ID, 'sa_strip_javascript', true);
2057
+ if ($strip_javascript == '') {
2058
+ $strip_javascript = '0';
2059
+ }
2060
+ }
2061
+ // setting 3 - sa_lazy_load_images
2062
+ if (isset($other_settings_arr) && ($other_settings_arr[2] != '')) {
2063
+ $lazy_load_images = $other_settings_arr[2];
2064
+ } else {
2065
+ $lazy_load_images = get_post_meta($post->ID, 'sa_lazy_load_images', true);
2066
+ if ($lazy_load_images == '') {
2067
+ $lazy_load_images = '0';
2068
+ }
2069
+ }
2070
+ // setting 4 - sa_ulli_containers
2071
+ if (isset($other_settings_arr) && ($other_settings_arr[3] != '')) {
2072
+ $ulli_containers = $other_settings_arr[3];
2073
+ } else {
2074
+ $ulli_containers = get_post_meta($post->ID, 'sa_ulli_containers', true);
2075
+ if ($ulli_containers == '') {
2076
+ $ulli_containers = '0';
2077
+ }
2078
+ }
2079
+ // setting 5 - sa_rtl_slider
2080
+ if (isset($other_settings_arr) && ($other_settings_arr[4] != '')) {
2081
+ $rtl_slider = $other_settings_arr[4];
2082
+ } else {
2083
+ $rtl_slider = '0';
2084
+ }
2085
+ // setting 6 - sa_disable_preview
2086
+ if (isset($other_settings_arr) && ($other_settings_arr[5] != '')) {
2087
+ $disable_preview = $other_settings_arr[5];
2088
+ } else {
2089
+ $disable_preview = '0';
2090
+ }
2091
+
2092
+ // USE 'DOMContentLoaded' EVENT (checkbox)
2093
+ $tooltip = 'Load the Slide Anything JavaScript during the DOMContentLoaded event. Use this option if jQuery ';
2094
+ $tooltip .= 'is loading in your theme footer and you are getting the JavaScript error message ';
2095
+ $tooltip .= '&quot;Uncaught ReferenceError: jQuery is not defined&quot;.';
2096
+ echo "<div id='sa_window_onload_line'>";
2097
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>DOMContentLoaded event:</span>";
2098
+ if ($window_onload == '1') {
2099
+ echo "<input type='checkbox' id='sa_window_onload' name='sa_window_onload' value='1' checked/>";
2100
+ } else {
2101
+ echo "<input type='checkbox' id='sa_window_onload' name='sa_window_onload' value='1'/>";
2102
+ }
2103
+ echo "</div>\n";
2104
+
2105
+ // Strip JavaScript from Content
2106
+ $tooltip = 'Remove JavaScript (<script> tags) from slide content for extra security.';
2107
+ echo "<div id='sa_window_onload_line'>";
2108
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Remove JavaScript Content:</span>";
2109
+ if ($strip_javascript == '1') {
2110
+ echo "<input type='checkbox' id='sa_strip_javascript' name='sa_strip_javascript' value='1' checked/>";
2111
+ } else {
2112
+ echo "<input type='checkbox' id='sa_strip_javascript' name='sa_strip_javascript' value='1'/>";
2113
+ }
2114
+ echo "</div>\n";
2115
+
2116
+ // Enable Lazy Load Images
2117
+ $tooltip = "Enable &quot;Lazy Load&quot; for images added to your slide content (note: does not apply to slide backgrounds).";
2118
+ echo "<div id='sa_window_onload_line'>";
2119
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Enable 'Lazy Load' Images:</span>";
2120
+ if ($lazy_load_images == '1') {
2121
+ echo "<input type='checkbox' id='sa_lazy_load_images' name='sa_lazy_load_images' value='1' checked/>";
2122
+ } else {
2123
+ echo "<input type='checkbox' id='sa_lazy_load_images' name='sa_lazy_load_images' value='1'/>";
2124
+ }
2125
+ echo "</div>\n";
2126
+
2127
+ // Use UL and LI Containers
2128
+ $tooltip = "Use &quot;UL&quot; as the DOM element for &quot;owl-stage&quot; and use &quot;LI&quot; as the DOM elements for &quot;owl-item&quot;.";
2129
+ echo "<div id='sa_window_onload_line'>";
2130
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Use UL and LI Containers:</span>";
2131
+ if ($ulli_containers == '1') {
2132
+ echo "<input type='checkbox' id='sa_ulli_containers' name='sa_ulli_containers' value='1' checked/>";
2133
+ } else {
2134
+ echo "<input type='checkbox' id='sa_ulli_containers' name='sa_ulli_containers' value='1'/>";
2135
+ }
2136
+ echo "</div>\n";
2137
+
2138
+ // Right to Left Slider
2139
+ $tooltip = "Change the direction of the slider to be right to left.";
2140
+ echo "<div id='sa_window_onload_line'>";
2141
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Right to Left Slider:</span>";
2142
+ if ($rtl_slider == '1') {
2143
+ echo "<input type='checkbox' id='sa_rtl_slider' name='sa_rtl_slider' value='1' checked/>";
2144
+ } else {
2145
+ echo "<input type='checkbox' id='sa_rtl_slider' name='sa_rtl_slider' value='1'/>";
2146
+ }
2147
+ echo "</div>\n";
2148
+
2149
+ // Disable Preview Feature
2150
+ $tooltip = "Disable the &quot;Preview Slider&quot; feature in this settings page - the &quot;Slide Anything Popup Preview&quot; page will no longer be auto generated.";
2151
+ echo "<div id='sa_window_onload_line'>";
2152
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Disable Preview Feature:</span>";
2153
+ if ($disable_preview == '1') {
2154
+ echo "<input type='checkbox' id='sa_disable_preview' name='sa_disable_preview' value='1' checked/>";
2155
+ } else {
2156
+ echo "<input type='checkbox' id='sa_disable_preview' name='sa_disable_preview' value='1'/>";
2157
+ }
2158
+ echo "</div>\n";
2159
+
2160
+ // Start Position
2161
+ $num_slides = intval(get_post_meta($post->ID, 'sa_num_slides', true));
2162
+ if ($num_slides == '') {
2163
+ $start_pos = 1;
2164
+ } else {
2165
+ $start_pos = intval(get_post_meta($post->ID, 'sa_start_pos', true));
2166
+ if ($start_pos == '') {
2167
+ $start_pos = 1;
2168
+ }
2169
+ $tooltip = "Which slide number to start display first";
2170
+ echo "<div id='sa_window_onload_line'>";
2171
+ echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Starting Slide Number:</span>";
2172
+ echo "<select name='sa_start_pos'>";
2173
+ for ($i = 1; $i <= $num_slides; $i++) {
2174
+ if ($i == $start_pos) {
2175
+ echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
2176
+ } else {
2177
+ echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
2178
+ }
2179
+ }
2180
+ echo "</select>";
2181
+ echo "</div>\n";
2182
+ }
2183
+
2184
+ echo "</div>\n";
2185
+ }
2186
+
2187
+
2188
+
2189
+ // ##### META BOX CONTENT - 'Thumbnails (Pagination)' BOX #####
2190
+ function cpt_slider_thumbs_content($post) {
2191
+ $sa_pro_version = validate_slide_anything_pro_registration();
2192
+
2193
+ if ($sa_pro_version) {
2194
+ // get wordpress image size data and save into and array
2195
+ global $_wp_additional_image_sizes;
2196
+ $image_size_arr = array();
2197
+ $count = 0;
2198
+ foreach (get_intermediate_image_sizes() as $image_size) {
2199
+ if (in_array($image_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
2200
+ $width = get_option("{$image_size}_size_w");
2201
+ $height = get_option("{$image_size}_size_h");
2202
+ } elseif (isset($_wp_additional_image_sizes[$image_size])) {
2203
+ $width = $_wp_additional_image_sizes[$image_size]['width'];
2204
+ $height = $_wp_additional_image_sizes[$image_size]['height'];
2205
+ }
2206
+ if (($width != 0) && ($height != 0)) {
2207
+ $image_size_arr[$count]['value'] = $image_size;
2208
+ $image_size_arr[$count]['desc'] = $image_size." (".$width."&times;".$height.")";
2209
+ $count++;
2210
+ }
2211
+ }
2212
+
2213
+ // Use thumbnail pagination (checkbox)
2214
+ $thumbs_active = get_post_meta($post->ID, 'sa_thumbs_active', true);
2215
+ if ($thumbs_active == '') {
2216
+ $thumbs_active = '0';
2217
+ }
2218
+ echo "<div class='sa_thumbs_line'><span>Use Thumbnail Pagination:</span>";
2219
+ if ($thumbs_active == '1') {
2220
+ echo "<input type='checkbox' id='sa_thumbs_active' name='sa_thumbs_active' value='1' checked/>";
2221
+ } else {
2222
+ echo "<input type='checkbox' id='sa_thumbs_active' name='sa_thumbs_active' value='1'/>";
2223
+ }
2224
+ echo "</div>\n";
2225
+
2226
+ if ($thumbs_active == '1') {
2227
+ echo "<div id='sa_thumbs_settings' style='display:block;'>\n";
2228
+ } else {
2229
+ echo "<div id='sa_thumbs_settings' style='display:none;'>\n";
2230
+ }
2231
+
2232
+ // Thumbs Location (dropdown)
2233
+ $thumbs_location = get_post_meta($post->ID, 'sa_thumbs_location', true);
2234
+ if ($thumbs_location == '') {
2235
+ $thumbs_location = 'inside_bottom';
2236
+ }
2237
+ echo "<div class='sa_thumbs_line'><span>Thumbs Location:</span>";
2238
+ echo "<select id='sa_thumbs_location' name='sa_thumbs_location'>";
2239
+ $option_arr = array();
2240
+ $option_arr[0] = 'Inside Bottom';
2241
+ $option_arr[1] = 'Inside Top';
2242
+ $option_arr[2] = 'Inside Left';
2243
+ $option_arr[3] = 'Inside Right';
2244
+ $option_arr[4] = 'Outside Bottom';
2245
+ for ($i = 0; $i < count($option_arr); $i++) {
2246
+ $value = strtolower(str_replace(' ', '_', $option_arr[$i]));
2247
+ if ($value == $thumbs_location) {
2248
+ echo "<option value='".$value."' selected>".$option_arr[$i]."</option>";
2249
+ } else {
2250
+ echo "<option value='".$value."'>".$option_arr[$i]."</option>";
2251
+ }
2252
+ }
2253
+ echo "</select></div>\n";
2254
+
2255
+ // Thumbnail Image Size (dropdown)
2256
+ $thumbs_image_size = get_post_meta($post->ID, 'sa_thumbs_image_size', true);
2257
+ if ($thumbs_image_size == '') {
2258
+ $thumbs_image_size = 'thumbnail';
2259
+ }
2260
+ echo "<div class='sa_thumbs_line'><span>Thumbnail Image Size:</span>";
2261
+ echo "<select id='sa_thumbs_image_size' name='sa_thumbs_image_size'>";
2262
+ for ($i = 0; $i < count($image_size_arr); $i++) {
2263
+ if ($image_size_arr[$i]['value'] == $thumbs_image_size) {
2264
+ echo "<option value='".$image_size_arr[$i]['value']."' selected>".$image_size_arr[$i]['desc']."</option>";
2265
+ } else {
2266
+ echo "<option value='".$image_size_arr[$i]['value']."'>".$image_size_arr[$i]['desc']."</option>";
2267
+ }
2268
+ }
2269
+ echo "</select></div>\n";
2270
+
2271
+ // Container Padding
2272
+ $thumbs_padding = get_post_meta($post->ID, 'sa_thumbs_padding', true);
2273
+ if ($thumbs_padding == '') {
2274
+ $thumbs_padding = '3';
2275
+ }
2276
+ echo "<div class='sa_thumbs_line'><span>Container Padding:</span>";
2277
+ echo "<input type='text' id='sa_thumbs_padding' name='sa_thumbs_padding' value='".esc_attr($thumbs_padding)."'><em>%</em>";
2278
+ echo "</div>\n";
2279
+
2280
+ // Thumbs Width
2281
+ $thumbs_width = get_post_meta($post->ID, 'sa_thumbs_width', true);
2282
+ if ($thumbs_width == '') {
2283
+ $thumbs_width = '150';
2284
+ }
2285
+ echo "<div class='sa_thumbs_line'><span>Thumbs Width:</span>";
2286
+ echo "<input type='text' id='sa_thumbs_width' name='sa_thumbs_width' value='".esc_attr($thumbs_width)."'><em>px</em>";
2287
+ echo "</div>\n";
2288
+
2289
+ // Thumbs Height
2290
+ $thumbs_height = get_post_meta($post->ID, 'sa_thumbs_height', true);
2291
+ if ($thumbs_height == '') {
2292
+ $thumbs_height = '85';
2293
+ }
2294
+ echo "<div class='sa_thumbs_line'><span>Thumbs Height:</span>";
2295
+ echo "<input type='text' id='sa_thumbs_height' name='sa_thumbs_height' value='".esc_attr($thumbs_height)."'><em>px</em>";
2296
+ echo "</div>\n";
2297
+
2298
+ // Thumbs Opacity
2299
+ $thumbs_opacity = get_post_meta($post->ID, 'sa_thumbs_opacity', true);
2300
+ if ($thumbs_opacity == '') {
2301
+ $thumbs_opacity = '50';
2302
+ }
2303
+ echo "<div class='sa_thumbs_line'><span>Thumbs Opacity:</span>";
2304
+ echo "<input type='text' id='sa_thumbs_opacity' name='sa_thumbs_opacity' value='".esc_attr($thumbs_opacity)."'><em>%</em>";
2305
+ echo "</div>\n";
2306
+
2307
+ echo "<h4>Active Thumb Border Style</h4>";
2308
+
2309
+ // Border Width
2310
+ $thumbs_border_width = get_post_meta($post->ID, 'sa_thumbs_border_width', true);
2311
+ if ($thumbs_border_width == '') {
2312
+ $thumbs_border_width = '0';
2313
+ }
2314
+ echo "<div class='sa_thumbs_line'><span>Border Width:</span>";
2315
+ echo "<input type='text' id='sa_thumbs_border_width' name='sa_thumbs_border_width' value='".esc_attr($thumbs_border_width)."'><em>px</em>";
2316
+ echo "</div>\n";
2317
+
2318
+ // Border Color
2319
+ $thumbs_border_color = get_post_meta($post->ID, 'sa_thumbs_border_color', true);
2320
+ if ($thumbs_border_color == '') {
2321
+ $thumbs_border_color = '#ffffff';
2322
+ }
2323
+ echo "<div class='sa_thumbs_line'><span>Border Color:</span>";
2324
+ echo "<input type='text' id='sa_thumbs_border_color' name='sa_thumbs_border_color' value='".esc_attr($thumbs_border_color)."'></div>\n";
2325
+
2326
+ echo "<h4>Responsive Thumb Sizes</h4>";
2327
+
2328
+ // Tablet Thumb Size
2329
+ $thumbs_resp_tablet = get_post_meta($post->ID, 'sa_thumbs_resp_tablet', true);
2330
+ if ($thumbs_resp_tablet == '') {
2331
+ $thumbs_resp_tablet = '75';
2332
+ }
2333
+ echo "<div class='sa_thumbs_line'><span>Tablet Thumb Size:</span>";
2334
+ echo "<input type='text' id='sa_thumbs_resp_tablet' name='sa_thumbs_resp_tablet' value='".esc_attr($thumbs_resp_tablet)."'><em>%</em>";
2335
+ echo "</div>\n";
2336
+
2337
+ // Mobile Thumb Size
2338
+ $thumbs_resp_mobile = get_post_meta($post->ID, 'sa_thumbs_resp_mobile', true);
2339
+ if ($thumbs_resp_mobile == '') {
2340
+ $thumbs_resp_mobile = '50';
2341
+ }
2342
+ echo "<div class='sa_thumbs_line'><span>Mobile Thumb Size:</span>";
2343
+ echo "<input type='text' id='sa_thumbs_resp_mobile' name='sa_thumbs_resp_mobile' value='".esc_attr($thumbs_resp_mobile)."'><em>%</em>";
2344
+ echo "</div>\n";
2345
+
2346
+ echo "</div>\n"; // #sa_thumbs_settings
2347
+
2348
+ } else {
2349
+
2350
+ // display slide anything pro promotional text
2351
+ echo "<div id='sa_thumbs_promo'>";
2352
+ echo "<h4>Available in the PRO VERSION only!</h4>\n";
2353
+ echo "<p>With <strong>Slide Anything PRO </strong> you can now add <strong>Thumbnail Pagination</strong>.";
2354
+ echo "<p>Wiew a Thumbnail Pagination DEMO here:</p>";
2355
+ echo "<p style='padding-top:2px !important;'><a href='https://edgewebpages.com/hero-slider-with-thumbnails' target='_blank'>THUMBNAIL PAGINATION DEMO</a></p>";
2356
+ echo "</div>";
2357
+ }
2358
+ }
2359
+
2360
+
2361
+
2362
+ // ##### META BOX CONTENT - 'Slide Any Post' PROMOTION BOX #####
2363
+ function cpt_slide_any_post_content() {
2364
+ echo "<div id='sa_post_notice'>\n";
2365
+ echo "<div id='sapn_image'>\n";
2366
+ echo "<a href='https://edgewebpages.com/sap' title='View the Slide Any Post website' target='_blank'>";
2367
+ echo "<img src='".get_site_url()."/wp-content/plugins/slide-anything/images/slide_any_post_logo.png' />";
2368
+ echo "</a>\n";
2369
+ echo "</div>\n"; // #sapn_image
2370
+ echo "<div id='sapn_text'>\n";
2371
+ echo "<h3>Generate a carousel/slider for ANY WordPress post type!</h3>\n";
2372
+ echo "<h5>Filter specific posts, filter by taxonomy, or filter by meta data values</h5>\n";
2373
+ echo "<h5>Create custom slide layouts containing post taxonomy data and post meta data</h5>\n";
2374
+ echo "<div><a id='sapn_link' href='https://edgewebpages.com/sap' title='View the Slide Any Post website' ";
2375
+ echo "target='_blank'>MORE INFORMATION</a>\n";
2376
+ echo "<a id='sapn_dismiss' href='".$_SERVER['REQUEST_URI']."&sapost_ignore=0'>DISMISS THIS NOTICE</a></div>";
2377
+ echo "</div>\n"; // #sapn_text
2378
+ echo "<div style='float:none; clear:both; width:100%; height:1px;'></div>\n";
2379
+ echo "</div>\n"; // #sa_post_notice
2380
+ }
2381
+
2382
+
2383
+
2384
+ // ##### ACTION HOOK - SAVE CUSTOM POST TYPE ('Slide Anything') DATA #####
2385
+ function cpt_slider_save_postdata() {
2386
+ global $post;
2387
+ $sa_pro_version = validate_slide_anything_pro_registration();
2388
+
2389
+ // ### VERIFY 1) LOGGED-IN USER IS ADMINISTRATOR AND 2) VALID NONCE TO PREVENT CSRF HACKER ATTACKS ###
2390
+ if (current_user_can('edit_pages') &&
2391
+ isset($_POST['nonce_save_slider']) && wp_verify_nonce($_POST['nonce_save_slider'], basename(__FILE__))) {
2392
+ $total_slides = intval($_POST['sa_num_slides']);
2393
+ if (($_POST['sa_duplicate_slide'] == '') || ($_POST['sa_duplicate_slide'] == '0')) {
2394
+ $duplicate_slide = 0;
2395
+ } else {
2396
+ // A SLIDE NEEDS TO BE DUPLICATED
2397
+ $duplicate_slide = intval($_POST['sa_duplicate_slide']);
2398
+ }
2399
+ if (($_POST['sa_move_slide_up'] == '') || ($_POST['sa_move_slide_up'] == '0')) {
2400
+ $move_slide_up = 0;
2401
+ } else {
2402
+ // A SLIDE NEEDS TO BE MOVED
2403
+ $move_slide_up = intval($_POST['sa_move_slide_up']);
2404
+ }
2405
+
2406
+ // UPDATE CONTENT FOR EACH SLIDE
2407
+ $slides_saved = 0;
2408
+ for ($i = 1; $i <= $total_slides; $i++) {
2409
+ $slide_edit_id = "sa_slide".$i."_content";
2410
+ $slide_image_id = "sa_slide".$i."_image_id";
2411
+ $slide_image_pos = "sa_slide".$i."_image_pos";
2412
+ $slide_image_size = "sa_slide".$i."_image_size";
2413
+ $slide_image_repeat = "sa_slide".$i."_image_repeat";
2414
+ $slide_image_color = "sa_slide".$i."_image_color";
2415
+ $slide_link_url = "sa_slide".$i."_link_url";
2416
+ $slide_link_target = "sa_slide".$i."_link_target";
2417
+ if ($sa_pro_version) {
2418
+ $slide_popup_type = "sa_slide".$i."_popup_type";
2419
+ $slide_popup_imageid = "sa_slide".$i."_popup_imageid";
2420
+ $slide_popup_imagetitle = "sa_slide".$i."_popup_imagetitle";
2421
+ $slide_popup_video_id = "sa_slide".$i."_popup_video_id";
2422
+ $slide_popup_video_type = "sa_slide".$i."_popup_video_type";
2423
+ $slide_popup_background = "sa_slide".$i."_popup_background";
2424
+ $slide_popup_html = "sa_slide".$i."_popup_html";
2425
+ $slide_popup_shortcode = "sa_slide".$i."_popup_shortcode";
2426
+ $slide_popup_bgcol = "sa_slide".$i."_popup_bgcol";
2427
+ $slide_popup_width = "sa_slide".$i."_popup_width";
2428
+ }
2429
+ //$slide_content = wp_kses_post($_POST[$slide_edit_id]); // SANATIZE
2430
+ $slide_content = balanceTags($_POST[$slide_edit_id], true); // FIX MISSING CLOSING TAGS
2431
+ $slide_image_id_val = abs(intval($_POST[$slide_image_id])); // SANATIZE
2432
+ $slide_image_pos_val = sanitize_text_field($_POST[$slide_image_pos]); // SANATIZE
2433
+ $slide_image_size_val = sanitize_text_field($_POST[$slide_image_size]); // SANATIZE
2434
+ $slide_image_repeat_val = sanitize_text_field($_POST[$slide_image_repeat]); // SANATIZE
2435
+ $slide_image_color_val = sanitize_text_field($_POST[$slide_image_color]); // SANATIZE
2436
+ $slide_link_url_val = sanitize_text_field($_POST[$slide_link_url]); // SANATIZE
2437
+ $slide_link_target_val = sanitize_text_field($_POST[$slide_link_target]); // SANATIZE
2438
+ if ($sa_pro_version) {
2439
+ $slide_popup_type_val = sanitize_text_field($_POST[$slide_popup_type]); // SANATIZE
2440
+ $slide_popup_imageid_val = sanitize_text_field($_POST[$slide_popup_imageid]); // SANATIZE
2441
+ $slide_popup_imagetitle_val = sanitize_text_field($_POST[$slide_popup_imagetitle]); // SANATIZE
2442
+ $slide_popup_video_id_val = sanitize_text_field($_POST[$slide_popup_video_id]); // SANATIZE
2443
+ $slide_popup_video_type_val = sanitize_text_field($_POST[$slide_popup_video_type]); // SANATIZE
2444
+ $slide_popup_background_val = sanitize_text_field($_POST[$slide_popup_background]); // SANATIZE
2445
+ $slide_popup_html_val = balanceTags($_POST[$slide_popup_html], true); // FIX MISSING CLOSING TAGS
2446
+ if (isset($_POST[$slide_popup_shortcode])) {
2447
+ $slide_popup_shortcode_val = sanitize_text_field($_POST[$slide_popup_shortcode]); // SANATIZE
2448
+ } else {
2449
+ $slide_popup_shortcode_val = '';
2450
+ }
2451
+ $slide_popup_bgcol_val = sanitize_text_field($_POST[$slide_popup_bgcol]); // SANATIZE
2452
+ $slide_popup_width_val = abs(intval($_POST[$slide_popup_width])); // SANATIZE
2453
+ }
2454
+ // check delete status for slide
2455
+ $del_status_id = "sa_slide".$i."_delete";
2456
+ if (isset($_POST[$del_status_id]) && ($_POST[$del_status_id] != '')) {
2457
+ $del_status = $_POST[$del_status_id];
2458
+ } else {
2459
+ // a new slide has been added
2460
+ $del_status = '1';
2461
+ $slide_content = '';
2462
+ }
2463
+ if ($del_status == '1') {
2464
+ // save slide content only if slide has not been marked for deletion
2465
+ $slides_saved++;
2466
+ $slide_edit_id_save = "sa_slide".$slides_saved."_content";
2467
+ $slide_image_data_saved = "sa_slide".$slides_saved."_image_data";
2468
+ $slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
2469
+ $slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
2470
+ if ($sa_pro_version) {
2471
+ $slide_popup_type_saved = "sa_slide".$slides_saved."_popup_type";
2472
+ $slide_popup_imageid_saved = "sa_slide".$slides_saved."_popup_imageid";
2473
+ $slide_popup_imagetitle_saved = "sa_slide".$slides_saved."_popup_imagetitle";
2474
+ $slide_popup_video_id_saved = "sa_slide".$slides_saved."_popup_video_id";
2475
+ $slide_popup_video_type_saved = "sa_slide".$slides_saved."_popup_video_type";
2476
+ $slide_popup_background_saved = "sa_slide".$slides_saved."_popup_background";
2477
+ $slide_popup_html_saved = "sa_slide".$slides_saved."_popup_html";
2478
+ $slide_popup_shortcode_saved = "sa_slide".$slides_saved."_popup_shortcode";
2479
+ $slide_popup_bgcol_saved = "sa_slide".$slides_saved."_popup_bgcol";
2480
+ $slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
2481
+ }
2482
+ update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
2483
+ $slide_image_data_val = $slide_image_id_val."~".$slide_image_pos_val."~".$slide_image_size_val."~".$slide_image_repeat_val."~".$slide_image_color_val;
2484
+ update_post_meta($post->ID, $slide_image_data_saved, $slide_image_data_val);
2485
+ update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
2486
+ update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
2487
+ if ($sa_pro_version) {
2488
+ update_post_meta($post->ID, $slide_popup_type_saved, $slide_popup_type_val);
2489
+ update_post_meta($post->ID, $slide_popup_imageid_saved, $slide_popup_imageid_val);
2490
+ update_post_meta($post->ID, $slide_popup_imagetitle_saved, $slide_popup_imagetitle_val);
2491
+ update_post_meta($post->ID, $slide_popup_video_id_saved, $slide_popup_video_id_val);
2492
+ update_post_meta($post->ID, $slide_popup_video_type_saved, $slide_popup_video_type_val);
2493
+ update_post_meta($post->ID, $slide_popup_background_saved, $slide_popup_background_val);
2494
+ update_post_meta($post->ID, $slide_popup_html_saved, $slide_popup_html_val);
2495
+ update_post_meta($post->ID, $slide_popup_shortcode_saved, $slide_popup_shortcode_val);
2496
+ update_post_meta($post->ID, $slide_popup_bgcol_saved, $slide_popup_bgcol_val);
2497
+ update_post_meta($post->ID, $slide_popup_width_saved, $slide_popup_width_val);
2498
+ }
2499
+ if ($i == $duplicate_slide) {
2500
+ // the 'duplicate slide' button has been click for this slide - create a new slide that is an exact copy of previous slide
2501
+ // (REPEAT THE CODE ABOVE HERE!!!)
2502
+ $slides_saved++;
2503
+ $slide_edit_id_save = "sa_slide".$slides_saved."_content";
2504
+ $slide_image_data_saved = "sa_slide".$slides_saved."_image_data";
2505
+ $slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
2506
+ $slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
2507
+ if ($sa_pro_version) {
2508
+ $slide_popup_type_saved = "sa_slide".$slides_saved."_popup_type";
2509
+ $slide_popup_imageid_saved = "sa_slide".$slides_saved."_popup_imageid";
2510
+ $slide_popup_imagetitle_saved = "sa_slide".$slides_saved."_popup_imagetitle";
2511
+ $slide_popup_video_id_saved = "sa_slide".$slides_saved."_popup_video_id";
2512
+ $slide_popup_video_type_saved = "sa_slide".$slides_saved."_popup_video_type";
2513
+ $slide_popup_background_saved = "sa_slide".$slides_saved."_popup_background";
2514
+ $slide_popup_html_saved = "sa_slide".$slides_saved."_popup_html";
2515
+ $slide_popup_shortcode_saved = "sa_slide".$slides_saved."_popup_shortcode";
2516
+ $slide_popup_bgcol_saved = "sa_slide".$slides_saved."_popup_bgcol";
2517
+ $slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
2518
+ }
2519
+ update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
2520
+ $slide_image_data_val = $slide_image_id_val."~".$slide_image_pos_val."~".$slide_image_size_val."~".$slide_image_repeat_val."~".$slide_image_color_val;
2521
+ update_post_meta($post->ID, $slide_image_data_saved, $slide_image_data_val);
2522
+ update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
2523
+ update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
2524
+ if ($sa_pro_version) {
2525
+ update_post_meta($post->ID, $slide_popup_type_saved, $slide_popup_type_val);
2526
+ update_post_meta($post->ID, $slide_popup_imageid_saved, $slide_popup_imageid_val);
2527
+ update_post_meta($post->ID, $slide_popup_imagetitle_saved, $slide_popup_imagetitle_val);
2528
+ update_post_meta($post->ID, $slide_popup_video_id_saved, $slide_popup_video_id_val);
2529
+ update_post_meta($post->ID, $slide_popup_video_type_saved, $slide_popup_video_type_val);
2530
+ update_post_meta($post->ID, $slide_popup_background_saved, $slide_popup_background_val);
2531
+ update_post_meta($post->ID, $slide_popup_html_saved, $slide_popup_html_val);
2532
+ update_post_meta($post->ID, $slide_popup_shortcode_saved, $slide_popup_shortcode_val);
2533
+ update_post_meta($post->ID, $slide_popup_bgcol_saved, $slide_popup_bgcol_val);
2534
+ update_post_meta($post->ID, $slide_popup_width_saved, $slide_popup_width_val);
2535
+ }
2536
+ }
2537
+ }
2538
+ }
2539
+
2540
+ if ($move_slide_up != 0) {
2541
+ // A SLIDE NEEDS TO BE MOVED (TWO SLIDES ARE SWAPPED)
2542
+ $slide2 = $move_slide_up;
2543
+ $slide1 = intval($move_slide_up) - 1;
2544
+ //$slide1_content = wp_kses_post($_POST["sa_slide".$slide1."_content"]); // SANATIZE
2545
+ $slide1_content = balanceTags($_POST["sa_slide".$slide1."_content"], true); // FIX MISSING CLOSING TAGS
2546
+ $slide1_image_id = abs(intval($_POST["sa_slide".$slide1."_image_id"])); // SANATIZE
2547
+ $slide1_image_pos = sanitize_text_field($_POST["sa_slide".$slide1."_image_pos"]); // SANATIZE
2548
+ $slide1_image_size = sanitize_text_field($_POST["sa_slide".$slide1."_image_size"]); // SANATIZE
2549
+ $slide1_image_repeat = sanitize_text_field($_POST["sa_slide".$slide1."_image_repeat"]); // SANATIZE
2550
+ $slide1_image_color = sanitize_text_field($_POST["sa_slide".$slide1."_image_color"]); // SANATIZE
2551
+ $slide1_link_url = sanitize_text_field($_POST["sa_slide".$slide1."_link_url"]); // SANATIZE
2552
+ $slide1_link_target = sanitize_text_field($_POST["sa_slide".$slide1."_link_target"]); // SANATIZE
2553
+ if ($sa_pro_version) {
2554
+ $slide1_popup_type = sanitize_text_field($_POST["sa_slide".$slide1."_popup_type"]); // SANATIZE
2555
+ $slide1_popup_imageid = sanitize_text_field($_POST["sa_slide".$slide1."_popup_imageid"]); // SANATIZE
2556
+ $slide1_popup_imagetitle = sanitize_text_field($_POST["sa_slide".$slide1."_popup_imagetitle"]); // SANATIZE
2557
+ $slide1_popup_video_id = sanitize_text_field($_POST["sa_slide".$slide1."_popup_video_id"]); // SANATIZE
2558
+ $slide1_popup_video_type = sanitize_text_field($_POST["sa_slide".$slide1."_popup_video_type"]); // SANATIZE
2559
+ $slide1_popup_background = sanitize_text_field($_POST["sa_slide".$slide1."_popup_background"]); // SANATIZE
2560
+ $slide1_popup_html = balanceTags($_POST["sa_slide".$slide1."_popup_html"], true); // FIX MISSING CLOSING TAGS
2561
+ $slide1_popup_shortcode = sanitize_text_field($_POST["sa_slide".$slide1."_popup_shortcode"]); // SANATIZE
2562
+ $slide1_popup_bgcol = sanitize_text_field($_POST["sa_slide".$slide1."_popup_bgcol"]); // SANATIZE
2563
+ $slide1_popup_width = abs(intval($_POST["sa_slide".$slide1."_popup_width"])); // SANATIZE
2564
+ }
2565
+ //$slide2_content = wp_kses_post($_POST["sa_slide".$slide2."_content"]); // SANATIZE
2566
+ $slide2_content = balanceTags($_POST["sa_slide".$slide2."_content"], true); // FIX MISSING CLOSING TAGS
2567
+ $slide2_image_id = abs(intval($_POST["sa_slide".$slide2."_image_id"])); // SANATIZE
2568
+ $slide2_image_pos = sanitize_text_field($_POST["sa_slide".$slide2."_image_pos"]); // SANATIZE
2569
+ $slide2_image_size = sanitize_text_field($_POST["sa_slide".$slide2."_image_size"]); // SANATIZE
2570
+ $slide2_image_repeat = sanitize_text_field($_POST["sa_slide".$slide2."_image_repeat"]); // SANATIZE
2571
+ $slide2_image_color = sanitize_text_field($_POST["sa_slide".$slide2."_image_color"]); // SANATIZE
2572
+ $slide2_link_url = sanitize_text_field($_POST["sa_slide".$slide2."_link_url"]); // SANATIZE
2573
+ $slide2_link_target = sanitize_text_field($_POST["sa_slide".$slide2."_link_target"]); // SANATIZE
2574
+ if ($sa_pro_version) {
2575
+ $slide2_popup_type = sanitize_text_field($_POST["sa_slide".$slide2."_popup_type"]); // SANATIZE
2576
+ $slide2_popup_imageid = sanitize_text_field($_POST["sa_slide".$slide2."_popup_imageid"]); // SANATIZE
2577
+ $slide2_popup_imagetitle = sanitize_text_field($_POST["sa_slide".$slide2."_popup_imagetitle"]); // SANATIZE
2578
+ $slide2_popup_video_id = sanitize_text_field($_POST["sa_slide".$slide2."_popup_video_id"]); // SANATIZE
2579
+ $slide2_popup_video_type = sanitize_text_field($_POST["sa_slide".$slide2."_popup_video_type"]); // SANATIZE
2580
+ $slide2_popup_background = sanitize_text_field($_POST["sa_slide".$slide2."_popup_background"]); // SANATIZE
2581
+ $slide2_popup_html = balanceTags($_POST["sa_slide".$slide2."_popup_html"], true); // FIX MISSING CLOSING TAGS
2582
+ $slide2_popup_shortcode = sanitize_text_field($_POST["sa_slide".$slide2."_popup_shortcode"]); // SANATIZE
2583
+ $slide2_popup_bgcol = sanitize_text_field($_POST["sa_slide".$slide2."_popup_bgcol"]); // SANATIZE
2584
+ $slide2_popup_width = abs(intval($_POST["sa_slide".$slide2."_popup_width"])); // SANATIZE
2585
+ }
2586
+ update_post_meta($post->ID, "sa_slide".$slide2."_content", $slide1_content);
2587
+ $slide1_image_data = $slide1_image_id."~".$slide1_image_pos."~".$slide1_image_size."~".$slide1_image_repeat."~".$slide1_image_color;
2588
+ update_post_meta($post->ID, "sa_slide".$slide2."_image_data", $slide1_image_data);
2589
+ update_post_meta($post->ID, "sa_slide".$slide2."_link_url", $slide1_link_url);
2590
+ update_post_meta($post->ID, "sa_slide".$slide2."_link_target", $slide1_link_target);
2591
+ if ($sa_pro_version) {
2592
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_type", $slide1_popup_type);
2593
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_imageid", $slide1_popup_imageid);
2594
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_imagetitle", $slide1_popup_imagetitle);
2595
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_video_id", $slide1_popup_video_id);
2596
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_video_type", $slide1_popup_video_type);
2597
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_background", $slide1_popup_background);
2598
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_html", $slide1_popup_html);
2599
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_shortcode", $slide1_popup_shortcode);
2600
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_bgcol", $slide1_popup_bgcol);
2601
+ update_post_meta($post->ID, "sa_slide".$slide2."_popup_width", $slide1_popup_width);
2602
+ }
2603
+ update_post_meta($post->ID, "sa_slide".$slide1."_content", $slide2_content);
2604
+ $slide2_image_data = $slide2_image_id."~".$slide2_image_pos."~".$slide2_image_size."~".$slide2_image_repeat."~".$slide2_image_color;
2605
+ update_post_meta($post->ID, "sa_slide".$slide1."_image_data", $slide2_image_data);
2606
+ update_post_meta($post->ID, "sa_slide".$slide1."_link_url", $slide2_link_url);
2607
+ update_post_meta($post->ID, "sa_slide".$slide1."_link_target", $slide2_link_target);
2608
+ if ($sa_pro_version) {
2609
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_type", $slide2_popup_type);
2610
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_imageid", $slide2_popup_imageid);
2611
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_imagetitle", $slide2_popup_imagetitle);
2612
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_video_id", $slide2_popup_video_id);
2613
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_video_type", $slide2_popup_video_type);
2614
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_background", $slide2_popup_background);
2615
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_html", $slide2_popup_html);
2616
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_shortcode", $slide2_popup_shortcode);
2617
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_bgcol", $slide2_popup_bgcol);
2618
+ update_post_meta($post->ID, "sa_slide".$slide1."_popup_width", $slide2_popup_width);
2619
+ }
2620
+ }
2621
+
2622
+ // UPDATE SLIDE CONTENT CHARACTER COUNT
2623
+ $total_slides = get_post_meta($post->ID, 'sa_num_slides', true);
2624
+ for ($i = 1; $i <= $total_slides; $i++) {
2625
+ $slide_content = get_post_meta($post->ID, "sa_slide".$i."_content", true);
2626
+ $char_count = strlen($slide_content);
2627
+ update_post_meta($post->ID, "sa_slide".$i."_char_count", $char_count);
2628
+ }
2629
+
2630
+ // UPDATE SLIDER SETTINGS
2631
+ update_post_meta($post->ID, 'sa_num_slides', abs(intval($slides_saved))); // SANATIZE
2632
+ if (isset($_POST['sa_disable_visual_editor']) && ($_POST['sa_disable_visual_editor'] == '1')) {
2633
+ update_post_meta($post->ID, 'sa_disable_visual_editor', '1');
2634
+ } else {
2635
+ update_post_meta($post->ID, 'sa_disable_visual_editor', '0');
2636
+ }
2637
+ update_post_meta($post->ID, 'sa_info_added', abs(intval($_POST['sa_info_added']))); // SANATIZE
2638
+ update_post_meta($post->ID, 'sa_info_deleted', abs(intval($_POST['sa_info_deleted']))); // SANATIZE
2639
+ update_post_meta($post->ID, 'sa_duplicate_slide', abs(intval($_POST['sa_duplicate_slide']))); // SANATIZE
2640
+ update_post_meta($post->ID, 'sa_info_duplicated', abs(intval($_POST['sa_info_duplicated']))); // SANATIZE
2641
+ update_post_meta($post->ID, 'sa_move_slide_up', abs(intval($_POST['sa_move_slide_up']))); // SANATIZE
2642
+ update_post_meta($post->ID, 'sa_info_moved', abs(intval($_POST['sa_info_moved']))); // SANATIZE
2643
+ update_post_meta($post->ID, 'sa_slide_duration', abs(floatval($_POST['sa_slide_duration']))); // SANATIZE
2644
+ update_post_meta($post->ID, 'sa_slide_transition', abs(floatval($_POST['sa_slide_transition']))); // SANATIZE
2645
+ update_post_meta($post->ID, 'sa_slide_by', abs(floatval($_POST['sa_slide_by']))); // SANATIZE
2646
+ if (isset($_POST['sa_loop_slider']) && ($_POST['sa_loop_slider'] == '1')) {
2647
+ update_post_meta($post->ID, 'sa_loop_slider', '1');
2648
+ } else {
2649
+ update_post_meta($post->ID, 'sa_loop_slider', '0');
2650
+ }
2651
+ if (isset($_POST['sa_stop_hover']) && ($_POST['sa_stop_hover'] == '1')) {
2652
+ update_post_meta($post->ID, 'sa_stop_hover', '1');
2653
+ } else {
2654
+ update_post_meta($post->ID, 'sa_stop_hover', '0');
2655
+ }
2656
+ if (isset($_POST['sa_nav_arrows']) && ($_POST['sa_nav_arrows'] == '1')) {
2657
+ update_post_meta($post->ID, 'sa_nav_arrows', '1');
2658
+ } else {
2659
+ update_post_meta($post->ID, 'sa_nav_arrows', '0');
2660
+ }
2661
+ if (isset($_POST['sa_pagination']) && ($_POST['sa_pagination'] == '1')) {
2662
+ update_post_meta($post->ID, 'sa_pagination', '1');
2663
+ } else {
2664
+ update_post_meta($post->ID, 'sa_pagination', '0');
2665
+ }
2666
+ if (isset($_POST['sa_random_order']) && ($_POST['sa_random_order'] == '1')) {
2667
+ update_post_meta($post->ID, 'sa_random_order', '1');
2668
+ } else {
2669
+ update_post_meta($post->ID, 'sa_random_order', '0');
2670
+ }
2671
+ if (isset($_POST['sa_reverse_order']) && ($_POST['sa_reverse_order'] == '1')) {
2672
+ update_post_meta($post->ID, 'sa_reverse_order', '1');
2673
+ } else {
2674
+ update_post_meta($post->ID, 'sa_reverse_order', '0');
2675
+ }
2676
+ if (isset($_POST['sa_shortcodes']) && ($_POST['sa_shortcodes'] == '1')) {
2677
+ update_post_meta($post->ID, 'sa_shortcodes', '1');
2678
+ } else {
2679
+ update_post_meta($post->ID, 'sa_shortcodes', '0');
2680
+ }
2681
+ if (isset($_POST['sa_mouse_drag']) && ($_POST['sa_mouse_drag'] == '1')) {
2682
+ update_post_meta($post->ID, 'sa_mouse_drag', '1');
2683
+ } else {
2684
+ update_post_meta($post->ID, 'sa_mouse_drag', '0');
2685
+ }
2686
+ if (isset($_POST['sa_touch_drag']) && ($_POST['sa_touch_drag'] == '1')) {
2687
+ update_post_meta($post->ID, 'sa_touch_drag', '1');
2688
+ } else {
2689
+ update_post_meta($post->ID, 'sa_touch_drag', '0');
2690
+ }
2691
+ if (isset($_POST['sa_click_advance']) && ($_POST['sa_click_advance'] == '1')) {
2692
+ update_post_meta($post->ID, 'sa_click_advance', '1');
2693
+ } else {
2694
+ update_post_meta($post->ID, 'sa_click_advance', '0');
2695
+ }
2696
+ if (isset($_POST['sa_auto_height']) && ($_POST['sa_auto_height'] == '1')) {
2697
+ update_post_meta($post->ID, 'sa_auto_height', '1');
2698
+ } else {
2699
+ update_post_meta($post->ID, 'sa_auto_height', '0');
2700
+ }
2701
+ if (isset($_POST['sa_vert_center']) && ($_POST['sa_vert_center'] == '1')) {
2702
+ update_post_meta($post->ID, 'sa_vert_center', '1');
2703
+ } else {
2704
+ update_post_meta($post->ID, 'sa_vert_center', '0');
2705
+ }
2706
+
2707
+ // UPDATE SLIDER ITEMS DISPLAYED
2708
+ update_post_meta($post->ID, 'sa_items_width1', abs(intval($_POST['sa_items_width1']))); // SANATIZE
2709
+ update_post_meta($post->ID, 'sa_items_width2', abs(intval($_POST['sa_items_width2']))); // SANATIZE
2710
+ update_post_meta($post->ID, 'sa_items_width3', abs(intval($_POST['sa_items_width3']))); // SANATIZE
2711
+ update_post_meta($post->ID, 'sa_items_width4', abs(intval($_POST['sa_items_width4']))); // SANATIZE
2712
+ update_post_meta($post->ID, 'sa_items_width5', abs(intval($_POST['sa_items_width5']))); // SANATIZE
2713
+ update_post_meta($post->ID, 'sa_items_width6', abs(intval($_POST['sa_items_width6']))); // SANATIZE
2714
+ update_post_meta($post->ID, 'sa_transition', sanitize_text_field($_POST['sa_transition'])); // SANATIZE
2715
+ if (isset($_POST['sa_hero_slider']) && ($_POST['sa_hero_slider'] == '1')) {
2716
+ update_post_meta($post->ID, 'sa_hero_slider', '1');
2717
+ } else {
2718
+ update_post_meta($post->ID, 'sa_hero_slider', '0');
2719
+ }
2720
+ if (isset($_POST['sa_showcase_slider']) && ($_POST['sa_showcase_slider'] == '1')) {
2721
+ update_post_meta($post->ID, 'sa_showcase_slider', '1');
2722
+ } else {
2723
+ update_post_meta($post->ID, 'sa_showcase_slider', '0');
2724
+ }
2725
+ if (isset($_POST['sa_showcase_width'])) {
2726
+ update_post_meta($post->ID, 'sa_showcase_width', abs(intval($_POST['sa_showcase_width']))); // SANATIZE
2727
+ }
2728
+ if (isset($_POST['sa_showcase_tablet']) && ($_POST['sa_showcase_tablet'] == '1')) {
2729
+ update_post_meta($post->ID, 'sa_showcase_tablet', '1');
2730
+ } else {
2731
+ update_post_meta($post->ID, 'sa_showcase_tablet', '0');
2732
+ }
2733
+ if (isset($_POST['sa_showcase_width_tab'])) {
2734
+ update_post_meta($post->ID, 'sa_showcase_width_tab', abs(intval($_POST['sa_showcase_width_tab']))); // SANATIZE
2735
+ }
2736
+ if (isset($_POST['sa_showcase_mobile']) && ($_POST['sa_showcase_mobile'] == '1')) {
2737
+ update_post_meta($post->ID, 'sa_showcase_mobile', '1');
2738
+ } else {
2739
+ update_post_meta($post->ID, 'sa_showcase_mobile', '0');
2740
+ }
2741
+ if (isset($_POST['sa_showcase_width_mob'])) {
2742
+ update_post_meta($post->ID, 'sa_showcase_width_mob', abs(intval($_POST['sa_showcase_width_mob']))); // SANATIZE
2743
+ }
2744
+
2745
+ // UPDATE SLIDER STYLE
2746
+ $post_css_id = str_replace("-", "_", $_POST['sa_css_id']);
2747
+ update_post_meta($post->ID, 'sa_css_id', sanitize_text_field($post_css_id)); // SANATIZE
2748
+ update_post_meta($post->ID, 'sa_background_color', sanitize_text_field($_POST['sa_background_color'])); // SANATIZE
2749
+ update_post_meta($post->ID, 'sa_border_width', abs(intval($_POST['sa_border_width']))); // SANATIZE
2750
+ update_post_meta($post->ID, 'sa_border_color', sanitize_text_field($_POST['sa_border_color'])); // SANATIZE
2751
+ update_post_meta($post->ID, 'sa_border_radius', abs(intval($_POST['sa_border_radius']))); // SANATIZE
2752
+ update_post_meta($post->ID, 'sa_wrapper_padd_top', abs(intval($_POST['sa_wrapper_padd_top']))); // SANATIZE
2753
+ update_post_meta($post->ID, 'sa_wrapper_padd_right', abs(intval($_POST['sa_wrapper_padd_right']))); // SANATIZE
2754
+ update_post_meta($post->ID, 'sa_wrapper_padd_bottom', abs(intval($_POST['sa_wrapper_padd_bottom']))); // SANATIZE
2755
+ update_post_meta($post->ID, 'sa_wrapper_padd_left', abs(intval($_POST['sa_wrapper_padd_left']))); // SANATIZE
2756
+ if ($_POST['sa_slide_min_height_type'] == 'px') {
2757
+ update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height']).'px'); // SANATIZE
2758
+ } else {
2759
+ update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height'])); // SANATIZE
2760
+ }
2761
+ update_post_meta($post->ID, 'sa_slide_padding_tb', abs(floatval($_POST['sa_slide_padding_tb']))); // SANATIZE
2762
+ update_post_meta($post->ID, 'sa_slide_padding_lr', abs(floatval($_POST['sa_slide_padding_lr']))); // SANATIZE
2763
+ update_post_meta($post->ID, 'sa_slide_margin_lr', abs(floatval($_POST['sa_slide_margin_lr']))); // SANATIZE
2764
+ update_post_meta($post->ID, 'sa_slide_icons_location', sanitize_text_field($_POST['sa_slide_icons_location'])); // SANATIZE
2765
+ update_post_meta($post->ID, 'sa_slide_icons_color', sanitize_text_field($_POST['sa_slide_icons_color'])); // SANATIZE
2766
+ if (isset($_POST['sa_autohide_arrows']) && ($_POST['sa_autohide_arrows'] == '1')) {
2767
+ update_post_meta($post->ID, 'sa_autohide_arrows', '1');
2768
+ } else {
2769
+ update_post_meta($post->ID, 'sa_autohide_arrows', '0');
2770
+ }
2771
+ if (isset($_POST['sa_dot_per_slide']) && ($_POST['sa_dot_per_slide'] == '1')) {
2772
+ update_post_meta($post->ID, 'sa_dot_per_slide', '1');
2773
+ } else {
2774
+ update_post_meta($post->ID, 'sa_dot_per_slide', '0');
2775
+ }
2776
+ if (isset($_POST['sa_slide_icons_visible']) && ($_POST['sa_slide_icons_visible'] == '1')) {
2777
+ update_post_meta($post->ID, 'sa_slide_icons_visible', '1');
2778
+ } else {
2779
+ update_post_meta($post->ID, 'sa_slide_icons_visible', '0');
2780
+ }
2781
+
2782
+ // OTHER SETTINGS
2783
+ $other_settings = '';
2784
+ if (isset($_POST['sa_window_onload']) && ($_POST['sa_window_onload'] == '1')) {
2785
+ $other_settings .= "1";
2786
+ } else {
2787
+ $other_settings .= "0";
2788
+ }
2789
+ if (isset($_POST['sa_strip_javascript']) && ($_POST['sa_strip_javascript'] == '1')) {
2790
+ $other_settings .= "|1";
2791
+ } else {
2792
+ $other_settings .= "|0";
2793
+ }
2794
+ if (isset($_POST['sa_lazy_load_images']) && ($_POST['sa_lazy_load_images'] == '1')) {
2795
+ $other_settings .= "|1";
2796
+ } else {
2797
+ $other_settings .= "|0";
2798
+ }
2799
+ if (isset($_POST['sa_ulli_containers']) && ($_POST['sa_ulli_containers'] == '1')) {
2800
+ $other_settings .= "|1";
2801
+ } else {
2802
+ $other_settings .= "|0";
2803
+ }
2804
+ if (isset($_POST['sa_rtl_slider']) && ($_POST['sa_rtl_slider'] == '1')) {
2805
+ $other_settings .= "|1";
2806
+ } else {
2807
+ $other_settings .= "|0";
2808
+ }
2809
+ if (isset($_POST['sa_disable_preview']) && ($_POST['sa_disable_preview'] == '1')) {
2810
+ $other_settings .= "|1";
2811
+ } else {
2812
+ $other_settings .= "|0";
2813
+ }
2814
+ update_post_meta($post->ID, 'sa_other_settings', $other_settings);
2815
+ // starting slide number
2816
+ update_post_meta($post->ID, 'sa_start_pos', abs(intval($_POST['sa_start_pos']))); // SANATIZE
2817
+
2818
+ if ($sa_pro_version) {
2819
+ // THUMBNAIL PAGINATION
2820
+ if (isset($_POST['sa_thumbs_active']) && ($_POST['sa_thumbs_active'] == '1')) {
2821
+ update_post_meta($post->ID, 'sa_thumbs_active', '1');
2822
+ } else {
2823
+ update_post_meta($post->ID, 'sa_thumbs_active', '0');
2824
+ }
2825
+ update_post_meta($post->ID, 'sa_thumbs_location', sanitize_text_field($_POST['sa_thumbs_location'])); // SANATIZE
2826
+ update_post_meta($post->ID, 'sa_thumbs_image_size', sanitize_text_field($_POST['sa_thumbs_image_size'])); // SANATIZE
2827
+ update_post_meta($post->ID, 'sa_thumbs_padding', abs(floatval($_POST['sa_thumbs_padding']))); // SANATIZE
2828
+ update_post_meta($post->ID, 'sa_thumbs_width', abs(intval($_POST['sa_thumbs_width']))); // SANATIZE
2829
+ update_post_meta($post->ID, 'sa_thumbs_height', abs(intval($_POST['sa_thumbs_height']))); // SANATIZE
2830
+ update_post_meta($post->ID, 'sa_thumbs_opacity', abs(intval($_POST['sa_thumbs_opacity']))); // SANATIZE
2831
+ update_post_meta($post->ID, 'sa_thumbs_border_width', abs(intval($_POST['sa_thumbs_border_width']))); // SANATIZE
2832
+ update_post_meta($post->ID, 'sa_thumbs_border_color', sanitize_text_field($_POST['sa_thumbs_border_color'])); // SANATIZE
2833
+ update_post_meta($post->ID, 'sa_thumbs_resp_tablet', abs(intval($_POST['sa_thumbs_resp_tablet']))); // SANATIZE
2834
+ update_post_meta($post->ID, 'sa_thumbs_resp_mobile', abs(intval($_POST['sa_thumbs_resp_mobile']))); // SANATIZE
2835
+ }
2836
+ }
2837
+ }
2838
+
2839
+ // ##### FUNCTION CHECKS WHETHER SLIDE ANYTHING PRO IS REGISTERED - RETURNS TRUE OR FALSE #####
2840
+ function validate_slide_anything_pro_registration() {
2841
+ if (!function_exists('validate_slide_anything_pro_license_key')) {
2842
+ return false;
2843
+ }
2844
+ $valid_key = validate_slide_anything_pro_license_key();
2845
+ return $valid_key;
2846
+ }
2847
+
2848
+
2849
+
2850
+ // ########################################################################
2851
+ // ### FUNCTION DUPLICATES A 'SLIDE ANYTHING SLIDER' ('sa_slider') POST ###
2852
+ // ########################################################################
2853
+ function duplicate_sa_slider_post_as_draft() {
2854
+ global $wpdb;
2855
+
2856
+ if (!(isset($_GET['post']) || isset($_POST['post']) || (isset($_REQUEST['action']) && 'duplicate_sa_slider_post_as_draft' == $_REQUEST['action']))) {
2857
+ wp_die('No post ID parameter has been supplied!');
2858
+ }
2859
+
2860
+ // NONCE VERIFICATION
2861
+ if (!isset($_GET['duplicate_nonce']) || !wp_verify_nonce($_GET['duplicate_nonce'], basename(__FILE__))) {
2862
+ return;
2863
+ }
2864
+
2865
+ // GET THE ORIGINAL POST ID
2866
+ $post_id = (isset($_GET['post']) ? absint($_GET['post']) : absint($_POST['post']));
2867
+ // GET THE ORIGINAL POST DATA
2868
+ $post = get_post($post_id);
2869
+
2870
+ // SET THE CURRENT USER AS THE NEW POST AUTHOR
2871
+ $current_user = wp_get_current_user();
2872
+ $new_post_author = $current_user->ID;
2873
+
2874
+ // POST DATA EXISTS - CREATE THE POST DUPLICATE
2875
+ if (isset( $post ) && $post != null) {
2876
+ // NEW POST DATA ARRAY
2877
+ $args = array(
2878
+ 'comment_status' => $post->comment_status,
2879
+ 'ping_status' => $post->ping_status,
2880
+ 'post_author' => $new_post_author,
2881
+ 'post_content' => $post->post_content,
2882
+ 'post_excerpt' => $post->post_excerpt,
2883
+ 'post_name' => $post->post_name,
2884
+ 'post_parent' => $post->post_parent,
2885
+ 'post_password' => $post->post_password,
2886
+ 'post_status' => 'draft',
2887
+ 'post_title' => $post->post_title." COPY",
2888
+ 'post_type' => $post->post_type,
2889
+ 'to_ping' => $post->to_ping,
2890
+ 'menu_order' => $post->menu_order
2891
+ );
2892
+
2893
+ // INSERT THE NEW POST USING THE 'wp_insert_post()' FUNCTION
2894
+ $new_post_id = wp_insert_post($args);
2895
+
2896
+ // GET ALL THE CURRENT POST'S TERMS AND SET THEM TO THE NEW POST DRAFT
2897
+ $taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type
2898
+ foreach ($taxonomies as $taxonomy) {
2899
+ $post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
2900
+ wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);
2901
+ }
2902
+
2903
+ // DUPLICATE ALL POST META USING JUST 2 SQL QUERIES
2904
+ $post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id");
2905
+ if (count($post_meta_infos)!=0) {
2906
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
2907
+ foreach ($post_meta_infos as $meta_info) {
2908
+ $meta_key = $meta_info->meta_key;
2909
+ if ($meta_key == '_wp_old_slug') continue;
2910
+ $meta_value = addslashes($meta_info->meta_value);
2911
+ $sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
2912
+ }
2913
+ $sql_query.= implode(" UNION ALL ", $sql_query_sel);
2914
+ $wpdb->query($sql_query);
2915
+ }
2916
+
2917
+ // REDIRECT TO THE 'SA Sliders' LIST SCREEN
2918
+ wp_redirect(admin_url('edit.php?post_type=sa_slider'));
2919
+ exit;
2920
+
2921
+ } else {
2922
+ wp_die('Duplicate post creation failed - could not find original post for ID: ' .$post_id);
2923
+ }
2924
+ }
2925
+ add_action('admin_action_duplicate_sa_slider_post_as_draft', 'duplicate_sa_slider_post_as_draft');
2926
+
2927
+ // ##### ADD THE DUPLICATE LINK TO THE ACTION LIST FOR SA SLIDER 'post_row_actions' #####
2928
+ function duplicate_sa_slider_post_link($actions, $post) {
2929
+ if (($post->post_type == 'sa_slider') && (current_user_can('edit_posts'))) {
2930
+ $actions['duplicate'] = '<a href="'.wp_nonce_url('admin.php?action=duplicate_sa_slider_post_as_draft&post='.$post->ID, basename(__FILE__), 'duplicate_nonce').'" title="Duplicate this Slider" rel="permalink">Duplicate Slider</a>';
2931
+ }
2932
+ return $actions;
2933
+ }
2934
+ add_filter('post_row_actions', 'duplicate_sa_slider_post_link', 10, 2);
2935
+
2936
+
2937
+
2938
+ // ###################################################################################
2939
+ // ### FUNCTION DISPLAYS THE 'RE-ORDER SLIDES' SUB-PAGE IN THE WORDPRESS DASHBOARD ###
2940
+ // ###################################################################################
2941
+ function extra_sa_menu_pages() {
2942
+ add_submenu_page(
2943
+ 'edit.php?post_type=sa_slider',
2944
+ __('Re-Order Slides', 'menu-sa-order'),
2945
+ __('Re-Order Slides', 'menu-sa-order'),
2946
+ 'manage_options',
2947
+ 'reorderslides',
2948
+ 'sa_reorder_slides_page'
2949
+ );
2950
+ }
2951
+
2952
+ function sa_reorder_slides_page() {
2953
+ $sa_pro_version = validate_slide_anything_pro_registration();
2954
+ $page_url = get_admin_url()."edit.php?post_type=sa_slider&page=reorderslides";
2955
+ $placeholder_image = get_site_url()."/wp-content/plugins/slide-anything/images/bg_placeholder.png";
2956
+
2957
+ echo "<div id='sa_reorder_slides'>\n";
2958
+ echo "<h1>Slide Anything - Re-Order Slides</h1>";
2959
+
2960
+ if (isset($_POST['sar_slider_id']) && ($_POST['sar_slider_id'] != '')) {
2961
+ // ##### A POST VARIABLE FOR 'SLIDER ID' HAS BEEN PASSED #####
2962
+ $slider_id = $_POST['sar_slider_id'];
2963
+ $slider_title = get_the_title($slider_id);
2964
+
2965
+ if (isset($_POST['sar_sort_order']) && ($_POST['sar_sort_order'] != '')) {
2966
+ // ### CHANGE THE ORDER OF SLIDE DATA FOR THE SLIDER AND RE-SAVE METADATA ###
2967
+ $sort_order = $_POST['sar_sort_order'];
2968
+ $data_in_arr = array();
2969
+ $data_out_arr = array();
2970
+
2971
+ // 1) SAVE SLIDES METADATA TO AN 'IN' ARRAY (ONLY SLIDES MEATDATA AND NO SETTINGS DATA SAVED!)
2972
+ $metadata = get_metadata('post', $slider_id);
2973
+ $num_slides = $metadata['sa_num_slides'][0];
2974
+ foreach ($metadata as $key => $value_arr) {
2975
+ $value = $value_arr[0];
2976
+ for ($i = 1; $i <= $num_slides; $i++) {
2977
+ $key_prefix = "sa_slide".$i."_";
2978
+ if (strpos($key, $key_prefix) === 0) {
2979
+ // metadata key starts with the key prefix ('sa_slide??')
2980
+ $data_in_arr[$key] = $value;
2981
+ }
2982
+ }
2983
+ }
2984
+
2985
+ // 2) CREATE THE NEW SLIDES 'OUT' ARRAY (WITH THE NEW SLIDE ORDER)
2986
+ $sort_order_arr = explode(",", $sort_order);
2987
+ for ($i = 0; $i < count($sort_order_arr); $i++) {
2988
+ $loop_prefix = "sa_slide".($i+1)."_"; // ascending loop order (1, 2, 3...)
2989
+ $order_prefix = "sa_slide".$sort_order_arr[$i]."_"; // slide number to be stored in this slot
2990
+ foreach ($data_in_arr as $key => $value) {
2991
+ if (strpos($key, $order_prefix) === 0) {
2992
+ // metakey key value starts with the order prefix
2993
+ $new_key = str_replace($order_prefix, $loop_prefix, $key);
2994
+ $data_out_arr[$new_key] = $value;
2995
+ }
2996
+ }
2997
+ }
2998
+
2999
+ // 3) LOOP THROUGH SLIDES 'OUT' ARRAY UPDATING POST METADATA
3000
+ foreach ($data_out_arr as $key => $value) {
3001
+ update_post_meta($slider_id, $key, $value);
3002
+ }
3003
+
3004
+ echo "<h3 id='sar_success_message'>SLIDE ORDER HAS BEEN UPDATED</h3>";
3005
+ } else {
3006
+ if (isset($_POST['sar_del_slides']) && ($_POST['sar_del_slides'] != '')) {
3007
+ // ### DELETE ALL SLIDES WITH THE 'DELETE SLIDE' CHECKBOX CHECKED ###
3008
+ $del_slides = $_POST['sar_del_slides'];
3009
+ $del_slides_arr = explode(",", $del_slides);
3010
+ $data_in_arr = array();
3011
+ $data_out_arr = array();
3012
+
3013
+ // 1) SAVE SLIDES METADATA TO AN 'IN' ARRAY (ONLY SLIDES MEATDATA AND NO SETTINGS DATA SAVED!)
3014
+ $metadata = get_metadata('post', $slider_id);
3015
+ $num_slides = $metadata['sa_num_slides'][0];
3016
+ foreach ($metadata as $key => $value_arr) {
3017
+ $value = $value_arr[0];
3018
+ for ($i = 1; $i <= $num_slides; $i++) {
3019
+ $key_prefix = "sa_slide".$i."_";
3020
+ if (strpos($key, $key_prefix) === 0) {
3021
+ // metadata key starts with the key prefix ('sa_slide??')
3022
+ $data_in_arr[$i][$key] = $value;
3023
+ }
3024
+ }
3025
+ }
3026
+
3027
+ // 2) CREATE THE NEW SLIDES 'OUT' ARRAY (WITH THE DELETED SLIDES REMOVED)
3028
+ $curr_index = 0;
3029
+ $tot_del = 0;
3030
+ for ($i = 1; $i <= $num_slides; $i++) {
3031
+ $loop_prefix = "sa_slide".$i."_";
3032
+ $delete_yn = 0;
3033
+ for ($j = 0; $j < count($del_slides_arr); $j++) {
3034
+ if ($i == $del_slides_arr[$j]) {
3035
+ $delete_yn = 1;
3036
+ }
3037
+ }
3038
+ if ($delete_yn == 0) {
3039
+ // current slide is NOT to be deleted - copy to 'out' array
3040
+ $curr_index++;
3041
+ $curr_prefix = "sa_slide".$curr_index."_";
3042
+ foreach ($data_in_arr[$i] as $key => $value) {
3043
+ $new_key = str_replace($loop_prefix, $curr_prefix, $key);
3044
+ $data_out_arr[$new_key] = $value;
3045
+ }
3046
+ } else {
3047
+ $tot_del++;
3048
+ }
3049
+ }
3050
+
3051
+ // 3) LOOP THROUGH SLIDES 'OUT' ARRAY UPDATING POST METADATA
3052
+ update_post_meta($slider_id, 'sa_num_slides', $curr_index);
3053
+ foreach ($data_out_arr as $key => $value) {
3054
+ update_post_meta($slider_id, $key, $value);
3055
+ }
3056
+
3057
+ if ($tot_del == 1) {
3058
+ echo "<h3 id='sar_success_message'>".$tot_del." SLIDE HAS BEEN DELETED</h3>";
3059
+ } else {
3060
+ echo "<h3 id='sar_success_message'>".$tot_del." SLIDES HAVE BEEN DELETED</h3>";
3061
+ }
3062
+ }
3063
+ }
3064
+
3065
+ // GET REQUIRED SLIDER METADATA AND SAVE WITHIN AN ARRAY
3066
+ $num_slides = 0;
3067
+ $slide_arr = array();
3068
+ $metadata = get_metadata('post', $slider_id);
3069
+ if (count($metadata) > 0) {
3070
+ $num_slides = $metadata['sa_num_slides'][0];
3071
+ }
3072
+ if ($num_slides != 0) {
3073
+ // SLIDER CONTAINS SLIDES - DISPLAY SORTABLE LIST OF SLIDES
3074
+ for ($i = 1; $i <= $num_slides; $i++) {
3075
+ $image_data = $metadata["sa_slide".$i."_image_data"][0];
3076
+ $image_data_arr = explode("~", $image_data);
3077
+ $slide_arr[$i]['image_id'] = $image_data_arr[0];
3078
+ $slide_arr[$i]['content'] = $metadata["sa_slide".$i."_content"][0];
3079
+ // cater for popup images used as the slide background
3080
+ $popup_type = $popup_background = '';
3081
+ if (!$sa_pro_version) {
3082
+ if (isset($metadata["sa_slide".$i."_popup_type"][0])) {
3083
+ $popup_type = $metadata["sa_slide".$i."_popup_type"][0];
3084
+ }
3085
+ if (isset($metadata["sa_slide".$i."_popup_background"][0])) {
3086
+ $popup_background = $metadata["sa_slide".$i."_popup_background"][0];
3087
+ }
3088
+ }
3089
+ if ($popup_type == 'IMAGE') {
3090
+ if (($popup_background != '') && ($popup_background != 'no')) {
3091
+ $slide_arr[$i]['image_id'] = $metadata["sa_slide".$i."_popup_imageid"][0];
3092
+ }
3093
+ }
3094
+ }
3095
+
3096
+ // DISPLAY THE SORTABLE GRID OF SLIDES
3097
+ echo "<h2 id='sar_slider_title'>".$slider_title."</h2>\n";
3098
+ echo "<h3 id='sar_drag_message'>Drag slides to re-order...</h3>\n";
3099
+ echo "<ul id='sar_sortable'>\n";
3100
+ for ($i = 1; $i <= $num_slides; $i++) {
3101
+ $bg_image = $placeholder_image;
3102
+ $slide_image_src = wp_get_attachment_image_src($slide_arr[$i]['image_id'], 'thumbnail');
3103
+ if (!empty($slide_image_src[0])) {
3104
+ $bg_image = $slide_image_src[0];
3105
+ }
3106
+ echo "<li id='sar".$i."' class='ui-state-default'>\n";
3107
+ echo "<div class='sar_image' style='background-image:url(\"".$bg_image."\");'></div>\n";
3108
+ echo "<div class='sar_content'>\n";
3109
+ echo "<h4 class='sar_slide_num'>SLIDE ".$i."</h4>\n";
3110
+ echo "<div class='sar_del_slide'>DELETE <span>SLIDE</span>";
3111
+ echo "<input type='checkbox' id='sar_del".$i."' name='sar_del".$i."' class='sar_del_checkbox'/>";
3112
+ echo "</div>\n";
3113
+ echo "<div class='sar_slide_html'>".nl2br(htmlentities($slide_arr[$i]['content']))."</div>\n";
3114
+ echo "</div>";
3115
+ echo "</li>\n";
3116
+ }
3117
+ echo "</ul>\n"; #sar_sortable
3118
+
3119
+ // DISPLAY THE HTML FORM CONTAINING THE SORT ORDER INPUT ELEMENT
3120
+ echo "<form method='post' id='sar_order_form'>\n";
3121
+ echo "<input type='hidden' name='sar_slider_id' value='".$slider_id."'/>";
3122
+ echo "<input type='hidden' id='sar_sort_order' name='sar_sort_order'/>";
3123
+ echo "<input type='hidden' id='sar_del_slides' name='sar_del_slides'/>";
3124
+ echo "<input type='submit' id='sar_update_but' value='UPDATE ORDER'/>";
3125
+ echo "<input type='submit' id='sar_delete_but' value='DELETE SLIDES'/>";
3126
+ echo "</form>\n";
3127
+
3128
+ } else {
3129
+ // SLIDER CONTAINS NO SLIDES - DISPLAY MESSAGE
3130
+ echo "<h3 id='sar_no_slides_found'>This slider contains NO slides!</h3>\n";
3131
+ echo "<a class='sar_back_button' href='".$page_url."'>BACK</a>";
3132
+ }
3133
+
3134
+ } else {
3135
+ // ##### NO POST VARIABLE FOR 'SLIDER ID' HAS BEEN PASSED #####
3136
+ // WP QUERY TO GET ARRAY OF SA SLIDERS (ID & TITLE) THAT EXIST
3137
+ $slider_arr = array();
3138
+ $count = 0;
3139
+ $args = array(
3140
+ 'post_type' => 'sa_slider',
3141
+ 'post_status' => array('publish','draft'),
3142
+ 'orderby' => 'menu_order',
3143
+ 'order' => 'ASC',
3144
+ 'posts_per_page' => -1,
3145
+ );
3146
+ $sliders = new WP_Query($args);
3147
+ if ($sliders->have_posts()) {
3148
+ while ($sliders->have_posts() ) {
3149
+ $sliders->the_post();
3150
+ $slider_arr[$count]['id'] = get_the_ID();
3151
+ $slider_arr[$count]['title'] = get_the_title();
3152
+ $count++;
3153
+ }
3154
+ }
3155
+ wp_reset_postdata();
3156
+
3157
+ if (count($slider_arr) > 0) {
3158
+ // DISPLAY FORM CONTAINING SA SLIDER SELECT DROPDOWN
3159
+ echo "<form method='post' id='sar_slider_form'>\n";
3160
+ echo "<p>This tool allows you to change the order of slides within a Slide Anything slider.</p>\n";
3161
+ echo "<p>Select the slider you would like to re-order, then just drag-and-drop slides for your new slide order.</p>\n";
3162
+ echo "<div style='padding-top:10px;'>Select Slider to Re-Order:<br/>";
3163
+ echo "<select id='sar_slider_id' name='sar_slider_id'>\n";
3164
+ for ($i = 0; $i < count($slider_arr); $i++) {
3165
+ echo "<h4>|".$slider_arr[$i]['id']."|".$slider_arr[$i]['title']."|</h4>";
3166
+ echo "<option value='".$slider_arr[$i]['id']."'>".$slider_arr[$i]['title']." (#".$slider_arr[$i]['id'].")</option>\n";
3167
+ }
3168
+ echo "<select></div>\n";
3169
+ echo "<div><input type='submit' value='Select Slider'/></div>\n";
3170
+ echo "</form>\n";
3171
+ } else {
3172
+ // NO SA SLIDERS FOUND - DISPLAY MESSAGE
3173
+ echo "<h3 id='sar_no_sliders_found'>No Slide Anything sliders found!</h3>\n";
3174
+ }
3175
+ }
3176
+
3177
+ echo "</div>\n"; #sa_reorder_slides
3178
+ }
3179
+
3180
+
3181
+ // ### FUNCTION CALLED BY 'template_include' FILTER TO USE A CUSTOM PAGE TERMPLATE FOR SA PREVIEW PAGE ###
3182
+ function sa_preview_page_template($template) {
3183
+ if (is_page('Slide Anything Popup Preview')) {
3184
+ $template = dirname( __FILE__ ).'/single-page.php';
3185
+ }
3186
+ return $template;
3187
+ }
3188
+ ?>
trunk/php/slide-anything-frontend.php ADDED
@@ -0,0 +1,1237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // #####################################################################
3
+ // ### SLIDE ANYTHING PLUGIN - PHP FUNCTIONS FOR WORDPRESS FRONT-END ###
4
+ // #####################################################################
5
+
6
+ add_shortcode('slide-anything', 'slide_anything_shortcode');
7
+
8
+ /* ##### ROOT FUNCTION THAT IS CALLED TO BY THE 'slide-anything' SHORTCODE ##### */
9
+ function slide_anything_shortcode($atts) {
10
+ $sa_pro_version = esc_attr(get_option('sap_valid_license'));
11
+ wp_enqueue_script('jquery');
12
+ wp_register_script('owl_carousel_js', SA_PLUGIN_PATH.'owl-carousel/owl.carousel.min.js', array('jquery'), '2.2.1', true);
13
+ wp_enqueue_script('owl_carousel_js');
14
+ wp_register_style('owl_carousel_css', SA_PLUGIN_PATH.'owl-carousel/owl.carousel.css', array(), '2.2.1.1', 'all');
15
+ wp_enqueue_style('owl_carousel_css');
16
+ wp_register_style('owl_theme_css', SA_PLUGIN_PATH.'owl-carousel/sa-owl-theme.css', array(), '2.0', 'all');
17
+ wp_enqueue_style('owl_theme_css');
18
+ wp_register_style('owl_animate_css', SA_PLUGIN_PATH.'owl-carousel/animate.min.css', array(), '2.0', 'all');
19
+ wp_enqueue_style('owl_animate_css');
20
+ if ($sa_pro_version) {
21
+ // JAVASCRIPT/CSS FOR MAGNIFIC POPUP
22
+ wp_register_script('magnific-popup_js', SA_PLUGIN_PATH.'magnific-popup/jquery.magnific-popup.min.js', array('jquery'), '1.1.0', true);
23
+ wp_enqueue_script('magnific-popup_js');
24
+ wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css', array(), '1.1.0', 'all');
25
+ wp_enqueue_style('magnific-popup_css');
26
+ wp_register_script('owl_thumbs_js', SA_PLUGIN_PATH.'owl-carousel/owl.carousel2.thumbs.min.js', array('jquery'), '0.1.8', true);
27
+ wp_enqueue_script('owl_thumbs_js');
28
+ }
29
+
30
+ // EXTRACT SHORTCODE ATTRIBUTES
31
+ extract(shortcode_atts(array(
32
+ 'id' => 0,
33
+ ), $atts));
34
+ $output = '';
35
+ if ($id == 0) {
36
+ // SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
37
+ $output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
38
+ } else {
39
+ $post_status = get_post_status($id);
40
+ if ($post_status == 'publish') {
41
+ $metadata = get_metadata('post', $id);
42
+ $post_type = get_post_type($id);
43
+ }
44
+ if (($post_status != 'publish') || (count($metadata) == 0) || ($post_type != 'sa_slider')) {
45
+ // SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
46
+ $output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
47
+ } else {
48
+ // ### VALID 'id' PROVIDED - PROCESS SHORTCODE ###
49
+ // GET SLIDE DATA FROM DATABASE AND SAVE IN ARRAY
50
+ $slide_data = array();
51
+ $slide_data['num_slides'] = $metadata['sa_num_slides'][0];
52
+ $slide_data['shortcodes'] = $metadata['sa_shortcodes'][0];
53
+ if ($slide_data['shortcodes'] == '1') {
54
+ $slide_data['shortcodes'] = 'true';
55
+ } else {
56
+ $slide_data['shortcodes'] = 'false';
57
+ }
58
+ $slide_data['css_id'] = $metadata['sa_css_id'][0];
59
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
60
+ $slide_data["slide".$i."_num"] = $i;
61
+ // apply 'the_content' filter to slide content to process any shortcodes
62
+ if ($slide_data['shortcodes'] == 'true') {
63
+ $slide_data["slide".$i."_content"] = do_shortcode($metadata["sa_slide".$i."_content"][0]);
64
+ } else {
65
+ $slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
66
+ }
67
+ $slide_image_data = '';
68
+ if (isset($metadata["sa_slide".$i."_image_data"])) {
69
+ $slide_image_data = $metadata["sa_slide".$i."_image_data"][0];
70
+ }
71
+ if (isset($slide_image_data) && ($slide_image_data != '')) {
72
+ $data_arr = explode("~", $slide_image_data);
73
+ $slide_data["slide".$i."_image_id"] = $data_arr[0];
74
+ $slide_data["slide".$i."_image_pos"] = $data_arr[1];
75
+ $slide_data["slide".$i."_image_size"] = $data_arr[2];
76
+ $slide_data["slide".$i."_image_repeat"] = $data_arr[3];
77
+ $slide_data["slide".$i."_image_color"] = $data_arr[4];
78
+ } else {
79
+ $slide_data["slide".$i."_image_id"] = $metadata["sa_slide".$i."_image_id"][0];
80
+ $slide_data["slide".$i."_image_pos"] = $metadata["sa_slide".$i."_image_pos"][0];
81
+ $slide_data["slide".$i."_image_size"] = $metadata["sa_slide".$i."_image_size"][0];
82
+ $slide_data["slide".$i."_image_repeat"] = $metadata["sa_slide".$i."_image_repeat"][0];
83
+ $slide_data["slide".$i."_image_color"] = $metadata["sa_slide".$i."_image_color"][0];
84
+ }
85
+ $slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
86
+ $slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
87
+ if ($slide_data["slide".$i."_link_target"] == '') {
88
+ $slide_data["slide".$i."_link_target"] = '_self';
89
+ }
90
+ if ($sa_pro_version) {
91
+ // ### PRO VERSION - GET POPUP DATA ###
92
+ $slide_data["slide".$i."_popup_type"] = "NONE";
93
+ $slide_data["slide".$i."_popup_imageid"] = "";
94
+ $slide_data["slide".$i."_popup_imagetitle"] = "";
95
+ $slide_data["slide".$i."_popup_video_id"] = "";
96
+ $slide_data["slide".$i."_popup_video_type"] = "";
97
+ $slide_data["slide".$i."_popup_html"] = "";
98
+ $slide_data["slide".$i."_popup_shortcode"] = "";
99
+ $slide_data["slide".$i."_popup_bgcol"] = "#ffffff";
100
+ $slide_data["slide".$i."_popup_width"] = "600";
101
+ if (isset($metadata["sa_slide".$i."_popup_type"])) {
102
+ $slide_data["slide".$i."_popup_type"] = $metadata["sa_slide".$i."_popup_type"][0];
103
+ }
104
+ if (isset($metadata["sa_slide".$i."_popup_imageid"])) {
105
+ $slide_data["slide".$i."_popup_imageid"] = $metadata["sa_slide".$i."_popup_imageid"][0];
106
+ }
107
+ if (isset($metadata["sa_slide".$i."_popup_imagetitle"])) {
108
+ $slide_data["slide".$i."_popup_imagetitle"] = $metadata["sa_slide".$i."_popup_imagetitle"][0];
109
+ }
110
+ $slide_data["slide".$i."_popup_image"] = '';
111
+ $slide_data["slide".$i."_popup_background"] = 'no';
112
+ if ($slide_data["slide".$i."_popup_type"] == 'IMAGE') {
113
+ if (($slide_data["slide".$i."_popup_imageid"] != '') && ($slide_data["slide".$i."_popup_imageid"] != 0)) {
114
+ $popup_full_images = wp_get_attachment_image_src($slide_data["slide".$i."_popup_imageid"], 'full');
115
+ $slide_data["slide".$i."_popup_image"] = $popup_full_images[0];
116
+ $slide_data["slide".$i."_popup_background"] = $metadata["sa_slide".$i."_popup_background"][0];
117
+ if ($slide_data["slide".$i."_popup_background"] == '') {
118
+ $slide_data["slide".$i."_popup_background"] = 'no';
119
+ }
120
+ }
121
+ }
122
+ if (isset($metadata["sa_slide".$i."_popup_video_id"])) {
123
+ $slide_data["slide".$i."_popup_video_id"] = $metadata["sa_slide".$i."_popup_video_id"][0];
124
+ }
125
+ if (isset($metadata["sa_slide".$i."_popup_video_type"])) {
126
+ $slide_data["slide".$i."_popup_video_type"] = $metadata["sa_slide".$i."_popup_video_type"][0];
127
+ }
128
+ if (isset($metadata["sa_slide".$i."_popup_html"])) {
129
+ $slide_data["slide".$i."_popup_html"] = $metadata["sa_slide".$i."_popup_html"][0];
130
+ }
131
+ if (isset($metadata["sa_slide".$i."_popup_shortcode"])) {
132
+ $slide_data["slide".$i."_popup_shortcode"] = $metadata["sa_slide".$i."_popup_shortcode"][0];
133
+ }
134
+ if (isset($metadata["sa_slide".$i."_popup_bgcol"])) {
135
+ $slide_data["slide".$i."_popup_bgcol"] = $metadata["sa_slide".$i."_popup_bgcol"][0];
136
+ }
137
+ if (isset($metadata["sa_slide".$i."_popup_width"])) {
138
+ $slide_data["slide".$i."_popup_width"] = $metadata["sa_slide".$i."_popup_width"][0];
139
+ }
140
+ if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
141
+ $slide_data["slide".$i."_popup_css_id"] = $slide_data['css_id']."_popup".$i;
142
+ } else {
143
+ $slide_data["slide".$i."_popup_css_id"] = '';
144
+ }
145
+ }
146
+ }
147
+ $slide_data['slide_duration'] = floatval($metadata['sa_slide_duration'][0]) * 1000;
148
+ $slide_data['slide_transition'] = floatval($metadata['sa_slide_transition'][0]) * 1000;
149
+ if (isset($metadata['sa_slide_by'][0]) && ($metadata['sa_slide_by'][0] != '')) {
150
+ $slide_data['slide_by'] = $metadata['sa_slide_by'][0];
151
+ if ($slide_data['slide_by'] == '0') {
152
+ $slide_data['slide_by'] = 'page';
153
+ }
154
+ } else {
155
+ $slide_data['slide_by'] = 1;
156
+ }
157
+ $slide_data['loop_slider'] = $metadata['sa_loop_slider'][0];
158
+ if ($slide_data['loop_slider'] == '1') {
159
+ $slide_data['loop_slider'] = 'true';
160
+ } else {
161
+ $slide_data['loop_slider'] = 'false';
162
+ }
163
+ $slide_data['stop_hover'] = $metadata['sa_stop_hover'][0];
164
+ if ($slide_data['stop_hover'] == '1') {
165
+ $slide_data['stop_hover'] = 'true';
166
+ } else {
167
+ $slide_data['stop_hover'] = 'false';
168
+ }
169
+ $slide_data['random_order'] = $metadata['sa_random_order'][0];
170
+ if ($slide_data['random_order'] == '1') {
171
+ $slide_data['random_order'] = 'true';
172
+ } else {
173
+ $slide_data['random_order'] = 'false';
174
+ }
175
+ $slide_data['reverse_order'] = $metadata['sa_reverse_order'][0];
176
+ if ($slide_data['reverse_order'] == '1') {
177
+ $slide_data['reverse_order'] = 'true';
178
+ } else {
179
+ $slide_data['reverse_order'] = 'false';
180
+ }
181
+ $slide_data['nav_arrows'] = $metadata['sa_nav_arrows'][0];
182
+ if ($slide_data['nav_arrows'] == '1') {
183
+ $slide_data['nav_arrows'] = 'true';
184
+ } else {
185
+ $slide_data['nav_arrows'] = 'false';
186
+ }
187
+ $slide_data['pagination'] = $metadata['sa_pagination'][0];
188
+ if ($slide_data['pagination'] == '1') {
189
+ $slide_data['pagination'] = 'true';
190
+ } else {
191
+ $slide_data['pagination'] = 'false';
192
+ }
193
+ $slide_data['mouse_drag'] = $metadata['sa_mouse_drag'][0];
194
+ if ($slide_data['mouse_drag'] == '1') {
195
+ $slide_data['mouse_drag'] = 'true';
196
+ } else {
197
+ $slide_data['mouse_drag'] = 'false';
198
+ }
199
+ $slide_data['touch_drag'] = $metadata['sa_touch_drag'][0];
200
+ if ($slide_data['touch_drag'] == '1') {
201
+ $slide_data['touch_drag'] = 'true';
202
+ } else {
203
+ $slide_data['touch_drag'] = 'false';
204
+ }
205
+ if (isset($metadata['sa_click_advance'])) {
206
+ $slide_data['click_advance'] = $metadata['sa_click_advance'][0];
207
+ if ($slide_data['click_advance'] == '1') {
208
+ $slide_data['click_advance'] = 'true';
209
+ } else {
210
+ $slide_data['click_advance'] = 'false';
211
+ }
212
+ } else {
213
+ $slide_data['click_advance'] = 'false';
214
+ }
215
+ if (isset($metadata['sa_auto_height'])) {
216
+ $slide_data['auto_height'] = $metadata['sa_auto_height'][0];
217
+ if ($slide_data['auto_height'] == '1') {
218
+ $slide_data['auto_height'] = 'true';
219
+ } else {
220
+ $slide_data['auto_height'] = 'false';
221
+ }
222
+ } else {
223
+ $slide_data['auto_height'] = 'false';
224
+ }
225
+ if (($metadata['sa_slide_min_height_perc'][0] == '0') || ($metadata['sa_slide_min_height_perc'][0] == '0px')) {
226
+ $slide_data['vert_center'] = 'false';
227
+ } else {
228
+ if (isset($metadata['sa_vert_center'])) {
229
+ $slide_data['vert_center'] = $metadata['sa_vert_center'][0];
230
+ if ($slide_data['vert_center'] == '1') {
231
+ $slide_data['vert_center'] = 'true';
232
+ } else {
233
+ $slide_data['vert_center'] = 'false';
234
+ }
235
+ } else {
236
+ $slide_data['vert_center'] = 'false';
237
+ }
238
+ }
239
+ $slide_data['items_width1'] = $metadata['sa_items_width1'][0];
240
+ $slide_data['items_width2'] = $metadata['sa_items_width2'][0];
241
+ $slide_data['items_width3'] = $metadata['sa_items_width3'][0];
242
+ $slide_data['items_width4'] = $metadata['sa_items_width4'][0];
243
+ $slide_data['items_width5'] = $metadata['sa_items_width5'][0];
244
+ $slide_data['items_width6'] = $metadata['sa_items_width6'][0];
245
+ if ($slide_data['items_width6'] == '') {
246
+ $slide_data['items_width6'] = $slide_data['items_width5'];
247
+ }
248
+ $slide_data['transition'] = $metadata['sa_transition'][0];
249
+ $slide_data['background_color'] = $metadata['sa_background_color'][0];
250
+ $slide_data['border_width'] = $metadata['sa_border_width'][0];
251
+ $slide_data['border_color'] = $metadata['sa_border_color'][0];
252
+ $slide_data['border_radius'] = $metadata['sa_border_radius'][0];
253
+ $slide_data['wrapper_padd_top'] = $metadata['sa_wrapper_padd_top'][0];
254
+ $slide_data['wrapper_padd_right'] = $metadata['sa_wrapper_padd_right'][0];
255
+ $slide_data['wrapper_padd_bottom'] = $metadata['sa_wrapper_padd_bottom'][0];
256
+ $slide_data['wrapper_padd_left'] = $metadata['sa_wrapper_padd_left'][0];
257
+ $slide_data['slide_min_height_perc'] = $metadata['sa_slide_min_height_perc'][0];
258
+ $slide_data['slide_padding_tb'] = $metadata['sa_slide_padding_tb'][0];
259
+ $slide_data['slide_padding_lr'] = $metadata['sa_slide_padding_lr'][0];
260
+ $slide_data['slide_margin_lr'] = $metadata['sa_slide_margin_lr'][0];
261
+ $slide_data['slide_icons_location'] = $metadata['sa_slide_icons_location'][0];
262
+ $slide_data['autohide_arrows'] = $metadata['sa_autohide_arrows'][0];
263
+ if ($slide_data['autohide_arrows'] == '1') {
264
+ $slide_data['autohide_arrows'] = 'true';
265
+ } else {
266
+ $slide_data['autohide_arrows'] = 'false';
267
+ }
268
+ $slide_data['dot_per_slide'] = '0';
269
+ if (isset($metadata['sa_dot_per_slide'])) {
270
+ $slide_data['dot_per_slide'] = $metadata['sa_dot_per_slide'][0];
271
+ if ($slide_data['dot_per_slide'] != '1') {
272
+ $slide_data['dot_per_slide'] = '0';
273
+ }
274
+ } else {
275
+ $slide_data['dot_per_slide'] = '0';
276
+ }
277
+ $slide_data['slide_icons_visible'] = $metadata['sa_slide_icons_visible'][0];
278
+ if ($slide_data['slide_icons_visible'] == '1') {
279
+ $slide_data['slide_icons_visible'] = 'true';
280
+ } else {
281
+ $slide_data['slide_icons_visible'] = 'false';
282
+ }
283
+ $slide_data['slide_icons_color'] = $metadata['sa_slide_icons_color'][0];
284
+ if ($slide_data['slide_icons_color'] != 'black') {
285
+ $slide_data['slide_icons_color'] = 'white';
286
+ }
287
+ // FETCH OTHER SETTINGS POST META
288
+ $other_settings = '';
289
+ if (isset($metadata['sa_other_settings'])) {
290
+ $other_settings = $metadata['sa_other_settings'][0];
291
+ if (isset($other_settings) && ($other_settings != '')) {
292
+ $other_settings_arr = explode("|", $other_settings);
293
+ }
294
+ }
295
+ // setting 1 - sa_window_onload
296
+ $slide_data['sa_window_onload'] = '0';
297
+ if (isset($other_settings_arr) && ($other_settings_arr[0] != '')) {
298
+ $slide_data['sa_window_onload'] = $other_settings_arr[0];
299
+ } else {
300
+ if (isset($metadata['sa_window_onload'])) {
301
+ $slide_data['sa_window_onload'] = $metadata['sa_window_onload'][0];
302
+ if ($slide_data['sa_window_onload'] != '1') {
303
+ $slide_data['sa_window_onload'] = '0';
304
+ }
305
+ }
306
+ }
307
+ // setting 2 - sa_strip_javascript
308
+ $slide_data['strip_javascript'] = '0';
309
+ if (isset($other_settings_arr) && ($other_settings_arr[1] != '')) {
310
+ $slide_data['strip_javascript'] = $other_settings_arr[1];
311
+ } else {
312
+ if (isset($metadata['sa_strip_javascript'])) {
313
+ $slide_data['strip_javascript'] = $metadata['sa_strip_javascript'][0];
314
+ if ($slide_data['strip_javascript'] != '1') {
315
+ $slide_data['strip_javascript'] = '0';
316
+ }
317
+ }
318
+ }
319
+ // setting 3 - sa_lazy_load_images
320
+ $slide_data['lazy_load_images'] = '0';
321
+ if (isset($other_settings_arr) && ($other_settings_arr[2] != '')) {
322
+ $slide_data['lazy_load_images'] = $other_settings_arr[2];
323
+ } else {
324
+ if (isset($metadata['sa_lazy_load_images'])) {
325
+ $slide_data['lazy_load_images'] = $metadata['sa_lazy_load_images'][0];
326
+ if ($slide_data['lazy_load_images'] != '1') {
327
+ $slide_data['lazy_load_images'] = '0';
328
+ }
329
+ }
330
+ }
331
+ // setting 4 - sa_ulli_containers
332
+ $slide_data['ulli_containers'] = '0';
333
+ if (isset($other_settings_arr) && ($other_settings_arr[3] != '')) {
334
+ $slide_data['ulli_containers'] = $other_settings_arr[3];
335
+ } else {
336
+ if (isset($metadata['sa_ulli_containers'])) {
337
+ $slide_data['ulli_containers'] = $metadata['sa_ulli_containers'][0];
338
+ if ($slide_data['ulli_containers'] != '1') {
339
+ $slide_data['ulli_containers'] = '0';
340
+ }
341
+ }
342
+ }
343
+ // setting 5 - sa_rtl_slider
344
+ $slide_data['rtl_slider'] = '0';
345
+ if (isset($other_settings_arr) && ($other_settings_arr[4] != '')) {
346
+ $slide_data['rtl_slider'] = $other_settings_arr[4];
347
+ }
348
+ // Start Position
349
+ $slide_data['start_pos'] = 0;
350
+ if (isset($metadata['sa_start_pos'])) {
351
+ $slide_data['start_pos'] = $metadata['sa_start_pos'][0];
352
+ if ($slide_data['start_pos'] != '') {
353
+ $slide_data['start_pos'] = abs(intval($slide_data['start_pos']));
354
+ if ($slide_data['start_pos'] > 0) {
355
+ $slide_data['start_pos'] = $slide_data['start_pos'] - 1;
356
+ }
357
+ }
358
+ }
359
+
360
+ // hero slider and slider thumbnails
361
+ $slide_data['hero_slider'] = '0';
362
+ $slide_data['thumbs_active'] = '0';
363
+ if ($sa_pro_version) {
364
+ if (isset($metadata['sa_hero_slider'])) {
365
+ $slide_data['hero_slider'] = $metadata['sa_hero_slider'][0];
366
+ if ($slide_data['hero_slider'] != '1') {
367
+ $slide_data['hero_slider'] = '0';
368
+ }
369
+ } else {
370
+ $slide_data['hero_slider'] = '0';
371
+ }
372
+ if (isset($metadata['sa_thumbs_active'])) {
373
+ $slide_data['thumbs_active'] = $metadata['sa_thumbs_active'][0];
374
+ if ($slide_data['thumbs_active'] != '1') {
375
+ $slide_data['thumbs_active'] = '0';
376
+ }
377
+ } else {
378
+ $slide_data['thumbs_active'] = '0';
379
+ }
380
+ if (isset($metadata['sa_thumbs_location'])) {
381
+ $slide_data['thumbs_location'] = $metadata['sa_thumbs_location'][0];
382
+ } else {
383
+ $slide_data['thumbs_location'] = 'inside_bottom';
384
+ }
385
+ if (isset($metadata['sa_thumbs_image_size'])) {
386
+ $slide_data['thumbs_image_size'] = $metadata['sa_thumbs_image_size'][0];
387
+ } else {
388
+ $slide_data['thumbs_image_size'] = 'thumbnail';
389
+ }
390
+ if (isset($metadata['sa_thumbs_padding'])) {
391
+ $slide_data['thumbs_padding'] = $metadata['sa_thumbs_padding'][0];
392
+ } else {
393
+ $slide_data['thumbs_padding'] = '3';
394
+ }
395
+ if (isset($metadata['sa_thumbs_width'])) {
396
+ $slide_data['thumbs_width'] = $metadata['sa_thumbs_width'][0];
397
+ } else {
398
+ $slide_data['thumbs_width'] = '150';
399
+ }
400
+ if (isset($metadata['sa_thumbs_height'])) {
401
+ $slide_data['thumbs_height'] = $metadata['sa_thumbs_height'][0];
402
+ } else {
403
+ $slide_data['thumbs_height'] = '85';
404
+ }
405
+ if (isset($metadata['sa_thumbs_opacity'])) {
406
+ $slide_data['thumbs_opacity'] = $metadata['sa_thumbs_opacity'][0];
407
+ } else {
408
+ $slide_data['thumbs_opacity'] = '50';
409
+ }
410
+ if (isset($metadata['sa_thumbs_border_width'])) {
411
+ $slide_data['thumbs_border_width'] = $metadata['sa_thumbs_border_width'][0];
412
+ } else {
413
+ $slide_data['thumbs_border_width'] = '0';
414
+ }
415
+ if (isset($metadata['sa_thumbs_border_color'])) {
416
+ $slide_data['thumbs_border_color'] = $metadata['sa_thumbs_border_color'][0];
417
+ } else {
418
+ $slide_data['thumbs_border_color'] = '#ffffff';
419
+ }
420
+ if (isset($metadata['sa_thumbs_resp_tablet'])) {
421
+ $slide_data['thumbs_resp_tablet'] = $metadata['sa_thumbs_resp_tablet'][0];
422
+ } else {
423
+ $slide_data['thumbs_resp_tablet'] = '75';
424
+ }
425
+ if (isset($metadata['sa_thumbs_resp_mobile'])) {
426
+ $slide_data['thumbs_resp_mobile'] = $metadata['sa_thumbs_resp_mobile'][0];
427
+ } else {
428
+ $slide_data['thumbs_resp_mobile'] = '50';
429
+ }
430
+ }
431
+ // showcase carousel
432
+ $slide_data['showcase_slider'] = '0';
433
+ if ($sa_pro_version) {
434
+ if (isset($metadata['sa_showcase_slider'])) {
435
+ $slide_data['showcase_slider'] = $metadata['sa_showcase_slider'][0];
436
+ if ($slide_data['showcase_slider'] != '1') {
437
+ $slide_data['showcase_slider'] = '0';
438
+ }
439
+ } else {
440
+ $slide_data['showcase_slider'] = '0';
441
+ }
442
+ if (isset($metadata['sa_showcase_width'])) {
443
+ $slide_data['showcase_width'] = $metadata['sa_showcase_width'][0];
444
+ } else {
445
+ $slide_data['showcase_width'] = '120';
446
+ }
447
+ if (isset($metadata['sa_showcase_tablet'])) {
448
+ $slide_data['showcase_tablet'] = $metadata['sa_showcase_tablet'][0];
449
+ if ($slide_data['showcase_tablet'] != '1') {
450
+ $slide_data['showcase_tablet'] = '0';
451
+ }
452
+ } else {
453
+ $slide_data['showcase_tablet'] = '0';
454
+ }
455
+ if (isset($metadata['sa_showcase_width_tab'])) {
456
+ $slide_data['showcase_width_tab'] = $metadata['sa_showcase_width_tab'][0];
457
+ } else {
458
+ $slide_data['showcase_width_tab'] = '130';
459
+ }
460
+ if (isset($metadata['sa_showcase_mobile'])) {
461
+ $slide_data['showcase_mobile'] = $metadata['sa_showcase_mobile'][0];
462
+ if ($slide_data['showcase_mobile'] != '1') {
463
+ $slide_data['showcase_mobile'] = '0';
464
+ }
465
+ } else {
466
+ $slide_data['showcase_mobile'] = '0';
467
+ }
468
+ if (isset($metadata['sa_showcase_width_mob'])) {
469
+ $slide_data['showcase_width_mob'] = $metadata['sa_showcase_width_mob'][0];
470
+ } else {
471
+ $slide_data['showcase_width_mob'] = '140';
472
+ }
473
+ }
474
+
475
+
476
+
477
+ // REVERSE THE ORDER OF THE SLIDES IF 'Random Order' CHECKBOX IS CHECKED OR
478
+ // RE-ORDER SLIDES IN A RANDOM ORDER IF 'Random Order' CHECKBOX IS CHECKED
479
+ if (($slide_data['reverse_order'] == 'true') || ($slide_data['random_order'] == 'true')) {
480
+ $reorder_arr = array();
481
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
482
+ $reorder_arr[$i-1]['num'] = $slide_data["slide".$i."_num"];
483
+ $reorder_arr[$i-1]['content'] = $slide_data["slide".$i."_content"];
484
+ $reorder_arr[$i-1]['image_id'] = $slide_data["slide".$i."_image_id"];
485
+ $reorder_arr[$i-1]['image_pos'] = $slide_data["slide".$i."_image_pos"];
486
+ $reorder_arr[$i-1]['image_size'] = $slide_data["slide".$i."_image_size"];
487
+ $reorder_arr[$i-1]['image_repeat'] = $slide_data["slide".$i."_image_repeat"];
488
+ $reorder_arr[$i-1]['image_color'] = $slide_data["slide".$i."_image_color"];
489
+ $reorder_arr[$i-1]['link_url'] = $slide_data["slide".$i."_link_url"];
490
+ $reorder_arr[$i-1]['link_target'] = $slide_data["slide".$i."_link_target"];
491
+ if ($sa_pro_version) {
492
+ $reorder_arr[$i-1]['popup_type'] = $slide_data["slide".$i."_popup_type"];
493
+ $reorder_arr[$i-1]['popup_imageid'] = $slide_data["slide".$i."_popup_imageid"];
494
+ $reorder_arr[$i-1]['popup_imagetitle'] = $slide_data["slide".$i."_popup_imagetitle"];
495
+ $reorder_arr[$i-1]['popup_image'] = $slide_data["slide".$i."_popup_image"];
496
+ $reorder_arr[$i-1]['popup_background'] = $slide_data["slide".$i."_popup_background"];
497
+ $reorder_arr[$i-1]['popup_video_id'] = $slide_data["slide".$i."_popup_video_id"];
498
+ $reorder_arr[$i-1]['popup_video_type'] = $slide_data["slide".$i."_popup_video_type"];
499
+ $reorder_arr[$i-1]['popup_html'] = $slide_data["slide".$i."_popup_html"];
500
+ $reorder_arr[$i-1]['popup_shortcode'] = $slide_data["slide".$i."_popup_shortcode"];
501
+ $reorder_arr[$i-1]['popup_bgcol'] = $slide_data["slide".$i."_popup_bgcol"];
502
+ $reorder_arr[$i-1]['popup_width'] = $slide_data["slide".$i."_popup_width"];
503
+ $reorder_arr[$i-1]['popup_css_id'] = $slide_data["slide".$i."_popup_css_id"];
504
+ }
505
+ }
506
+ if ($slide_data['random_order'] == 'true') {
507
+ // SORT SLIDE ARRAY DATA IN A RANDOM ORDER
508
+ shuffle($reorder_arr);
509
+ } else {
510
+ // REVERSE THE ORDER OF THE SLIDE DATA ARRAY
511
+ $reverse_arr = array_reverse($reorder_arr);
512
+ $reorder_arr = $reverse_arr;
513
+ }
514
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
515
+ $slide_data["slide".$i."_num"] = $reorder_arr[$i-1]['num'];
516
+ $slide_data["slide".$i."_content"] = $reorder_arr[$i-1]['content'];
517
+ $slide_data["slide".$i."_image_id"] = $reorder_arr[$i-1]['image_id'];
518
+ $slide_data["slide".$i."_image_pos"] = $reorder_arr[$i-1]['image_pos'];
519
+ $slide_data["slide".$i."_image_size"] = $reorder_arr[$i-1]['image_size'];
520
+ $slide_data["slide".$i."_image_repeat"] = $reorder_arr[$i-1]['image_repeat'];
521
+ $slide_data["slide".$i."_image_color"] = $reorder_arr[$i-1]['image_color'];
522
+ $slide_data["slide".$i."_link_url"] = $reorder_arr[$i-1]['link_url'];
523
+ $slide_data["slide".$i."_link_target"] = $reorder_arr[$i-1]['link_target'];
524
+ if ($sa_pro_version) {
525
+ $slide_data["slide".$i."_popup_type"] = $reorder_arr[$i-1]['popup_type'];
526
+ $slide_data["slide".$i."_popup_imageid"] = $reorder_arr[$i-1]['popup_imageid'];
527
+ $slide_data["slide".$i."_popup_imagetitle"] = $reorder_arr[$i-1]['popup_imagetitle'];
528
+ $slide_data["slide".$i."_popup_image"] = $reorder_arr[$i-1]['popup_image'];
529
+ $slide_data["slide".$i."_popup_background"] = $reorder_arr[$i-1]['popup_background'];
530
+ $slide_data["slide".$i."_popup_video_id"] = $reorder_arr[$i-1]['popup_video_id'];
531
+ $slide_data["slide".$i."_popup_video_type"] = $reorder_arr[$i-1]['popup_video_type'];
532
+ $slide_data["slide".$i."_popup_html"] = $reorder_arr[$i-1]['popup_html'];
533
+ $slide_data["slide".$i."_popup_shortcode"] = $reorder_arr[$i-1]['popup_shortcode'];
534
+ $slide_data["slide".$i."_popup_bgcol"] = $reorder_arr[$i-1]['popup_bgcol'];
535
+ $slide_data["slide".$i."_popup_width"] = $reorder_arr[$i-1]['popup_width'];
536
+ $slide_data["slide".$i."_popup_css_id"] = $reorder_arr[$i-1]['popup_css_id'];
537
+ }
538
+ }
539
+ }
540
+
541
+ // GENERATE HTML CODE FOR THE OWL CAROUSEL SLIDER
542
+ $wrapper_style = "background:".$slide_data['background_color']."; ";
543
+ $wrapper_style .= "border:solid ".$slide_data['border_width']."px ".$slide_data['border_color']."; ";
544
+ $wrapper_style .= "border-radius:".$slide_data['border_radius']."px; ";
545
+ $wrapper_style .= "padding:".$slide_data['wrapper_padd_top']."px ";
546
+ $wrapper_style .= $slide_data['wrapper_padd_right']."px ";
547
+ $wrapper_style .= $slide_data['wrapper_padd_bottom']."px ";
548
+ $wrapper_style .= $slide_data['wrapper_padd_left']."px;";
549
+ if ($slide_data['showcase_slider'] == '1') {
550
+ $wrapper_style .= " overflow:hidden;";
551
+ }
552
+ $output .= "<div class='".$slide_data['slide_icons_color']."' style='".esc_attr($wrapper_style)."'>\n";
553
+ $additional_classes = '';
554
+ if ($slide_data['pagination'] == 'true') {
555
+ if ($slide_data['autohide_arrows'] == 'true') {
556
+ $additional_classes = "owl-pagination-true autohide-arrows";
557
+ } else {
558
+ $additional_classes = "owl-pagination-true";
559
+ }
560
+ } else {
561
+ if ($slide_data['autohide_arrows'] == 'true') {
562
+ $additional_classes = "autohide-arrows";
563
+ }
564
+ }
565
+ // hero slider
566
+ if ($slide_data['hero_slider'] == '1') {
567
+ $additional_classes .= " sa_hero_slider";
568
+ }
569
+ $slider_style = "visibility:hidden;";
570
+ // showcase slider
571
+ if ($slide_data['showcase_slider'] == '1') {
572
+ $left_perc = (intval($slide_data['showcase_width']) - 100) / 2;
573
+ $slider_style .= " width:".$slide_data['showcase_width']."%;";
574
+ $slider_style .= " left:-".$left_perc."%;";
575
+ if ($slide_data['showcase_tablet'] == '1') {
576
+ $left_perc_tab = (intval($slide_data['showcase_width_tab']) - 100) / 2;
577
+ $slider_style .= " --widthtab:".$slide_data['showcase_width_tab']."%;";
578
+ $slider_style .= " --lefttab:-".$left_perc_tab."%;";
579
+ $additional_classes .= " showcase_tablet";
580
+ } else {
581
+ $additional_classes .= " showcase_hide_tablet";
582
+ }
583
+ if ($slide_data['showcase_mobile'] == '1') {
584
+ $left_perc_mob = (intval($slide_data['showcase_width_mob']) - 100) / 2;
585
+ $slider_style .= " --widthmob:".$slide_data['showcase_width_mob']."%;";
586
+ $slider_style .= " --leftmob:-".$left_perc_mob."%;";
587
+ $additional_classes .= " showcase_mobile";
588
+ } else {
589
+ $additional_classes .= " showcase_hide_mobile";
590
+ }
591
+ }
592
+ $output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel sa_owl_theme ".$additional_classes."' ";
593
+ $output .= "data-slider-id='".esc_attr($slide_data['css_id'])."' style='".$slider_style."'>\n";
594
+ if ($sa_pro_version) {
595
+ // PRO VERSION - INITIALISE VAIRABLES FOR MAGNIFIC POPUP
596
+ $lightbox_function = "open_lightbox_gallery_".$slide_data['css_id'];
597
+ $lightbox_gallery_id = "lightbox_button_".$slide_data['css_id'];
598
+ $lightbox_count = 0;
599
+ }
600
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
601
+ $slide_content = $slide_data["slide".$i."_content"];
602
+ $slide_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_image_id"], 'full');
603
+ // SA PRO VERSION - USE POPUP IMAGE AS SLIDE BACKGROUND IMAGE (IF THIS OPTION SELECTED)
604
+ if (($sa_pro_version) && ($slide_data["slide".$i."_popup_type"] == 'IMAGE')) {
605
+ if (($slide_data["slide".$i."_popup_background"] != 'no') && ($slide_data["slide".$i."_popup_image"] != '')) {
606
+ $slide_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_popup_imageid"], $slide_data["slide".$i."_popup_background"]);
607
+ }
608
+ } elseif (($sa_pro_version) && ($slide_data["slide".$i."_popup_type"] == 'VIDEO')) {
609
+ if ($slide_data["slide".$i."_popup_video_type"] == "youtube") {
610
+ if ($slide_data["slide".$i."_image_id"] == '99999999') {
611
+ $slide_image_src = array();
612
+ $popup_video_id = $slide_data["slide".$i."_popup_video_id"];
613
+ $slide_image_src[0] = "https://img.youtube.com/vi/".$popup_video_id."/hqdefault.jpg";
614
+ }
615
+ }
616
+ }
617
+ $slide_image_size = $slide_data["slide".$i."_image_size"];
618
+ $slide_image_pos = $slide_data["slide".$i."_image_pos"];
619
+ $slide_image_repeat = $slide_data["slide".$i."_image_repeat"];
620
+ $slide_image_color = $slide_data["slide".$i."_image_color"];
621
+ $slide_style = "padding:".$slide_data['slide_padding_tb']."% ".$slide_data['slide_padding_lr']."%; ";
622
+ $slide_style .= "margin:0px ".$slide_data['slide_margin_lr']."%; ";
623
+ if (!empty($slide_image_src[0])) {
624
+ $slide_style .= "background-image:url(\"".$slide_image_src[0]."\"); ";
625
+ $slide_style .= "background-position:".$slide_image_pos."; ";
626
+ $slide_style .= "background-size:".$slide_image_size."; ";
627
+ $slide_style .= "background-repeat:".$slide_image_repeat."; ";
628
+ }
629
+ if (!empty($slide_image_color) && ($slide_image_color != "rgba(0,0,0,0)")) {
630
+ $slide_style .= "background-color:".$slide_image_color."; ";
631
+ }
632
+ if (strpos($slide_data['slide_min_height_perc'], 'px') !== false) {
633
+ $slide_style .= "min-height:".$slide_data['slide_min_height_perc']."; ";
634
+ }
635
+
636
+ // BUILD SLIDE LINK HOVER BUTTON
637
+ $link_output = '';
638
+ if ($slide_data["slide".$i."_link_url"] != '') {
639
+ $link_output = "<a class='sa_slide_link_icon' href='".$slide_data["slide".$i."_link_url"]."' ";
640
+ $link_output .= "target='".$slide_data["slide".$i."_link_target"]."'></a>";
641
+ }
642
+
643
+ // BUILD POPUP HOVER BUTTON - PRO VERSION ONLY!
644
+ $popup_output = '';
645
+ if ($sa_pro_version) {
646
+ if (($slide_data["slide".$i."_popup_type"] == 'IMAGE') && ($slide_data["slide".$i."_popup_image"] != '')) {
647
+ $lightbox_count++;
648
+ $popup_output = "<div class='sa_popup_zoom_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
649
+ }
650
+ if (($slide_data["slide".$i."_popup_type"] == 'VIDEO') && ($slide_data["slide".$i."_popup_video_id"] != '')) {
651
+ $lightbox_count++;
652
+ $popup_output = "<div class='sa_popup_video_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
653
+ }
654
+ if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
655
+ $lightbox_count++;
656
+ $popup_output = "<div class='sa_popup_zoom_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
657
+ }
658
+ }
659
+
660
+ // DISPLAY SLIDE OUTPUT
661
+ //$data_hash = $slide_data['css_id']."_slide".sprintf('%02d', $i);
662
+ //$output .= "<div class='sa_hover_container' data-hash='".$data_hash."' style='".esc_attr($slide_style)."'>";
663
+ $css_id = $slide_data['css_id']."_slide".sprintf('%02d', $slide_data["slide".$i."_num"]);
664
+ if ($slide_data['vert_center'] == 'true') {
665
+ $output .= "<div id='".$css_id."' class='sa_hover_container sa_vert_center_wrap' style='".esc_attr($slide_style)."'>";
666
+ } else {
667
+ $output .= "<div id='".$css_id."' class='sa_hover_container' style='".esc_attr($slide_style)."'>";
668
+ }
669
+ if (($link_output != '') || ($popup_output != '')) {
670
+ if ($slide_data['slide_icons_location'] == 'Top Left') {
671
+ // icons location - top left
672
+ $style = "top:0px; left:0px; margin:0px;";
673
+ } elseif ($slide_data['slide_icons_location'] == 'Top Center') {
674
+ // icons location - top center
675
+ if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
676
+ else { $hov_marginL = '-20px'; }
677
+ $style = "top:0px; left:50%; margin-left:".$hov_marginL.";";
678
+ } elseif ($slide_data['slide_icons_location'] == 'Top Right') {
679
+ // icons location - top right
680
+ $style = "top:0px; right:0px; margin:0px;";
681
+ } elseif ($slide_data['slide_icons_location'] == 'Bottom Left') {
682
+ // icons location - bottom left
683
+ $style = "bottom:0px; left:0px; margin:0px;";
684
+ } elseif ($slide_data['slide_icons_location'] == 'Bottom Center') {
685
+ // icons location - bottom center
686
+ if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
687
+ else { $hov_marginL = '-20px'; }
688
+ $style = "bottom:0px; left:50%; margin-left:".$hov_marginL.";";
689
+ } elseif ($slide_data['slide_icons_location'] == 'Bottom Right') {
690
+ // icons location - bottom right
691
+ $style = "bottom:0px; right:0px; margin:0px;";
692
+ } else {
693
+ // icons location - center center (default)
694
+ if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
695
+ else { $hov_marginL = '-20px'; }
696
+ $style = "top:50%; left:50%; margin-top:-20px; margin-left:".$hov_marginL.";";
697
+ }
698
+ if ($slide_data['slide_icons_visible'] == 'true') {
699
+ $output .= "<div class='sa_hover_buttons always_visible' style='".$style."'>";
700
+ } else {
701
+ $output .= "<div class='sa_hover_buttons' style='".$style."'>";
702
+ }
703
+ if ($link_output != '') {
704
+ $output .= $link_output;
705
+ }
706
+ if ($popup_output != '') {
707
+ $output .= $popup_output;
708
+ }
709
+ $output .= "</div>\n"; // .sa_hover_buttons
710
+ }
711
+ if ($slide_data['strip_javascript'] == '1') {
712
+ // strip JavaScript code (<script> tags) from slide content
713
+ $slide_content = remove_javascript_from_content($slide_content);
714
+ }
715
+ if ($slide_data['lazy_load_images'] == '1') {
716
+ // modify images (<img> tag) within slide content to enable owl carousel lazy load
717
+ $slide_content = set_slide_images_to_lazy_load($slide_content);
718
+ }
719
+ if ($slide_data['vert_center'] == 'true') {
720
+ // vertically center content within each slide
721
+ // (we do this by wrapping slide content in a '<div>' wrapper
722
+ $slide_content = "<div class='sa_vert_center'>".$slide_content."</div>";
723
+ }
724
+ $output .= $slide_content."</div>\n"; // .sa_hover_container
725
+ }
726
+ $output .= "</div>\n"; // .owl-carousel
727
+
728
+
729
+
730
+ // PRO VERSION - THUMBNAIL PAGINATION
731
+ if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
732
+ $thumbs_loc = $slide_data['thumbs_location'];
733
+ $thumbs_opacity = $slide_data['thumbs_opacity'] / 100;
734
+ // thumbnail container - set style
735
+ $thumbs_style = " padding:".$slide_data['thumbs_padding']."%;";
736
+ if ($thumbs_loc == 'inside_left') {
737
+ $thumbs_style .= "left:".$slide_data['thumbs_padding']."%; width:".$slide_data['thumbs_width']."px;";
738
+ } elseif ($thumbs_loc == 'inside_right') {
739
+ $thumbs_style .= "right:".$slide_data['thumbs_padding']."%; width:".$slide_data['thumbs_width']."px;";
740
+ } elseif ($thumbs_loc == 'outside_bottom') {
741
+ $thumbs_style .= " padding-bottom:0px;";
742
+ }
743
+ $add_classes = '';
744
+ if ($slide_data['thumbs_resp_tablet'] == 0) { $add_classes .= ' sa_thumbs_hide_tablet'; }
745
+ if ($slide_data['thumbs_resp_mobile'] == 0) { $add_classes .= ' sa_thumbs_hide_mobile'; }
746
+ $output .= "<div id='".esc_attr($slide_data['css_id'])."_thumbs' class='sa_owl_thumbs_wrap sa_thumbs_".$thumbs_loc.$add_classes."' style='".$thumbs_style."'>";
747
+ $output .= "<div class='owl-thumbs' data-slider-id='".esc_attr($slide_data['css_id'])."'>";
748
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
749
+ // get background image for the thumb (slide image background)
750
+ if (($slide_data["slide".$i."_popup_type"] == 'IMAGE') &&
751
+ ($slide_data["slide".$i."_popup_background"] != 'no') &&
752
+ ($slide_data["slide".$i."_popup_image"] != '')) {
753
+ $thumb_image_arr = wp_get_attachment_image_src($slide_data["slide".$i."_popup_imageid"], $slide_data["slide".$i."_popup_background"]);
754
+ $thumb_image_src = $thumb_image_arr[0];
755
+ } elseif (($slide_data["slide".$i."_popup_type"] == 'VIDEO') &&
756
+ ($slide_data["slide".$i."_popup_video_type"] == "youtube") &&
757
+ ($slide_data["slide".$i."_image_id"] == '99999999')) {
758
+ $thumb_image_src = array();
759
+ $popup_video_id = $slide_data["slide".$i."_popup_video_id"];
760
+ $thumb_image_src = "https://img.youtube.com/vi/".$popup_video_id."/hqdefault.jpg";
761
+ } elseif ($slide_data["slide".$i."_image_id"] != 0) {
762
+ $thumb_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_image_id"], $slide_data['thumbs_image_size']);
763
+ $thumb_image_src = $thumb_image_src[0];
764
+ } else {
765
+ // use a placeholder image if slide has no background image
766
+ $thumb_image_src = SA_PLUGIN_PATH."images/image_placeholder.jpg";
767
+ }
768
+ // thumbnail - set style
769
+ $thumb_style = "background-image:url(\"".$thumb_image_src."\"); ";
770
+ $thumb_style .= "width:".$slide_data['thumbs_width']."px; ";
771
+ $thumb_style .= "height:".$slide_data['thumbs_height']."px; ";
772
+ $thumb_style .= "background-position:".$slide_data["slide".$i."_image_pos"]."; ";
773
+ $thumb_style .= "background-size:".$slide_data["slide".$i."_image_size"]."; ";
774
+ $thumb_style .= "background-repeat:".$slide_data["slide".$i."_image_repeat"]."; ";
775
+ $thumb_style .= "opacity:".$thumbs_opacity."; ";
776
+ $thumb_style .= "border:solid ".$slide_data['thumbs_border_width']."px transparent";
777
+ $output .= "<div class='owl-thumb-item' style='".$thumb_style."' title='Slide ".$i."'></div>";
778
+ }
779
+ $output .= "</div>"; // .sa_owl_thumbs
780
+ $output .= "</div>\n"; // .sa_owl_thumbs_wrap
781
+ }
782
+
783
+
784
+
785
+ // SHOWCASE CAROUSEL - NAVIGATION CONTAINER
786
+ if ($slide_data['showcase_slider'] == '1') {
787
+ if ($slide_data['autohide_arrows'] == 'true') {
788
+ $output .= "<div id='showcase_".esc_attr($id)."' class='showcase_nav owl-nav autohide_arrows'></div>\n";
789
+ } else {
790
+ $output .= "<div id='showcase_".esc_attr($id)."' class='showcase_nav owl-nav'></div>\n";
791
+ }
792
+ }
793
+
794
+
795
+
796
+ $output .= "</div>\n"; // .white or .black
797
+
798
+
799
+
800
+ // PRO VERSION - CREATE A (HIDDEN) DIV FOR EACH 'HTML' POPUP
801
+ if ($sa_pro_version) {
802
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
803
+ if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
804
+ $popup_css_id = $slide_data["slide".$i."_popup_css_id"];
805
+ $popup_bgcol = $slide_data["slide".$i."_popup_bgcol"];
806
+ $popup_width = $slide_data["slide".$i."_popup_width"];
807
+ $output .= "<div id='".$popup_css_id."' class='mfp-hide sa_custom_popup' ";
808
+ $output .= "style='background:".$popup_bgcol."; max-width:".$popup_width."px;'>\n";
809
+ if ($slide_data["slide".$i."_popup_shortcode"] == '1') {
810
+ $output .= do_shortcode($slide_data["slide".$i."_popup_html"]);
811
+ } else {
812
+ $output .= $slide_data["slide".$i."_popup_html"];
813
+ }
814
+ $output .= "</div>\n";
815
+ }
816
+ }
817
+ }
818
+
819
+
820
+
821
+ // ### ENQUEUE JQUERY SCRIPT IF IT HAS NOT ALREADY BEEN LOADED ###
822
+ if (!wp_script_is('jquery', 'done')) {
823
+ wp_enqueue_script('jquery', false, array(), false, false);
824
+ }
825
+
826
+
827
+
828
+ // ### GENERATE JQUERY CODE FOR THE OWL CAROUSEL SLIDER ###
829
+ if (($slide_data['items_width1'] == 1) && ($slide_data['items_width2'] == 1) && ($slide_data['items_width3'] == 1) &&
830
+ ($slide_data['items_width4'] == 1) && ($slide_data['items_width5'] == 1) && ($slide_data['items_width6'] == 1)) {
831
+ $single_item = 1;
832
+ } else {
833
+ $single_item = 0;
834
+ }
835
+
836
+ $output .= "<script type='text/javascript'>\n";
837
+ if ($slide_data['sa_window_onload'] == '1') {
838
+ $output .= " document.addEventListener('DOMContentLoaded', function() {\n";
839
+ } else {
840
+ $output .= " jQuery(document).ready(function() {\n";
841
+ }
842
+
843
+ // JQUERY CODE FOR OWN CAROUSEL
844
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').owlCarousel({\n";
845
+ if ($single_item == 1) {
846
+ $output .= " items : 1,\n";
847
+ if (($slide_data['transition'] == 'Fade') || ($slide_data['transition'] == 'fade')) {
848
+ $output .= " animateOut : 'fadeOut',\n";
849
+ } elseif (($slide_data['transition'] == 'Slide Down') || ($slide_data['transition'] == 'goDown')) {
850
+ $output .= " animateOut : 'slideOutDown',\n";
851
+ $output .= " animateIn : 'fadeIn',\n";
852
+ } elseif ($slide_data['transition'] == 'Zoom In') {
853
+ $output .= " animateOut : 'fadeOut',\n";
854
+ $output .= " animateIn : 'zoomIn',\n";
855
+ } elseif ($slide_data['transition'] == 'Zoom Out') {
856
+ $output .= " animateOut : 'zoomOut',\n";
857
+ $output .= " animateIn : 'fadeIn',\n";
858
+ } elseif ($slide_data['transition'] == 'Flip Out X') {
859
+ $output .= " animateOut : 'flipOutX',\n";
860
+ $output .= " animateIn : 'fadeIn',\n";
861
+ } elseif ($slide_data['transition'] == 'Flip Out Y') {
862
+ $output .= " animateOut : 'flipOutY',\n";
863
+ $output .= " animateIn : 'fadeIn',\n";
864
+ } elseif ($slide_data['transition'] == 'Rotate Left') {
865
+ $output .= " animateOut : 'rotateOutDownLeft',\n";
866
+ $output .= " animateIn : 'fadeIn',\n";
867
+ } elseif ($slide_data['transition'] == 'Rotate Right') {
868
+ $output .= " animateOut : 'rotateOutDownRight',\n";
869
+ $output .= " animateIn : 'fadeIn',\n";
870
+ } elseif ($slide_data['transition'] == 'Bounce Out') {
871
+ $output .= " animateOut : 'bounceOut',\n";
872
+ $output .= " animateIn : 'fadeIn',\n";
873
+ } elseif ($slide_data['transition'] == 'Roll Out') {
874
+ $output .= " animateOut : 'rollOut',\n";
875
+ $output .= " animateIn : 'fadeIn',\n";
876
+ }
877
+ $output .= " smartSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
878
+ } else {
879
+ $output .= " responsive:{\n";
880
+ $output .= " 0:{ items:".esc_attr($slide_data['items_width1'])." },\n";
881
+ $output .= " 480:{ items:".esc_attr($slide_data['items_width2'])." },\n";
882
+ $output .= " 768:{ items:".esc_attr($slide_data['items_width3'])." },\n";
883
+ $output .= " 980:{ items:".esc_attr($slide_data['items_width4'])." },\n";
884
+ $output .= " 1200:{ items:".esc_attr($slide_data['items_width5'])." },\n";
885
+ $output .= " 1500:{ items:".esc_attr($slide_data['items_width6'])." }\n";
886
+ $output .= " },\n";
887
+ }
888
+ if ($slide_data['slide_duration'] == 0) {
889
+ $output .= " autoplay : false,\n";
890
+ $output .= " autoplayHoverPause : false,\n";
891
+ } else {
892
+ $output .= " autoplay : true,\n";
893
+ $output .= " autoplayTimeout : ".esc_attr($slide_data['slide_duration']).",\n";
894
+ $output .= " autoplayHoverPause : ".esc_attr($slide_data['stop_hover']).",\n";
895
+ }
896
+ $output .= " smartSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
897
+ $output .= " fluidSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
898
+ $output .= " autoplaySpeed : ".esc_attr($slide_data['slide_transition']).",\n";
899
+ $output .= " navSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
900
+ $output .= " dotsSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
901
+ if ($slide_data['dot_per_slide'] == '1') {
902
+ $output .= " dotsEach : 1,\n";
903
+ }
904
+ $output .= " loop : ".esc_attr($slide_data['loop_slider']).",\n";
905
+ $output .= " nav : ".esc_attr($slide_data['nav_arrows']).",\n";
906
+ $output .= " navText : ['Previous','Next'],\n";
907
+ if ($slide_data['showcase_slider'] == '1') {
908
+ $output .= " navContainer : '#showcase_".esc_attr($id)."',\n";
909
+ }
910
+ $output .= " dots : ".esc_attr($slide_data['pagination']).",\n";
911
+ $output .= " responsiveRefreshRate : 200,\n";
912
+ if ($slide_data['slide_by'] == 'page') {
913
+ $output .= " slideBy : 'page',\n";
914
+ } else {
915
+ $output .= " slideBy : ".esc_attr($slide_data['slide_by']).",\n";
916
+ }
917
+ $output .= " mergeFit : true,\n";
918
+ $output .= " autoHeight : ".esc_attr($slide_data['auto_height']).",\n";
919
+ if ($slide_data['lazy_load_images'] == '1') {
920
+ $output .= " lazyLoad : true,\n";
921
+ $output .= " lazyLoadEager: 1,\n";
922
+ }
923
+ if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
924
+ $output .= " thumbs : true,\n";
925
+ $output .= " thumbsPrerendered : true,\n";
926
+ }
927
+ if ($slide_data['ulli_containers'] == '1') {
928
+ $output .= " stageElement : 'ul',\n";
929
+ $output .= " itemElement : 'li',\n";
930
+ }
931
+ if ($slide_data['rtl_slider'] == '1') {
932
+ $output .= " rtl : true,\n";
933
+ }
934
+
935
+ if ($slide_data['start_pos'] != 0) {
936
+ $output .= " startPosition : ".$slide_data['start_pos'].",\n";
937
+ }
938
+ $output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
939
+ $output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
940
+ $output .= " });\n";
941
+
942
+ // MAKE SLIDER VISIBLE (AFTER 'WINDOW ONLOAD' OR 'DOCUMENT READY' EVENT)
943
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').css('visibility', 'visible');\n";
944
+
945
+ // JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
946
+ if ($slide_data['hero_slider'] != '1') {
947
+ $slide_min_height = $slide_data['slide_min_height_perc'];
948
+ if (strpos($slide_min_height, 'px') !== false) {
949
+ $slide_min_height = 0;
950
+ }
951
+ if (($slide_min_height != '') && ($slide_min_height != '0')) {
952
+ $output .= " sa_resize_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
953
+ $output .= " window.addEventListener('resize', sa_resize_".esc_attr($slide_data['css_id']).");\n"; // create resize event
954
+ // RESIZE EVENT FUNCTION (to set slide CSS 'min-heigh')
955
+ $output .= " function sa_resize_".esc_attr($slide_data['css_id'])."() {\n";
956
+ // get slide min height setting
957
+ $output .= " var min_height = '".$slide_min_height."';\n";
958
+ // get window width
959
+ $output .= " var win_width = jQuery(window).width();\n";
960
+ $output .= " var slider_width = jQuery('#".esc_attr($slide_data['css_id'])."').width();\n";
961
+ // calculate slide width according to window width & number of slides
962
+ $output .= " if (win_width < 480) {\n";
963
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width1']).";\n";
964
+ $output .= " } else if (win_width < 768) {\n";
965
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width2']).";\n";
966
+ $output .= " } else if (win_width < 980) {\n";
967
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width3']).";\n";
968
+ $output .= " } else if (win_width < 1200) {\n";
969
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width4']).";\n";
970
+ $output .= " } else if (win_width < 1500) {\n";
971
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width5']).";\n";
972
+ $output .= " } else {\n";
973
+ $output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width6']).";\n";
974
+ $output .= " }\n";
975
+ $output .= " slide_width = Math.round(slide_width);\n";
976
+ // calculate CSS 'min-height' using the captured 'min-height' data settings for this slider
977
+ $output .= " var slide_height = '0';\n";
978
+ $output .= " if (min_height == 'aspect43') {\n";
979
+ $output .= " slide_height = (slide_width / 4) * 3;";
980
+ $output .= " slide_height = Math.round(slide_height);\n";
981
+ $output .= " } else if (min_height == 'aspect169') {\n";
982
+ $output .= " slide_height = (slide_width / 16) * 9;";
983
+ $output .= " slide_height = Math.round(slide_height);\n";
984
+ $output .= " } else {\n";
985
+ $output .= " slide_height = (slide_width / 100) * min_height;";
986
+ $output .= " slide_height = Math.round(slide_height);\n";
987
+ $output .= " }\n";
988
+ // set the slide 'min-height' css value
989
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-item .sa_hover_container').css('min-height', slide_height+'px');\n";
990
+ $output .= " }\n";
991
+ }
992
+ }
993
+
994
+
995
+
996
+ // JAVASCRIPT FOR SHOWCASE CAROUSELS ONLY
997
+ // DYNAMICALLY SET CLASS NAMES FOR LEFTMOST (FIRST) AND RIGHTMOST (LAST) ACTIVE (DISPLAYED) SLIDES
998
+ if ($slide_data['showcase_slider'] == '1') {
999
+ $output .= " set_first_last_active_classes('".esc_attr($slide_data['css_id'])."');\n";
1000
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').on('translated.owl.carousel resized.owl.carousel', function(event) {\n";
1001
+ $output .= " set_first_last_active_classes('".esc_attr($slide_data['css_id'])."');\n";
1002
+ $output .= " });\n";
1003
+ $output .= " function set_first_last_active_classes(css_id) {\n";
1004
+ $output .= " var total = jQuery('#".esc_attr($slide_data['css_id'])." .owl-stage .owl-item.active').length;\n";
1005
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-stage .owl-item').removeClass('sc_partial');\n";
1006
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-stage .owl-item.active').each(function(index){\n";
1007
+ $output .= " if (index === 0) {\n"; // this is the first active slide
1008
+ $output .= " jQuery(this).addClass('sc_partial');\n";
1009
+ $output .= " }\n";
1010
+ $output .= " if (index === total - 1 && total > 1) {\n"; // this is the last active slide
1011
+ $output .= " jQuery(this).addClass('sc_partial');\n";
1012
+ $output .= " }\n";
1013
+ $output .= " });\n";
1014
+ $output .= " }\n";
1015
+ }
1016
+
1017
+
1018
+
1019
+ // JAVASCRIPT FOR 'CLICK TO ADVANCE' OPTION ONLY
1020
+ if ($slide_data['click_advance'] == 'true') {
1021
+ if (($slide_data['touch_drag'] == 'false') && ($slide_data['mouse_drag'] == 'false')) {
1022
+ $output .= " var cta_".$id." = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
1023
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').click(function() {\n";
1024
+ $output .= " cta_".$id.".trigger('next.owl.carousel');\n";
1025
+ $output .= " });\n";
1026
+ }
1027
+ }
1028
+
1029
+
1030
+
1031
+ // JAVASCRIPT FOR 'SLIDE GOTO LINKS"
1032
+ $output .= " var owl_goto = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
1033
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
1034
+ $output .= " jQuery('.".esc_attr($slide_data['css_id'])."_goto".$i."').click(function(event){\n";
1035
+ $output .= " owl_goto.trigger('to.owl.carousel', ".($i-1).");\n";
1036
+ $output .= " });\n";
1037
+ }
1038
+
1039
+
1040
+
1041
+ // ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
1042
+ if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
1043
+
1044
+ // BORDER WIDTH IS SET - SET BORDER COLOUR TO THE ACTIVE THUMB
1045
+ if ($slide_data['thumbs_border_width'] > 0) {
1046
+ // set border colour of the active (first) thumb
1047
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .active').css('border-color', '".$slide_data['thumbs_border_color']."');\n";
1048
+ $output .= " var owl = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
1049
+ // owl carousel change event - set border colour of the active thumb
1050
+ $output .= " owl.on('changed.owl.carousel', function(event) {\n";
1051
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('border-color', 'transparent');\n";
1052
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .active').css('border-color', '".$slide_data['thumbs_border_color']."');\n";
1053
+ $output .= " })\n";
1054
+ }
1055
+
1056
+ // RESIZE WINDOW EVENT - RESIZE THUMBS WIDTH & HEIGHT DEPENDING ON WINDOW WIDTH BREAKPOINTS
1057
+ $output .= " sa_resize_thumbs_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
1058
+ $output .= " window.addEventListener('resize', sa_resize_thumbs_".esc_attr($slide_data['css_id']).");\n"; // create resize event
1059
+ $output .= " function sa_resize_thumbs_".esc_attr($slide_data['css_id'])."() {\n";
1060
+ $output .= " var win_width = jQuery(window).width();\n";
1061
+ $output .= " var tablet_perc = parseFloat(".$slide_data['thumbs_resp_tablet']." / 100);\n";
1062
+ $output .= " var mobile_perc = parseFloat(".$slide_data['thumbs_resp_mobile']." / 100);\n";
1063
+ $output .= " var tablet_width = Math.round(".$slide_data['thumbs_width']." * tablet_perc) + 'px';\n";
1064
+ $output .= " var tablet_height = Math.round(".$slide_data['thumbs_height']." * tablet_perc) + 'px';\n";
1065
+ $output .= " var mobile_width = Math.round(".$slide_data['thumbs_width']." * mobile_perc) + 'px';\n";
1066
+ $output .= " var mobile_height = Math.round(".$slide_data['thumbs_height']." * mobile_perc) + 'px';\n";
1067
+ $output .= " if ((mobile_perc != 0) && (win_width < 768)) {\n";
1068
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', mobile_width);\n";
1069
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', mobile_height);\n";
1070
+ $output .= " } else if ((tablet_perc != 0) && (win_width < 1000)) {\n";
1071
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', tablet_width);\n";
1072
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', tablet_height);\n";
1073
+ $output .= " } else {\n";
1074
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', '".$slide_data['thumbs_width']."px');\n";
1075
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', '".$slide_data['thumbs_height']."px');\n";
1076
+ $output .= " }\n";
1077
+ // THUMBS POSITION 'Inside Left' or 'Inside Right' - RESIZE CONTAINER WIDTH DEPENDING ON WINDOW WIDTH BREAKPOINTS
1078
+ if (($thumbs_loc == 'inside_left') || ($thumbs_loc == 'inside_right')) {
1079
+ $output .= " if ((mobile_perc != 0) && (win_width < 768)) {\n";
1080
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', mobile_width);\n";
1081
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', mobile_height);\n";
1082
+ $output .= " } else if ((tablet_perc != 0) && (win_width < 1000)) {\n";
1083
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', tablet_width);\n";
1084
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', tablet_height);\n";
1085
+ $output .= " } else {\n";
1086
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', '".$slide_data['thumbs_width']."px');\n";
1087
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', '".$slide_data['thumbs_height']."px');\n";
1088
+ $output .= " }\n";
1089
+ }
1090
+ $output .= " }\n";
1091
+ }
1092
+
1093
+ // CALL THE WINDOW RESIZE EVENT AFTER THE OWL CAROUSEL SLIDER HAS BEEN INITIALIZED
1094
+ $output .= " var resize_".$id." = jQuery('.owl-carousel');\n";
1095
+ $output .= " resize_".$id.".on('initialized.owl.carousel', function(e) {\n";
1096
+ $output .= " if (typeof(Event) === 'function') {\n";
1097
+ // modern browsers
1098
+ $output .= " window.dispatchEvent(new Event('resize'));\n";
1099
+ $output .= " } else {\n";
1100
+ // for IE and other old browsers (causes deprecation warning on modern browsers)
1101
+ $output .= " var evt = window.document.createEvent('UIEvents');\n";
1102
+ $output .= " evt.initUIEvent('resize', true, false, window, 0);\n";
1103
+ $output .= " window.dispatchEvent(evt);\n";
1104
+ $output .= " }\n";
1105
+ $output .= " });\n";
1106
+ $output .= " });\n";
1107
+ $output .= "</script>\n";
1108
+
1109
+
1110
+
1111
+ // ### GENERATE JQUERY CODE FOR THE MAGNIFIC POPUP ###
1112
+ if (($sa_pro_version) && ($lightbox_count > 0)) {
1113
+ $output .= "<script type='text/javascript'>\n";
1114
+ $output .= "jQuery(document).ready(function() {\n";
1115
+ $output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup({\n";
1116
+ $output .= " items: [\n";
1117
+ $count = 0;
1118
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
1119
+ // LOOP THROUGH EACH SLIDE
1120
+ if (($slide_data["slide".$i."_popup_type"] == 'IMAGE') && ($slide_data["slide".$i."_popup_image"] != '')) {
1121
+ // SLIDE CONTAINS AN IMAGE POPUP
1122
+ $img_url = $slide_data["slide".$i."_popup_image"];
1123
+ $img_title = $slide_data["slide".$i."_popup_imagetitle"];
1124
+ if ($img_title != '') {
1125
+ $output .= " { src: '".esc_attr($img_url)."', title: '".esc_attr($img_title)."' }";
1126
+ } else {
1127
+ $output .= " { src: '".esc_attr($img_url)."' }";
1128
+ }
1129
+ $count++;
1130
+ if ($count < $lightbox_count) { $output .= ",\n"; }
1131
+ else { $output .= "\n"; }
1132
+ }
1133
+ if (($slide_data["slide".$i."_popup_type"] == 'VIDEO') && ($slide_data["slide".$i."_popup_video_id"] != '')) {
1134
+ // SLIDE CONTAINS A VIDEO POPUP
1135
+ $video_id = $slide_data["slide".$i."_popup_video_id"];
1136
+ $video_type = $slide_data["slide".$i."_popup_video_type"];
1137
+ if ($video_type == 'youtube') {
1138
+ $video_url = "http://www.youtube.com/watch?v=".$video_id;
1139
+ } elseif ($video_type == 'vimeo') {
1140
+ $video_url = "http://vimeo.com/".$video_id;
1141
+ }
1142
+ $output .= " { src: '".esc_attr($video_url)."', type: 'iframe' }";
1143
+ $count++;
1144
+ if ($count < $lightbox_count) { $output .= ",\n"; }
1145
+ else { $output .= "\n"; }
1146
+ }
1147
+ if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
1148
+ // SLIDE CONTAINS A HTML POPUP
1149
+ $popup_css_id = "#".$slide_data["slide".$i."_popup_css_id"];
1150
+ $output .= " { src: '".esc_attr($popup_css_id)."', type: 'inline' }";
1151
+ $count++;
1152
+ if ($count < $lightbox_count) { $output .= ",\n"; }
1153
+ else { $output .= "\n"; }
1154
+ }
1155
+ }
1156
+ $output .= " ],\n";
1157
+ $output .= " gallery: { enabled: true, tCounter: '' },\n";
1158
+ $output .= " mainClass: 'sa_popup',\n";
1159
+ $output .= " closeBtnInside: true,\n";
1160
+ $output .= " fixedContentPos: true,\n";
1161
+ if ($slide_data['slide_duration'] != 0) {
1162
+ $output .= " callbacks: {\n";
1163
+ $output .= " open: function() {\n";
1164
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('stop.owl.autoplay');\n";
1165
+ $output .= " },\n";
1166
+ $output .= " close: function() {\n";
1167
+ $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('play.owl.autoplay');\n";
1168
+ $output .= " }\n";
1169
+ $output .= " },\n";
1170
+ }
1171
+ $output .= " type: 'image'\n";
1172
+ $output .= " });\n";
1173
+ $output .= "});\n";
1174
+
1175
+ // JAVASCRIPT FUNCTION WHICH OPENS THIS MAGNIFIC POPUP ON A SPECIFIED SLIDE
1176
+ $output .= "function ".$lightbox_function."(slide) {\n";
1177
+ $output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup('open');\n";
1178
+ $output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup('goTo', slide-1);\n";
1179
+ $output .= "}\n";
1180
+ $output .= "</script>\n";
1181
+
1182
+ // DIV CONTAINER WHICH HOLDS THIS MAGNIFIC POPUP CONTENT (HIDDEN)
1183
+ $output .= "<div id='".$lightbox_gallery_id."' style='display:none;'></div>\n";
1184
+ }
1185
+ }
1186
+ }
1187
+ return $output;
1188
+ }
1189
+
1190
+
1191
+
1192
+ // ### STRIP JAVASCRIPT ('<script>' tags) FROM SUPPLIED STRING ARGUMENT ###
1193
+ function remove_javascript_from_content($slide_content) {
1194
+ if ($slide_content != '') {
1195
+ $dom = new DOMDocument();
1196
+ $dom->loadHTML($slide_content);
1197
+ //$dom->loadHTML($slide_content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
1198
+ $script = $dom->getElementsByTagName('script');
1199
+ $remove = array();
1200
+ foreach($script as $item) {
1201
+ $item->parentNode->removeChild($item);
1202
+ }
1203
+ //$slide_content = $dom->saveHTML();
1204
+ $slide_content = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $dom->saveHTML());
1205
+ }
1206
+ return $slide_content;
1207
+ }
1208
+
1209
+
1210
+
1211
+ // ### MODIFY IMAGES (<img> tag) WITHIN STRING PASSED (SLIDE CONTENT) TO ENABLE OWL CAROUSEL LAZY LOAD ###
1212
+ function set_slide_images_to_lazy_load($slide_content) {
1213
+ if (trim($slide_content) != '') {
1214
+ // 1) REPLACE 'src=' WITH 'data-src=' WITHIN <IMG> TAGS
1215
+ $slide_content = preg_replace('~<img[^>]*\K(?=src)~i','data-', $slide_content);
1216
+
1217
+ // 2) FOR EACH <IMG> TAG WITHIN THE SLIDE CONTENT, ADD THE 'owl-lazy' CLASS
1218
+ $dom = new DOMDocument();
1219
+ $dom->loadHTML(mb_convert_encoding($slide_content, 'HTML-ENTITIES', 'UTF-8'));
1220
+ //$dom->loadHTML(mb_convert_encoding($slide_content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
1221
+ $imgs = $dom->getElementsByTagName('img');
1222
+ foreach ($imgs as $img) {
1223
+ $curr_class = $img->getAttribute('class');
1224
+ if ($curr_class != '') {
1225
+ $img->setAttribute('class', $curr_class.' owl-lazy');
1226
+ } else {
1227
+ $img->setAttribute('class', 'owl-lazy');
1228
+ }
1229
+ }
1230
+
1231
+ //$slide_content = $dom->saveHTML();
1232
+ $slide_content = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $dom->saveHTML());
1233
+ }
1234
+
1235
+ return $slide_content;
1236
+ }
1237
+ ?>
trunk/readme.txt ADDED
@@ -0,0 +1,676 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Slide Anything - Responsive Content / HTML Slider and Carousel ===
2
+ Contributors: simonpedge
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
4
+ Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
5
+ Requires at least: 4.0
6
+ Tested up to: 5.5
7
+ Stable tag: trunk
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Create a responsive carousel or slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes.
12
+
13
+ == Description ==
14
+
15
+ Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel 2 jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
16
+
17
+ Slide Anything provides many Owl Carousel 2 features, which include:
18
+
19
+ * Touch and Drag Support - Designed specially to boost mobile browsing experience. Mouse drag works great on desktop too!
20
+ * Fully Responsive - You can define the number of slides to display for various breakpoint settings, e.g. 4 slides on desktop, 3 slides on tablet and 2 slides on mobile.
21
+ * Modern Browsers - Owl uses hardware acceleration with CSS3 Translate3d transitions. Its fast and works like a charm! It also supports CSS2 fallbacks to cater for older browsers.
22
+ * New Lazy Load Images - with this feature enabled, slide images (<img> tags) are only loaded when the relevant slides are displayed (all of the slider's images are NOT loaded up-front).
23
+ * Infinite Looping - introduced with Owl Carousel 2, this feature means that the first slide is now seamlessly displayed after the last slide without any carousel rewind.
24
+ * New Transition Effects - New Owl Carousel transitions include Slide, Fade, Zoom In, Zoom Out, Flip Out X/Y, Rotate Left/Right, Bounce Out, Roll Out and Slide Down.
25
+ * Slide Link Feature - A feature which allows you to create a hover-over link button for any slide within your carousels.
26
+ * Re-Order Slides Facility - Now you can use a 'drag-and-drop' interface to easily re-order your slides within the sliders you create.
27
+
28
+ [Usage Examples](https://edgewebpages.com/slide-anything-usage-examples)
29
+
30
+ = Slide Anything PRO =
31
+
32
+ [SLIDE ANYTHING PRO](https://edgewebpages.com/) adds the following extra features:
33
+
34
+ * MODAL POPUPS - Each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a HTML CODE popup or a popup displaying a WordPress SHORTCODE.
35
+ * HERO SLIDER - A Hero Slider is a slider that always is 100% of the width/height of the device it's being viewed on (or 100% of the window width/height if on a desktop device).
36
+ * THUMBNAIL PAGINATION - Allows you to add an area of small clickable thumb images, with each image representing a single slide that can be clicked to navigate to that slide.
37
+ * SHOWCASE CAROUSEL - A Carousel with a width exceeding the width of the container that it's placed in, which results in the left/rightmost visible slides becoming partially visible.
38
+
39
+ [MODAL POPUPS DEMO](https://edgewebpages.com/)
40
+
41
+ [HERO SLIDER WITH THUMBNAILS DEMO](https://edgewebpages.com/hero-slider-with-thumbnails/)
42
+
43
+ [SHOWCASE CAROUSEL](https://edgewebpages.com/showcase-carousel-demo/)
44
+
45
+ = Owl Carousel =
46
+
47
+ [Owl Carousel](https://owlcarousel2.github.io/OwlCarousel2/) is an extremely powerful and flexible carousel/slider JQuery plugin, and it is also free to use! Unfortunately, it's not easy to integrate Owl Carousel into a WordPress site if you are a non-developer, and requires JQuery and PHP coding skills. That is why I developed this plugin.
48
+
49
+ I use Owl Carousel a in various WordPress sites I develop, specifically where I need the additional flexibility to develop a carousel with a more complex layout, or use a layout not catered for by any existing carousel plugin product.
50
+
51
+ Please view the [FAQ Page](https://wordpress.org/plugins/slide-anything/faq/) for information on how to use `Slide Anything`.
52
+
53
+ == Installation ==
54
+
55
+ 1. Upload the entire `slide-anything` folder to the `/wp-content/plugins/` directory.
56
+ 1. Activate the plugin through the 'Plugins' menu within the WordPress Dashboard.
57
+
58
+ You will now see the `Sliders` menu in your WordPress admin panel.
59
+
60
+ == Frequently Asked Questions ==
61
+
62
+ = How do I insert 'Slide Anything' sliders into my WordPress pages or posts? =
63
+
64
+ There are two ways to do this. If you are using the visual editor to edit a page or post, you will see a `Slide Anything Sliders` button/icon in the toolbar of the editor. Click this button and a popup will be displayed containing a list of sliders that you have created. Select the title of a slider within this list and click `OK` to insert the shortcode for the selected slider into your page or post content.
65
+
66
+ The other method: When you are editing your slider within the WordPress Dashboard, you will see a box with the heading `Shortcode / Preview` on the right-hand side. Click the `Copy to Clipboard` button within this box to copy the slider shortcode to your clipboard. Paste this copied shortcode into the page or post where you would like your slider to appear. This is also the method to use if you want to insert your slider into a text widget or another custom content type, such as a portfolio post.
67
+
68
+ = The difference between a Slider and a Carousel, and how to create either =
69
+
70
+ By definition a `slider` has a single slide displayed on-page at a time, whilst a `carousel` has multiple slides displayed 'on-page' at a time. The `Items Displayed` box, on the right-hand side of the slider edit page in the WordPress dashboard controls how many slides are displayed on-page at a time.
71
+
72
+ To define a slider, all the settings within this box must be set to `1`. When these are set to values greater than `1`, a carousel will be displayed, for example you may want to display a carousel with 4 slides visible on desktop devices, 3 slides visible on tablets and only 2 slides visible on mobile phones.
73
+
74
+ = How do I define slide background images? =
75
+
76
+ The `Slide Background` box for each slide in your slider allows you to define a background image or a background color for each slide. Note that the content you add to each slide within the slide editor box for each slide is foreground content and sits on `top` of the slide background - this content can be other images and textual content.
77
+
78
+ To set a slide background image, click the `Set Image` button. The `Background Size` setting determines if, and how the background image is stretched/shrunk to cover the slide content area and the `Background Repeat` setting determines if the backgroung image should be repeated, like tiles. The `Background Color` setting allows you set a color for the slide background - note that you can have both a slide background color AND a slide background image. The small background preview window to the left of these settings give you an indication on how the settings you choose will look.
79
+
80
+ The `Min Height` setting (within the `Slider Style` box), is often used in conjunction with defining slide backgrounds, as this setting controls how much of the slide background is visible if the slide contains no (foreground) content.
81
+
82
+ = How do I use the 'Slider Style' settings? =
83
+
84
+ At the top of this box, which appears on the right-hand side when editing a slider, you can set and copy the CSS `ID` for the slider. This is useful for developers who are familiar with CSS coding, and this CSS `ID` can be used to create custom styles for your slider within your theme or child-theme's style/CSS file.
85
+
86
+ The `Padding (pixels)` settings are used to define the amount of padding space around the entire slider - top, right, bottom and left. The `Background/Border` settings define the background colour for the entire slider (`Note:` each slide's background image/color will appear on top of this slider background), and also if a border should appear around the entire slider - the width, color and border radius of this border.
87
+
88
+ The `SLIDE STYLE` settings are the style settings for each individual slide with the slider/carousel. Here you can define the minimum height each slide and also the padding space around each slide.
89
+
90
+ = Using 'Slide Anything' in WordPress 5.0 =
91
+
92
+ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty straight-forward. You can paste a Slide Anything shortcode into a 'Paragraph Block' or use the 'Shortcode Block'.
93
+
94
+ == Screenshots ==
95
+
96
+ 1. The Create/Edit slider page within the WordPress Dashboard - this is where you define the settings and create the slides for your `Slide Anything` slider or carousel.
97
+ 2. How a carousel created using `Slide Anything` appears within the slider preview popup.
98
+
99
+ == Changelog ==
100
+
101
+ = 1.0 =
102
+ * Initial release of this plugin.
103
+
104
+ = 1.1 =
105
+ * Added a slider preview feature to the slider edit page - pressing the 'Preview' button displays the slider within a popup window.
106
+
107
+ = 1.2 =
108
+ * Added a button to the visual editor on pages and posts which displays a list of all sliders you have created, allow you to select a slider and the corresponding shortcode is automatically inserted into your page or post.
109
+ * Added the 'Random Order' checkbox to the edit slider page, and when checked slides will be randomly re-ordered whenever the slider is displayed
110
+ * Fixed issue with the 'delete plugin' function, which was crashing
111
+
112
+ = 1.3 =
113
+ * Added setting to add a margin left and right of each slide
114
+
115
+ = 1.4 =
116
+ * Bug Fix: Added `Allow Shortcodes` setting. Running shortcodes within `Slide Anything` may cause issues with some Wordpress Page Builders, and disable this setting will resolve this issue if it occurs.
117
+ * Added a new `Items Displayed` setting to set the number of slides to be displayed on screen resolutions over 1400 pixels
118
+ * Added a new `Autohide Arrows` setting to enable/displayed the autohide feature for slider navigation arrows
119
+
120
+ = 1.5 =
121
+ * Bug Fix: Fixed issue with some HTML elements/attributes being stripped out when certain shortcodes are used within slide content - found an alternative to KSES sanitization for slide content.
122
+ * Added a new dropdown option 'Background Position' for the slide background of each slide
123
+
124
+ = 1.6 =
125
+ * Added `Slide Transition` setting to set the transition of 1-Items Sliders to a 'fade', 'backSlide', 'goDown' or 'fadeUp' transition effect
126
+ * Added checkboxes to enable/disable `mouseDrag` and `touchDrag` carousel settings
127
+ * Some small bug fixes
128
+
129
+ = 1.6.1 =
130
+ * Bug Fix: Fixed minor issue when editing slide content within the WordPress Dashboard using the Text Editor. If HTML tags are not properly closed, then this was causing an issue - added the WordPress 'balanceTags()' function to correct this issue.
131
+
132
+ = 1.6.2 =
133
+ * Bug Fix: Fixed minor issue with IE 10 and IE 11 - the 'fade' and 'fade up' transition effects were not working.
134
+
135
+ = 2.0 =
136
+ * Rebuilt Slide Anything using Owl Carousel version 2.
137
+
138
+ = 2.0.1 =
139
+ * Some required CSS files were missing from the WordPress repository and therefore ZIP download. Quick patch to rectify this.
140
+
141
+ = 2.0.2 =
142
+ * Some small 'post version 2' bug fixes.
143
+
144
+ = 2.0.3 =
145
+ * Removed array dereferencing from PHP code, which causes a fatal error on web hosts using a PHP version prior to version 5.4.
146
+
147
+ = 2.0.4 =
148
+ * Fixed CSS bug with slide images (IMG tags) being resized to 100% of slide width.
149
+
150
+ = 2.0.5 =
151
+ * Fixed bug with slide 'min-height' percentage calculation.
152
+ * Changed Slide Anything Javascript loading to now load using '$(document).ready' instead of '$(window).load'.
153
+
154
+ = 2.0.6 =
155
+ * Increase number of slides allowed from 50 to 99.
156
+ * Added Owl Carousel 2.0 URL Hash Navigation feature
157
+ * Minor bug fixes
158
+
159
+ = 2.0.7 =
160
+ * Removed Owl Carousel 2.0 URL Hash Navigation feature
161
+
162
+ = 2.0.8 =
163
+ * Minor bug fix
164
+
165
+ = 2.0.9 =
166
+ * Added new 'Reverse Order' Checkbox to backend editor, which reverses the order of the slides created
167
+ * Added a 'Preview Slider' button to the backend editor - when clicked a popup modal is displayed containing a preview of the Slide Anything Slider
168
+
169
+ = 2.0.10 =
170
+ * Minor Bug Fix
171
+
172
+ = 2.0.11 =
173
+ * Bug Fix - Before generating Slide Anything JavaScript code, check if jQuery has been loaded loaded. If not, then 'Enqueue' jQuery script
174
+
175
+ = 2.0.12 =
176
+ * Bug Fix - Changed the location where the jQuery script is enqueued
177
+
178
+ = 2.0.13 =
179
+ * Bug Fix - Fixed a clash with the 'Envira Gallery' plugin
180
+
181
+ = 2.0.14 =
182
+ * Fix for using shortcodes inside of anything that already hooks into 'the_content'
183
+
184
+ = 2.0.15 =
185
+ * Modified plugin so that WordPress users with an 'Editor' role can save/update sliders
186
+
187
+ = 2.0.16 =
188
+ * Bug Fix: Modified WP Dashboard PHP code so that only a Slider 'CSS ID' containing letters (upper/lowercase) or Underscore '_' characters will be accepted. Using Dashes '-' within the CSS ID would cause a Javascript error.
189
+
190
+ = 2.0.17 =
191
+ * Added a new 'Slide By' setting to set the number of slides to slide per transition
192
+
193
+ = 2.0.18 =
194
+ * Minor Bug Fix
195
+
196
+ = 2.1.0 =
197
+ * Replaced 'Owl Carousel 2.2.1' with 'Owl Carousel 2.3 BETA'.
198
+ * Upgrading Owl Carousel fixes an issue with Slide Anything that has been reported to me on numerous occasions - namely if you switch TABS within your browser, switch to another application, or minimise your browser window, then the Slider/Carousel stops (i.e. no more transitions), and the page needs to be reloaded to 'restart' the slider.
199
+ * Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
200
+
201
+ = 2.1.1 =
202
+ * Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
203
+
204
+ = 2.1.2 =
205
+ * Added a new feature to allow you to set slider minimum height in pixels
206
+ * Added a new feature so that each slide within a slider has its own unique CSS ID
207
+
208
+ = 2.1.3 =
209
+ * Minor bug fix with Slide Anything PRO Software Licensing integration
210
+
211
+ = 2.1.4 =
212
+ * Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
213
+
214
+ = 2.1.5 =
215
+ * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
216
+
217
+ = 2.1.6 =
218
+ * Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
219
+
220
+ = 2.1.7 =
221
+ * Minor bug fix with new 'Auto Height' feature
222
+
223
+ = 2.1.8 =
224
+ * Added the Slide By 'page' option, which is set by setting the 'Slide By' slider input to 0.
225
+ * For Slide Anything PRO YouTube video popups, added the 'rel=0' paramerter so that related videos are not displayed at the end of a video playback. This has been requested quite a bit, and I have modified the 'Magnific Popup' code so that this parameter is added to the iframe code generated.
226
+
227
+ = 2.1.9 =
228
+ * Added a new 'Use window.onload event' checkbox setting. By default, Slide Anything loads it JavaSctipt/jQuery code during the 'document.ready' event. If this new option is checked, then the JavaSctipt/jQuery code is loaded during the 'window.onload' event, and this event is only executed after all the assets for the page have been loaded - all images, CSS etc. Using this option solves an issue that sometimes occurs when inserting a Slide Anything slider into a Visual Composer full-width section, and these full-width containers are created/calculated dynamically by adding negative left/right margins to the container after the SA JavaScript/jQuery code is executed.
229
+
230
+ = 2.1.10 =
231
+ * Minor bug fix for the new 'Use window.onload event' checkbox setting.
232
+
233
+ = 2.1.11 =
234
+ * Fixed a bug that occurred when migrating a WP site to another domain location (e.g. transferring a staging/test WP site to a Live WP site). The SA slider would not work on the new domain unless it was re-saved in the back-end. This has now been fixed with this release.
235
+
236
+ = 2.1.12 =
237
+ * Added the new feature (checkbox) 'Remove JavaScript Content'. When checked, JavaScript content (<script> tags) are removed from slide content.
238
+
239
+ = 2.1.13 =
240
+ * Bug fix - An array initialisation was causing a crash on hosts using a PHP version prior to 5.4. Changed this array initialisation to now be backwards compatible.
241
+
242
+ = 2.1.14 =
243
+ * Bug fix - Fixed a small bug with the "Remove JavaScript Content" feature.
244
+
245
+ = 2.1.15 =
246
+ * Upgraded to the latest version of Owl Carousel (version 2.3.4). Set the 'Mouse Drag' option to disabled by default. Mouse dragging when enabled affects vertical touch-drag scrolling on mobile devices.
247
+
248
+ = 2.1.16 =
249
+ * Small bug fix that relates to Slide Anything PRO only: Sliders with 'autoplay' enabled were re-starting autoplay when popups were closed.
250
+
251
+ = 2.1.17 =
252
+ * Added a new feature to facilitate owl-carousel 'Lazy Load' images. With this feature enabled, slide images (<img> tags) are only loaded when the relevant slides are displayed (all of the slider's images are NOT loaded up-front).
253
+
254
+ = 2.1.18 =
255
+ * Bug Fix - There was an issue on mobile phones when autoplay is disabled, and when you swipe to change current slide then autoplay starts up. This has now been fixed.
256
+
257
+ = 2.1.19 =
258
+ * Small enhancement - The Slide Anything container is now set to hidden (visibility:hidden) until all the slides have been displayed and owl-carousel JavaScript code executed, then the SA container is set to visible (visibility:visible). This presents a cleaner page loading experience without the individual slide containers (DIVS) sometimes being displayed (even for a fraction of a second) prior to slider initialisation.
259
+
260
+ = 2.1.20 =
261
+ * Bug Fix - Fixed an issue where the Slide Anything JavaScript code was not being generated with certain newer themes.
262
+
263
+ = 2.1.21 =
264
+ * Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
265
+
266
+ = 2.2 =
267
+ * Added Hero Slider and Thumbnail Pagination support, which are Slide Anything PRO features.
268
+
269
+ = 2.2.1 =
270
+ * Bug Fix - Issue with "Lazy Load Images" feature, and when enabled UTF-8 encoding was broken. Resolved.
271
+
272
+ = 2.2.2 =
273
+ * Bug Fix - Issue with "Thumbnail Pagination" data being saved on 'Non-PRO' installations - causing a fatal error.
274
+
275
+ = 2.2.3 =
276
+ * Bug Fix - Resolved small non-fatal issue to remove "Notice: Undefined index: ../php/slide-anything-frontend.php on line 66" message.
277
+
278
+ = 2.2.4 =
279
+ * Bug Fix - Do not display the PRO upgrade notice within the WordPress Dashboard if you have already upgraded to the PRO version.
280
+
281
+ = 2.2.5 =
282
+ * Bug Fix - Optimise front-end code so that no 'background' CSS rules are displayed if the user does not specify a background image/colour for the slide.
283
+
284
+ = 2.2.6 =
285
+ * Bug Fix - Fixed the PHP Warning "explode() expects parameter 2 to be string, array given in wp-content\plugins\slide-anything\php\slide-anything-admin.php on line 824" some users were experiencing.
286
+
287
+ = 2.2.7 =
288
+ * Added Showcase Carousel support, which is a new Slide Anything PRO feature.
289
+
290
+ = 2.2.8 =
291
+ * Bug Fix: Omit DOCTYPE from HTML front-end code generated.
292
+
293
+ = 2.2.9 =
294
+ * Removed the change added in version 2.2.8 (so reverted back to version 2.2.7)
295
+
296
+ = 2.3.0 =
297
+ * Remove HTML elements (HTML, DOCTYPE & BODY tags) from front-end code generated when the 'Lazy Load Images' or 'Remove JavaScript Content' options are selected for a slider
298
+
299
+ = 2.3.1 =
300
+ * Bug Fix: Fixed issue with 'Autohide Arrows' not working properly with Showcase Carousels
301
+
302
+ = 2.3.2 =
303
+ * Bug Fix: Fixed 'undefined index' error that sometimes occurs on the WordPress backend when saving Showcase Carousel fields
304
+
305
+ = 2.3.3 =
306
+ * Added Slide Any Post promotional meta box & fixed a couple backend aesthetic issues
307
+
308
+ = 2.3.4 =
309
+ * Added a 'Duplicate Slider' facility so that sliders created can be duplicated or backed-up
310
+
311
+ = 2.3.5 =
312
+ * Added the 'Re-Order Slides' sub-page, which allows one to easily change the order of slides within a Slide Anything slider with a 'drag-and-drop' interface
313
+
314
+ = 2.3.6 =
315
+ * Added the 'Show 1 Dot Per Slide' checkbox option which when checked displays 1 pagination dot per slide (instead of 1 pagination dot per page of slides)
316
+
317
+ = 2.3.7 =
318
+ * Added the option to bulk delete slides within the 'Re-Order Slides' page
319
+
320
+ = 2.3.8 =
321
+ * Added the 'Use UL and LI Containers' checkbox which when checked, 'UL' is used as the DOM element for 'owl-stage' and 'LI' is used as the DOM elements for 'owl-item'
322
+
323
+ = 2.3.9 =
324
+ * CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
325
+
326
+ = 2.3.10 =
327
+ * Revamped the 'Preview Slider' feature, so that the preview popup container loads the front-end theme's javascript and css style files
328
+
329
+ = 2.3.11 =
330
+ * Couple of small bug fixes: Undefined index error for 'popup_shortcode' vairables and hide "SA PRO' advert for non-admin users.
331
+
332
+ = 2.3.12 =
333
+ * Added a new feature (checkbox) to vertically center content within slides.
334
+
335
+ = 2.3.13 =
336
+ * Minor bug fix: PHP 'Undefined Index' warnings were sometimes displayed after upgrading to Slide Anything PRO (and the slider was created using the Slide Anything FREE plugin)
337
+
338
+ = 2.3.14 =
339
+ * YouTube popups now set the slide background to the YouTube thumbnail by default
340
+
341
+ = 2.3.15 =
342
+ * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
343
+
344
+ = 2.3.16 =
345
+ * Small Bug Fix: Using the Slide Anything shortcode with an incorrect ID sometimes did not display an error message - this has been resolved
346
+
347
+ = 2.3.17 =
348
+ * Small Bug Fix: Click to Advance feature was not working properly with multiple sliders on the page
349
+
350
+ = 2.3.18 =
351
+ * Call the JavaScript 'window resize' event when the Owl Carousel 'initialized' event is executed - this resolves an issue some uses have been experiencing with slides not being sized correctly after page load
352
+
353
+ = 2.3.19 =
354
+ * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
355
+
356
+ = 2.3.20 =
357
+ * Added a new feature 'Slide Goto Links', which allows the creation of links (or buttons) that when clicked will go to a specific slide within your slider.
358
+
359
+ = 2.3.21 =
360
+ * Small Bug Fix to remove PHP Notice (warnings) within 'slide-anything-admin.php' for possible undefined indexs for 'popup_type', 'popup_video_type' and 'popup_video_id'
361
+
362
+ = 2.3.22 =
363
+ * Small Bug Fix to fix a clash with the 'Woody Snippets' plugin within the WordPress Dashboard
364
+
365
+ = 2.3.23 =
366
+ * Small Bug Fix: The Re-Order slides page was displaying a PHP warning notice on sites with PHP 7.4.
367
+
368
+ = 2.3.24 =
369
+ * Small Bug Fix to fix a conflict with the 'Photonic Gallery & Lightbox' plugin. The slide 'Add Media' button was not working when this plugin is installed.
370
+
371
+ = 2.3.25 =
372
+ * Small Bug Fix: If the 'lazy load images' option was enabled and a slide content was blank then a PHP warning message was being displayed.
373
+
374
+ = 2.3.26 =
375
+ * When thumbnail pagination and popup options are used together (PRO version only) there was an issue - the popup images or popup YouTube video thumbs were not be used to set the thumbnail images.
376
+
377
+ = 2.3.27 =
378
+ * Adding a new Slide Anything global setting which appears under 'Settings->Writing' within the WordPress Dashbaord. This is a checkbox setting called 'Disable TinyMCE Button', and when checked the 'Slide Anything Sliders' button within the toolbar of the WordPress Classic Editor when editing pages and posts will be disabled. This TinyMCE button is causing issues on some sites, and adding the facility to turn off this button resolves this issue.
379
+
380
+ = 2.3.28 =
381
+ * 2 small fixes. Added transparent (invisible) 'Previous' and 'Next' text to the Previous & Next arrow buttons so that accessibility errors are no longer generated with accessibility evaluation tools. Do not use the 'window.dispatchEvent' function call on IE11 browsers when executing a 'resize' event.
382
+
383
+ = 2.3.29 =
384
+ * Added 2 new features. The 'Right to Left Slider' feature changes the direction of the slider to be right to left. The 'Disable Preview Feature' disables the 'Preview Slider' button within the SA slider settings page and also disables the auto-generation of the 'Slide Anything Popup Preview' WordPress page.
385
+
386
+ = 2.3.30 =
387
+ * Added a new feture to set the 'Starting Slide Number' for a slider. This sets the Owl Carousel 'startPosition' option to set the slide number to display first within the list of slides created for a slider.
388
+
389
+ == Upgrade Notice ==
390
+
391
+ = 1.0 =
392
+ * Initial release of this plugin.
393
+
394
+ = 1.1 =
395
+ * Preview sliders created within the WordPress Dashboard.
396
+
397
+ = 1.2 =
398
+ * Added button to visual editor in pages/popsts to automatically insert slider shortcode
399
+ * Added 'Random Order' option to randomly display slides for sliders
400
+
401
+ = 1.3 =
402
+ * Added setting to add a margin left and right of each slide
403
+
404
+ = 1.4 =
405
+ * Bug Fix: Added `Allow Shortcodes` setting. Running shortcodes within `Slide Anything` may cause issues with some Wordpress Page Builders, and disable this setting will resolve this issue if it occurs.
406
+ * Added a new `Items Displayed` setting to set the number of slides to be displayed on screen resolutions over 1400 pixels
407
+ * Added a new `Autohide Arrows` setting to enable/displayed the autohide feature for slider navigation arrows
408
+
409
+ = 1.5 =
410
+ * Bug Fix: Fixed issue with some HTML elements/attributes being stripped out when certain shortcodes are used within slide content - found an alternative to KSES sanitization for slide content.
411
+ * Added a new dropdown option 'Background Position' for the slide background of each slide
412
+
413
+ = 1.6 =
414
+ * Added `Slide Transition` setting to set the transition of 1-Items Sliders to a 'fade', 'backSlide', 'goDown' or 'fadeUp' transition effect
415
+ * Added checkboxes to enable/disable `mouseDrag` and `touchDrag` carousel settings
416
+ * Some small bug fixes
417
+
418
+ = 1.6.1 =
419
+ * Bug Fix: Fixed minor issue when editing slide content within the WordPress Dashboard using the Text Editor. If HTML tags are not properly closed, then this was causing an issue - added the WordPress 'balanceTags()' function to correct this issue.
420
+
421
+ = 1.6.2 =
422
+ * Bug Fix: Fixed minor issue with IE 10 and IE 11 - the 'fade' and 'fade up' transition effects were not working.
423
+
424
+ = 2.0 =
425
+ * Rebuilt Slide Anything using Owl Carousel version 2.
426
+
427
+ = 2.0.1 =
428
+ * Some required CSS files were missing from the WordPress repository and therefore ZIP download. Quick patch to rectify this.
429
+
430
+ = 2.0.2 =
431
+ * Some small 'post version 2' bug fixes.
432
+
433
+ = 2.0.3 =
434
+ * Removed array dereferencing from PHP code, which causes a fatal error on web hosts using a PHP version prior to version 5.4.
435
+
436
+ = 2.0.4 =
437
+ * Fixed CSS bug with slide images (IMG tags) being resized to 100% of slide width.
438
+
439
+ = 2.0.5 =
440
+ * Fixed bug with slide 'min-height' percentage calculation.
441
+ * Changed Slide Anything Javascript loading to now load using '$(document).ready' instead of '$(window).load'.
442
+
443
+ = 2.0.6 =
444
+ * Increase number of slides allowed from 50 to 99.
445
+ * Added Owl Carousel 2.0 URL Hash Navigation feature
446
+ * Minor bug fixes
447
+
448
+ = 2.0.7 =
449
+ * Removed Owl Carousel 2.0 URL Hash Navigation feature
450
+
451
+ = 2.0.8 =
452
+ * Minor bug fix
453
+
454
+ = 2.0.9 =
455
+ * Added new 'Reverse Order' Checkbox to backend editor, which reverses the order of the slides created
456
+ * Added a 'Preview Slider' button to the backend editor - when clicked a popup modal is displayed containing a preview of the Slide Anything Slider
457
+
458
+ = 2.0.10 =
459
+ * Minor Bug Fix
460
+
461
+ = 2.0.11 =
462
+ * Bug Fix - Before generating Slide Anything JavaScript code, check if jQuery has been loaded loaded. If not, then 'Enqueue' jQuery script
463
+
464
+ = 2.0.12 =
465
+ * Bug Fix - Changed the location where the jQuery script is enqueued
466
+
467
+ = 2.0.13 =
468
+ * Bug Fix - Fixed a clash with the 'Envira Gallery' plugin
469
+
470
+ = 2.0.14 =
471
+ * Fix for using shortcodes inside of anything that already hooks into 'the_content'
472
+
473
+ = 2.0.15 =
474
+ * Modified plugin so that WordPress users with an 'Editor' role can save/update sliders
475
+
476
+ = 2.0.16 =
477
+ * Bug Fix: Modified WP Dashboard PHP code so that only a Slider 'CSS ID' containing letters (upper/lowercase) or Underscore '_' characters will be accepted. Using Dashes '-' within the CSS ID would cause a Javascript error.
478
+
479
+ = 2.0.17 =
480
+ * Added a new 'Slide By' setting to set the number of slides to slide per transition
481
+
482
+ = 2.0.18 =
483
+ * Minor Bug Fix
484
+
485
+ = 2.1.0 =
486
+ * Replaced 'Owl Carousel 2.2.1' with 'Owl Carousel 2.3 BETA'.
487
+ * Upgrading Owl Carousel fixes an issue with Slide Anything that has been reported to me on numerous occasions - namely if you switch TABS within your browser, switch to another application, or minimise your browser window, then the Slider/Carousel stops (i.e. no more transitions), and the page needs to be reloaded to 'restart' the slider.
488
+ * Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
489
+
490
+ = 2.1.1 =
491
+ * Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
492
+
493
+ = 2.1.2 =
494
+ * Added a new feature to allow you to set slider minimum height in pixels
495
+ * Added a new feature so that each slide within a slider has its own unique CSS ID
496
+
497
+ = 2.1.3 =
498
+ * Minor bug fix with Slide Anything PRO Software Licensing integration
499
+
500
+ = 2.1.4 =
501
+ * Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
502
+
503
+ = 2.1.5 =
504
+ * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
505
+
506
+ = 2.1.6 =
507
+ * Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
508
+
509
+ = 2.1.7 =
510
+ * Minor bug fix with new 'Auto Height' feature
511
+
512
+ = 2.1.8 =
513
+ * Added the Slide By 'page' option, which is set by setting the 'Slide By' slider input to 0.
514
+ * For Slide Anything PRO YouTube video popups, added the 'rel=0' paramerter so that related videos are not displayed at the end of a video playback. This has been requested quite a bit, and I have modified the 'Magnific Popup' code so that this parameter is added to the iframe code generated.
515
+
516
+ = 2.1.9 =
517
+ * Added a new 'Use window.onload event' checkbox setting. By default, Slide Anything loads it JavaSctipt/jQuery code during the 'document.ready' event. If this new option is checked, then the JavaSctipt/jQuery code is loaded during the 'window.onload' event, and this event is only executed after all the assets for the page have been loaded - all images, CSS etc. Using this option solves an issue that sometimes occurs when inserting a Slide Anything slider into a Visual Composer full-width section, and these full-width containers are created/calculated dynamically by adding negative left/right margins to the container after the SA JavaScript/jQuery code is executed.
518
+
519
+ = 2.1.10 =
520
+ * Minor bug fix for the new 'Use window.onload event' checkbox setting.
521
+
522
+ = 2.1.11 =
523
+ * Fixed a bug that occurred when migrating a WP site to another domain location (e.g. transferring a staging/test WP site to a Live WP site). The SA slider would not work on the new domain unless it was re-saved in the back-end. This has now been fixed with this release.
524
+
525
+ = 2.1.12 =
526
+ * Added the new feature (checkbox) 'Remove JavaScript Content'. When checked, JavaScript content (<script> tags) are removed from slide content.
527
+
528
+ = 2.1.13 =
529
+ * Bug fix - An array initialisation was causing a crash on hosts using a PHP version prior to 5.4. Changed this array initialisation to now be backwards compatible.
530
+
531
+ = 2.1.14 =
532
+ * Bug fix - Fixed a small bug with the "Remove JavaScript Content" feature.
533
+
534
+ = 2.1.15 =
535
+ * Upgraded to the latest version of Owl Carousel (version 2.3.4). Set the 'Mouse Drag' option to disabled by default. Mouse dragging when enabled affects vertical touch-drag scrolling on mobile devices.
536
+
537
+ = 2.1.16 =
538
+ * Small bug fix that relates to Slide Anything PRO only: Sliders with 'autoplay' enabled were re-starting autoplay when popups were closed.
539
+
540
+ = 2.1.17 =
541
+ * Added a new feature to facilitate owl-carousel 'Lazy Load' images. With this feature enabled, slide images (<img> tags) are only loaded when the relevant slides are displayed (all of the slider's images are NOT loaded up-front).
542
+
543
+ = 2.1.18 =
544
+ * Bug Fix - There was an issue on mobile phones when autoplay is disabled, and when you swipe to change current slide then autoplay starts up. This has now been fixed.
545
+
546
+ = 2.1.19 =
547
+ * Small enhancement - The Slide Anything container is now set to hidden (visibility:hidden) until all the slides have been displayed and owl-carousel JavaScript code executed, then the SA container is set to visible (visibility:visible). This presents a cleaner page loading experience without the individual slide containers (DIVS) sometimes being displayed (even for a fraction of a second) prior to slider initialisation.
548
+
549
+ = 2.1.20 =
550
+ * Bug Fix - Fixed an issue where the Slide Anything JavaScript code was not being generated with certain newer themes.
551
+
552
+ = 2.1.21 =
553
+ * Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
554
+
555
+ = 2.2 =
556
+ * Added Hero Slider and Thumbnail Pagination support, which are Slide Anything PRO features.
557
+
558
+ = 2.2.1 =
559
+ * Bug Fix - Issue with "Lazy Load Images" feature, and when enabled UTF-8 encoding was broken. Resolved.
560
+
561
+ = 2.2.2 =
562
+ * Bug Fix - Issue with "Thumbnail Pagination" data being saved on 'Non-PRO' installations - causing a fatal error.
563
+
564
+ = 2.2.3 =
565
+ * Bug Fix - Resolved small non-fatal issue to remove "Notice: Undefined index: ../php/slide-anything-frontend.php on line 66" message.
566
+
567
+ = 2.2.4 =
568
+ * Bug Fix - Do not display the PRO upgrade notice within the WordPress Dashboard if you have already upgraded to the PRO version.
569
+
570
+ = 2.2.5 =
571
+ * Bug Fix - Optimise front-end code so that no 'background' CSS rules are displayed if the user does not specify a background image/colour for the slide.
572
+
573
+ = 2.2.6 =
574
+ * Bug Fix - Fixed the PHP Warning "explode() expects parameter 2 to be string, array given in wp-content\plugins\slide-anything\php\slide-anything-admin.php on line 824" some users were experiencing.
575
+
576
+ = 2.2.7 =
577
+ * Added Showcase Carousel support, which is a new Slide Anything PRO feature.
578
+
579
+ = 2.2.8 =
580
+ * Bug Fix: Omit DOCTYPE from HTML front-end code generated.
581
+
582
+ = 2.2.9 =
583
+ * Removed the change added in version 2.2.8 (so reverted back to version 2.2.7)
584
+
585
+ = 2.3.0 =
586
+ * Remove HTML elements (HTML, DOCTYPE & BODY tags) from front-end code generated when the 'Lazy Load Images' or 'Remove JavaScript Content' options are selected for a slider
587
+
588
+ = 2.3.1 =
589
+ * Bug Fix: Fixed issue with 'Autohide Arrows' not working properly with Showcase Carousels
590
+
591
+ = 2.3.2 =
592
+ * Bug Fix: Fixed 'undefined index' error that sometimes occurs on the WordPress backend when saving Showcase Carousel fields
593
+
594
+ = 2.3.3 =
595
+ * Added Slide Any Post promotional meta box & fixed a couple backend aesthetic issues
596
+
597
+ = 2.3.4 =
598
+ * Added a 'Duplicate Slider' facility so that sliders created can be duplicated or backed-up
599
+
600
+ = 2.3.5 =
601
+ * Added the 'Re-Order Slides' sub-page, which allows one to easily change the order of slides within a Slide Anything slider with a 'drag-and-drop' interface
602
+
603
+ = 2.3.6 =
604
+ * Added the 'Show 1 Dot Per Slide' checkbox option which when checked displays 1 pagination dot per slide (instead of 1 pagination dot per page of slides)
605
+
606
+ = 2.3.7 =
607
+ * Added the option to bulk delete slides within the 'Re-Order Slides' page
608
+
609
+ = 2.3.8 =
610
+ * Added the 'Use UL and LI Containers' checkbox which when checked, 'UL' is used as the DOM element for 'owl-stage' and 'LI' is used as the DOM elements for 'owl-item'
611
+
612
+ = 2.3.9 =
613
+ * CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
614
+
615
+ = 2.3.10 =
616
+ * Revamped the 'Preview Slider' feature, so that the preview popup container loads the front-end theme's javascript and css style files
617
+
618
+ = 2.3.11 =
619
+ * Couple of small bug fixes: Undefined index error for 'popup_shortcode' vairables and hide "SA PRO' advert for non-admin users.
620
+
621
+ = 2.3.12 =
622
+ * Added a new feature (checkbox) to vertically center content within slides.
623
+
624
+ = 2.3.13 =
625
+ * Minor bug fix: PHP 'Undefined Index' warnings were sometimes displayed after upgrading to Slide Anything PRO (and the slider was created using the Slide Anything FREE plugin)
626
+
627
+ = 2.3.14 =
628
+ * YouTube popups now set the slide background to the YouTube thumbnail by default
629
+
630
+ = 2.3.15 =
631
+ * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
632
+
633
+ = 2.3.16 =
634
+ * Small Bug Fix: Using the Slide Anything shortcode with an incorrect ID sometimes did not display an error message - this has been resolved
635
+
636
+ = 2.3.17 =
637
+ * Small Bug Fix: Click to Advance feature was not working properly with multiple sliders on the page
638
+
639
+ = 2.3.18 =
640
+ * Call the JavaScript 'window resize' event when the Owl Carousel 'initialized' event is executed - this resolves an issue some uses have been experiencing with slides not being sized correctly after page load
641
+
642
+ = 2.3.19 =
643
+ * Fixed an issue with the slider arrows that occurs when multiple Showcase Carousels (SA PRO) are displayed on a page.
644
+
645
+ = 2.3.20 =
646
+ * Added a new feature 'Slide Goto Links', which allows the creation of links (or buttons) that when clicked will go to a specific slide within your slider.
647
+
648
+ = 2.3.21 =
649
+ * Small Bug Fix to remove PHP Notice (warnings) within 'slide-anything-admin.php' for possible undefined indexs for 'popup_type', 'popup_video_type' and 'popup_video_id'
650
+
651
+ = 2.3.22 =
652
+ * Small Bug Fix to fix a clash with the 'Woody Snippets' plugin within the WordPress Dashboard
653
+
654
+ = 2.3.23 =
655
+ * Small Bug Fix: The Re-Order slides page was displaying a PHP warning notice on sites with PHP 7.4.
656
+
657
+ = 2.3.24 =
658
+ * Small Bug Fix to fix a conflict with the 'Photonic Gallery & Lightbox' plugin. The slide 'Add Media' button was not working when this plugin is installed.
659
+
660
+ = 2.3.25 =
661
+ * Small Bug Fix: If the 'lazy load images' option was enabled and a slide content was blank then a PHP warning message was being displayed.
662
+
663
+ = 2.3.26 =
664
+ * When thumbnail pagination and popup options are used together (PRO version only) there was an issue - the popup images or popup YouTube video thumbs were not be used to set the thumbnail images.
665
+
666
+ = 2.3.27 =
667
+ * Adding a new Slide Anything global setting which appears under 'Settings->Writing' within the WordPress Dashbaord. This is a checkbox setting called 'Disable TinyMCE Button', and when checked the 'Slide Anything Sliders' button within the toolbar of the WordPress Classic Editor when editing pages and posts will be disabled. This TinyMCE button is causing issues on some sites, and adding the facility to turn off this button resolves this issue.
668
+
669
+ = 2.3.28 =
670
+ * 2 small fixes. Added transparent (invisible) 'Previous' and 'Next' text to the Previous & Next arrow buttons so that accessibility errors are no longer generated with accessibility evaluation tools. Do not use the 'window.dispatchEvent' function call on IE11 browsers when executing a 'resize' event.
671
+
672
+ = 2.3.29 =
673
+ * Added 2 new features. The 'Right to Left Slider' feature changes the direction of the slider to be right to left. The 'Disable Preview Feature' disables the 'Preview Slider' button within the SA slider settings page and also disables the auto-generation of the 'Slide Anything Popup Preview' WordPress page.
674
+
675
+ = 2.3.30 =
676
+ * Added a new feture to set the 'Starting Slide Number' for a slider. This sets the Owl Carousel 'startPosition' option to set the slide number to display first within the list of slides created for a slider.
trunk/slide-anything.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Slide Anything - Responsive Content / HTML Slider and Carousel
4
+ * Plugin URI: https://wordpress.org/plugins/slide-anything/
5
+ * Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
6
+ * Author: Simon Edge
7
+ * Version: 2.3.30
8
+ * License: GPLv2 or later
9
+ */
10
+
11
+ if (!defined('ABSPATH')) exit; // EXIT IF ACCESSED DIRECTLY
12
+
13
+ // SET CONSTANT FOR PLUGIN PATH
14
+ define('SA_PLUGIN_PATH', plugins_url('/', __FILE__));
15
+
16
+ require 'php/slide-anything-admin.php';
17
+ require 'php/slide-anything-frontend.php';
18
+
19
+ /* ##### PLUGIN ACTIVATION HOOK ##### */
20
+ register_activation_hook(__FILE__, 'cpt_slider_plugin_activation' );
21
+
22
+ /* ##### ADD ACTION HOOKS & FILTERS FOR PLUGIN ##### */
23
+ add_action('admin_enqueue_scripts', 'cpt_register_admin_scripts', 999999);
24
+ add_action('init', 'cpt_slider_register');
25
+ add_action('post_row_actions', 'cpt_slider_row_actions', 10, 2);
26
+ add_action('add_meta_boxes', 'cpt_slider_add_meta_boxes');
27
+ add_action('save_post', 'cpt_slider_save_postdata');
28
+ add_filter('manage_sa_slider_posts_columns', 'cpt_slider_modify_columns');
29
+ add_filter('manage_sa_slider_posts_custom_column', 'cpt_slider_custom_column_content');
30
+ if (!get_option('sa-disable-tinymce-button')) {
31
+ add_action('admin_head', 'add_tinymce_button');
32
+ add_action('admin_footer', 'get_tinymce_shortcode_array', 9999999);
33
+ }
34
+ add_action('admin_menu', 'extra_sa_menu_pages');
35
+ add_filter('template_include', 'sa_preview_page_template');
36
+
37
+ // SLIDE ANYTHING 2.0 UPGRADE NOTICE
38
+ add_action('admin_notices', 'version_20_upgrade_notice');
39
+ add_action('admin_init', 'slide_anything_notice_ignore');
40
+
41
+ // ADD A CHECKBOX OPTION UNDER "Settings -> Writing" CALLED "Disable TinyMCE Button"
42
+ add_action('admin_init', 'slide_anything_disable_tinymce_button_setting');
43
+ ?>
trunk/spectrum/spectrum.css ADDED
@@ -0,0 +1,507 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***
2
+ Spectrum Colorpicker v1.8.0
3
+ https://github.com/bgrins/spectrum
4
+ Author: Brian Grinstead
5
+ License: MIT
6
+ ***/
7
+
8
+ .sp-container {
9
+ position:absolute;
10
+ top:0;
11
+ left:0;
12
+ display:inline-block;
13
+ *display: inline;
14
+ *zoom: 1;
15
+ /* https://github.com/bgrins/spectrum/issues/40 */
16
+ z-index: 9999994;
17
+ overflow: hidden;
18
+ }
19
+ .sp-container.sp-flat {
20
+ position: relative;
21
+ }
22
+
23
+ /* Fix for * { box-sizing: border-box; } */
24
+ .sp-container,
25
+ .sp-container * {
26
+ -webkit-box-sizing: content-box;
27
+ -moz-box-sizing: content-box;
28
+ box-sizing: content-box;
29
+ }
30
+
31
+ /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
32
+ .sp-top {
33
+ position:relative;
34
+ width: 100%;
35
+ display:inline-block;
36
+ }
37
+ .sp-top-inner {
38
+ position:absolute;
39
+ top:0;
40
+ left:0;
41
+ bottom:0;
42
+ right:0;
43
+ }
44
+ .sp-color {
45
+ position: absolute;
46
+ top:0;
47
+ left:0;
48
+ bottom:0;
49
+ right:20%;
50
+ }
51
+ .sp-hue {
52
+ position: absolute;
53
+ top:0;
54
+ right:0;
55
+ bottom:0;
56
+ left:84%;
57
+ height: 100%;
58
+ }
59
+
60
+ .sp-clear-enabled .sp-hue {
61
+ top:33px;
62
+ height: 77.5%;
63
+ }
64
+
65
+ .sp-fill {
66
+ padding-top: 80%;
67
+ }
68
+ .sp-sat, .sp-val {
69
+ position: absolute;
70
+ top:0;
71
+ left:0;
72
+ right:0;
73
+ bottom:0;
74
+ }
75
+
76
+ .sp-alpha-enabled .sp-top {
77
+ margin-bottom: 18px;
78
+ }
79
+ .sp-alpha-enabled .sp-alpha {
80
+ display: block;
81
+ }
82
+ .sp-alpha-handle {
83
+ position:absolute;
84
+ top:-4px;
85
+ bottom: -4px;
86
+ width: 6px;
87
+ left: 50%;
88
+ cursor: pointer;
89
+ border: 1px solid black;
90
+ background: white;
91
+ opacity: .8;
92
+ }
93
+ .sp-alpha {
94
+ display: none;
95
+ position: absolute;
96
+ bottom: -14px;
97
+ right: 0;
98
+ left: 0;
99
+ height: 8px;
100
+ }
101
+ .sp-alpha-inner {
102
+ border: solid 1px #333;
103
+ }
104
+
105
+ .sp-clear {
106
+ display: none;
107
+ }
108
+
109
+ .sp-clear.sp-clear-display {
110
+ background-position: center;
111
+ }
112
+
113
+ .sp-clear-enabled .sp-clear {
114
+ display: block;
115
+ position:absolute;
116
+ top:0px;
117
+ right:0;
118
+ bottom:0;
119
+ left:84%;
120
+ height: 28px;
121
+ }
122
+
123
+ /* Don't allow text selection */
124
+ .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
125
+ -webkit-user-select:none;
126
+ -moz-user-select: -moz-none;
127
+ -o-user-select:none;
128
+ user-select: none;
129
+ }
130
+
131
+ .sp-container.sp-input-disabled .sp-input-container {
132
+ display: none;
133
+ }
134
+ .sp-container.sp-buttons-disabled .sp-button-container {
135
+ display: none;
136
+ }
137
+ .sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
138
+ display: none;
139
+ }
140
+ .sp-palette-only .sp-picker-container {
141
+ display: none;
142
+ }
143
+ .sp-palette-disabled .sp-palette-container {
144
+ display: none;
145
+ }
146
+
147
+ .sp-initial-disabled .sp-initial {
148
+ display: none;
149
+ }
150
+
151
+
152
+ /* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
153
+ .sp-sat {
154
+ background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
155
+ background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
156
+ background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
157
+ background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
158
+ background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
159
+ background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
160
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
161
+ filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
162
+ }
163
+ .sp-val {
164
+ background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
165
+ background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
166
+ background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
167
+ background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
168
+ background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
169
+ background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
170
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
171
+ filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
172
+ }
173
+
174
+ .sp-hue {
175
+ background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
176
+ background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
177
+ background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
178
+ background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
179
+ background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
180
+ background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
181
+ }
182
+
183
+ /* IE filters do not support multiple color stops.
184
+ Generate 6 divs, line them up, and do two color gradients for each.
185
+ Yes, really.
186
+ */
187
+ .sp-1 {
188
+ height:17%;
189
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
190
+ }
191
+ .sp-2 {
192
+ height:16%;
193
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
194
+ }
195
+ .sp-3 {
196
+ height:17%;
197
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
198
+ }
199
+ .sp-4 {
200
+ height:17%;
201
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
202
+ }
203
+ .sp-5 {
204
+ height:16%;
205
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
206
+ }
207
+ .sp-6 {
208
+ height:17%;
209
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
210
+ }
211
+
212
+ .sp-hidden {
213
+ display: none !important;
214
+ }
215
+
216
+ /* Clearfix hack */
217
+ .sp-cf:before, .sp-cf:after { content: ""; display: table; }
218
+ .sp-cf:after { clear: both; }
219
+ .sp-cf { *zoom: 1; }
220
+
221
+ /* Mobile devices, make hue slider bigger so it is easier to slide */
222
+ @media (max-device-width: 480px) {
223
+ .sp-color { right: 40%; }
224
+ .sp-hue { left: 63%; }
225
+ .sp-fill { padding-top: 60%; }
226
+ }
227
+ .sp-dragger {
228
+ border-radius: 5px;
229
+ height: 5px;
230
+ width: 5px;
231
+ border: 1px solid #fff;
232
+ background: #000;
233
+ cursor: pointer;
234
+ position:absolute;
235
+ top:0;
236
+ left: 0;
237
+ }
238
+ .sp-slider {
239
+ position: absolute;
240
+ top:0;
241
+ cursor:pointer;
242
+ height: 3px;
243
+ left: -1px;
244
+ right: -1px;
245
+ border: 1px solid #000;
246
+ background: white;
247
+ opacity: .8;
248
+ }
249
+
250
+ /*
251
+ Theme authors:
252
+ Here are the basic themeable display options (colors, fonts, global widths).
253
+ See http://bgrins.github.io/spectrum/themes/ for instructions.
254
+ */
255
+
256
+ .sp-container {
257
+ border-radius: 0;
258
+ background-color: #ECECEC;
259
+ border: solid 1px #f0c49B;
260
+ padding: 0;
261
+ }
262
+ .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
263
+ font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
264
+ -webkit-box-sizing: border-box;
265
+ -moz-box-sizing: border-box;
266
+ -ms-box-sizing: border-box;
267
+ box-sizing: border-box;
268
+ }
269
+ .sp-top {
270
+ margin-bottom: 3px;
271
+ }
272
+ .sp-color, .sp-hue, .sp-clear {
273
+ border: solid 1px #666;
274
+ }
275
+
276
+ /* Input */
277
+ .sp-input-container {
278
+ float:right;
279
+ width: 100px;
280
+ margin-bottom: 4px;
281
+ }
282
+ .sp-initial-disabled .sp-input-container {
283
+ width: 100%;
284
+ }
285
+ .sp-input {
286
+ font-size: 12px !important;
287
+ border: 1px inset;
288
+ padding: 4px 5px;
289
+ margin: 0;
290
+ width: 100%;
291
+ background:transparent;
292
+ border-radius: 3px;
293
+ color: #222;
294
+ }
295
+ .sp-input:focus {
296
+ border: 1px solid orange;
297
+ }
298
+ .sp-input.sp-validation-error {
299
+ border: 1px solid red;
300
+ background: #fdd;
301
+ }
302
+ .sp-picker-container , .sp-palette-container {
303
+ float:left;
304
+ position: relative;
305
+ padding: 10px;
306
+ padding-bottom: 300px;
307
+ margin-bottom: -290px;
308
+ }
309
+ .sp-picker-container {
310
+ width: 172px;
311
+ border-left: solid 1px #fff;
312
+ }
313
+
314
+ /* Palettes */
315
+ .sp-palette-container {
316
+ border-right: solid 1px #ccc;
317
+ }
318
+
319
+ .sp-palette-only .sp-palette-container {
320
+ border: 0;
321
+ }
322
+
323
+ .sp-palette .sp-thumb-el {
324
+ display: block;
325
+ position:relative;
326
+ float:left;
327
+ width: 24px;
328
+ height: 15px;
329
+ margin: 3px;
330
+ cursor: pointer;
331
+ border:solid 2px transparent;
332
+ }
333
+ .sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
334
+ border-color: orange;
335
+ }
336
+ .sp-thumb-el {
337
+ position:relative;
338
+ }
339
+
340
+ /* Initial */
341
+ .sp-initial {
342
+ float: left;
343
+ border: solid 1px #333;
344
+ }
345
+ .sp-initial span {
346
+ width: 30px;
347
+ height: 25px;
348
+ border:none;
349
+ display:block;
350
+ float:left;
351
+ margin:0;
352
+ }
353
+
354
+ .sp-initial .sp-clear-display {
355
+ background-position: center;
356
+ }
357
+
358
+ /* Buttons */
359
+ .sp-palette-button-container,
360
+ .sp-button-container {
361
+ float: right;
362
+ }
363
+
364
+ /* Replacer (the little preview div that shows up instead of the <input>) */
365
+ .sp-replacer {
366
+ margin:0;
367
+ overflow:hidden;
368
+ cursor:pointer;
369
+ padding: 4px;
370
+ display:inline-block;
371
+ *zoom: 1;
372
+ *display: inline;
373
+ border: solid 1px #91765d;
374
+ background: #eee;
375
+ color: #333;
376
+ vertical-align: middle;
377
+ }
378
+ .sp-replacer:hover, .sp-replacer.sp-active {
379
+ border-color: #F0C49B;
380
+ color: #111;
381
+ }
382
+ .sp-replacer.sp-disabled {
383
+ cursor:default;
384
+ border-color: silver;
385
+ color: silver;
386
+ }
387
+ .sp-dd {
388
+ padding: 2px 0;
389
+ height: 16px;
390
+ line-height: 16px;
391
+ float:left;
392
+ font-size:10px;
393
+ }
394
+ .sp-preview {
395
+ position:relative;
396
+ width:25px;
397
+ height: 20px;
398
+ border: solid 1px #222;
399
+ margin-right: 5px;
400
+ float:left;
401
+ z-index: 0;
402
+ }
403
+
404
+ .sp-palette {
405
+ *width: 220px;
406
+ max-width: 220px;
407
+ }
408
+ .sp-palette .sp-thumb-el {
409
+ width:16px;
410
+ height: 16px;
411
+ margin:2px 1px;
412
+ border: solid 1px #d0d0d0;
413
+ }
414
+
415
+ .sp-container {
416
+ padding-bottom:0;
417
+ }
418
+
419
+
420
+ /* Buttons: http://hellohappy.org/css3-buttons/ */
421
+ .sp-container button {
422
+ background-color: #eeeeee;
423
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
424
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
425
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
426
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
427
+ background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
428
+ border: 1px solid #ccc;
429
+ border-bottom: 1px solid #bbb;
430
+ border-radius: 3px;
431
+ color: #333;
432
+ font-size: 14px;
433
+ line-height: 1;
434
+ padding: 5px 4px;
435
+ text-align: center;
436
+ text-shadow: 0 1px 0 #eee;
437
+ vertical-align: middle;
438
+ }
439
+ .sp-container button:hover {
440
+ background-color: #dddddd;
441
+ background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
442
+ background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
443
+ background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
444
+ background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
445
+ background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
446
+ border: 1px solid #bbb;
447
+ border-bottom: 1px solid #999;
448
+ cursor: pointer;
449
+ text-shadow: 0 1px 0 #ddd;
450
+ }
451
+ .sp-container button:active {
452
+ border: 1px solid #aaa;
453
+ border-bottom: 1px solid #888;
454
+ -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
455
+ -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
456
+ -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
457
+ -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
458
+ box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
459
+ }
460
+ .sp-cancel {
461
+ font-size: 11px;
462
+ color: #d93f3f !important;
463
+ margin:0;
464
+ padding:2px;
465
+ margin-right: 5px;
466
+ vertical-align: middle;
467
+ text-decoration:none;
468
+
469
+ }
470
+ .sp-cancel:hover {
471
+ color: #d93f3f !important;
472
+ text-decoration: underline;
473
+ }
474
+
475
+
476
+ .sp-palette span:hover, .sp-palette span.sp-thumb-active {
477
+ border-color: #000;
478
+ }
479
+
480
+ .sp-preview, .sp-alpha, .sp-thumb-el {
481
+ position:relative;
482
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
483
+ }
484
+ .sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
485
+ display:block;
486
+ position:absolute;
487
+ top:0;left:0;bottom:0;right:0;
488
+ }
489
+
490
+ .sp-palette .sp-thumb-inner {
491
+ background-position: 50% 50%;
492
+ background-repeat: no-repeat;
493
+ }
494
+
495
+ .sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
496
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
497
+ }
498
+
499
+ .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
500
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
501
+ }
502
+
503
+ .sp-clear-display {
504
+ background-repeat:no-repeat;
505
+ background-position: center;
506
+ background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
507
+ }
trunk/spectrum/spectrum.js ADDED
@@ -0,0 +1,2323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Spectrum Colorpicker v1.8.0
2
+ // https://github.com/bgrins/spectrum
3
+ // Author: Brian Grinstead
4
+ // License: MIT
5
+
6
+ (function (factory) {
7
+ "use strict";
8
+
9
+ if (typeof define === 'function' && define.amd) { // AMD
10
+ define(['jquery'], factory);
11
+ }
12
+ else if (typeof exports == "object" && typeof module == "object") { // CommonJS
13
+ module.exports = factory(require('jquery'));
14
+ }
15
+ else { // Browser
16
+ factory(jQuery);
17
+ }
18
+ })(function($, undefined) {
19
+ "use strict";
20
+
21
+ var defaultOpts = {
22
+
23
+ // Callbacks
24
+ beforeShow: noop,
25
+ move: noop,
26
+ change: noop,
27
+ show: noop,
28
+ hide: noop,
29
+
30
+ // Options
31
+ color: false,
32
+ flat: false,
33
+ showInput: false,
34
+ allowEmpty: false,
35
+ showButtons: true,
36
+ clickoutFiresChange: true,
37
+ showInitial: false,
38
+ showPalette: false,
39
+ showPaletteOnly: false,
40
+ hideAfterPaletteSelect: false,
41
+ togglePaletteOnly: false,
42
+ showSelectionPalette: true,
43
+ localStorageKey: false,
44
+ appendTo: "body",
45
+ maxSelectionSize: 7,
46
+ cancelText: "cancel",
47
+ chooseText: "choose",
48
+ togglePaletteMoreText: "more",
49
+ togglePaletteLessText: "less",
50
+ clearText: "Clear Color Selection",
51
+ noColorSelectedText: "No Color Selected",
52
+ preferredFormat: false,
53
+ className: "", // Deprecated - use containerClassName and replacerClassName instead.
54
+ containerClassName: "",
55
+ replacerClassName: "",
56
+ showAlpha: false,
57
+ theme: "sp-light",
58
+ palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
59
+ selectionPalette: [],
60
+ disabled: false,
61
+ offset: null
62
+ },
63
+ spectrums = [],
64
+ IE = !!/msie/i.exec( window.navigator.userAgent ),
65
+ rgbaSupport = (function() {
66
+ function contains( str, substr ) {
67
+ return !!~('' + str).indexOf(substr);
68
+ }
69
+
70
+ var elem = document.createElement('div');
71
+ var style = elem.style;
72
+ style.cssText = 'background-color:rgba(0,0,0,.5)';
73
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
74
+ })(),
75
+ replaceInput = [
76
+ "<div class='sp-replacer'>",
77
+ "<div class='sp-preview'><div class='sp-preview-inner'></div></div>",
78
+ "<div class='sp-dd'>&#9660;</div>",
79
+ "</div>"
80
+ ].join(''),
81
+ markup = (function () {
82
+
83
+ // IE does not support gradients with multiple stops, so we need to simulate
84
+ // that for the rainbow slider with 8 divs that each have a single gradient
85
+ var gradientFix = "";
86
+ if (IE) {
87
+ for (var i = 1; i <= 6; i++) {
88
+ gradientFix += "<div class='sp-" + i + "'></div>";
89
+ }
90
+ }
91
+
92
+ return [
93
+ "<div class='sp-container sp-hidden'>",
94
+ "<div class='sp-palette-container'>",
95
+ "<div class='sp-palette sp-thumb sp-cf'></div>",
96
+ "<div class='sp-palette-button-container sp-cf'>",
97
+ "<button type='button' class='sp-palette-toggle'></button>",
98
+ "</div>",
99
+ "</div>",
100
+ "<div class='sp-picker-container'>",
101
+ "<div class='sp-top sp-cf'>",
102
+ "<div class='sp-fill'></div>",
103
+ "<div class='sp-top-inner'>",
104
+ "<div class='sp-color'>",
105
+ "<div class='sp-sat'>",
106
+ "<div class='sp-val'>",
107
+ "<div class='sp-dragger'></div>",
108
+ "</div>",
109
+ "</div>",
110
+ "</div>",
111
+ "<div class='sp-clear sp-clear-display'>",
112
+ "</div>",
113
+ "<div class='sp-hue'>",
114
+ "<div class='sp-slider'></div>",
115
+ gradientFix,
116
+ "</div>",
117
+ "</div>",
118
+ "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
119
+ "</div>",
120
+ "<div class='sp-input-container sp-cf'>",
121
+ "<input class='sp-input' type='text' spellcheck='false' />",
122
+ "</div>",
123
+ "<div class='sp-initial sp-thumb sp-cf'></div>",
124
+ "<div class='sp-button-container sp-cf'>",
125
+ "<a class='sp-cancel' href='#'></a>",
126
+ "<button type='button' class='sp-choose'></button>",
127
+ "</div>",
128
+ "</div>",
129
+ "</div>"
130
+ ].join("");
131
+ })();
132
+
133
+ function paletteTemplate (p, color, className, opts) {
134
+ var html = [];
135
+ for (var i = 0; i < p.length; i++) {
136
+ var current = p[i];
137
+ if(current) {
138
+ var tiny = tinycolor(current);
139
+ var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
140
+ c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
141
+ var formattedString = tiny.toString(opts.preferredFormat || "rgb");
142
+ var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
143
+ html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
144
+ } else {
145
+ var cls = 'sp-clear-display';
146
+ html.push($('<div />')
147
+ .append($('<span data-color="" style="background-color:transparent;" class="' + cls + '"></span>')
148
+ .attr('title', opts.noColorSelectedText)
149
+ )
150
+ .html()
151
+ );
152
+ }
153
+ }
154
+ return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>";
155
+ }
156
+
157
+ function hideAll() {
158
+ for (var i = 0; i < spectrums.length; i++) {
159
+ if (spectrums[i]) {
160
+ spectrums[i].hide();
161
+ }
162
+ }
163
+ }
164
+
165
+ function instanceOptions(o, callbackContext) {
166
+ var opts = $.extend({}, defaultOpts, o);
167
+ opts.callbacks = {
168
+ 'move': bind(opts.move, callbackContext),
169
+ 'change': bind(opts.change, callbackContext),
170
+ 'show': bind(opts.show, callbackContext),
171
+ 'hide': bind(opts.hide, callbackContext),
172
+ 'beforeShow': bind(opts.beforeShow, callbackContext)
173
+ };
174
+
175
+ return opts;
176
+ }
177
+
178
+ function spectrum(element, o) {
179
+
180
+ var opts = instanceOptions(o, element),
181
+ flat = opts.flat,
182
+ showSelectionPalette = opts.showSelectionPalette,
183
+ localStorageKey = opts.localStorageKey,
184
+ theme = opts.theme,
185
+ callbacks = opts.callbacks,
186
+ resize = throttle(reflow, 10),
187
+ visible = false,
188
+ isDragging = false,
189
+ dragWidth = 0,
190
+ dragHeight = 0,
191
+ dragHelperHeight = 0,
192
+ slideHeight = 0,
193
+ slideWidth = 0,
194
+ alphaWidth = 0,
195
+ alphaSlideHelperWidth = 0,
196
+ slideHelperHeight = 0,
197
+ currentHue = 0,
198
+ currentSaturation = 0,
199
+ currentValue = 0,
200
+ currentAlpha = 1,
201
+ palette = [],
202
+ paletteArray = [],
203
+ paletteLookup = {},
204
+ selectionPalette = opts.selectionPalette.slice(0),
205
+ maxSelectionSize = opts.maxSelectionSize,
206
+ draggingClass = "sp-dragging",
207
+ shiftMovementDirection = null;
208
+
209
+ var doc = element.ownerDocument,
210
+ body = doc.body,
211
+ boundElement = $(element),
212
+ disabled = false,
213
+ container = $(markup, doc).addClass(theme),
214
+ pickerContainer = container.find(".sp-picker-container"),
215
+ dragger = container.find(".sp-color"),
216
+ dragHelper = container.find(".sp-dragger"),
217
+ slider = container.find(".sp-hue"),
218
+ slideHelper = container.find(".sp-slider"),
219
+ alphaSliderInner = container.find(".sp-alpha-inner"),
220
+ alphaSlider = container.find(".sp-alpha"),
221
+ alphaSlideHelper = container.find(".sp-alpha-handle"),
222
+ textInput = container.find(".sp-input"),
223
+ paletteContainer = container.find(".sp-palette"),
224
+ initialColorContainer = container.find(".sp-initial"),
225
+ cancelButton = container.find(".sp-cancel"),
226
+ clearButton = container.find(".sp-clear"),
227
+ chooseButton = container.find(".sp-choose"),
228
+ toggleButton = container.find(".sp-palette-toggle"),
229
+ isInput = boundElement.is("input"),
230
+ isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(),
231
+ shouldReplace = isInput && !flat,
232
+ replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]),
233
+ offsetElement = (shouldReplace) ? replacer : boundElement,
234
+ previewElement = replacer.find(".sp-preview-inner"),
235
+ initialColor = opts.color || (isInput && boundElement.val()),
236
+ colorOnShow = false,
237
+ currentPreferredFormat = opts.preferredFormat,
238
+ clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
239
+ isEmpty = !initialColor,
240
+ allowEmpty = opts.allowEmpty && !isInputTypeColor;
241
+
242
+ function applyOptions() {
243
+
244
+ if (opts.showPaletteOnly) {
245
+ opts.showPalette = true;
246
+ }
247
+
248
+ toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
249
+
250
+ if (opts.palette) {
251
+ palette = opts.palette.slice(0);
252
+ paletteArray = $.isArray(palette[0]) ? palette : [palette];
253
+ paletteLookup = {};
254
+ for (var i = 0; i < paletteArray.length; i++) {
255
+ for (var j = 0; j < paletteArray[i].length; j++) {
256
+ var rgb = tinycolor(paletteArray[i][j]).toRgbString();
257
+ paletteLookup[rgb] = true;
258
+ }
259
+ }
260
+ }
261
+
262
+ container.toggleClass("sp-flat", flat);
263
+ container.toggleClass("sp-input-disabled", !opts.showInput);
264
+ container.toggleClass("sp-alpha-enabled", opts.showAlpha);
265
+ container.toggleClass("sp-clear-enabled", allowEmpty);
266
+ container.toggleClass("sp-buttons-disabled", !opts.showButtons);
267
+ container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly);
268
+ container.toggleClass("sp-palette-disabled", !opts.showPalette);
269
+ container.toggleClass("sp-palette-only", opts.showPaletteOnly);
270
+ container.toggleClass("sp-initial-disabled", !opts.showInitial);
271
+ container.addClass(opts.className).addClass(opts.containerClassName);
272
+
273
+ reflow();
274
+ }
275
+
276
+ function initialize() {
277
+
278
+ if (IE) {
279
+ container.find("*:not(input)").attr("unselectable", "on");
280
+ }
281
+
282
+ applyOptions();
283
+
284
+ if (shouldReplace) {
285
+ boundElement.after(replacer).hide();
286
+ }
287
+
288
+ if (!allowEmpty) {
289
+ clearButton.hide();
290
+ }
291
+
292
+ if (flat) {
293
+ boundElement.after(container).hide();
294
+ }
295
+ else {
296
+
297
+ var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo);
298
+ if (appendTo.length !== 1) {
299
+ appendTo = $("body");
300
+ }
301
+
302
+ appendTo.append(container);
303
+ }
304
+
305
+ updateSelectionPaletteFromStorage();
306
+
307
+ offsetElement.bind("click.spectrum touchstart.spectrum", function (e) {
308
+ if (!disabled) {
309
+ toggle();
310
+ }
311
+
312
+ e.stopPropagation();
313
+
314
+ if (!$(e.target).is("input")) {
315
+ e.preventDefault();
316
+ }
317
+ });
318
+
319
+ if(boundElement.is(":disabled") || (opts.disabled === true)) {
320
+ disable();
321
+ }
322
+
323
+ // Prevent clicks from bubbling up to document. This would cause it to be hidden.
324
+ container.click(stopPropagation);
325
+
326
+ // Handle user typed input
327
+ textInput.change(setFromTextInput);
328
+ textInput.bind("paste", function () {
329
+ setTimeout(setFromTextInput, 1);
330
+ });
331
+ textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } });
332
+
333
+ cancelButton.text(opts.cancelText);
334
+ cancelButton.bind("click.spectrum", function (e) {
335
+ e.stopPropagation();
336
+ e.preventDefault();
337
+ revert();
338
+ hide();
339
+ });
340
+
341
+ clearButton.attr("title", opts.clearText);
342
+ clearButton.bind("click.spectrum", function (e) {
343
+ e.stopPropagation();
344
+ e.preventDefault();
345
+ isEmpty = true;
346
+ move();
347
+
348
+ if(flat) {
349
+ //for the flat style, this is a change event
350
+ updateOriginalInput(true);
351
+ }
352
+ });
353
+
354
+ chooseButton.text(opts.chooseText);
355
+ chooseButton.bind("click.spectrum", function (e) {
356
+ e.stopPropagation();
357
+ e.preventDefault();
358
+
359
+ if (IE && textInput.is(":focus")) {
360
+ textInput.trigger('change');
361
+ }
362
+
363
+ if (isValid()) {
364
+ updateOriginalInput(true);
365
+ hide();
366
+ }
367
+ });
368
+
369
+ toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
370
+ toggleButton.bind("click.spectrum", function (e) {
371
+ e.stopPropagation();
372
+ e.preventDefault();
373
+
374
+ opts.showPaletteOnly = !opts.showPaletteOnly;
375
+
376
+ // To make sure the Picker area is drawn on the right, next to the
377
+ // Palette area (and not below the palette), first move the Palette
378
+ // to the left to make space for the picker, plus 5px extra.
379
+ // The 'applyOptions' function puts the whole container back into place
380
+ // and takes care of the button-text and the sp-palette-only CSS class.
381
+ if (!opts.showPaletteOnly && !flat) {
382
+ container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));
383
+ }
384
+ applyOptions();
385
+ });
386
+
387
+ draggable(alphaSlider, function (dragX, dragY, e) {
388
+ currentAlpha = (dragX / alphaWidth);
389
+ isEmpty = false;
390
+ if (e.shiftKey) {
391
+ currentAlpha = Math.round(currentAlpha * 10) / 10;
392
+ }
393
+
394
+ move();
395
+ }, dragStart, dragStop);
396
+
397
+ draggable(slider, function (dragX, dragY) {
398
+ currentHue = parseFloat(dragY / slideHeight);
399
+ isEmpty = false;
400
+ if (!opts.showAlpha) {
401
+ currentAlpha = 1;
402
+ }
403
+ move();
404
+ }, dragStart, dragStop);
405
+
406
+ draggable(dragger, function (dragX, dragY, e) {
407
+
408
+ // shift+drag should snap the movement to either the x or y axis.
409
+ if (!e.shiftKey) {
410
+ shiftMovementDirection = null;
411
+ }
412
+ else if (!shiftMovementDirection) {
413
+ var oldDragX = currentSaturation * dragWidth;
414
+ var oldDragY = dragHeight - (currentValue * dragHeight);
415
+ var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);
416
+
417
+ shiftMovementDirection = furtherFromX ? "x" : "y";
418
+ }
419
+
420
+ var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x";
421
+ var setValue = !shiftMovementDirection || shiftMovementDirection === "y";
422
+
423
+ if (setSaturation) {
424
+ currentSaturation = parseFloat(dragX / dragWidth);
425
+ }
426
+ if (setValue) {
427
+ currentValue = parseFloat((dragHeight - dragY) / dragHeight);
428
+ }
429
+
430
+ isEmpty = false;
431
+ if (!opts.showAlpha) {
432
+ currentAlpha = 1;
433
+ }
434
+
435
+ move();
436
+
437
+ }, dragStart, dragStop);
438
+
439
+ if (!!initialColor) {
440
+ set(initialColor);
441
+
442
+ // In case color was black - update the preview UI and set the format
443
+ // since the set function will not run (default color is black).
444
+ updateUI();
445
+ currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format;
446
+
447
+ addColorToSelectionPalette(initialColor);
448
+ }
449
+ else {
450
+ updateUI();
451
+ }
452
+
453
+ if (flat) {
454
+ show();
455
+ }
456
+
457
+ function paletteElementClick(e) {
458
+ if (e.data && e.data.ignore) {
459
+ set($(e.target).closest(".sp-thumb-el").data("color"));
460
+ move();
461
+ }
462
+ else {
463
+ set($(e.target).closest(".sp-thumb-el").data("color"));
464
+ move();
465
+ updateOriginalInput(true);
466
+ if (opts.hideAfterPaletteSelect) {
467
+ hide();
468
+ }
469
+ }
470
+
471
+ return false;
472
+ }
473
+
474
+ var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
475
+ paletteContainer.delegate(".sp-thumb-el", paletteEvent, paletteElementClick);
476
+ initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, paletteElementClick);
477
+ }
478
+
479
+ function updateSelectionPaletteFromStorage() {
480
+
481
+ if (localStorageKey && window.localStorage) {
482
+
483
+ // Migrate old palettes over to new format. May want to remove this eventually.
484
+ try {
485
+ var oldPalette = window.localStorage[localStorageKey].split(",#");
486
+ if (oldPalette.length > 1) {
487
+ delete window.localStorage[localStorageKey];
488
+ $.each(oldPalette, function(i, c) {
489
+ addColorToSelectionPalette(c);
490
+ });
491
+ }
492
+ }
493
+ catch(e) { }
494
+
495
+ try {
496
+ selectionPalette = window.localStorage[localStorageKey].split(";");
497
+ }
498
+ catch (e) { }
499
+ }
500
+ }
501
+
502
+ function addColorToSelectionPalette(color) {
503
+ if (showSelectionPalette) {
504
+ var rgb = tinycolor(color).toRgbString();
505
+ if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {
506
+ selectionPalette.push(rgb);
507
+ while(selectionPalette.length > maxSelectionSize) {
508
+ selectionPalette.shift();
509
+ }
510
+ }
511
+
512
+ if (localStorageKey && window.localStorage) {
513
+ try {
514
+ window.localStorage[localStorageKey] = selectionPalette.join(";");
515
+ }
516
+ catch(e) { }
517
+ }
518
+ }
519
+ }
520
+
521
+ function getUniqueSelectionPalette() {
522
+ var unique = [];
523
+ if (opts.showPalette) {
524
+ for (var i = 0; i < selectionPalette.length; i++) {
525
+ var rgb = tinycolor(selectionPalette[i]).toRgbString();
526
+
527
+ if (!paletteLookup[rgb]) {
528
+ unique.push(selectionPalette[i]);
529
+ }
530
+ }
531
+ }
532
+
533
+ return unique.reverse().slice(0, opts.maxSelectionSize);
534
+ }
535
+
536
+ function drawPalette() {
537
+
538
+ var currentColor = get();
539
+
540
+ var html = $.map(paletteArray, function (palette, i) {
541
+ return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts);
542
+ });
543
+
544
+ updateSelectionPaletteFromStorage();
545
+
546
+ if (selectionPalette) {
547
+ html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts));
548
+ }
549
+
550
+ paletteContainer.html(html.join(""));
551
+ }
552
+
553
+ function drawInitial() {
554
+ if (opts.showInitial) {
555
+ var initial = colorOnShow;
556
+ var current = get();
557
+ initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts));
558
+ }
559
+ }
560
+
561
+ function dragStart() {
562
+ if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {
563
+ reflow();
564
+ }
565
+ isDragging = true;
566
+ container.addClass(draggingClass);
567
+ shiftMovementDirection = null;
568
+ boundElement.trigger('dragstart.spectrum', [ get() ]);
569
+ }
570
+
571
+ function dragStop() {
572
+ isDragging = false;
573
+ container.removeClass(draggingClass);
574
+ boundElement.trigger('dragstop.spectrum', [ get() ]);
575
+ }
576
+
577
+ function setFromTextInput() {
578
+
579
+ var value = textInput.val();
580
+
581
+ if ((value === null || value === "") && allowEmpty) {
582
+ set(null);
583
+ updateOriginalInput(true);
584
+ }
585
+ else {
586
+ var tiny = tinycolor(value);
587
+ if (tiny.isValid()) {
588
+ set(tiny);
589
+ updateOriginalInput(true);
590
+ }
591
+ else {
592
+ textInput.addClass("sp-validation-error");
593
+ }
594
+ }
595
+ }
596
+
597
+ function toggle() {
598
+ if (visible) {
599
+ hide();
600
+ }
601
+ else {
602
+ show();
603
+ }
604
+ }
605
+
606
+ function show() {
607
+ var event = $.Event('beforeShow.spectrum');
608
+
609
+ if (visible) {
610
+ reflow();
611
+ return;
612
+ }
613
+
614
+ boundElement.trigger(event, [ get() ]);
615
+
616
+ if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {
617
+ return;
618
+ }
619
+
620
+ hideAll();
621
+ visible = true;
622
+
623
+ $(doc).bind("keydown.spectrum", onkeydown);
624
+ $(doc).bind("click.spectrum", clickout);
625
+ $(window).bind("resize.spectrum", resize);
626
+ replacer.addClass("sp-active");
627
+ container.removeClass("sp-hidden");
628
+
629
+ reflow();
630
+ updateUI();
631
+
632
+ colorOnShow = get();
633
+
634
+ drawInitial();
635
+ callbacks.show(colorOnShow);
636
+ boundElement.trigger('show.spectrum', [ colorOnShow ]);
637
+ }
638
+
639
+ function onkeydown(e) {
640
+ // Close on ESC
641
+ if (e.keyCode === 27) {
642
+ hide();
643
+ }
644
+ }
645
+
646
+ function clickout(e) {
647
+ // Return on right click.
648
+ if (e.button == 2) { return; }
649
+
650
+ // If a drag event was happening during the mouseup, don't hide
651
+ // on click.
652
+ if (isDragging) { return; }
653
+
654
+ if (clickoutFiresChange) {
655
+ updateOriginalInput(true);
656
+ }
657
+ else {
658
+ revert();
659
+ }
660
+ hide();
661
+ }
662
+
663
+ function hide() {
664
+ // Return if hiding is unnecessary
665
+ if (!visible || flat) { return; }
666
+ visible = false;
667
+
668
+ $(doc).unbind("keydown.spectrum", onkeydown);
669
+ $(doc).unbind("click.spectrum", clickout);
670
+ $(window).unbind("resize.spectrum", resize);
671
+
672
+ replacer.removeClass("sp-active");
673
+ container.addClass("sp-hidden");
674
+
675
+ callbacks.hide(get());
676
+ boundElement.trigger('hide.spectrum', [ get() ]);
677
+ }
678
+
679
+ function revert() {
680
+ set(colorOnShow, true);
681
+ }
682
+
683
+ function set(color, ignoreFormatChange) {
684
+ if (tinycolor.equals(color, get())) {
685
+ // Update UI just in case a validation error needs
686
+ // to be cleared.
687
+ updateUI();
688
+ return;
689
+ }
690
+
691
+ var newColor, newHsv;
692
+ if (!color && allowEmpty) {
693
+ isEmpty = true;
694
+ } else {
695
+ isEmpty = false;
696
+ newColor = tinycolor(color);
697
+ newHsv = newColor.toHsv();
698
+
699
+ currentHue = (newHsv.h % 360) / 360;
700
+ currentSaturation = newHsv.s;
701
+ currentValue = newHsv.v;
702
+ currentAlpha = newHsv.a;
703
+ }
704
+ updateUI();
705
+
706
+ if (newColor && newColor.isValid() && !ignoreFormatChange) {
707
+ currentPreferredFormat = opts.preferredFormat || newColor.getFormat();
708
+ }
709
+ }
710
+
711
+ function get(opts) {
712
+ opts = opts || { };
713
+
714
+ if (allowEmpty && isEmpty) {
715
+ return null;
716
+ }
717
+
718
+ return tinycolor.fromRatio({
719
+ h: currentHue,
720
+ s: currentSaturation,
721
+ v: currentValue,
722
+ a: Math.round(currentAlpha * 100) / 100
723
+ }, { format: opts.format || currentPreferredFormat });
724
+ }
725
+
726
+ function isValid() {
727
+ return !textInput.hasClass("sp-validation-error");
728
+ }
729
+
730
+ function move() {
731
+ updateUI();
732
+
733
+ callbacks.move(get());
734
+ boundElement.trigger('move.spectrum', [ get() ]);
735
+ }
736
+
737
+ function updateUI() {
738
+
739
+ textInput.removeClass("sp-validation-error");
740
+
741
+ updateHelperLocations();
742
+
743
+ // Update dragger background color (gradients take care of saturation and value).
744
+ var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });
745
+ dragger.css("background-color", flatColor.toHexString());
746
+
747
+ // Get a format that alpha will be included in (hex and names ignore alpha)
748
+ var format = currentPreferredFormat;
749
+ if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) {
750
+ if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") {
751
+ format = "rgb";
752
+ }
753
+ }
754
+
755
+ var realColor = get({ format: format }),
756
+ displayColor = '';
757
+
758
+ //reset background info for preview element
759
+ previewElement.removeClass("sp-clear-display");
760
+ previewElement.css('background-color', 'transparent');
761
+
762
+ if (!realColor && allowEmpty) {
763
+ // Update the replaced elements background with icon indicating no color selection
764
+ previewElement.addClass("sp-clear-display");
765
+ }
766
+ else {
767
+ var realHex = realColor.toHexString(),
768
+ realRgb = realColor.toRgbString();
769
+
770
+ // Update the replaced elements background color (with actual selected color)
771
+ if (rgbaSupport || realColor.alpha === 1) {
772
+ previewElement.css("background-color", realRgb);
773
+ }
774
+ else {
775
+ previewElement.css("background-color", "transparent");
776
+ previewElement.css("filter", realColor.toFilter());
777
+ }
778
+
779
+ if (opts.showAlpha) {
780
+ var rgb = realColor.toRgb();
781
+ rgb.a = 0;
782
+ var realAlpha = tinycolor(rgb).toRgbString();
783
+ var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
784
+
785
+ if (IE) {
786
+ alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
787
+ }
788
+ else {
789
+ alphaSliderInner.css("background", "-webkit-" + gradient);
790
+ alphaSliderInner.css("background", "-moz-" + gradient);
791
+ alphaSliderInner.css("background", "-ms-" + gradient);
792
+ // Use current syntax gradient on unprefixed property.
793
+ alphaSliderInner.css("background",
794
+ "linear-gradient(to right, " + realAlpha + ", " + realHex + ")");
795
+ }
796
+ }
797
+
798
+ displayColor = realColor.toString(format);
799
+ }
800
+
801
+ // Update the text entry input as it changes happen
802
+ if (opts.showInput) {
803
+ textInput.val(displayColor);
804
+ }
805
+
806
+ if (opts.showPalette) {
807
+ drawPalette();
808
+ }
809
+
810
+ drawInitial();
811
+ }
812
+
813
+ function updateHelperLocations() {
814
+ var s = currentSaturation;
815
+ var v = currentValue;
816
+
817
+ if(allowEmpty && isEmpty) {
818
+ //if selected color is empty, hide the helpers
819
+ alphaSlideHelper.hide();
820
+ slideHelper.hide();
821
+ dragHelper.hide();
822
+ }
823
+ else {
824
+ //make sure helpers are visible
825
+ alphaSlideHelper.show();
826
+ slideHelper.show();
827
+ dragHelper.show();
828
+
829
+ // Where to show the little circle in that displays your current selected color
830
+ var dragX = s * dragWidth;
831
+ var dragY = dragHeight - (v * dragHeight);
832
+ dragX = Math.max(
833
+ -dragHelperHeight,
834
+ Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
835
+ );
836
+ dragY = Math.max(
837
+ -dragHelperHeight,
838
+ Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
839
+ );
840
+ dragHelper.css({
841
+ "top": dragY + "px",
842
+ "left": dragX + "px"
843
+ });
844
+
845
+ var alphaX = currentAlpha * alphaWidth;
846
+ alphaSlideHelper.css({
847
+ "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px"
848
+ });
849
+
850
+ // Where to show the bar that displays your current selected hue
851
+ var slideY = (currentHue) * slideHeight;
852
+ slideHelper.css({
853
+ "top": (slideY - slideHelperHeight) + "px"
854
+ });
855
+ }
856
+ }
857
+
858
+ function updateOriginalInput(fireCallback) {
859
+ var color = get(),
860
+ displayColor = '',
861
+ hasChanged = !tinycolor.equals(color, colorOnShow);
862
+
863
+ if (color) {
864
+ displayColor = color.toString(currentPreferredFormat);
865
+ // Update the selection palette with the current color
866
+ addColorToSelectionPalette(color);
867
+ }
868
+
869
+ if (isInput) {
870
+ boundElement.val(displayColor);
871
+ }
872
+
873
+ if (fireCallback && hasChanged) {
874
+ callbacks.change(color);
875
+ boundElement.trigger('change', [ color ]);
876
+ }
877
+ }
878
+
879
+ function reflow() {
880
+ if (!visible) {
881
+ return; // Calculations would be useless and wouldn't be reliable anyways
882
+ }
883
+ dragWidth = dragger.width();
884
+ dragHeight = dragger.height();
885
+ dragHelperHeight = dragHelper.height();
886
+ slideWidth = slider.width();
887
+ slideHeight = slider.height();
888
+ slideHelperHeight = slideHelper.height();
889
+ alphaWidth = alphaSlider.width();
890
+ alphaSlideHelperWidth = alphaSlideHelper.width();
891
+
892
+ if (!flat) {
893
+ container.css("position", "absolute");
894
+ if (opts.offset) {
895
+ container.offset(opts.offset);
896
+ } else {
897
+ container.offset(getOffset(container, offsetElement));
898
+ }
899
+ }
900
+
901
+ updateHelperLocations();
902
+
903
+ if (opts.showPalette) {
904
+ drawPalette();
905
+ }
906
+
907
+ boundElement.trigger('reflow.spectrum');
908
+ }
909
+
910
+ function destroy() {
911
+ boundElement.show();
912
+ offsetElement.unbind("click.spectrum touchstart.spectrum");
913
+ container.remove();
914
+ replacer.remove();
915
+ spectrums[spect.id] = null;
916
+ }
917
+
918
+ function option(optionName, optionValue) {
919
+ if (optionName === undefined) {
920
+ return $.extend({}, opts);
921
+ }
922
+ if (optionValue === undefined) {
923
+ return opts[optionName];
924
+ }
925
+
926
+ opts[optionName] = optionValue;
927
+
928
+ if (optionName === "preferredFormat") {
929
+ currentPreferredFormat = opts.preferredFormat;
930
+ }
931
+ applyOptions();
932
+ }
933
+
934
+ function enable() {
935
+ disabled = false;
936
+ boundElement.attr("disabled", false);
937
+ offsetElement.removeClass("sp-disabled");
938
+ }
939
+
940
+ function disable() {
941
+ hide();
942
+ disabled = true;
943
+ boundElement.attr("disabled", true);
944
+ offsetElement.addClass("sp-disabled");
945
+ }
946
+
947
+ function setOffset(coord) {
948
+ opts.offset = coord;
949
+ reflow();
950
+ }
951
+
952
+ initialize();
953
+
954
+ var spect = {
955
+ show: show,
956
+ hide: hide,
957
+ toggle: toggle,
958
+ reflow: reflow,
959
+ option: option,
960
+ enable: enable,
961
+ disable: disable,
962
+ offset: setOffset,
963
+ set: function (c) {
964
+ set(c);
965
+ updateOriginalInput();
966
+ },
967
+ get: get,
968
+ destroy: destroy,
969
+ container: container
970
+ };
971
+
972
+ spect.id = spectrums.push(spect) - 1;
973
+
974
+ return spect;
975
+ }
976
+
977
+ /**
978
+ * checkOffset - get the offset below/above and left/right element depending on screen position
979
+ * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
980
+ */
981
+ function getOffset(picker, input) {
982
+ var extraY = 0;
983
+ var dpWidth = picker.outerWidth();
984
+ var dpHeight = picker.outerHeight();
985
+ var inputHeight = input.outerHeight();
986
+ var doc = picker[0].ownerDocument;
987
+ var docElem = doc.documentElement;
988
+ var viewWidth = docElem.clientWidth + $(doc).scrollLeft();
989
+ var viewHeight = docElem.clientHeight + $(doc).scrollTop();
990
+ var offset = input.offset();
991
+ offset.top += inputHeight;
992
+
993
+ offset.left -=
994
+ Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
995
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
996
+
997
+ offset.top -=
998
+ Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
999
+ Math.abs(dpHeight + inputHeight - extraY) : extraY));
1000
+
1001
+ return offset;
1002
+ }
1003
+
1004
+ /**
1005
+ * noop - do nothing
1006
+ */
1007
+ function noop() {
1008
+
1009
+ }
1010
+
1011
+ /**
1012
+ * stopPropagation - makes the code only doing this a little easier to read in line
1013
+ */
1014
+ function stopPropagation(e) {
1015
+ e.stopPropagation();
1016
+ }
1017
+
1018
+ /**
1019
+ * Create a function bound to a given object
1020
+ * Thanks to underscore.js
1021
+ */
1022
+ function bind(func, obj) {
1023
+ var slice = Array.prototype.slice;
1024
+ var args = slice.call(arguments, 2);
1025
+ return function () {
1026
+ return func.apply(obj, args.concat(slice.call(arguments)));
1027
+ };
1028
+ }
1029
+
1030
+ /**
1031
+ * Lightweight drag helper. Handles containment within the element, so that
1032
+ * when dragging, the x is within [0,element.width] and y is within [0,element.height]
1033
+ */
1034
+ function draggable(element, onmove, onstart, onstop) {
1035
+ onmove = onmove || function () { };
1036
+ onstart = onstart || function () { };
1037
+ onstop = onstop || function () { };
1038
+ var doc = document;
1039
+ var dragging = false;
1040
+ var offset = {};
1041
+ var maxHeight = 0;
1042
+ var maxWidth = 0;
1043
+ var hasTouch = ('ontouchstart' in window);
1044
+
1045
+ var duringDragEvents = {};
1046
+ duringDragEvents["selectstart"] = prevent;
1047
+ duringDragEvents["dragstart"] = prevent;
1048
+ duringDragEvents["touchmove mousemove"] = move;
1049
+ duringDragEvents["touchend mouseup"] = stop;
1050
+
1051
+ function prevent(e) {
1052
+ if (e.stopPropagation) {
1053
+ e.stopPropagation();
1054
+ }
1055
+ if (e.preventDefault) {
1056
+ e.preventDefault();
1057
+ }
1058
+ e.returnValue = false;
1059
+ }
1060
+
1061
+ function move(e) {
1062
+ if (dragging) {
1063
+ // Mouseup happened outside of window
1064
+ if (IE && doc.documentMode < 9 && !e.button) {
1065
+ return stop();
1066
+ }
1067
+
1068
+ var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
1069
+ var pageX = t0 && t0.pageX || e.pageX;
1070
+ var pageY = t0 && t0.pageY || e.pageY;
1071
+
1072
+ var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));
1073
+ var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));
1074
+
1075
+ if (hasTouch) {
1076
+ // Stop scrolling in iOS
1077
+ prevent(e);
1078
+ }
1079
+
1080
+ onmove.apply(element, [dragX, dragY, e]);
1081
+ }
1082
+ }
1083
+
1084
+ function start(e) {
1085
+ var rightclick = (e.which) ? (e.which == 3) : (e.button == 2);
1086
+
1087
+ if (!rightclick && !dragging) {
1088
+ if (onstart.apply(element, arguments) !== false) {
1089
+ dragging = true;
1090
+ maxHeight = $(element).height();
1091
+ maxWidth = $(element).width();
1092
+ offset = $(element).offset();
1093
+
1094
+ $(doc).bind(duringDragEvents);
1095
+ $(doc.body).addClass("sp-dragging");
1096
+
1097
+ move(e);
1098
+
1099
+ prevent(e);
1100
+ }
1101
+ }
1102
+ }
1103
+
1104
+ function stop() {
1105
+ if (dragging) {
1106
+ $(doc).unbind(duringDragEvents);
1107
+ $(doc.body).removeClass("sp-dragging");
1108
+
1109
+ // Wait a tick before notifying observers to allow the click event
1110
+ // to fire in Chrome.
1111
+ setTimeout(function() {
1112
+ onstop.apply(element, arguments);
1113
+ }, 0);
1114
+ }
1115
+ dragging = false;
1116
+ }
1117
+
1118
+ $(element).bind("touchstart mousedown", start);
1119
+ }
1120
+
1121
+ function throttle(func, wait, debounce) {
1122
+ var timeout;
1123
+ return function () {
1124
+ var context = this, args = arguments;
1125
+ var throttler = function () {
1126
+ timeout = null;
1127
+ func.apply(context, args);
1128
+ };
1129
+ if (debounce) clearTimeout(timeout);
1130
+ if (debounce || !timeout) timeout = setTimeout(throttler, wait);
1131
+ };
1132
+ }
1133
+
1134
+ function inputTypeColorSupport() {
1135
+ return $.fn.spectrum.inputTypeColorSupport();
1136
+ }
1137
+
1138
+ /**
1139
+ * Define a jQuery plugin
1140
+ */
1141
+ var dataID = "spectrum.id";
1142
+ $.fn.spectrum = function (opts, extra) {
1143
+
1144
+ if (typeof opts == "string") {
1145
+
1146
+ var returnValue = this;
1147
+ var args = Array.prototype.slice.call( arguments, 1 );
1148
+
1149
+ this.each(function () {
1150
+ var spect = spectrums[$(this).data(dataID)];
1151
+ if (spect) {
1152
+ var method = spect[opts];
1153
+ if (!method) {
1154
+ throw new Error( "Spectrum: no such method: '" + opts + "'" );
1155
+ }
1156
+
1157
+ if (opts == "get") {
1158
+ returnValue = spect.get();
1159
+ }
1160
+ else if (opts == "container") {
1161
+ returnValue = spect.container;
1162
+ }
1163
+ else if (opts == "option") {
1164
+ returnValue = spect.option.apply(spect, args);
1165
+ }
1166
+ else if (opts == "destroy") {
1167
+ spect.destroy();
1168
+ $(this).removeData(dataID);
1169
+ }
1170
+ else {
1171
+ method.apply(spect, args);
1172
+ }
1173
+ }
1174
+ });
1175
+
1176
+ return returnValue;
1177
+ }
1178
+
1179
+ // Initializing a new instance of spectrum
1180
+ return this.spectrum("destroy").each(function () {
1181
+ var options = $.extend({}, opts, $(this).data());
1182
+ var spect = spectrum(this, options);
1183
+ $(this).data(dataID, spect.id);
1184
+ });
1185
+ };
1186
+
1187
+ $.fn.spectrum.load = true;
1188
+ $.fn.spectrum.loadOpts = {};
1189
+ $.fn.spectrum.draggable = draggable;
1190
+ $.fn.spectrum.defaults = defaultOpts;
1191
+ $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {
1192
+ if (typeof inputTypeColorSupport._cachedResult === "undefined") {
1193
+ var colorInput = $("<input type='color'/>")[0]; // if color element is supported, value will default to not null
1194
+ inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== "";
1195
+ }
1196
+ return inputTypeColorSupport._cachedResult;
1197
+ };
1198
+
1199
+ $.spectrum = { };
1200
+ $.spectrum.localization = { };
1201
+ $.spectrum.palettes = { };
1202
+
1203
+ $.fn.spectrum.processNativeColorInputs = function () {
1204
+ var colorInputs = $("input[type=color]");
1205
+ if (colorInputs.length && !inputTypeColorSupport()) {
1206
+ colorInputs.spectrum({
1207
+ preferredFormat: "hex6"
1208
+ });
1209
+ }
1210
+ };
1211
+
1212
+ // TinyColor v1.1.2
1213
+ // https://github.com/bgrins/TinyColor
1214
+ // Brian Grinstead, MIT License
1215
+
1216
+ (function() {
1217
+
1218
+ var trimLeft = /^[\s,#]+/,
1219
+ trimRight = /\s+$/,
1220
+ tinyCounter = 0,
1221
+ math = Math,
1222
+ mathRound = math.round,
1223
+ mathMin = math.min,
1224
+ mathMax = math.max,
1225
+ mathRandom = math.random;
1226
+
1227
+ var tinycolor = function(color, opts) {
1228
+
1229
+ color = (color) ? color : '';
1230
+ opts = opts || { };
1231
+
1232
+ // If input is already a tinycolor, return itself
1233
+ if (color instanceof tinycolor) {
1234
+ return color;
1235
+ }
1236
+ // If we are called as a function, call using new instead
1237
+ if (!(this instanceof tinycolor)) {
1238
+ return new tinycolor(color, opts);
1239
+ }
1240
+
1241
+ var rgb = inputToRGB(color);
1242
+ this._originalInput = color,
1243
+ this._r = rgb.r,
1244
+ this._g = rgb.g,
1245
+ this._b = rgb.b,
1246
+ this._a = rgb.a,
1247
+ this._roundA = mathRound(100*this._a) / 100,
1248
+ this._format = opts.format || rgb.format;
1249
+ this._gradientType = opts.gradientType;
1250
+
1251
+ // Don't let the range of [0,255] come back in [0,1].
1252
+ // Potentially lose a little bit of precision here, but will fix issues where
1253
+ // .5 gets interpreted as half of the total, instead of half of 1
1254
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
1255
+ if (this._r < 1) { this._r = mathRound(this._r); }
1256
+ if (this._g < 1) { this._g = mathRound(this._g); }
1257
+ if (this._b < 1) { this._b = mathRound(this._b); }
1258
+
1259
+ this._ok = rgb.ok;
1260
+ this._tc_id = tinyCounter++;
1261
+ };
1262
+
1263
+ tinycolor.prototype = {
1264
+ isDark: function() {
1265
+ return this.getBrightness() < 128;
1266
+ },
1267
+ isLight: function() {
1268
+ return !this.isDark();
1269
+ },
1270
+ isValid: function() {
1271
+ return this._ok;
1272
+ },
1273
+ getOriginalInput: function() {
1274
+ return this._originalInput;
1275
+ },
1276
+ getFormat: function() {
1277
+ return this._format;
1278
+ },
1279
+ getAlpha: function() {
1280
+ return this._a;
1281
+ },
1282
+ getBrightness: function() {
1283
+ var rgb = this.toRgb();
1284
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
1285
+ },
1286
+ setAlpha: function(value) {
1287
+ this._a = boundAlpha(value);
1288
+ this._roundA = mathRound(100*this._a) / 100;
1289
+ return this;
1290
+ },
1291
+ toHsv: function() {
1292
+ var hsv = rgbToHsv(this._r, this._g, this._b);
1293
+ return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
1294
+ },
1295
+ toHsvString: function() {
1296
+ var hsv = rgbToHsv(this._r, this._g, this._b);
1297
+ var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
1298
+ return (this._a == 1) ?
1299
+ "hsv(" + h + ", " + s + "%, " + v + "%)" :
1300
+ "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
1301
+ },
1302
+ toHsl: function() {
1303
+ var hsl = rgbToHsl(this._r, this._g, this._b);
1304
+ return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
1305
+ },
1306
+ toHslString: function() {
1307
+ var hsl = rgbToHsl(this._r, this._g, this._b);
1308
+ var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
1309
+ return (this._a == 1) ?
1310
+ "hsl(" + h + ", " + s + "%, " + l + "%)" :
1311
+ "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
1312
+ },
1313
+ toHex: function(allow3Char) {
1314
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
1315
+ },
1316
+ toHexString: function(allow3Char) {
1317
+ return '#' + this.toHex(allow3Char);
1318
+ },
1319
+ toHex8: function() {
1320
+ return rgbaToHex(this._r, this._g, this._b, this._a);
1321
+ },
1322
+ toHex8String: function() {
1323
+ return '#' + this.toHex8();
1324
+ },
1325
+ toRgb: function() {
1326
+ return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
1327
+ },
1328
+ toRgbString: function() {
1329
+ return (this._a == 1) ?
1330
+ "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
1331
+ "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
1332
+ },
1333
+ toPercentageRgb: function() {
1334
+ return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
1335
+ },
1336
+ toPercentageRgbString: function() {
1337
+ return (this._a == 1) ?
1338
+ "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
1339
+ "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
1340
+ },
1341
+ toName: function() {
1342
+ if (this._a === 0) {
1343
+ return "transparent";
1344
+ }
1345
+
1346
+ if (this._a < 1) {
1347
+ return false;
1348
+ }
1349
+
1350
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
1351
+ },
1352
+ toFilter: function(secondColor) {
1353
+ var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
1354
+ var secondHex8String = hex8String;
1355
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
1356
+
1357
+ if (secondColor) {
1358
+ var s = tinycolor(secondColor);
1359
+ secondHex8String = s.toHex8String();
1360
+ }
1361
+
1362
+ return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
1363
+ },
1364
+ toString: function(format) {
1365
+ var formatSet = !!format;
1366
+ format = format || this._format;
1367
+
1368
+ var formattedString = false;
1369
+ var hasAlpha = this._a < 1 && this._a >= 0;
1370
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");
1371
+
1372
+ if (needsAlphaFormat) {
1373
+ // Special case for "transparent", all other non-alpha formats
1374
+ // will return rgba when there is transparency.
1375
+ if (format === "name" && this._a === 0) {
1376
+ return this.toName();
1377
+ }
1378
+ return this.toRgbString();
1379
+ }
1380
+ if (format === "rgb") {
1381
+ formattedString = this.toRgbString();
1382
+ }
1383
+ if (format === "prgb") {
1384
+ formattedString = this.toPercentageRgbString();
1385
+ }
1386
+ if (format === "hex" || format === "hex6") {
1387
+ formattedString = this.toHexString();
1388
+ }
1389
+ if (format === "hex3") {
1390
+ formattedString = this.toHexString(true);
1391
+ }
1392
+ if (format === "hex8") {
1393
+ formattedString = this.toHex8String();
1394
+ }
1395
+ if (format === "name") {
1396
+ formattedString = this.toName();
1397
+ }
1398
+ if (format === "hsl") {
1399
+ formattedString = this.toHslString();
1400
+ }
1401
+ if (format === "hsv") {
1402
+ formattedString = this.toHsvString();
1403
+ }
1404
+
1405
+ return formattedString || this.toHexString();
1406
+ },
1407
+
1408
+ _applyModification: function(fn, args) {
1409
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
1410
+ this._r = color._r;
1411
+ this._g = color._g;
1412
+ this._b = color._b;
1413
+ this.setAlpha(color._a);
1414
+ return this;
1415
+ },
1416
+ lighten: function() {
1417
+ return this._applyModification(lighten, arguments);
1418
+ },
1419
+ brighten: function() {
1420
+ return this._applyModification(brighten, arguments);
1421
+ },
1422
+ darken: function() {
1423
+ return this._applyModification(darken, arguments);
1424
+ },
1425
+ desaturate: function() {
1426
+ return this._applyModification(desaturate, arguments);
1427
+ },
1428
+ saturate: function() {
1429
+ return this._applyModification(saturate, arguments);
1430
+ },
1431
+ greyscale: function() {
1432
+ return this._applyModification(greyscale, arguments);
1433
+ },
1434
+ spin: function() {
1435
+ return this._applyModification(spin, arguments);
1436
+ },
1437
+
1438
+ _applyCombination: function(fn, args) {
1439
+ return fn.apply(null, [this].concat([].slice.call(args)));
1440
+ },
1441
+ analogous: function() {
1442
+ return this._applyCombination(analogous, arguments);
1443
+ },
1444
+ complement: function() {
1445
+ return this._applyCombination(complement, arguments);
1446
+ },
1447
+ monochromatic: function() {
1448
+ return this._applyCombination(monochromatic, arguments);
1449
+ },
1450
+ splitcomplement: function() {
1451
+ return this._applyCombination(splitcomplement, arguments);
1452
+ },
1453
+ triad: function() {
1454
+ return this._applyCombination(triad, arguments);
1455
+ },
1456
+ tetrad: function() {
1457
+ return this._applyCombination(tetrad, arguments);
1458
+ }
1459
+ };
1460
+
1461
+ // If input is an object, force 1 into "1.0" to handle ratios properly
1462
+ // String input requires "1.0" as input, so 1 will be treated as 1
1463
+ tinycolor.fromRatio = function(color, opts) {
1464
+ if (typeof color == "object") {
1465
+ var newColor = {};
1466
+ for (var i in color) {
1467
+ if (color.hasOwnProperty(i)) {
1468
+ if (i === "a") {
1469
+ newColor[i] = color[i];
1470
+ }
1471
+ else {
1472
+ newColor[i] = convertToPercentage(color[i]);
1473
+ }
1474
+ }
1475
+ }
1476
+ color = newColor;
1477
+ }
1478
+
1479
+ return tinycolor(color, opts);
1480
+ };
1481
+
1482
+ // Given a string or object, convert that input to RGB
1483
+ // Possible string inputs:
1484
+ //
1485
+ // "red"
1486
+ // "#f00" or "f00"
1487
+ // "#ff0000" or "ff0000"
1488
+ // "#ff000000" or "ff000000"
1489
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
1490
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
1491
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
1492
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
1493
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
1494
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
1495
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
1496
+ //
1497
+ function inputToRGB(color) {
1498
+
1499
+ var rgb = { r: 0, g: 0, b: 0 };
1500
+ var a = 1;
1501
+ var ok = false;
1502
+ var format = false;
1503
+
1504
+ if (typeof color == "string") {
1505
+ color = stringInputToObject(color);
1506
+ }
1507
+
1508
+ if (typeof color == "object") {
1509
+ if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
1510
+ rgb = rgbToRgb(color.r, color.g, color.b);
1511
+ ok = true;
1512
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
1513
+ }
1514
+ else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
1515
+ color.s = convertToPercentage(color.s);
1516
+ color.v = convertToPercentage(color.v);
1517
+ rgb = hsvToRgb(color.h, color.s, color.v);
1518
+ ok = true;
1519
+ format = "hsv";
1520
+ }
1521
+ else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
1522
+ color.s = convertToPercentage(color.s);
1523
+ color.l = convertToPercentage(color.l);
1524
+ rgb = hslToRgb(color.h, color.s, color.l);
1525
+ ok = true;
1526
+ format = "hsl";
1527
+ }
1528
+
1529
+ if (color.hasOwnProperty("a")) {
1530
+ a = color.a;
1531
+ }
1532
+ }
1533
+
1534
+ a = boundAlpha(a);
1535
+
1536
+ return {
1537
+ ok: ok,
1538
+ format: color.format || format,
1539
+ r: mathMin(255, mathMax(rgb.r, 0)),
1540
+ g: mathMin(255, mathMax(rgb.g, 0)),
1541
+ b: mathMin(255, mathMax(rgb.b, 0)),
1542
+ a: a
1543
+ };
1544
+ }
1545
+
1546
+
1547
+ // Conversion Functions
1548
+ // --------------------
1549
+
1550
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
1551
+ // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
1552
+
1553
+ // `rgbToRgb`
1554
+ // Handle bounds / percentage checking to conform to CSS color spec
1555
+ // <http://www.w3.org/TR/css3-color/>
1556
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
1557
+ // *Returns:* { r, g, b } in [0, 255]
1558
+ function rgbToRgb(r, g, b){
1559
+ return {
1560
+ r: bound01(r, 255) * 255,
1561
+ g: bound01(g, 255) * 255,
1562
+ b: bound01(b, 255) * 255
1563
+ };
1564
+ }
1565
+
1566
+ // `rgbToHsl`
1567
+ // Converts an RGB color value to HSL.
1568
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
1569
+ // *Returns:* { h, s, l } in [0,1]
1570
+ function rgbToHsl(r, g, b) {
1571
+
1572
+ r = bound01(r, 255);
1573
+ g = bound01(g, 255);
1574
+ b = bound01(b, 255);
1575
+
1576
+ var max = mathMax(r, g, b), min = mathMin(r, g, b);
1577
+ var h, s, l = (max + min) / 2;
1578
+
1579
+ if(max == min) {
1580
+ h = s = 0; // achromatic
1581
+ }
1582
+ else {
1583
+ var d = max - min;
1584
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
1585
+ switch(max) {
1586
+ case r: h = (g - b) / d + (g < b ? 6 : 0); break;
1587
+ case g: h = (b - r) / d + 2; break;
1588
+ case b: h = (r - g) / d + 4; break;
1589
+ }
1590
+
1591
+ h /= 6;
1592
+ }
1593
+
1594
+ return { h: h, s: s, l: l };
1595
+ }
1596
+
1597
+ // `hslToRgb`
1598
+ // Converts an HSL color value to RGB.
1599
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
1600
+ // *Returns:* { r, g, b } in the set [0, 255]
1601
+ function hslToRgb(h, s, l) {
1602
+ var r, g, b;
1603
+
1604
+ h = bound01(h, 360);
1605
+ s = bound01(s, 100);
1606
+ l = bound01(l, 100);
1607
+
1608
+ function hue2rgb(p, q, t) {
1609
+ if(t < 0) t += 1;
1610
+ if(t > 1) t -= 1;
1611
+ if(t < 1/6) return p + (q - p) * 6 * t;
1612
+ if(t < 1/2) return q;
1613
+ if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
1614
+ return p;
1615
+ }
1616
+
1617
+ if(s === 0) {
1618
+ r = g = b = l; // achromatic
1619
+ }
1620
+ else {
1621
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
1622
+ var p = 2 * l - q;
1623
+ r = hue2rgb(p, q, h + 1/3);
1624
+ g = hue2rgb(p, q, h);
1625
+ b = hue2rgb(p, q, h - 1/3);
1626
+ }
1627
+
1628
+ return { r: r * 255, g: g * 255, b: b * 255 };
1629
+ }
1630
+
1631
+ // `rgbToHsv`
1632
+ // Converts an RGB color value to HSV
1633
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
1634
+ // *Returns:* { h, s, v } in [0,1]
1635
+ function rgbToHsv(r, g, b) {
1636
+
1637
+ r = bound01(r, 255);
1638
+ g = bound01(g, 255);
1639
+ b = bound01(b, 255);
1640
+
1641
+ var max = mathMax(r, g, b), min = mathMin(r, g, b);
1642
+ var h, s, v = max;
1643
+
1644
+ var d = max - min;
1645
+ s = max === 0 ? 0 : d / max;
1646
+
1647
+ if(max == min) {
1648
+ h = 0; // achromatic
1649
+ }
1650
+ else {
1651
+ switch(max) {
1652
+ case r: h = (g - b) / d + (g < b ? 6 : 0); break;
1653
+ case g: h = (b - r) / d + 2; break;
1654
+ case b: h = (r - g) / d + 4; break;
1655
+ }
1656
+ h /= 6;
1657
+ }
1658
+ return { h: h, s: s, v: v };
1659
+ }
1660
+
1661
+ // `hsvToRgb`
1662
+ // Converts an HSV color value to RGB.
1663
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
1664
+ // *Returns:* { r, g, b } in the set [0, 255]
1665
+ function hsvToRgb(h, s, v) {
1666
+
1667
+ h = bound01(h, 360) * 6;
1668
+ s = bound01(s, 100);
1669
+ v = bound01(v, 100);
1670
+
1671
+ var i = math.floor(h),
1672
+ f = h - i,
1673
+ p = v * (1 - s),
1674
+ q = v * (1 - f * s),
1675
+ t = v * (1 - (1 - f) * s),
1676
+ mod = i % 6,
1677
+ r = [v, q, p, p, t, v][mod],
1678
+ g = [t, v, v, q, p, p][mod],
1679
+ b = [p, p, t, v, v, q][mod];
1680
+
1681
+ return { r: r * 255, g: g * 255, b: b * 255 };
1682
+ }
1683
+
1684
+ // `rgbToHex`
1685
+ // Converts an RGB color to hex
1686
+ // Assumes r, g, and b are contained in the set [0, 255]
1687
+ // Returns a 3 or 6 character hex
1688
+ function rgbToHex(r, g, b, allow3Char) {
1689
+
1690
+ var hex = [
1691
+ pad2(mathRound(r).toString(16)),
1692
+ pad2(mathRound(g).toString(16)),
1693
+ pad2(mathRound(b).toString(16))
1694
+ ];
1695
+
1696
+ // Return a 3 character hex if possible
1697
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
1698
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
1699
+ }
1700
+
1701
+ return hex.join("");
1702
+ }
1703
+ // `rgbaToHex`
1704
+ // Converts an RGBA color plus alpha transparency to hex
1705
+ // Assumes r, g, b and a are contained in the set [0, 255]
1706
+ // Returns an 8 character hex
1707
+ function rgbaToHex(r, g, b, a) {
1708
+
1709
+ var hex = [
1710
+ pad2(convertDecimalToHex(a)),
1711
+ pad2(mathRound(r).toString(16)),
1712
+ pad2(mathRound(g).toString(16)),
1713
+ pad2(mathRound(b).toString(16))
1714
+ ];
1715
+
1716
+ return hex.join("");
1717
+ }
1718
+
1719
+ // `equals`
1720
+ // Can be called with any tinycolor input
1721
+ tinycolor.equals = function (color1, color2) {
1722
+ if (!color1 || !color2) { return false; }
1723
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
1724
+ };
1725
+ tinycolor.random = function() {
1726
+ return tinycolor.fromRatio({
1727
+ r: mathRandom(),
1728
+ g: mathRandom(),
1729
+ b: mathRandom()
1730
+ });
1731
+ };
1732
+
1733
+
1734
+ // Modification Functions
1735
+ // ----------------------
1736
+ // Thanks to less.js for some of the basics here
1737
+ // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
1738
+
1739
+ function desaturate(color, amount) {
1740
+ amount = (amount === 0) ? 0 : (amount || 10);
1741
+ var hsl = tinycolor(color).toHsl();
1742
+ hsl.s -= amount / 100;
1743
+ hsl.s = clamp01(hsl.s);
1744
+ return tinycolor(hsl);
1745
+ }
1746
+
1747
+ function saturate(color, amount) {
1748
+ amount = (amount === 0) ? 0 : (amount || 10);
1749
+ var hsl = tinycolor(color).toHsl();
1750
+ hsl.s += amount / 100;
1751
+ hsl.s = clamp01(hsl.s);
1752
+ return tinycolor(hsl);
1753
+ }
1754
+
1755
+ function greyscale(color) {
1756
+ return tinycolor(color).desaturate(100);
1757
+ }
1758
+
1759
+ function lighten (color, amount) {
1760
+ amount = (amount === 0) ? 0 : (amount || 10);
1761
+ var hsl = tinycolor(color).toHsl();
1762
+ hsl.l += amount / 100;
1763
+ hsl.l = clamp01(hsl.l);
1764
+ return tinycolor(hsl);
1765
+ }
1766
+
1767
+ function brighten(color, amount) {
1768
+ amount = (amount === 0) ? 0 : (amount || 10);
1769
+ var rgb = tinycolor(color).toRgb();
1770
+ rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
1771
+ rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
1772
+ rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
1773
+ return tinycolor(rgb);
1774
+ }
1775
+
1776
+ function darken (color, amount) {
1777
+ amount = (amount === 0) ? 0 : (amount || 10);
1778
+ var hsl = tinycolor(color).toHsl();
1779
+ hsl.l -= amount / 100;
1780
+ hsl.l = clamp01(hsl.l);
1781
+ return tinycolor(hsl);
1782
+ }
1783
+
1784
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
1785
+ // Values outside of this range will be wrapped into this range.
1786
+ function spin(color, amount) {
1787
+ var hsl = tinycolor(color).toHsl();
1788
+ var hue = (mathRound(hsl.h) + amount) % 360;
1789
+ hsl.h = hue < 0 ? 360 + hue : hue;
1790
+ return tinycolor(hsl);
1791
+ }
1792
+
1793
+ // Combination Functions
1794
+ // ---------------------
1795
+ // Thanks to jQuery xColor for some of the ideas behind these
1796
+ // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
1797
+
1798
+ function complement(color) {
1799
+ var hsl = tinycolor(color).toHsl();
1800
+ hsl.h = (hsl.h + 180) % 360;
1801
+ return tinycolor(hsl);
1802
+ }
1803
+
1804
+ function triad(color) {
1805
+ var hsl = tinycolor(color).toHsl();
1806
+ var h = hsl.h;
1807
+ return [
1808
+ tinycolor(color),
1809
+ tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
1810
+ tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
1811
+ ];
1812
+ }
1813
+
1814
+ function tetrad(color) {
1815
+ var hsl = tinycolor(color).toHsl();
1816
+ var h = hsl.h;
1817
+ return [
1818
+ tinycolor(color),
1819
+ tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
1820
+ tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
1821
+ tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
1822
+ ];
1823
+ }
1824
+
1825
+ function splitcomplement(color) {
1826
+ var hsl = tinycolor(color).toHsl();
1827
+ var h = hsl.h;
1828
+ return [
1829
+ tinycolor(color),
1830
+ tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
1831
+ tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
1832
+ ];
1833
+ }
1834
+
1835
+ function analogous(color, results, slices) {
1836
+ results = results || 6;
1837
+ slices = slices || 30;
1838
+
1839
+ var hsl = tinycolor(color).toHsl();
1840
+ var part = 360 / slices;
1841
+ var ret = [tinycolor(color)];
1842
+
1843
+ for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
1844
+ hsl.h = (hsl.h + part) % 360;
1845
+ ret.push(tinycolor(hsl));
1846
+ }
1847
+ return ret;
1848
+ }
1849
+
1850
+ function monochromatic(color, results) {
1851
+ results = results || 6;
1852
+ var hsv = tinycolor(color).toHsv();
1853
+ var h = hsv.h, s = hsv.s, v = hsv.v;
1854
+ var ret = [];
1855
+ var modification = 1 / results;
1856
+
1857
+ while (results--) {
1858
+ ret.push(tinycolor({ h: h, s: s, v: v}));
1859
+ v = (v + modification) % 1;
1860
+ }
1861
+
1862
+ return ret;
1863
+ }
1864
+
1865
+ // Utility Functions
1866
+ // ---------------------
1867
+
1868
+ tinycolor.mix = function(color1, color2, amount) {
1869
+ amount = (amount === 0) ? 0 : (amount || 50);
1870
+
1871
+ var rgb1 = tinycolor(color1).toRgb();
1872
+ var rgb2 = tinycolor(color2).toRgb();
1873
+
1874
+ var p = amount / 100;
1875
+ var w = p * 2 - 1;
1876
+ var a = rgb2.a - rgb1.a;
1877
+
1878
+ var w1;
1879
+
1880
+ if (w * a == -1) {
1881
+ w1 = w;
1882
+ } else {
1883
+ w1 = (w + a) / (1 + w * a);
1884
+ }
1885
+
1886
+ w1 = (w1 + 1) / 2;
1887
+
1888
+ var w2 = 1 - w1;
1889
+
1890
+ var rgba = {
1891
+ r: rgb2.r * w1 + rgb1.r * w2,
1892
+ g: rgb2.g * w1 + rgb1.g * w2,
1893
+ b: rgb2.b * w1 + rgb1.b * w2,
1894
+ a: rgb2.a * p + rgb1.a * (1 - p)
1895
+ };
1896
+
1897
+ return tinycolor(rgba);
1898
+ };
1899
+
1900
+
1901
+ // Readability Functions
1902
+ // ---------------------
1903
+ // <http://www.w3.org/TR/AERT#color-contrast>
1904
+
1905
+ // `readability`
1906
+ // Analyze the 2 colors and returns an object with the following properties:
1907
+ // `brightness`: difference in brightness between the two colors
1908
+ // `color`: difference in color/hue between the two colors
1909
+ tinycolor.readability = function(color1, color2) {
1910
+ var c1 = tinycolor(color1);
1911
+ var c2 = tinycolor(color2);
1912
+ var rgb1 = c1.toRgb();
1913
+ var rgb2 = c2.toRgb();
1914
+ var brightnessA = c1.getBrightness();
1915
+ var brightnessB = c2.getBrightness();
1916
+ var colorDiff = (
1917
+ Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) +
1918
+ Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) +
1919
+ Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b)
1920
+ );
1921
+
1922
+ return {
1923
+ brightness: Math.abs(brightnessA - brightnessB),
1924
+ color: colorDiff
1925
+ };
1926
+ };
1927
+
1928
+ // `readable`
1929
+ // http://www.w3.org/TR/AERT#color-contrast
1930
+ // Ensure that foreground and background color combinations provide sufficient contrast.
1931
+ // *Example*
1932
+ // tinycolor.isReadable("#000", "#111") => false
1933
+ tinycolor.isReadable = function(color1, color2) {
1934
+ var readability = tinycolor.readability(color1, color2);
1935
+ return readability.brightness > 125 && readability.color > 500;
1936
+ };
1937
+
1938
+ // `mostReadable`
1939
+ // Given a base color and a list of possible foreground or background
1940
+ // colors for that base, returns the most readable color.
1941
+ // *Example*
1942
+ // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000"
1943
+ tinycolor.mostReadable = function(baseColor, colorList) {
1944
+ var bestColor = null;
1945
+ var bestScore = 0;
1946
+ var bestIsReadable = false;
1947
+ for (var i=0; i < colorList.length; i++) {
1948
+
1949
+ // We normalize both around the "acceptable" breaking point,
1950
+ // but rank brightness constrast higher than hue.
1951
+
1952
+ var readability = tinycolor.readability(baseColor, colorList[i]);
1953
+ var readable = readability.brightness > 125 && readability.color > 500;
1954
+ var score = 3 * (readability.brightness / 125) + (readability.color / 500);
1955
+
1956
+ if ((readable && ! bestIsReadable) ||
1957
+ (readable && bestIsReadable && score > bestScore) ||
1958
+ ((! readable) && (! bestIsReadable) && score > bestScore)) {
1959
+ bestIsReadable = readable;
1960
+ bestScore = score;
1961
+ bestColor = tinycolor(colorList[i]);
1962
+ }
1963
+ }
1964
+ return bestColor;
1965
+ };
1966
+
1967
+
1968
+ // Big List of Colors
1969
+ // ------------------
1970
+ // <http://www.w3.org/TR/css3-color/#svg-color>
1971
+ var names = tinycolor.names = {
1972
+ aliceblue: "f0f8ff",
1973
+ antiquewhite: "faebd7",
1974
+ aqua: "0ff",
1975
+ aquamarine: "7fffd4",
1976
+ azure: "f0ffff",
1977
+ beige: "f5f5dc",
1978
+ bisque: "ffe4c4",
1979
+ black: "000",
1980
+ blanchedalmond: "ffebcd",
1981
+ blue: "00f",
1982
+ blueviolet: "8a2be2",
1983
+ brown: "a52a2a",
1984
+ burlywood: "deb887",
1985
+ burntsienna: "ea7e5d",
1986
+ cadetblue: "5f9ea0",
1987
+ chartreuse: "7fff00",
1988
+ chocolate: "d2691e",
1989
+ coral: "ff7f50",
1990
+ cornflowerblue: "6495ed",
1991
+ cornsilk: "fff8dc",
1992
+ crimson: "dc143c",
1993
+ cyan: "0ff",
1994
+ darkblue: "00008b",
1995
+ darkcyan: "008b8b",
1996
+ darkgoldenrod: "b8860b",
1997
+ darkgray: "a9a9a9",
1998
+ darkgreen: "006400",
1999
+ darkgrey: "a9a9a9",
2000
+ darkkhaki: "bdb76b",
2001
+ darkmagenta: "8b008b",
2002
+ darkolivegreen: "556b2f",
2003
+ darkorange: "ff8c00",
2004
+ darkorchid: "9932cc",
2005
+ darkred: "8b0000",
2006
+ darksalmon: "e9967a",
2007
+ darkseagreen: "8fbc8f",
2008
+ darkslateblue: "483d8b",
2009
+ darkslategray: "2f4f4f",
2010
+ darkslategrey: "2f4f4f",
2011
+ darkturquoise: "00ced1",
2012
+ darkviolet: "9400d3",
2013
+ deeppink: "ff1493",
2014
+ deepskyblue: "00bfff",
2015
+ dimgray: "696969",
2016
+ dimgrey: "696969",
2017
+ dodgerblue: "1e90ff",
2018
+ firebrick: "b22222",
2019
+ floralwhite: "fffaf0",
2020
+ forestgreen: "228b22",
2021
+ fuchsia: "f0f",
2022
+ gainsboro: "dcdcdc",
2023
+ ghostwhite: "f8f8ff",
2024
+ gold: "ffd700",
2025
+ goldenrod: "daa520",
2026
+ gray: "808080",
2027
+ green: "008000",
2028
+ greenyellow: "adff2f",
2029
+ grey: "808080",
2030
+ honeydew: "f0fff0",
2031
+ hotpink: "ff69b4",
2032
+ indianred: "cd5c5c",
2033
+ indigo: "4b0082",
2034
+ ivory: "fffff0",
2035
+ khaki: "f0e68c",
2036
+ lavender: "e6e6fa",
2037
+ lavenderblush: "fff0f5",
2038
+ lawngreen: "7cfc00",
2039
+ lemonchiffon: "fffacd",
2040
+ lightblue: "add8e6",
2041
+ lightcoral: "f08080",
2042
+ lightcyan: "e0ffff",
2043
+ lightgoldenrodyellow: "fafad2",
2044
+ lightgray: "d3d3d3",
2045
+ lightgreen: "90ee90",
2046
+ lightgrey: "d3d3d3",
2047
+ lightpink: "ffb6c1",
2048
+ lightsalmon: "ffa07a",
2049
+ lightseagreen: "20b2aa",
2050
+ lightskyblue: "87cefa",
2051
+ lightslategray: "789",
2052
+ lightslategrey: "789",
2053
+ lightsteelblue: "b0c4de",
2054
+ lightyellow: "ffffe0",
2055
+ lime: "0f0",
2056
+ limegreen: "32cd32",
2057
+ linen: "faf0e6",
2058
+ magenta: "f0f",
2059
+ maroon: "800000",
2060
+ mediumaquamarine: "66cdaa",
2061
+ mediumblue: "0000cd",
2062
+ mediumorchid: "ba55d3",
2063
+ mediumpurple: "9370db",
2064
+ mediumseagreen: "3cb371",
2065
+ mediumslateblue: "7b68ee",
2066
+ mediumspringgreen: "00fa9a",
2067
+ mediumturquoise: "48d1cc",
2068
+ mediumvioletred: "c71585",
2069
+ midnightblue: "191970",
2070
+ mintcream: "f5fffa",
2071
+ mistyrose: "ffe4e1",
2072
+ moccasin: "ffe4b5",
2073
+ navajowhite: "ffdead",
2074
+ navy: "000080",
2075
+ oldlace: "fdf5e6",
2076
+ olive: "808000",
2077
+ olivedrab: "6b8e23",
2078
+ orange: "ffa500",
2079
+ orangered: "ff4500",
2080
+ orchid: "da70d6",
2081
+ palegoldenrod: "eee8aa",
2082
+ palegreen: "98fb98",
2083
+ paleturquoise: "afeeee",
2084
+ palevioletred: "db7093",
2085
+ papayawhip: "ffefd5",
2086
+ peachpuff: "ffdab9",
2087
+ peru: "cd853f",
2088
+ pink: "ffc0cb",
2089
+ plum: "dda0dd",
2090
+ powderblue: "b0e0e6",
2091
+ purple: "800080",
2092
+ rebeccapurple: "663399",
2093
+ red: "f00",
2094
+ rosybrown: "bc8f8f",
2095
+ royalblue: "4169e1",
2096
+ saddlebrown: "8b4513",
2097
+ salmon: "fa8072",
2098
+ sandybrown: "f4a460",
2099
+ seagreen: "2e8b57",
2100
+ seashell: "fff5ee",
2101
+ sienna: "a0522d",
2102
+ silver: "c0c0c0",
2103
+ skyblue: "87ceeb",
2104
+ slateblue: "6a5acd",
2105
+ slategray: "708090",
2106
+ slategrey: "708090",
2107
+ snow: "fffafa",
2108
+ springgreen: "00ff7f",
2109
+ steelblue: "4682b4",
2110
+ tan: "d2b48c",
2111
+ teal: "008080",
2112
+ thistle: "d8bfd8",
2113
+ tomato: "ff6347",
2114
+ turquoise: "40e0d0",
2115
+ violet: "ee82ee",
2116
+ wheat: "f5deb3",
2117
+ white: "fff",
2118
+ whitesmoke: "f5f5f5",
2119
+ yellow: "ff0",
2120
+ yellowgreen: "9acd32"
2121
+ };
2122
+
2123
+ // Make it easy to access colors via `hexNames[hex]`
2124
+ var hexNames = tinycolor.hexNames = flip(names);
2125
+
2126
+
2127
+ // Utilities
2128
+ // ---------
2129
+
2130
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
2131
+ function flip(o) {
2132
+ var flipped = { };
2133
+ for (var i in o) {
2134
+ if (o.hasOwnProperty(i)) {
2135
+ flipped[o[i]] = i;
2136
+ }
2137
+ }
2138
+ return flipped;
2139
+ }
2140
+
2141
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
2142
+ function boundAlpha(a) {
2143
+ a = parseFloat(a);
2144
+
2145
+ if (isNaN(a) || a < 0 || a > 1) {
2146
+ a = 1;
2147
+ }
2148
+
2149
+ return a;
2150
+ }
2151
+
2152
+ // Take input from [0, n] and return it as [0, 1]
2153
+ function bound01(n, max) {
2154
+ if (isOnePointZero(n)) { n = "100%"; }
2155
+
2156
+ var processPercent = isPercentage(n);
2157
+ n = mathMin(max, mathMax(0, parseFloat(n)));
2158
+
2159
+ // Automatically convert percentage into number
2160
+ if (processPercent) {
2161
+ n = parseInt(n * max, 10) / 100;
2162
+ }
2163
+
2164
+ // Handle floating point rounding errors
2165
+ if ((math.abs(n - max) < 0.000001)) {
2166
+ return 1;
2167
+ }
2168
+
2169
+ // Convert into [0, 1] range if it isn't already
2170
+ return (n % max) / parseFloat(max);
2171
+ }
2172
+
2173
+ // Force a number between 0 and 1
2174
+ function clamp01(val) {
2175
+ return mathMin(1, mathMax(0, val));
2176
+ }
2177
+
2178
+ // Parse a base-16 hex value into a base-10 integer
2179
+ function parseIntFromHex(val) {
2180
+ return parseInt(val, 16);
2181
+ }
2182
+
2183
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
2184
+ // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
2185
+ function isOnePointZero(n) {
2186
+ return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
2187
+ }
2188
+
2189
+ // Check to see if string passed in is a percentage
2190
+ function isPercentage(n) {
2191
+ return typeof n === "string" && n.indexOf('%') != -1;
2192
+ }
2193
+
2194
+ // Force a hex value to have 2 characters
2195
+ function pad2(c) {
2196
+ return c.length == 1 ? '0' + c : '' + c;
2197
+ }
2198
+
2199
+ // Replace a decimal with it's percentage value
2200
+ function convertToPercentage(n) {
2201
+ if (n <= 1) {
2202
+ n = (n * 100) + "%";
2203
+ }
2204
+
2205
+ return n;
2206
+ }
2207
+
2208
+ // Converts a decimal to a hex value
2209
+ function convertDecimalToHex(d) {
2210
+ return Math.round(parseFloat(d) * 255).toString(16);
2211
+ }
2212
+ // Converts a hex value to a decimal
2213
+ function convertHexToDecimal(h) {
2214
+ return (parseIntFromHex(h) / 255);
2215
+ }
2216
+
2217
+ var matchers = (function() {
2218
+
2219
+ // <http://www.w3.org/TR/css3-values/#integers>
2220
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
2221
+
2222
+ // <http://www.w3.org/TR/css3-values/#number-value>
2223
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
2224
+
2225
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
2226
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
2227
+
2228
+ // Actual matching.
2229
+ // Parentheses and commas are optional, but not required.
2230
+ // Whitespace can take the place of commas or opening paren
2231
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
2232
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
2233
+
2234
+ return {
2235
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
2236
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
2237
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
2238
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
2239
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
2240
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
2241
+ hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
2242
+ hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
2243
+ hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
2244
+ };
2245
+ })();
2246
+
2247
+ // `stringInputToObject`
2248
+ // Permissive string parsing. Take in a number of formats, and output an object
2249
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
2250
+ function stringInputToObject(color) {
2251
+
2252
+ color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
2253
+ var named = false;
2254
+ if (names[color]) {
2255
+ color = names[color];
2256
+ named = true;
2257
+ }
2258
+ else if (color == 'transparent') {
2259
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
2260
+ }
2261
+
2262
+ // Try to match string input using regular expressions.
2263
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
2264
+ // Just return an object and let the conversion functions handle that.
2265
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
2266
+ var match;
2267
+ if ((match = matchers.rgb.exec(color))) {
2268
+ return { r: match[1], g: match[2], b: match[3] };
2269
+ }
2270
+ if ((match = matchers.rgba.exec(color))) {
2271
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
2272
+ }
2273
+ if ((match = matchers.hsl.exec(color))) {
2274
+ return { h: match[1], s: match[2], l: match[3] };
2275
+ }
2276
+ if ((match = matchers.hsla.exec(color))) {
2277
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
2278
+ }
2279
+ if ((match = matchers.hsv.exec(color))) {
2280
+ return { h: match[1], s: match[2], v: match[3] };
2281
+ }
2282
+ if ((match = matchers.hsva.exec(color))) {
2283
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
2284
+ }
2285
+ if ((match = matchers.hex8.exec(color))) {
2286
+ return {
2287
+ a: convertHexToDecimal(match[1]),
2288
+ r: parseIntFromHex(match[2]),
2289
+ g: parseIntFromHex(match[3]),
2290
+ b: parseIntFromHex(match[4]),
2291
+ format: named ? "name" : "hex8"
2292
+ };
2293
+ }
2294
+ if ((match = matchers.hex6.exec(color))) {
2295
+ return {
2296
+ r: parseIntFromHex(match[1]),
2297
+ g: parseIntFromHex(match[2]),
2298
+ b: parseIntFromHex(match[3]),
2299
+ format: named ? "name" : "hex"
2300
+ };
2301
+ }
2302
+ if ((match = matchers.hex3.exec(color))) {
2303
+ return {
2304
+ r: parseIntFromHex(match[1] + '' + match[1]),
2305
+ g: parseIntFromHex(match[2] + '' + match[2]),
2306
+ b: parseIntFromHex(match[3] + '' + match[3]),
2307
+ format: named ? "name" : "hex"
2308
+ };
2309
+ }
2310
+
2311
+ return false;
2312
+ }
2313
+
2314
+ window.tinycolor = tinycolor;
2315
+ })();
2316
+
2317
+ $(function () {
2318
+ if ($.fn.spectrum.load) {
2319
+ $.fn.spectrum.processNativeColorInputs();
2320
+ }
2321
+ });
2322
+
2323
+ });