Smart Slider 3 - Version 3.0.37

Version Description

  • 05. October 2016.
Download this release

Release Info

Developer nextendweb
Plugin Icon 128x128 Smart Slider 3
Version 3.0.37
Comparing to
See all releases

Version 3.0.37

Files changed (112) hide show
  1. editor/editor.css +141 -0
  2. editor/editor.min.css +1 -0
  3. editor/icon.png +0 -0
  4. editor/shortcode.js +26 -0
  5. editor/shortcode.php +190 -0
  6. icon-active.png +0 -0
  7. icon.png +0 -0
  8. images/icon.png +0 -0
  9. images/ss3.jpg +0 -0
  10. includes/divi.php +85 -0
  11. includes/shortcode.php +39 -0
  12. includes/smartslider3.php +263 -0
  13. includes/vc.php +66 -0
  14. includes/widget.php +109 -0
  15. library/media/admin/css/smallscreen.css +204 -0
  16. library/media/admin/css/smallscreen.min.css +1 -0
  17. library/media/admin/css/smartslider.css +2058 -0
  18. library/media/admin/css/smartslider.min.css +1 -0
  19. library/media/admin/images/AddLicense.png +0 -0
  20. library/media/admin/images/Deauthorize.png +0 -0
  21. library/media/admin/images/Documentation.png +0 -0
  22. library/media/admin/images/Facebook.png +0 -0
  23. library/media/admin/images/Help.png +0 -0
  24. library/media/admin/images/Love.png +0 -0
  25. library/media/admin/images/Newsletter.png +0 -0
  26. library/media/admin/images/Update.png +0 -0
  27. library/media/admin/images/Videos.png +0 -0
  28. library/media/admin/images/add-demo.png +0 -0
  29. library/media/admin/images/create-slider.png +0 -0
  30. library/media/admin/images/dummyslide.png +0 -0
  31. library/media/admin/images/free/box.png +0 -0
  32. library/media/admin/images/free/box2.png +0 -0
  33. library/media/admin/images/free/close.png +0 -0
  34. library/media/admin/images/free/getpro1.jpg +0 -0
  35. library/media/admin/images/free/getpro2.jpg +0 -0
  36. library/media/admin/images/free/newsletter.jpg +0 -0
  37. library/media/admin/images/free/rate.png +0 -0
  38. library/media/admin/images/free/sample1.png +0 -0
  39. library/media/admin/images/free/sample2.png +0 -0
  40. library/media/admin/images/free/sample3.png +0 -0
  41. library/media/admin/images/free/subscribepreview.png +0 -0
  42. library/media/admin/images/import-server.png +0 -0
  43. library/media/admin/images/import-upload.png +0 -0
  44. library/media/admin/images/logo.png +0 -0
  45. library/media/admin/images/magento-publish.png +0 -0
  46. library/media/admin/images/sliderpresets/block.png +0 -0
  47. library/media/admin/images/sliderpresets/caption.png +0 -0
  48. library/media/admin/images/sliderpresets/carousel.png +0 -0
  49. library/media/admin/images/sliderpresets/default.png +0 -0
  50. library/media/admin/images/sliderpresets/fullpage.png +0 -0
  51. library/media/admin/images/sliderpresets/fullwidth.png +0 -0
  52. library/media/admin/images/sliderpresets/horizontalaccordion.png +0 -0
  53. library/media/admin/images/sliderpresets/showcase.png +0 -0
  54. library/media/admin/images/sliderpresets/thumbnailhorizontal.png +0 -0
  55. library/media/admin/images/sliderpresets/thumbnailvertical.png +0 -0
  56. library/media/admin/images/sliderpresets/verticalaccordion.png +0 -0
  57. library/media/admin/images/wordpress-publish.png +0 -0
  58. library/media/cursor/closedhand.cur +0 -0
  59. library/media/cursor/openhand.cur +0 -0
  60. library/media/dist/smartslider-backend.js +7698 -0
  61. library/media/dist/smartslider-backend.min.js +5 -0
  62. library/media/dist/smartslider-free.js +127 -0
  63. library/media/dist/smartslider-free.min.js +1 -0
  64. library/media/dist/smartslider-frontend.js +6020 -0
  65. library/media/dist/smartslider-frontend.min.js +4 -0
  66. library/media/images/fillmode/center.png +0 -0
  67. library/media/images/fillmode/default.png +0 -0
  68. library/media/images/fillmode/fill.png +0 -0
  69. library/media/images/fillmode/fit.png +0 -0
  70. library/media/images/fillmode/stretch.png +0 -0
  71. library/media/images/fillmode/tile.png +0 -0
  72. library/media/images/play.svg +6 -0
  73. library/media/images/thumbnail-types/videoDark.svg +6 -0
  74. library/media/less/backgroundanimation.n2less +30 -0
  75. library/media/less/clear.n2less +437 -0
  76. library/media/less/clearv2.n2less +435 -0
  77. library/media/less/spinner.n2less +72 -0
  78. library/media/plugins/responsive/auto/auto/subformimage.png +0 -0
  79. library/media/plugins/responsive/fullwidth/fullwidth/subformimage.png +0 -0
  80. library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.js +766 -0
  81. library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.min.js +1 -0
  82. library/media/plugins/type/simple/simple/style.n2less +84 -0
  83. library/media/plugins/type/simple/simple/subformimage.png +0 -0
  84. library/media/plugins/widget/arrow/arrow/disabled.png +0 -0
  85. library/media/plugins/widget/autoplay/autoplay/disabled.png +0 -0
  86. library/media/plugins/widget/bar/bar/disabled.png +0 -0
  87. library/media/plugins/widget/bullet/bullet/disabled.png +0 -0
  88. library/media/plugins/widget/shadow/shadow/disabled.png +0 -0
  89. library/media/plugins/widget/thumbnail/thumbnail/disabled.png +0 -0
  90. library/media/plugins/widgetarrow/image/image/arrow.js +79 -0
  91. library/media/plugins/widgetarrow/image/image/arrow.min.js +1 -0
  92. library/media/plugins/widgetarrow/image/image/image.png +0 -0
  93. library/media/plugins/widgetarrow/image/image/imageBigRectangle.png +0 -0
  94. library/media/plugins/widgetarrow/image/image/imageEmpty.png +0 -0
  95. library/media/plugins/widgetarrow/image/image/imageSmallRectangle.png +0 -0
  96. library/media/plugins/widgetarrow/image/image/imageVertical.png +0 -0
  97. library/media/plugins/widgetarrow/image/image/next/circle-stroke.svg +1 -0
  98. library/media/plugins/widgetarrow/image/image/next/full.svg +1 -0
  99. library/media/plugins/widgetarrow/image/image/next/normal.svg +1 -0
  100. library/media/plugins/widgetarrow/image/image/next/simple-horizontal.svg +1 -0
  101. library/media/plugins/widgetarrow/image/image/next/simple-vertical.svg +1 -0
  102. library/media/plugins/widgetarrow/image/image/next/thin-horizontal.svg +1 -0
  103. library/media/plugins/widgetarrow/image/image/next/thin-vertical.svg +1 -0
  104. library/media/plugins/widgetarrow/image/image/previous/circle-stroke.svg +1 -0
  105. library/media/plugins/widgetarrow/image/image/previous/full.svg +1 -0
  106. library/media/plugins/widgetarrow/image/image/previous/normal.svg +3 -0
  107. library/media/plugins/widgetarrow/image/image/previous/simple-horizontal.svg +1 -0
  108. library/media/plugins/widgetarrow/image/image/previous/simple-vertical.svg +1 -0
  109. library/media/plugins/widgetarrow/image/image/previous/thin-horizontal.svg +1 -0
  110. library/media/plugins/widgetarrow/image/image/previous/thin-vertical.svg +1 -0
  111. library/media/plugins/widgetarrow/image/image/style.n2less +88 -0
  112. library/media/plugins/widgetautoplay/image/image/autoplay.js +82 -0
editor/editor.css ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #n2-ss-editor-modal {
2
+ position: fixed;
3
+ left: 0;
4
+ top: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ display: none;
8
+ z-index: 10000001;
9
+ background-color: rgba(43, 52, 63, 0.9);
10
+ }
11
+
12
+ #n2-ss-editor-modal.n2-active {
13
+ display: block;
14
+ }
15
+
16
+ .n2-ss-editor-inner {
17
+ position: relative;
18
+ top: 10%;
19
+ max-width: 980px;
20
+ height: 80%;
21
+ margin: 0 auto;
22
+ overflow: hidden;
23
+ background: #fff;
24
+ }
25
+
26
+ .n2-ss-editor-header {
27
+ position: relative;
28
+ border-bottom: 1px solid #ccd1d6;
29
+ border-top-left-radius: 3px;
30
+ border-top-right-radius: 3px;
31
+ overflow: hidden;
32
+ background-color: #f2f5fa;
33
+ line-height: 59px;
34
+ height: 59px;
35
+ padding: 0 58px;
36
+ text-align: center;
37
+ font-size: 20px;
38
+ text-transform: capitalize;
39
+ color: #6b7989;
40
+ }
41
+
42
+ .n2-ss-editor-header-close {
43
+ position: absolute;
44
+ top: 0;
45
+ right: 0;
46
+ width: 59px;
47
+ height: 59px;
48
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGFBMVEW5w8m5w8m5w8m5w8myvMOzvMO4wsgAAABdt9D1AAAACHRSTlNhxZstF/D+AIlGn1gAAACzSURBVHgBhZNbjsQwCASb9/1vvGKRCDMTqesnjrrsODagFodKZIYovJYVTPOg9i10LDCvcoO08iGY7KRdTuwRLOb1YJJh/8LkWj/oGC3Iza8hI/TgjZmIskx7zSdBaXvvdATfBSJ8Bh6xSziwO4gxOo/dBaCJGnyMeQxIhaTVNW5eloJIr2vcvDwDmfXgN28yqUA/QTdJf5MeFD1qdln0ulnBsJKjRUvLnjcObz3evLT9/wD6sBe9VsZBUQAAAABJRU5ErkJggg==) center center no-repeat;
49
+ cursor: pointer;
50
+ }
51
+
52
+ .n2-ss-editor-boxes {
53
+ height: 500px;
54
+ overflow: auto;
55
+ }
56
+
57
+ .n2-ss-editor-box {
58
+ position: relative;
59
+ width: 200px;
60
+ height: 135px;
61
+ float: left;
62
+ margin: 20px;
63
+ background-size: cover;
64
+ background-position: center center;
65
+ overflow: hidden;
66
+ border-radius: 5px;
67
+ cursor: pointer;
68
+ }
69
+
70
+ .n2-ss-editor-box.n2-active {
71
+ box-shadow: 0 0 0 4px #1999e3;
72
+ }
73
+
74
+ .n2-ss-editor-box-actions {
75
+ position: absolute;
76
+ right: 5px;
77
+ top: 5px;
78
+ display: none;
79
+ }
80
+
81
+ :HOVER > .n2-ss-editor-box-actions {
82
+ display: block;
83
+ }
84
+
85
+ .n2-ss-editor-box-actions a {
86
+ display: inline-block;
87
+ height: 20px;
88
+ line-height: 20px;
89
+ padding: 0 5px;
90
+ background-color: #3c4958;
91
+ border-radius: 3px;
92
+ color: #ffffff;
93
+ text-decoration: none;
94
+ box-shadow: none;
95
+ }
96
+
97
+ .n2-ss-editor-box .n2-ss-editor-box-title {
98
+ position: absolute;
99
+ bottom: 0;
100
+ left: 0;
101
+ background: rgba(43, 52, 63, 0.9);
102
+ line-height: 40px;
103
+ height: 40px;
104
+ color: #cedae2;
105
+ font-size: 12px;
106
+ overflow: hidden;
107
+ padding: 0 10px;
108
+ width: 100%;
109
+ box-sizing: border-box;
110
+ }
111
+
112
+ .n2-ss-editor-buttons {
113
+ padding: 10px 20px;
114
+ text-align: center;
115
+ height: 36px;
116
+ }
117
+
118
+ .n2-ss-editor-buttons a {
119
+ display: inline-block;
120
+ height: 36px;
121
+ line-height: 36px;
122
+ min-width: 70px;
123
+ padding: 0 20px;
124
+ background: #5cba3c;
125
+ border-radius: 3px;
126
+ box-shadow: none;
127
+ color: #fff;
128
+ text-decoration: none;
129
+ font-size: 13px;
130
+ text-transform: uppercase;
131
+ font-weight: bold;
132
+ }
133
+
134
+ .n2-ss-editor-buttons a.n2-ss-editor-insert {
135
+ float: right;
136
+ }
137
+
138
+ .n2-ss-editor-buttons a.n2-ss-editor-create-slider {
139
+ float: left;
140
+ background-color: #6b7986;
141
+ }
editor/editor.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #n2-ss-editor-modal{position:fixed;left:0;top:0;width:100%;height:100%;display:none;z-index:10000001;background-color:rgba(43,52,63,.9)}#n2-ss-editor-modal.n2-active{display:block}.n2-ss-editor-inner{position:relative;top:10%;max-width:980px;height:80%;margin:0 auto;overflow:hidden;background:#fff}.n2-ss-editor-header{position:relative;border-bottom:1px solid #ccd1d6;border-top-left-radius:3px;border-top-right-radius:3px;overflow:hidden;background-color:#f2f5fa;line-height:59px;height:59px;padding:0 58px;text-align:center;font-size:20px;text-transform:capitalize;color:#6b7989}.n2-ss-editor-header-close{position:absolute;top:0;right:0;width:59px;height:59px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAGFBMVEW5w8m5w8m5w8m5w8myvMOzvMO4wsgAAABdt9D1AAAACHRSTlNhxZstF/D+AIlGn1gAAACzSURBVHgBhZNbjsQwCASb9/1vvGKRCDMTqesnjrrsODagFodKZIYovJYVTPOg9i10LDCvcoO08iGY7KRdTuwRLOb1YJJh/8LkWj/oGC3Iza8hI/TgjZmIskx7zSdBaXvvdATfBSJ8Bh6xSziwO4gxOo/dBaCJGnyMeQxIhaTVNW5eloJIr2vcvDwDmfXgN28yqUA/QTdJf5MeFD1qdln0ulnBsJKjRUvLnjcObz3evLT9/wD6sBe9VsZBUQAAAABJRU5ErkJggg==) center center no-repeat;cursor:pointer}.n2-ss-editor-boxes{height:500px;overflow:auto}.n2-ss-editor-box{position:relative;width:200px;height:135px;float:left;margin:20px;background-size:cover;background-position:center center;overflow:hidden;border-radius:5px;cursor:pointer}.n2-ss-editor-box.n2-active{box-shadow:0 0 0 4px #1999e3}.n2-ss-editor-box-actions{position:absolute;right:5px;top:5px;display:none}:HOVER>.n2-ss-editor-box-actions{display:block}.n2-ss-editor-box-actions a,.n2-ss-editor-buttons a{display:inline-block;border-radius:3px;box-shadow:none;color:#fff;text-decoration:none}.n2-ss-editor-box-actions a{background-color:#3c4958;height:20px;line-height:20px;padding:0 5px}.n2-ss-editor-box .n2-ss-editor-box-title{position:absolute;bottom:0;left:0;background:rgba(43,52,63,.9);line-height:40px;height:40px;color:#cedae2;font-size:12px;overflow:hidden;padding:0 10px;width:100%;box-sizing:border-box}.n2-ss-editor-buttons{padding:10px 20px;text-align:center;height:36px}.n2-ss-editor-buttons a{height:36px;line-height:36px;min-width:70px;padding:0 20px;background:#5cba3c;font-size:13px;text-transform:uppercase;font-weight:700}.n2-ss-editor-buttons a.n2-ss-editor-insert{float:right}.n2-ss-editor-buttons a.n2-ss-editor-create-slider{float:left;background-color:#6b7986}
editor/icon.png ADDED
Binary file
editor/shortcode.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function () {
2
+ tinymce.create('tinymce.plugins.nextend2smartslider3', {
3
+ init: function (ed, url) {
4
+ ed.addButton('nextend2smartslider3', {
5
+ title: 'Smart Slider 3',
6
+ image: url + '/icon.png',
7
+ onclick: function () {
8
+ NextendSmartSliderWPTinyMCEModal(ed);
9
+ }
10
+ });
11
+ },
12
+ createControl: function (n, cm) {
13
+ return null;
14
+ },
15
+ getInfo: function () {
16
+ return {
17
+ longname: "Smart Slider 3",
18
+ author: 'Nextendweb',
19
+ authorurl: 'http://www.nextendweb.com',
20
+ infourl: 'http://smartslider3.com',
21
+ version: "3.0"
22
+ };
23
+ }
24
+ });
25
+ tinymce.PluginManager.add('nextend2smartslider3', tinymce.plugins.nextend2smartslider3);
26
+ })();
editor/shortcode.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class N2SSShortcodeInsert {
4
+
5
+ public static function init() {
6
+ add_action('admin_init', array(
7
+ 'N2SSShortcodeInsert',
8
+ 'addButton'
9
+ ));
10
+ }
11
+
12
+ public static function addButton() {
13
+ N2Loader::import('libraries.settings.settings', 'smartslider');
14
+ if ((!current_user_can('edit_posts') && !current_user_can('edit_pages')) || !intval(N2SmartSliderSettings::get('editor-icon', 1))) {
15
+ return;
16
+ }
17
+ if (in_array(basename($_SERVER['PHP_SELF']), array(
18
+ 'post-new.php',
19
+ 'page-new.php',
20
+ 'post.php',
21
+ 'page.php'
22
+ ))) {
23
+ wp_register_style('smart-slider-editor', plugin_dir_url(__FILE__) . 'editor.min.css', array(), '3.22', 'screen');
24
+
25
+ wp_enqueue_style('smart-slider-editor');
26
+
27
+ add_action('admin_print_footer_scripts', array(
28
+ 'N2SSShortcodeInsert',
29
+ 'addButtonDialog'
30
+ ));
31
+
32
+ wp_enqueue_script('jquery-ui-dialog');
33
+ wp_enqueue_style("wp-jquery-ui-dialog");
34
+
35
+ if (get_user_option('rich_editing') == 'true') {
36
+ add_filter('mce_external_plugins', array(
37
+ 'N2SSShortcodeInsert',
38
+ 'mceAddPlugin'
39
+ ));
40
+ add_filter('mce_buttons', array(
41
+ 'N2SSShortcodeInsert',
42
+ 'mceRegisterButton'
43
+ ));
44
+ }
45
+ }
46
+ }
47
+
48
+ public static function mceAddPlugin($plugin_array) {
49
+ $plugin_array['nextend2smartslider3'] = plugin_dir_url(__FILE__) . 'shortcode.js';
50
+ return $plugin_array;
51
+ }
52
+
53
+ public static function mceRegisterButton($buttons) {
54
+ array_push($buttons, "|", "nextend2smartslider3");
55
+ return $buttons;
56
+ }
57
+
58
+ public static function addButtonDialog() {
59
+
60
+ global $wpdb;
61
+ $query = 'SELECT sliders.title, sliders.id, slides.thumbnail
62
+ FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders AS sliders
63
+ LEFT JOIN ' . $wpdb->prefix . 'nextend2_smartslider3_slides AS slides ON slides.id = (SELECT id FROM ' . $wpdb->prefix . 'nextend2_smartslider3_slides WHERE slider = sliders.id AND published = 1 AND generator_id = 0 AND thumbnail NOT LIKE \'\' ORDER BY ordering DESC LIMIT 1)
64
+ ORDER BY time DESC';
65
+ $sliders = $wpdb->get_results($query, ARRAY_A);
66
+ ?>
67
+ <div id='n2-ss-editor-modal' title='Select a Slider'>
68
+ <div class="n2-ss-editor-inner">
69
+ <div class="n2-ss-editor-header">Select a Slider<div class="n2-ss-editor-header-close"></div></div>
70
+ <div class="n2-ss-editor-boxes">
71
+ <?php
72
+ $router = N2Base::getApplication('smartslider')->router;
73
+ $token = N2Form::tokenizeUrl();
74
+ foreach ($sliders AS $slider) :
75
+ if (empty($slider['thumbnail'])) {
76
+ $slider['thumbnail'] = '$system$/images/placeholder/image.png';
77
+ }
78
+ ?>
79
+ <div class="n2-ss-editor-box" data-sliderid="<?php echo $slider['id']; ?>" style="background-image: url(<?php echo N2ImageHelper::fixed($slider['thumbnail']); ?>); ">
80
+ <div class="n2-ss-editor-box-actions">
81
+ <a target="_blank" href="<?php echo $router->createUrl(array(
82
+ 'slider/edit',
83
+ array(
84
+ 'sliderid' => $slider["id"]
85
+ )
86
+ )); ?>">Edit</a>
87
+ <a target="_blank" href="<?php echo $router->createUrl(array(
88
+ 'preview/index',
89
+ array(
90
+ 'sliderid' => $slider["id"]
91
+ ) + $token
92
+ )); ?>">Preview</a>
93
+ </div>
94
+ <div class="n2-ss-editor-box-title"><?php echo $slider['title']; ?></div>
95
+ </div>
96
+ <?php
97
+ endforeach;
98
+ ?>
99
+ </div>
100
+ <div class="n2-ss-editor-buttons">
101
+ <a href="#" class="n2-ss-editor-insert">Insert slider</a>
102
+ <a target="_blank" href="<?php echo $router->createUrl(array('sliders/index')); ?>" class="n2-ss-editor-create-slider">Create slider</a>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ <script type="text/javascript">
107
+ jQuery(document).ready(function ($) {
108
+ var modal = $('#n2-ss-editor-modal'),
109
+ inner = $('.n2-ss-editor-inner'),
110
+ boxes = inner.find('.n2-ss-editor-boxes'),
111
+ $window = $(window),
112
+ active = null,
113
+ callback = function () {
114
+ },
115
+ watchResize = function () {
116
+ boxes.height(inner.height() - 116);
117
+ $window.on('resize.ss', function () {
118
+ boxes.height(inner.height() - 116);
119
+ });
120
+ },
121
+ unWatchResize = function () {
122
+ $window.off('resize.ss');
123
+ },
124
+ show = function () {
125
+ modal.addClass('n2-active');
126
+ watchResize();
127
+ },
128
+ hide = function () {
129
+ unWatchResize();
130
+ modal.removeClass('n2-active');
131
+ };
132
+
133
+ boxes.find('.n2-ss-editor-box').on('click', function () {
134
+ if (active !== null) {
135
+ active.removeClass('n2-active');
136
+ }
137
+ active = $(this).addClass('n2-active');
138
+ });
139
+
140
+ modal.on('click', function (e) {
141
+ if (e.target == modal.get(0)) {
142
+ hide();
143
+ }
144
+ });
145
+ $('.n2-ss-editor-header-close').on('click', function (e) {
146
+ e.preventDefault();
147
+ hide();
148
+ });
149
+
150
+ $('.n2-ss-editor-insert').on('click', function (e) {
151
+ e.preventDefault();
152
+ if (active !== null) {
153
+ callback(active.data('sliderid'));
154
+ hide();
155
+ } else {
156
+ alert('Please select a slider!');
157
+ }
158
+ });
159
+
160
+ window.NextendSmartSliderWPTinyMCEModal = function (ed) {
161
+ callback = function (id) {
162
+ ed.execCommand('mceInsertContent', false, '<div>[smartslider3 slider=' + id + ']</div>');
163
+ };
164
+ show();
165
+ };
166
+
167
+ if (typeof QTags !== 'undefined') {
168
+ QTags.addButton('smart-slider-3', 'Smart Slider', function () {
169
+ callback = function (id) {
170
+ QTags.insertContent('<div>[smartslider3 slider=' + id + ']</div>');
171
+ };
172
+ show();
173
+ });
174
+ }
175
+
176
+ window.NextendSmartSliderDiviModal = function (button) {
177
+ var $input = $(button).siblings('.regular-text');
178
+ callback = function (id) {
179
+ $input.val(id);
180
+ };
181
+ show();
182
+ return false;
183
+ };
184
+ });
185
+ </script>
186
+ <?php
187
+ }
188
+ }
189
+
190
+ N2SSShortcodeInsert::init();
icon-active.png ADDED
Binary file
icon.png ADDED
Binary file
images/icon.png ADDED
Binary file
images/ss3.jpg ADDED
Binary file
includes/divi.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function Nextend_ET_Builder_Module_Smart_Slider_Field() {
4
+ $output = sprintf('<input type="button" class="button button-upload" value="%1$s" onclick="return NextendSmartSliderDiviModal(this);" />', 'Select Slider');
5
+
6
+ return $output;
7
+ }
8
+
9
+ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
10
+
11
+ function init() {
12
+ $this->name = 'Smart Slider 3';
13
+ $this->slug = 'et_pb_nextend_smart_slider_3';
14
+ if(defined('EXTRA_LAYOUT_POST_TYPE')){
15
+ $this->post_types = array( EXTRA_LAYOUT_POST_TYPE );
16
+ }
17
+
18
+ $this->whitelisted_fields = array(
19
+ 'slider',
20
+ );
21
+
22
+ $this->fields_defaults = array();
23
+
24
+ $this->advanced_options = array();
25
+
26
+ add_action('admin_footer', 'Nextend_ET_Builder_Module_Smart_Slider::add_admin_icon');
27
+ }
28
+
29
+ public static function add_admin_icon() {
30
+ ?>
31
+ <style type="text/css">
32
+ .et-pb-all-modules .et_pb_nextend_smart_slider_3::before,
33
+ .et-pb-all-modules .et_pb_nextend_smart_slider_3_fullwidth::before {
34
+ content: 'S';
35
+ }
36
+ </style>
37
+ <?php
38
+ }
39
+
40
+ function get_fields() {
41
+ $fields = array(
42
+ 'slider' => array(
43
+ 'label' => 'Slider',
44
+ 'option_category' => 'basic_option',
45
+ 'renderer' => 'Nextend_ET_Builder_Module_Smart_Slider_Field',
46
+ 'renderer_with_field' => true
47
+ )
48
+ );
49
+
50
+ return $fields;
51
+ }
52
+
53
+ function shortcode_callback($atts, $content = null, $function_name) {
54
+ $sliderId = $this->shortcode_atts['slider'];
55
+ $module_class = '';
56
+ $module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
57
+
58
+ return '<div class="et_pb_module et-waypoint ' . $module_class . ' et_pb_animation_off">' . N2SS3Shortcode::render(array('slider' => $sliderId), 'Divi module') . '</div>';
59
+ }
60
+ }
61
+
62
+ class Nextend_ET_Builder_Module_Smart_Slider_Fullwidth extends Nextend_ET_Builder_Module_Smart_Slider {
63
+
64
+ function init() {
65
+ parent::init();
66
+ $this->fullwidth = true;
67
+ $this->slug = 'et_pb_nextend_smart_slider_3_fullwidth';
68
+ }
69
+ }
70
+
71
+ function Nextend_et_builder_get_child_modules_fix($child_modules) {
72
+ if ($child_modules === '') {
73
+ $child_modules = array();
74
+ }
75
+ return $child_modules;
76
+ }
77
+
78
+ add_filter('et_builder_get_child_modules', 'Nextend_et_builder_get_child_modules_fix');
79
+
80
+ if(function_exists('et_fb_is_enabled') && et_fb_is_enabled()){
81
+ remove_shortcode('smartslider3');
82
+ }
83
+
84
+ new Nextend_ET_Builder_Module_Smart_Slider;
85
+ new Nextend_ET_Builder_Module_Smart_Slider_Fullwidth;
includes/shortcode.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class N2SS3Shortcode
4
+ {
5
+
6
+ public static function doShortcode($parameters) {
7
+ return self::render($parameters);
8
+ }
9
+
10
+ public static function render($parameters, $usage = 'WordPress Shortcode') {
11
+ $parameters = shortcode_atts(array(
12
+ 'id' => md5(time()),
13
+ 'slider' => 0
14
+ ), $parameters);
15
+
16
+ if (intval($parameters['slider']) > 0) {
17
+ ob_start();
18
+ N2Base::getApplication("smartslider")->getApplicationType('widget')->render(array(
19
+ "controller" => 'home',
20
+ "action" => 'wordpress',
21
+ "useRequest" => false
22
+ ), array(
23
+ intval($parameters['slider']),
24
+ $usage
25
+ ));
26
+ return ob_get_clean();
27
+ }
28
+
29
+ return '';
30
+ }
31
+ }
32
+
33
+ add_shortcode('smartslider3', 'N2SS3Shortcode::doShortcode');
34
+
35
+ if (defined('DOING_AJAX') && DOING_AJAX) {
36
+ if (isset($_POST['action']) && ($_POST['action'] == 'stpb_preview_builder_item' || $_POST['action'] == 'stpb_load_builder_templates' || $_POST['action'] == 'stpb_load_template')) {
37
+ remove_shortcode('smartslider3');
38
+ }
39
+ }
includes/smartslider3.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ define('NEXTEND_SMARTSLIDER_3_URL', plugins_url(NEXTEND_SMARTSLIDER_3_URL_PATH));
3
+
4
+ if (!class_exists('N2WP', false)) {
5
+ require_once(dirname(NEXTEND_SMARTSLIDER_3__FILE__) . '/nextend/nextend.php');
6
+ require_once(dirname(NEXTEND_SMARTSLIDER_3__FILE__) . '/library/smartslider/smartslider3.php');
7
+ }
8
+
9
+ class N2_SMARTSLIDER_3 {
10
+
11
+ public static function init() {
12
+ if (class_exists('N2Wordpress')) {
13
+ N2_SMARTSLIDER_3::registerApplication();
14
+ } else {
15
+ add_action('nextend_loaded', 'N2_SMARTSLIDER_3::registerApplication');
16
+ }
17
+
18
+ add_action('init', 'N2_SMARTSLIDER_3::_init');
19
+
20
+ add_action('admin_menu', 'N2_SMARTSLIDER_3::nextendAdminInit');
21
+
22
+ add_action('network_admin_menu', 'N2_SMARTSLIDER_3::nextendNetworkAdminInit');
23
+
24
+ register_activation_hook(NEXTEND_SMARTSLIDER_3__FILE__, 'N2_SMARTSLIDER_3::install');
25
+ add_action('upgrader_process_complete', 'N2_SMARTSLIDER_3::upgrade', 10, 2);
26
+
27
+ add_action('wpmu_new_blog', 'N2_SMARTSLIDER_3::install_new_blog');
28
+ add_action('delete_blog', 'N2_SMARTSLIDER_3::delete_blog', 10, 2);
29
+
30
+ require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/shortcode.php';
31
+ require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/widget.php';
32
+ require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'editor' . DIRECTORY_SEPARATOR . 'shortcode.php';
33
+
34
+ add_action('et_builder_ready', 'N2_SMARTSLIDER_3::Divi_load_module');
35
+
36
+ add_action('vc_after_set_mode', 'N2_SMARTSLIDER_3::initVisualComposer');
37
+
38
+ if (class_exists('FLBuilderModel', false)) {
39
+ add_action('fl_builder_before_render_module', 'N2_SMARTSLIDER_3::removeShortcodeBeaverBuilder');
40
+ }
41
+ }
42
+
43
+ public static function removeShortcodeBeaverBuilder() {
44
+ if (FLBuilderModel::is_builder_active()) {
45
+ N2_SMARTSLIDER_3::removeShortcode();
46
+ }
47
+ }
48
+
49
+ public static function removeShortcode() {
50
+ remove_shortcode('smartslider3');
51
+ }
52
+
53
+ public static function registerApplication() {
54
+
55
+ N2Base::registerApplication(dirname(NEXTEND_SMARTSLIDER_3__FILE__) . '/library/smartslider/N2SmartsliderApplicationInfo.php');
56
+ }
57
+
58
+ public static function _init() {
59
+ N2Loader::import('libraries.settings.settings', 'smartslider');
60
+ if (current_user_can('smartslider_edit') && intval(N2SmartSliderSettings::get('wp-adminbar', 1))) {
61
+ add_action('admin_bar_menu', 'N2_SMARTSLIDER_3::admin_bar_menu', 81);
62
+ }
63
+ }
64
+
65
+ public static function nextendAdminInit() {
66
+ $icon = NEXTEND_SMARTSLIDER_3_URL . '/icon.png';
67
+ if (isset($_REQUEST['page']) && $_REQUEST['page'] == NEXTEND_SMARTSLIDER_3_URL_PATH) {
68
+ $icon = NEXTEND_SMARTSLIDER_3_URL . '/icon-active.png';
69
+ }
70
+
71
+
72
+ add_menu_page('Smart Slider', 'Smart Slider', 'smartslider', NEXTEND_SMARTSLIDER_3_URL_PATH, 'N2_SMARTSLIDER_3::application', $icon);
73
+
74
+ function nextend_smart_slider_admin_menu() {
75
+ echo '<style type="text/css">#adminmenu .toplevel_page_' . NEXTEND_SMARTSLIDER_3_URL_PATH . ' .wp-menu-image img{opacity: 1;}</style>';
76
+ }
77
+
78
+ add_action('admin_head', 'nextend_smart_slider_admin_menu');
79
+ }
80
+
81
+ public static function nextendNetworkAdminInit() {
82
+ $icon = NEXTEND_SMARTSLIDER_3_URL . '/icon.png';
83
+ add_menu_page('Smart Slider Update', 'Smart Slider Update', 'smartslider', NEXTEND_SMARTSLIDER_3_URL_PATH, 'N2_SMARTSLIDER_3::networkUpdate', $icon);
84
+
85
+ function nextend_smart_slider_admin_menu() {
86
+ echo '<style type="text/css">#adminmenu .toplevel_page_' . NEXTEND_SMARTSLIDER_3_URL_PATH . '{display: none;}</style>';
87
+ }
88
+
89
+ add_action('admin_head', 'nextend_smart_slider_admin_menu');
90
+ }
91
+
92
+ public static function networkUpdate() {
93
+ N2Base::getApplication("smartslider")
94
+ ->getApplicationType('backend')
95
+ ->setCurrent()
96
+ ->render(array(
97
+ "controller" => 'update',
98
+ "action" => 'update'
99
+ ));
100
+ n2_exit();
101
+ }
102
+
103
+ public static function application($dummy, $controller = 'sliders', $action = 'index') {
104
+ N2Base::getApplication("smartslider")
105
+ ->getApplicationType('backend')
106
+ ->setCurrent()
107
+ ->render(array(
108
+ "controller" => $controller,
109
+ "action" => $action
110
+ ));
111
+ n2_exit();
112
+ }
113
+
114
+ public static function install($network_wide) {
115
+ global $wpdb;
116
+
117
+ N2WP::install($network_wide);
118
+
119
+ if (is_multisite() && $network_wide) {
120
+ $tmpPrefix = $wpdb->prefix;
121
+ $blogs = function_exists('wp_get_sites') ? wp_get_sites(array('network_id' => $wpdb->siteid)) : get_blog_list(0, 'all');
122
+ foreach ($blogs AS $blog) {
123
+ $wpdb->prefix = $wpdb->get_blog_prefix($blog['blog_id']);
124
+
125
+ N2Base::getApplication("smartslider")
126
+ ->getApplicationType('backend')
127
+ ->render(array(
128
+ "controller" => "install",
129
+ "action" => "index",
130
+ "useRequest" => false
131
+ ), array(true));
132
+ }
133
+
134
+ $wpdb->prefix = $tmpPrefix;
135
+ return true;
136
+ }
137
+
138
+ N2Base::getApplication("smartslider")
139
+ ->getApplicationType('backend')
140
+ ->render(array(
141
+ "controller" => "install",
142
+ "action" => "index",
143
+ "useRequest" => false
144
+ ), array(true));
145
+ }
146
+
147
+ public static function upgrade($upgrader_object, $options) {
148
+ if (isset($options['plugins']) && is_array($options['plugins']) && $options['action'] == 'update' && $options['type'] == 'plugin') {
149
+ foreach ($options['plugins'] as $plugin) {
150
+ if ($plugin == NEXTEND_SMARTSLIDER_3_BASENAME) {
151
+ self::install(true);
152
+ }
153
+ }
154
+ }
155
+ }
156
+
157
+ public static function install_new_blog($blog_id) {
158
+ global $wpdb;
159
+ N2WP::install_new_blog($blog_id);
160
+
161
+ $tmpPrefix = $wpdb->prefix;
162
+ $wpdb->prefix = $wpdb->get_blog_prefix($blog_id);
163
+
164
+ N2Base::getApplication("smartslider")
165
+ ->getApplicationType('backend')
166
+ ->render(array(
167
+ "controller" => "install",
168
+ "action" => "index",
169
+ "useRequest" => false
170
+ ), array(true));
171
+
172
+ $wpdb->prefix = $tmpPrefix;
173
+ }
174
+
175
+ public static function delete_blog($blog_id, $drop) {
176
+ if ($drop) {
177
+ N2WP::delete_blog($blog_id, $drop);
178
+
179
+ global $wpdb;
180
+ $prefix = $wpdb->get_blog_prefix($blog_id);
181
+ $wpdb->query('DROP TABLE IF EXISTS ' . $prefix . 'nextend2_smartslider3_generators, ' . $prefix . 'nextend2_smartslider3_sliders, ' . $prefix . 'nextend2_smartslider3_slides;');
182
+
183
+ }
184
+ }
185
+
186
+ public static function Divi_load_module() {
187
+ require_once dirname(__FILE__) . '/divi.php';
188
+ }
189
+
190
+ public static function initVisualComposer() {
191
+ require_once dirname(__FILE__) . '/vc.php';
192
+ }
193
+
194
+ /**
195
+ * @param WP_Admin_Bar $wp_admin_bar
196
+ */
197
+ public static function admin_bar_menu($wp_admin_bar) {
198
+ global $wpdb;
199
+
200
+ $wp_admin_bar->add_node(array(
201
+ 'id' => 'new_content_smart_slider',
202
+ 'parent' => 'new-content',
203
+ 'title' => 'Slider [Smart Slider 3]',
204
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH . '#createslider')
205
+ ));
206
+
207
+ $wp_admin_bar->add_node(array(
208
+ 'id' => 'smart_slider_3',
209
+ 'title' => 'Smart Slider',
210
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH)
211
+ ));
212
+
213
+ $wp_admin_bar->add_node(array(
214
+ 'id' => 'smart_slider_3_dashboard',
215
+ 'parent' => 'smart_slider_3',
216
+ 'title' => 'Dashboard',
217
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH)
218
+ ));
219
+
220
+ $wp_admin_bar->add_node(array(
221
+ 'id' => 'smart_slider_3_create_slider',
222
+ 'parent' => 'smart_slider_3',
223
+ 'title' => 'Create slider',
224
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH . '#createslider')
225
+ ));
226
+
227
+ $query = 'SELECT sliders.title, sliders.id, slides.thumbnail
228
+ FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders AS sliders
229
+ LEFT JOIN ' . $wpdb->prefix . 'nextend2_smartslider3_slides AS slides ON slides.id = (SELECT id FROM ' . $wpdb->prefix . 'nextend2_smartslider3_slides WHERE slider = sliders.id AND published = 1 AND generator_id = 0 AND thumbnail NOT LIKE \'\' ORDER BY ordering DESC LIMIT 1)
230
+ ORDER BY time DESC LIMIT 10';
231
+ $sliders = $wpdb->get_results($query, ARRAY_A);
232
+
233
+ if (count($sliders)) {
234
+
235
+ $wp_admin_bar->add_node(array(
236
+ 'id' => 'smart_slider_3_edit',
237
+ 'parent' => 'smart_slider_3',
238
+ 'title' => 'Edit slider',
239
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH)
240
+ ));
241
+
242
+ foreach ($sliders AS $slider) {
243
+ $wp_admin_bar->add_node(array(
244
+ 'id' => 'smart_slider_3_slider_' . $slider['id'],
245
+ 'parent' => 'smart_slider_3_edit',
246
+ 'title' => '#' . $slider['id'] . ' - ' . $slider['title'],
247
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH . '&nextendcontroller=slider&nextendaction=edit&sliderid=' . $slider['id'])
248
+ ));
249
+ }
250
+
251
+ if (count($sliders) == 10) {
252
+ $wp_admin_bar->add_node(array(
253
+ 'id' => 'smart_slider_3_slider_view_all',
254
+ 'parent' => 'smart_slider_3_edit',
255
+ 'title' => 'View all',
256
+ 'href' => admin_url("admin.php?page=" . NEXTEND_SMARTSLIDER_3_URL_PATH)
257
+ ));
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ N2_SMARTSLIDER_3::init();
includes/vc.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class NextendSmartSlider3VisualComposer
4
+ {
5
+
6
+ public static function init()
7
+ {
8
+ self::vc_add_element();
9
+
10
+ add_action('vc_frontend_editor_render', 'NextendSmartSlider3VisualComposer::removeShortcode');
11
+ add_action('vc_front_load_page_', 'NextendSmartSlider3VisualComposer::removeShortcode');
12
+ add_action('vc_load_shortcode', 'NextendSmartSlider3VisualComposer::removeShortcode');
13
+ }
14
+
15
+ public static function vc_add_element()
16
+ {
17
+
18
+ global $wpdb;
19
+
20
+ $res = $wpdb->get_results('SELECT id, title FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders');
21
+ $options = array();
22
+ foreach ($res AS $r) {
23
+ $options[$r->title] = $r->id;
24
+ }
25
+
26
+ vc_map(array(
27
+ "name" => "Smart Slider 3",
28
+ "base" => "smartslider3",
29
+ "category" => __('Content'),
30
+ "params" => array(
31
+ array(
32
+ 'type' => 'dropdown',
33
+ 'heading' => 'Slider',
34
+ 'param_name' => 'slider',
35
+ 'value' => $options,
36
+ 'save_always' => true,
37
+ 'description' => 'Select a slider to add it to your post or page.',
38
+ 'admin_label' => true,
39
+ ),
40
+ )
41
+ ));
42
+
43
+ add_action('admin_footer', 'NextendSmartSlider3VisualComposer::add_admin_icon');
44
+ }
45
+
46
+ public static function add_admin_icon()
47
+ {
48
+ ?>
49
+ <style type="text/css">
50
+ .wpb_smartslider3 .vc_element-icon {
51
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEUTr+8YnOQPxPkYnOQUsO8PxPkYnOQTr+5hp8Uoncg1kryMwtqh0ePT6PFvude83ers9vlFqc4Vi8EQo9kSls4Xo+j///8XoOcYm+QVp+oQwPcStPARuvQYneUUrewPxPkMc7TJAAAACHRSTlNt9G1uG8vNAnToTbkAAAFrSURBVHgBfZPr0qowDEXrBVB6b0KgUMv7v+UJ2MFy5tOVdIbuvXT0B6Lrumszr38wN1cuRXdv1q80dxa4/2F04srftc7zdtZqSrZeRTOfWc7XRqS5BtAj1E4SdZ3ROHLq5Ig5zem9Gbymjd1JJRXvBz7gLXdaKWXJWb+UQqTC4h3XVjurjEfIqXAICczTP7SUVlsDR8rCkpZ9wQD2ypG1RE++lxULkxYGDBoi+cTnLpR+Ewqoe0cSsnek4EhrwT6IQs7emhBrIZeB4IkMZED+fD5G5A9BE6kA+UQtwJMN5zF+E0YIiohkOAkx5n0jBO8BvSMyWLLtiFhAr0mHiD2RC/HgEMbebT8wxqD/E4a4D0rOETEYIhs4KcPCG9wKaeT2P/pp+CCGcdh2CJLe2B45OVaMhQnDQypp+jCNNeI1HoMYELl+VXMR7esnrbj9Fm6ia6fyPB3zod1e3nb6Sntnoetu7eWv9tLeuPwHrqBewxDhYIoAAAAASUVORK5CYII=);
52
+ }
53
+ </style>
54
+ <?php
55
+ }
56
+
57
+ public static function removeShortcode(){
58
+ add_shortcode('smartslider3', 'NextendSmartSlider3VisualComposer::_removeShortcode');
59
+ }
60
+
61
+ public static function _removeShortcode($atts) {
62
+ return '<h3>Smart Slider 3 - Slider ID: #' . $atts['slider'] . '</h3><img src="' . NEXTEND_SMARTSLIDER_3_URL . '/images/ss3.jpg" />';
63
+ }
64
+ }
65
+
66
+ NextendSmartSlider3VisualComposer::init();
includes/widget.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class N2SS3Widget extends WP_Widget {
4
+
5
+ private $preventRender = false;
6
+
7
+ function __construct() {
8
+
9
+ parent::__construct('smartslider3', // Base ID
10
+ 'Smart Slider', // Name
11
+ array('description' => 'Displays a Smart Slider') // Args
12
+ );
13
+
14
+ // YOAST SEO fix
15
+ add_action('wpseo_head', array(
16
+ $this,
17
+ 'preventRender'
18
+ ), 0);
19
+ add_action('wpseo_head', array(
20
+ $this,
21
+ 'notPreventRender'
22
+ ), 10000000000);
23
+ }
24
+
25
+ public static function register_widget() {
26
+ register_widget('N2SS3Widget');
27
+ }
28
+
29
+ public function preventRender() {
30
+ $this->preventRender = true;
31
+ }
32
+
33
+ public function notPreventRender() {
34
+ $this->preventRender = false;
35
+ }
36
+
37
+ function widget($args, $instance) {
38
+ if ($this->preventRender) {
39
+ return;
40
+ }
41
+ $instance = array_merge(array(
42
+ 'id' => md5(time()),
43
+ 'slider' => 0
44
+ ), $instance);
45
+
46
+ $slider = do_shortcode('[smartslider3 slider=' . $instance['slider'] . ']');
47
+
48
+ if ($slider != '') {
49
+
50
+ $title = apply_filters('widget_title', $instance['title']);
51
+
52
+ echo $args['before_widget'];
53
+ if (!empty($title)) echo $args['before_title'] . $title . $args['after_title'];
54
+
55
+ echo $slider;
56
+
57
+ echo $args['after_widget'];
58
+ }
59
+ }
60
+
61
+ function form($instance) {
62
+ global $wpdb;
63
+ $instance = wp_parse_args((array)$instance, array(
64
+ 'title' => '',
65
+ 'slider' => -1
66
+ ));
67
+ $title = $instance['title'];
68
+ ?>
69
+ <p>
70
+ <label for="<?php echo $this->get_field_id('title'); ?>">
71
+ Title:
72
+ <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
73
+ name="<?php echo $this->get_field_name('title'); ?>" type="text"
74
+ value="<?php echo esc_attr($title); ?>"/>
75
+ </label>
76
+ </p>
77
+
78
+ <p>
79
+ <label for="<?php echo $this->get_field_id('smartslider2'); ?>">
80
+ Smart Slider:
81
+ <select class="widefat" id="<?php echo $this->get_field_id('slider'); ?>"
82
+ name="<?php echo $this->get_field_name('slider'); ?>">
83
+ <?php
84
+ $slider = $instance['slider'];
85
+
86
+ $res = $wpdb->get_results('SELECT id, title FROM ' . $wpdb->prefix . 'nextend2_smartslider3_sliders');
87
+ foreach ($res AS $r) {
88
+ ?>
89
+ <option <?php if ($r->id == $slider) { ?>selected="selected"
90
+ <?php } ?>value="<?php echo $r->id; ?>"><?php echo $r->title; ?></option>
91
+ <?php
92
+ }
93
+ ?>
94
+ </select>
95
+ </label>
96
+ </p>
97
+ <p>You can create Sliders in the left sidebar.</p>
98
+ <?php
99
+ }
100
+
101
+ function update($new_instance, $old_instance) {
102
+ $instance = $old_instance;
103
+ $instance['title'] = $new_instance['title'];
104
+ $instance['slider'] = $new_instance['slider'];
105
+ return $instance;
106
+ }
107
+ }
108
+
109
+ add_action('widgets_init', 'N2SS3Widget::register_widget');
library/media/admin/css/smallscreen.css ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @media (max-width: 1440px) {
2
+ .n2-logo,
3
+ .n2-sidebar,
4
+ .n2-sidebar-inner {
5
+ width: 219px;
6
+ }
7
+
8
+ #n2-ss-slide-sidebar {
9
+ width: 219px;
10
+ }
11
+
12
+ .n2-sidebar-tab-switcher .n2-td {
13
+ font-size: 11px;
14
+ }
15
+
16
+ .n2-has-underline > .n2-underline::after {
17
+ bottom: -5px;
18
+ }
19
+
20
+ #n2-ss-item-container {
21
+ height: 36px;
22
+ padding: 5px 0;
23
+ overflow: hidden;
24
+ }
25
+
26
+ .n2-ss-core-item {
27
+ line-height: 14px;
28
+ font-size: 9px;
29
+ padding: 0 5px;
30
+ }
31
+
32
+ #n2-ss-item-container:HOVER {
33
+ height: auto;
34
+ }
35
+
36
+ .n2-ss-layer-row .n2-actions-left {
37
+ width: 16px;
38
+ height: 18px;
39
+ margin-top: 0;
40
+ padding: 3px 0 0 2px;
41
+ font-size: 12px;
42
+ overflow: hidden;
43
+ }
44
+
45
+ .n2-list li .n2-actions {
46
+ margin-top: 0;
47
+ padding: 2px 10px 0 0;
48
+ font-size: 12px;
49
+ }
50
+
51
+ .n2-list li {
52
+ line-height: 24px;
53
+ }
54
+
55
+ .n2-ss-layer-title {
56
+ line-height: 24px;
57
+ }
58
+
59
+ .n2-ss-layer-title span {
60
+ margin: 0 52px 0 20px;
61
+ display: block;
62
+ height: 24px;
63
+ overflow: hidden;
64
+ font-size: 10px;
65
+ }
66
+
67
+ .n2-ss-layer-row .n2-inline-form {
68
+ margin: 0 20px;
69
+ }
70
+
71
+ .n2-ss-layer-row .n2-inline-form input {
72
+ line-height: 22px;
73
+ height: 22px;
74
+ vertical-align: top;
75
+ }
76
+
77
+ #layeritemeditorpanel .n2-tabs > div {
78
+ overflow-x: hidden;
79
+ }
80
+
81
+ #layeritemeditorpanel table {
82
+ display: block;
83
+ }
84
+
85
+ #layeritemeditorpanel tbody {
86
+ display: block;
87
+ }
88
+
89
+ #layeritemeditorpanel tr {
90
+ display: block;
91
+ }
92
+
93
+ #layeritemeditorpanel td {
94
+ display: block;
95
+ width: auto;
96
+ }
97
+
98
+ #layeritemeditorpanel input {
99
+ max-width: 85px !important;
100
+ }
101
+
102
+ #layeritemeditorpanel input:only-child {
103
+ max-width: 170px !important;
104
+ }
105
+
106
+ #layeritemeditorpanel textarea {
107
+ max-width: 170px !important;
108
+ }
109
+
110
+ #layeritemeditorpanel .n2-form-element-button {
111
+ max-width: 38px;
112
+ overflow: hidden;
113
+ }
114
+
115
+ #layeritemeditorpanel .n2-label {
116
+ padding: 0 10px;
117
+ }
118
+
119
+ #layeritemeditorpanel .n2-element {
120
+ padding: 10px 0 0;
121
+ }
122
+
123
+ #layeritemeditorpanel .n2-sidebar-row {
124
+ line-height: 30px;
125
+ }
126
+
127
+ #layeritemeditorpanel .n2-sidebar-row .n2-h3 {
128
+ font-size: 11px;
129
+ }
130
+
131
+ #layeritemeditorpanel .n2-button-medium {
132
+ height: 18px;
133
+ line-height: 18px;
134
+ }
135
+
136
+ .n2-ss-animation-title {
137
+ line-height: 24px;
138
+ }
139
+
140
+ .n2-list li.n2-ss-animation-row .n2-actions {
141
+ margin-top: 0;
142
+ padding: 2px 10px 0 0;
143
+ font-size: 12px;
144
+ }
145
+
146
+ .n2-sidebar #n2-ss-slides .n2-box {
147
+ margin: 10px auto;
148
+ width: 200px;
149
+ float: none;
150
+ display: block;
151
+ }
152
+
153
+ .n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload {
154
+ display: none;
155
+ }
156
+
157
+ .n2-sidebar #n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload {
158
+ display: block;
159
+ }
160
+
161
+ dt.n2-ss-slide2-list .n2-i,
162
+ dt.n2-ss-slide2-list .n2-actions {
163
+ display: none;
164
+ }
165
+
166
+ .n2-slides-bulk {
167
+ display: none;
168
+ }
169
+
170
+ .n2-ss-slide2-list .n2-button-big .n2-button-inner {
171
+ font-size: 11px;
172
+ width: auto;
173
+ }
174
+
175
+ .n2-sets-header .n2-set-label {
176
+ display: none;
177
+ }
178
+
179
+ .n2-sets-header .n2-td {
180
+ padding: 0;
181
+ }
182
+
183
+ .n2-sets-header .n2-form-element-list {
184
+ margin: 0;
185
+
186
+ }
187
+
188
+ .n2-sets-header select {
189
+ max-width: 90px;
190
+ }
191
+
192
+ .n2-sets-header .n2-sidebar-row {
193
+ line-height: 50px;
194
+ }
195
+
196
+ .n2-sets-header .n2-form + .n2-button {
197
+ margin-top: 17px;
198
+ vertical-align: top;
199
+ }
200
+
201
+ .n2-save-as-new-container a {
202
+ font-size: 10px;
203
+ }
204
+ }
library/media/admin/css/smallscreen.min.css ADDED
@@ -0,0 +1 @@
 
1
+ @media (max-width:1440px){#n2-ss-slide-sidebar,.n2-logo,.n2-sidebar,.n2-sidebar-inner{width:219px}.n2-sidebar-tab-switcher .n2-td{font-size:11px}.n2-has-underline>.n2-underline::after{bottom:-5px}#n2-ss-item-container{height:36px;padding:5px 0;overflow:hidden}.n2-ss-core-item{line-height:14px;font-size:9px;padding:0 5px}#n2-ss-item-container:HOVER{height:auto}.n2-ss-layer-row .n2-actions-left{width:16px;height:18px;margin-top:0;padding:3px 0 0 2px;font-size:12px;overflow:hidden}.n2-list li .n2-actions{margin-top:0;padding:2px 10px 0 0;font-size:12px}.n2-list li,.n2-ss-layer-title{line-height:24px}.n2-ss-layer-title span{margin:0 52px 0 20px;display:block;height:24px;overflow:hidden;font-size:10px}.n2-ss-layer-row .n2-inline-form{margin:0 20px}.n2-ss-layer-row .n2-inline-form input{line-height:22px;height:22px;vertical-align:top}#layeritemeditorpanel .n2-tabs>div{overflow-x:hidden}#layeritemeditorpanel table,#layeritemeditorpanel tbody,#layeritemeditorpanel tr{display:block}#layeritemeditorpanel td{display:block;width:auto}#layeritemeditorpanel input{max-width:85px!important}#layeritemeditorpanel input:only-child{max-width:170px!important}#layeritemeditorpanel textarea{max-width:170px!important}#layeritemeditorpanel .n2-form-element-button{max-width:38px;overflow:hidden}#layeritemeditorpanel .n2-label{padding:0 10px}#layeritemeditorpanel .n2-element{padding:10px 0 0}#layeritemeditorpanel .n2-sidebar-row{line-height:30px}#layeritemeditorpanel .n2-sidebar-row .n2-h3{font-size:11px}#layeritemeditorpanel .n2-button-medium{height:18px;line-height:18px}.n2-ss-animation-title{line-height:24px}.n2-list li.n2-ss-animation-row .n2-actions{margin-top:0;padding:2px 10px 0 0;font-size:12px}.n2-sidebar #n2-ss-slides .n2-box{margin:10px auto;width:200px;float:none;display:block}.n2-sets-header .n2-set-label,.n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload,.n2-slides-bulk,dt.n2-ss-slide2-list .n2-actions,dt.n2-ss-slide2-list .n2-i{display:none}.n2-sidebar #n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-ss-slide2-list .n2-button-big .n2-button-inner{font-size:11px;width:auto}.n2-sets-header .n2-td{padding:0}.n2-sets-header .n2-form-element-list{margin:0}.n2-sets-header select{max-width:90px}.n2-sets-header .n2-sidebar-row{line-height:50px}.n2-sets-header .n2-form+.n2-button{margin-top:17px;vertical-align:top}.n2-save-as-new-container a{font-size:10px}}
library/media/admin/css/smartslider.css ADDED
@@ -0,0 +1,2058 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .adminhtml-smartslider3-index #footer,
3
+ .adminhtml-smartslider3-index .footer,
4
+ .smartslider3-index-index footer,
5
+ #html-body header {
6
+ display: none;
7
+ }
8
+
9
+ #html-body #anchor-content {
10
+ padding-top: 30px;
11
+ }
12
+
13
+ .n2-definition-list dt.n2-ss-slider-ordering {
14
+ color: #fff;
15
+ background-color: #485769;
16
+ }
17
+
18
+ .n2-definition-list dt.n2-ss-slider-ordering > div {
19
+ padding: 0 30px;
20
+ }
21
+
22
+ .n2-definition-list .n2-ss-slider-ordering .n2-button {
23
+ min-width: 28px;
24
+ line-height: 28px;
25
+ height: 28px;
26
+ margin-left: 10px;
27
+ background-color: #54667b;
28
+ color: #fff;
29
+ }
30
+
31
+ .n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active {
32
+ background: #1999e3;
33
+ }
34
+
35
+ .n2-definition-list dt.n2-ss-slider-ordering .n2-actions {
36
+ background-color: #485769;
37
+ padding-top: 16px;
38
+ }
39
+
40
+ .n2-definition-list .n2-ss-slider-ordering > .n2-actions a {
41
+ display: inline-block;
42
+ padding: 0;
43
+ }
44
+
45
+ .n2-definition-list .n2-ss-slider-ordering > .n2-actions .n2-i {
46
+ vertical-align: top;
47
+ }
48
+
49
+ .n2-ss-slide2-list li .n2-actions .n2-i-duplicate,
50
+ .n2-ss-slide2-list li .n2-actions .n2-i-delete,
51
+ .n2-ss-slide2-list li .n2-actions .n2-i-star {
52
+ visibility: hidden;
53
+ }
54
+
55
+ .n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,
56
+ .n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,
57
+ .n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,
58
+ .n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star {
59
+ visibility: visible;
60
+ }
61
+
62
+ #n2-ss-item-container {
63
+ text-align: center;
64
+ padding: 12px;
65
+ }
66
+
67
+ #n2-ss-item-container div {
68
+ display: inline-block;
69
+ }
70
+
71
+ .n2-ss-core-item {
72
+ margin: 3px;
73
+ padding: 0 11px;
74
+ background-color: #6b7986;
75
+ color: #ffffff;
76
+ line-height: 24px;
77
+ cursor: pointer;
78
+
79
+ -webkit-border-radius: 3px;
80
+ -moz-border-radius: 3px;
81
+ border-radius: 3px;
82
+ }
83
+
84
+ #n2-ss-layers-items-list {
85
+ position: relative;
86
+ }
87
+
88
+ #n2-ss-layers-items-list > ul {
89
+ border-top: 1px solid #343f4c;
90
+ overflow: hidden;
91
+ }
92
+
93
+ #n2-ss-layers-items-list .sortable-placeholder {
94
+ background-color: #2b343f;
95
+ border-bottom: 1px solid #343f4c;
96
+ border-width: 0 0 1px 0;
97
+ }
98
+
99
+ #n2-ss-layers-items-list > p {
100
+ color: #fff;
101
+ font-size: 14px;
102
+ text-align: center;
103
+ }
104
+
105
+ #n2-ss-layers-items-list > p i {
106
+ font-size: 16px;
107
+ }
108
+
109
+ .n2-has-layers #n2-ss-layers-items-list > p {
110
+ display: none;
111
+ }
112
+
113
+ .n2-ss-layer-row {
114
+ border-bottom: 1px solid #343f4c;
115
+ }
116
+
117
+ .n2-ss-layer-row.n2-parent-active {
118
+ background: #49586a;
119
+ }
120
+
121
+ .n2-ss-layer-row.n2-active {
122
+ background: #1999e3;
123
+ }
124
+
125
+ .n2-ss-layer-row li {
126
+ border-bottom: 0;
127
+ }
128
+
129
+ .n2-ss-layer-title {
130
+ display: block;
131
+ line-height: 39px;
132
+ position: relative;
133
+ cursor: pointer;
134
+ }
135
+
136
+ .n2-ss-layer-title span {
137
+ margin: 0 82px;
138
+ cursor: text;
139
+ }
140
+
141
+ .n2-ss-layer-row .n2-inline-form {
142
+ margin: 0 82px;
143
+ }
144
+
145
+ .n2-ss-layer-row .n2-inline-form input {
146
+ background: #3c4958 none repeat scroll 0 0;
147
+ color: #b2bfc9;
148
+ font-size: 11px;
149
+ border: 2px solid #343f4c;
150
+ line-height: 24px;
151
+
152
+ -webkit-border-radius: 3px;
153
+ -moz-border-radius: 3px;
154
+ border-radius: 3px;
155
+ }
156
+
157
+ .n2-ss-layer-row .n2-inline-form input:focus {
158
+ box-shadow: none;
159
+ }
160
+
161
+ .n2-ss-layer-title .n2-actions {
162
+ position: absolute;
163
+ top: 0;
164
+ right: 0;
165
+ padding: 0 6px;
166
+ cursor: default;
167
+ }
168
+
169
+ .n2-ss-layer-title .n2-actions-left {
170
+ position: absolute;
171
+ top: 0;
172
+ left: 0;
173
+ padding: 0 0 0 16px;
174
+ cursor: default;
175
+ font-size: 16px;
176
+ line-height: 16px;
177
+ margin-top: 11px;
178
+ }
179
+
180
+ html[dir="rtl"] .n2-ss-layer-title .n2-actions-left {
181
+ padding: 0 16px 0 0;
182
+ }
183
+
184
+ .n2-ss-layer-row.n2-active .n2-ss-layer-title,
185
+ .n2-ss-layer-row.n2-active .n2-ss-layer-title .n2-actions-left .n2-i,
186
+ .n2-ss-layer-row.n2-active .n2-ss-layer-title .n2-actions .n2-i,
187
+ .n2-ss-layer-row.n2-parent-active .n2-ss-layer-title,
188
+ .n2-ss-layer-row.n2-parent-active .n2-ss-layer-title .n2-actions-left .n2-i,
189
+ .n2-ss-layer-row.n2-parent-active .n2-ss-layer-title .n2-actions .n2-i {
190
+ color: #fff;
191
+ }
192
+
193
+ .n2-ss-layer-title .n2-actions a,
194
+ .n2-ss-layer-title .n2-actions-left a {
195
+ display: inline-block;
196
+ height: 100%;
197
+ }
198
+
199
+ li.n2-ss-layer-row a.n2-ss-parent-unlink {
200
+ display: none;
201
+ }
202
+
203
+ li.n2-ss-layer-row.n2-parent-active a.n2-ss-parent-unlink {
204
+ display: inline-block;
205
+ }
206
+
207
+ .n2-ss-layer-title .n2-actions-left i {
208
+ padding: 0 2px;
209
+ vertical-align: middle;
210
+ }
211
+
212
+ .n2-ss-layer-title .n2-i-order {
213
+ cursor: move;
214
+ }
215
+
216
+ .n2-ss-animation-row {
217
+ list-style: none;
218
+ color: #b2bfc9;
219
+ }
220
+
221
+ .n2-ss-animation-title {
222
+ position: relative;
223
+ line-height: 39px;
224
+ background-color: #49586a;
225
+ cursor: pointer;
226
+ text-transform: capitalize;
227
+ }
228
+
229
+ .n2-ss-animation-title {
230
+ background-color: #3c4958;
231
+ }
232
+
233
+ .n2-ss-animation-title span {
234
+ padding: 0 40px;
235
+ }
236
+
237
+ .n2-ss-animation-title .n2-actions {
238
+ position: absolute;
239
+ right: 0;
240
+ top: 0;
241
+ cursor: default;
242
+ padding: 0 6px;
243
+ }
244
+
245
+ .n2-ss-animation-title .n2-actions a,
246
+ .n2-ss-animation-title .n2-actions-left a {
247
+ display: inline-block;
248
+ height: 100%;
249
+ }
250
+
251
+ .n2-ss-animation-title .n2-actions-left {
252
+ position: absolute;
253
+ top: 0;
254
+ left: 0;
255
+ padding: 0 16px;
256
+ cursor: default;
257
+ font-size: 16px;
258
+ line-height: 38px;
259
+ }
260
+
261
+ .n2-ss-animation-title .n2-actions-left i {
262
+ padding: 0 2px;
263
+ vertical-align: middle;
264
+ }
265
+
266
+ .smartslider-advanced-layer-mode-active #layersanditems li.layer-orderable.item-active.active .layerTitle {
267
+ border-left: 5px solid #eef3f8;
268
+ }
269
+
270
+ #layeritemeditorpanel,
271
+ #smartslider-slide-toolbox-layer .n2-sidebar-pane-sizer {
272
+ visibility: hidden;
273
+ }
274
+
275
+ .n2-has-layers #layeritemeditorpanel,
276
+ .n2-has-layers #smartslider-slide-toolbox-layer .n2-sidebar-pane-sizer {
277
+ visibility: visible;
278
+ }
279
+
280
+ #layeritemeditorpanel > .n2-form {
281
+ margin-bottom: 0;
282
+ }
283
+
284
+ #layeritemeditorpanel .n2-form-element-radio .n2-radio-option {
285
+ margin: 5px;
286
+ }
287
+
288
+ #layer-animation-chain-in,
289
+ #layer-animation-chain-out {
290
+ position: relative;
291
+ }
292
+
293
+ #layer-animation-chain-in .sortable-placeholder,
294
+ #layer-animation-chain-loop .sortable-placeholder,
295
+ #layer-animation-chain-out .sortable-placeholder {
296
+ background-color: #2b343f;
297
+ border-bottom: 1px solid #343f4c;
298
+ border-width: 0 0 1px 0;
299
+ }
300
+
301
+ #layer-animation-chain-in .n2-td,
302
+ #layer-animation-chain-loop .n2-td,
303
+ #layer-animation-chain-out .n2-td {
304
+ vertical-align: middle;
305
+ }
306
+
307
+ #n2-tab-smartslider-editor {
308
+ background-color: #f9fafb;
309
+ }
310
+
311
+ #n2-tab-smartslider-editor.n2-ss-theme-dark {
312
+ background-color: #343F4C;
313
+ }
314
+
315
+ #n2-tab-smartslider-editor .n2-heading-controls {
316
+ z-index: 9;
317
+ }
318
+
319
+ .n2-ss-preview-mode .n2-main-top-bar {
320
+ visibility: hidden;
321
+ }
322
+
323
+ .n2-ss-preview-mode #n2-tab-smartslider-editor .n2-heading-controls {
324
+ visibility: hidden;
325
+ }
326
+
327
+ #n2-ss-preview {
328
+ margin: 0 20px;
329
+ vertical-align: top;
330
+ margin-top: 12px;
331
+ }
332
+
333
+ .n2-ss-snap-to-parent {
334
+ height: 54px;
335
+ width: 100%;
336
+ }
337
+
338
+ #n2-ss-control-line {
339
+ display: none;
340
+ position: relative;
341
+ background-color: #f2f5fa;
342
+ height: 54px;
343
+ white-space: nowrap;
344
+ overflow: hidden;
345
+ }
346
+
347
+ .n2-has-layers #n2-ss-control-line {
348
+ display: block;
349
+ }
350
+
351
+ #n2-ss-control-line:HOVER {
352
+ width: 605px;
353
+ z-index: 1000;
354
+ overflow: visible;
355
+ }
356
+
357
+ #n2-ss-control-line > div {
358
+ margin: 0 5px;
359
+ display: inline-block;
360
+ vertical-align: middle;
361
+ height: 28px;
362
+ line-height: 28px;
363
+ }
364
+
365
+ #n2-ss-control-line > div.n2-form-element-text {
366
+ height: 24px;
367
+ line-height: 24px;
368
+ position: relative;
369
+ }
370
+
371
+ #n2-ss-control-line .n2-text-sub-label {
372
+ font-size: 16px;
373
+ }
374
+
375
+ #n2-ss-show-on-device.n2-active .n2-i:before {
376
+ content: "\e60f";
377
+ }
378
+
379
+ #n2-ss-control-line .n2-radio-option {
380
+ background-color: #a1aeb5;
381
+ border-left: 1px solid #8c99a1;
382
+ }
383
+
384
+ #n2-ss-control-line .n2-radio-option.n2-first {
385
+ border-left-width: 0px;
386
+ }
387
+
388
+ #n2-ss-control-line .n2-radio-option.n2-active {
389
+ background-color: #1999e3;
390
+ border-color: #1999e3;
391
+ }
392
+
393
+ #n2-ss-control-line .n2-radio-option.n2-sub-active {
394
+ background-color: #5cba3c;
395
+ border-color: #5cba3c;
396
+ }
397
+
398
+ #n2-ss-control-line .n2-button {
399
+ width: 28px;
400
+ height: 28px;
401
+ line-height: 28px;
402
+ padding: 0;
403
+ background-color: #a1aeb5;
404
+ }
405
+
406
+ #n2-ss-control-line .n2-button.n2-active {
407
+ background-color: #1999e3;
408
+ }
409
+
410
+ #n2-ss-control-line .n2-button.n2-sub-active {
411
+ background-color: #5cba3c;
412
+ }
413
+
414
+ #n2-ss-control-line .ui-autocomplete {
415
+ max-width: 100%;
416
+ }
417
+
418
+ #n2-ss-parent-linker,
419
+ #n2-ss-theme,
420
+ #n2-ss-control-line #n2-ss-theme.n2-active {
421
+ width: 28px;
422
+ height: 28px;
423
+ line-height: 28px;
424
+ padding: 0;
425
+ background-color: #a1aeb5;
426
+ }
427
+
428
+ #n2-ss-theme.n2-active .n2-i:before {
429
+ content: "\e64c";
430
+ }
431
+
432
+ #n2-ss-zoom {
433
+ width: 280px;
434
+ text-align: center;
435
+ vertical-align: middle;
436
+ }
437
+
438
+ .n2-ss-slider-zoom-container {
439
+ position: relative;
440
+ display: inline-block;
441
+ vertical-align: middle;
442
+ width: 150px;
443
+ height: 34px;
444
+ padding: 0 23px;
445
+ }
446
+
447
+ .n2-ss-slider-zoom-container > .n2-i {
448
+ position: absolute;
449
+ top: 9px;
450
+ color: #a1aeb5;
451
+ font-size: 16px;
452
+ cursor: pointer;
453
+ }
454
+
455
+ .n2-ss-slider-zoom-container .n2-i-minus {
456
+ left: -18px;
457
+ }
458
+
459
+ .n2-ss-slider-zoom-container .n2-i-plus {
460
+ right: -18px;
461
+ }
462
+
463
+ .n2-ss-slider-zoom-bg {
464
+ position: absolute;
465
+ left: 0;
466
+ top: 50%;
467
+ margin-top: -3px;
468
+ width: 100%;
469
+ background: #b9c3c9;
470
+ height: 6px;
471
+ border-radius: 3px;
472
+ }
473
+
474
+ #n2-ss-slider-zoom {
475
+ height: 100%;
476
+ position: relative;
477
+ margin: 0;
478
+ background: transparent;
479
+ border-radius: 0;
480
+ }
481
+
482
+ #n2-ss-slider-zoom .ui-slider-range {
483
+ display: none;
484
+ }
485
+
486
+ #n2-ss-slider-zoom .ui-slider-handle {
487
+ position: absolute;
488
+ top: 50%;
489
+ display: block;
490
+ width: 43px;
491
+ height: 18px;
492
+ margin-top: -11px;
493
+ margin-left: -23px;
494
+ background-color: #fff;
495
+ border: 2px solid #b9c3c9;
496
+ border-radius: 3px;
497
+ z-index: 2;
498
+ color: #7b8898;
499
+ font-size: 10px;
500
+ text-align: center;
501
+ line-height: 18px;
502
+ cursor: pointer;
503
+ }
504
+
505
+ .n2-ss-slider-zoom-1 {
506
+ position: absolute;
507
+ left: 50%;
508
+ top: 0;
509
+ margin-left: -1.5px;
510
+ width: 3px;
511
+ height: 100%;
512
+ background-color: #b9c3c9;
513
+ }
514
+
515
+ #n2-ss-lock {
516
+ display: inline-block;
517
+ position: absolute;
518
+ right: -36px;
519
+ top: 9px;
520
+ cursor: pointer;
521
+ line-height: 16px;
522
+ }
523
+
524
+ #n2-ss-lock .n2-i {
525
+ color: #a1aeb5;
526
+ font-size: 16px;
527
+ }
528
+
529
+ #n2-ss-lock.n2-active .n2-i:before {
530
+ content: "\e609";
531
+ }
532
+
533
+ #n2-ss-devices .n2-table {
534
+ font-size: 32px;
535
+ color: #b1bcc3;
536
+ float: right;
537
+ margin: 0 10px;
538
+ }
539
+
540
+ html[dir="rtl"] #n2-ss-devices .n2-table {
541
+ float: left;
542
+ }
543
+
544
+ #n2-ss-devices .n2-td {
545
+ height: 54px;
546
+ vertical-align: middle;
547
+ }
548
+
549
+ #n2-ss-devices .n2-td {
550
+ padding: 0 15px;
551
+ cursor: pointer;
552
+ }
553
+
554
+ #n2-ss-devices .n2-td.n2-active {
555
+ cursor: default;
556
+ color: #44abe8;
557
+ }
558
+
559
+ .n2-i-devices:before {
560
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC");
561
+ }
562
+
563
+ .n2-i-devices-all:before {
564
+ background-position: 0 0;
565
+ }
566
+
567
+ .n2-i-devices-desktop:before {
568
+ background-position: -40px 0;
569
+ }
570
+
571
+ .n2-i-devices-tablet:before {
572
+ background-position: -80px 0;
573
+ }
574
+
575
+ .n2-i-devices-phone:before {
576
+ background-position: -120px 0;
577
+ }
578
+
579
+ .n2-active > .n2-i-devices-all:before {
580
+ background-position: -160px 0;
581
+ }
582
+
583
+ .n2-active > .n2-i-devices-desktop:before {
584
+ background-position: -200px 0;
585
+ }
586
+
587
+ .n2-active > .n2-i-devices-tablet:before {
588
+ background-position: -240px 0;
589
+ }
590
+
591
+ .n2-active > .n2-i-devices-phone:before {
592
+ background-position: -280px 0;
593
+ }
594
+
595
+ .ui-item-overlay {
596
+ display: none;
597
+ position: absolute;
598
+ top: 0;
599
+ left: 0;
600
+ width: 100%;
601
+ height: 100%;
602
+ }
603
+
604
+ .n2-ss-layer.n2-highlight .ui-item-overlay,
605
+ .n2-ss-layer.n2-highlight2 .ui-item-overlay {
606
+ display: block;
607
+ background-color: RGBA(0, 132, 255, 0.4);
608
+ }
609
+
610
+ .n2-ss-preview-mode .n2-ss-layer.n2-highlight .ui-item-overlay,
611
+ .n2-ss-preview-mode .n2-ss-layer.n2-highlight2 .ui-item-overlay {
612
+ display: none;
613
+ }
614
+
615
+ .n2-ss-item-html .ui-item-overlay,
616
+ .n2-ss-item-iframe .ui-item-overlay {
617
+ display: block;
618
+ }
619
+
620
+ .n2-ss-layer .n2-ss-layer-align-marker {
621
+ position: absolute;
622
+ left: auto;
623
+ right: auto;
624
+ top: auto;
625
+ bottom: auto;
626
+ width: 4px;
627
+ height: 4px;
628
+ background-color: #fff;
629
+ border: #1999e3 4px solid;
630
+ z-index: 89;
631
+ }
632
+
633
+ .n2-ss-layer[data-align="left"] .n2-ss-layer-align-marker {
634
+ left: 0;
635
+ }
636
+
637
+ .n2-ss-layer[data-align="center"] .n2-ss-layer-align-marker {
638
+ left: 50%;
639
+ margin-left: -6px;
640
+ }
641
+
642
+ .n2-ss-layer[data-align="right"] .n2-ss-layer-align-marker {
643
+ right: 0;
644
+ }
645
+
646
+ .n2-ss-layer[data-valign="top"] .n2-ss-layer-align-marker {
647
+ top: 0;
648
+ }
649
+
650
+ .n2-ss-layer[data-valign="middle"] .n2-ss-layer-align-marker {
651
+ top: 50%;
652
+ margin-top: -6px;
653
+ }
654
+
655
+ .n2-ss-layer[data-valign="bottom"] .n2-ss-layer-align-marker {
656
+ bottom: 0;
657
+ }
658
+
659
+ .n2-ss-layer[data-align="left"][data-valign="top"] .n2-ss-layer-align-marker {
660
+ border-bottom-right-radius: 0px;
661
+ }
662
+
663
+ .n2-ss-layer[data-align="left"][data-valign="middle"] .n2-ss-layer-align-marker {
664
+ border-bottom-right-radius: 0px;
665
+ border-top-right-radius: 0px;
666
+ }
667
+
668
+ .n2-ss-layer[data-align="left"][data-valign="bottom"] .n2-ss-layer-align-marker {
669
+ border-top-right-radius: 0px;
670
+ }
671
+
672
+ .n2-ss-layer .ui-resizable-handle {
673
+ background-image: none;
674
+ }
675
+
676
+ .n2-ss-layer .ui-resizable-n {
677
+ top: 0;
678
+ height: 8px;
679
+ border-top: 2px solid #1999e3;
680
+ }
681
+
682
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-n {
683
+ height: 0;
684
+ }
685
+
686
+ .n2-ss-layer .ui-resizable-e {
687
+ right: 0;
688
+ width: 8px;
689
+ border-right: 2px solid #1999e3;
690
+ }
691
+
692
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-e {
693
+ width: 0;
694
+ }
695
+
696
+ .n2-ss-layer .ui-resizable-s {
697
+ bottom: 0;
698
+ height: 8px;
699
+ border-bottom: 2px solid #1999e3;
700
+ }
701
+
702
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-s {
703
+ height: 0;
704
+ }
705
+
706
+ .n2-ss-layer .ui-resizable-w {
707
+ left: 0;
708
+ width: 8px;
709
+ border-left: 2px solid #1999e3;
710
+ }
711
+
712
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-w {
713
+ width: 0;
714
+ }
715
+
716
+ .n2-ss-layer .ui-resizable-ne,
717
+ .n2-ss-layer .ui-resizable-se,
718
+ .n2-ss-layer .ui-resizable-sw,
719
+ .n2-ss-layer .ui-resizable-nw {
720
+ height: 10px;
721
+ width: 10px;
722
+ }
723
+
724
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-ne,
725
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-se,
726
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-sw,
727
+ .n2-ss-layer.n2-ss-layer-small .ui-resizable-nw {
728
+ height: 2px;
729
+ width: 2px;
730
+ }
731
+
732
+ .n2-ss-layer .ui-resizable-ne {
733
+ right: 0;
734
+ top: 0;
735
+ }
736
+
737
+ .n2-ss-layer .ui-resizable-se {
738
+ right: 0;
739
+ bottom: 0;
740
+ }
741
+
742
+ .n2-ss-layer .ui-resizable-sw {
743
+ left: 0;
744
+ bottom: 0;
745
+ }
746
+
747
+ .n2-ss-layer .ui-resizable-nw {
748
+ left: 0;
749
+ top: 0;
750
+ }
751
+
752
+ .n2-ss-layer-quick-handle {
753
+ position: absolute;
754
+ top: 7px;
755
+ right: 7px;
756
+ cursor: pointer;
757
+ width: 14px;
758
+ height: 26px;
759
+ border-radius: 3px;
760
+ background: RGBA(43, 52, 63, 0.9);
761
+ text-align: center;
762
+ font-size: 16px !important;
763
+ line-height: 26px !important;
764
+ color: #fff;
765
+ overflow: hidden;
766
+ }
767
+
768
+ .n2-ss-layer-quick-panel {
769
+ position: absolute;
770
+ z-index: 1000;
771
+ width: 72px;
772
+ height: 28px;
773
+ margin: -6px 0 0 -34px;
774
+ padding: 5px;
775
+ }
776
+
777
+ .n2-ss-layer-locked .n2-ss-layer-quick-handle {
778
+ display: none;
779
+ }
780
+
781
+ .n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option {
782
+ display: inline-block;
783
+ cursor: pointer;
784
+ width: 26px;
785
+ height: 26px;
786
+ border-radius: 3px;
787
+ background: RGBA(43, 52, 63, 0.9);
788
+ text-align: center;
789
+ font-size: 16px !important;
790
+ line-height: 26px !important;
791
+ color: #fff;
792
+ margin: 1px;
793
+ vertical-align: top;
794
+ }
795
+
796
+ .n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option-center {
797
+ width: 14px;
798
+ overflow: hidden;
799
+ }
800
+
801
+ .n2-ss-layer-small .n2-ss-layer-quick-handle {
802
+ display: none;
803
+ }
804
+
805
+ .n2-ss-layer.n2-ss-picking-on-layer {
806
+ z-index: 1000000 !important;
807
+ }
808
+
809
+ .n2-ss-position-display {
810
+ display: none;
811
+ position: absolute;
812
+ border-radius: 3px;
813
+ z-index: 10000;
814
+ line-height: 16px;
815
+ padding: 4px 6px;
816
+ color: #fff;
817
+ font-size: 10px;
818
+ background: rgba(43, 52, 63, 0.9);
819
+ }
820
+
821
+ .n2-ss-position-display.n2-active {
822
+ display: block;
823
+ }
824
+
825
+ #n2-ss-timeline .n2-form-element-text {
826
+ margin: 0 10px;
827
+ line-height: 2px;
828
+ }
829
+
830
+ #n2-ss-timeline .n2-text-sub-label {
831
+ width: 30px;
832
+ text-align: center;
833
+ overflow: hidden;
834
+ }
835
+
836
+ .n2-ss-timeline-current-time {
837
+ vertical-align: middle;
838
+ font-size: 20px;
839
+ margin: 0 20px;
840
+ font-family: "Lucida Console", Monaco, monospace;
841
+ }
842
+
843
+ .n2-ss-timeline-sidebar-top .n2-ss-timeline-control {
844
+ position: absolute;
845
+ top: 10px;
846
+ right: 5px;
847
+ margin: 0 10px;
848
+ }
849
+
850
+ html[dir="rtl"] .n2-ss-timeline-sidebar-top .n2-ss-timeline-control {
851
+ right: auto;
852
+ left: 5px;
853
+ }
854
+
855
+ .n2-ss-timeline-sidebar-top .n2-ss-timeline-control .n2-button + .n2-button {
856
+ margin: 0 0 0 5px;
857
+ }
858
+
859
+ html[dir="rtl"] .n2-ss-timeline-sidebar-top .n2-ss-timeline-control .n2-button + .n2-button {
860
+ margin: 0 5px 0 0;
861
+ }
862
+
863
+ /**
864
+ Layer editor interactions
865
+ **/
866
+ .n2-ss-layer .n2-ss-layer-align-marker,
867
+ .n2-ss-layer .ui-resizable-handle,
868
+ .n2-ss-layer-quick-handle {
869
+ opacity: 0;
870
+ }
871
+
872
+ .n2-ss-resize-layer .ui-resizable-handle,
873
+ .n2-ss-move-layer .ui-resizable-handle,
874
+ .n2-ss-layer.n2-highlight .n2-ss-layer-align-marker,
875
+ .n2-ss-layer.n2-highlight .ui-resizable-handle,
876
+ .n2-ss-layer:HOVER .n2-ss-layer-align-marker,
877
+ .n2-ss-layer:HOVER .ui-resizable-handle,
878
+ .n2-ss-layer:HOVER .n2-ss-layer-quick-handle {
879
+ opacity: 1;
880
+ }
881
+
882
+ #n2-ss-0 .n2-ss-slide-border {
883
+ display: none;
884
+ position: absolute;
885
+ background: #a1aeb5;
886
+ width: 1px;
887
+ height: 1px;
888
+ }
889
+
890
+ #n2-ss-0:HOVER .n2-ss-slide-border {
891
+ display: block;
892
+ }
893
+
894
+ div#n2-ss-0:HOVER .n2-ss-static-slide {
895
+ display: none;
896
+ }
897
+
898
+ div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide {
899
+ display: block;
900
+ }
901
+
902
+ #n2-ss-0 .n2-ss-slide-border-left {
903
+ left: 0;
904
+ top: 0;
905
+ height: 100%;
906
+ }
907
+
908
+ #n2-ss-0 .n2-ss-slide-border-right {
909
+ right: 0;
910
+ top: 0;
911
+ height: 100%;
912
+ }
913
+
914
+ #n2-ss-0 .n2-ss-slide-border-top {
915
+ left: 0;
916
+ top: 0;
917
+ width: 100%;
918
+ }
919
+
920
+ #n2-ss-0 .n2-ss-slide-border-bottom {
921
+ left: 0;
922
+ bottom: 0;
923
+ width: 100%;
924
+ }
925
+
926
+ #n2-ss-0 .n2-ss-layer {
927
+ cursor: not-allowed;
928
+ }
929
+
930
+ #n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer {
931
+ cursor: move;
932
+ background: RGBA(0, 0, 0, 0); /* IE fix, layer empty area doesnt trigger mouseenter when no background */
933
+ }
934
+
935
+ #n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked,
936
+ #n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked {
937
+ cursor: auto;
938
+ }
939
+
940
+ /*
941
+ #n2-ss-0 .n2-ss-static-slide {
942
+ visibility: visible !important;
943
+ }
944
+ */
945
+ .n2-ss-preview-mode #n2-ss-0 .n2-ss-layer {
946
+ cursor: default;
947
+ }
948
+
949
+ .n2-ss-preview-mode #n2-ss-0 .ui-resizable-handle,
950
+ .n2-ss-preview-mode #n2-ss-0 .n2-ss-layer-quick-handle,
951
+ .n2-ss-preview-mode #n2-ss-0 .n2-ss-layer-align-marker,
952
+ #n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-align-marker,
953
+ #n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-align-marker {
954
+ display: none;
955
+ }
956
+
957
+ .n2-ss-item {
958
+ position: relative;
959
+ float: left;
960
+ width: 100%;
961
+ }
962
+
963
+ .n2-ss-item-video,
964
+ .n2-ss-item-youtube,
965
+ .n2-ss-item-vimeo,
966
+ .n2-ss-item-area {
967
+ height: 100%;
968
+ }
969
+
970
+ #smartslider-slide-toolbox-layer {
971
+ position: relative;
972
+ }
973
+
974
+ #layeritemdraggable {
975
+ top: 0;
976
+ left: 0;
977
+ height: 10px;
978
+ width: 100%;
979
+ background: #f04040;
980
+ cursor: ns-resize;
981
+ }
982
+
983
+ .n2-grid {
984
+ background: #4affff;
985
+ position: absolute;
986
+ left: 0;
987
+ top: 0;
988
+ z-index: 1000000;
989
+ display: none;
990
+ }
991
+
992
+ .n2-grid-h {
993
+ width: 100%;
994
+ height: 1px;
995
+ }
996
+
997
+ .n2-grid-v {
998
+ height: 100%;
999
+ width: 1px;
1000
+ }
1001
+
1002
+ ul.animation-list {
1003
+ margin: 0;
1004
+ padding: 0;
1005
+ padding-bottom: 20px;
1006
+ }
1007
+
1008
+ ul.animation-list li {
1009
+ margin: 0;
1010
+ padding: 0;
1011
+ background: #eef3f8;
1012
+ }
1013
+
1014
+ ul.animation-list li.sortable-animation {
1015
+ border-bottom: 1px solid #cdd1d6;
1016
+ }
1017
+
1018
+ /**
1019
+ Layout
1020
+ */
1021
+
1022
+ .n2-lightbox-sidebar-list {
1023
+ overflow-y: auto;
1024
+ }
1025
+
1026
+ /**
1027
+ Timeline
1028
+ */
1029
+
1030
+ #n2-ss-timeline {
1031
+ position: relative;
1032
+ margin-bottom: 200px;
1033
+ user-select: none;
1034
+ -o-user-select: none;
1035
+ -moz-user-select: none;
1036
+ -khtml-user-select: none;
1037
+ -webkit-user-select: none;
1038
+ }
1039
+
1040
+ #n2-ss-timeline .n2-ss-timeline-animation-buttons {
1041
+ width: 84px;
1042
+ height: 36px;
1043
+ position: fixed;
1044
+ left: 100px;
1045
+ top: 200px;
1046
+ font-size: 16px;
1047
+ line-height: 16px;
1048
+ padding: 3px 2px;
1049
+ display: none;
1050
+ }
1051
+
1052
+ #n2-ss-timeline .n2-ss-timeline-animation-buttons.n2-active {
1053
+ display: block;
1054
+ }
1055
+
1056
+ #n2-ss-timeline .n2-ss-timeline-animation-buttons .n2-button {
1057
+ width: 24px;
1058
+ padding: 0;
1059
+ margin: 0 2px;
1060
+ }
1061
+
1062
+ #n2-ss-timeline-table .n2-td {
1063
+ position: relative;
1064
+ vertical-align: top;
1065
+ }
1066
+
1067
+ .n2-ss-timeline-content {
1068
+ border-left: 1px solid #d2d5d8;
1069
+ }
1070
+
1071
+ #n2-ss-timeline-table .n2-ss-timeline-sidebar {
1072
+ width: 310px;
1073
+ }
1074
+
1075
+ #n2-ss-timeline-table .n2-ss-timeline-content-container {
1076
+ overflow: hidden;
1077
+ width: 100%;
1078
+ background-color: #fff;
1079
+ }
1080
+
1081
+ #n2-ss-timeline-table .n2-ss-timeline-content-scrollable {
1082
+ position: relative;
1083
+ overflow: hidden;
1084
+ width: 2000px;
1085
+ border-right: 1px solid #d2d5d8;
1086
+ }
1087
+
1088
+ #n2-ss-timeline-table .n2-ss-timeline-content-timeframe {
1089
+ height: 31px;
1090
+ border-bottom: 1px solid #d2d5d8;
1091
+ z-index: 9;
1092
+
1093
+ }
1094
+
1095
+ #n2-ss-timeline-table .n2-ss-timeline-content-timeframe .n2-time-marker {
1096
+ position: relative;
1097
+ width: 195px;
1098
+ height: 100%;
1099
+ padding-left: 5px;
1100
+ float: left;
1101
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAgAgMAAAAqId/iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEUAAADp6+0AAADJOcyhAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAlSURBVDjLY3BgIBmMahnVMrK1kESMaiFDCwuJxKgWemgJJRkAAD7BO1tByKplAAAAAElFTkSuQmCC");
1102
+ color: #7b8898;
1103
+ }
1104
+
1105
+ html[dir="rtl"] #n2-ss-timeline-table .n2-ss-timeline-content-timeframe .n2-time-marker {
1106
+ float: right;
1107
+ padding-left: 0;
1108
+ padding-right: 5px;
1109
+ background-position: -1px 0;
1110
+ }
1111
+
1112
+ .n2-ss-timeline-scrollbar-wrapper {
1113
+ background-color: #cacdd4;
1114
+ padding: 1px 2px 1px 1px;
1115
+ border: 1px solid #c0c3c9;
1116
+ height: 12px;
1117
+ z-index: 10;
1118
+ }
1119
+
1120
+ .n2-ss-timeline-scrollbar-wrapper .track {
1121
+ position: relative;
1122
+ height: 12px;
1123
+ }
1124
+
1125
+ .n2-ss-timeline-scrollbar-wrapper .thumb {
1126
+ position: absolute;
1127
+ top: 0;
1128
+ background: #eef0f3;
1129
+ height: 10px;
1130
+ cursor: default;
1131
+ width: 20px;
1132
+ z-index: 2;
1133
+ border: 1px solid #a8abaf;
1134
+ -webkit-border-radius: 5px;
1135
+ -moz-border-radius: 5px;
1136
+ border-radius: 5px;
1137
+ }
1138
+
1139
+ .n2-ss-timeline-sidebar-top {
1140
+ position: relative;
1141
+ padding: 10px 5px 9px 5px;
1142
+ height: 28px;
1143
+ background-color: #f9fafb;
1144
+ border-bottom: 1px solid #dee1e5;
1145
+ }
1146
+
1147
+ .n2-ss-timeline-sidebar-top .n2-h2 {
1148
+ line-height: 28px;
1149
+ color: #6b7989;
1150
+ padding: 0 15px;
1151
+ }
1152
+
1153
+ .n2-ss-timeline-sidebar-top .n2-form-element-text {
1154
+ margin: 0;
1155
+ }
1156
+
1157
+ .n2-ss-timeline-sidebar-layers-container {
1158
+ height: 200px;
1159
+ }
1160
+
1161
+ .n2-ss-timeline-sidebar-layers-container .ui-resizable-handle {
1162
+ border: 1px solid #ccd1d6;
1163
+ bottom: -28px;
1164
+ left: -1px;
1165
+ height: 20px;
1166
+ border-radius: 3px;
1167
+ background: #f9fafb;
1168
+ color: #7b8898;
1169
+ font-size: 32px;
1170
+ text-align: center;
1171
+ line-height: 20px;
1172
+ }
1173
+
1174
+ .n2-ss-timeline-sidebar-layers {
1175
+ position: relative;
1176
+ height: 100%;
1177
+ overflow-x: hidden;
1178
+ overflow-y: auto;
1179
+ }
1180
+
1181
+ .n2-ss-timeline-content-layers-container {
1182
+ height: 200px;
1183
+ overflow: hidden;
1184
+ }
1185
+
1186
+ .n2-ss-timeline-layer {
1187
+ padding: 0 15px;
1188
+ background-color: #f9fafb;
1189
+ color: #7b8898;
1190
+ text-transform: capitalize;
1191
+ cursor: pointer;
1192
+ position: relative;
1193
+ }
1194
+
1195
+ .n2-ss-timeline-layer.n2-active {
1196
+ background-color: #1681c1;
1197
+ color: #fff;
1198
+ }
1199
+
1200
+ .n2-ss-timeline-layer-buttons {
1201
+ display: none;
1202
+ font-size: 16px;
1203
+ line-height: 16px;
1204
+ padding: 3px 2px;
1205
+ position: absolute;
1206
+ right: 5px;
1207
+ top: 4px;
1208
+ }
1209
+
1210
+ html[dir="rtl"] .n2-ss-timeline-layer-buttons {
1211
+ right: auto;
1212
+ left: 5px;
1213
+ }
1214
+
1215
+ .n2-ss-timeline-layer-buttons .n2-button {
1216
+ width: 24px;
1217
+ padding: 0;
1218
+ margin: 0 2px;
1219
+ }
1220
+
1221
+ .n2-ss-timeline-content-layers {
1222
+ overflow: hidden;
1223
+ width: 200%;
1224
+ background-color: #ffffff;
1225
+ position: relative;
1226
+ }
1227
+
1228
+ .n2-ss-timeline-layer,
1229
+ .n2-ss-timeline-content-layers {
1230
+ height: 39px;
1231
+ line-height: 39px;
1232
+ border-bottom: 1px solid #dee1e5;
1233
+ }
1234
+
1235
+ .n2-ss-timeline-content-layers {
1236
+ white-space: nowrap;
1237
+ }
1238
+
1239
+ .n2-ss-timeline-content-layers > div {
1240
+ display: inline-block;
1241
+ }
1242
+
1243
+ .n2-ss-layer-animation,
1244
+ .n2-ss-layer-extra-animation {
1245
+ position: relative;
1246
+ float: left;
1247
+ height: 25px;
1248
+ margin: 7px 0;
1249
+ background: #1999e3;
1250
+ width: 200px;
1251
+ border: 1px solid #0c70ab;
1252
+ -webkit-border-radius: 3px;
1253
+ -moz-border-radius: 3px;
1254
+ border-radius: 3px;
1255
+
1256
+ -webkit-box-sizing: border-box;
1257
+ -moz-box-sizing: border-box;
1258
+ box-sizing: border-box;
1259
+ cursor: ew-resize;
1260
+ }
1261
+
1262
+ html[dir="rtl"] .n2-ss-layer-animation {
1263
+ float: right;
1264
+ }
1265
+
1266
+ .n2-ss-layer-animation-loop {
1267
+ background: #5cba3c;
1268
+ border: 1px solid #4c9b31;
1269
+ }
1270
+
1271
+ .n2-ss-layer-animation-out {
1272
+ background: #b3b9bf;
1273
+ border: 1px solid #949ba4;
1274
+ }
1275
+
1276
+ .n2-ss-layer-extra-animation {
1277
+ position: absolute;
1278
+ left: 0;
1279
+ top: 0;
1280
+ margin-left: 20px;
1281
+ width: 30px;
1282
+ background-color: #343f4c;
1283
+ border-color: #6b7986;
1284
+ }
1285
+
1286
+ .n2-ss-timeline-content-timeframe,
1287
+ .n2-ss-timeline-content-layers {
1288
+ padding-left: 20px;
1289
+ }
1290
+
1291
+ html[dir="rtl"] .n2-ss-timeline-content-timeframe,
1292
+ html[dir="rtl"] .n2-ss-timeline-content-layers {
1293
+ padding-left: 0;
1294
+ padding-right: 20px;
1295
+ }
1296
+
1297
+ .n2-ss-layer-animation .ui-resizable-e {
1298
+ right: 0;
1299
+ }
1300
+
1301
+ .n2-ss-layer-animation .ui-resizable-w {
1302
+ left: 0;
1303
+ }
1304
+
1305
+ html[dir="rtl"] .n2-ss-layer-animation .ui-resizable-e {
1306
+ right: auto;
1307
+ left: 0;
1308
+ }
1309
+
1310
+ html[dir="rtl"] .n2-ss-layer-animation .ui-resizable-w {
1311
+ left: auto;
1312
+ right: 0;
1313
+ }
1314
+
1315
+ .n2-ss-animation-duration {
1316
+ display: block;
1317
+ width: 100%;
1318
+ line-height: 23px;
1319
+ color: #fff;
1320
+ text-align: center;
1321
+ cursor: ew-resize;
1322
+ }
1323
+
1324
+ .n2-ss-animation-delay {
1325
+ position: absolute;
1326
+ line-height: 23px;
1327
+ color: #7b8898;
1328
+ text-align: right;
1329
+ right: 100%;
1330
+ margin-right: 5px;
1331
+ }
1332
+
1333
+ html[dir="rtl"] .n2-ss-animation-delay {
1334
+ right: auto;
1335
+ margin-right: 0;
1336
+ left: 100%;
1337
+ margin-left: 5px;
1338
+ }
1339
+
1340
+ .n2-ss-timeline-duration-marker {
1341
+ position: absolute;
1342
+ left: 0;
1343
+ top: 0;
1344
+ z-index: 2;
1345
+ height: 100%;
1346
+ border-left: 1px dashed #b6bcc1;
1347
+ margin-left: 20px;
1348
+ width: 10px;
1349
+ cursor: ew-resize;
1350
+ background: RGBA(0, 0, 0, 0.05);
1351
+ }
1352
+
1353
+ .n2-ss-timeline-cti {
1354
+ position: absolute;
1355
+ left: -10px;
1356
+ top: 3px;
1357
+ z-index: 3;
1358
+ width: 0;
1359
+ height: 100%;
1360
+ border-left: 1px solid #828d9b;
1361
+ margin-left: 20px;
1362
+ cursor: ew-resize;
1363
+ }
1364
+
1365
+ html[dir="rtl"] .n2-ss-timeline-cti {
1366
+ left: auto;
1367
+ right: -10px;
1368
+ margin-left: 0;
1369
+ margin-right: 20px;
1370
+ }
1371
+
1372
+ .n2-ss-timeline-cti-dot {
1373
+ position: relative;
1374
+ left: -6px;
1375
+ top: 0;
1376
+ width: 11px;
1377
+ height: 11px;
1378
+ border-radius: 0 50% 50% 50%;
1379
+ transform: rotate(-135deg);
1380
+ background: #4d5d70;
1381
+ }
1382
+
1383
+ html[dir="rtl"] .n2-ss-timeline-cti-dot {
1384
+ left: auto;
1385
+ right: -5px;
1386
+ }
1387
+
1388
+ .n2-ss-timeline-helper {
1389
+ position: absolute;
1390
+ top: -1px;
1391
+ width: 100%;
1392
+ height: 1px;
1393
+ overflow: hidden;
1394
+ padding-left: 20px;
1395
+ -webkit-box-sizing: border-box;
1396
+ -moz-box-sizing: border-box;
1397
+ box-sizing: border-box;
1398
+ }
1399
+
1400
+ .n2-ss-timeline-control {
1401
+ text-align: right;
1402
+ color: #fff;
1403
+ padding: 0 10px;
1404
+ vertical-align: top;
1405
+ }
1406
+
1407
+ #n2-ss-timeline .n2-ss-timeline-control {
1408
+ padding: 0;
1409
+ }
1410
+
1411
+ .n2-ss-timeline-control .n2-button {
1412
+ padding: 0;
1413
+ width: 28px;
1414
+ font-size: 16px;
1415
+ vertical-align: middle;
1416
+ }
1417
+
1418
+ .n2-generator-functions-container
1419
+ .n2-ss-timeline-control .n2-button i {
1420
+ line-height: inherit;
1421
+ }
1422
+
1423
+ .n2-ss-timeline-control .n2-play.n2-active i:before {
1424
+ content: "\e606";
1425
+ }
1426
+
1427
+ #n2-tab-widgets {
1428
+ border-bottom: 0;
1429
+ margin-bottom: 1000px;
1430
+ }
1431
+
1432
+ .n2-i-edit.n2-active {
1433
+ color: #1999e3;
1434
+ }
1435
+
1436
+ .n2-generator-insert-variable .n2-variable-container {
1437
+ height: 90px;
1438
+ overflow: auto;
1439
+ }
1440
+
1441
+ .n2-generator-insert-variable .n2-group-container {
1442
+ height: 40px;
1443
+ overflow: auto;
1444
+ }
1445
+
1446
+ .n2-generator-insert-variable .n2-variable-container .n2-button,
1447
+ .n2-generator-insert-variable .n2-group-container .n2-button {
1448
+ margin: 3px;
1449
+ }
1450
+
1451
+ .n2-generator-insert-variable .n2-variable-container .n2-button.n2-active,
1452
+ .n2-generator-insert-variable .n2-group-container .n2-button.n2-active {
1453
+ background: #1999e3;
1454
+ }
1455
+
1456
+ .n2-generator-result-container {
1457
+ height: 100px;
1458
+ overflow: auto;
1459
+ margin: 0 3px;
1460
+ }
1461
+
1462
+ .n2-slide-published {
1463
+ position: absolute;
1464
+ top: 11px;
1465
+ right: 3px;
1466
+ }
1467
+
1468
+ .n2-i-unpublished {
1469
+ color: #c44e3d;
1470
+ }
1471
+
1472
+ .n2-slide-published {
1473
+ font-size: 16px;
1474
+ }
1475
+
1476
+ .n2-slide-is-first,
1477
+ .n2-slide-first,
1478
+ .n2-box.n2-first-slide:HOVER .n2-slide-first {
1479
+ display: none;
1480
+ }
1481
+
1482
+ .n2-box:HOVER .n2-slide-first,
1483
+ .n2-first-slide .n2-slide-is-first {
1484
+ display: inline-block;
1485
+ }
1486
+
1487
+ .n2-slide-duplicate {
1488
+ margin-right: 5px;
1489
+ }
1490
+
1491
+ html[dir="rtl"] .n2-slide-duplicate {
1492
+ margin-right: 0;
1493
+ margin-left: 5px;
1494
+ }
1495
+
1496
+ .n2-slide-duplicate, .n2-slide-delete, .n2-slide-selected {
1497
+ padding: 0;
1498
+ width: 24px;
1499
+ }
1500
+
1501
+ .n2-sidebar #n2-ss-slides {
1502
+ position: relative;
1503
+ margin-right: -1px;
1504
+ }
1505
+
1506
+ .n2-sidebar #n2-ss-slides .n2-box {
1507
+ width: 45.5%;
1508
+ height: 135px;
1509
+ margin: 2.20%;
1510
+ background: #3c4958;
1511
+ border: 0;
1512
+ }
1513
+
1514
+ .n2-sidebar #n2-ss-slides .n2-box.n2-ss-slide-active {
1515
+ box-shadow: 0 0 0 3px #1999e3;
1516
+ }
1517
+
1518
+ .n2-sidebar #n2-ss-slides .n2-box .n2-box-button {
1519
+ text-align: left;
1520
+ }
1521
+
1522
+ .n2-sidebar #n2-ss-slides .n2-box .n2-box-placeholder {
1523
+ height: 40px;
1524
+ }
1525
+
1526
+ .n2-sidebar #n2-ss-slides .n2-box.ui-sortable-helper {
1527
+ transform: scale(0.8);
1528
+ }
1529
+
1530
+ .n2-sidebar #n2-ss-slides .n2-box-placeholder {
1531
+ background: RGBA(43, 52, 63, 0.9);
1532
+ }
1533
+
1534
+ .n2-sidebar #n2-ss-slides .n2-box-placeholder a {
1535
+ color: #cedae2;
1536
+ }
1537
+
1538
+ .n2-ss-slides-control {
1539
+ position: relative;
1540
+ padding: 22px 10px;
1541
+ border-bottom: 1px solid RGBA(0, 0, 0, 0.3);
1542
+ }
1543
+
1544
+ .n2-ss-slides-control .n2-button {
1545
+ margin: 0 10px;
1546
+ }
1547
+
1548
+ .n2-slides-bulk {
1549
+ min-width: 0;
1550
+ padding: 0;
1551
+ width: 36px;
1552
+ }
1553
+
1554
+ .n2-slides-bulk .n2-i {
1555
+ font-size: 32px;
1556
+ }
1557
+
1558
+ .n2-add-quick-image {
1559
+ width: 266px;
1560
+ }
1561
+
1562
+ .n2-button-menu-inner .n2-add-quick-image {
1563
+ width: auto;
1564
+ }
1565
+
1566
+ .n2-slides-add {
1567
+ vertical-align: top;
1568
+ }
1569
+
1570
+ .n2-slide-bulk-mode .n2-slides-bulk,
1571
+ .n2-slide-bulk-mode .n2-slides-add,
1572
+ .n2-slide-selected,
1573
+ .n2-bulk-select,
1574
+ .n2-bulk-action,
1575
+ .n2-bulk-cancel {
1576
+ display: none;
1577
+ min-width: 0;
1578
+ vertical-align: top;
1579
+ }
1580
+
1581
+ .n2-sidebar #n2-ss-slides .n2-box-slide-add,
1582
+ .n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload {
1583
+ display: inline-block;
1584
+ color: #b2bfc9;
1585
+ border: 2px dashed #73818c;
1586
+ background: transparent;
1587
+ -webkit-box-sizing: border-box;
1588
+ -moz-box-sizing: border-box;
1589
+ box-sizing: border-box;
1590
+ text-align: center;
1591
+ line-height: 131px;
1592
+ }
1593
+
1594
+ .n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload {
1595
+ display: none;
1596
+ position: absolute;
1597
+ z-index: 3;
1598
+ left: 0;
1599
+ top: 0;
1600
+ width: 420px;
1601
+ height: 90%;
1602
+ background-color: #4d5d70;
1603
+ border: 0px;
1604
+ box-shadow: 0 0 0 3px #1999e3;
1605
+ }
1606
+
1607
+ .n2-sidebar #n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload {
1608
+ display: block;
1609
+ }
1610
+
1611
+ .n2-sidebar #n2-ss-slides.n2-ss-has-slides .n2-box-slide-add {
1612
+ display: none;
1613
+ }
1614
+
1615
+ .n2-slide-bulk-mode .n2-bulk-select,
1616
+ .n2-slide-bulk-mode .n2-bulk-action,
1617
+ .n2-slide-bulk-mode .n2-bulk-cancel,
1618
+ .n2-slide-bulk-mode .n2-box-slide.n2-active .n2-slide-selected,
1619
+ .n2-slide-bulk-mode .n2-box-slide .n2-box-rt {
1620
+ display: inline-block;
1621
+ }
1622
+
1623
+ .n2-slide-bulk-mode .n2-box-slide {
1624
+ opacity: 0.5;
1625
+ }
1626
+
1627
+ .n2-slide-bulk-mode .n2-box-slide.n2-active {
1628
+ opacity: 1;
1629
+ }
1630
+
1631
+ .n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER {
1632
+ background-color: #1999e3;
1633
+ }
1634
+
1635
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-first,
1636
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-duplicate,
1637
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-delete,
1638
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-generator,
1639
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-published {
1640
+ display: none;
1641
+ }
1642
+
1643
+ .n2-slide-bulk-mode .n2-box-slide .n2-slide-published.n2-active {
1644
+ display: inline-block;
1645
+ }
1646
+
1647
+ .n2-ss-live-preview span {
1648
+ text-decoration: line-through;
1649
+ vertical-align: middle;
1650
+ }
1651
+
1652
+ .n2-ss-live-preview .n2-button {
1653
+ vertical-align: middle;
1654
+ margin: 0 20px;
1655
+ }
1656
+
1657
+ .n2-ss-live-preview.n2-active span {
1658
+ text-decoration: none;
1659
+ }
1660
+
1661
+ .n2-ss-live-preview.n2-active .n2-button {
1662
+ display: none;
1663
+ }
1664
+
1665
+ .n2-widget-area {
1666
+ display: inline-block;
1667
+ vertical-align: middle;
1668
+ width: 80px;
1669
+ height: 80px;
1670
+ position: relative;
1671
+ margin: 0 10px;
1672
+ }
1673
+
1674
+ .n2-form .n2-widget-area {
1675
+ margin-bottom: 10px;
1676
+ }
1677
+
1678
+ .n2-widget-area-inner {
1679
+ position: absolute;
1680
+ top: 14px;
1681
+ left: 14px;
1682
+ width: 46px;
1683
+ height: 46px;
1684
+ border: 3px solid #bbc3cc;
1685
+ border-radius: 3px;
1686
+ }
1687
+
1688
+ .n2-widget-area .n2-area {
1689
+ position: absolute;
1690
+ background-color: #a1aeb5;
1691
+ border-radius: 2px;
1692
+ cursor: pointer;
1693
+ width: 10px;
1694
+ height: 10px;
1695
+ left: 0;
1696
+ top: 0;
1697
+ }
1698
+
1699
+ .n2-widget-area .n2-area.n2-active {
1700
+ background-color: #1999e3;
1701
+ cursor: default;
1702
+ }
1703
+
1704
+ .n2-widget-area .n2-area-1 {
1705
+ left: 35px;
1706
+ }
1707
+
1708
+ .n2-widget-area .n2-area-2 {
1709
+ left: 21px;
1710
+ top: 21px;
1711
+ }
1712
+
1713
+ .n2-widget-area .n2-area-3 {
1714
+ left: 35px;
1715
+ top: 21px;
1716
+ }
1717
+
1718
+ .n2-widget-area .n2-area-4 {
1719
+ left: 49px;
1720
+ top: 21px;
1721
+ }
1722
+
1723
+ .n2-widget-area .n2-area-5 {
1724
+ top: 35px;
1725
+ }
1726
+
1727
+ .n2-widget-area .n2-area-6 {
1728
+ left: 21px;
1729
+ top: 35px;
1730
+ }
1731
+
1732
+ .n2-widget-area .n2-area-7 {
1733
+ left: 49px;
1734
+ top: 35px;
1735
+ }
1736
+
1737
+ .n2-widget-area .n2-area-8 {
1738
+ left: 70px;
1739
+ top: 35px;
1740
+ }
1741
+
1742
+ .n2-widget-area .n2-area-9 {
1743
+ left: 21px;
1744
+ top: 49px;
1745
+ }
1746
+
1747
+ .n2-widget-area .n2-area-10 {
1748
+ left: 35px;
1749
+ top: 49px;
1750
+ }
1751
+
1752
+ .n2-widget-area .n2-area-11 {
1753
+ left: 49px;
1754
+ top: 49px;
1755
+ }
1756
+
1757
+ .n2-widget-area .n2-area-12 {
1758
+ left: 35px;
1759
+ top: 70px;
1760
+ }
1761
+
1762
+ .n2-ss-slider-publish {
1763
+ border-collapse: collapse;
1764
+ overflow: hidden;
1765
+ }
1766
+
1767
+ .n2-ss-slider-publish .n2-td {
1768
+ text-align: center;
1769
+ border-right: 1px solid #ccd1d6;
1770
+ color: #6b7989;
1771
+ padding: 48px 0 0 0;
1772
+ }
1773
+
1774
+ html[dir="rtl"] .n2-ss-slider-publish .n2-td {
1775
+ border-left: 1px solid #ccd1d6;
1776
+ }
1777
+
1778
+ .n2-ss-slider-publish .n2-td .n2-h2 a {
1779
+ color: #6b7989;
1780
+ }
1781
+
1782
+ .n2-ss-slider-publish .n2-td.n2-last {
1783
+ border-right: 0;
1784
+ border-left: 0;
1785
+ }
1786
+
1787
+ .n2-ss-slider-publish div.n2-h2 {
1788
+ line-height: 30px;
1789
+ font-size: 18px;
1790
+ }
1791
+
1792
+ .n2-ss-slider-publish div.n2-h4 {
1793
+ line-height: 26px;
1794
+ }
1795
+
1796
+ .n2-ss-slider-publish .n2-code {
1797
+ display: inline-block;
1798
+ padding: 16px 30px;
1799
+ line-height: 20px;
1800
+ border-radius: 3px;
1801
+ background-color: #f5e293;
1802
+ text-align: left;
1803
+ margin: 17px 0;
1804
+ color: #6f653f;
1805
+ font-size: 12px;
1806
+ border: 0;
1807
+ }
1808
+
1809
+ .n2-ss-slider-publish img {
1810
+ margin-top: 17px;
1811
+ margin-bottom: -10px;
1812
+ }
1813
+
1814
+ .n2-ss-generator-modal .n2-modal-content h3 {
1815
+ text-align: left;
1816
+ }
1817
+
1818
+ .n2-ss-layer-solo-mode .n2-ss-layer {
1819
+ opacity: 0.5 !important;
1820
+ }
1821
+
1822
+ .n2-ss-layer-solo-mode .n2-ss-layer-solo {
1823
+ z-index: 100000000 !important;
1824
+ opacity: 1 !important;
1825
+ }
1826
+
1827
+ .n2-generator-records td div {
1828
+ max-height: 100px;
1829
+ overflow: hidden;
1830
+ padding: 10px;
1831
+ margin: -10px;
1832
+ }
1833
+
1834
+ .n2-generator-records td:HOVER div {
1835
+ overflow-y: auto;
1836
+ overflow-x: visible;
1837
+ }
1838
+
1839
+ #n2-admin[data-slider-type='block'] #n2-tab-widgets,
1840
+ #n2-admin[data-slider-type='block'] .n2-fm-autoplay,
1841
+ #n2-admin[data-slider-type='block'] .n2-fm-slides {
1842
+ display: none
1843
+ }
1844
+
1845
+ .n2-ss-container-device {
1846
+ position: relative;
1847
+ margin: 0 auto;
1848
+ background-color: #fff;
1849
+ border: 1px solid #ccd1d6;
1850
+ border-width: 0 1px;
1851
+ }
1852
+
1853
+ .n2-ss-layer-picker {
1854
+ background: #6b7986;
1855
+ color: #fff;
1856
+ font-size: 16px;
1857
+ height: 28px;
1858
+ line-height: 28px;
1859
+ padding: 0;
1860
+ text-align: center;
1861
+ width: 28px;
1862
+ border-radius: 3px;
1863
+ margin: 0 10px;
1864
+ margin-bottom: 10px;
1865
+ cursor: pointer;
1866
+ }
1867
+
1868
+ .n2-ss-layer-picker.n2-active {
1869
+ background: #1999e3;
1870
+ }
1871
+
1872
+ #n2-ss-control-line #n2-ss-parent-linker.n2-under-pick,
1873
+ .n2-ss-layer-picker.n2-under-pick {
1874
+ background-color: #5cba3c;
1875
+ }
1876
+
1877
+ #n2-ss-parent-linker.n2-under-pick .n2-i-layerlink:before,
1878
+ .n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before {
1879
+ content: "\e64b";
1880
+ }
1881
+
1882
+ .n2-ss-picker-overlay {
1883
+ position: absolute;
1884
+ left: 0;
1885
+ top: 0;
1886
+ background: RGBA(25, 153, 227, 0.8);
1887
+ cursor: pointer;
1888
+ width: 33%;
1889
+ height: 33%;
1890
+ z-index: 1000000;
1891
+ box-shadow: inset 0px 0px 0px 1px rgba(0, 0, 0, 0.4);
1892
+ }
1893
+
1894
+ .n2-ss-picker-overlay:HOVER {
1895
+ background: RGBA(42, 52, 63, 0.9);
1896
+ }
1897
+
1898
+ .n2-modal.n2-ss-go-pro .n2-modal-window {
1899
+ /*background-color: #fafbff;*/
1900
+ text-align: center;
1901
+ /*color: #6b7989;*/
1902
+ line-height: 2;
1903
+ }
1904
+
1905
+ .n2-modal.n2-ss-go-pro .n2-ss-rate {
1906
+ margin: 50px -20px 0;
1907
+ background: url('../images/free/rate.png');
1908
+ height: 90px;
1909
+ line-height: 90px;
1910
+ color: #ffffff;
1911
+ }
1912
+
1913
+ .n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3 {
1914
+ display: inline-block;
1915
+ margin-right: 30px;
1916
+ }
1917
+
1918
+ .n2-modal.n2-ss-go-pro .n2-modal-controls {
1919
+ margin-bottom: 40px;
1920
+ }
1921
+
1922
+ .n2-box-free {
1923
+ background: url('../images/free/box.png');
1924
+ }
1925
+
1926
+ .n2-box-free .n2-box-placeholder {
1927
+ background: transparent;
1928
+ }
1929
+
1930
+ .n2-box-free .n2-box-button > div {
1931
+ color: #fff;
1932
+ }
1933
+
1934
+ .n2-ss-quick-slides-edit-modal .n2-modal-content table {
1935
+ border-spacing: 10px;
1936
+ border-collapse: separate;
1937
+ margin: 10px auto;
1938
+ }
1939
+
1940
+ .n2-ss-quick-slides-edit-modal .n2-modal-content table td {
1941
+ padding: 0;
1942
+ }
1943
+
1944
+ .n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label {
1945
+ margin-top: 0;
1946
+ margin-bottom: 3px;
1947
+ }
1948
+
1949
+ .n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label {
1950
+ font-size: 11px;
1951
+ }
1952
+
1953
+ .n2-sidebar-inner,
1954
+ #n2-ss-slide-sidebar {
1955
+ width: 439px;
1956
+ }
1957
+
1958
+ .n2-ss-create-slider-free-sample {
1959
+ float: left;
1960
+ height: 70px;
1961
+ width: 170px;
1962
+ cursor: pointer;
1963
+ }
1964
+
1965
+ .n2-ss-create-slider-free-sample:HOVER {
1966
+ background-position: 0 -80px;
1967
+ }
1968
+
1969
+ .n2-ss-modal-subscribe > .n2-modal-window {
1970
+ text-align: center;
1971
+ }
1972
+
1973
+ .n2-ss-modal-subscribe .n2-form {
1974
+ margin: 0 -20px;
1975
+ }
1976
+
1977
+ .n2-ss-modal-subscribe .n2-h3 {
1978
+ margin: 0 auto;
1979
+ width: 95%;
1980
+ text-align: center;
1981
+ line-height: 2;
1982
+ }
1983
+
1984
+ .n2-input-button,
1985
+ .n2-ss-preview-subscribe .n2-input-button,
1986
+ .n2-ss-modal-subscribe .n2-input-button {
1987
+ display: inline-block;
1988
+ margin-top: 20px;
1989
+ }
1990
+
1991
+ .n2-input-button > *,
1992
+ .n2-ss-preview-subscribe .n2-input-button > *,
1993
+ .n2-ss-modal-subscribe .n2-input-button > * {
1994
+ display: inline-block;
1995
+ white-space: nowrap;
1996
+ }
1997
+
1998
+ .n2-input-button input,
1999
+ .n2-input-button input:focus,
2000
+ .n2-ss-preview-subscribe input,
2001
+ .n2-ss-preview-subscribe input:focus,
2002
+ .n2-ss-modal-subscribe input,
2003
+ .n2-ss-modal-subscribe input:focus {
2004
+ margin: 0 auto;
2005
+ width: 250px;
2006
+ height: 36px;
2007
+ border: 2px solid #b9c3c9;
2008
+ border-right: 0;
2009
+ border-top-left-radius: 3px;
2010
+ border-bottom-left-radius: 3px;
2011
+ overflow: hidden;
2012
+ padding: 0 10px;
2013
+ line-height: 36px;
2014
+ box-shadow: none;
2015
+ color: #7b8898;
2016
+ font-size: 12px;
2017
+ background: #ffffff;
2018
+ }
2019
+
2020
+ .n2-input-button .n2-button,
2021
+ .n2-ss-preview-subscribe .n2-input-button .n2-button,
2022
+ .n2-ss-modal-subscribe .n2-input-button .n2-button {
2023
+ border-top-left-radius: 0;
2024
+ border-bottom-left-radius: 0;
2025
+ }
2026
+
2027
+ .n2-ss-preview-subscribe {
2028
+ position: fixed;
2029
+ left: 50%;
2030
+ margin-left: -500px;
2031
+ bottom: -100px;
2032
+ transition: bottom 0.5s ease;
2033
+ background: url('../images/free/subscribepreview.png');
2034
+ width: 1000px;
2035
+ height: 90px;
2036
+ z-index: 1000;
2037
+ }
2038
+
2039
+ .n2-ss-preview-subscribe.n2-active {
2040
+ bottom: 10px;
2041
+ }
2042
+
2043
+ .n2-ss-preview-subscribe-close {
2044
+ position: absolute;
2045
+ top: -12px;
2046
+ right: -12px;
2047
+ width: 24px;
2048
+ height: 24px;
2049
+ cursor: pointer;
2050
+ background: url('../images/free/close.png') no-repeat center center;
2051
+ }
2052
+
2053
+ .n2-ss-preview-subscribe .n2-input-button {
2054
+ position: absolute;
2055
+ right: 20px;
2056
+ top: 0;
2057
+ margin-top: 28px;
2058
+ }
library/media/admin/css/smartslider.min.css ADDED
@@ -0,0 +1 @@
 
1
+ #html-body header,.adminhtml-smartslider3-index #footer,.adminhtml-smartslider3-index .footer,.smartslider3-index-index footer{display:none}#html-body #anchor-content{padding-top:30px}.n2-definition-list dt.n2-ss-slider-ordering{color:#fff;background-color:#485769}.n2-definition-list dt.n2-ss-slider-ordering>div{padding:0 30px}.n2-definition-list .n2-ss-slider-ordering .n2-button{min-width:28px;line-height:28px;height:28px;margin-left:10px;background-color:#54667b;color:#fff}.n2-definition-list .n2-ss-slider-ordering .n2-button.n2-active{background:#1999e3}.n2-definition-list dt.n2-ss-slider-ordering .n2-actions{background-color:#485769;padding-top:16px}.n2-definition-list .n2-ss-slider-ordering>.n2-actions a{display:inline-block;padding:0}.n2-definition-list .n2-ss-slider-ordering>.n2-actions .n2-i{vertical-align:top}.n2-ss-slide2-list li .n2-actions .n2-i-delete,.n2-ss-slide2-list li .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li .n2-actions .n2-i-star{visibility:hidden}.n2-ss-slide2-list li .n2-actions .n2-i-star.n2-active,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-delete,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-duplicate,.n2-ss-slide2-list li:HOVER .n2-actions .n2-i-star{visibility:visible}#n2-ss-item-container{text-align:center;padding:12px}#n2-ss-item-container div{display:inline-block}.n2-ss-core-item{margin:3px;padding:0 11px;background-color:#6b7986;color:#fff;line-height:24px;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#n2-ss-layers-items-list{position:relative}#n2-ss-layers-items-list>ul{border-top:1px solid #343f4c;overflow:hidden}#n2-ss-layers-items-list .sortable-placeholder{background-color:#2b343f;border-bottom:1px solid #343f4c;border-width:0 0 1px}#n2-ss-layers-items-list>p{color:#fff;font-size:14px;text-align:center}#n2-ss-layers-items-list>p i{font-size:16px}.n2-has-layers #n2-ss-layers-items-list>p{display:none}.n2-ss-layer-row{border-bottom:1px solid #343f4c}.n2-ss-layer-row.n2-parent-active{background:#49586a}.n2-ss-layer-row.n2-active{background:#1999e3}.n2-ss-layer-row li{border-bottom:0}.n2-ss-layer-title{display:block;line-height:39px;position:relative;cursor:pointer}.n2-ss-layer-title span{margin:0 82px;cursor:text}.n2-ss-layer-row .n2-inline-form{margin:0 82px}.n2-ss-layer-row .n2-inline-form input{background:#3c4958 0 0;color:#b2bfc9;font-size:11px;border:2px solid #343f4c;line-height:24px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-ss-layer-row .n2-inline-form input:focus{box-shadow:none}.n2-ss-layer-title .n2-actions{position:absolute;top:0;right:0;padding:0 6px;cursor:default}.n2-ss-layer-title .n2-actions-left{position:absolute;top:0;left:0;padding:0 0 0 16px;cursor:default;font-size:16px;line-height:16px;margin-top:11px}html[dir=rtl] .n2-ss-layer-title .n2-actions-left{padding:0 16px 0 0}.n2-ss-layer-row.n2-active .n2-ss-layer-title,.n2-ss-layer-row.n2-active .n2-ss-layer-title .n2-actions .n2-i,.n2-ss-layer-row.n2-active .n2-ss-layer-title .n2-actions-left .n2-i,.n2-ss-layer-row.n2-parent-active .n2-ss-layer-title,.n2-ss-layer-row.n2-parent-active .n2-ss-layer-title .n2-actions .n2-i,.n2-ss-layer-row.n2-parent-active .n2-ss-layer-title .n2-actions-left .n2-i{color:#fff}.n2-ss-animation-title .n2-actions a,.n2-ss-animation-title .n2-actions-left a,.n2-ss-layer-title .n2-actions a,.n2-ss-layer-title .n2-actions-left a{display:inline-block;height:100%}li.n2-ss-layer-row a.n2-ss-parent-unlink{display:none}li.n2-ss-layer-row.n2-parent-active a.n2-ss-parent-unlink{display:inline-block}.n2-ss-animation-title .n2-actions-left i,.n2-ss-layer-title .n2-actions-left i{padding:0 2px;vertical-align:middle}.n2-ss-layer-title .n2-i-order{cursor:move}.n2-ss-animation-row{list-style:none;color:#b2bfc9}.n2-ss-animation-title{position:relative;line-height:39px;cursor:pointer;text-transform:capitalize;background-color:#3c4958}.n2-ss-animation-title span{padding:0 40px}.n2-ss-animation-title .n2-actions{position:absolute;right:0;top:0;cursor:default;padding:0 6px}.n2-ss-animation-title .n2-actions-left{position:absolute;top:0;left:0;padding:0 16px;cursor:default;font-size:16px;line-height:38px}.smartslider-advanced-layer-mode-active #layersanditems li.layer-orderable.item-active.active .layerTitle{border-left:5px solid #eef3f8}#layeritemeditorpanel,#smartslider-slide-toolbox-layer .n2-sidebar-pane-sizer{visibility:hidden}.n2-has-layers #layeritemeditorpanel,.n2-has-layers #smartslider-slide-toolbox-layer .n2-sidebar-pane-sizer{visibility:visible}#layeritemeditorpanel>.n2-form{margin-bottom:0}#layeritemeditorpanel .n2-form-element-radio .n2-radio-option{margin:5px}#layer-animation-chain-in,#layer-animation-chain-out{position:relative}#layer-animation-chain-in .sortable-placeholder,#layer-animation-chain-loop .sortable-placeholder,#layer-animation-chain-out .sortable-placeholder{background-color:#2b343f;border-bottom:1px solid #343f4c;border-width:0 0 1px}#layer-animation-chain-in .n2-td,#layer-animation-chain-loop .n2-td,#layer-animation-chain-out .n2-td{vertical-align:middle}#n2-tab-smartslider-editor{background-color:#f9fafb}#n2-tab-smartslider-editor.n2-ss-theme-dark{background-color:#343f4c}#n2-tab-smartslider-editor .n2-heading-controls{z-index:9}.n2-ss-preview-mode #n2-tab-smartslider-editor .n2-heading-controls,.n2-ss-preview-mode .n2-main-top-bar{visibility:hidden}#n2-ss-preview{vertical-align:top;margin:12px 20px 0}.n2-ss-snap-to-parent{height:54px;width:100%}#n2-ss-control-line{display:none;position:relative;background-color:#f2f5fa;height:54px;white-space:nowrap;overflow:hidden}.n2-has-layers #n2-ss-control-line{display:block}#n2-ss-control-line:HOVER{width:605px;z-index:1000;overflow:visible}#n2-ss-control-line>div{margin:0 5px;display:inline-block;vertical-align:middle;height:28px;line-height:28px}#n2-ss-control-line>div.n2-form-element-text{height:24px;line-height:24px;position:relative}#n2-ss-control-line .n2-text-sub-label{font-size:16px}#n2-ss-show-on-device.n2-active .n2-i:before{content:"\e60f"}#n2-ss-control-line .n2-radio-option{background-color:#a1aeb5;border-left:1px solid #8c99a1}#n2-ss-control-line .n2-radio-option.n2-first{border-left-width:0}#n2-ss-control-line .n2-radio-option.n2-active{background-color:#1999e3;border-color:#1999e3}#n2-ss-control-line .n2-radio-option.n2-sub-active{background-color:#5cba3c;border-color:#5cba3c}#n2-ss-control-line #n2-ss-theme.n2-active,#n2-ss-control-line .n2-button,#n2-ss-parent-linker,#n2-ss-theme{width:28px;height:28px;line-height:28px;padding:0;background-color:#a1aeb5}#n2-ss-control-line .n2-button.n2-active{background-color:#1999e3}#n2-ss-control-line .n2-button.n2-sub-active{background-color:#5cba3c}#n2-ss-control-line .ui-autocomplete{max-width:100%}#n2-ss-theme.n2-active .n2-i:before{content:"\e64c"}#n2-ss-zoom{width:280px;text-align:center;vertical-align:middle}.n2-ss-slider-zoom-container{position:relative;display:inline-block;vertical-align:middle;width:150px;height:34px;padding:0 23px}.n2-ss-slider-zoom-container>.n2-i{position:absolute;top:9px;color:#a1aeb5;font-size:16px;cursor:pointer}.n2-ss-slider-zoom-container .n2-i-minus{left:-18px}.n2-ss-slider-zoom-container .n2-i-plus{right:-18px}.n2-ss-slider-zoom-bg{position:absolute;left:0;top:50%;margin-top:-3px;width:100%;background:#b9c3c9;height:6px;border-radius:3px}#n2-ss-slider-zoom{height:100%;position:relative;margin:0;background:0 0;border-radius:0}#n2-ss-slider-zoom .ui-slider-range,.n2-ss-preview-mode .n2-ss-layer.n2-highlight .ui-item-overlay,.n2-ss-preview-mode .n2-ss-layer.n2-highlight2 .ui-item-overlay{display:none}#n2-ss-slider-zoom .ui-slider-handle{position:absolute;top:50%;display:block;width:43px;height:18px;margin-top:-11px;margin-left:-23px;background-color:#fff;border:2px solid #b9c3c9;border-radius:3px;z-index:2;color:#7b8898;font-size:10px;text-align:center;line-height:18px;cursor:pointer}.n2-ss-slider-zoom-1{position:absolute;left:50%;top:0;margin-left:-1.5px;width:3px;height:100%;background-color:#b9c3c9}#n2-ss-lock{display:inline-block;position:absolute;right:-36px;top:9px;cursor:pointer;line-height:16px}#n2-ss-lock .n2-i{color:#a1aeb5;font-size:16px}#n2-ss-lock.n2-active .n2-i:before{content:"\e609"}#n2-ss-devices .n2-table{font-size:32px;color:#b1bcc3;float:right;margin:0 10px}html[dir=rtl] #n2-ss-devices .n2-table{float:left}#n2-ss-devices .n2-td{height:54px;vertical-align:middle;padding:0 15px;cursor:pointer}#n2-ss-devices .n2-td.n2-active{cursor:default;color:#44abe8}.n2-i-devices:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAAAeCAMAAABzNtkNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACdlBMVEUAAAChrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeOhrrWhrrWhrrWhrrWhrrUZmeMZmeMZmeMZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrUZmeOhrrUZmeOhrrUZmeOhrrWhrrUZmeMZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrWhrrWhrrUZmeMZmeMZmeOhrrUZmeOhrrUZmeMAAAA99lBfAAAA0XRSTlMAJ6DHzCgytbY2MLMnoMfMKDK1tjYws5+ytLGfsrSxxh0ixh0il5qXmgY7a5SvvspsB2aHBjtrlK++ymwHZod+wiN+wiMSgbh6SiYQAnl9DBKBuHpKJhACeX0MNbmdQwQzNbmdQwQzRrtLAUa7SwHIpRWkyKUVpJgKUqLDnk2YClKiw55Nhq2KhIatioTLLlgOT8suWA5PcH9ZX3B/WV+sJcQqrqwlxCquKSmjXqNeV1eRiZGJCQmIiLq6AzQDNIK3SYK3SSQkCG2hCG2hsLA3NxRx1r0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAAE0UlEQVRo3s2a+18UVRTAN/eYJLmHJCAjS4pehG4vQrcHhq0bCrFu6BKkRmq+JSNTpBQpVlnjEY+wtAglFIjeWmCWZb7t8Se109z57Mzcc+eBLrPnl7nn3DOP8/3MvXPPueNyWZSbprhBKO4pU9W+N0+jnFJuIS47PVXrlDrd6gPp5NYZHhSKZ0aa2ve2mZRT+u3EZTMytU6ZGZafKAsMJUvtewftk0Jcdpbe6c4JEstGQ8lW+95F+6QTl52td7rb8hO5wagX7tFopC9pBZijVnPA8DYG4kGjXrxXo5G+pBXxPrWai4a3MY9X0BvT7te/Ow+IiNm5jRETtN4b0x7UvzsPiYiJ9YfzHsmfO8/rnTc3/9G8x6jQHhcNySd4YryTiBjnJ5AnC54qnL/A51swv/Dpgmeo0J4VDcnneGK8k4gY58ckp2ih+rEXFj3PExPPYhQx4vTrIJZbvEj92IuKX+CJiWcxihhxug1i/sVegMCLJUuWlpYuXVJSFgDwvlRuKWSqyxYxY12W4DIfYujliuUrwuEVyysqQ4i+V6oshUx12SJG6tWvAqxctTpuX71qJcC015KFWM3riGvWrosb1q1dgzjzDceIrXfDho2btD2bNm4A9/rkILbZg1u2btPatm3dgp7NDhGrroU3t/O+298Cd3UyEKupw7d38GfueAc9NY4Q8wdg5y5ZLa3f3dDw7nvsddu1EwJ+54kFQ7hnr9wMN+5ranr/A/a67d2DoaATxJohwub40v3y1+oAQ1YegWbnibVglM3x4YPy1+pDhqwqii0OEMtp9bYxrR7c7R0d7W74iBnavK05ThPL7fR1sWYjerp7ero9+DEzdPk6cyefWC8cUrQs+EQ6fBpPEhdDr9PEDuMRpZmNn0mHz+NJ4jI8PPnE+uALReuHDunQAf2K5Sgcc5rYAH6pNAexRzr04KBiOY4nJp9YBI6KiQ05TyyKx8XEhp0g1gtFijYij8qv4qPyUDKMymKlOSqPyq/jo/KIE6MyNvMPMe0bZeavZ4ah5Jj5h1nzW2Xmb2SGYUdm/tjqok9ZXXwnry6+L5X18r7kWF0MKKuLH+TVxY9hWa8acGR18f8K9iRD1j7S37+7ngE7ya9gE1G7MCMmrWBPMWTdo4OD+xoZsFP8CjYRtQtCj2VJI1SWNAK12ixpvwjYT4nOkkapLGkU67RZ0kERsJ8TkImPlegz8ZIxLhM3kERn4uMV+ky8YpzLxA3khld7xqRqz+m4/bRU7Un5xSwUQ2I3sAZbMy5Ve87EDWekak/6r0ahmRK7vhqs/7dYRfFsGaso/l52FqC1SFtRtLkz0mw2cu0QcwX/iFUUz1WyiuKflecQO4u1FUWbOyMtZiPXhJjLdV5ftT6vO9XO7putvSQLTjG5oK9aX9A52Nl9s7WXJNYv5l3Kj0g7I5H8S3kXuVOnXq4V86q9rNnhVYVNN3nXhgZjYi7XlYKrhVFpZyRaeLXgCteddq1OzKvuWpogbLrJuzY1GcE2FTkscXAJIWZD5LDEwSU1MTMrgF+t+iebmJkVMahWgxMhZmGv7C967KYSrql6p4n+RaCKkZqnNfI3PXYzCddMvZP1vwjsEGs7RgGbRf2p8k9AB2yif6rYIdZ1ggI2m/pT5d+QDljGf3zSNGZGqKPpAAAAAElFTkSuQmCC)}.n2-i-devices-all:before{background-position:0 0}.n2-i-devices-desktop:before{background-position:-40px 0}.n2-i-devices-tablet:before{background-position:-80px 0}.n2-i-devices-phone:before{background-position:-120px 0}.n2-active>.n2-i-devices-all:before{background-position:-160px 0}.n2-active>.n2-i-devices-desktop:before{background-position:-200px 0}.n2-active>.n2-i-devices-tablet:before{background-position:-240px 0}.n2-active>.n2-i-devices-phone:before{background-position:-280px 0}.ui-item-overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.n2-ss-layer.n2-highlight .ui-item-overlay,.n2-ss-layer.n2-highlight2 .ui-item-overlay{display:block;background-color:RGBA(0,132,255,.4)}.n2-ss-item-html .ui-item-overlay,.n2-ss-item-iframe .ui-item-overlay{display:block}.n2-ss-layer .n2-ss-layer-align-marker{position:absolute;left:auto;right:auto;top:auto;bottom:auto;width:4px;height:4px;background-color:#fff;border:#1999e3 4px solid;z-index:89}.n2-ss-layer[data-align=left] .n2-ss-layer-align-marker{left:0}.n2-ss-layer[data-align=center] .n2-ss-layer-align-marker{left:50%;margin-left:-6px}.n2-ss-layer[data-align=right] .n2-ss-layer-align-marker{right:0}.n2-ss-layer[data-valign=top] .n2-ss-layer-align-marker{top:0}.n2-ss-layer[data-valign=middle] .n2-ss-layer-align-marker{top:50%;margin-top:-6px}.n2-ss-layer[data-valign=bottom] .n2-ss-layer-align-marker{bottom:0}.n2-ss-layer[data-align=left][data-valign=top] .n2-ss-layer-align-marker{border-bottom-right-radius:0}.n2-ss-layer[data-align=left][data-valign=middle] .n2-ss-layer-align-marker{border-bottom-right-radius:0;border-top-right-radius:0}.n2-ss-layer[data-align=left][data-valign=bottom] .n2-ss-layer-align-marker{border-top-right-radius:0}.n2-ss-layer .ui-resizable-handle{background-image:none}.n2-ss-layer .ui-resizable-n{top:0;height:8px;border-top:2px solid #1999e3}.n2-ss-layer.n2-ss-layer-small .ui-resizable-n{height:0}.n2-ss-layer .ui-resizable-e{right:0;width:8px;border-right:2px solid #1999e3}.n2-ss-layer.n2-ss-layer-small .ui-resizable-e{width:0}.n2-ss-layer .ui-resizable-s{bottom:0;height:8px;border-bottom:2px solid #1999e3}.n2-ss-layer.n2-ss-layer-small .ui-resizable-s{height:0}.n2-ss-layer .ui-resizable-w{left:0;width:8px;border-left:2px solid #1999e3}.n2-ss-layer.n2-ss-layer-small .ui-resizable-w{width:0}.n2-ss-layer .ui-resizable-ne,.n2-ss-layer .ui-resizable-nw,.n2-ss-layer .ui-resizable-se,.n2-ss-layer .ui-resizable-sw{height:10px;width:10px}.n2-ss-layer.n2-ss-layer-small .ui-resizable-ne,.n2-ss-layer.n2-ss-layer-small .ui-resizable-nw,.n2-ss-layer.n2-ss-layer-small .ui-resizable-se,.n2-ss-layer.n2-ss-layer-small .ui-resizable-sw{height:2px;width:2px}.n2-ss-layer .ui-resizable-ne{right:0;top:0}.n2-ss-layer .ui-resizable-se{right:0;bottom:0}.n2-ss-layer .ui-resizable-sw{left:0;bottom:0}.n2-ss-layer .ui-resizable-nw{left:0;top:0}.n2-ss-layer-quick-handle{position:absolute;top:7px;right:7px;cursor:pointer;width:14px;height:26px;border-radius:3px;background:RGBA(43,52,63,.9);text-align:center;font-size:16px!important;line-height:26px!important;color:#fff;overflow:hidden}.n2-ss-layer-quick-panel{position:absolute;z-index:1000;width:72px;height:28px;margin:-6px 0 0 -34px;padding:5px}.n2-ss-layer-locked .n2-ss-layer-quick-handle{display:none}.n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option{display:inline-block;cursor:pointer;width:26px;height:26px;border-radius:3px;background:RGBA(43,52,63,.9);text-align:center;font-size:16px!important;line-height:26px!important;color:#fff;margin:1px;vertical-align:top}.n2-ss-layer-quick-panel .n2-ss-layer-quick-panel-option-center{width:14px;overflow:hidden}.n2-ss-layer-small .n2-ss-layer-quick-handle{display:none}.n2-ss-layer.n2-ss-picking-on-layer{z-index:1000000!important}.n2-ss-position-display{display:none;position:absolute;border-radius:3px;z-index:10000;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:rgba(43,52,63,.9)}.n2-ss-position-display.n2-active{display:block}#n2-ss-timeline .n2-form-element-text{margin:0 10px;line-height:2px}#n2-ss-timeline .n2-text-sub-label{width:30px;text-align:center;overflow:hidden}.n2-ss-timeline-current-time{vertical-align:middle;font-size:20px;margin:0 20px;font-family:"Lucida Console",Monaco,monospace}.n2-ss-timeline-sidebar-top .n2-ss-timeline-control{position:absolute;top:10px;right:5px;margin:0 10px}html[dir=rtl] .n2-ss-timeline-sidebar-top .n2-ss-timeline-control{right:auto;left:5px}.n2-ss-timeline-sidebar-top .n2-ss-timeline-control .n2-button+.n2-button{margin:0 0 0 5px}html[dir=rtl] .n2-ss-timeline-sidebar-top .n2-ss-timeline-control .n2-button+.n2-button{margin:0 5px 0 0}.n2-ss-layer .n2-ss-layer-align-marker,.n2-ss-layer .ui-resizable-handle,.n2-ss-layer-quick-handle{opacity:0}.n2-ss-layer.n2-highlight .n2-ss-layer-align-marker,.n2-ss-layer.n2-highlight .ui-resizable-handle,.n2-ss-layer:HOVER .n2-ss-layer-align-marker,.n2-ss-layer:HOVER .n2-ss-layer-quick-handle,.n2-ss-layer:HOVER .ui-resizable-handle,.n2-ss-move-layer .ui-resizable-handle,.n2-ss-resize-layer .ui-resizable-handle{opacity:1}#n2-ss-0 .n2-ss-slide-border{display:none;position:absolute;background:#a1aeb5;width:1px;height:1px}#n2-ss-0:HOVER .n2-ss-slide-border,div#n2-ss-0:HOVER .n2-ss-static-slide.n2-ss-currently-edited-slide{display:block}div#n2-ss-0:HOVER .n2-ss-static-slide{display:none}#n2-ss-0 .n2-ss-slide-border-left{left:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-right{right:0;top:0;height:100%}#n2-ss-0 .n2-ss-slide-border-top{left:0;top:0;width:100%}#n2-ss-0 .n2-ss-slide-border-bottom{left:0;bottom:0;width:100%}#n2-ss-0 .n2-ss-layer{cursor:not-allowed}#n2-ss-0 .n2-ss-currently-edited-slide .n2-ss-layer{cursor:move;background:RGBA(0,0,0,0)}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked{cursor:auto}.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer{cursor:default}#n2-ss-0 .n2-ss-slide.n2-ss-slide-active .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-align-marker,#n2-ss-0 .n2-ss-static-slide .n2-ss-layer.n2-ss-layer-locked .n2-ss-layer-align-marker,.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer-align-marker,.n2-ss-preview-mode #n2-ss-0 .n2-ss-layer-quick-handle,.n2-ss-preview-mode #n2-ss-0 .ui-resizable-handle{display:none}.n2-ss-item{position:relative;float:left;width:100%}.n2-ss-item-area,.n2-ss-item-video,.n2-ss-item-vimeo,.n2-ss-item-youtube{height:100%}#smartslider-slide-toolbox-layer{position:relative}#layeritemdraggable{top:0;left:0;height:10px;width:100%;background:#f04040;cursor:ns-resize}.n2-grid{background:#4affff;position:absolute;left:0;top:0;z-index:1000000;display:none}.n2-grid-h{width:100%;height:1px}.n2-grid-v{height:100%;width:1px}ul.animation-list{margin:0;padding:0 0 20px}ul.animation-list li{margin:0;padding:0;background:#eef3f8}ul.animation-list li.sortable-animation{border-bottom:1px solid #cdd1d6}.n2-lightbox-sidebar-list{overflow-y:auto}#n2-ss-timeline{position:relative;margin-bottom:200px;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none}#n2-ss-timeline .n2-ss-timeline-animation-buttons{width:84px;height:36px;position:fixed;left:100px;top:200px;font-size:16px;line-height:16px;padding:3px 2px;display:none}#n2-ss-timeline .n2-ss-timeline-animation-buttons.n2-active{display:block}#n2-ss-timeline .n2-ss-timeline-animation-buttons .n2-button{width:24px;padding:0;margin:0 2px}#n2-ss-timeline-table .n2-td{position:relative;vertical-align:top}.n2-ss-timeline-content{border-left:1px solid #d2d5d8}#n2-ss-timeline-table .n2-ss-timeline-sidebar{width:310px}#n2-ss-timeline-table .n2-ss-timeline-content-container{overflow:hidden;width:100%;background-color:#fff}#n2-ss-timeline-table .n2-ss-timeline-content-scrollable{position:relative;overflow:hidden;width:2000px;border-right:1px solid #d2d5d8}#n2-ss-timeline-table .n2-ss-timeline-content-timeframe{height:31px;border-bottom:1px solid #d2d5d8;z-index:9}#n2-ss-timeline-table .n2-ss-timeline-content-timeframe .n2-time-marker{position:relative;width:195px;height:100%;padding-left:5px;float:left;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAgAgMAAAAqId/iAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEUAAADp6+0AAADJOcyhAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAlSURBVDjLY3BgIBmMahnVMrK1kESMaiFDCwuJxKgWemgJJRkAAD7BO1tByKplAAAAAElFTkSuQmCC);color:#7b8898}html[dir=rtl] #n2-ss-timeline-table .n2-ss-timeline-content-timeframe .n2-time-marker{float:right;padding-left:0;padding-right:5px;background-position:-1px 0}.n2-ss-timeline-scrollbar-wrapper{background-color:#cacdd4;padding:1px 2px 1px 1px;border:1px solid #c0c3c9;height:12px;z-index:10}.n2-ss-timeline-scrollbar-wrapper .track{position:relative;height:12px}.n2-ss-timeline-scrollbar-wrapper .thumb{position:absolute;top:0;background:#eef0f3;height:10px;cursor:default;width:20px;z-index:2;border:1px solid #a8abaf;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-ss-timeline-sidebar-top{position:relative;padding:10px 5px 9px;height:28px;background-color:#f9fafb;border-bottom:1px solid #dee1e5}.n2-ss-timeline-sidebar-top .n2-h2{line-height:28px;color:#6b7989;padding:0 15px}.n2-ss-timeline-sidebar-top .n2-form-element-text{margin:0}.n2-ss-timeline-sidebar-layers-container{height:200px}.n2-ss-timeline-sidebar-layers-container .ui-resizable-handle{border:1px solid #ccd1d6;bottom:-28px;left:-1px;height:20px;border-radius:3px;background:#f9fafb;color:#7b8898;font-size:32px;text-align:center;line-height:20px}.n2-ss-timeline-sidebar-layers{position:relative;height:100%;overflow-x:hidden;overflow-y:auto}.n2-ss-timeline-content-layers-container{height:200px;overflow:hidden}.n2-ss-timeline-layer{padding:0 15px;background-color:#f9fafb;color:#7b8898;text-transform:capitalize;cursor:pointer;position:relative}.n2-ss-timeline-layer.n2-active{background-color:#1681c1;color:#fff}.n2-ss-timeline-layer-buttons{display:none;font-size:16px;line-height:16px;padding:3px 2px;position:absolute;right:5px;top:4px}html[dir=rtl] .n2-ss-timeline-layer-buttons{right:auto;left:5px}.n2-ss-timeline-layer-buttons .n2-button{width:24px;padding:0;margin:0 2px}.n2-ss-timeline-content-layers{overflow:hidden;width:200%;background-color:#fff;position:relative}.n2-ss-timeline-content-layers,.n2-ss-timeline-layer{height:39px;line-height:39px;border-bottom:1px solid #dee1e5}.n2-ss-timeline-content-layers{white-space:nowrap}.n2-ss-timeline-content-layers>div{display:inline-block}.n2-ss-layer-animation{position:relative;margin:7px 0;width:200px}.n2-ss-layer-animation,.n2-ss-layer-extra-animation{float:left;height:25px;background:#1999e3;border:1px solid #0c70ab;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:ew-resize}html[dir=rtl] .n2-ss-layer-animation{float:right}.n2-ss-layer-animation-loop{background:#5cba3c;border:1px solid #4c9b31}.n2-ss-layer-animation-out{background:#b3b9bf;border:1px solid #949ba4}.n2-ss-layer-extra-animation{position:absolute;left:0;top:0;margin:7px 0 7px 20px;width:30px;background-color:#343f4c;border-color:#6b7986}.n2-ss-timeline-content-layers,.n2-ss-timeline-content-timeframe{padding-left:20px}html[dir=rtl] .n2-ss-timeline-content-layers,html[dir=rtl] .n2-ss-timeline-content-timeframe{padding-left:0;padding-right:20px}.n2-ss-layer-animation .ui-resizable-e{right:0}.n2-ss-layer-animation .ui-resizable-w{left:0}html[dir=rtl] .n2-ss-layer-animation .ui-resizable-e{right:auto;left:0}html[dir=rtl] .n2-ss-layer-animation .ui-resizable-w{left:auto;right:0}.n2-ss-animation-duration{display:block;width:100%;line-height:23px;color:#fff;text-align:center;cursor:ew-resize}.n2-ss-animation-delay{position:absolute;line-height:23px;color:#7b8898;text-align:right;right:100%;margin-right:5px}html[dir=rtl] .n2-ss-animation-delay{right:auto;margin-right:0;left:100%;margin-left:5px}.n2-ss-timeline-cti,.n2-ss-timeline-duration-marker{position:absolute;height:100%;margin-left:20px;cursor:ew-resize}.n2-ss-timeline-duration-marker{background:RGBA(0,0,0,.05);left:0;top:0;z-index:2;border-left:1px dashed #b6bcc1;width:10px}.n2-ss-timeline-cti{left:-10px;top:3px;z-index:3;width:0;border-left:1px solid #828d9b}html[dir=rtl] .n2-ss-timeline-cti{left:auto;right:-10px;margin-left:0;margin-right:20px}.n2-ss-timeline-cti-dot{position:relative;left:-6px;top:0;width:11px;height:11px;border-radius:0 50% 50% 50%;transform:rotate(-135deg);background:#4d5d70}html[dir=rtl] .n2-ss-timeline-cti-dot{left:auto;right:-5px}.n2-ss-timeline-helper{position:absolute;top:-1px;width:100%;height:1px;overflow:hidden;padding-left:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.n2-ss-timeline-control{text-align:right;color:#fff;padding:0 10px;vertical-align:top}#n2-ss-timeline .n2-ss-timeline-control{padding:0}.n2-ss-timeline-control .n2-button{padding:0;width:28px;font-size:16px;vertical-align:middle}.n2-generator-functions-container .n2-ss-timeline-control .n2-button i{line-height:inherit}.n2-ss-timeline-control .n2-play.n2-active i:before{content:"\e606"}#n2-tab-widgets{border-bottom:0;margin-bottom:1000px}.n2-i-edit.n2-active{color:#1999e3}.n2-generator-insert-variable .n2-variable-container{height:90px;overflow:auto}.n2-generator-insert-variable .n2-group-container{height:40px;overflow:auto}.n2-generator-insert-variable .n2-group-container .n2-button,.n2-generator-insert-variable .n2-variable-container .n2-button{margin:3px}.n2-generator-insert-variable .n2-group-container .n2-button.n2-active,.n2-generator-insert-variable .n2-variable-container .n2-button.n2-active{background:#1999e3}.n2-generator-result-container{height:100px;overflow:auto;margin:0 3px}.n2-slide-published{position:absolute;top:11px;right:3px}.n2-i-unpublished{color:#c44e3d}.n2-slide-published{font-size:16px}.n2-box.n2-first-slide:HOVER .n2-slide-first,.n2-slide-first,.n2-slide-is-first{display:none}.n2-box:HOVER .n2-slide-first,.n2-first-slide .n2-slide-is-first{display:inline-block}.n2-slide-duplicate{margin-right:5px}html[dir=rtl] .n2-slide-duplicate{margin-right:0;margin-left:5px}.n2-slide-delete,.n2-slide-duplicate,.n2-slide-selected{padding:0;width:24px}.n2-sidebar #n2-ss-slides{position:relative;margin-right:-1px}.n2-sidebar #n2-ss-slides .n2-box{width:45.5%;height:135px;margin:2.2%;background:#3c4958;border:0}.n2-sidebar #n2-ss-slides .n2-box.n2-ss-slide-active{box-shadow:0 0 0 3px #1999e3}.n2-sidebar #n2-ss-slides .n2-box .n2-box-button{text-align:left}.n2-sidebar #n2-ss-slides .n2-box .n2-box-placeholder{height:40px}.n2-sidebar #n2-ss-slides .n2-box.ui-sortable-helper{transform:scale(.8)}.n2-sidebar #n2-ss-slides .n2-box-placeholder{background:RGBA(43,52,63,.9)}.n2-sidebar #n2-ss-slides .n2-box-placeholder a{color:#cedae2}.n2-ss-slides-control{position:relative;padding:22px 10px;border-bottom:1px solid RGBA(0,0,0,.3)}.n2-ss-slides-control .n2-button{margin:0 10px}.n2-slides-bulk{min-width:0;padding:0;width:36px}.n2-slides-bulk .n2-i{font-size:32px}.n2-add-quick-image{width:266px}.n2-button-menu-inner .n2-add-quick-image{width:auto}.n2-slides-add{vertical-align:top}.n2-bulk-action,.n2-bulk-cancel,.n2-bulk-select,.n2-slide-bulk-mode .n2-slides-add,.n2-slide-bulk-mode .n2-slides-bulk,.n2-slide-selected{display:none;min-width:0;vertical-align:top}.n2-sidebar #n2-ss-slides .n2-box-slide-add,.n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload{display:inline-block;color:#b2bfc9;border:2px dashed #73818c;background:0 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-align:center;line-height:131px}.n2-sidebar #n2-ss-slides .n2-box-slide-drag-upload{display:none;position:absolute;z-index:3;left:0;top:0;width:420px;height:90%;background-color:#4d5d70;border:0;box-shadow:0 0 0 3px #1999e3}.n2-sidebar #n2-ss-slides .n2-drag-over .n2-box-slide-drag-upload{display:block}.n2-sidebar #n2-ss-slides.n2-ss-has-slides .n2-box-slide-add{display:none}.n2-slide-bulk-mode .n2-box-slide .n2-box-rt,.n2-slide-bulk-mode .n2-box-slide.n2-active .n2-slide-selected,.n2-slide-bulk-mode .n2-bulk-action,.n2-slide-bulk-mode .n2-bulk-cancel,.n2-slide-bulk-mode .n2-bulk-select{display:inline-block}.n2-slide-bulk-mode .n2-box-slide{opacity:.5}.n2-slide-bulk-mode .n2-box-slide.n2-active{opacity:1}.n2-box-slide .n2-button.n2-sidebar-list-bg:HOVER{background-color:#1999e3}.n2-slide-bulk-mode .n2-box-slide .n2-slide-delete,.n2-slide-bulk-mode .n2-box-slide .n2-slide-duplicate,.n2-slide-bulk-mode .n2-box-slide .n2-slide-first,.n2-slide-bulk-mode .n2-box-slide .n2-slide-generator,.n2-slide-bulk-mode .n2-box-slide .n2-slide-published,.n2-ss-live-preview.n2-active .n2-button{display:none}.n2-slide-bulk-mode .n2-box-slide .n2-slide-published.n2-active,.n2-widget-area{display:inline-block}.n2-ss-live-preview span{text-decoration:line-through;vertical-align:middle}.n2-ss-live-preview .n2-button,.n2-widget-area{vertical-align:middle;margin:0 20px}.n2-ss-live-preview.n2-active span{text-decoration:none}.n2-widget-area{width:80px;height:80px;position:relative;margin:0 10px}.n2-form .n2-widget-area{margin-bottom:10px}.n2-widget-area-inner{position:absolute;top:14px;left:14px;width:46px;height:46px;border:3px solid #bbc3cc;border-radius:3px}.n2-widget-area .n2-area{position:absolute;background-color:#a1aeb5;border-radius:2px;cursor:pointer;width:10px;height:10px;left:0;top:0}.n2-widget-area .n2-area.n2-active{background-color:#1999e3;cursor:default}.n2-widget-area .n2-area-1{left:35px}.n2-widget-area .n2-area-2{left:21px;top:21px}.n2-widget-area .n2-area-3{left:35px;top:21px}.n2-widget-area .n2-area-4{left:49px;top:21px}.n2-widget-area .n2-area-5{top:35px}.n2-widget-area .n2-area-6{left:21px;top:35px}.n2-widget-area .n2-area-7{left:49px;top:35px}.n2-widget-area .n2-area-8{left:70px;top:35px}.n2-widget-area .n2-area-9{left:21px;top:49px}.n2-widget-area .n2-area-10{left:35px;top:49px}.n2-widget-area .n2-area-11{left:49px;top:49px}.n2-widget-area .n2-area-12{left:35px;top:70px}.n2-ss-slider-publish{border-collapse:collapse;overflow:hidden}.n2-ss-slider-publish .n2-td{text-align:center;border-right:1px solid #ccd1d6;color:#6b7989;padding:48px 0 0}html[dir=rtl] .n2-ss-slider-publish .n2-td{border-left:1px solid #ccd1d6}.n2-ss-slider-publish .n2-td .n2-h2 a{color:#6b7989}.n2-ss-slider-publish .n2-td.n2-last{border-right:0;border-left:0}.n2-ss-slider-publish div.n2-h2{line-height:30px;font-size:18px}.n2-ss-slider-publish div.n2-h4{line-height:26px}.n2-ss-slider-publish .n2-code{display:inline-block;padding:16px 30px;line-height:20px;border-radius:3px;background-color:#f5e293;text-align:left;margin:17px 0;color:#6f653f;font-size:12px;border:0}.n2-ss-slider-publish img{margin-top:17px;margin-bottom:-10px}.n2-ss-generator-modal .n2-modal-content h3{text-align:left}.n2-ss-layer-solo-mode .n2-ss-layer{opacity:.5!important}.n2-ss-layer-solo-mode .n2-ss-layer-solo{z-index:100000000!important;opacity:1!important}.n2-generator-records td div{max-height:100px;overflow:hidden;padding:10px;margin:-10px}.n2-generator-records td:HOVER div{overflow-y:auto;overflow-x:visible}#n2-admin[data-slider-type=block] #n2-tab-widgets,#n2-admin[data-slider-type=block] .n2-fm-autoplay,#n2-admin[data-slider-type=block] .n2-fm-slides{display:none}.n2-ss-container-device{position:relative;margin:0 auto;background-color:#fff;border:1px solid #ccd1d6;border-width:0 1px}.n2-ss-layer-picker{background:#6b7986;color:#fff;font-size:16px;height:28px;line-height:28px;padding:0;text-align:center;width:28px;border-radius:3px;margin:0 10px 10px;cursor:pointer}.n2-ss-layer-picker.n2-active{background:#1999e3}#n2-ss-control-line #n2-ss-parent-linker.n2-under-pick,.n2-ss-layer-picker.n2-under-pick{background-color:#5cba3c}#n2-ss-parent-linker.n2-under-pick .n2-i-layerlink:before,.n2-ss-layer-picker.n2-under-pick .n2-i-layerlink:before{content:"\e64b"}.n2-ss-picker-overlay{position:absolute;left:0;top:0;background:RGBA(25,153,227,.8);cursor:pointer;width:33%;height:33%;z-index:1000000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}.n2-ss-picker-overlay:HOVER{background:RGBA(42,52,63,.9)}.n2-modal.n2-ss-go-pro .n2-modal-window{text-align:center;line-height:2}.n2-modal.n2-ss-go-pro .n2-ss-rate{margin:50px -20px 0;background:url(../images/free/rate.png);height:90px;line-height:90px;color:#fff}.n2-modal.n2-ss-go-pro .n2-ss-rate .n2-h3{display:inline-block;margin-right:30px}.n2-modal.n2-ss-go-pro .n2-modal-controls{margin-bottom:40px}.n2-box-free{background:url(../images/free/box.png)}.n2-box-free .n2-box-placeholder{background:0 0}.n2-box-free .n2-box-button>div{color:#fff}.n2-ss-quick-slides-edit-modal .n2-modal-content table{border-spacing:10px;border-collapse:separate;margin:10px auto}.n2-ss-quick-slides-edit-modal .n2-modal-content table td{padding:0}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label{margin-top:0;margin-bottom:3px}.n2-ss-quick-slides-edit-modal .n2-modal-content .n2-mixed-label label{font-size:11px}#n2-ss-slide-sidebar,.n2-sidebar-inner{width:439px}.n2-ss-create-slider-free-sample{float:left;height:70px;width:170px;cursor:pointer}.n2-ss-create-slider-free-sample:HOVER{background-position:0 -80px}.n2-ss-modal-subscribe>.n2-modal-window{text-align:center}.n2-ss-modal-subscribe .n2-form{margin:0 -20px}.n2-ss-modal-subscribe .n2-h3{margin:0 auto;width:95%;text-align:center;line-height:2}.n2-ss-preview-subscribe .n2-input-button{display:inline-block}.n2-input-button,.n2-ss-modal-subscribe .n2-input-button{display:inline-block;margin-top:20px}.n2-input-button>*,.n2-ss-modal-subscribe .n2-input-button>*,.n2-ss-preview-subscribe .n2-input-button>*{display:inline-block;white-space:nowrap}.n2-input-button input,.n2-input-button input:focus,.n2-ss-modal-subscribe input,.n2-ss-modal-subscribe input:focus,.n2-ss-preview-subscribe input,.n2-ss-preview-subscribe input:focus{margin:0 auto;width:250px;height:36px;border:2px solid #b9c3c9;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;overflow:hidden;padding:0 10px;line-height:36px;box-shadow:none;color:#7b8898;font-size:12px;background:#fff}.n2-input-button .n2-button,.n2-ss-modal-subscribe .n2-input-button .n2-button,.n2-ss-preview-subscribe .n2-input-button .n2-button{border-top-left-radius:0;border-bottom-left-radius:0}.n2-ss-preview-subscribe{position:fixed;left:50%;margin-left:-500px;bottom:-100px;transition:bottom .5s ease;background:url(../images/free/subscribepreview.png);width:1000px;height:90px;z-index:1000}.n2-ss-preview-subscribe.n2-active{bottom:10px}.n2-ss-preview-subscribe-close{position:absolute;top:-12px;right:-12px;width:24px;height:24px;cursor:pointer;background:url(../images/free/close.png) no-repeat center center}.n2-ss-preview-subscribe .n2-input-button{position:absolute;right:20px;top:0;margin-top:28px}
library/media/admin/images/AddLicense.png ADDED
Binary file
library/media/admin/images/Deauthorize.png ADDED
Binary file
library/media/admin/images/Documentation.png ADDED
Binary file
library/media/admin/images/Facebook.png ADDED
Binary file
library/media/admin/images/Help.png ADDED
Binary file
library/media/admin/images/Love.png ADDED
Binary file
library/media/admin/images/Newsletter.png ADDED
Binary file
library/media/admin/images/Update.png ADDED
Binary file
library/media/admin/images/Videos.png ADDED
Binary file
library/media/admin/images/add-demo.png ADDED
Binary file
library/media/admin/images/create-slider.png ADDED
Binary file
library/media/admin/images/dummyslide.png ADDED
Binary file
library/media/admin/images/free/box.png ADDED
Binary file
library/media/admin/images/free/box2.png ADDED
Binary file
library/media/admin/images/free/close.png ADDED
Binary file
library/media/admin/images/free/getpro1.jpg ADDED
Binary file
library/media/admin/images/free/getpro2.jpg ADDED
Binary file
library/media/admin/images/free/newsletter.jpg ADDED
Binary file
library/media/admin/images/free/rate.png ADDED
Binary file
library/media/admin/images/free/sample1.png ADDED
Binary file
library/media/admin/images/free/sample2.png ADDED
Binary file
library/media/admin/images/free/sample3.png ADDED
Binary file
library/media/admin/images/free/subscribepreview.png ADDED
Binary file
library/media/admin/images/import-server.png ADDED
Binary file
library/media/admin/images/import-upload.png ADDED
Binary file
library/media/admin/images/logo.png ADDED
Binary file
library/media/admin/images/magento-publish.png ADDED
Binary file
library/media/admin/images/sliderpresets/block.png ADDED
Binary file
library/media/admin/images/sliderpresets/caption.png ADDED
Binary file
library/media/admin/images/sliderpresets/carousel.png ADDED
Binary file
library/media/admin/images/sliderpresets/default.png ADDED
Binary file
library/media/admin/images/sliderpresets/fullpage.png ADDED
Binary file
library/media/admin/images/sliderpresets/fullwidth.png ADDED
Binary file
library/media/admin/images/sliderpresets/horizontalaccordion.png ADDED
Binary file
library/media/admin/images/sliderpresets/showcase.png ADDED
Binary file
library/media/admin/images/sliderpresets/thumbnailhorizontal.png ADDED
Binary file
library/media/admin/images/sliderpresets/thumbnailvertical.png ADDED
Binary file
library/media/admin/images/sliderpresets/verticalaccordion.png ADDED
Binary file
library/media/admin/images/wordpress-publish.png ADDED
Binary file
library/media/cursor/closedhand.cur ADDED
Binary file
library/media/cursor/openhand.cur ADDED
Binary file
library/media/dist/smartslider-backend.js ADDED
@@ -0,0 +1,7698 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var NextendSmartSliderAdminStorage = function () {
2
+ /** @type {NextendSmartSliderAdminTimelineManager} */
3
+ this.timelineManager = null;
4
+ /** @type {NextendSmartSliderAdminTimelineControl} */
5
+ this.timelineControl = null;
6
+ /** @type {SmartSliderAdminSlide} */
7
+ this.slide = null;
8
+ /** @type {NextendSmartSliderAbstract} */
9
+ this.frontend = null;
10
+ /** @type {SmartSliderAdminGenerator} */
11
+ this.generator = null;
12
+ /** @type {NextendSmartSliderAdminSlideLayerManager} */
13
+ this.layerManager = null;
14
+ /** @type {NextendSmartSliderSlideEditorHistory} */
15
+ this.history = null;
16
+
17
+
18
+ this.oneSecWidth = 200;
19
+ this.oneSecMs = 1000;
20
+ this.fps = 20;
21
+ this.pxToFrame = this.oneSecWidth / this.fps;
22
+
23
+ this.$currentSlideElement = null;
24
+ };
25
+
26
+ NextendSmartSliderAdminStorage.prototype.durationToOffsetX = function (sec) {
27
+ return sec * this.oneSecWidth;
28
+ };
29
+
30
+ NextendSmartSliderAdminStorage.prototype.offsetXToDuration = function (px) {
31
+ return px / this.oneSecWidth;
32
+ };
33
+
34
+ NextendSmartSliderAdminStorage.prototype.normalizeOffsetX = function (offsetX) {
35
+ return Math.round(offsetX / this.pxToFrame) * this.pxToFrame;
36
+ };
37
+
38
+
39
+ NextendSmartSliderAdminStorage.prototype.startEditor = function (sliderElementID, slideContentElementID, isUploadDisabled, uploadUrl, uploadDir, options) {
40
+ if (this.slide === null) {
41
+ window[sliderElementID].started(function(){
42
+ new SmartSliderAdminSlide(sliderElementID, slideContentElementID, isUploadDisabled, uploadUrl, uploadDir, options);
43
+ });
44
+ }
45
+ return this.slide;
46
+ };
47
+
48
+ window.nextend.pre = 'div#n2-ss-0 ';
49
+ window.nextend.smartSlider = new NextendSmartSliderAdminStorage();
50
+ ;
51
+ (function (smartSlider, $, scope) {
52
+
53
+ function NextendBackgroundAnimationManager() {
54
+ this.type = 'backgroundanimation';
55
+ NextendVisualManagerMultipleSelection.prototype.constructor.apply(this, arguments);
56
+ };
57
+
58
+ NextendBackgroundAnimationManager.prototype = Object.create(NextendVisualManagerMultipleSelection.prototype);
59
+ NextendBackgroundAnimationManager.prototype.constructor = NextendBackgroundAnimationManager;
60
+
61
+ NextendBackgroundAnimationManager.prototype.loadDefaults = function () {
62
+ NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this, arguments);
63
+ this.type = 'backgroundanimation';
64
+ this.labels = {
65
+ visual: 'Background animation',
66
+ visuals: 'Background animations'
67
+ };
68
+ };
69
+
70
+ NextendBackgroundAnimationManager.prototype.initController = function () {
71
+ return new NextendBackgroundAnimationEditorController();
72
+ };
73
+
74
+ NextendBackgroundAnimationManager.prototype.createVisual = function (visual, set) {
75
+ return new NextendVisualWithSetRowMultipleSelection(visual, set, this);
76
+ };
77
+
78
+ scope.NextendBackgroundAnimationManager = NextendBackgroundAnimationManager;
79
+
80
+ })(nextend.smartSlider, n2, window);
81
+
82
+ ;
83
+ (function ($, scope) {
84
+
85
+ function NextendBackgroundAnimationEditorController() {
86
+ this.parameters = {
87
+ shiftedBackgroundAnimation: 0
88
+ };
89
+ NextendVisualEditorController.prototype.constructor.call(this, false);
90
+
91
+ this.bgAnimationElement = $('.n2-bg-animation');
92
+ this.slides = $('.n2-bg-animation-slide');
93
+ this.bgImages = $('.n2-bg-animation-slide-bg');
94
+ NextendTween.set(this.bgImages, {
95
+ rotationZ: 0.0001
96
+ });
97
+
98
+ this.directionTab = new NextendElementRadio('n2-background-animation-preview-tabs', ['0', '1']);
99
+ this.directionTab.element.on('nextendChange.n2-editor', $.proxy(this.directionTabChanged, this));
100
+
101
+ if (!nModernizr.csstransforms3d || !nModernizr.csstransformspreserve3d) {
102
+ nextend.notificationCenter.error('Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ')
103
+ }
104
+ };
105
+
106
+ NextendBackgroundAnimationEditorController.prototype = Object.create(NextendVisualEditorController.prototype);
107
+ NextendBackgroundAnimationEditorController.prototype.constructor = NextendBackgroundAnimationEditorController;
108
+
109
+ NextendBackgroundAnimationEditorController.prototype.loadDefaults = function () {
110
+ NextendVisualEditorController.prototype.loadDefaults.call(this);
111
+ this.type = 'backgroundanimation';
112
+ this.current = 0;
113
+ this.animationProperties = false;
114
+ this.direction = 0;
115
+ };
116
+
117
+ NextendBackgroundAnimationEditorController.prototype.get = function () {
118
+ return null;
119
+ };
120
+
121
+ NextendBackgroundAnimationEditorController.prototype.load = function (visual, tabs, mode, preview) {
122
+ this.lightbox.addClass('n2-editor-loaded');
123
+ };
124
+
125
+ NextendBackgroundAnimationEditorController.prototype.setTabs = function (labels) {
126
+
127
+ };
128
+
129
+ NextendBackgroundAnimationEditorController.prototype.directionTabChanged = function () {
130
+ this.direction = parseInt(this.directionTab.element.val());
131
+ };
132
+
133
+ NextendBackgroundAnimationEditorController.prototype.start = function () {
134
+ if (this.animationProperties) {
135
+ if (!this.timeline) {
136
+ this.next();
137
+ } else {
138
+ this.timeline.play();
139
+ }
140
+ }
141
+ };
142
+
143
+ NextendBackgroundAnimationEditorController.prototype.pause = function () {
144
+ if (this.timeline) {
145
+ this.timeline.pause();
146
+ }
147
+ };
148
+
149
+ NextendBackgroundAnimationEditorController.prototype.next = function () {
150
+ this.timeline = new NextendTimeline({
151
+ paused: true,
152
+ onComplete: $.proxy(this.ended, this)
153
+ });
154
+ var current = this.bgImages.eq(this.current),
155
+ next = this.bgImages.eq(1 - this.current);
156
+
157
+ if (nModernizr.csstransforms3d && nModernizr.csstransformspreserve3d) {
158
+ this.currentAnimation = new window['NextendSmartSliderBackgroundAnimation' + this.animationProperties.type](this, current, next, this.animationProperties, 1, this.direction);
159
+
160
+ this.slides.eq(this.current).css('zIndex', 2);
161
+ this.slides.eq(1 - this.current).css('zIndex', 3);
162
+
163
+ this.timeline.to(this.slides.eq(this.current), 0.5, {
164
+ opacity: 0
165
+ }, this.currentAnimation.getExtraDelay());
166
+
167
+ this.timeline.to(this.slides.eq(1 - this.current), 0.5, {
168
+ opacity: 1
169
+ }, this.currentAnimation.getExtraDelay());
170
+
171
+
172
+ this.currentAnimation.postSetup();
173
+
174
+ } else {
175
+
176
+ this.timeline.to(this.slides.eq(this.current), 1.5, {
177
+ opacity: 0
178
+ }, 0);
179
+
180
+ this.timeline.to(this.slides.eq(1 - this.current), 1.5, {
181
+ opacity: 1
182
+ }, 0);
183
+ }
184
+ this.current = 1 - this.current;
185
+ this.timeline.play();
186
+ };
187
+
188
+ NextendBackgroundAnimationEditorController.prototype.ended = function () {
189
+ if (this.currentAnimation) {
190
+ this.currentAnimation.ended();
191
+ }
192
+ this.next();
193
+ };
194
+
195
+ NextendBackgroundAnimationEditorController.prototype.setAnimationProperties = function (animationProperties) {
196
+ var lastAnimationProperties = this.animationProperties;
197
+ this.animationProperties = animationProperties;
198
+ if (!lastAnimationProperties) {
199
+ this.next();
200
+ }
201
+ };
202
+
203
+ scope.NextendBackgroundAnimationEditorController = NextendBackgroundAnimationEditorController;
204
+
205
+ })
206
+ (n2, window);
207
+
208
+ (function ($, scope) {
209
+
210
+ function NextendSmartSliderCreateSlider(ajaxUrl) {
211
+ this.createSliderModal = null;
212
+ this.ajaxUrl = ajaxUrl;
213
+ $('.n2-ss-create-slider').click($.proxy(function (e) {
214
+ e.preventDefault();
215
+ e.stopImmediatePropagation();
216
+ this.showModal();
217
+ }, this));
218
+
219
+ this.notificationStack = new NextendNotificationCenterStackModal($('body'));
220
+ $('.n2-ss-demo-slider').click($.proxy(function (e) {
221
+ e.preventDefault();
222
+ e.stopImmediatePropagation();
223
+ this.showDemoSliders();
224
+
225
+
226
+ }, this));
227
+
228
+ if (window.location.hash.substring(1) == 'createslider') {
229
+ this.showModal();
230
+ }
231
+ }
232
+
233
+ NextendSmartSliderCreateSlider.prototype.showModal = function () {
234
+ if (!this.createSliderModal) {
235
+ var that = this;
236
+ var ajaxUrl = this.ajaxUrl;
237
+ var presets = [];
238
+
239
+ presets.push({
240
+ key: 'default',
241
+ name: n2_('Default'),
242
+ image: '$ss$/admin/images/sliderpresets/default.png'
243
+ });
244
+ presets.push({
245
+ key: 'thumbnailhorizontal',
246
+ name: n2_('Thumbnail - horizontal'),
247
+ image: '$ss$/admin/images/sliderpresets/thumbnailhorizontal.png'
248
+ });
249
+ presets.push({
250
+ key: 'caption',
251
+ name: n2_('Caption'),
252
+ image: '$ss$/admin/images/sliderpresets/caption.png'
253
+ });
254
+ this.createSliderModal = new NextendModal({
255
+ zero: {
256
+ size: [
257
+ N2SSPRO ? 750 : 550,
258
+ N2SSPRO ? 630 : 390 + 130
259
+ ],
260
+ title: n2_('Create Slider'),
261
+ back: false,
262
+ close: true,
263
+ content: '<form class="n2-form"></form>',
264
+ controls: [
265
+ '<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Create') + '</a>'
266
+ ],
267
+ fn: {
268
+ show: function () {
269
+
270
+ var button = this.controls.find('.n2-button-green'),
271
+ form = this.content.find('.n2-form').on('submit', function (e) {
272
+ e.preventDefault();
273
+ button.trigger('click');
274
+ });
275
+
276
+ form.append(this.createInput(n2_('Slider name'), 'slidertitle', 'width: 240px;'));
277
+ form.append(this.createInputUnit(n2_('Width'), 'sliderwidth', 'px', 'width: 30px;'));
278
+ form.append(this.createInputUnit(n2_('Height'), 'sliderheight', 'px', 'width: 30px;'));
279
+
280
+ new NextendElementAutocompleteSimple("sliderwidth", ["1920", "1400", "1000", "800", "600", "400"]);
281
+ new NextendElementAutocompleteSimple("sliderheight", ["800", "600", "500", "400", "300", "200"]);
282
+
283
+ var sliderTitle = $('#slidertitle').val(n2_('Slider')).focus(),
284
+ sliderWidth = $('#sliderwidth').val(900),
285
+ sliderHeight = $('#sliderheight').val(500);
286
+
287
+ sliderWidth.parent().addClass('n2-form-element-autocomplete ui-front');
288
+ sliderHeight.parent().addClass('n2-form-element-autocomplete ui-front');
289
+
290
+ this.createHeading(n2_('Preset')).appendTo(this.content);
291
+
292
+ var imageRadio = this.createImageRadio(presets)
293
+ .css('height', N2SSPRO ? 360 : 100)
294
+ .appendTo(this.content),
295
+ sliderPreset = imageRadio.find('input');
296
+ imageRadio.css('overflow', 'hidden');
297
+ this.createHeading(n2_('Import Sample Sliders')).appendTo(this.content);
298
+ $('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample1.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample2.png') + '\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\'' + nextend.imageHelper.fixed('$ss$/admin/images/free/sample3.png') + '\')"></div>')
299
+ .on('click', $.proxy(function () {
300
+ this.hide();
301
+ that.showDemoSliders();
302
+ }, this))
303
+ .appendTo(this.content);
304
+
305
+
306
+ button.on('click', $.proxy(function () {
307
+
308
+ NextendAjaxHelper.ajax({
309
+ type: "POST",
310
+ url: NextendAjaxHelper.makeAjaxUrl(ajaxUrl, {
311
+ nextendaction: 'create'
312
+ }),
313
+ data: {
314
+ sliderTitle: sliderTitle.val(),
315
+ sliderSizeWidth: sliderWidth.val(),
316
+ sliderSizeHeight: sliderHeight.val(),
317
+ preset: sliderPreset.val()
318
+ },
319
+ dataType: 'json'
320
+ }).done($.proxy(function (response) {
321
+ NextendAjaxHelper.startLoading();
322
+ }, this));
323
+
324
+ }, this));
325
+ }
326
+ }
327
+ }
328
+ });
329
+ }
330
+ this.createSliderModal.show();
331
+ };
332
+
333
+ NextendSmartSliderCreateSlider.prototype.showDemoSliders = function () {
334
+ var that = this;
335
+ $('body').css('overflow', 'hidden');
336
+ var pro = 0;
337
+ var frame = $('<iframe src="//smartslider3.com/demo-import/?pro=' + pro + '&utm_campaign=' + N2SS3C + '&utm_source=import-slider-frame&utm_medium=smartslider-' + N2PLATFORM + '-' + (pro ? 'pro' : 'free') + '" frameborder="0"></iframe>').css({
338
+ position: 'fixed',
339
+ zIndex: 100000,
340
+ left: 0,
341
+ top: 0,
342
+ width: '100%',
343
+ height: '100%'
344
+ }).appendTo('body'),
345
+ closeFrame = function () {
346
+ $('body').css('overflow', '');
347
+ frame.remove();
348
+ window.removeEventListener("message", listener, false);
349
+ that.notificationStack.popStack();
350
+ },
351
+ importSlider = function (href) {
352
+ NextendAjaxHelper.ajax({
353
+ type: "POST",
354
+ url: NextendAjaxHelper.makeAjaxUrl(that.ajaxUrl, {
355
+ nextendaction: 'importDemo'
356
+ }),
357
+ data: {
358
+ key: Base64.encode(href.replace(/^(http(s)?:)?\/\//, '//'))
359
+ },
360
+ dataType: 'json'
361
+ }).fail(function () {
362
+ //closeFrame();
363
+ });
364
+ },
365
+ listener = function (e) {
366
+ if (e.origin !== "http://smartslider3.com" && e.origin !== "https://smartslider3.com")
367
+ return;
368
+ var msg = e.data;
369
+ switch (msg.key) {
370
+ case 'importSlider':
371
+ if (typeof nextend.joinCommunity === 'function') {
372
+ nextend.joinCommunity(function () {
373
+ importSlider(msg.data.href);
374
+ });
375
+ } else {
376
+ importSlider(msg.data.href);
377
+ }
378
+
379
+ return;
380
+
381
+ break;
382
+ case 'closeWindow':
383
+ closeFrame();
384
+ }
385
+ };
386
+
387
+ this.notificationStack.enableStack();
388
+ NextendEsc.add($.proxy(function () {
389
+ closeFrame();
390
+ return true;
391
+ }, this));
392
+
393
+ window.addEventListener("message", listener, false);
394
+ };
395
+
396
+ scope.NextendSmartSliderCreateSlider = NextendSmartSliderCreateSlider;
397
+
398
+ })(n2, window);
399
+ function strip_tags(input, allowed) {
400
+ allowed = (((allowed || '') + '')
401
+ .toLowerCase()
402
+ .match(/<[a-z][a-z0-9]*>/g) || [])
403
+ .join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
404
+ var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
405
+ commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
406
+ return input.replace(commentsAndPhpTags, '')
407
+ .replace(tags, function ($0, $1) {
408
+ return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
409
+ });
410
+ }
411
+
412
+ if (!Array.prototype.filter) {
413
+ Array.prototype.filter = function (fun /*, thisp */) {
414
+ "use strict";
415
+
416
+ if (this === void 0 || this === null)
417
+ throw new TypeError();
418
+
419
+ var t = Object(this);
420
+ var len = t.length >>> 0;
421
+ if (typeof fun !== "function")
422
+ throw new TypeError();
423
+
424
+ var res = [];
425
+ var thisp = arguments[1];
426
+ for (var i = 0; i < len; i++) {
427
+ if (i in t) {
428
+ var val = t[i]; // in case fun mutates this
429
+ if (fun.call(thisp, val, i, t))
430
+ res.push(val);
431
+ }
432
+ }
433
+
434
+ return res;
435
+ };
436
+ }
437
+ (function ($, scope, undefined) {
438
+
439
+ function NextendSmartSliderAdminInlineField() {
440
+
441
+ this.$input = $('<input type="text" name="name" />')
442
+ .on({
443
+ mouseup: function (e) {
444
+ e.stopPropagation();
445
+ },
446
+ keyup: $.proxy(function (e) {
447
+ if (e.keyCode == 27) {
448
+ this.cancel();
449
+ }
450
+ }, this),
451
+ blur: $.proxy(this.save, this)
452
+ });
453
+
454
+ this.$form = $('<form class="n2-inline-form"></form>')
455
+ .append(this.$input)
456
+ .on('submit', $.proxy(this.save, this));
457
+ }
458
+
459
+ NextendSmartSliderAdminInlineField.prototype.injectNode = function ($targetNode, value) {
460
+ this.$input.val(value);
461
+ $targetNode.append(this.$form);
462
+ this.$input.focus();
463
+ };
464
+
465
+ NextendSmartSliderAdminInlineField.prototype.save = function (e) {
466
+ e.preventDefault();
467
+ this.$input.trigger('valueChanged', [this.$input.val()]);
468
+ this.$input.off('blur');
469
+ this.destroy();
470
+ };
471
+
472
+ NextendSmartSliderAdminInlineField.prototype.cancel = function () {
473
+ this.$input.trigger('cancel');
474
+ this.destroy();
475
+ };
476
+
477
+ NextendSmartSliderAdminInlineField.prototype.destroy = function () {
478
+ this.$input.off('blur')
479
+ this.$form.remove();
480
+ };
481
+
482
+ scope.NextendSmartSliderAdminInlineField = NextendSmartSliderAdminInlineField;
483
+
484
+ })(n2, window);
485
+
486
+
487
+
488
+
489
+ (function (smartSlider, $, scope, undefined) {
490
+ "use strict";
491
+
492
+ function NextendSmartSliderSlideEditorHistory() {
493
+ this.historyStates = 50;
494
+ this.isEnabled = this.historyStates != 0;
495
+ this.historyAddAllowed = true;
496
+ this.isBatched = false;
497
+ this.index = -1;
498
+ this.history = [];
499
+
500
+ this.preventUndoRedo = false;
501
+
502
+ this.undoBTN = $('#n2-ss-undo').on('click', $.proxy(this.undo, this));
503
+ this.redoBTN = $('#n2-ss-redo').on('click', $.proxy(this.redo, this));
504
+ this.updateUI();
505
+ };
506
+
507
+ NextendSmartSliderSlideEditorHistory.prototype.updateUI = function () {
508
+ if (this.index == 0 || this.history.length == 0) {
509
+ this.undoBTN.removeClass('n2-active');
510
+ } else {
511
+ this.undoBTN.addClass('n2-active');
512
+ }
513
+
514
+ if (this.index == -1 || this.index >= this.history.length) {
515
+ this.redoBTN.removeClass('n2-active');
516
+ } else {
517
+ this.redoBTN.addClass('n2-active');
518
+ }
519
+ };
520
+
521
+ NextendSmartSliderSlideEditorHistory.prototype.throttleUndoRedo = function () {
522
+ if (!this.preventUndoRedo) {
523
+ this.preventUndoRedo = true;
524
+ setTimeout($.proxy(function () {
525
+ this.preventUndoRedo = false;
526
+ }, this), 100);
527
+ return false;
528
+ }
529
+ return true;
530
+ };
531
+
532
+ NextendSmartSliderSlideEditorHistory.prototype.add = function (cb) {
533
+ if (!this.isEnabled || !this.historyAddAllowed) return;
534
+ if (this.index != -1) {
535
+ this.history.splice(this.index, this.history.length);
536
+ }
537
+ this.index = -1;
538
+ if (!this.isBatched) {
539
+ this.history.push([cb()]);
540
+ this.isBatched = true;
541
+ setTimeout($.proxy(function () {
542
+ this.isBatched = false;
543
+ }, this), 100);
544
+ } else {
545
+ this.history[this.history.length - 1].push(cb());
546
+ }
547
+ //this.history.push(smartSlider.slide.getLayout());
548
+ if (this.history.length > this.historyStates) {
549
+ this.history.unshift();
550
+ }
551
+ this.updateUI();
552
+ };
553
+
554
+ NextendSmartSliderSlideEditorHistory.prototype.off = function () {
555
+ this.historyAddAllowed = false;
556
+ };
557
+
558
+ NextendSmartSliderSlideEditorHistory.prototype.on = function () {
559
+ this.historyAddAllowed = true;
560
+ };
561
+
562
+ NextendSmartSliderSlideEditorHistory.prototype.undo = function (e) {
563
+ if (e) {
564
+ e.preventDefault();
565
+ }
566
+ if (this.throttleUndoRedo()) {
567
+ return false;
568
+ }
569
+ this.off();
570
+ if (this.index == -1) {
571
+ this.index = this.history.length - 1;
572
+ } else {
573
+ this.index--;
574
+ }
575
+ if (this.index >= 0) {
576
+ var actions = this.history[this.index];
577
+ for (var i = actions.length - 1; i >= 0; i--) {
578
+ var action = actions[i];
579
+ action[0].history(action[1], action[3], action[4], action);
580
+ }
581
+ } else {
582
+ this.index = 0;
583
+ // No more undo
584
+ }
585
+ this.on();
586
+ this.updateUI();
587
+ };
588
+
589
+ NextendSmartSliderSlideEditorHistory.prototype.redo = function (e) {
590
+ if (e) {
591
+ e.preventDefault();
592
+ }
593
+ if (this.throttleUndoRedo()) {
594
+ return false;
595
+ }
596
+ this.off();
597
+ if (this.index != -1) {
598
+ if (this.index < this.history.length) {
599
+ var actions = this.history[this.index];
600
+ this.index++;
601
+ for (var i = 0; i < actions.length; i++) {
602
+ var action = actions[i];
603
+ action[0].history(action[1], action[2], action[4], action);
604
+ }
605
+ } else {
606
+ // No more redo
607
+ }
608
+ } else {
609
+ // No redo
610
+ }
611
+ this.on();
612
+ this.updateUI();
613
+ };
614
+
615
+ NextendSmartSliderSlideEditorHistory.prototype.changeFuture = function (originalScope, newScope) {
616
+ for (var i = 0; i < this.history.length; i++) {
617
+ for (var j = 0; j < this.history[i].length; j++) {
618
+ if (this.history[i][j][0] === originalScope) {
619
+ this.history[i][j][0] = newScope;
620
+ }
621
+ for (var k = 0; k < this.history[i][j][4].length; k++) {
622
+ if (this.history[i][j][4][k] === originalScope) {
623
+ this.history[i][j][4][k] = newScope;
624
+ }
625
+ }
626
+ }
627
+ }
628
+ };
629
+
630
+ n2(window).ready(function () {
631
+ smartSlider.history = new NextendSmartSliderSlideEditorHistory();
632
+ });
633
+
634
+ })(nextend.smartSlider, n2, window);
635
+
636
+ (function ($, scope, undefined) {
637
+
638
+ function QuickSlides(ajaxUrl) {
639
+
640
+ var button = $('#n2-quick-slides-edit');
641
+ if (button.length < 1) {
642
+ return;
643
+ }
644
+
645
+ this.ajaxUrl = ajaxUrl;
646
+
647
+ button.on('click', $.proxy(this.openEdit, this));
648
+ };
649
+
650
+ QuickSlides.prototype.openEdit = function (e) {
651
+ e.preventDefault();
652
+ var slides = $('#n2-ss-slides .n2-box-slide');
653
+
654
+ var that = this;
655
+ this.modal = new NextendModal({
656
+ zero: {
657
+ fit: true,
658
+ fitX: false,
659
+ overflow: 'auto',
660
+ size: [
661
+ 1200,
662
+ 700
663
+ ],
664
+ title: n2_('Quick Edit - Slides'),
665
+ back: false,
666
+ close: true,
667
+ content: '<form class="n2-form"><table></table></form>',
668
+ controls: [
669
+ '<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Save') + '</a>'
670
+ ],
671
+ fn: {
672
+ show: function () {
673
+
674
+ var button = this.controls.find('.n2-button-green'),
675
+ form = this.content.find('.n2-form').on('submit', function (e) {
676
+ e.preventDefault();
677
+ button.trigger('click');
678
+ }),
679
+ table = form.find('table');
680
+
681
+ slides.each($.proxy(function (i, el) {
682
+ var slide = $(el),
683
+ tr = $('<tr />').appendTo(table),
684
+ id = slide.data('slideid');
685
+ tr.append($('<td />').append('<img src="' + slide.data('image') + '" style="width:100px;"/>'));
686
+ tr.append($('<td />').append(that.createInput('Name', 'title-' + id, slide.data('title'), 'width: 240px;')));
687
+ tr.append($('<td />').append(that.createTextarea('Description', 'description-' + id, slide.data('description'), 'width: 330px;height:24px;')));
688
+ var link = slide.data('link').split('|*|');
689
+ tr.append($('<td />').append(that.createLink('Link', 'link-' + id, link[0], 'width: 180px;')));
690
+ tr.append($('<td />').append(that.createTarget('Target', 'target-' + id, link.length > 1 ? link[1] : '_self', '')));
691
+
692
+ new NextendElementUrl('link-' + id, nextend.NextendElementUrlParams);
693
+
694
+ }, this));
695
+
696
+
697
+ button.on('click', $.proxy(function (e) {
698
+
699
+ var changed = {};
700
+ slides.each($.proxy(function (i, el) {
701
+ var slide = $(el),
702
+ id = slide.data('slideid'),
703
+ name = $('#title-' + id).val(),
704
+ description = $('#description-' + id).val(),
705
+ link = $('#link-' + id).val() + '|*|' + $('#target-' + id).val();
706
+
707
+ if (name != slide.data('title') || description != slide.data('description') || link != slide.data('link')) {
708
+ changed[id] = {
709
+ name: name,
710
+ description: description,
711
+ link: link
712
+ };
713
+ }
714
+ }, this));
715
+
716
+ if (jQuery.isEmptyObject(changed)) {
717
+ this.hide(e);
718
+ } else {
719
+ this.hide(e);
720
+ NextendAjaxHelper.ajax({
721
+ type: "POST",
722
+ url: NextendAjaxHelper.makeAjaxUrl(that.ajaxUrl),
723
+ data: {changed: Base64.encode(JSON.stringify(changed))},
724
+ dataType: 'json'
725
+ }).done($.proxy(function (response) {
726
+ var slides = response.data;
727
+ for (var slideID in slides) {
728
+ var slideBox = $('.n2-box-slide[data-slideid="' + slideID + '"]');
729
+ slideBox.find('.n2-box-placeholder a.n2-h4').html(slides[slideID].title);
730
+
731
+ slideBox.attr('data-title', slides[slideID].rawTitle);
732
+ slideBox.data('title', slides[slideID].rawTitle);
733
+ slideBox.attr('data-description', slides[slideID].rawDescription);
734
+ slideBox.data('description', slides[slideID].rawDescription);
735
+ slideBox.attr('data-link', slides[slideID].rawLink);
736
+ slideBox.data('link', slides[slideID].rawLink);
737
+ }
738
+ }, this));
739
+ }
740
+ }, this));
741
+ }
742
+ }
743
+ }
744
+ });
745
+
746
+ this.modal.setCustomClass('n2-ss-quick-slides-edit-modal');
747
+ this.modal.show();
748
+
749
+ };
750
+
751
+ QuickSlides.prototype.createInput = function (label, id, value) {
752
+ var style = '';
753
+ if (arguments.length == 4) {
754
+ style = arguments[3];
755
+ }
756
+ var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="' + id + '" class="n2-h5" autocomplete="off" style="' + style + '"></div></div></div></div>');
757
+ nodes.find('input').val(value);
758
+ return nodes;
759
+ };
760
+
761
+ QuickSlides.prototype.createTextarea = function (label, id, value) {
762
+ var style = '';
763
+ if (arguments.length == 4) {
764
+ style = arguments[3];
765
+ }
766
+ var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="' + id + '" class="n2-h5" autocomplete="off" style="resize:y;' + style + '"></textarea></div></div></div></div>');
767
+ nodes.find('textarea').val(value);
768
+ return nodes;
769
+ };
770
+
771
+ QuickSlides.prototype.createLink = function (label, id, value) {
772
+ var style = '';
773
+ if (arguments.length == 4) {
774
+ style = arguments[3];
775
+ }
776
+ var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="' + id + '" class="n2-h5" autocomplete="off" style="' + style + '"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="' + id + '_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');
777
+ nodes.find('input').val(value);
778
+ return nodes;
779
+ };
780
+
781
+
782
+ QuickSlides.prototype.createTarget = function (label, id, value) {
783
+ var style = '';
784
+ if (arguments.length == 4) {
785
+ style = arguments[3];
786
+ }
787
+ var nodes = $('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="' + id + '">' + label + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="' + id + '" autocomplete="off" style="' + style + '"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');
788
+ nodes.find('select').val(value);
789
+ return nodes;
790
+ };
791
+
792
+ scope.NextendSmartSliderQuickSlides = QuickSlides;
793
+ })(n2, window);
794
+ (function ($, scope, undefined) {
795
+
796
+ function NextendSmartSliderAdminSidebarSlides(ajaxUrl, contentAjaxUrl, parameters, isUploadDisabled, uploadUrl, uploadDir) {
797
+ this.quickPostModal = null;
798
+ this.quickVideoModal = null;
799
+ this.parameters = parameters;
800
+ this.slides = [];
801
+ this.ajaxUrl = ajaxUrl;
802
+ this.contentAjaxUrl = contentAjaxUrl;
803
+ this.slidesPanel = $('#n2-ss-slides');
804
+ this.slidesContainer = this.slidesPanel.find('.n2-ss-slides-container');
805
+
806
+ this.initSlidesOrderable();
807
+
808
+ var slides = this.slidesContainer.find('.n2-box-slide');
809
+ for (var i = 0; i < slides.length; i++) {
810
+ this.slides.push(new NextendSmartSliderAdminSlide(this, slides.eq(i)));
811
+ }
812
+
813
+ if (this.slides.length > 0) {
814
+ this.slidesPanel.addClass('n2-ss-has-slides');
815
+ }
816
+
817
+ $('.n2-add-quick-image').on('click', $.proxy(this.addQuickImage, this));
818
+ $('.n2-box-slide-add').on('click', $.proxy(this.addQuickImage, this));
819
+ $('.n2-add-quick-video').on('click', $.proxy(this.addQuickVideo, this));
820
+ $('.n2-add-quick-post').on('click', $.proxy(this.addQuickPost, this));
821
+
822
+ this.initBulk();
823
+
824
+ if ($('#n2-ss-slide-editor-main-tab').length == 0) {
825
+ new NextendSmartSliderSidebarSlides();
826
+ }
827
+
828
+
829
+ if (!isUploadDisabled) {
830
+ var images = [];
831
+ this.slidesContainer.fileupload({
832
+ url: uploadUrl,
833
+ pasteZone: false,
834
+ dropZone: this.slidesContainer,
835
+ dataType: 'json',
836
+ paramName: 'image',
837
+
838
+ add: $.proxy(function (e, data) {
839
+ data.formData = {path: '/' + uploadDir};
840
+ data.submit();
841
+ }, this),
842
+
843
+ done: $.proxy(function (e, data) {
844
+ var response = data.result;
845
+ if (response.data && response.data.name) {
846
+ images.push({
847
+ title: response.data.name,
848
+ description: '',
849
+ image: response.data.url
850
+ });
851
+ } else {
852
+ NextendAjaxHelper.notification(response);
853
+ }
854
+
855
+ }, this),
856
+
857
+ fail: $.proxy(function (e, data) {
858
+ NextendAjaxHelper.notification(data.jqXHR.responseJSON);
859
+ }, this),
860
+
861
+ start: function () {
862
+ NextendAjaxHelper.startLoading();
863
+ },
864
+
865
+ stop: $.proxy(function () {
866
+ if (images.length) {
867
+ this._addQuickImages(images);
868
+ } else {
869
+ setTimeout(function () {
870
+ NextendAjaxHelper.stopLoading();
871
+ }, 100);
872
+ }
873
+ images = [];
874
+ }, this)
875
+ });
876
+
877
+ var timeout = null;
878
+ this.slidesContainer.on('dragover', $.proxy(function (e) {
879
+ if (timeout !== null) {
880
+ clearTimeout(timeout);
881
+ timeout = null;
882
+ } else {
883
+ this.slidesContainer.addClass('n2-drag-over');
884
+ }
885
+ timeout = setTimeout($.proxy(function () {
886
+ this.slidesContainer.removeClass('n2-drag-over');
887
+ timeout = null;
888
+ }, this), 400);
889
+
890
+ }, this));
891
+ }
892
+ };
893
+
894
+ NextendSmartSliderAdminSidebarSlides.prototype.changed = function () {
895
+ if (this.slides.length > 0) {
896
+ this.slidesPanel.addClass('n2-ss-has-slides');
897
+ } else {
898
+ this.slidesPanel.removeClass('n2-ss-has-slides');
899
+ }
900
+ };
901
+
902
+ NextendSmartSliderAdminSidebarSlides.prototype.initSlidesOrderable = function () {
903
+ this.slidesContainer.sortable({
904
+ items: ".n2-box-slide",
905
+ tolerance: 'pointer',
906
+ stop: $.proxy(this.saveSlideOrder, this),
907
+ helper: 'clone',
908
+ placeholder: 'n2-box-placeholder n2-box'
909
+ });
910
+ };
911
+
912
+ NextendSmartSliderAdminSidebarSlides.prototype.saveSlideOrder = function (e) {
913
+ var slideNodes = this.slidesContainer.find('.n2-box-slide'),
914
+ slides = [],
915
+ ids = [],
916
+ originalIds = [];
917
+ for (var i = 0; i < slideNodes.length; i++) {
918
+ var slide = slideNodes.eq(i).data('slide');
919
+ slides.push(slide);
920
+ ids.push(slide.getId());
921
+ }
922
+ for (var i = 0; i < this.slides.length; i++) {
923
+ originalIds.push(this.slides[i].getId());
924
+ }
925
+
926
+ if (JSON.stringify(originalIds) != JSON.stringify(ids)) {
927
+ $(window).triggerHandler('SmartSliderSidebarSlidesOrderChanged');
928
+ var queries = {
929
+ nextendcontroller: 'slides',
930
+ nextendaction: 'order'
931
+ };
932
+ NextendAjaxHelper.ajax({
933
+ type: 'POST',
934
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, queries),
935
+ data: {
936
+ slideorder: ids
937
+ }
938
+ });
939
+ this.slides = slides;
940
+ this.changed();
941
+ }
942
+ };
943
+
944
+ NextendSmartSliderAdminSidebarSlides.prototype.initSlides = function () {
945
+ var previousLength = this.slides.length;
946
+ var slideNodes = this.slidesContainer.find('.n2-box-slide'),
947
+ slides = [];
948
+ for (var i = 0; i < slideNodes.length; i++) {
949
+ var slide = slideNodes.eq(i).data('slide');
950
+ slides.push(slide);
951
+ }
952
+ this.slides = slides;
953
+ this.changed();
954
+ $(window).triggerHandler('SmartSliderSidebarSlidesChanged');
955
+ };
956
+
957
+ NextendSmartSliderAdminSidebarSlides.prototype.unsetFirst = function () {
958
+ for (var i = 0; i < this.slides.length; i++) {
959
+ this.slides[i].unsetFirst();
960
+ }
961
+ this.changed();
962
+ };
963
+
964
+ NextendSmartSliderAdminSidebarSlides.prototype.addQuickImage = function (e) {
965
+ e.preventDefault();
966
+ nextend.imageHelper.openMultipleLightbox($.proxy(this._addQuickImages, this));
967
+ };
968
+
969
+ NextendSmartSliderAdminSidebarSlides.prototype._addQuickImages = function (images) {
970
+ NextendAjaxHelper.ajax({
971
+ type: 'POST',
972
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
973
+ nextendaction: 'quickImages'
974
+ }),
975
+ data: {
976
+ images: Base64.encode(JSON.stringify(images))
977
+ }
978
+ }).done($.proxy(function (response) {
979
+ var boxes = $(response.data).insertBefore(this.slidesContainer.find('.n2-clear'));
980
+ boxes.each($.proxy(function (i, el) {
981
+ new NextendSmartSliderAdminSlide(this, $(el));
982
+ }, this));
983
+ this.initSlides();
984
+ }, this));
985
+ };
986
+
987
+ NextendSmartSliderAdminSidebarSlides.prototype.addQuickVideo = function (e) {
988
+ e.preventDefault();
989
+ var manager = this;
990
+ if (!this.quickVideoModal) {
991
+ this.quickVideoModal = new NextendModal({
992
+ zero: {
993
+ size: [
994
+ 500,
995
+ 350
996
+ ],
997
+ title: n2_('Add video'),
998
+ back: false,
999
+ close: true,
1000
+ content: '<form class="n2-form"></form>',
1001
+ controls: ['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Add video') + '</a>'],
1002
+ fn: {
1003
+ show: function () {
1004
+ var button = this.controls.find('.n2-button'),
1005
+ form = this.content.find('.n2-form').on('submit', function (e) {
1006
+ e.preventDefault();
1007
+ button.trigger('click');
1008
+ }).append(this.createInput(n2_('Video url'), 'n2-slide-video-url', 'width: 446px;')),
1009
+ videoUrlField = this.content.find('#n2-slide-video-url').focus();
1010
+
1011
+ this.content.append(this.createHeading(n2_('Examples')));
1012
+ this.content.append(this.createTable([['YouTube', 'https://www.youtube.com/watch?v=MKmIwHAFjSU'], ['Vimeo', 'https://vimeo.com/144598279']], ['', '']));
1013
+
1014
+ button.on('click', $.proxy($.proxy(function (e) {
1015
+ e.preventDefault();
1016
+ var video = videoUrlField.val(),
1017
+ youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
1018
+ youtubeMatch = video.match(youtubeRegexp),
1019
+ vimeoRegexp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
1020
+ vimeoMatch = video.match(vimeoRegexp),
1021
+ html5Video = video.match(/\.(mp4|ogv|ogg|webm)/i);
1022
+
1023
+ if (youtubeMatch) {
1024
+ NextendAjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (data) {
1025
+ if (data.items.length) {
1026
+ var snippet = data.items[0].snippet;
1027
+
1028
+ var thumbnails = data.items[0].snippet.thumbnails,
1029
+ thumbnail = thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default;
1030
+
1031
+ manager._addQuickVideo(this, {
1032
+ type: 'youtube',
1033
+ title: snippet.title,
1034
+ description: snippet.description,
1035
+ image: thumbnail.url,
1036
+ video: video
1037
+ });
1038
+ }
1039
+ }, this)).fail(function (data) {
1040
+ nextend.notificationCenter.error(data.error.errors[0].message);
1041
+ });
1042
+ } else if (vimeoMatch) {
1043
+ NextendAjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + vimeoMatch[3] + '.json').done($.proxy(function (data) {
1044
+ manager._addQuickVideo(this, {
1045
+ type: 'vimeo',
1046
+ title: data[0].title,
1047
+ description: data[0].description,
1048
+ video: vimeoMatch[3],
1049
+ image: data[0].thumbnail_large
1050
+ });
1051
+ }, this)).fail(function (data) {
1052
+ nextend.notificationCenter.error(data.responseText);
1053
+ });
1054
+
1055
+ } else if (html5Video) {
1056
+ nextend.notificationCenter.error('This video url is not supported!');
1057
+
1058
+ } else {
1059
+ nextend.notificationCenter.error('This video url is not supported!');
1060
+ }
1061
+ }, this)));
1062
+ }
1063
+ }
1064
+ }
1065
+ });
1066
+ }
1067
+ this.quickVideoModal.show();
1068
+ };
1069
+
1070
+ NextendSmartSliderAdminSidebarSlides.prototype._addQuickVideo = function (modal, video) {
1071
+ NextendAjaxHelper.ajax({
1072
+ type: 'POST',
1073
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
1074
+ nextendaction: 'quickVideo'
1075
+ }),
1076
+ data: {
1077
+ video: Base64.encode(JSON.stringify(video))
1078
+ }
1079
+ }).done($.proxy(function (response) {
1080
+ var box = $(response.data).insertBefore(this.slidesContainer.find('.n2-clear'));
1081
+ new NextendSmartSliderAdminSlide(this, box);
1082
+
1083
+ this.initSlides();
1084
+ }, this));
1085
+ modal.hide();
1086
+ };
1087
+
1088
+ NextendSmartSliderAdminSidebarSlides.prototype.addQuickPost = function (e) {
1089
+ e.preventDefault();
1090
+ if (!this.quickPostModal) {
1091
+ var manager = this,
1092
+ cache = {},
1093
+ getContent = $.proxy(function (search) {
1094
+ if (typeof cache[search] == 'undefined') {
1095
+ cache[search] = NextendAjaxHelper.ajax({
1096
+ type: "POST",
1097
+ url: NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),
1098
+ data: {
1099
+ keyword: search
1100
+ },
1101
+ dataType: 'json'
1102
+ });
1103
+ }
1104
+ return cache[search];
1105
+ }, this);
1106
+
1107
+ this.quickPostModal = new NextendModal({
1108
+ zero: {
1109
+ size: [
1110
+ 600,
1111
+ 430
1112
+ ],
1113
+ title: n2_('Add post'),
1114
+ back: false,
1115
+ close: true,
1116
+ content: '<div class="n2-form"></div>',
1117
+ fn: {
1118
+ show: function () {
1119
+
1120
+ this.content.find('.n2-form').append(this.createInput(n2_('Keyword'), 'n2-ss-keyword', 'width:546px;'));
1121
+ var search = $('#n2-ss-keyword'),
1122
+ heading = this.createHeading('').appendTo(this.content),
1123
+ result = this.createResult().appendTo(this.content),
1124
+ searchString = '';
1125
+
1126
+ search.on('keyup', $.proxy(function () {
1127
+ searchString = search.val();
1128
+ getContent(searchString).done($.proxy(function (r) {
1129
+ if (search.val() == searchString) {
1130
+ if (searchString == '') {
1131
+ heading.html(n2_('No search term specified. Showing recent items.'));
1132
+ } else {
1133
+ heading.html(n2_printf(n2_('Showing items match for "%s"'), searchString));
1134
+ }
1135
+
1136
+ var rows = r.data,
1137
+ data = [],
1138
+ modal = this;
1139
+ for (var i = 0; i < rows.length; i++) {
1140
+ data.push([rows[i].title, rows[i].info, $('<div class="n2-button n2-button-green n2-button-x-small n2-uc n2-h5">' + n2_('Select') + '</div>')
1141
+ .on('click', {post: rows[i]}, function (e) {
1142
+ manager._addQuickPost(modal, e.data.post);
1143
+ })]);
1144
+ }
1145
+ result.html('');
1146
+ this.createTable(data, ['width:100%;', '', '']).appendTo(this.createTableWrap().appendTo(result));
1147
+ }
1148
+ }, this));
1149
+ }, this))
1150
+ .trigger('keyup').focus();
1151
+ }
1152
+ }
1153
+ }
1154
+ });
1155
+ }
1156
+ this.quickPostModal.show();
1157
+ };
1158
+
1159
+ NextendSmartSliderAdminSidebarSlides.prototype._addQuickPost = function (modal, post) {
1160
+ if (!post.image) {
1161
+ post.image = '';
1162
+ }
1163
+ NextendAjaxHelper.ajax({
1164
+ type: 'POST',
1165
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
1166
+ nextendaction: 'quickPost'
1167
+ }),
1168
+ data: {
1169
+ post: post
1170
+ }
1171
+ }).done($.proxy(function (response) {
1172
+ var box = $(response.data).insertBefore(this.slidesContainer.find('.n2-clear'));
1173
+ new NextendSmartSliderAdminSlide(this, box);
1174
+
1175
+ this.initSlides();
1176
+ }, this));
1177
+ modal.hide();
1178
+ };
1179
+
1180
+ NextendSmartSliderAdminSidebarSlides.prototype.initBulk = function () {
1181
+ $('.n2-slides-bulk').on('click', $.proxy(this.enterBulk, this));
1182
+ $('.n2-bulk-cancel').on('click', $.proxy(this.leaveBulk, this));
1183
+
1184
+ var selects = $('.n2-bulk-select').find('a');
1185
+
1186
+ // Invert
1187
+ selects.eq(0).on('click', $.proxy(function (e) {
1188
+ e.preventDefault();
1189
+ this.bulkSelect(function (slide) {
1190
+ slide.invertSelection();
1191
+ });
1192
+ }, this));
1193
+
1194
+ //Select all
1195
+ selects.eq(1).on('click', $.proxy(function (e) {
1196
+ e.preventDefault();
1197
+ this.bulkSelect(function (slide) {
1198
+ slide.select();
1199
+ });
1200
+ }, this));
1201
+
1202
+ //Select none
1203
+ selects.eq(2).on('click', $.proxy(function (e) {
1204
+ e.preventDefault();
1205
+ this.bulkSelect(function (slide) {
1206
+ slide.deSelect();
1207
+ });
1208
+ }, this));
1209
+
1210
+ //Select published
1211
+ selects.eq(3).on('click', $.proxy(function (e) {
1212
+ e.preventDefault();
1213
+ this.bulkSelect(function (slide) {
1214
+ if (slide.publishElement.hasClass('n2-active')) {
1215
+ slide.select();
1216
+ } else {
1217
+ slide.deSelect();
1218
+ }
1219
+ });
1220
+ }, this));
1221
+
1222
+ //Select unpublished
1223
+ selects.eq(4).on('click', $.proxy(function (e) {
1224
+ e.preventDefault();
1225
+ this.bulkSelect(function (slide) {
1226
+ if (slide.publishElement.hasClass('n2-active')) {
1227
+ slide.deSelect();
1228
+ } else {
1229
+ slide.select();
1230
+ }
1231
+ });
1232
+ }, this));
1233
+
1234
+ var actions = $('.n2-bulk-action').find('a');
1235
+
1236
+ //Delete
1237
+ actions.eq(0).on('click', $.proxy(function (e) {
1238
+ e.preventDefault();
1239
+ this.bulkAction('deleteSlides');
1240
+ }, this));
1241
+
1242
+ //Duplicate
1243
+ actions.eq(1).on('click', $.proxy(function (e) {
1244
+ e.preventDefault();
1245
+ this.bulkAction('duplicateSlides');
1246
+ }, this));
1247
+
1248
+ //Publish
1249
+ actions.eq(2).on('click', $.proxy(function (e) {
1250
+ e.preventDefault();
1251
+ this.bulkAction('publishSlides');
1252
+ }, this));
1253
+
1254
+ //Unpublish
1255
+ actions.eq(3).on('click', $.proxy(function (e) {
1256
+ e.preventDefault();
1257
+ this.bulkAction('unPublishSlides');
1258
+ }, this));
1259
+ };
1260
+
1261
+ NextendSmartSliderAdminSidebarSlides.prototype.bulkSelect = function (cb) {
1262
+ for (var i = 0; i < this.slides.length; i++) {
1263
+ cb(this.slides[i]);
1264
+ }
1265
+ };
1266
+
1267
+ NextendSmartSliderAdminSidebarSlides.prototype.bulkAction = function (action) {
1268
+ var slides = [],
1269
+ ids = [];
1270
+ this.bulkSelect(function (slide) {
1271
+ if (slide.selected) {
1272
+ slides.push(slide);
1273
+ ids.push(slide.getId());
1274
+ }
1275
+ });
1276
+ if (ids.length) {
1277
+ this[action](ids, slides);
1278
+ } else {
1279
+ nextend.notificationCenter.notice('Please select one or more slides for the action!');
1280
+ }
1281
+ };
1282
+
1283
+ NextendSmartSliderAdminSidebarSlides.prototype.enterBulk = function () {
1284
+ this.slidesContainer.sortable('option', 'disabled', true);
1285
+ $('#n2-admin').addClass('n2-slide-bulk-mode');
1286
+
1287
+ for (var i = 0; i < this.slides.length; i++) {
1288
+ this.slides[i].selectMode();
1289
+ }
1290
+ };
1291
+
1292
+ NextendSmartSliderAdminSidebarSlides.prototype.leaveBulk = function () {
1293
+ this.slidesContainer.sortable('option', 'disabled', false);
1294
+ $('#n2-admin').removeClass('n2-slide-bulk-mode');
1295
+
1296
+ for (var i = 0; i < this.slides.length; i++) {
1297
+ this.slides[i].normalMode();
1298
+ }
1299
+ };
1300
+
1301
+ NextendSmartSliderAdminSidebarSlides.prototype.deleteSlides = function (ids, slides) {
1302
+ var title = slides[0].box.find('.n2-box-button a').text();
1303
+ if (slides.length > 1) {
1304
+ title += ' and ' + (slides.length - 1) + ' more';
1305
+ }
1306
+ NextendDeleteModal('slide-delete', title, $.proxy(function () {
1307
+ NextendAjaxHelper.ajax({
1308
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
1309
+ nextendaction: 'delete'
1310
+ }),
1311
+ type: 'POST',
1312
+ data: {
1313
+ slides: ids
1314
+ }
1315
+ }).done($.proxy(function () {
1316
+ for (var i = 0; i < slides.length; i++) {
1317
+ slides[i].deleted();
1318
+ }
1319
+ this.initSlides();
1320
+ }, this));
1321
+ }, this));
1322
+ };
1323
+
1324
+ NextendSmartSliderAdminSidebarSlides.prototype.duplicateSlides = function (ids, slides) {
1325
+ for (var i = 0; i < this.slides.length; i++) {
1326
+ if (this.slides[i].selected) {
1327
+ this.slides[i].duplicate($.Event("click", {
1328
+ currentTarget: this.slides[i].box.find('.n2-slide-duplicate')
1329
+ })).done(function (slide) {
1330
+ slide.selectMode();
1331
+ });
1332
+ }
1333
+ }
1334
+ };
1335
+
1336
+ NextendSmartSliderAdminSidebarSlides.prototype.publishSlides = function (ids, slides) {
1337
+ NextendAjaxHelper.ajax({
1338
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
1339
+ nextendaction: 'publish'
1340
+ }),
1341
+ type: 'POST',
1342
+ data: {
1343
+ slides: ids
1344
+ }
1345
+ }).done($.proxy(function () {
1346
+ for (var i = 0; i < slides.length; i++) {
1347
+ slides[i].published();
1348
+ }
1349
+ this.changed();
1350
+ }, this));
1351
+ };
1352
+
1353
+ NextendSmartSliderAdminSidebarSlides.prototype.unPublishSlides = function (ids, slides) {
1354
+ NextendAjaxHelper.ajax({
1355
+ url: NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl, {
1356
+ nextendaction: 'unpublish'
1357
+ }),
1358
+ type: 'POST',
1359
+ data: {
1360
+ slides: ids
1361
+ }
1362
+ }).done($.proxy(function () {
1363
+ for (var i = 0; i < slides.length; i++) {
1364
+ slides[i].unPublished();
1365
+ }
1366
+ this.changed();
1367
+ }, this));
1368
+ };
1369
+ scope.NextendSmartSliderAdminSidebarSlides = NextendSmartSliderAdminSidebarSlides;
1370
+
1371
+ function NextendSmartSliderAdminSlide(manager, box) {
1372
+ this.selected = false;
1373
+ this.manager = manager;
1374
+
1375
+ this.box = box.data('slide', this)
1376
+ .addClass('n2-clickable');
1377
+ this.normalMode();
1378
+ this.box.find('.n2-slide-first')
1379
+ .on('click', $.proxy(this.setFirst, this));
1380
+ this.publishElement = this.box.find('.n2-slide-published')
1381
+ .on('click', $.proxy(this.switchPublished, this));
1382
+ this.box.find('.n2-slide-duplicate')
1383
+ .on('click', $.proxy(this.duplicate, this));
1384
+ this.box.find('.n2-slide-delete')
1385
+ .on('click', $.proxy(this.delete, this));
1386
+ };
1387
+
1388
+ NextendSmartSliderAdminSlide.prototype.getId = function () {
1389
+ return this.box.data('slideid');
1390
+ };
1391
+ NextendSmartSliderAdminSlide.prototype.setFirst = function (e) {
1392
+ e.stopPropagation();
1393
+ e.preventDefault();
1394
+ NextendAjaxHelper.ajax({
1395
+ url: NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl, {
1396
+ nextendaction: 'first'
1397
+ }),
1398
+ type: 'POST',
1399
+ data: {
1400
+ id: this.getId()
1401
+ }
1402
+ }).done($.proxy(function () {
1403
+ this.manager.unsetFirst();
1404
+ this.box.addClass('n2-first-slide');
1405
+ }, this));
1406
+ };
1407
+ NextendSmartSliderAdminSlide.prototype.unsetFirst = function () {
1408
+ this.box.removeClass('n2-first-slide');
1409
+ };
1410
+
1411
+ NextendSmartSliderAdminSlide.prototype.switchPublished = function (e) {
1412
+ e.stopPropagation();
1413
+ e.preventDefault();
1414
+ if (this.isPublished()) {
1415
+ this.manager.unPublishSlides([this.getId()], [this]);
1416
+ } else {
1417
+ this.manager.publishSlides([this.getId()], [this]);
1418
+ }
1419
+ };
1420
+
1421
+ NextendSmartSliderAdminSlide.prototype.isPublished = function () {
1422
+ return this.publishElement.hasClass('n2-active');
1423
+ };
1424
+
1425
+ NextendSmartSliderAdminSlide.prototype.published = function () {
1426
+ this.publishElement.addClass('n2-active');
1427
+ };
1428
+
1429
+ NextendSmartSliderAdminSlide.prototype.unPublished = function () {
1430
+ this.publishElement.removeClass('n2-active');
1431
+ };
1432
+
1433
+ NextendSmartSliderAdminSlide.prototype.goToEdit = function (e, isBlank) {
1434
+ if(e.target.tagName != 'A'){
1435
+ if (typeof isBlank !== 'undefined' && isBlank) {
1436
+ window.open(this.box.data('editurl'), '_blank');
1437
+ } else {
1438
+ window.location = this.box.data('editurl');
1439
+ }
1440
+ }
1441
+ };
1442
+
1443
+ NextendSmartSliderAdminSlide.prototype.duplicate = function (e) {
1444
+ e.stopPropagation();
1445
+ e.preventDefault();
1446
+ var deferred = $.Deferred();
1447
+ NextendAjaxHelper.ajax({
1448
+ url: NextendAjaxHelper.makeAjaxUrl($(e.currentTarget).attr('href'), {
1449
+ nextendaction: 'duplicate'
1450
+ })
1451
+ }).done($.proxy(function (response) {
1452
+ var box = $(response.data).insertAfter(this.box);
1453
+ var newSlide = new NextendSmartSliderAdminSlide(this.manager, box);
1454
+ this.manager.initSlides();
1455
+ deferred.resolve(newSlide);
1456
+ }, this));
1457
+ return deferred;
1458
+ };
1459
+
1460
+ NextendSmartSliderAdminSlide.prototype.delete = function (e) {
1461
+ e.stopPropagation();
1462
+ e.preventDefault();
1463
+ this.manager.deleteSlides([this.getId()], [this]);
1464
+ };
1465
+ NextendSmartSliderAdminSlide.prototype.deleted = function () {
1466
+ this.box.remove();
1467
+ };
1468
+
1469
+ NextendSmartSliderAdminSlide.prototype.selectMode = function () {
1470
+ this.box.off('.n2-slide');
1471
+ this.box.on('click.n2-slide', $.proxy(this.invertSelection, this));
1472
+ };
1473
+
1474
+ NextendSmartSliderAdminSlide.prototype.normalMode = function () {
1475
+ this.box.off('.n2-slide');
1476
+ this.box.on({
1477
+ 'click.n2-slide': $.proxy(this.goToEdit, this),
1478
+ 'mousedown.n2-slide': $.proxy(function (e) {
1479
+ if (e.which == 2 || e.which == 4) {
1480
+ e.preventDefault();
1481
+ this.goToEdit(e, true);
1482
+ }
1483
+ }, this)
1484
+ });
1485
+ this.deSelect();
1486
+ };
1487
+
1488
+ NextendSmartSliderAdminSlide.prototype.invertSelection = function (e) {
1489
+ if (e) {
1490
+ e.preventDefault();
1491
+ }
1492
+
1493
+ if (!this.selected) {
1494
+ this.select();
1495
+ } else {
1496
+ this.deSelect();
1497
+ }
1498
+ };
1499
+
1500
+ NextendSmartSliderAdminSlide.prototype.select = function () {
1501
+ this.selected = true;
1502
+ this.box.addClass('n2-active');
1503
+ };
1504
+
1505
+ NextendSmartSliderAdminSlide.prototype.deSelect = function () {
1506
+ this.selected = false;
1507
+ this.box.removeClass('n2-active');
1508
+ };
1509
+
1510
+ scope.NextendSmartSliderAdminSlide = NextendSmartSliderAdminSlide;
1511
+ })(n2, window);
1512
+ (function (smartSlider, $, scope, undefined) {
1513
+
1514
+ function NextendSmartSliderSidebar() {
1515
+ NextendAdminVerticalPane.prototype.constructor.call(this, $('.n2-layers-tab'), $('#n2-ss-layers-items-list').css('overflow', 'auto'), $('#n2-tabbed-layer-item-animation-tabs > .n2-tabs').css('overflow', 'auto'));
1516
+
1517
+ smartSlider.sidebarManager = this;
1518
+
1519
+ this.panelHeading = $('#layeritemeditorpanel').find('.n2-sidebar-tab-switcher .n2-td');
1520
+
1521
+
1522
+ var sidebar = $('#n2-ss-slide-sidebar');
1523
+
1524
+ var contentTop = sidebar.parent().siblings('.n2-td').offset().top - $('#wpadminbar, .navbar').height();
1525
+
1526
+ var onScrollCB = $.proxy(function () {
1527
+ if ($(window).scrollTop() > contentTop) {
1528
+ sidebar.addClass("n2-sidebar-fixed");
1529
+ } else {
1530
+ sidebar.removeClass("n2-sidebar-fixed");
1531
+ }
1532
+ }, this);
1533
+
1534
+ this.lateInit();
1535
+ $(window).scroll(onScrollCB);
1536
+ onScrollCB();
1537
+
1538
+ new NextendSmartSliderEditorSidebarSlides();
1539
+ };
1540
+
1541
+ NextendSmartSliderSidebar.prototype = Object.create(NextendAdminVerticalPane.prototype);
1542
+ NextendSmartSliderSidebar.prototype.constructor = NextendSmartSliderSidebar;
1543
+
1544
+ NextendSmartSliderSidebar.prototype.loadDefaults = function () {
1545
+
1546
+ NextendAdminVerticalPane.prototype.loadDefaults.apply(this, arguments);
1547
+
1548
+ this.key = 'smartsliderSlideSidebarRatio';
1549
+ };
1550
+
1551
+ NextendSmartSliderSidebar.prototype.switchTab = function (tab) {
1552
+ this.panelHeading.eq(tab).trigger('click');
1553
+ };
1554
+
1555
+ NextendSmartSliderSidebar.prototype.getExcludedHeight = function () {
1556
+ var h = 0;
1557
+ h += $('#n2-ss-slide-editor-main-tab').outerHeight();
1558
+ h += $('#n2-ss-item-container').outerHeight();
1559
+ h += $('#n2-tabbed-layer-item-animation-tabs > .n2-labels').outerHeight();
1560
+ h += this.tab.find('.n2-sidebar-pane-sizer').outerHeight();
1561
+ h += 1; // border
1562
+ return h;
1563
+ };
1564
+ scope.NextendSmartSliderSidebar = NextendSmartSliderSidebar;
1565
+
1566
+ function NextendSmartSliderEditorSidebarSlides() {
1567
+
1568
+ var tab = $('#n2-ss-slides');
1569
+
1570
+ NextendAdminSinglePane.prototype.constructor.call(this, tab, tab.find('.n2-ss-slides-container').css('overflow', 'auto'));
1571
+
1572
+ $('.n2-slides-tab-label').on('click.n2-slides-init', $.proxy(function (e) {
1573
+ this.lateInit();
1574
+ $(e.target).off('click.n2-slides-init');
1575
+ }, this));
1576
+ }
1577
+
1578
+ NextendSmartSliderEditorSidebarSlides.prototype = Object.create(NextendAdminSinglePane.prototype);
1579
+ NextendSmartSliderEditorSidebarSlides.prototype.constructor = NextendSmartSliderEditorSidebarSlides;
1580
+
1581
+ NextendSmartSliderEditorSidebarSlides.prototype.getExcludedHeight = function () {
1582
+ var h = 0;
1583
+ h += $('#n2-ss-slide-editor-main-tab').outerHeight();
1584
+ h += $('.n2-slides-tab .n2-definition-list').outerHeight(true);
1585
+ h += 2; // border
1586
+ return h;
1587
+ };
1588
+
1589
+ scope.NextendSmartSliderEditorSidebarSlides = NextendSmartSliderEditorSidebarSlides;
1590
+
1591
+
1592
+ function NextendSmartSliderSidebarSlides() {
1593
+
1594
+ var tab = $('#n2-ss-slides');
1595
+
1596
+ var sidebar = tab.parents('.n2-sidebar-inner');
1597
+ var contentTop = sidebar.parent().siblings('.n2-td').offset().top - $('#wpadminbar, .navbar').height();
1598
+
1599
+ $(window).scroll($.proxy(function () {
1600
+ if ($(window).scrollTop() > contentTop) {
1601
+ sidebar.addClass("n2-sidebar-fixed");
1602
+ } else {
1603
+ sidebar.removeClass("n2-sidebar-fixed");
1604
+ }
1605
+ }, this)).trigger('scroll');
1606
+
1607
+ NextendAdminSinglePane.prototype.constructor.call(this, tab, tab.find('.n2-ss-slides-container').css('overflow', 'auto'));
1608
+
1609
+ this.lateInit();
1610
+ }
1611
+
1612
+ NextendSmartSliderSidebarSlides.prototype = Object.create(NextendAdminSinglePane.prototype);
1613
+ NextendSmartSliderSidebarSlides.prototype.constructor = NextendSmartSliderSidebarSlides;
1614
+
1615
+ NextendSmartSliderSidebarSlides.prototype.getExcludedHeight = function () {
1616
+ var h = 0;
1617
+ h += $('#n2-ss-slide-editor-main-tab').outerHeight();
1618
+ h += $('.n2-sidebar .n2-definition-list').outerHeight(true);
1619
+ h += 2; // border
1620
+ return h;
1621
+ };
1622
+
1623
+ scope.NextendSmartSliderSidebarSlides = NextendSmartSliderSidebarSlides;
1624
+
1625
+ })(nextend.smartSlider, n2, window);
1626
+ ;
1627
+ (function (smartSlider, $, scope, undefined) {
1628
+
1629
+
1630
+ function SmartSliderAdminSlide(sliderElementID, slideContentElementID, isUploadDisabled, uploadUrl, uploadDir, options) {
1631
+
1632
+ this.options = $.extend({
1633
+ slideAsFile: 0
1634
+ }, options);
1635
+
1636
+ this.readyDeferred = $.Deferred();
1637
+ smartSlider.slide = this;
1638
+
1639
+ this._warnInternetExplorerUsers();
1640
+
1641
+ this.$slideContentElement = $('#' + slideContentElementID);
1642
+ this.slideStartValue = this.$slideContentElement.val();
1643
+ this.$sliderElement = $('#' + sliderElementID);
1644
+
1645
+
1646
+ smartSlider.frontend = window["n2-ss-0"];
1647
+
1648
+ var fontSize = this.$sliderElement.data('fontsize');
1649
+
1650
+ nextend.fontManager.setFontSize(fontSize);
1651
+ nextend.styleManager.setFontSize(fontSize);
1652
+
1653
+
1654
+ smartSlider.$currentSlideElement = smartSlider.frontend.adminGetCurrentSlideElement();
1655
+
1656
+ new SmartSliderAdminGenerator();
1657
+
1658
+ smartSlider.$currentSlideElement.addClass('n2-ss-currently-edited-slide');
1659
+ var staticSlide = smartSlider.frontend.parameters.isStaticEdited;
1660
+ new NextendSmartSliderAdminSlideLayerManager(smartSlider.$currentSlideElement.data('slide'), staticSlide, isUploadDisabled, uploadUrl, uploadDir);
1661
+
1662
+ if (!staticSlide) {
1663
+ this._initializeBackgroundChanger();
1664
+ }
1665
+
1666
+ this.readyDeferred.resolve();
1667
+
1668
+ $('#smartslider-form').on({
1669
+ checkChanged: $.proxy(this.prepareFormForCheck, this),
1670
+ submit: $.proxy(this.onSlideSubmit, this)
1671
+ });
1672
+
1673
+ this.createHistory();
1674
+ };
1675
+
1676
+ SmartSliderAdminSlide.prototype.ready = function (fn) {
1677
+ this.readyDeferred.done(fn);
1678
+ };
1679
+
1680
+ SmartSliderAdminSlide.prototype.prepareFormForCheck = function () {
1681
+ var data = JSON.stringify(smartSlider.layerManager.getData()),
1682
+ startData = JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));
1683
+
1684
+ this.$slideContentElement.val(startData == data ? this.slideStartValue : Base64.encode(data));
1685
+ };
1686
+
1687
+ SmartSliderAdminSlide.prototype.onSlideSubmit = function (e) {
1688
+ if (!nextend.isPreview) {
1689
+ this.prepareForm();
1690
+ e.preventDefault();
1691
+
1692
+ nextend.askToSave = false;
1693
+
1694
+ if (this.options.slideAsFile && typeof window.FormData !== undefined && typeof window.File !== 'undefined') {
1695
+ var fd = new FormData();
1696
+ var data = $('#smartslider-form').serializeArray();
1697
+ $.each(data, function (key, input) {
1698
+ if (input.name == 'slide[slide]') {
1699
+ fd.append('slide', new File([input.value], "slide.txt"));
1700
+ } else {
1701
+ fd.append(input.name, input.value);
1702
+ }
1703
+ });
1704
+
1705
+ NextendAjaxHelper.ajax({
1706
+ url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
1707
+ type: 'POST',
1708
+ data: fd,
1709
+ contentType: false,
1710
+ processData: false
1711
+ }).done(function () {
1712
+ nextend.askToSave = true;
1713
+ $('#smartslider-form').trigger('saved');
1714
+ });
1715
+ } else {
1716
+ NextendAjaxHelper.ajax({
1717
+ type: 'POST',
1718
+ url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
1719
+ data: $('#smartslider-form').serialize(),
1720
+ dataType: 'json'
1721
+ }).done(function () {
1722
+ nextend.askToSave = true;
1723
+ $('#smartslider-form').trigger('saved');
1724
+ });
1725
+ }
1726
+ }
1727
+ };
1728
+
1729
+ SmartSliderAdminSlide.prototype.prepareForm = function () {
1730
+ this.$slideContentElement.val(Base64.encode(JSON.stringify(smartSlider.layerManager.getData())));
1731
+ };
1732
+
1733
+ SmartSliderAdminSlide.prototype._initializeBackgroundChanger = function () {
1734
+ this.background = {
1735
+ slideBackgroundColorField: $('#slidebackgroundColor'),
1736
+ slideBackgroundImageField: $('#slidebackgroundImage'),
1737
+ slideBackgroundImageOpacity: $('#slidebackgroundImageOpacity'),
1738
+ slidebackgroundFocusX: $('#slidebackgroundFocusX'),
1739
+ slidebackgroundFocusY: $('#slidebackgroundFocusY'),
1740
+ slideBackgroundModeField: $('#slidebackgroundMode'),
1741
+ backgroundImageElement: smartSlider.$currentSlideElement.find('.nextend-slide-bg'),
1742
+ canvas: smartSlider.$currentSlideElement.find('.n2-ss-slide-background')
1743
+ };
1744
+
1745
+ this.background.slideBackgroundColorField.on('nextendChange', $.proxy(this.__onAfterBackgroundColorChange, this));
1746
+ this.background.slideBackgroundImageField.on('nextendChange', $.proxy(this.__onAfterBackgroundImageChange, this));
1747
+ this.background.slideBackgroundImageOpacity.on('nextendChange', $.proxy(this.__onAfterBackgroundImageOpacityChange, this));
1748
+ this.background.slideBackgroundModeField.on('nextendChange', $.proxy(this.__onAfterBackgroundImageChange, this));
1749
+ this.background.slidebackgroundFocusX.on('nextendChange', $.proxy(this.__onAfterBackgroundImageChange, this));
1750
+ this.background.slidebackgroundFocusY.on('nextendChange', $.proxy(this.__onAfterBackgroundImageChange, this));
1751
+
1752
+ // Auto fill thumbnail if empty
1753
+ var thumbnail = $('#slidethumbnail');
1754
+ if (thumbnail.val() == '') {
1755
+ var itemImage = $('#item_imageimage'),
1756
+ cb = $.proxy(function (image) {
1757
+ if (image != '' && image != '$system$/images/placeholder/image.png') {
1758
+ thumbnail.val(image).trigger('change');
1759
+ this.background.slideBackgroundImageField.off('.slidethumbnail');
1760
+ itemImage.off('.slidethumbnail');
1761
+ }
1762
+ }, this);
1763
+ this.background.slideBackgroundImageField.on('nextendChange.slidethumbnail', $.proxy(function () {
1764
+ cb(this.background.slideBackgroundImageField.val());
1765
+ }, this));
1766
+ itemImage.on('nextendChange.slidethumbnail', $.proxy(function () {
1767
+ cb(itemImage.val());
1768
+ }, this));
1769
+ }
1770
+ };
1771
+
1772
+ SmartSliderAdminSlide.prototype.__onAfterBackgroundColorChange = function () {
1773
+ var backgroundColor = this.background.slideBackgroundColorField.val();
1774
+ if (backgroundColor.substr(6, 8) == '00') {
1775
+ this.background.canvas.css('background', '');
1776
+ } else {
1777
+ this.background.canvas.css('background', '#' + backgroundColor.substr(0, 6))
1778
+ .css('background', N2Color.hex2rgbaCSS(backgroundColor));
1779
+ }
1780
+ };
1781
+
1782
+ SmartSliderAdminSlide.prototype.__onAfterBackgroundImageOpacityChange = function () {
1783
+ smartSlider.$currentSlideElement.data('slideBackground').setOpacity(this.background.slideBackgroundImageOpacity.val() / 100);
1784
+ };
1785
+
1786
+ /**
1787
+ * This event callback is responsible for the slide editor to show the apropiate background color and image.
1788
+ * @private
1789
+ */
1790
+ SmartSliderAdminSlide.prototype.__onAfterBackgroundImageChange = function () {
1791
+ smartSlider.$currentSlideElement.data('slideBackground').changeDesktop(smartSlider.generator.fill(this.background.slideBackgroundImageField.val()), '', this.background.slideBackgroundModeField.val(), this.background.slidebackgroundFocusX.val(), this.background.slidebackgroundFocusY.val());
1792
+ this.__onAfterBackgroundImageOpacityChange();
1793
+ };
1794
+
1795
+ /**
1796
+ * Warn old version IE users that the editor may fail to wrok in their browser.
1797
+ * @private
1798
+ */
1799
+ SmartSliderAdminSlide.prototype._warnInternetExplorerUsers = function () {
1800
+ var ie = this.__isInternetExplorer();
1801
+ if (ie && ie < 10) {
1802
+ alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser);
1803
+ }
1804
+ };
1805
+
1806
+ /**
1807
+ * @returns Internet Explorer version number or false
1808
+ * @private
1809
+ */
1810
+ SmartSliderAdminSlide.prototype.__isInternetExplorer = function () {
1811
+ var myNav = navigator.userAgent.toLowerCase();
1812
+ return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
1813
+ };
1814
+
1815
+ SmartSliderAdminSlide.prototype.getLayout = function () {
1816
+ var propertiesRaw = $('#smartslider-form').serializeArray(),
1817
+ properties = {};
1818
+
1819
+ for (var i = 0; i < propertiesRaw.length; i++) {
1820
+ var m = propertiesRaw[i].name.match(/slide\[(.*?)\]/);
1821
+ if (m) {
1822
+ properties[m[1]] = propertiesRaw[i].value;
1823
+ }
1824
+ }
1825
+ delete properties['generator'];
1826
+ delete properties['published'];
1827
+ delete properties['publishdates'];
1828
+ delete properties['record-start'];
1829
+ delete properties['record-slides'];
1830
+ delete properties['slide'];
1831
+
1832
+ properties['slide'] = smartSlider.layerManager.getData();
1833
+ return properties;
1834
+ };
1835
+
1836
+ SmartSliderAdminSlide.prototype.loadLayout = function (properties, slideDataOverwrite, layerOverwrite) {
1837
+ // we are working on references!
1838
+ var slide = properties['slide'];
1839
+ delete properties['slide'];
1840
+ if (layerOverwrite) {
1841
+ smartSlider.layerManager.loadData(slide, true);
1842
+ } else {
1843
+ smartSlider.layerManager.loadData(slide, false);
1844
+ }
1845
+ if (slideDataOverwrite) {
1846
+ for (var k in properties) {
1847
+ $('#slide' + k).val(properties[k]).trigger('change');
1848
+ }
1849
+ }
1850
+ properties['slide'] = slide;
1851
+ };
1852
+
1853
+ SmartSliderAdminSlide.prototype.createHistory = function () {
1854
+ this.slideValues = {};
1855
+ n2('#smartslider-form').find('input[id][name^="slide"], textarea[id][name^="slide"]').not('#slideslide').each($.proxy(function (i, el) {
1856
+ var $input = $(el),
1857
+ field = $input.data('field'),
1858
+ id = $input.attr('id');
1859
+ this.slideValues[id] = $input.val();
1860
+ $input.on('nextendChange', $.proxy(function () {
1861
+ var newValue = $input.val(),
1862
+ oldValue = this.slideValues[id];
1863
+ this.slideValues[id] = newValue;
1864
+ smartSlider.history.add($.proxy(function () {
1865
+ return [this, 'slideValueChange', newValue, oldValue, [$input, field]];
1866
+ }, this));
1867
+ }, this));
1868
+ }, this));
1869
+ };
1870
+
1871
+
1872
+ SmartSliderAdminSlide.prototype.history = function (method, value, other) {
1873
+ switch (method) {
1874
+ case 'slideValueChange':
1875
+ other[1].insideChange(value);
1876
+ break;
1877
+ }
1878
+ };
1879
+
1880
+ scope.SmartSliderAdminSlide = SmartSliderAdminSlide;
1881
+
1882
+ })(nextend.smartSlider, n2, window);
1883
+ (function (smartSlider, $, scope, undefined) {
1884
+ nextend['ssBeforeResponsive'] = function () {
1885
+ new NextendSmartSliderAdminZoom(this);
1886
+ };
1887
+
1888
+ function NextendSmartSliderAdminZoom(responsive) {
1889
+ this.key = 'n2-ss-editor-device-lock-mode';
1890
+ this.devices = {
1891
+ unknownUnknown: $('<div />')
1892
+ };
1893
+ this.responsive = responsive;
1894
+ this.responsive.setOrientation('portrait');
1895
+ this.responsive.parameters.onResizeEnabled = 0;
1896
+ this.responsive.parameters.forceFull = 0; // We should disable force full feature on admin dashboard as it won't render before the sidebar
1897
+ this.responsive._getDevice = this.responsive._getDeviceZoom;
1898
+
1899
+ this.lock = $('#n2-ss-lock').on('click', $.proxy(this.switchLock, this));
1900
+
1901
+ var desktopWidth = responsive.parameters.sliderWidthToDevice['desktopPortrait'];
1902
+
1903
+ this.container = this.responsive.containerElement.closest('.n2-ss-container-device').addBack();
1904
+ this.container.width(desktopWidth);
1905
+ this.containerWidth = desktopWidth;
1906
+
1907
+ this.initZoom();
1908
+
1909
+ var tr = $('#n2-ss-devices .n2-tr'),
1910
+ modes = responsive.parameters.deviceModes;
1911
+
1912
+ this.devices.desktopPortrait = $('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').appendTo(tr);
1913
+ if (modes.desktopLandscape) {
1914
+ this.devices.desktopLandscape = $('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').appendTo(tr);
1915
+ } else {
1916
+ this.devices.desktopLandscape = this.devices.desktopPortrait;
1917
+ }
1918
+
1919
+ if (modes.tabletPortrait) {
1920
+ this.devices.tabletPortrait = $('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').appendTo(tr);
1921
+ } else {
1922
+ this.devices.tabletPortrait = this.devices.desktopPortrait;
1923
+ }
1924
+ if (modes.tabletLandscape) {
1925
+ this.devices.tabletLandscape = $('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').appendTo(tr);
1926
+ } else {
1927
+ this.devices.tabletLandscape = this.devices.desktopLandscape;
1928
+ }
1929
+
1930
+ if (modes.mobilePortrait) {
1931
+ this.devices.mobilePortrait = $('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').appendTo(tr);
1932
+ } else {
1933
+ this.devices.mobilePortrait = this.devices.tabletPortrait;
1934
+ }
1935
+ if (modes.mobileLandscape) {
1936
+ this.devices.mobileLandscape = $('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').appendTo(tr);
1937
+ } else {
1938
+ this.devices.mobileLandscape = this.devices.tabletLandscape;
1939
+ }
1940
+
1941
+ this.deviceOptions = $('#n2-ss-devices .n2-panel-option');
1942
+
1943
+ $('#n2-ss-devices').css('width', (this.deviceOptions.length * 62) + 'px');
1944
+
1945
+ this.deviceOptions.each($.proxy(function (i, el) {
1946
+ $(el).on('click', $.proxy(this.setDeviceMode, this));
1947
+ }, this));
1948
+
1949
+ responsive.sliderElement.on('SliderDeviceOrientation', $.proxy(this.onDeviceOrientationChange, this));
1950
+ };
1951
+
1952
+ NextendSmartSliderAdminZoom.prototype.onDeviceOrientationChange = function (e, modes) {
1953
+ $('#n2-admin').removeClass('n2-ss-mode-' + modes.lastDevice)
1954
+ .addClass('n2-ss-mode-' + modes.device);
1955
+ this.devices[modes.lastDevice + modes.lastOrientation].removeClass('n2-active');
1956
+ this.devices[modes.device + modes.orientation].addClass('n2-active');
1957
+ };
1958
+
1959
+ NextendSmartSliderAdminZoom.prototype.setDeviceMode = function (e) {
1960
+ var el = $(e.currentTarget);
1961
+ if ((e.ctrlKey || e.metaKey) && smartSlider.layerManager) {
1962
+ var orientation = el.data('orientation');
1963
+ smartSlider.layerManager.copyOrResetMode(el.data('device') + orientation[0].toUpperCase() + orientation.substr(1));
1964
+ } else {
1965
+ this.responsive.setOrientation(el.data('orientation'));
1966
+ this.responsive.setMode(el.data('device'));
1967
+ }
1968
+ };
1969
+
1970
+ NextendSmartSliderAdminZoom.prototype.switchLock = function (e) {
1971
+ e.preventDefault();
1972
+ this.lock.toggleClass('n2-active');
1973
+ if (this.lock.hasClass('n2-active')) {
1974
+ this.setZoomSyncMode();
1975
+ this.zoomChange(this.zoom.slider("value"), 'sync', false);
1976
+
1977
+ $.jStorage.set(this.key, 'sync');
1978
+ } else {
1979
+ this.setZoomFixMode();
1980
+ $.jStorage.set(this.key, 'fix');
1981
+ }
1982
+ };
1983
+
1984
+ NextendSmartSliderAdminZoom.prototype.initZoom = function () {
1985
+ var zoom = $("#n2-ss-slider-zoom");
1986
+ if (zoom.length > 0) {
1987
+
1988
+ if (typeof zoom[0].slide !== 'undefined') {
1989
+ zoom[0].slide = null;
1990
+ }
1991
+
1992
+ this.zoom =
1993
+ zoom.slider({
1994
+ range: "min",
1995
+ step: 1,
1996
+ value: 1,
1997
+ min: 0,
1998
+ max: 102
1999
+ });
2000
+
2001
+ this.responsive.sliderElement.on('SliderResize', $.proxy(this.sliderResize, this));
2002
+
2003
+ if ($.jStorage.get(this.key, 'sync') == 'fix') {
2004
+ this.setZoomFixMode();
2005
+ } else {
2006
+ this.setZoomSyncMode();
2007
+ this.lock.addClass('n2-active');
2008
+ }
2009
+
2010
+ var parent = zoom.parent(),
2011
+ change = $.proxy(function (value) {
2012
+ var oldValue = this.zoom.slider('value');
2013
+ this.zoom.slider('value', oldValue + value);
2014
+ }, this),
2015
+ interval = null,
2016
+ mouseDown = $.proxy(function (value) {
2017
+ change(value);
2018
+ interval = setInterval($.proxy(change, this, value), 1000 / 25);
2019
+ }, this);
2020
+ parent.find('.n2-i-minus').on({
2021
+ mousedown: $.proxy(mouseDown, this, -1),
2022
+ mouseup: function(e){
2023
+ console.log(e);
2024
+ },
2025
+ 'mouseup mouseleave': function () {
2026
+ if (interval) {
2027
+ clearInterval(interval);
2028
+ interval = null;
2029
+ }
2030
+ }
2031
+ });
2032
+ parent.find('.n2-i-plus').on({
2033
+ mousedown: $.proxy(mouseDown, this, 1),
2034
+ 'mouseup mouseleave': function () {
2035
+ if (interval) {
2036
+ clearInterval(interval);
2037
+ interval = null;
2038
+ }
2039
+ }
2040
+ });
2041
+ }
2042
+ };
2043
+
2044
+ NextendSmartSliderAdminZoom.prototype.sliderResize = function (e, ratios) {
2045
+ this.setZoom();
2046
+ };
2047
+
2048
+ NextendSmartSliderAdminZoom.prototype.setZoomFixMode = function () {
2049
+ this.zoom.off('.n2-ss-zoom')
2050
+ .on({
2051
+ 'slide.n2-ss-zoom': $.proxy(this.zoomChangeFixMode, this),
2052
+ 'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeFixMode, this)
2053
+ });
2054
+ };
2055
+
2056
+ NextendSmartSliderAdminZoom.prototype.setZoomSyncMode = function () {
2057
+
2058
+ this.zoom.off('.n2-ss-zoom')
2059
+ .on({
2060
+ 'slide.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this),
2061
+ 'slidechange.n2-ss-zoom': $.proxy(this.zoomChangeSyncMode, this)
2062
+ });
2063
+ };
2064
+
2065
+ NextendSmartSliderAdminZoom.prototype.zoomChangeFixMode = function (event, ui) {
2066
+ this.zoomChange(ui.value, 'fix', ui);
2067
+ };
2068
+
2069
+ NextendSmartSliderAdminZoom.prototype.zoomChangeSyncMode = function (event, ui) {
2070
+ this.zoomChange(ui.value, 'sync', ui);
2071
+ };
2072
+
2073
+ NextendSmartSliderAdminZoom.prototype.zoomChange = function (value, mode, ui) {
2074
+ var ratio = 1;
2075
+ if (value < 50) {
2076
+ ratio = nextend.smallestZoom / this.containerWidth + Math.max(value / 50, 0) * (1 - nextend.smallestZoom / this.containerWidth);
2077
+ } else if (value > 52) {
2078
+ ratio = 1 + (value - 52) / 50;
2079
+ }
2080
+ var width = parseInt(ratio * this.containerWidth);
2081
+ this.container.width(width);
2082
+
2083
+ switch (mode) {
2084
+ case 'sync':
2085
+ this.responsive.doResize();
2086
+ break;
2087
+ default:
2088
+ this.responsive.doResize(true);
2089
+ break;
2090
+ }
2091
+ if (ui) {
2092
+ ui.handle.innerHTML = width + 'px';
2093
+ }
2094
+ };
2095
+
2096
+ NextendSmartSliderAdminZoom.prototype.setZoom = function () {
2097
+ var ratio = this.responsive.containerElement.width() / this.containerWidth;
2098
+ var v = 50;
2099
+ if (ratio < 1) {
2100
+ v = (ratio - nextend.smallestZoom / this.containerWidth) / (1 - nextend.smallestZoom / this.containerWidth) * 50;
2101
+ } else if (ratio > 1) {
2102
+ v = (ratio - 1) * 50 + 52;
2103
+ }
2104
+ var oldValue = this.zoom.slider('value');
2105
+ this.zoom.slider('value', v);
2106
+ };
2107
+ })
2108
+ (nextend.smartSlider, n2, window);
2109
+ ;
2110
+ (function ($, scope) {
2111
+
2112
+ function NextendElementAnimationManager(id, managerIdentifier) {
2113
+ this.element = $('#' + id);
2114
+ this.managerIdentifier = managerIdentifier;
2115
+
2116
+ this.element.parent()
2117
+ .on('click', $.proxy(this.show, this));
2118
+
2119
+ this.element.siblings('.n2-form-element-clear')
2120
+ .on('click', $.proxy(this.clear, this));
2121
+
2122
+ this.name = this.element.siblings('input');
2123
+
2124
+ this.updateName(this.element.val());
2125
+
2126
+ NextendElement.prototype.constructor.apply(this, arguments);
2127
+ };
2128
+
2129
+
2130
+ NextendElementAnimationManager.prototype = Object.create(NextendElement.prototype);
2131
+ NextendElementAnimationManager.prototype.constructor = NextendElementAnimationManager;
2132
+
2133
+
2134
+ NextendElementAnimationManager.prototype.show = function (e) {
2135
+ e.preventDefault();
2136
+ nextend[this.managerIdentifier].show(this.element.val(), $.proxy(this.save, this));
2137
+ };
2138
+
2139
+ NextendElementAnimationManager.prototype.clear = function (e) {
2140
+ e.preventDefault();
2141
+ e.stopPropagation();
2142
+ this.val('');
2143
+ };
2144
+
2145
+ NextendElementAnimationManager.prototype.save = function (e, value) {
2146
+ this.val(value);
2147
+ };
2148
+
2149
+ NextendElementAnimationManager.prototype.val = function (value) {
2150
+ this.element.val(value);
2151
+ this.updateName(value);
2152
+ this.triggerOutsideChange();
2153
+ };
2154
+
2155
+ NextendElementAnimationManager.prototype.insideChange = function (value) {
2156
+ this.element.val(value);
2157
+
2158
+ this.updateName(value);
2159
+
2160
+ this.triggerInsideChange();
2161
+ };
2162
+
2163
+ NextendElementAnimationManager.prototype.updateName = function (value) {
2164
+ if (value == '') {
2165
+ value = n2_('Disabled');
2166
+ } else if (value.split('||').length > 1) {
2167
+ value = n2_('Multiple animations')
2168
+ } else {
2169
+ value = n2_('Single animation');
2170
+ }
2171
+ this.name.val(value);
2172
+ };
2173
+
2174
+ scope.NextendElementAnimationManager = NextendElementAnimationManager;
2175
+
2176
+ function NextendElementPostAnimationManager() {
2177
+ NextendElementAnimationManager.prototype.constructor.apply(this, arguments);
2178
+ };
2179
+
2180
+
2181
+ NextendElementPostAnimationManager.prototype = Object.create(NextendElementAnimationManager.prototype);
2182
+ NextendElementPostAnimationManager.prototype.constructor = NextendElementPostAnimationManager;
2183
+
2184
+ NextendElementPostAnimationManager.prototype.clear = function (e) {
2185
+ e.preventDefault();
2186
+ e.stopPropagation();
2187
+ var data = this.element.val().split('|*|');
2188
+ data[2] = '';
2189
+ this.val(data.join('|*|'));
2190
+ };
2191
+ NextendElementPostAnimationManager.prototype.updateName = function (value) {
2192
+ var data = value.split('|*|');
2193
+ value = data[2];
2194
+ if (value == '') {
2195
+ value = n2_('Disabled');
2196
+ } else if (value.split('||').length > 1) {
2197
+ value = n2_('Multiple animations');
2198
+ } else {
2199
+ value = n2_('Single animation');
2200
+ }
2201
+ this.name.val(value);
2202
+ };
2203
+
2204
+ scope.NextendElementPostAnimationManager = NextendElementPostAnimationManager;
2205
+
2206
+ })(n2, window);
2207
+ (function ($, scope) {
2208
+
2209
+ var STATUS = {
2210
+ INITIALIZED: 0,
2211
+ UNDER_PICK_PARENT: 1,
2212
+ UNDER_PICK_CHILD: 2
2213
+ },
2214
+ OVERLAYS = '<div class="n2-ss-picker-overlay" data-align="left" data-valign="top" />' +
2215
+ '<div class="n2-ss-picker-overlay" data-align="center" data-valign="top" style="left:33%;top:0;" />' +
2216
+ '<div class="n2-ss-picker-overlay" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" />' +
2217
+ '<div class="n2-ss-picker-overlay" data-align="left" data-valign="middle" style="left:0;top:33%;" />' +
2218
+ '<div class="n2-ss-picker-overlay" data-align="center" data-valign="middle" style="left:33%;top:33%; " />' +
2219
+ '<div class="n2-ss-picker-overlay" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" />' +
2220
+ '<div class="n2-ss-picker-overlay" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" />' +
2221
+ '<div class="n2-ss-picker-overlay" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" />' +
2222
+ '<div class="n2-ss-picker-overlay" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';
2223
+
2224
+ function NextendElementLayerPicker(id) {
2225
+ this.status = 0;
2226
+ this.element = $('#' + id);
2227
+ this.overlays = null;
2228
+
2229
+ this.aligns = this.element.parent().parent().siblings();
2230
+
2231
+ this.globalPicker = $('#n2-ss-parent-linker');
2232
+ this.picker = this.element.siblings('.n2-ss-layer-picker')
2233
+ .on({
2234
+ click: $.proxy(this.click, this),
2235
+ mouseenter: $.proxy(function () {
2236
+ var value = this.element.val();
2237
+ if (value != '') {
2238
+ $('#' + value).addClass('n2-highlight');
2239
+ }
2240
+ }, this),
2241
+ mouseleave: $.proxy(function () {
2242
+ var value = this.element.val();
2243
+ if (value != '') {
2244
+ $('#' + value).removeClass('n2-highlight');
2245
+ }
2246
+ }, this)
2247
+ });
2248
+
2249
+
2250
+ NextendElement.prototype.constructor.apply(this, arguments);
2251
+ };
2252
+
2253
+
2254
+ NextendElementLayerPicker.prototype = Object.create(NextendElement.prototype);
2255
+ NextendElementLayerPicker.prototype.constructor = NextendElementLayerPicker;
2256
+
2257
+ NextendElementLayerPicker.prototype.click = function (e) {
2258
+ if (this.status == STATUS.INITIALIZED) {
2259
+ $('body').on('mousedown.n2-ss-parent-linker', $.proxy(function (e) {
2260
+ var el = $(e.target),
2261
+ parent = el.parent();
2262
+ if (!el.hasClass('n2-ss-picker-overlay') && !parent.hasClass('n2-under-pick')) {
2263
+ this.endSelection();
2264
+ }
2265
+ }, this));
2266
+ var layers = nextend.activeLayer.parent().find('.n2-ss-layer').not(nextend.activeLayer),
2267
+ cb = function (id) {
2268
+ layers.each(function () {
2269
+ var layer = $(this),
2270
+ layerObject = layer.data('layerObject');
2271
+ if (layerObject.getProperty(false, 'parentid') == id) {
2272
+ layers = layers.not(layer);
2273
+ var id2 = layerObject.getProperty(false, 'id');
2274
+ if (id2 && id2 != '') {
2275
+ cb(id2);
2276
+ }
2277
+ }
2278
+ });
2279
+ };
2280
+ var cID = nextend.activeLayer.data('layerObject').getProperty(false, 'id');
2281
+ if (cID && cID != '') {
2282
+ cb(cID);
2283
+ }
2284
+
2285
+ if (layers.length > 0) {
2286
+ this.globalPicker.addClass('n2-under-pick');
2287
+ this.picker.addClass('n2-under-pick');
2288
+
2289
+ layers.addClass('n2-ss-picking-on-layer');
2290
+ this.overlays = $(OVERLAYS).appendTo(layers);
2291
+ this.overlays.on('mousedown', $.proxy(function (e) {
2292
+ var selectedOverlay = $(e.currentTarget),
2293
+ parentAlign = selectedOverlay.data('align'),
2294
+ parentValign = selectedOverlay.data('valign'),
2295
+ parentObject = selectedOverlay.parent().data('layerObject');
2296
+ this.status = STATUS.UNDER_PICK_CHILD;
2297
+ this.overlays.remove();
2298
+
2299
+ layers.removeClass('n2-ss-picking-on-layer');
2300
+ nextend.activeLayer.addClass('n2-ss-picking-on-layer');
2301
+ this.overlays = $(OVERLAYS).appendTo(nextend.activeLayer);
2302
+ this.overlays.on('mousedown', $.proxy(function (e) {
2303
+ var selectedChildOverlay = $(e.currentTarget),
2304
+ align = selectedChildOverlay.data('align'),
2305
+ valign = selectedChildOverlay.data('valign');
2306
+
2307
+ nextend.activeLayer.removeClass('n2-ss-picking-on-layer');
2308
+ nextend.activeLayer.data('layerObject').parentPicked(parentObject, parentAlign, parentValign, align, valign);
2309
+
2310
+ //this.change(parentObject.requestID());
2311
+
2312
+ e.preventDefault();
2313
+ e.stopPropagation();
2314
+ this.endSelection();
2315
+ }, this));
2316
+ e.preventDefault();
2317
+ e.stopPropagation();
2318
+ }, this));
2319
+
2320
+ NextendEsc.add($.proxy(function () {
2321
+ this.endSelection();
2322
+ return false;
2323
+ }, this));
2324
+
2325
+ this.status = STATUS.UNDER_PICK_PARENT;
2326
+ }
2327
+ } else if (this.status == STATUS.UNDER_PICK_PARENT) {
2328
+ this.change('');
2329
+ this.endSelection();
2330
+ } else if (this.status == STATUS.UNDER_PICK_CHILD) {
2331
+ this.change('');
2332
+ this.endSelection();
2333
+ }
2334
+ };
2335
+
2336
+ NextendElementLayerPicker.prototype.endSelection = function () {
2337
+ $('body').off('mousedown.n2-ss-parent-linker');
2338
+ nextend.activeLayer.parent().find('.n2-ss-layer').removeClass('n2-ss-picking-on-layer');
2339
+ this.globalPicker.removeClass('n2-under-pick');
2340
+ this.picker.removeClass('n2-under-pick');
2341
+ if (this.overlays) {
2342
+ this.overlays.remove();
2343
+ }
2344
+ this.overlays = null;
2345
+ this.status = STATUS.INITIALIZED;
2346
+ NextendEsc.pop();
2347
+ };
2348
+
2349
+ NextendElementLayerPicker.prototype.change = function (value) {
2350
+ this.picker.trigger('mouseleave');
2351
+ this.element.val(value).trigger('change');
2352
+ this._setValue(value);
2353
+ this.triggerOutsideChange();
2354
+ };
2355
+
2356
+ NextendElementLayerPicker.prototype.insideChange = function (value) {
2357
+ this.element.val(value);
2358
+ this._setValue(value);
2359
+
2360
+ this.triggerInsideChange();
2361
+ };
2362
+
2363
+ NextendElementLayerPicker.prototype._setValue = function (value) {
2364
+ if (value && value != '') {
2365
+ this.picker.addClass('n2-active');
2366
+ this.aligns.css('display', '');
2367
+ } else {
2368
+ this.picker.removeClass('n2-active');
2369
+ this.aligns.css('display', 'none');
2370
+ }
2371
+ };
2372
+
2373
+ scope.NextendElementLayerPicker = NextendElementLayerPicker;
2374
+
2375
+ })(n2, window);
2376
+ ;
2377
+ (function ($, scope) {
2378
+
2379
+ function NextendElementSliderType(id) {
2380
+ this.element = $('#' + id);
2381
+
2382
+ this.setAttribute();
2383
+
2384
+ this.element.on('nextendChange', $.proxy(this.setAttribute, this));
2385
+ };
2386
+
2387
+ NextendElementSliderType.prototype.setAttribute = function () {
2388
+
2389
+ $('#n2-admin').attr('data-slider-type', this.element.val());
2390
+ };
2391
+
2392
+ scope.NextendElementSliderType = NextendElementSliderType;
2393
+
2394
+ })(n2, window);
2395
+
2396
+ ;
2397
+ (function ($, scope) {
2398
+
2399
+ function NextendElementSliderWidgetArea(id) {
2400
+ this.element = $('#' + id);
2401
+
2402
+ this.area = $('#' + id + '_area');
2403
+
2404
+ this.areas = this.area.find('.n2-area');
2405
+
2406
+ this.areas.on('click', $.proxy(this.chooseArea, this));
2407
+
2408
+ NextendElement.prototype.constructor.apply(this, arguments);
2409
+ };
2410
+
2411
+
2412
+ NextendElementSliderWidgetArea.prototype = Object.create(NextendElement.prototype);
2413
+ NextendElementSliderWidgetArea.prototype.constructor = NextendElementSliderWidgetArea;
2414
+
2415
+
2416
+ NextendElementSliderWidgetArea.prototype.chooseArea = function (e) {
2417
+ var value = parseInt($(e.target).data('area'));
2418
+
2419
+ this.element.val(value);
2420
+ this.setSelected(value);
2421
+
2422
+ this.triggerOutsideChange();
2423
+ };
2424
+
2425
+ NextendElementSliderWidgetArea.prototype.insideChange = function (value) {
2426
+ value = parseInt(value);
2427
+ this.element.val(value);
2428
+ this.setSelected(value);
2429
+
2430
+ this.triggerInsideChange();
2431
+ };
2432
+
2433
+ NextendElementSliderWidgetArea.prototype.setSelected = function (index) {
2434
+ this.areas.removeClass('n2-active');
2435
+ this.areas.eq(index - 1).addClass('n2-active');
2436
+ };
2437
+
2438
+ scope.NextendElementSliderWidgetArea = NextendElementSliderWidgetArea;
2439
+
2440
+ })(n2, window);
2441
+
2442
+ "use strict";
2443
+ (function ($, scope) {
2444
+ function NextendElementWidgetPosition(id) {
2445
+
2446
+ this.element = $('#' + id + '-mode');
2447
+ this.container = this.element.closest('.n2-form-element-mixed');
2448
+
2449
+ this.tabs = this.container.find('> .n2-mixed-group');
2450
+
2451
+ this.element.on('nextendChange', $.proxy(this.onChange, this));
2452
+
2453
+ this.onChange();
2454
+ };
2455
+
2456
+ NextendElementWidgetPosition.prototype.onChange = function () {
2457
+ var value = this.element.val();
2458
+
2459
+ if (value == 'advanced') {
2460
+ this.tabs.eq(2).css('display', '');
2461
+ this.tabs.eq(1).css('display', 'none');
2462
+ } else {
2463
+ this.tabs.eq(1).css('display', '');
2464
+ this.tabs.eq(2).css('display', 'none');
2465
+ }
2466
+ };
2467
+
2468
+ scope.NextendElementWidgetPosition = NextendElementWidgetPosition;
2469
+
2470
+ })(n2, window);
2471
+
2472
+ (function (smartSlider, $, scope, undefined) {
2473
+ "use strict";
2474
+ function Generator() {
2475
+ this._refreshTimeout = null;
2476
+ this.modal = false;
2477
+ this.group = 0;
2478
+ smartSlider.generator = this;
2479
+ var variables = smartSlider.$currentSlideElement.data('variables');
2480
+ if (variables) {
2481
+ this.variables = variables;
2482
+
2483
+ for (var i in this.variables) {
2484
+ if (!isNaN(parseFloat(i)) && isFinite(i)) {
2485
+ this.group = Math.max(this.group, parseInt(i) + 1);
2486
+ }
2487
+ }
2488
+
2489
+ this.fill = this.generatorFill;
2490
+ if (this.group > 0) {
2491
+ this.registerField = this.generatorRegisterField;
2492
+
2493
+ this.button = $('<a href="#" class="n2-form-element-button n2-form-element-button-inverted n2-h5 n2-uc" style="position:absolute; left: -26px; top:50%;margin-top: -14px;font-size: 14px; padding:0; width: 28px;text-align: center;">$</a>')
2494
+ .on('click', $.proxy(function (e) {
2495
+ e.preventDefault();
2496
+ this.showModal();
2497
+ }, this));
2498
+ this.registerField($('#slidetitle'));
2499
+ this.registerField($('#slidedescription'));
2500
+ this.registerField($('#slidethumbnail'));
2501
+ this.registerField($('#slidebackgroundImage'));
2502
+ this.registerField($('#slidebackgroundAlt'));
2503
+ this.registerField($('#slidebackgroundTitle'));
2504
+ this.registerField($('#slidebackgroundVideoMp4'));
2505
+ this.registerField($('#slidebackgroundVideoWebm'));
2506
+ this.registerField($('#slidebackgroundVideoOgg'));
2507
+ this.registerField($('#linkslidelink_0'));
2508
+
2509
+ //this.showModal();
2510
+ }
2511
+
2512
+ this.initSlideDataRefresh();
2513
+ } else {
2514
+ this.variables = null;
2515
+ }
2516
+ };
2517
+
2518
+ Generator.prototype.fill = function (value) {
2519
+ return value;
2520
+ };
2521
+
2522
+ Generator.prototype.generatorFill = function (value) {
2523
+ return value.replace(/{((([a-z]+)\(([0-9a-zA-Z_,\/\(\)]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g, $.proxy(this.parseFunction, this));
2524
+ };
2525
+
2526
+ Generator.prototype.parseFunction = function (s, s2, s3, functionName, argumentString, variable) {
2527
+ if (typeof variable == 'undefined') {
2528
+ var args = argumentString.split(/,(?!.*\))/);
2529
+ for (var i = 0; i < args.length; i++) {
2530
+ args[i] = this.parseVariable(args[i]);
2531
+ }
2532
+ return this[functionName].apply(this, args);
2533
+ } else {
2534
+ return this.parseVariable(variable);
2535
+ }
2536
+ };
2537
+
2538
+ Generator.prototype.parseVariable = function (variable) {
2539
+
2540
+ var functionMatch = variable.match(/((([a-z]+)\(([0-9a-zA-Z_,\/\(\)]+)\)))/);
2541
+ if (functionMatch) {
2542
+ return this.parseFunction.apply(this, functionMatch);
2543
+ } else {
2544
+ var variableMatch = variable.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);
2545
+ if (variableMatch) {
2546
+ var index = variableMatch[3];
2547
+ if (typeof index == 'undefined') {
2548
+ index = 0;
2549
+ } else {
2550
+ var i = parseInt(index);
2551
+ if (!isNaN(i)) {
2552
+ index = Math.max(index, 1) - 1;
2553
+ }
2554
+ }
2555
+ if (typeof this.variables[index] != 'undefined' && typeof this.variables[index][variableMatch[1]] != 'undefined') {
2556
+ return this.variables[index][variableMatch[1]];
2557
+ }
2558
+ return '';
2559
+ }
2560
+ return variable;
2561
+ }
2562
+ };
2563
+
2564
+ Generator.prototype.cleanhtml = function (variable) {
2565
+ return strip_tags(variable, '<p><a><b><br /><br/><i>');
2566
+ };
2567
+
2568
+ Generator.prototype.removehtml = function (variable) {
2569
+ return $('<div>' + variable + '</div>').text();
2570
+ };
2571
+
2572
+ Generator.prototype.splitbychars = function (s, start, length) {
2573
+ return s.substr(start, length);
2574
+ };
2575
+
2576
+ Generator.prototype.splitbywords = function (variable, start, length) {
2577
+ var s = variable,
2578
+ len = s.length,
2579
+ posStart = Math.max(0, start == 0 ? 0 : s.indexOf(' ', start)),
2580
+ posEnd = Math.max(0, length > len ? len : s.indexOf(' ', length));
2581
+ return s.substr(posStart, posEnd);
2582
+ };
2583
+
2584
+ Generator.prototype.findimage = function (variable, index) {
2585
+ var s = variable,
2586
+ re = /(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,
2587
+ r = [],
2588
+ tmp = null;
2589
+
2590
+ index = typeof index != 'undefined' ? parseInt(index) - 1 : 0;
2591
+
2592
+ while (tmp = re.exec(s)) {
2593
+ if (typeof tmp[2] != 'undefined') {
2594
+ r.push(tmp[2]);
2595
+ } else if (typeof tmp[6] != 'undefined') {
2596
+ r.push(tmp[6]);
2597
+ }
2598
+ }
2599
+
2600
+ if (r.length) {
2601
+ if (r.length > index) {
2602
+ return r[index];
2603
+ } else {
2604
+ return r[r.length - 1];
2605
+ }
2606
+ } else {
2607
+ return '';
2608
+ }
2609
+ };
2610
+
2611
+ Generator.prototype.findlink = function (variable, index) {
2612
+ var s = variable,
2613
+ re = /href=["\']?([^"\'>]+)["\']?/gi,
2614
+ r = [],
2615
+ tmp = null;
2616
+
2617
+ index = typeof index != 'undefined' ? parseInt(index) - 1 : 0;
2618
+
2619
+ while (tmp = re.exec(s)) {
2620
+ if (typeof tmp[1] != 'undefined') {
2621
+ r.push(tmp[1]);
2622
+ }
2623
+ }
2624
+
2625
+ if (r.length) {
2626
+ if (r.length > index) {
2627
+ return r[index];
2628
+ } else {
2629
+ return r[r.length - 1];
2630
+ }
2631
+ } else {
2632
+ return '';
2633
+ }
2634
+ };
2635
+
2636
+ Generator.prototype.removevarlink = function (variable) {
2637
+ var s = variable,
2638
+ re = /<a href=\"(.*?)\">(.*?)<\/a>/g;
2639
+
2640
+ return s.replace(re, '');
2641
+ };
2642
+
2643
+ Generator.prototype.registerField = function (field) {
2644
+ };
2645
+
2646
+ Generator.prototype.generatorRegisterField = function (field) {
2647
+ var parent = field.parent();
2648
+ parent.on({
2649
+ mouseenter: $.proxy(function () {
2650
+ this.activeField = field;
2651
+ this.button.prependTo(parent);
2652
+ }, this)
2653
+ });
2654
+ };
2655
+
2656
+ Generator.prototype.getModal = function () {
2657
+ var that = this;
2658
+ if (!this.modal) {
2659
+ var active = {
2660
+ key: '',
2661
+ group: 1,
2662
+ filter: 'no',
2663
+ split: 'no',
2664
+ splitStart: 0,
2665
+ splitLength: 300,
2666
+ findImage: 0,
2667
+ findImageIndex: 1,
2668
+ findLink: 0,
2669
+ findLinkIndex: 1,
2670
+ removeVarLink: 0
2671
+ },
2672
+ getVariableString = function () {
2673
+ var variable = active.key + '/' + active.group;
2674
+ if (active.findImage) {
2675
+ variable = 'findimage(' + variable + ',' + Math.max(1, active.findImageIndex) + ')';
2676
+ }
2677
+ if (active.findLink) {
2678
+ variable = 'findlink(' + variable + ',' + Math.max(1, active.findLinkIndex) + ')';
2679
+ }
2680
+ if (active.removeVarLink) {
2681
+ variable = 'removevarlink(' + variable + ')';
2682
+ }
2683
+ if (active.filter != 'no') {
2684
+ variable = active.filter + '(' + variable + ')';
2685
+ }
2686
+ if (active.split != 'no' && active.splitStart >= 0 && active.splitLength > 0) {
2687
+ variable = active.split + '(' + variable + ',' + active.splitStart + ',' + active.splitLength + ')';
2688
+ }
2689
+ return '{' + variable + '}';
2690
+ },
2691
+ resultContainer = $('<div class="n2-generator-result-container" />'),
2692
+ updateResult = function () {
2693
+ resultContainer.html($('<div/>').text(that.fill(getVariableString())).html());
2694
+ };
2695
+
2696
+ var group = that.group,
2697
+ variables = null,
2698
+ groups = null,
2699
+ content = $('<div class="n2-generator-insert-variable"/>');
2700
+
2701
+
2702
+ var groupHeader = NextendModal.prototype.createHeading(n2_('Choose the group')).appendTo(content);
2703
+ var groupContainer = $('<div class="n2-group-container" />').appendTo(content);
2704
+
2705
+
2706
+ content.append(NextendModal.prototype.createHeading(n2_('Choose the variable')));
2707
+ var variableContainer = $('<div class="n2-variable-container" />').appendTo(content);
2708
+
2709
+ //content.append(NextendModal.prototype.createHeading('Functions'));
2710
+ var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
2711
+ .appendTo($('<div class="n2-form" />').appendTo(content));
2712
+
2713
+ content.append(NextendModal.prototype.createHeading(n2_('Result')));
2714
+ resultContainer.appendTo(content);
2715
+
2716
+
2717
+ $('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Filter') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">' + n2_('No') + '</option><option value="cleanhtml">' + n2_('Clean HTML') + '</option><option value="removehtml">' + n2_('Remove HTML') + '</option></select></div></div></div>')
2718
+ .appendTo(functionsContainer);
2719
+ var filter = functionsContainer.find('#n2-generator-function-filter');
2720
+ filter.on('change', $.proxy(function () {
2721
+ active.filter = filter.val();
2722
+ updateResult();
2723
+ }, this));
2724
+
2725
+
2726
+ $('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Split by chars') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">' + n2_('No') + '</option><option value="splitbychars">' + n2_('Strict') + '</option><option value="splitbywords">' + n2_('Respect words') + '</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Start') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Length') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>')
2727
+ .appendTo(functionsContainer);
2728
+ var split = functionsContainer.find('#n2-generator-function-split');
2729
+ split.on('change', $.proxy(function () {
2730
+ active.split = split.val();
2731
+ updateResult();
2732
+ }, this));
2733
+ var splitStart = functionsContainer.find('#n2-generator-function-split-start');
2734
+ splitStart.on('change', $.proxy(function () {
2735
+ active.splitStart = parseInt(splitStart.val());
2736
+ updateResult();
2737
+ }, this));
2738
+ var splitLength = functionsContainer.find('#n2-generator-function-split-length');
2739
+ splitLength.on('change', $.proxy(function () {
2740
+ active.splitLength = parseInt(splitLength.val());
2741
+ updateResult();
2742
+ }, this));
2743
+
2744
+
2745
+ $('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Find image') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Index') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>')
2746
+ .appendTo(functionsContainer);
2747
+
2748
+ var findImage = functionsContainer.find('#n2-generator-function-findimage');
2749
+ findImage.on('nextendChange', $.proxy(function () {
2750
+ active.findImage = parseInt(findImage.val());
2751
+ updateResult();
2752
+ }, this));
2753
+ var findImageIndex = functionsContainer.find('#n2-generator-function-findimage-index');
2754
+ findImageIndex.on('change', $.proxy(function () {
2755
+ active.findImageIndex = parseInt(findImageIndex.val());
2756
+ updateResult();
2757
+ }, this));
2758
+
2759
+
2760
+ $('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Find link') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">' + n2_('Index') + '</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>')
2761
+ .appendTo(functionsContainer);
2762
+
2763
+ var findLink = functionsContainer.find('#n2-generator-function-findlink');
2764
+ findLink.on('nextendChange', $.proxy(function () {
2765
+ active.findLink = parseInt(findLink.val());
2766
+ updateResult();
2767
+ }, this));
2768
+ var findLinkIndex = functionsContainer.find('#n2-generator-function-findlink-index');
2769
+ findLinkIndex.on('change', $.proxy(function () {
2770
+ active.findLinkIndex = parseInt(findLinkIndex.val());
2771
+ updateResult();
2772
+ }, this));
2773
+
2774
+
2775
+ $('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>' + n2_('Remove links') + '</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>')
2776
+ .appendTo(functionsContainer);
2777
+
2778
+ var removeVarLink = functionsContainer.find('#n2-generator-function-removevarlink');
2779
+ removeVarLink.on('nextendChange', $.proxy(function () {
2780
+ active.removeVarLink = parseInt(removeVarLink.val());
2781
+ updateResult();
2782
+ }, this));
2783
+ var removeVarLinkIndex = functionsContainer.find('#n2-generator-function-removevarlink-index');
2784
+ removeVarLinkIndex.on('change', $.proxy(function () {
2785
+ active.removeVarLinkIndex = parseInt(removeVarLinkIndex.val());
2786
+ updateResult();
2787
+ }, this));
2788
+
2789
+ for (var k in this.variables[0]) {
2790
+ $('<a href="#" class="n2-button n2-button-small n2-button-grey">' + k + '</a>')
2791
+ .on('click', $.proxy(function (key, e) {
2792
+ e.preventDefault();
2793
+ variables.removeClass('n2-active');
2794
+ $(e.currentTarget).addClass('n2-active');
2795
+ active.key = key;
2796
+ updateResult();
2797
+ }, this, k))
2798
+ .appendTo(variableContainer);
2799
+ }
2800
+
2801
+ variables = variableContainer.find('a');
2802
+ variables.eq(0).trigger('click');
2803
+
2804
+ if (group == 1) {
2805
+ groupHeader.css('display', 'none');
2806
+ groupContainer.css('display', 'none');
2807
+ }
2808
+ for (var i = 0; i < group; i++) {
2809
+ $('<a href="#" class="n2-button n2-button-small n2-button-grey">' + (i + 1) + '</a>')
2810
+ .on('click', $.proxy(function (groupIndex, e) {
2811
+ e.preventDefault();
2812
+ groups.removeClass('n2-active');
2813
+ $(e.currentTarget).addClass('n2-active');
2814
+ active.group = groupIndex + 1;
2815
+ updateResult();
2816
+ }, this, i))
2817
+ .appendTo(groupContainer);
2818
+ }
2819
+ groups = groupContainer.find('a');
2820
+ groups.eq(0).trigger('click');
2821
+
2822
+ var inited = false;
2823
+
2824
+ this.modal = new NextendModal({
2825
+ zero: {
2826
+ size: [
2827
+ 1000,
2828
+ group > 1 ? 560 : 490
2829
+ ],
2830
+ title: n2_('Insert variable'),
2831
+ back: false,
2832
+ close: true,
2833
+ content: content,
2834
+ controls: ['<a href="#" class="n2-button n2-button-big n2-button-green">' + n2_('Insert') + '</a>'],
2835
+ fn: {
2836
+ show: function () {
2837
+ if (!inited) {
2838
+ new NextendElementOnoff("n2-generator-function-findimage");
2839
+ new NextendElementOnoff("n2-generator-function-findlink");
2840
+ new NextendElementOnoff("n2-generator-function-removevarlink");
2841
+ inited = true;
2842
+ }
2843
+ this.controls.find('.n2-button').on('click', $.proxy(function (e) {
2844
+ e.preventDefault();
2845
+ that.insert(getVariableString());
2846
+ this.hide(e);
2847
+ }, this));
2848
+ }
2849
+ }
2850
+ }
2851
+ }, false);
2852
+
2853
+ this.modal.setCustomClass('n2-ss-generator-modal');
2854
+ }
2855
+ return this.modal;
2856
+ };
2857
+
2858
+ Generator.prototype.showModal = function () {
2859
+
2860
+ this.getModal().show();
2861
+ };
2862
+
2863
+ Generator.prototype.insert = function (value) {
2864
+ this.activeField.val(value).trigger('change');
2865
+ };
2866
+
2867
+ Generator.prototype.initSlideDataRefresh = function () {
2868
+
2869
+ var name = $('#slidetitle').on('nextendChange', $.proxy(function () {
2870
+ this.variables.slide.name = name.val();
2871
+ this.refresh();
2872
+ }, this));
2873
+
2874
+ var description = $('#slidedescription').on('nextendChange', $.proxy(function () {
2875
+ this.variables.slide.description = description.val();
2876
+ this.refresh();
2877
+ }, this));
2878
+
2879
+ };
2880
+
2881
+
2882
+ Generator.prototype.refresh = function () {
2883
+ if (this._refreshTimeout) {
2884
+ clearTimeout(this._refreshTimeout);
2885
+ this._refreshTimeout = null;
2886
+ }
2887
+ this._refreshTimeout = setTimeout($.proxy(this._refresh, this), 100);
2888
+ };
2889
+
2890
+ Generator.prototype._refresh = function () {
2891
+ var layers = smartSlider.layerManager.layerList;
2892
+ for (var j = 0; j < layers.length; j++) {
2893
+ var items = layers[j].items;
2894
+ for (var i = 0; i < items.length; i++) {
2895
+ items[i].reRender();
2896
+ }
2897
+ }
2898
+ };
2899
+
2900
+
2901
+ scope.SmartSliderAdminGenerator = Generator;
2902
+
2903
+ })(nextend.smartSlider, n2, window);
2904
+ (function ($, scope, undefined) {
2905
+
2906
+ function GeneratorRecords(ajaxUrl) {
2907
+ this.ajaxUrl = ajaxUrl;
2908
+
2909
+ $("#generatorrecord-viewer").on("click", $.proxy(this.showRecords, this));
2910
+ };
2911
+
2912
+ GeneratorRecords.prototype.showRecords = function (e) {
2913
+ e.preventDefault();
2914
+ NextendAjaxHelper.ajax({
2915
+ type: "POST",
2916
+ url: this.ajaxUrl,
2917
+ data: $("#smartslider-form").serialize(),
2918
+ dataType: "json"
2919
+ }).done(function (response) {
2920
+ var modal = new NextendModal({
2921
+ zero: {
2922
+ size: [
2923
+ 1300,
2924
+ 700
2925
+ ],
2926
+ title: "Records",
2927
+ content: response.data.html
2928
+ }
2929
+ }, true);
2930
+ modal.content.css('overflow', 'auto');
2931
+ }).error(function (response) {
2932
+ if (response.status == 200) {
2933
+ var modal = new NextendModal({
2934
+ zero: {
2935
+ size: [
2936
+ 1300,
2937
+ 700
2938
+ ],
2939
+ title: "Response",
2940
+ content: response.responseText
2941
+ }
2942
+ }, true);
2943
+ modal.content.css('overflow', 'auto');
2944
+ }
2945
+ });
2946
+ };
2947
+
2948
+ scope.NextendSmartSliderGeneratorRecords = GeneratorRecords;
2949
+ })(n2, window);
2950
+ (function (smartSlider, $, scope, undefined) {
2951
+
2952
+ function Item(item, layer, itemEditor, createPosition) {
2953
+ this.item = item;
2954
+ this.layer = layer;
2955
+ this.itemEditor = itemEditor;
2956
+
2957
+ this.type = this.item.data('item');
2958
+ this.values = this.item.data('itemvalues');
2959
+
2960
+ if (typeof this.values !== 'object') {
2961
+ this.values = $.parseJSON(this.values);
2962
+ }
2963
+
2964
+ if (scope['NextendSmartSliderItemParser_' + this.type] !== undefined) {
2965
+ this.parser = new scope['NextendSmartSliderItemParser_' + this.type](this);
2966
+ } else {
2967
+ this.parser = new scope['NextendSmartSliderItemParser'](this);
2968
+ }
2969
+ this.item.data('item', this);
2970
+
2971
+ if (typeof createPosition !== 'undefined') {
2972
+ if (this.layer.items.length == 0 || this.layer.items.length <= createPosition) {
2973
+ this.item.appendTo(this.layer.layer);
2974
+ } else {
2975
+ this.layer.items[createPosition].item.before(this.item);
2976
+ }
2977
+ }
2978
+
2979
+ if (typeof createPosition === 'undefined' || this.layer.items.length == 0 || this.layer.items.length <= createPosition) {
2980
+ this.layer.items.push(this);
2981
+ } else {
2982
+ this.layer.items.splice(createPosition, 0, this);
2983
+ }
2984
+
2985
+ if (this.item.children().length === 0) {
2986
+ this.reRender();
2987
+ }
2988
+
2989
+
2990
+ $('<div/>')
2991
+ .addClass('ui-helper ui-item-overlay')
2992
+ .css('zIndex', 89)
2993
+ .appendTo(this.item);
2994
+
2995
+ $(window).trigger('ItemCreated');
2996
+ };
2997
+
2998
+ Item.prototype.changeValue = function (property, value) {
2999
+ if (this == this.itemEditor.activeItem) {
3000
+ $('#item_' + this.type + property).data('field')
3001
+ .insideChange(value);
3002
+ } else {
3003
+ this.values[property] = value;
3004
+ }
3005
+ };
3006
+
3007
+ Item.prototype.activate = function (e, force) {
3008
+ this.itemEditor.setActiveItem(this, force);
3009
+ };
3010
+
3011
+ Item.prototype.deActivate = function () {
3012
+ };
3013
+
3014
+ Item.prototype.render = function (html, data, originalData) {
3015
+ this.layer.layer.triggerHandler('itemRender');
3016
+ this.item.html(this.parser.render(html, data));
3017
+
3018
+ // These will be available on the backend render
3019
+ this.values = originalData;
3020
+
3021
+ $('<div/>')
3022
+ .addClass('ui-helper ui-item-overlay')
3023
+ .css('zIndex', 89)
3024
+ .appendTo(this.item);
3025
+
3026
+ var layerName = this.parser.getName(data);
3027
+ if (layerName === false) {
3028
+ layerName = this.type;
3029
+ } else {
3030
+ layerName = layerName.replace(/[<> ]/gi, '');
3031
+ }
3032
+ this.layer.rename(layerName, false);
3033
+
3034
+ this.layer.update();
3035
+ };
3036
+
3037
+ Item.prototype.reRender = function (newData) {
3038
+
3039
+ var data = {},
3040
+ itemEditor = this.itemEditor,
3041
+ form = itemEditor.getItemType(this.type),
3042
+ html = form.template;
3043
+
3044
+ for (var name in this.values) {
3045
+ data[name] = this.values[name];
3046
+ //$.extend(data, this.parser.parse(name, data[name]));
3047
+ }
3048
+
3049
+ data = $.extend({}, this.parser.getDefault(), data, newData);
3050
+
3051
+ var originalData = $.extend({}, data);
3052
+
3053
+ this.parser.parseAll(data, this);
3054
+ this.values = originalData;
3055
+
3056
+ for (var k in data) {
3057
+ var reg = new RegExp('\\{' + k + '\\}', 'g');
3058
+ html = html.replace(reg, data[k]);
3059
+ }
3060
+
3061
+ this.render($(html), data, this.values);
3062
+ };
3063
+
3064
+ Item.prototype.duplicate = function () {
3065
+ this.layer.addItem(this.getHTML(), true);
3066
+ };
3067
+
3068
+ Item.prototype.delete = function () {
3069
+ this.item.trigger('mouseleave');
3070
+ this.item.remove();
3071
+
3072
+ if (this.itemEditor.activeItem == this) {
3073
+ this.itemEditor.activeItem = null;
3074
+ }
3075
+
3076
+ };
3077
+
3078
+ Item.prototype.getHTML = function (base64) {
3079
+ var item = '';
3080
+ if (base64) {
3081
+
3082
+ item = '[' + this.type + ' values="' + Base64.encode(JSON.stringify(this.values)) + '"]';
3083
+ } else {
3084
+ item = $('<div class="n2-ss-item n2-ss-item-' + this.type + '"></div>')
3085
+ .attr('data-item', this.type)
3086
+ .attr('data-itemvalues', JSON.stringify(this.values));
3087
+ }
3088
+ return item;
3089
+ };
3090
+
3091
+ Item.prototype.getData = function () {
3092
+ return {
3093
+ type: this.type,
3094
+ values: this.values
3095
+ };
3096
+ };
3097
+
3098
+
3099
+ Item.prototype.history = function (method, value, other) {
3100
+ switch (method) {
3101
+ case 'updateCurrentItem':
3102
+ this.reRender($.extend(true, {}, value));
3103
+ this.values = value;
3104
+ this.itemEditor.setActiveItem(this, true);
3105
+ break;
3106
+ }
3107
+ };
3108
+
3109
+ scope.NextendSmartSliderItem = Item;
3110
+ })(nextend.smartSlider, n2, window);
3111
+ (function (smartSlider, $, scope, undefined) {
3112
+
3113
+ function ItemManager(layerEditor) {
3114
+ this.suppressChange = false;
3115
+
3116
+ this.activeItemOriginalData = null;
3117
+
3118
+ this.layerEditor = layerEditor;
3119
+
3120
+ this._initInstalledItems();
3121
+
3122
+ this.form = {};
3123
+ this.activeForm = {
3124
+ form: $('<div></div>')
3125
+ };
3126
+ }
3127
+
3128
+ ItemManager.prototype.setActiveItem = function (item, force) {
3129
+ if (item != this.activeItem || force) {
3130
+ this.activeItemOriginalData = null;
3131
+
3132
+ var type = item.type,
3133
+ values = item.values;
3134
+
3135
+ this.activeForm.form.css('display', 'none');
3136
+
3137
+ this.activeForm = this.getItemType(type);
3138
+
3139
+ if (this.activeItem) {
3140
+ this.activeItem.deActivate();
3141
+ }
3142
+
3143
+ this.activeItem = item;
3144
+
3145
+ this.suppressChange = true;
3146
+
3147
+ for (var key in values) {
3148
+ var field = $('#item_' + type + key).data('field');
3149
+ if (field) {
3150
+ field.insideChange(values[key]);
3151
+ }
3152
+ }
3153
+
3154
+ this.suppressChange = false;
3155
+
3156
+ this.activeForm.form.css('display', 'block');
3157
+ }
3158
+ };
3159
+
3160
+ ItemManager.prototype._initInstalledItems = function () {
3161
+
3162
+ $('#n2-ss-item-container .n2-ss-core-item')
3163
+ .on('click', $.proxy(function (e) {
3164
+ this.createLayerItem($(e.currentTarget).data('item'));
3165
+ }, this));
3166
+ };
3167
+
3168
+ ItemManager.prototype.createLayerItem = function (type) {
3169
+ var itemData = this.getItemType(type),
3170
+ layer = this.layerEditor.createLayer($('.n2-ss-core-item-' + type).data('layerproperties'));
3171
+
3172
+ var itemNode = $('<div></div>').data('item', type).data('itemvalues', $.extend(true, {}, itemData.values))
3173
+ .addClass('n2-ss-item n2-ss-item-' + type);
3174
+
3175
+ var item = new scope.NextendSmartSliderItem(itemNode, layer, this, 0);
3176
+ layer.activate();
3177
+
3178
+ smartSlider.sidebarManager.switchTab(0);
3179
+
3180
+ smartSlider.history.add($.proxy(function () {
3181
+ return [this, 'createLayer', 'create', 'delete', [item, type]];
3182
+ }, this));
3183
+
3184
+ return item;
3185
+ };
3186
+
3187
+ /**
3188
+ * Initialize an item type and subscribe the field changes on that type.
3189
+ * We use event normalization to stop not necessary rendering.
3190
+ * @param type
3191
+ * @private
3192
+ */
3193
+ ItemManager.prototype.getItemType = function (type) {
3194
+ if (this.form[type] === undefined) {
3195
+ var form = $('#smartslider-slide-toolbox-item-type-' + type),
3196
+ formData = {
3197
+ form: form,
3198
+ template: form.data('itemtemplate'),
3199
+ values: form.data('itemvalues'),
3200
+ fields: form.find('[name^="item_' + type + '"]'),
3201
+ fieldNameRegexp: new RegExp('item_' + type + "\\[(.*?)\\]", "")
3202
+ };
3203
+ formData.fields.on({
3204
+ nextendChange: $.proxy(this.updateCurrentItem, this),
3205
+ keydown: $.proxy(this.updateCurrentItemDeBounced, this)
3206
+ });
3207
+
3208
+ this.form[type] = formData;
3209
+ }
3210
+ return this.form[type];
3211
+ };
3212
+
3213
+ /**
3214
+ * This function renders the current item with the current values of the related form field.
3215
+ */
3216
+ ItemManager.prototype.updateCurrentItem = function (e) {
3217
+ if (!this.suppressChange) {
3218
+ if (this.activeItemOriginalData === null) {
3219
+ this.activeItemOriginalData = $.extend({}, this.activeItem.values);
3220
+ }
3221
+ var data = {},
3222
+ originalData = {},
3223
+ form = this.form[this.activeItem.type],
3224
+ html = form.template,
3225
+ parser = this.activeItem.parser;
3226
+
3227
+ // Get the current values of the fields
3228
+ // Run through the related item filter
3229
+ // Replace the variables in the template of the item type
3230
+ form.fields.each($.proxy(function (i, field) {
3231
+ var field = $(field),
3232
+ name = field.attr('name').match(form.fieldNameRegexp)[1];
3233
+
3234
+ originalData[name] = data[name] = field.val();
3235
+
3236
+ }, this));
3237
+
3238
+ data = $.extend({}, parser.getDefault(), data);
3239
+
3240
+ parser.parseAll(data, this.activeItem);
3241
+ for (var k in data) {
3242
+ var reg = new RegExp('\\{' + k + '\\}', 'g');
3243
+ html = html.replace(reg, data[k]);
3244
+ }
3245
+ if (e && e.type == 'nextendChange') {
3246
+ smartSlider.history.add($.proxy(function () {
3247
+ return [this.activeItem, 'updateCurrentItem', $.extend({}, originalData), this.activeItemOriginalData, []];
3248
+ }, this));
3249
+
3250
+ this.activeItemOriginalData = null;
3251
+ }
3252
+ this.activeItem.render($(html), data, originalData);
3253
+ }
3254
+ };
3255
+
3256
+ ItemManager.prototype.updateCurrentItemDeBounced = NextendDeBounce(function (e) {
3257
+ this.updateCurrentItem(e);
3258
+ }, 100);
3259
+
3260
+
3261
+ ItemManager.prototype.history = function (method, value, other) {
3262
+ switch (method) {
3263
+ case 'createLayer':
3264
+ switch (value) {
3265
+ case 'delete':
3266
+ other[0].layer.delete();
3267
+ break;
3268
+ case 'create':
3269
+ var item = this.createLayerItem(other[1]);
3270
+ smartSlider.history.changeFuture(other[0].layer, item.layer);
3271
+ smartSlider.history.changeFuture(other[0], item);
3272
+ break;
3273
+ }
3274
+ break;
3275
+ }
3276
+ };
3277
+
3278
+ scope.NextendSmartSliderItemManager = ItemManager;
3279
+
3280
+ })(nextend.smartSlider, n2, window);
3281
+ (function ($, scope, undefined) {
3282
+
3283
+ function ItemParser(item) {
3284
+ this.pre = 'div#' + nextend.smartSlider.frontend.sliderElement.attr('id') + ' ';
3285
+
3286
+ this.item = item;
3287
+
3288
+ this.fonts = [];
3289
+ this.styles = [];
3290
+
3291
+ this.needFill = [];
3292
+ this.added();
3293
+ }
3294
+
3295
+ ItemParser.prototype.getDefault = function () {
3296
+ return {};
3297
+ };
3298
+
3299
+ ItemParser.prototype.added = function () {
3300
+
3301
+ };
3302
+
3303
+ ItemParser.prototype.addedFont = function (mode, name) {
3304
+ this.fonts.push({
3305
+ mode: mode,
3306
+ name: name
3307
+ });
3308
+ $.when(nextend.fontManager.addVisualUsage(mode, this.item.values[name], this.pre))
3309
+ .done($.proxy(function (existsFont) {
3310
+ if (!existsFont) {
3311
+ this.item.changeValue(name, '');
3312
+ }
3313
+ }, this));
3314
+ };
3315
+
3316
+ ItemParser.prototype.addedStyle = function (mode, name) {
3317
+ this.styles.push({
3318
+ mode: mode,
3319
+ name: name
3320
+ });
3321
+ $.when(nextend.styleManager.addVisualUsage(mode, this.item.values[name], this.pre))
3322
+ .done($.proxy(function (existsStyle) {
3323
+ if (!existsStyle) {
3324
+ this.item.changeValue(name, '');
3325
+ }
3326
+ }, this));
3327
+
3328
+ };
3329
+
3330
+ ItemParser.prototype.parseAll = function (data, item) {
3331
+
3332
+ for (var i = 0; i < this.fonts.length; i++) {
3333
+ data[this.fonts[i].name + 'class'] = nextend.fontManager.getClass(data[this.fonts[i].name], this.fonts[i].mode) + ' ';
3334
+ }
3335
+
3336
+ for (var i = 0; i < this.styles.length; i++) {
3337
+ data[this.styles[i].name + 'class'] = nextend.styleManager.getClass(data[this.styles[i].name], this.styles[i].mode) + ' ';
3338
+ }
3339
+ for (var i = 0; i < this.needFill.length; i++) {
3340
+ data[this.needFill[i]] = nextend.smartSlider.generator.fill(data[this.needFill[i]]);
3341
+ }
3342
+ };
3343
+
3344
+ ItemParser.prototype.render = function (node, data) {
3345
+ return node;
3346
+ };
3347
+
3348
+ ItemParser.prototype.getName = function (data) {
3349
+ return false;
3350
+ };
3351
+
3352
+ ItemParser.prototype.resizeLayerToImage = function (item, image) {
3353
+ $("<img/>")
3354
+ .attr("src", image)
3355
+ .load(function () {
3356
+ var slideSize = item.layer.layerEditor.slideSize;
3357
+ var maxWidth = slideSize.width,
3358
+ maxHeight = slideSize.height;
3359
+
3360
+ if (this.width > 0 && this.height > 0) {
3361
+ maxWidth = parseInt(Math.min(this.width, maxWidth));
3362
+ maxHeight = parseInt(Math.min(this.height, maxHeight));
3363
+ nextend.smartSlider.history.off();
3364
+ if (slideSize.width / slideSize.height <= maxWidth / maxHeight) {
3365
+ item.layer.setProperty('width', maxWidth);
3366
+ item.layer.setProperty('height', this.height * maxWidth / this.width);
3367
+ } else {
3368
+ var width = Math.min(this.width * slideSize.height / this.height, maxWidth);
3369
+ item.layer.setProperty('width', width);
3370
+ item.layer.setProperty('height', this.height * width / this.width);
3371
+ }
3372
+ nextend.smartSlider.history.on();
3373
+ }
3374
+ });
3375
+ };
3376
+
3377
+ ItemParser.prototype.fitLayer = function (item) {
3378
+ return false;
3379
+ };
3380
+
3381
+ scope.NextendSmartSliderItemParser = ItemParser;
3382
+
3383
+ })(n2, window);
3384
+ (function ($, scope, undefined) {
3385
+
3386
+ function ItemParserButton() {
3387
+ NextendSmartSliderItemParser.apply(this, arguments);
3388
+ };
3389
+
3390
+ ItemParserButton.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3391
+ ItemParserButton.prototype.constructor = ItemParserButton;
3392
+
3393
+ ItemParserButton.prototype.added = function () {
3394
+ this.needFill = ['content', 'url'];
3395
+ this.addedFont('link', 'font');
3396
+ this.addedStyle('button', 'style');
3397
+
3398
+ nextend.smartSlider.generator.registerField($('#item_buttoncontent'));
3399
+ nextend.smartSlider.generator.registerField($('#linkitem_buttonlink_0'));
3400
+ };
3401
+
3402
+ ItemParserButton.prototype.getName = function (data) {
3403
+ return data.content;
3404
+ };
3405
+
3406
+ ItemParserButton.prototype.parseAll = function (data) {
3407
+ var link = data.link.split('|*|');
3408
+ data.url = link[0];
3409
+ data.target = link[1];
3410
+ delete data.link;
3411
+
3412
+ if (data.fullwidth | 0) {
3413
+ data.display = 'block;';
3414
+ } else {
3415
+ data.display = 'inline-block;';
3416
+ }
3417
+
3418
+ data.extrastyle = data.nowrap | 0 ? 'white-space: nowrap;' : '';
3419
+
3420
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3421
+ };
3422
+
3423
+ scope.NextendSmartSliderItemParser_button = ItemParserButton;
3424
+ })(n2, window);
3425
+ (function ($, scope, undefined) {
3426
+
3427
+ function ItemParserHeading() {
3428
+ NextendSmartSliderItemParser.apply(this, arguments);
3429
+ };
3430
+
3431
+ ItemParserHeading.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3432
+ ItemParserHeading.prototype.constructor = ItemParserHeading;
3433
+
3434
+ ItemParserHeading.prototype.getDefault = function () {
3435
+ return {
3436
+ link: '#|*|_self',
3437
+ font: '',
3438
+ style: ''
3439
+ }
3440
+ };
3441
+
3442
+ ItemParserHeading.prototype.added = function () {
3443
+ this.needFill = ['heading', 'url'];
3444
+
3445
+ this.addedFont('hover', 'font');
3446
+ this.addedStyle('heading', 'style');
3447
+
3448
+ nextend.smartSlider.generator.registerField($('#item_headingheading'));
3449
+ nextend.smartSlider.generator.registerField($('#linkitem_headinglink_0'));
3450
+
3451
+ };
3452
+
3453
+ ItemParserHeading.prototype.getName = function (data) {
3454
+ return data.heading;
3455
+ };
3456
+
3457
+ ItemParserHeading.prototype.parseAll = function (data) {
3458
+
3459
+ data.uid = $.fn.uid();
3460
+
3461
+ var link = data.link.split('|*|');
3462
+ data.url = link[0];
3463
+ data.target = link[1];
3464
+ delete data.link;
3465
+
3466
+
3467
+ if (data.fullwidth | 0) {
3468
+ data.display = 'block;';
3469
+ } else {
3470
+ data.display = 'inline-block;';
3471
+ }
3472
+
3473
+ data.extrastyle = data.nowrap | 0 ? 'white-space: nowrap;' : '';
3474
+
3475
+ data.heading = $('<div>' + data.heading + '</div>').text().replace(/\n/g, '<br />');
3476
+ data.priority = 2;
3477
+ data.class = '';
3478
+
3479
+
3480
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3481
+
3482
+ if (data['url'] == '#') {
3483
+ data['afontclass'] = '';
3484
+ } else {
3485
+ data['afontclass'] = data['fontclass'];
3486
+ data['fontclass'] = '';
3487
+ }
3488
+ };
3489
+
3490
+ ItemParserHeading.prototype.render = function (node, data) {
3491
+ if (data['url'] == '#') {
3492
+ var a = node.find('a');
3493
+ a.parent().html(a.html());
3494
+ }
3495
+ return node;
3496
+ }
3497
+
3498
+ scope.NextendSmartSliderItemParser_heading = ItemParserHeading;
3499
+ })(n2, window);
3500
+ (function ($, scope, undefined) {
3501
+
3502
+ function ItemParserImage() {
3503
+ NextendSmartSliderItemParser.apply(this, arguments);
3504
+ };
3505
+
3506
+ ItemParserImage.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3507
+ ItemParserImage.prototype.constructor = ItemParserImage;
3508
+
3509
+ ItemParserImage.prototype.getDefault = function () {
3510
+ return {
3511
+ size: '100%|*|auto',
3512
+ link: '#|*|_self',
3513
+ style: ''
3514
+ }
3515
+ };
3516
+
3517
+ ItemParserImage.prototype.added = function () {
3518
+ this.needFill = ['image', 'url'];
3519
+
3520
+ this.addedStyle('box', 'style');
3521
+
3522
+ nextend.smartSlider.generator.registerField($('#item_imageimage'));
3523
+ nextend.smartSlider.generator.registerField($('#item_imagealt'));
3524
+ nextend.smartSlider.generator.registerField($('#item_imagetitle'));
3525
+ nextend.smartSlider.generator.registerField($('#linkitem_imagelink_0'));
3526
+ };
3527
+
3528
+ ItemParserImage.prototype.getName = function (data) {
3529
+ return data.image.split('/').pop();
3530
+ };
3531
+
3532
+ ItemParserImage.prototype.parseAll = function (data, item) {
3533
+ var size = data.size.split('|*|');
3534
+ data.width = size[0];
3535
+ data.height = size[1];
3536
+ delete data.size;
3537
+
3538
+ var link = data.link.split('|*|');
3539
+ data.url = link[0];
3540
+ data.target = link[1];
3541
+ delete data.link;
3542
+
3543
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3544
+
3545
+ if (item && item.values.image == '$system$/images/placeholder/image.png' && data.image != item.values.image) {
3546
+ data.image = nextend.imageHelper.fixed(data.image);
3547
+ this.resizeLayerToImage(item, data.image);
3548
+ } else {
3549
+ data.image = nextend.imageHelper.fixed(data.image);
3550
+ }
3551
+
3552
+ };
3553
+
3554
+ ItemParserImage.prototype.fitLayer = function (item) {
3555
+ this.resizeLayerToImage(item, nextend.imageHelper.fixed(item.values.image));
3556
+ return true;
3557
+ };
3558
+
3559
+ ItemParserImage.prototype.render = function (node, data) {
3560
+ if (data['url'] == '#') {
3561
+ node.html(node.children('a').html());
3562
+ }
3563
+ return node;
3564
+ };
3565
+
3566
+ scope.NextendSmartSliderItemParser_image = ItemParserImage;
3567
+ })(n2, window);
3568
+
3569
+ (function ($, scope, undefined) {
3570
+
3571
+ function ItemParserText() {
3572
+ NextendSmartSliderItemParser.apply(this, arguments);
3573
+ };
3574
+
3575
+ ItemParserText.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3576
+ ItemParserText.prototype.constructor = ItemParserText;
3577
+
3578
+ ItemParserText.prototype.getDefault = function () {
3579
+ return {
3580
+ contentmobile: '',
3581
+ contenttablet: '',
3582
+ font: '',
3583
+ style: ''
3584
+ }
3585
+ };
3586
+
3587
+ ItemParserText.prototype.added = function () {
3588
+ this.needFill = ['content', 'contenttablet', 'contentmobile'];
3589
+
3590
+ this.addedFont('paragraph', 'font');
3591
+ this.addedStyle('heading', 'style');
3592
+
3593
+ nextend.smartSlider.generator.registerField($('#item_textcontent'));
3594
+ nextend.smartSlider.generator.registerField($('#item_textcontenttablet'));
3595
+ nextend.smartSlider.generator.registerField($('#item_textcontentmobile'));
3596
+ };
3597
+
3598
+ ItemParserText.prototype.getName = function (data) {
3599
+ return data.content;
3600
+ };
3601
+
3602
+ ItemParserText.prototype.parseAll = function (data) {
3603
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3604
+
3605
+ data['p'] = _wp_Autop(data['content']);
3606
+ data['ptablet'] = _wp_Autop(data['contenttablet']);
3607
+ data['pmobile'] = _wp_Autop(data['contentmobile']);
3608
+ };
3609
+ ItemParserText.prototype.render = function (node, data) {
3610
+ if (data['contenttablet'] == '') {
3611
+ node = node.filter(':not(.n2-ss-tablet)');
3612
+ node.filter('.n2-ss-desktop').addClass('n2-ss-tablet');
3613
+ }
3614
+ if (data['contentmobile'] == '') {
3615
+ node = node.filter(':not(.n2-ss-mobile)');
3616
+ node.filter('.n2-ss-tablet, .n2-ss-desktop').last().addClass('n2-ss-mobile');
3617
+ }
3618
+
3619
+ node.find('p').addClass(data['fontclass'] + ' ' + data['styleclass']);
3620
+ node.find('a').on('click', function (e) {
3621
+ e.preventDefault();
3622
+ });
3623
+ return node;
3624
+ };
3625
+
3626
+ scope.NextendSmartSliderItemParser_text = ItemParserText;
3627
+
3628
+ function _wp_Autop(pee) {
3629
+ var preserve_linebreaks = false,
3630
+ preserve_br = false,
3631
+ blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
3632
+ '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' +
3633
+ '|article|aside|hgroup|header|footer|nav|figure|details|menu|summary';
3634
+
3635
+ if (pee.indexOf('<object') !== -1) {
3636
+ pee = pee.replace(/<object[\s\S]+?<\/object>/g, function (a) {
3637
+ return a.replace(/[\r\n]+/g, '');
3638
+ });
3639
+ }
3640
+
3641
+ pee = pee.replace(/<[^<>]+>/g, function (a) {
3642
+ return a.replace(/[\r\n]+/g, ' ');
3643
+ });
3644
+
3645
+ // Protect pre|script tags
3646
+ if (pee.indexOf('<pre') !== -1 || pee.indexOf('<script') !== -1) {
3647
+ preserve_linebreaks = true;
3648
+ pee = pee.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function (a) {
3649
+ return a.replace(/(\r\n|\n)/g, '<wp-line-break>');
3650
+ });
3651
+ }
3652
+
3653
+ // keep <br> tags inside captions and convert line breaks
3654
+ if (pee.indexOf('[caption') !== -1) {
3655
+ preserve_br = true;
3656
+ pee = pee.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (a) {
3657
+ // keep existing <br>
3658
+ a = a.replace(/<br([^>]*)>/g, '<wp-temp-br$1>');
3659
+ // no line breaks inside HTML tags
3660
+ a = a.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function (b) {
3661
+ return b.replace(/[\r\n\t]+/, ' ');
3662
+ });
3663
+ // convert remaining line breaks to <br>
3664
+ return a.replace(/\s*\n\s*/g, '<wp-temp-br />');
3665
+ });
3666
+ }
3667
+
3668
+ pee = pee + '\n\n';
3669
+ pee = pee.replace(/<br \/>\s*<br \/>/gi, '\n\n');
3670
+ pee = pee.replace(new RegExp('(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '\n$1');
3671
+ pee = pee.replace(new RegExp('(</(?:' + blocklist + ')>)', 'gi'), '$1\n\n');
3672
+ pee = pee.replace(/<hr( [^>]*)?>/gi, '<hr$1>\n\n'); // hr is self closing block element
3673
+ pee = pee.replace(/\r\n|\r/g, '\n');
3674
+ pee = pee.replace(/\n\s*\n+/g, '\n\n');
3675
+ pee = pee.replace(/([\s\S]+?)\n\n/g, '<p>$1</p>\n');
3676
+ pee = pee.replace(/<p>\s*?<\/p>/gi, '');
3677
+ pee = pee.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
3678
+ pee = pee.replace(/<p>(<li.+?)<\/p>/gi, '$1');
3679
+ pee = pee.replace(/<p>\s*<blockquote([^>]*)>/gi, '<blockquote$1><p>');
3680
+ pee = pee.replace(/<\/blockquote>\s*<\/p>/gi, '</p></blockquote>');
3681
+ pee = pee.replace(new RegExp('<p>\\s*(</?(?:' + blocklist + ')(?: [^>]*)?>)', 'gi'), '$1');
3682
+ pee = pee.replace(new RegExp('(</?(?:' + blocklist + ')(?: [^>]*)?>)\\s*</p>', 'gi'), '$1');
3683
+ pee = pee.replace(/\s*\n/gi, '<br />\n');
3684
+ pee = pee.replace(new RegExp('(</?(?:' + blocklist + ')[^>]*>)\\s*<br />', 'gi'), '$1');
3685
+ pee = pee.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi, '$1');
3686
+ pee = pee.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi, '[caption$1[/caption]');
3687
+
3688
+ pee = pee.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g, function (a, b, c) {
3689
+ if (c.match(/<p( [^>]*)?>/)) {
3690
+ return a;
3691
+ }
3692
+
3693
+ return b + '<p>' + c + '</p>';
3694
+ });
3695
+
3696
+ // put back the line breaks in pre|script
3697
+ if (preserve_linebreaks) {
3698
+ pee = pee.replace(/<wp-line-break>/g, '\n');
3699
+ }
3700
+
3701
+ if (preserve_br) {
3702
+ pee = pee.replace(/<wp-temp-br([^>]*)>/g, '<br$1>');
3703
+ }
3704
+
3705
+ return pee;
3706
+ };
3707
+ })(n2, window);
3708
+ (function ($, scope, undefined) {
3709
+
3710
+ function ItemParserVimeo() {
3711
+ NextendSmartSliderItemParser.apply(this, arguments);
3712
+ };
3713
+
3714
+ ItemParserVimeo.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3715
+ ItemParserVimeo.prototype.constructor = ItemParserVimeo;
3716
+
3717
+ ItemParserVimeo.prototype.added = function () {
3718
+ this.needFill = ['vimeourl'];
3719
+
3720
+ nextend.smartSlider.generator.registerField($('#item_vimeovimeourl'));
3721
+ };
3722
+
3723
+ ItemParserVimeo.prototype.getName = function (data) {
3724
+ return data.vimeourl;
3725
+ };
3726
+
3727
+ ItemParserVimeo.prototype.parseAll = function (data, item) {
3728
+ var vimeoChanged = item.values.vimeourl != data.vimeourl;
3729
+
3730
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3731
+
3732
+ if (data.image == '') {
3733
+ data.image = '$system$/images/placeholder/video.png';
3734
+ }
3735
+
3736
+ data.image = nextend.imageHelper.fixed(data.image);
3737
+
3738
+ if (vimeoChanged && data.vimeourl != '') {
3739
+ var vimeoRegexp = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,
3740
+ vimeoMatch = data.vimeourl.match(vimeoRegexp);
3741
+
3742
+ var videoCode = false;
3743
+ if (vimeoMatch) {
3744
+ videoCode = vimeoMatch[3];
3745
+ } else if (data.vimeourl.match(/^[0-9]+$/)) {
3746
+ videoCode = data.vimeourl;
3747
+ }
3748
+
3749
+ if (videoCode) {
3750
+ NextendAjaxHelper.getJSON('https://vimeo.com/api/v2/video/' + encodeURI(videoCode) + '.json').done($.proxy(function (data) {
3751
+ $('#item_vimeoimage').val(data[0].thumbnail_large).trigger('change');
3752
+ }, this)).fail(function (data) {
3753
+ nextend.notificationCenter.error(data.responseText);
3754
+ });
3755
+ } else {
3756
+ nextend.notificationCenter.error('The provided URL does not match any known Vimeo url or code!');
3757
+ }
3758
+ }
3759
+ };
3760
+
3761
+ ItemParserVimeo.prototype.fitLayer = function (item) {
3762
+ return true;
3763
+ };
3764
+
3765
+ scope.NextendSmartSliderItemParser_vimeo = ItemParserVimeo;
3766
+ })(n2, window);
3767
+ (function ($, scope, undefined) {
3768
+
3769
+ function ItemParserYouTube() {
3770
+ NextendSmartSliderItemParser.apply(this, arguments);
3771
+ };
3772
+
3773
+ ItemParserYouTube.prototype = Object.create(NextendSmartSliderItemParser.prototype);
3774
+ ItemParserYouTube.prototype.constructor = ItemParserYouTube;
3775
+
3776
+ ItemParserYouTube.prototype.added = function () {
3777
+ this.needFill = ['youtubeurl'];
3778
+
3779
+ nextend.smartSlider.generator.registerField($('#item_youtubeyoutubeurl'));
3780
+ nextend.smartSlider.generator.registerField($('#item_youtubestart'));
3781
+ };
3782
+
3783
+ ItemParserYouTube.prototype.getName = function (data) {
3784
+ return data.youtubeurl;
3785
+ };
3786
+
3787
+ ItemParserYouTube.prototype.parseAll = function (data, item) {
3788
+
3789
+ var youTubeChanged = item.values.youtubeurl != data.youtubeurl;
3790
+
3791
+ NextendSmartSliderItemParser.prototype.parseAll.apply(this, arguments);
3792
+
3793
+ if (data.image == '') {
3794
+ data.image = '$system$/images/placeholder/video.png';
3795
+ }
3796
+
3797
+ data.image = nextend.imageHelper.fixed(data.image);
3798
+
3799
+ if (youTubeChanged) {
3800
+ var youtubeRegexp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,
3801
+ youtubeMatch = data.youtubeurl.match(youtubeRegexp);
3802
+
3803
+ if (youtubeMatch) {
3804
+ NextendAjaxHelper.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + encodeURI(youtubeMatch[2]) + '&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM').done($.proxy(function (data) {
3805
+ if (data.items.length) {
3806
+
3807
+ var thumbnails = data.items[0].snippet.thumbnails,
3808
+ thumbnail = thumbnails.maxres || thumbnails.standard || thumbnails.high || thumbnails.medium || thumbnails.default;
3809
+
3810
+ $('#item_youtubeimage').val(thumbnail.url).trigger('change');
3811
+ }
3812
+ }, this)).fail(function (data) {
3813
+ nextend.notificationCenter.error(data.error.errors[0].message);
3814
+ });
3815
+ } else {
3816
+ nextend.notificationCenter.error('The provided URL does not match any known YouTube url or code!');
3817
+ }
3818
+ }
3819
+ };
3820
+
3821
+ ItemParserYouTube.prototype.fitLayer = function (item) {
3822
+ return true;
3823
+ };
3824
+
3825
+ scope.NextendSmartSliderItemParser_youtube = ItemParserYouTube;
3826
+ })(n2, window);
3827
+ (function (smartSlider, $, scope, undefined) {
3828
+ "use strict";
3829
+ function LayerAnimation(animations, group, data) {
3830
+ this.$ = $(this);
3831
+ this.animations = animations;
3832
+ this.group = group;
3833
+ this.data = data;
3834
+
3835
+ this.row = $('<li class="n2-ss-animation-row"></li>')
3836
+ .data('animation', this);
3837
+
3838
+ var handle = $('<div class="n2-ss-animation-title"></div>')
3839
+ .appendTo(this.row);
3840
+
3841
+ this.label = $('<span>' + this.data.name + '</span>')
3842
+ .appendTo(handle);
3843
+
3844
+ var actions = $('<div class="n2-actions"></div>')
3845
+ .append($('<a onclick="return false;" href="#"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></a>')
3846
+ .on('click', $.proxy(this.delete, this)))
3847
+ .appendTo(handle);
3848
+
3849
+ };
3850
+
3851
+ LayerAnimation.prototype.getRow = function () {
3852
+ return this.row;
3853
+ };
3854
+
3855
+ LayerAnimation.prototype.edit = function () {
3856
+ this.animations.edit(this.group, this.animations[this.group + 'Rows'].index(this.row));
3857
+ };
3858
+
3859
+ LayerAnimation.prototype.save = function (data) {
3860
+ if (data !== false) {
3861
+ this.data = data;
3862
+ this.label.html(data.name);
3863
+
3864
+ this.$.trigger('animationChanged');
3865
+ }
3866
+ };
3867
+
3868
+ LayerAnimation.prototype.delete = function (e) {
3869
+ if (e) {
3870
+ e.stopPropagation();
3871
+ }
3872
+ this.row.remove();
3873
+ this.animations.removeAnimation(this);
3874
+ smartSlider.layerAnimationManager.update(this.group);
3875
+
3876
+ this.$.trigger('animationDeleted');
3877
+ };
3878
+
3879
+ LayerAnimation.prototype.setDelay = function (newDelay) {
3880
+ this.data.delay = newDelay;
3881
+ };
3882
+
3883
+ LayerAnimation.prototype.setDuration = function (newDuration) {
3884
+ this.data.duration = newDuration;
3885
+ };
3886
+
3887
+ scope.NextendSmartSliderLayerAnimation = LayerAnimation;
3888
+
3889
+ })(nextend.smartSlider, n2, window);
3890
+ (function (smartSlider, $, scope, undefined) {
3891
+ function LayerAnimationManager(layerEditor) {
3892
+
3893
+ this.layerEditor = layerEditor;
3894
+
3895
+ this.createGroup('in', n2_('in'), '#layer-animation-chain-in');
3896
+ this.lists = this.in.list;
3897
+
3898
+ this.createGroup('loop', n2_('loop'), '#layer-animation-chain-loop');
3899
+ this.createGroup('out', n2_('out'), '#layer-animation-chain-out');
3900
+ this.lists = this.lists.add(this.loop.list).add(this.out.list);
3901
+
3902
+
3903
+ smartSlider.layerAnimationManager = this;
3904
+ };
3905
+
3906
+ LayerAnimationManager.prototype.createGroup = function (identifier, label, container) {
3907
+ container = $(container);
3908
+ var header = $('<div class="n2-sidebar-row n2-sidebar-header-bg n2-form-dark n2-sets-header"><div class="n2-table"><div class="n2-tr"><div class="n2-td"><div class="n2-h3 n2-uc">' + label + '</div></div><div style="text-align: ' + (nextend.isRTL() ? 'left' : 'right') + ';" class="n2-td"></div></div></div></div>').appendTo(container),
3909
+ buttonPlaceholder = header.find('.n2-td').eq(1);
3910
+
3911
+ this[identifier] = {
3912
+ container: container,
3913
+ header: header,
3914
+ list: $('<ul class="n2-list n2-h4 n2-list-orderable n2-ss-animation-list"></ul>')
3915
+ .on('click', $.proxy(this.editGroup, this, identifier))
3916
+ .data('group', identifier)
3917
+ .appendTo(container),
3918
+ add: this.getAddButton(identifier, n2_('Add')).appendTo(buttonPlaceholder),
3919
+ clear: this.getClearButton(identifier).appendTo(buttonPlaceholder)
3920
+ };
3921
+ };
3922
+
3923
+ LayerAnimationManager.prototype.getAddButton = function (identifier, label) {
3924
+ var button = $('<a href="#" class="n2-button n2-button-medium n2-button-green n2-h5 n2-uc">' + label + '</a>')
3925
+ .on('click', $.proxy(this.createAnimation, this, identifier));
3926
+ return button;
3927
+ };
3928
+
3929
+ LayerAnimationManager.prototype.getClearButton = function (identifier) {
3930
+ var button = $('<a href="#" class="n2-button n2-button-medium n2-button-grey n2-h5 n2-uc">' + n2_('Clear') + '</a>')
3931
+ .on('click', $.proxy(this.clear, this, identifier));
3932
+ return button;
3933
+ };
3934
+
3935
+ LayerAnimationManager.prototype.getActiveLayer = function () {
3936
+ return this.layerEditor.layerList[this.layerEditor.activeLayerIndex];
3937
+ };
3938
+
3939
+ LayerAnimationManager.prototype.editGroup = function (identifier, e) {
3940
+ var index = 0;
3941
+ if (e) {
3942
+ e.preventDefault();
3943
+ index = $(e.target).closest('.n2-ss-animation-row').index();
3944
+ }
3945
+ if (index != -1) {
3946
+ var layerAnimations = this.getActiveLayer().animation;
3947
+ layerAnimations.edit(identifier, index);
3948
+ }
3949
+ };
3950
+
3951
+ LayerAnimationManager.prototype.clear = function (group, e) {
3952
+ if (e) {
3953
+ e.preventDefault();
3954
+ }
3955
+
3956
+ this.getActiveLayer().animation.clear(group);
3957
+ };
3958
+
3959
+ LayerAnimationManager.prototype.createAnimation = function (group, e) {
3960
+ if (e) {
3961
+ e.preventDefault();
3962
+ }
3963
+ var activeLayer = this.getActiveLayer(),
3964
+ $layer = activeLayer.layer,
3965
+ animationManager = nextend.animationManager;
3966
+
3967
+ animationManager.controller
3968
+ .setPreviewSize($layer.width(), $layer.height())
3969
+ .setGroup(group);
3970
+
3971
+ var features = {
3972
+ repeatable: 1
3973
+ };
3974
+
3975
+ if (group == 'in') {
3976
+ features.specialZero = 1;
3977
+ features.playEvent = 1;
3978
+ animationManager.changeSetById(1000);
3979
+ animationManager.setTitle(n2_('In animation'));
3980
+ } else if (group == 'loop') {
3981
+ features.repeat = 1;
3982
+
3983
+ features.playEvent = 1;
3984
+ features.pauseEvent = 1;
3985
+ features.stopEvent = 1;
3986
+ animationManager.changeSetById(1200);
3987
+ animationManager.setTitle(n2_('Loop animation'));
3988
+ } else if (group == 'out') {
3989
+ features.playEvent = 1;
3990
+ features.instantOut = 1;
3991
+ animationManager.changeSetById(1000);
3992
+ animationManager.setTitle(n2_('Out animation'));
3993
+ }
3994
+
3995
+ animationManager.show(features, {
3996
+ animations: [],
3997
+ transformOrigin: '50|*|50|*|0',
3998
+ specialZero: activeLayer.animation.data.specialZero,
3999
+ repeatCount: activeLayer.animation.data.repeatCount,
4000
+ repeatDelay: activeLayer.animation.data.repeatDelay,
4001
+ playEvent: '',
4002
+ pauseEvent: '',
4003
+ stopEvent: '',
4004
+ repeatable: activeLayer.animation.data.repeatable,
4005
+ instantOut: activeLayer.animation.data.instantOut
4006
+ }, $.proxy(this.storeNewAnimation, this, group), {
4007
+ previewMode: false,
4008
+ previewHTML: false
4009
+ });
4010
+ };
4011
+
4012
+ LayerAnimationManager.prototype.storeNewAnimation = function (group, e, animationStack) {
4013
+ if (animationStack.animations.length > 0) {
4014
+ var layerAnimations = this.getActiveLayer().animation;
4015
+ layerAnimations.setTransformOrigin(group, animationStack.transformOrigin);
4016
+ layerAnimations.setRepeatable(animationStack.repeatable);
4017
+
4018
+ if (group == 'in') {
4019
+ layerAnimations.setSpecialZero(group, animationStack.specialZero);
4020
+ layerAnimations.setEvent(group, 'PlayEvent', animationStack.playEvent);
4021
+ } else if (group == 'loop') {
4022
+ layerAnimations.setRepeatCount(group, animationStack.repeatCount);
4023
+ layerAnimations.setRepeatStartDelay(group, animationStack.repeatStartDelay);
4024
+
4025
+ layerAnimations.setEvent(group, 'PlayEvent', animationStack.playEvent);
4026
+ layerAnimations.setEvent(group, 'PauseEvent', animationStack.pauseEvent);
4027
+ layerAnimations.setEvent(group, 'StopEvent', animationStack.stopEvent);
4028
+ } else if (group == 'out') {
4029
+ layerAnimations.setEvent(group, 'PlayEvent', animationStack.playEvent);
4030
+ layerAnimations.setInstantOut(animationStack.instantOut);
4031
+ }
4032
+
4033
+ for (var i = 0; i < animationStack.animations.length; i++) {
4034
+ layerAnimations.addAnimation(group, animationStack.animations[i]);
4035
+ }
4036
+
4037
+ this.update(group);
4038
+ $(window).triggerHandler('AnimationAdded');
4039
+ }
4040
+
4041
+ this.update(group);
4042
+ };
4043
+
4044
+ /**
4045
+ * @param animations {NextendSmartSliderLayerAnimations}
4046
+ */
4047
+ LayerAnimationManager.prototype.activateAnimations = function (animations) {
4048
+ animations.inRows.prependTo(this.in.list);
4049
+
4050
+ animations.loopRows.prependTo(this.loop.list);
4051
+ animations.outRows.prependTo(this.out.list);
4052
+
4053
+
4054
+ this.update('in');
4055
+ this.update('loop');
4056
+ this.update('out');
4057
+
4058
+ };
4059
+
4060
+ LayerAnimationManager.prototype.update = function (group) {
4061
+ if (this[group].list.children().length) {
4062
+ this[group].add.css('display', 'none');
4063
+ this[group].clear.css('display', '');
4064
+ } else {
4065
+ this[group].add.css('display', '');
4066
+ this[group].clear.css('display', 'none');
4067
+ }
4068
+ };
4069
+
4070
+ scope.NextendSmartSliderLayerAnimationManager = LayerAnimationManager;
4071
+
4072
+ })(nextend.smartSlider, n2, window);
4073
+ (function (smartSlider, $, scope, undefined) {
4074
+
4075
+ var defaults = {
4076
+ repeatable: 0,
4077
+
4078
+ in: [],
4079
+ specialZeroIn: 0,
4080
+ transformOriginIn: '50|*|50|*|0',
4081
+ inPlayEvent: '',
4082
+
4083
+ loop: [],
4084
+ repeatCount: 0,
4085
+ repeatStartDelay: 0,
4086
+ transformOriginLoop: '50|*|50|*|0',
4087
+ loopPlayEvent: '',
4088
+ loopPauseEvent: '',
4089
+ loopStopEvent: '',
4090
+
4091
+ out: [],
4092
+ transformOriginOut: '50|*|50|*|0',
4093
+ outPlayEvent: '',
4094
+ instantOut: 1
4095
+
4096
+ };
4097
+
4098
+ function LayerAnimations(layer) {
4099
+ this._loaded = false;
4100
+ this.active = false;
4101
+ this.layer = layer;
4102
+
4103
+ this.data = null;
4104
+
4105
+ layer.layer.data('adminLayerAnimations', this);
4106
+
4107
+ this.inRows = $();
4108
+ this.loopRows = $();
4109
+ this.outRows = $();
4110
+
4111
+ //this.load();
4112
+ };
4113
+
4114
+ /**
4115
+ * Here should we remove the nodes what we have added previously
4116
+ */
4117
+ LayerAnimations.prototype.deActivate = function () {
4118
+
4119
+ this.active = false;
4120
+ this.inRows.detach();
4121
+ this.loopRows.detach();
4122
+ this.outRows.detach();
4123
+ };
4124
+
4125
+ /**
4126
+ * Add nodes to the layer animation panel when it is activated
4127
+ */
4128
+ LayerAnimations.prototype.activate = function () {
4129
+
4130
+ // Lazy load...
4131
+ //this.load();
4132
+
4133
+ this.active = true;
4134
+
4135
+ smartSlider.layerAnimationManager.activateAnimations(this);
4136
+ };
4137
+
4138
+ LayerAnimations.prototype.addAnimation = function (group, data) {
4139
+ var animation = new NextendSmartSliderLayerAnimation(this, group, data),
4140
+ row = animation.getRow();
4141
+
4142
+ this[group + 'Rows'] = this[group + 'Rows']
4143
+ .add(row);
4144
+
4145
+ if (this.active) {
4146
+ row.appendTo(smartSlider.layerAnimationManager[group].list);
4147
+ }
4148
+
4149
+ this.layer.$.trigger('layerAnimationAdded', [group, animation]);
4150
+ };
4151
+
4152
+ /**
4153
+ * @param {NextendSmartSliderLayerAnimation} animationObject
4154
+ */
4155
+ LayerAnimations.prototype.removeAnimation = function (animationObject) {
4156
+ var group = animationObject.group;
4157
+ this[group + 'Rows'] = this[group + 'Rows'].not(animationObject.row);
4158
+ };
4159
+
4160
+ LayerAnimations.prototype.clearAll = function () {
4161
+ this._startHistory();
4162
+
4163
+ this._clear('in');
4164
+ this._clear('loop');
4165
+ this._clear('out');
4166
+
4167
+ this._endHistory();
4168
+ };
4169
+
4170
+ LayerAnimations.prototype.clear = function (group) {
4171
+ this._startHistory();
4172
+
4173
+ this._clear(group);
4174
+
4175
+ this._endHistory();
4176
+ };
4177
+
4178
+ LayerAnimations.prototype._clear = function (group) {
4179
+ var rows = this[group + 'Rows'];
4180
+ for (var i = 0; i < rows.length; i++) {
4181
+ rows.eq(i).data('animation').delete();
4182
+ }
4183
+ };
4184
+
4185
+ LayerAnimations.prototype.getCurrentData = function (group) {
4186
+ var animations = [];
4187
+ for (var i = 0; i < this[group + 'Rows'].length; i++) {
4188
+ animations.push(this[group + 'Rows'].eq(i).data('animation').data);
4189
+ }
4190
+
4191
+ var data = {
4192
+ animations: animations,
4193
+ transformOrigin: this.data['transformOrigin' + this.ucfirst(group)],
4194
+ repeatable: this.data.repeatable
4195
+ };
4196
+
4197
+ if (group == 'in') {
4198
+ data.specialZero = this.data.specialZeroIn;
4199
+
4200
+ data.playEvent = this.data.inPlayEvent;
4201
+ } else if (group == 'loop') {
4202
+ data.repeatCount = this.data.repeatCount;
4203
+ data.repeatStartDelay = this.data.repeatStartDelay;
4204
+
4205
+ data.playEvent = this.data.loopPlayEvent;
4206
+ data.pauseEvent = this.data.loopPauseEvent;
4207
+ data.stopEvent = this.data.loopStopEvent;
4208
+ } else if (group == 'out') {
4209
+ data.playEvent = this.data.outPlayEvent;
4210
+ data.instantOut = this.data.instantOut;
4211
+ }
4212
+ return data;
4213
+ };
4214
+
4215
+ LayerAnimations.prototype.edit = function (group, index) {
4216
+ var animations = [];
4217
+ for (var i = 0; i < this[group + 'Rows'].length; i++) {
4218
+ animations.push(this[group + 'Rows'].eq(i).data('animation').data);
4219
+ }
4220
+
4221
+ var animationManager = nextend.animationManager;
4222
+ animationManager.controller
4223
+ .setPreviewSize(this.layer.layer.width(), this.layer.layer.height())
4224
+ .setGroup(group);
4225
+
4226
+ var features = {
4227
+ repeatable: 1
4228
+ },
4229
+ data = {
4230
+ animations: animations,
4231
+ transformOrigin: this.data['transformOrigin' + this.ucfirst(group)],
4232
+ repeatable: this.data.repeatable
4233
+ };
4234
+
4235
+ if (group == 'in') {
4236
+ features.specialZero = 1;
4237
+ data.specialZero = this.data.specialZeroIn;
4238
+
4239
+ features.playEvent = 1;
4240
+ data.playEvent = this.data.inPlayEvent;
4241
+ animationManager.changeSetById(1000);
4242
+ animationManager.setTitle(n2_('In animation'));
4243
+ } else if (group == 'loop') {
4244
+ features.repeat = 1;
4245
+ data.repeatCount = this.data.repeatCount;
4246
+ data.repeatStartDelay = this.data.repeatStartDelay;
4247
+
4248
+ features.playEvent = 1;
4249
+ data.playEvent = this.data.loopPlayEvent;
4250
+ features.pauseEvent = 1;
4251
+ data.pauseEvent = this.data.loopPauseEvent;
4252
+ features.stopEvent = 1;
4253
+ data.stopEvent = this.data.loopStopEvent;
4254
+ animationManager.changeSetById(1200);
4255
+ animationManager.setTitle(n2_('Loop animation'));
4256
+ } else if (group == 'out') {
4257
+ features.playEvent = 1;
4258
+ features.instantOut = 1;
4259
+ data.playEvent = this.data.outPlayEvent;
4260
+ data.instantOut = this.data.instantOut;
4261
+ animationManager.changeSetById(1000);
4262
+ animationManager.setTitle(n2_('Out animation'));
4263
+ }
4264
+ animationManager.show(features, data, $.proxy(this.storeAnimations, this, group, data), {
4265
+ previewMode: false,
4266
+ previewHTML: false
4267
+ });
4268
+ if (index > 0) {
4269
+ animationManager.controller.tabField.options.eq(index).trigger('click');
4270
+ }
4271
+ };
4272
+
4273
+ LayerAnimations.prototype.storeAnimations = function (group, originalAnimationStack, e, animationStack) {
4274
+ smartSlider.history.add($.proxy(function () {
4275
+ return [this.layer, 'storeAnimations', $.extend(true, {}, animationStack), $.extend(true, {}, originalAnimationStack), [group]];
4276
+ }, this));
4277
+
4278
+ var i = 0,
4279
+ rows = this[group + 'Rows'];
4280
+
4281
+ this.setTransformOrigin(group, animationStack.transformOrigin);
4282
+ this.setRepeatable(animationStack.repeatable);
4283
+
4284
+ if (group == 'in') {
4285
+ this.setSpecialZero(group, animationStack.specialZero);
4286
+ this.setEvent(group, 'PlayEvent', animationStack.playEvent);
4287
+ } else if (group == 'loop') {
4288
+ this.setRepeatCount(group, animationStack.repeatCount);
4289
+ this.setRepeatStartDelay(group, animationStack.repeatStartDelay);
4290
+ this.setEvent(group, 'PlayEvent', animationStack.playEvent);
4291
+ this.setEvent(group, 'PauseEvent', animationStack.pauseEvent);
4292
+ this.setEvent(group, 'StopEvent', animationStack.stopEvent);
4293
+ } else if (group == 'out') {
4294
+ this.setEvent(group, 'PlayEvent', animationStack.playEvent);
4295
+ this.setInstantOut(animationStack.instantOut);
4296
+ }
4297
+
4298
+ for (; i < animationStack.animations.length && i < rows.length; i++) {
4299
+ rows.eq(i).data('animation').save(animationStack.animations[i]);
4300
+ }
4301
+ for (; i < animationStack.animations.length; i++) {
4302
+ this.addAnimation(group, animationStack.animations[i]);
4303
+ }
4304
+ for (; i < rows.length; i++) {
4305
+ rows.eq(i).data('animation').delete();
4306
+ }
4307
+
4308
+ smartSlider.layerAnimationManager.update(group);
4309
+ };
4310
+
4311
+ LayerAnimations.prototype.load = function () {
4312
+ if (this._loaded === false) {
4313
+ var animationsRaw = this.layer.layer.data('animations');
4314
+
4315
+ this.data = {};
4316
+
4317
+ $.extend(this.data, defaults);
4318
+
4319
+ if (typeof animationsRaw !== 'undefined') {
4320
+ $.extend(this.data, $.parseJSON(Base64.decode(animationsRaw)));
4321
+ }
4322
+
4323
+ this._load('in');
4324
+ this._load('loop');
4325
+ this._load('out');
4326
+
4327
+
4328
+ this._loaded = true;
4329
+ }
4330
+ };
4331
+
4332
+ LayerAnimations.prototype._load = function (group) {
4333
+
4334
+ if (typeof this.data[group] !== 'undefined') {
4335
+ for (var i = 0; i < this.data[group].length; i++) {
4336
+ this.addAnimation(group, this.data[group][i]);
4337
+ }
4338
+ delete this.data[group];
4339
+ }
4340
+ };
4341
+
4342
+ LayerAnimations.prototype.getAnimationsCode = function () {
4343
+ if (this._loaded === false) {
4344
+ return this.layer.layer.data('animations');
4345
+ } else {
4346
+ var animations = $.extend({}, this.data, {
4347
+ in: [],
4348
+ loop: [],
4349
+ out: []
4350
+ });
4351
+
4352
+ for (var i = 0; i < this.inRows.length; i++) {
4353
+ var animation = this.inRows.eq(i).data('animation');
4354
+ animations.in.push(animation.data);
4355
+ }
4356
+
4357
+ for (var i = 0; i < this.loopRows.length; i++) {
4358
+ var animation = this.loopRows.eq(i).data('animation');
4359
+ animations.loop.push(animation.data)
4360
+ }
4361
+
4362
+ for (var i = 0; i < this.outRows.length; i++) {
4363
+ var animation = this.outRows.eq(i).data('animation');
4364
+ animations.out.push(animation.data)
4365
+ }
4366
+
4367
+ return Base64.encode(JSON.stringify(animations));
4368
+ }
4369
+ };
4370
+
4371
+ LayerAnimations.prototype._startHistory = function () {
4372
+ this._oldData = {
4373
+ in: $.extend(true, {}, this.getCurrentData('in')),
4374
+ loop: $.extend(true, {}, this.getCurrentData('loop')),
4375
+ out: $.extend(true, {}, this.getCurrentData('out'))
4376
+ };
4377
+ };
4378
+
4379
+ LayerAnimations.prototype._endHistory = function () {
4380
+
4381
+ var currentData = {
4382
+ in: this.getCurrentData('in'),
4383
+ loop: this.getCurrentData('loop'),
4384
+ out: this.getCurrentData('out')
4385
+ };
4386
+ for (var k in currentData) {
4387
+ smartSlider.history.add($.proxy(function () {
4388
+ return [this.layer, 'storeAnimations', $.extend(true, {}, currentData[k]), $.extend(true, {}, this._oldData[k]), [k]];
4389
+ }, this));
4390
+ }
4391
+ this._oldData = null;
4392
+ };
4393
+
4394
+ LayerAnimations.prototype.loadData = function (data) {
4395
+
4396
+ this._startHistory();
4397
+
4398
+ this._clear('in');
4399
+ this._clear('loop');
4400
+ this._clear('out');
4401
+
4402
+ this.data = {};
4403
+ $.extend(this.data, defaults);
4404
+ $.extend(this.data, data);
4405
+
4406
+
4407
+ this._load('in');
4408
+ this._load('loop');
4409
+ this._load('out');
4410
+
4411
+ this._endHistory();
4412
+ };
4413
+
4414
+ LayerAnimations.prototype.getData = function () {
4415
+ var animations = $.extend({}, this.data, {
4416
+ in: [],
4417
+ loop: [],
4418
+ out: []
4419
+ });
4420
+
4421
+ for (var i = 0; i < this.inRows.length; i++) {
4422
+ var animation = this.inRows.eq(i).data('animation');
4423
+ animations.in.push($.extend(true, {}, animation.data));
4424
+ }
4425
+
4426
+ for (var i = 0; i < this.loopRows.length; i++) {
4427
+ var animation = this.loopRows.eq(i).data('animation');
4428
+ animations.loop.push($.extend(true, {}, animation.data))
4429
+ }
4430
+
4431
+ for (var i = 0; i < this.outRows.length; i++) {
4432
+ var animation = this.outRows.eq(i).data('animation');
4433
+ animations.out.push($.extend(true, {}, animation.data))
4434
+ }
4435
+ return animations;
4436
+ };
4437
+
4438
+ LayerAnimations.prototype.setSpecialZero = function (group, value) {
4439
+ value = parseInt(value) ? 1 : 0;
4440
+ if (value != this.data['transformOrigin' + this.ucfirst(group)]) {
4441
+ this.data.specialZeroIn = value;
4442
+ this.layer.$.trigger('layerAnimationSpecialZeroInChanged');
4443
+ }
4444
+ };
4445
+
4446
+ LayerAnimations.prototype.setRepeatCount = function (group, value) {
4447
+ this.data.repeatCount = value;
4448
+ };
4449
+
4450
+ LayerAnimations.prototype.setRepeatStartDelay = function (group, value) {
4451
+ this.data.repeatStartDelay = value;
4452
+ };
4453
+
4454
+ LayerAnimations.prototype.setEvent = function (group, event, value) {
4455
+ this.data[group + event] = value;
4456
+ };
4457
+
4458
+ LayerAnimations.prototype.setTransformOrigin = function (group, value) {
4459
+ this.data['transformOrigin' + this.ucfirst(group)] = value;
4460
+ };
4461
+
4462
+ LayerAnimations.prototype.setRepeatable = function (value) {
4463
+ this.data.repeatable = parseInt(value) ? 1 : 0;
4464
+ };
4465
+
4466
+ LayerAnimations.prototype.setInstantOut = function (value) {
4467
+ this.data.instantOut = parseInt(value) ? 1 : 0;
4468
+ };
4469
+
4470
+ LayerAnimations.prototype.ucfirst = function (string) {
4471
+ return string.charAt(0).toUpperCase() + string.slice(1);
4472
+ };
4473
+
4474
+ scope.NextendSmartSliderLayerAnimations = LayerAnimations;
4475
+
4476
+ })(nextend.smartSlider, n2, window);
4477
+ (function (smartSlider, $, scope, undefined) {
4478
+
4479
+ var highlighted = false,
4480
+ timeout = null;
4481
+ window.nextendPreventClick = false;
4482
+
4483
+ var UNDEFINED,
4484
+ rAFShim = (function () {
4485
+ var timeLast = 0;
4486
+
4487
+ return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
4488
+ var timeCurrent = (new Date()).getTime(),
4489
+ timeDelta;
4490
+
4491
+ /* Dynamically set delay on a per-tick basis to match 60fps. */
4492
+ /* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */
4493
+ timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
4494
+ timeLast = timeCurrent + timeDelta;
4495
+
4496
+ return setTimeout(function () {
4497
+ callback(timeCurrent + timeDelta);
4498
+ }, timeDelta);
4499
+ };
4500
+ })(),
4501
+ resizeCollection = {
4502
+ raf: false,
4503
+ ratios: null,
4504
+ isThrottled: false,
4505
+ layers: []
4506
+ },
4507
+ requestRender = function () {
4508
+ if (resizeCollection.raf === false) {
4509
+ resizeCollection.raf = true;
4510
+ rAFShim(function () {
4511
+ for (var i = 0; i < resizeCollection.layers.length; i++) {
4512
+ if (!resizeCollection.layers[i].isDeleted) {
4513
+ resizeCollection.layers[i].doTheResize(resizeCollection.ratios, true, resizeCollection.isThrottled);
4514
+ }
4515
+ }
4516
+ resizeCollection = {
4517
+ raf: false,
4518
+ ratios: null,
4519
+ isThrottled: false,
4520
+ layers: []
4521
+ };
4522
+ });
4523
+ }
4524
+ };
4525
+
4526
+ function Layer(layerEditor, layer, itemEditor, properties) {
4527
+ this.isDeleted = false;
4528
+ //this.resize = NextendDeBounce(this.resize, 200);
4529
+ //this.triggerLayerResized = NextendThrottle(this.triggerLayerResized, 30);
4530
+ this._triggerLayerResizedThrottled = NextendThrottle(this._triggerLayerResized, 30);
4531
+ //this.doThrottledTheResize = NextendThrottle(this.doTheResize, 16.6666);
4532
+ this.doThrottledTheResize = this.doTheResize;
4533
+ this.eye = false;
4534
+ this.lock = false;
4535
+ this.parent = false;
4536
+ this.parentIsVisible = true;
4537
+
4538
+ this.$ = $(this);
4539
+
4540
+ this.layerEditor = layerEditor;
4541
+
4542
+ /** @type {NextendSmartSliderTimelineLayer} */
4543
+ this.timelineLayer = null;
4544
+
4545
+ if (!layer) {
4546
+ layer = $('<div class="n2-ss-layer" style="z-index: ' + layerEditor.zIndexList.length + ';"></div>')
4547
+ .appendTo(layerEditor.layerContainerElement);
4548
+ this.property = $.extend({
4549
+ id: null,
4550
+ class: '',
4551
+ parentid: null,
4552
+ parentalign: 'center',
4553
+ parentvalign: 'middle',
4554
+ name: 'New layer',
4555
+ nameSynced: 1,
4556
+ crop: 'visible',
4557
+ inneralign: 'left',
4558
+ parallax: 0,
4559
+ align: 'center',
4560
+ valign: 'middle',
4561
+ fontsize: 100,
4562
+ adaptivefont: 0,
4563
+ desktopPortrait: 1,
4564
+ desktopLandscape: 1,
4565
+ tabletPortrait: 1,
4566
+ tabletLandscape: 1,
4567
+ mobilePortrait: 1,
4568
+ mobileLandscape: 1,
4569
+ left: 0,
4570
+ top: 0,
4571
+ responsiveposition: 1,
4572
+ width: 'auto',
4573
+ height: 'auto',
4574
+ responsivesize: 1,
4575
+ mouseenter: UNDEFINED,
4576
+ click: UNDEFINED,
4577
+ mouseleave: UNDEFINED,
4578
+ play: UNDEFINED,
4579
+ pause: UNDEFINED,
4580
+ stop: UNDEFINED
4581
+ }, properties);
4582
+ } else {
4583
+ this.property = {
4584
+ id: layer.attr('id'),
4585
+ class: layer.data('class'),
4586
+ parentid: layer.data('parentid'),
4587
+ parentalign: layer.data('desktopportraitparentalign'),
4588
+ parentvalign: layer.data('desktopportraitparentvalign'),
4589
+ name: layer.data('name') + '',
4590
+ nameSynced: layer.data('namesynced'),
4591
+ crop: layer.data('crop'),
4592
+ inneralign: layer.data('inneralign'),
4593
+ parallax: layer.data('parallax'),
4594
+ align: layer.data('desktopportraitalign'),
4595
+ valign: layer.data('desktopportraitvalign'),
4596
+ fontsize: layer.data('desktopportraitfontsize'),
4597
+ adaptivefont: layer.data('adaptivefont'),
4598
+ desktopPortrait: parseFloat(layer.data('desktopportrait')),
4599
+ desktopLandscape: parseFloat(layer.data('desktoplandscape')),
4600
+ tabletPortrait: parseFloat(layer.data('tabletportrait')),
4601
+ tabletLandscape: parseFloat(layer.data('tabletlandscape')),
4602
+ mobilePortrait: parseFloat(layer.data('mobileportrait')),
4603
+ mobileLandscape: parseFloat(layer.data('mobilelandscape')),
4604
+ left: parseInt(layer.data('desktopportraitleft')),
4605
+ top: parseInt(layer.data('desktopportraittop')),
4606
+ responsiveposition: parseInt(layer.data('responsiveposition')),
4607
+ responsivesize: parseInt(layer.data('responsivesize')),
4608
+ mouseenter: layer.data('mouseenter'),
4609
+ click: layer.data('click'),
4610
+ mouseleave: layer.data('mouseleave'),
4611
+ play: layer.data('play'),
4612
+ pause: layer.data('pause'),
4613
+ stop: layer.data('stop')
4614
+ };
4615
+
4616
+ var width = layer.data('desktopportraitwidth');
4617
+ if (this.isDimensionPropertyAccepted(width)) {
4618
+ this.property.width = width;
4619
+ } else {
4620
+ this.property.width = parseInt(width);
4621
+ }
4622
+
4623
+ var height = layer.data('desktopportraitheight');
4624
+ if (this.isDimensionPropertyAccepted(height)) {
4625
+ this.property.height = height;
4626
+ } else {
4627
+ this.property.height = parseInt(height);
4628
+ }
4629
+ }
4630
+
4631
+ if (!this.property.id) {
4632
+ this.property.id = null;
4633
+ }
4634
+
4635
+ this.subscribeParentCallbacks = {};
4636
+ if (this.property.parentid) {
4637
+ this.subscribeParent();
4638
+ } else {
4639
+ this.property.parentid = null;
4640
+ }
4641
+
4642
+ if (!this.property.parentalign) {
4643
+ this.property.parentalign = 'center';
4644
+ }
4645
+
4646
+ if (!this.property.parentvalign) {
4647
+ this.property.parentvalign = 'middle';
4648
+ }
4649
+
4650
+ if (typeof this.property.nameSynced === 'undefined') {
4651
+ this.property.nameSynced = 1;
4652
+ }
4653
+
4654
+ if (typeof this.property.responsiveposition === 'undefined') {
4655
+ this.property.responsiveposition = 1;
4656
+ }
4657
+
4658
+ if (typeof this.property.responsivesize === 'undefined') {
4659
+ this.property.responsivesize = 1;
4660
+ }
4661
+
4662
+ if (!this.property.inneralign) {
4663
+ this.property.inneralign = 'left';
4664
+ }
4665
+
4666
+ if (!this.property.crop) {
4667
+ this.property.crop = 'visible';
4668
+ }
4669
+
4670
+ if (!this.property.parallax) {
4671
+ this.property.parallax = 0;
4672
+ }
4673
+
4674
+ if (typeof this.property.fontsize == 'undefined') {
4675
+ this.property.fontsize = 100;
4676
+ }
4677
+
4678
+ if (typeof this.property.adaptivefont == 'undefined') {
4679
+ this.property.adaptivefont = 0;
4680
+ }
4681
+
4682
+ if (!this.property.align) {
4683
+ this.property.align = 'left';
4684
+ }
4685
+
4686
+ if (!this.property.valign) {
4687
+ this.property.valign = 'top';
4688
+ }
4689
+ layer.attr('data-align', this.property.align);
4690
+ layer.attr('data-valign', this.property.valign);
4691
+
4692
+ this.layer = layer.data('layerObject', this);
4693
+ this.layer.css('visibility', 'hidden');
4694
+
4695
+ this.zIndex = parseInt(this.layer.css('zIndex'));
4696
+ if (isNaN(this.zIndex)) {
4697
+ this.zIndex = 0;
4698
+ }
4699
+
4700
+ var eye = layer.data('eye'),
4701
+ lock = layer.data('lock');
4702
+ if (eye !== null && typeof eye != 'undefined') {
4703
+ this.eye = !!eye;
4704
+ }
4705
+ if (lock !== null && typeof lock != 'undefined') {
4706
+ this.lock = !!lock;
4707
+ }
4708
+ this.deviceProperty = {
4709
+ desktopPortrait: {
4710
+ left: this.property.left,
4711
+ top: this.property.top,
4712
+ width: this.property.width,
4713
+ height: this.property.height,
4714
+ align: this.property.align,
4715
+ valign: this.property.valign,
4716
+ parentalign: this.property.parentalign,
4717
+ parentvalign: this.property.parentvalign,
4718
+ fontsize: this.property.fontsize
4719
+ },
4720
+ desktopLandscape: {
4721
+ left: layer.data('desktoplandscapeleft'),
4722
+ top: layer.data('desktoplandscapetop'),
4723
+ width: layer.data('desktoplandscapewidth'),
4724
+ height: layer.data('desktoplandscapeheight'),
4725
+ align: layer.data('desktoplandscapealign'),
4726
+ valign: layer.data('desktoplandscapevalign'),
4727
+ parentalign: layer.data('desktoplandscapeparentalign'),
4728
+ parentvalign: layer.data('desktoplandscapeparentvalign'),
4729
+ fontsize: layer.data('desktoplandscapefontsize')
4730
+ },
4731
+ tabletPortrait: {
4732
+ left: layer.data('tabletportraitleft'),
4733
+ top: layer.data('tabletportraittop'),
4734
+ width: layer.data('tabletportraitwidth'),
4735
+ height: layer.data('tabletportraitheight'),
4736
+ align: layer.data('tabletportraitalign'),
4737
+ valign: layer.data('tabletportraitvalign'),
4738
+ parentalign: layer.data('tabletportraitparentalign'),
4739
+ parentvalign: layer.data('tabletportraitparentvalign'),
4740
+ fontsize: layer.data('tabletportraitfontsize')
4741
+ },
4742
+ tabletLandscape: {
4743
+ left: layer.data('tabletlandscapeleft'),
4744
+ top: layer.data('tabletlandscapetop'),
4745
+ width: layer.data('tabletlandscapewidth'),
4746
+ height: layer.data('tabletlandscapeheight'),
4747
+ align: layer.data('tabletlandscapealign'),
4748
+ valign: layer.data('tabletlandscapevalign'),
4749
+ parentalign: layer.data('tabletlandscapeparentalign'),
4750
+ parentvalign: layer.data('tabletlandscapeparentvalign'),
4751
+ fontsize: layer.data('tabletlandscapefontsize')
4752
+ },
4753
+ mobilePortrait: {
4754
+ left: layer.data('mobileportraitleft'),
4755
+ top: layer.data('mobileportraittop'),
4756
+ width: layer.data('mobileportraitwidth'),
4757
+ height: layer.data('mobileportraitheight'),
4758
+ align: layer.data('mobileportraitalign'),
4759
+ valign: layer.data('mobileportraitvalign'),
4760
+ parentalign: layer.data('mobileportraitparentalign'),
4761
+ parentvalign: layer.data('mobileportraitparentvalign'),
4762
+ fontsize: layer.data('mobileportraitfontsize')
4763
+ },
4764
+ mobileLandscape: {
4765
+ left: layer.data('mobilelandscapeleft'),
4766
+ top: layer.data('mobilelandscapetop'),
4767
+ width: layer.data('mobilelandscapewidth'),
4768
+ height: layer.data('mobilelandscapeheight'),
4769
+ align: layer.data('mobilelandscapealign'),
4770
+ valign: layer.data('mobilelandscapevalign'),
4771
+ parentalign: layer.data('mobilelandscapeparentalign'),
4772
+ parentvalign: layer.data('mobilelandscapeparentvalign'),
4773
+ fontsize: layer.data('mobilelandscapefontsize')
4774
+ }
4775
+ };
4776
+
4777
+
4778
+ this.layersItemsElement = layerEditor.layersItemsElement;
4779
+ this.layersItemsUlElement = this.layersItemsElement.find('> ul');
4780
+
4781
+ this.createRow();
4782
+
4783
+ this.itemEditor = itemEditor;
4784
+
4785
+ this.initItems();
4786
+
4787
+ this.___makeLayerAlign();
4788
+ this.___makeLayerResizeable();
4789
+ this.___makeLayerDraggable();
4790
+
4791
+ layerEditor.layerList.push(this);
4792
+ //this.index = layerEditor.layerList.push(this) - 1;
4793
+
4794
+ /**
4795
+ * This is a fix for the editor load. The layers might not in the z-index order on the load,
4796
+ * so we have to "mess up" the array and let the algorithm to fix it.
4797
+ */
4798
+ if (typeof layerEditor.zIndexList[this.zIndex] === 'undefined') {
4799
+ layerEditor.zIndexList[this.zIndex] = this;
4800
+ } else {
4801
+ layerEditor.zIndexList.splice(this.zIndex, 0, this);
4802
+ }
4803
+
4804
+ this._lock();
4805
+
4806
+ this.animation = new NextendSmartSliderLayerAnimations(this);
4807
+
4808
+
4809
+ this.layerEditor.$.trigger('layerCreated', this);
4810
+ $(window).triggerHandler('layerCreated');
4811
+
4812
+ this.animation.load();
4813
+
4814
+ this.layer.on({
4815
+ mousedown: $.proxy(this.activate, this),
4816
+ dblclick: $.proxy(this.fit, this)
4817
+ });
4818
+
4819
+ setTimeout($.proxy(function () {
4820
+ this._resize(true);
4821
+ this._eye();
4822
+ }, this), 300);
4823
+ };
4824
+
4825
+ Layer.prototype.getIndex = function () {
4826
+ return this.layerEditor.layerList.indexOf(this);
4827
+ };
4828
+
4829
+ Layer.prototype.getParent = function () {
4830
+ return $('#' + this.getProperty(false, 'parentid')).data('layerObject');
4831
+ };
4832
+
4833
+ Layer.prototype.requestID = function () {
4834
+ var id = this.getProperty(false, 'id');
4835
+ if (!id) {
4836
+ id = $.fn.uid();
4837
+ this.setProperty('id', id, 'layer');
4838
+ }
4839
+ return id;
4840
+ };
4841
+
4842
+ Layer.prototype.createRow = function () {
4843
+ var dblClickInterval = 300,
4844
+ timeout = null,
4845
+ unlink = $('<a class="n2-ss-parent-unlink" href="#" onclick="return false;"><i class="n2-i n2-i-layerunlink n2-i-grey-opacity"></i></a>').on('click', $.proxy(this.unlink, this)),
4846
+ remove = $('<a href="#" onclick="return false;"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></a>').on('click', $.proxy(this.delete, this)),
4847
+ duplicate = $('<a href="#" onclick="return false;"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></a>').on('click', $.proxy(this.duplicate, this, true, false));
4848
+
4849
+ this.soloElement = $('<a href="#" onclick="return false;"><i class="n2-i n2-i-bulb n2-i-grey-opacity"></i></a>').css('opacity', 0.3).on('click', $.proxy(this.switchSolo, this));
4850
+ this.eyeElement = $('<a href="#" onclick="return false;"><i class="n2-i n2-i-eye n2-i-grey-opacity"></i></a>').on('click', $.proxy(this.switchEye, this));
4851
+ this.lockElement = $('<a href="#" onclick="return false;"><i class="n2-i n2-i-lock n2-i-grey-opacity"></i></a>').on('click', $.proxy(this.switchLock, this));
4852
+
4853
+ this.layerRow = $('<li class="n2-ss-layer-row"></li>')
4854
+ .on({
4855
+ mouseenter: $.proxy(function () {
4856
+ this.layer.addClass('n2-highlight');
4857
+ }, this),
4858
+ mouseleave: $.proxy(function (e) {
4859
+ this.layer.removeClass('n2-highlight');
4860
+ }, this)
4861
+ })
4862
+ .appendTo(this.layersItemsUlElement);
4863
+ this.layerTitleSpan = $('<span class="n2-ucf">' + this.property.name + '</span>')
4864
+ .on({
4865
+ mouseup: $.proxy(function (e) {
4866
+ if (timeout) {
4867
+ clearTimeout(timeout);
4868
+ timeout = null;
4869
+ this.editName();
4870
+ } else {
4871
+ timeout = setTimeout($.proxy(function () {
4872
+ this.activate();
4873
+ timeout = null;
4874
+ }, this), dblClickInterval);
4875
+ }
4876
+ }, this)
4877
+ });
4878
+
4879
+ this.layerTitle = $('<div class="n2-ss-layer-title"></div>')
4880
+ .append(this.layerTitleSpan)
4881
+ .append($('<div class="n2-actions"></div>').append(unlink).append(duplicate).append(remove))
4882
+ .append($('<div class="n2-actions-left"></div>').append(this.eyeElement).append(this.soloElement).append(this.lockElement))
4883
+ .appendTo(this.layerRow)
4884
+ .on({
4885
+ mouseup: $.proxy(function (e) {
4886
+ if (e.target.tagName === 'DIV') {
4887
+ this.activate();
4888
+ }
4889
+ }, this)
4890
+ });
4891
+
4892
+ this.editorVisibilityChange();
4893
+ };
4894
+
4895
+ Layer.prototype.editorVisibilityChange = function () {
4896
+ switch (this.layersItemsUlElement.children().length) {
4897
+ case 0:
4898
+ $('body').removeClass('n2-has-layers');
4899
+ break;
4900
+ case 1:
4901
+ $('body').addClass('n2-has-layers');
4902
+ break;
4903
+ }
4904
+ };
4905
+
4906
+ Layer.prototype.setZIndex = function (targetIndex) {
4907
+ this.zIndex = targetIndex;
4908
+ this.layer.css('zIndex', targetIndex);
4909
+ this.layersItemsUlElement.append(this.layerRow);
4910
+ this.$.trigger('layerIndexed', targetIndex);
4911
+ };
4912
+
4913
+ /**
4914
+ *
4915
+ * @param item {optional}
4916
+ */
4917
+ Layer.prototype.activate = function (e) {
4918
+ if (document.activeElement) {
4919
+ document.activeElement.blur();
4920
+ }
4921
+ if (this.items.length == 0) {
4922
+ console.error('The layer do not have item on it!');
4923
+ } else {
4924
+ this.items[0].activate();
4925
+ }
4926
+
4927
+ // Set the layer active if it is not active currently
4928
+ var currentIndex = this.getIndex();
4929
+ if (this.layerEditor.activeLayerIndex !== currentIndex) {
4930
+ this.layerRow.addClass('n2-active');
4931
+ this.layer.triggerHandler('n2-ss-activate');
4932
+ this.layerEditor.changeActiveLayer(currentIndex);
4933
+ nextend.activeLayer = this.layer;
4934
+
4935
+ var scroll = this.layersItemsUlElement.parent(),
4936
+ scrollTop = scroll.scrollTop(),
4937
+ top = this.layerRow.get(0).offsetTop;
4938
+ if (top < scrollTop || top > scrollTop + scroll.height() - this.layerRow.height()) {
4939
+ scroll.scrollTop(top);
4940
+ }
4941
+
4942
+ if (timeout) {
4943
+ highlighted.removeClass('n2-highlight2');
4944
+ clearTimeout(timeout);
4945
+ timeout = null;
4946
+ }
4947
+ highlighted = this.layer.addClass('n2-highlight2');
4948
+ timeout = setTimeout(function () {
4949
+ highlighted.removeClass('n2-highlight2');
4950
+ highlighted = null;
4951
+ timeout = null;
4952
+ }, 500);
4953
+ }
4954
+ };
4955
+
4956
+ Layer.prototype.deActivate = function () {
4957
+ if (this.animation) {
4958
+ this.animation.deActivate();
4959
+ }
4960
+ this.layerRow.removeClass('n2-active');
4961
+ this.layer.triggerHandler('n2-ss-deactivate');
4962
+ };
4963
+
4964
+ Layer.prototype.fit = function () {
4965
+ var layer = this.layer.get(0);
4966
+
4967
+ var slideSize = this.layerEditor.slideSize,
4968
+ position = this.layer.position();
4969
+
4970
+ if (layer.scrollWidth > 0 && layer.scrollHeight > 0) {
4971
+ var resized = false;
4972
+ for (var i = 0; i < this.items.length; i++) {
4973
+ resized = this.items[i].parser.fitLayer(this.items[i]);
4974
+ if (resized) {
4975
+ break;
4976
+ }
4977
+ }
4978
+ if (!resized) {
4979
+ this.setProperty('width', 'auto', 'layer');
4980
+ this.setProperty('height', 'auto', 'layer');
4981
+
4982
+ var layerWidth = this.layer.width();
4983
+ if (Math.abs(this.layerEditor.layerContainerElement.width() - this.layer.position().left - layerWidth) < 2) {
4984
+ this.setProperty('width', layerWidth, 'layer');
4985
+ }
4986
+ }
4987
+ }
4988
+ };
4989
+
4990
+ Layer.prototype.switchToAnimation = function () {
4991
+ smartSlider.sidebarManager.switchTab(1);
4992
+ };
4993
+
4994
+ Layer.prototype.hide = function (targetMode) {
4995
+ this.store(false, (targetMode ? targetMode : this.getMode()), 0, true);
4996
+ };
4997
+
4998
+ Layer.prototype.show = function (targetMode) {
4999
+ this.store(false, (targetMode ? targetMode : this.getMode()), 1, true);
5000
+ };
5001
+
5002
+ Layer.prototype.switchSolo = function () {
5003
+ this.layerEditor.setSolo(this);
5004
+ };
5005
+
5006
+ Layer.prototype.markSolo = function () {
5007
+ this.soloElement.css('opacity', 1);
5008
+ this.layer.addClass('n2-ss-layer-solo');
5009
+ };
5010
+
5011
+ Layer.prototype.unmarkSolo = function () {
5012
+ this.soloElement.css('opacity', 0.3);
5013
+ this.layer.removeClass('n2-ss-layer-solo');
5014
+ };
5015
+
5016
+ Layer.prototype.switchEye = function () {
5017
+ this.eye = !this.eye;
5018
+ this._eye();
5019
+ };
5020
+
5021
+ Layer.prototype._eye = function () {
5022
+ if (this.eye) {
5023
+ this.eyeElement.css('opacity', 0.3);
5024
+ this.layer.css('visibility', 'hidden');
5025
+ } else {
5026
+ this.eyeElement.css('opacity', 1);
5027
+ this.layer.css('visibility', '');
5028
+ }
5029
+ };
5030
+
5031
+ Layer.prototype._hide = function () {
5032
+ this.layer.css('display', 'none');
5033
+ };
5034
+
5035
+ Layer.prototype._show = function () {
5036
+ if (parseInt(this.property[this.layerEditor.getMode()])) {
5037
+ this.layer.css('display', 'block');
5038
+ }
5039
+ };
5040
+
5041
+ Layer.prototype.switchLock = function () {
5042
+ this.lock = !this.lock;
5043
+ this._lock();
5044
+ };
5045
+
5046
+ Layer.prototype._lock = function () {
5047
+ if (this.lock) {
5048
+ this.lockElement.css('opacity', 1);
5049
+ this.layer.nextenddraggable("disable");
5050
+ this.layer.nextendResizable("disable");
5051
+ this.layer.addClass('n2-ss-layer-locked');
5052
+ } else {
5053
+ this.lockElement.css('opacity', 0.3);
5054
+ this.layer.nextenddraggable("enable");
5055
+ this.layer.nextendResizable("enable");
5056
+ this.layer.removeClass('n2-ss-layer-locked');
5057
+
5058
+ }
5059
+ };
5060
+
5061
+ Layer.prototype.duplicate = function (needActivate, newParentId, newLayers) {
5062
+ var layer = this.getHTML(true, false);
5063
+
5064
+ var id = layer.attr('id');
5065
+ if (id) {
5066
+ id = $.fn.uid();
5067
+ layer.attr('id', id);
5068
+ }
5069
+
5070
+ if (newParentId) {
5071
+ layer.attr('data-parentid', newParentId);
5072
+ }
5073
+
5074
+ var newLayer = this.layerEditor._addLayer(layer, true);
5075
+
5076
+ if (typeof newLayers === 'undefined') {
5077
+ newLayers = [];
5078
+ } else {
5079
+ newLayers.push(newLayer);
5080
+ }
5081
+
5082
+ this.layer.triggerHandler('LayerDuplicated', [id, newLayers]);
5083
+
5084
+ this.layerRow.trigger('mouseleave');
5085
+
5086
+ if (needActivate) {
5087
+ newLayer.activate();
5088
+ }
5089
+
5090
+
5091
+ if (!newParentId) {
5092
+ smartSlider.history.add($.proxy(function () {
5093
+ return [this, 'duplicateLayer', 'duplicate', 'delete', [newLayer]];
5094
+ }, this));
5095
+ }
5096
+ };
5097
+
5098
+ Layer.prototype.delete = function (deleteChild, oldLayers) {
5099
+
5100
+ smartSlider.history.add($.proxy(function () {
5101
+ return [this, 'deleteLayer', 'delete', 'create', [this.getData(true)]];
5102
+ }, this));
5103
+
5104
+ this.deActivate();
5105
+
5106
+ for (var i = 0; i < this.items.length; i++) {
5107
+ this.items[i].delete();
5108
+ }
5109
+
5110
+ this.layerEditor.zIndexList.splice(this.zIndex, 1);
5111
+
5112
+ var parentId = this.getProperty(false, 'parentid');
5113
+ if (parentId) {
5114
+ this.unSubscribeParent(true);
5115
+ }
5116
+ // If delete happen meanwhile layer dragged or resized, we have to cancel that.
5117
+ this.layer.trigger('mouseup');
5118
+ this.layerEditor.layerDeleted(this.getIndex());
5119
+ if (typeof oldLayers === 'undefined') {
5120
+ oldLayers = [];
5121
+ } else {
5122
+ oldLayers.push(this);
5123
+ }
5124
+ this.layer.triggerHandler('LayerDeleted', [typeof deleteChild !== 'undefined' ? deleteChild : false, oldLayers]);
5125
+ this.layer.remove();
5126
+ this.layerRow.remove();
5127
+
5128
+ this.editorVisibilityChange();
5129
+
5130
+ this.$.trigger('layerDeleted');
5131
+
5132
+ //delete this.layerEditor;
5133
+ delete this.layer;
5134
+ delete this.itemEditor;
5135
+ delete this.animation;
5136
+ //delete this.items;
5137
+ this.isDeleted = true;
5138
+ };
5139
+
5140
+ Layer.prototype.getHTML = function (itemsIncluded, base64) {
5141
+ var layer = $('<div class="n2-ss-layer"></div>')
5142
+ .attr('style', this.getStyleText());
5143
+
5144
+ for (var k in this.property) {
5145
+ if (k != 'width' && k != 'height' && k != 'left' && k != 'top') {
5146
+ layer.attr('data-' + k.toLowerCase(), this.property[k]);
5147
+ }
5148
+ }
5149
+
5150
+ for (var k in this.deviceProperty) {
5151
+ for (var k2 in this.deviceProperty[k]) {
5152
+ layer.attr('data-' + k.toLowerCase() + k2, this.deviceProperty[k][k2]);
5153
+ }
5154
+ }
5155
+
5156
+ layer.css({
5157
+ position: 'absolute',
5158
+ zIndex: this.zIndex + 1
5159
+ });
5160
+
5161
+ for (var k in this.deviceProperty['desktop']) {
5162
+ layer.css(k, this.deviceProperty['desktop'][k] + 'px');
5163
+ }
5164
+
5165
+ if (itemsIncluded) {
5166
+ for (var i = 0; i < this.items.length; i++) {
5167
+ layer.append(this.items[i].getHTML(base64));
5168
+ }
5169
+ }
5170
+ var id = this.getProperty(false, 'id');
5171
+ if (id && id != '') {
5172
+ layer.attr('id', id);
5173
+ }
5174
+
5175
+ layer.attr('data-eye', this.eye);
5176
+ layer.attr('data-lock', this.lock);
5177
+
5178
+ //console.log(this.isDeleted);
5179
+ layer.attr('data-animations', this.animation.getAnimationsCode());
5180
+
5181
+ return layer;
5182
+ };
5183
+
5184
+ Layer.prototype.getData = function (itemsIncluded) {
5185
+ var layer = {
5186
+ zIndex: (this.zIndex + 1),
5187
+ eye: this.eye,
5188
+ lock: this.lock,
5189
+ animations: this.animation.getData()
5190
+ };
5191
+ for (var k in this.property) {
5192
+ switch (k) {
5193
+ case 'width':
5194
+ case 'height':
5195
+ case 'left':
5196
+ case 'top':
5197
+ case 'align':
5198
+ case 'valign':
5199
+ case 'parentalign':
5200
+ case 'parentvalign':
5201
+ case 'fontsize':
5202
+ break;
5203
+ default:
5204
+ layer[k.toLowerCase()] = this.property[k];
5205
+ }
5206
+ }
5207
+
5208
+ // store the device based properties
5209
+ for (var device in this.deviceProperty) {
5210
+ for (var property in this.deviceProperty[device]) {
5211
+ var value = this.deviceProperty[device][property];
5212
+ if (typeof value === 'undefined') {
5213
+ continue;
5214
+ }
5215
+ if (!(property == 'width' && this.isDimensionPropertyAccepted(value)) && !(property == 'height' && this.isDimensionPropertyAccepted(value)) && property != 'align' && property != 'valign' && property != 'parentalign' && property != 'parentvalign') {
5216
+ value = parseFloat(value);
5217
+ }
5218
+ layer[device.toLowerCase() + property] = value;
5219
+ }
5220
+ }
5221
+
5222
+ // Set the default styles for the layer
5223
+ /*var defaultProperties = this.deviceProperty['desktopPortrait'];
5224
+ layer.style += 'left:' + parseFloat(defaultProperties.left) + 'px;';
5225
+ layer.style += 'top:' + parseFloat(defaultProperties.top) + 'px;';
5226
+ if (this.isDimensionPropertyAccepted(defaultProperties.width)) {
5227
+ layer.style += 'width:' + defaultProperties.width + ';';
5228
+ } else {
5229
+ layer.style += 'width:' + parseFloat(defaultProperties.width) + 'px;';
5230
+ }
5231
+ if (this.isDimensionPropertyAccepted(defaultProperties.height)) {
5232
+ layer.style += 'height:' + defaultProperties.height + ';';
5233
+ } else {
5234
+ layer.style += 'height:' + parseFloat(defaultProperties.height) + 'px;';
5235
+ }*/
5236
+ if (itemsIncluded) {
5237
+ layer.items = [];
5238
+ for (var i = 0; i < this.items.length; i++) {
5239
+ layer.items.push(this.items[i].getData());
5240
+ }
5241
+ }
5242
+ return layer;
5243
+ };
5244
+
5245
+ Layer.prototype.getDataWithChildren = function (layers) {
5246
+ layers.push(this.getData(true));
5247
+ this.layer.triggerHandler('LayerGetDataWithChildren', [layers]);
5248
+ return layers;
5249
+ };
5250
+
5251
+ Layer.prototype.initItems = function () {
5252
+ this.items = [];
5253
+ var items = this.layer.find('.n2-ss-item');
5254
+ for (var i = 0; i < items.length; i++) {
5255
+ this.addItem(items.eq(i), false);
5256
+ }
5257
+ };
5258
+
5259
+ Layer.prototype.addItem = function (item, place) {
5260
+ if (place) {
5261
+ item.appendTo(this.layer);
5262
+ }
5263
+ new NextendSmartSliderItem(item, this, this.itemEditor);
5264
+ };
5265
+
5266
+ Layer.prototype.editName = function () {
5267
+ var input = new NextendSmartSliderAdminInlineField();
5268
+
5269
+ input.$input.on({
5270
+ valueChanged: $.proxy(function (e, newName) {
5271
+ this.rename(newName, true);
5272
+ this.layerTitleSpan.css('display', 'inline');
5273
+ }, this),
5274
+ cancel: $.proxy(function () {
5275
+ this.layerTitleSpan.css('display', 'inline');
5276
+ }, this)
5277
+ });
5278
+
5279
+ this.layerTitleSpan.css('display', 'none');
5280
+ input.injectNode(this.layerTitle, this.property.name);
5281
+
5282
+ };
5283
+
5284
+ Layer.prototype.rename = function (newName, force) {
5285
+
5286
+ if (this.property.nameSynced || force) {
5287
+
5288
+ if (force) {
5289
+ this.property.nameSynced = 0;
5290
+ }
5291
+
5292
+ if (newName == '') {
5293
+ if (force) {
5294
+ this.property.nameSynced = 1;
5295
+ if (this.items.length) {
5296
+ this.items[0].reRender();
5297
+ return false;
5298
+ }
5299
+ }
5300
+ newName = 'Layer #' + (this.layerEditor.layerList.length + 1);
5301
+ }
5302
+ newName = newName.substr(0, 35);
5303
+ if (this.property.name != newName) {
5304
+ this.property.name = newName;
5305
+ this.layerTitleSpan.html(newName);
5306
+
5307
+ this.$.trigger('layerRenamed', newName);
5308
+ }
5309
+ }
5310
+ };
5311
+
5312
+ // from: manager or other
5313
+ Layer.prototype.setProperty = function (name, value, from) {
5314
+ switch (name) {
5315
+ case 'responsiveposition':
5316
+ case 'responsivesize':
5317
+ value = parseInt(value);
5318
+ case 'id':
5319
+ case 'parentid':
5320
+ case 'class':
5321
+ case 'inneralign':
5322
+ case 'crop':
5323
+ case 'parallax':
5324
+ case 'adaptivefont':
5325
+ case 'mouseenter':
5326
+ case 'click':
5327
+ case 'mouseleave':
5328
+ case 'play':
5329
+ case 'pause':
5330
+ case 'stop':
5331
+ this.store(false, name, value, true);
5332
+ break;
5333
+ case 'parentalign':
5334
+ case 'parentvalign':
5335
+ case 'align':
5336
+ case 'valign':
5337
+ case 'fontsize':
5338
+ this.store(true, name, value, true);
5339
+ break;
5340
+ case 'width':
5341
+ var ratioSizeH = this.layerEditor.getResponsiveRatio('h')
5342
+ if (!parseInt(this.getProperty(false, 'responsivesize'))) {
5343
+ ratioSizeH = 1;
5344
+ }
5345
+
5346
+ var v = value;
5347
+ if (!this.isDimensionPropertyAccepted(value)) {
5348
+ v = ~~value;
5349
+ if (v != value) {
5350
+ this.$.trigger('propertyChanged', [name, v]);
5351
+ }
5352
+ }
5353
+ this.storeWithModifier(name, v, ratioSizeH, true);
5354
+ this._resize(false);
5355
+ break;
5356
+ case 'height':
5357
+ var ratioSizeV = this.layerEditor.getResponsiveRatio('v')
5358
+ if (!parseInt(this.getProperty(false, 'responsivesize'))) {
5359
+ ratioSizeV = 1;
5360
+ }
5361
+
5362
+ var v = value;
5363
+ if (!this.isDimensionPropertyAccepted(value)) {
5364
+ v = ~~value;
5365
+ if (v != value) {
5366
+ this.$.trigger('propertyChanged', [name, v]);
5367
+ }
5368
+ }
5369
+
5370
+ this.storeWithModifier(name, v, ratioSizeV, true);
5371
+ this._resize(false);
5372
+ break;
5373
+ case 'left':
5374
+ var ratioPositionH = this.layerEditor.getResponsiveRatio('h')
5375
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
5376
+ ratioPositionH = 1;
5377
+ }
5378
+
5379
+ var v = ~~value;
5380
+ if (v != value) {
5381
+ this.$.trigger('propertyChanged', [name, v]);
5382
+ }
5383
+
5384
+ this.storeWithModifier(name, v, ratioPositionH, true);
5385
+ break;
5386
+ case 'top':
5387
+ var ratioPositionV = this.layerEditor.getResponsiveRatio('v')
5388
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
5389
+ ratioPositionV = 1;
5390
+ }
5391
+
5392
+ var v = ~~value;
5393
+ if (v != value) {
5394
+ this.$.trigger('propertyChanged', [name, v]);
5395
+ }
5396
+
5397
+ this.storeWithModifier(name, v, ratioPositionV, true);
5398
+ break;
5399
+ case 'showFieldDesktopPortrait':
5400
+ this.store(false, 'desktopPortrait', parseInt(value), true);
5401
+ break;
5402
+ case 'showFieldDesktopLandscape':
5403
+ this.store(false, 'desktopLandscape', parseInt(value), true);
5404
+ break;
5405
+ case 'showFieldTabletPortrait':
5406
+ this.store(false, 'tabletPortrait', parseInt(value), true);
5407
+ break;
5408
+ case 'showFieldTabletLandscape':
5409
+ this.store(false, 'tabletLandscape', parseInt(value), true);
5410
+ break;
5411
+ case 'showFieldMobilePortrait':
5412
+ this.store(false, 'mobilePortrait', parseInt(value), true);
5413
+ break;
5414
+ case 'showFieldMobileLandscape':
5415
+ this.store(false, 'mobileLandscape', parseInt(value), true);
5416
+ break;
5417
+ }
5418
+
5419
+ if (from != 'manager') {
5420
+ // jelezzuk a sidebarnak, hogy valamely property megvaltozott
5421
+ this.$.trigger('propertyChanged', [name, value]);
5422
+ }
5423
+ };
5424
+
5425
+ Layer.prototype.getProperty = function (deviceBased, name) {
5426
+
5427
+ if (deviceBased) {
5428
+ var properties = this.deviceProperty[this.getMode()],
5429
+ fallbackProperties = this.deviceProperty['desktopPortrait'];
5430
+ if (typeof properties[name] !== 'undefined') {
5431
+ return properties[name];
5432
+ } else if (typeof fallbackProperties[name] !== 'undefined') {
5433
+ return fallbackProperties[name];
5434
+ }
5435
+ }
5436
+ return this.property[name];
5437
+ };
5438
+
5439
+ Layer.prototype.store = function (deviceBased, name, value, needRender) {
5440
+
5441
+ var oldValue = this.property[name];
5442
+ this.property[name] = value;
5443
+ if (deviceBased) {
5444
+ var mode = this.getMode();
5445
+ smartSlider.history.add($.proxy(function () {
5446
+ return [this, 'store', value, this.deviceProperty[mode][name], [this.layer, deviceBased, name, mode]];
5447
+ }, this));
5448
+ this.deviceProperty[mode][name] = value;
5449
+ } else {
5450
+ smartSlider.history.add($.proxy(function () {
5451
+ return [this, 'store', value, oldValue, [this.layer, deviceBased, name, this.getMode()]];
5452
+ }, this));
5453
+ }
5454
+
5455
+ if (needRender) {
5456
+ this.render(name, value);
5457
+ }
5458
+ };
5459
+
5460
+ Layer.prototype.storeWithModifier = function (name, value, modifier, needRender) {
5461
+ this.property[name] = value;
5462
+ var mode = this.getMode();
5463
+
5464
+ smartSlider.history.add($.proxy(function () {
5465
+ return [this, 'storeWithModifier', value, this.deviceProperty[mode][name], [this.layer, name, mode]];
5466
+ }, this));
5467
+ this.deviceProperty[mode][name] = value;
5468
+
5469
+ if (needRender) {
5470
+ this.renderWithModifier(name, value, modifier);
5471
+ }
5472
+ };
5473
+
5474
+ Layer.prototype.render = function (name, value) {
5475
+ this['_sync' + name](value);
5476
+ };
5477
+
5478
+ Layer.prototype.renderWithModifier = function (name, value, modifier) {
5479
+ if ((name == 'width' || name == 'height') && this.isDimensionPropertyAccepted(value)) {
5480
+ this['_sync' + name](value);
5481
+ } else {
5482
+ this['_sync' + name](Math.round(value * modifier));
5483
+ }
5484
+ };
5485
+
5486
+ Layer.prototype._syncclass = function (value) {
5487
+ this.layer.removeClass();
5488
+ this.layer.addClass('n2-ss-layer');
5489
+ if (value && value != '') {
5490
+ this.layer.addClass(value);
5491
+ }
5492
+ };
5493
+
5494
+ Layer.prototype._syncid = function (value) {
5495
+ if (!value || value == '') {
5496
+ this.layer.removeAttr('id');
5497
+ } else {
5498
+ this.layer.attr('id', value);
5499
+ }
5500
+ };
5501
+
5502
+ Layer.prototype.subscribeParent = function () {
5503
+ var that = this;
5504
+ this.subscribeParentCallbacks = {
5505
+ LayerResized: function () {
5506
+ that.resizeParent.apply(that, arguments);
5507
+ },
5508
+ LayerParent: function () {
5509
+ that.layer.addClass('n2-ss-layer-parent');
5510
+ that.layer.triggerHandler('LayerParent');
5511
+ },
5512
+ LayerUnParent: function () {
5513
+ that.layer.removeClass('n2-ss-layer-parent');
5514
+ that.layer.triggerHandler('LayerUnParent');
5515
+ },
5516
+ LayerDeleted: function (e, deleteChild, oldLayers) {
5517
+ if (deleteChild) {
5518
+ that.delete(deleteChild, oldLayers);
5519
+ } else {
5520
+ that.setProperty('parentid', '', 'layer');
5521
+ }
5522
+ },
5523
+ LayerDuplicated: function (e, newParentId, newLayers) {
5524
+ that.duplicate(false, newParentId, newLayers);
5525
+ },
5526
+ LayerShowChange: function (e, mode, value) {
5527
+ if (that.getMode() == mode) {
5528
+ that.parentIsVisible = value;
5529
+ }
5530
+ },
5531
+ 'n2-ss-activate': function () {
5532
+ that.layerRow.addClass('n2-parent-active');
5533
+ },
5534
+ 'n2-ss-deactivate': function () {
5535
+ that.layerRow.removeClass('n2-parent-active');
5536
+ },
5537
+ 'LayerGetDataWithChildren': function (e, layers) {
5538
+ that.getDataWithChildren(layers);
5539
+ }
5540
+ };
5541
+ this.parent = n2('#' + this.property.parentid).on(this.subscribeParentCallbacks);
5542
+ };
5543
+
5544
+ Layer.prototype.unSubscribeParent = function (isDelete) {
5545
+ this.layerRow.removeClass('n2-parent-active');
5546
+ if (this.parent) {
5547
+ this.parent.off(this.subscribeParentCallbacks);
5548
+ }
5549
+ this.parent = false;
5550
+ this.subscribeParentCallbacks = {};
5551
+ if (!isDelete) {
5552
+ var position = this.layer.position();
5553
+ this.setPosition(position.left, position.top);
5554
+ }
5555
+ };
5556
+
5557
+ Layer.prototype.unlink = function (e) {
5558
+ e.preventDefault();
5559
+ this.setProperty('parentid', '', 'layer');
5560
+ };
5561
+
5562
+ Layer.prototype.parentPicked = function (parentObject, parentAlign, parentValign, align, valign) {
5563
+ this.setProperty('parentid', '', 'layer');
5564
+
5565
+ this.setProperty('align', align, 'layer');
5566
+ this.setProperty('valign', valign, 'layer');
5567
+ this.setProperty('parentalign', parentAlign, 'layer');
5568
+ this.setProperty('parentvalign', parentValign, 'layer');
5569
+
5570
+ this.setProperty('parentid', parentObject.requestID(), 'layer');
5571
+ };
5572
+
5573
+ Layer.prototype._syncparentid = function (value) {
5574
+ if (!value || value == '') {
5575
+ this.layer.removeAttr('data-parentid');
5576
+ this.unSubscribeParent(false);
5577
+ } else {
5578
+ if ($('#' + value).length == 0) {
5579
+ this.setProperty('parentid', '', 'layer');
5580
+ } else {
5581
+ this.layer.attr('data-parentid', value);
5582
+ this.subscribeParent();
5583
+ this.setPosition(this.layer.position().left, this.layer.position().top);
5584
+ }
5585
+ }
5586
+ };
5587
+
5588
+ Layer.prototype._syncparentalign = function (value) {
5589
+ this.layer.data('parentalign', value);
5590
+ var parent = this.getParent();
5591
+ if (parent) {
5592
+ parent._resize(false);
5593
+ }
5594
+ };
5595
+
5596
+ Layer.prototype._syncparentvalign = function (value) {
5597
+ this.layer.data('parentvalign', value);
5598
+ var parent = this.getParent();
5599
+ if (parent) {
5600
+ parent._resize(false);
5601
+ }
5602
+ };
5603
+
5604
+ Layer.prototype._syncinneralign = function (value) {
5605
+ this.layer.css('text-align', value);
5606
+ };
5607
+
5608
+ Layer.prototype._synccrop = function (value) {
5609
+ if (value == 'auto') {
5610
+ value = 'hidden';
5611
+ }
5612
+
5613
+ var mask = this.layer.find('> .n2-ss-layer-mask');
5614
+ if (value == 'mask') {
5615
+ value = 'hidden';
5616
+ if (!mask.length) {
5617
+ mask = $("<div class='n2-ss-layer-mask'></div>").appendTo(this.layer);
5618
+ for (var i = 0; i < this.items.length; i++) {
5619
+ mask.append(this.items[i].item);
5620
+ }
5621
+ }
5622
+ } else {
5623
+ if (mask.length) {
5624
+ for (var i = 0; i < this.items.length; i++) {
5625
+ this.layer.append(this.items[i].item);
5626
+ mask.remove();
5627
+ }
5628
+ }
5629
+ }
5630
+ this.layer.css('overflow', value);
5631
+ };
5632
+
5633
+ Layer.prototype._syncparallax = function (value) {
5634
+
5635
+ };
5636
+
5637
+ Layer.prototype._syncalign = function (value, lastValue) {
5638
+ if (lastValue !== 'undefined' && value != lastValue) {
5639
+ this.setPosition(this.layer.position().left, this.layer.position().top);
5640
+ }
5641
+ this.layer.attr('data-align', value);
5642
+ };
5643
+
5644
+ Layer.prototype._syncvalign = function (value, lastValue) {
5645
+ if (lastValue !== 'undefined' && value != lastValue) {
5646
+ this.setPosition(this.layer.position().left, this.layer.position().top);
5647
+ }
5648
+ this.layer.attr('data-valign', value);
5649
+ };
5650
+
5651
+ Layer.prototype._syncfontsize = function (value) {
5652
+ this.adjustFontSize(this.getProperty(false, 'adaptivefont'), value, true);
5653
+ };
5654
+
5655
+ Layer.prototype._syncadaptivefont = function (value) {
5656
+ this.adjustFontSize(value, this.getProperty(true, 'fontsize'), true);
5657
+ };
5658
+
5659
+ Layer.prototype.adjustFontSize = function (isAdaptive, fontSize, shouldUpdatePosition) {
5660
+ fontSize = parseInt(fontSize);
5661
+ if (parseInt(isAdaptive)) {
5662
+ this.layer.css('font-size', (nextend.smartSlider.frontend.sliderElement.data('fontsize') * fontSize / 100) + 'px');
5663
+ } else if (fontSize != 100) {
5664
+ this.layer.css('font-size', fontSize + '%');
5665
+ } else {
5666
+ this.layer.css('font-size', '');
5667
+ }
5668
+ if (shouldUpdatePosition) {
5669
+ this.update();
5670
+ }
5671
+ };
5672
+
5673
+ Layer.prototype._syncleft = function (value) {
5674
+ if (!this.parent || !this.parentIsVisible) {
5675
+ switch (this.getProperty(true, 'align')) {
5676
+ case 'right':
5677
+ this.layer.css({
5678
+ left: 'auto',
5679
+ right: -value + 'px'
5680
+ });
5681
+ break;
5682
+ case 'center':
5683
+ this.layer.css({
5684
+ left: (this.layer.parent().width() / 2 + value - this.layer.width() / 2) + 'px',
5685
+ right: 'auto'
5686
+ });
5687
+ break;
5688
+ default:
5689
+ this.layer.css({
5690
+ left: value + 'px',
5691
+ right: 'auto'
5692
+ });
5693
+ }
5694
+ } else {
5695
+ var position = this.parent.position(),
5696
+ align = this.getProperty(true, 'align'),
5697
+ parentAlign = this.getProperty(true, 'parentalign'),
5698
+ left = 0;
5699
+ switch (parentAlign) {
5700
+ case 'right':
5701
+ left = position.left + this.parent.width();
5702
+ break;
5703
+ case 'center':
5704
+ left = position.left + this.parent.width() / 2;
5705
+ break;
5706
+ default:
5707
+ left = position.left;
5708
+ }
5709
+
5710
+ switch (align) {
5711
+ case 'right':
5712
+ this.layer.css({
5713
+ left: 'auto',
5714
+ right: (this.layer.parent().width() - left - value) + 'px'
5715
+ });
5716
+ break;
5717
+ case 'center':
5718
+ this.layer.css({
5719
+ left: (left + value - this.layer.width() / 2) + 'px',
5720
+ right: 'auto'
5721
+ });
5722
+ break;
5723
+ default:
5724
+ this.layer.css({
5725
+ left: (left + value) + 'px',
5726
+ right: 'auto'
5727
+ });
5728
+ }
5729
+
5730
+ }
5731
+
5732
+ this.triggerLayerResized();
5733
+ };
5734
+
5735
+ Layer.prototype._synctop = function (value) {
5736
+ if (!this.parent || !this.parentIsVisible) {
5737
+ switch (this.getProperty(true, 'valign')) {
5738
+ case 'bottom':
5739
+ this.layer.css({
5740
+ top: 'auto',
5741
+ bottom: -value + 'px'
5742
+ });
5743
+ break;
5744
+ case 'middle':
5745
+ this.layer.css({
5746
+ top: (this.layer.parent().height() / 2 + value - this.layer.height() / 2) + 'px',
5747
+ bottom: 'auto'
5748
+ });
5749
+ break;
5750
+ default:
5751
+ this.layer.css({
5752
+ top: value + 'px',
5753
+ bottom: 'auto'
5754
+ });
5755
+ }
5756
+ } else {
5757
+ var position = this.parent.position(),
5758
+ valign = this.getProperty(true, 'valign'),
5759
+ parentVAlign = this.getProperty(true, 'parentvalign'),
5760
+ top = 0;
5761
+ switch (parentVAlign) {
5762
+ case 'bottom':
5763
+ top = position.top + this.parent.height();
5764
+ break;
5765
+ case 'middle':
5766
+ top = position.top + this.parent.height() / 2;
5767
+ break;
5768
+ default:
5769
+ top = position.top;
5770
+ }
5771
+
5772
+ switch (valign) {
5773
+ case 'bottom':
5774
+ this.layer.css({
5775
+ top: 'auto',
5776
+ bottom: (this.layer.parent().height() - top - value) + 'px'
5777
+ });
5778
+ break;
5779
+ case 'middle':
5780
+ this.layer.css({
5781
+ top: (top + value - this.layer.height() / 2) + 'px',
5782
+ bottom: 'auto'
5783
+ });
5784
+ break;
5785
+ default:
5786
+ this.layer.css({
5787
+ top: (top + value) + 'px',
5788
+ bottom: 'auto'
5789
+ });
5790
+ }
5791
+ }
5792
+
5793
+ this.triggerLayerResized();
5794
+ };
5795
+
5796
+ Layer.prototype._syncresponsiveposition = function (value) {
5797
+ this._resize(false);
5798
+ };
5799
+
5800
+ Layer.prototype._syncwidth = function (value) {
5801
+ this.layer.css('width', value + (this.isDimensionPropertyAccepted(value) ? '' : 'px'));
5802
+ };
5803
+
5804
+ Layer.prototype._syncheight = function (value) {
5805
+ this.layer.css('height', value + (this.isDimensionPropertyAccepted(value) ? '' : 'px'));
5806
+ };
5807
+
5808
+ Layer.prototype._syncresponsivesize = function (value) {
5809
+ this._resize(false);
5810
+ };
5811
+
5812
+ Layer.prototype._syncdesktopPortrait = function (value) {
5813
+ this.__syncShowOnDevice('desktopPortrait', value);
5814
+ };
5815
+
5816
+ Layer.prototype._syncdesktopLandscape = function (value) {
5817
+ this.__syncShowOnDevice('desktopLandscape', value);
5818
+ };
5819
+
5820
+ Layer.prototype._synctabletPortrait = function (value) {
5821
+ this.__syncShowOnDevice('tabletPortrait', value);
5822
+ };
5823
+
5824
+ Layer.prototype._synctabletLandscape = function (value) {
5825
+ this.__syncShowOnDevice('tabletLandscape', value);
5826
+ };
5827
+
5828
+ Layer.prototype._syncmobilePortrait = function (value) {
5829
+ this.__syncShowOnDevice('mobilePortrait', value);
5830
+ };
5831
+
5832
+ Layer.prototype._syncmobileLandscape = function (value) {
5833
+ this.__syncShowOnDevice('mobileLandscape', value);
5834
+ };
5835
+
5836
+ Layer.prototype.__syncShowOnDevice = function (mode, value) {
5837
+ if (this.getMode() == mode) {
5838
+ var value = parseInt(value);
5839
+ if (value) {
5840
+ this._show();
5841
+ } else {
5842
+ this._hide();
5843
+ }
5844
+ this.layer.triggerHandler('LayerShowChange', [mode, value]);
5845
+ this.triggerLayerResized();
5846
+ }
5847
+ };
5848
+
5849
+ Layer.prototype._syncmouseenter =
5850
+ Layer.prototype._syncclick =
5851
+ Layer.prototype._syncmouseleave =
5852
+ Layer.prototype._syncplay =
5853
+ Layer.prototype._syncpause =
5854
+ Layer.prototype._syncstop = function () {
5855
+ };
5856
+
5857
+ Layer.prototype.___makeLayerAlign = function () {
5858
+ this.alignMarker = $('<div class="n2-ss-layer-align-marker" />').appendTo(this.layer);
5859
+ };
5860
+
5861
+ //<editor-fold desc="Makes layer resizable">
5862
+
5863
+ /**
5864
+ * Add resize handles to the specified layer
5865
+ * @param {jQuery} layer
5866
+ * @private
5867
+ */
5868
+ Layer.prototype.___makeLayerResizeable = function () {
5869
+ this.layer.nextendResizable({
5870
+ handles: 'n, e, s, w, ne, se, sw, nw',
5871
+ _containment: this.layerEditor.layerContainerElement,
5872
+ start: $.proxy(this.____makeLayerResizeableStart, this),
5873
+ resize: $.proxy(this.____makeLayerResizeableResize, this),
5874
+ stop: $.proxy(this.____makeLayerResizeableStop, this),
5875
+ smartguides: $.proxy(function () {
5876
+ this.layer.triggerHandler('LayerParent');
5877
+ return this.layerEditor.getSnap();
5878
+ }, this),
5879
+ tolerance: 5
5880
+ })
5881
+ .on({
5882
+ mousedown: $.proxy(function (e) {
5883
+ if (!this.lock) {
5884
+ this.layerEditor.positionDisplay
5885
+ .css({
5886
+ left: e.pageX + 10,
5887
+ top: e.pageY + 10
5888
+ })
5889
+ .html('W: ' + parseInt(this.layer.width()) + 'px<br />H: ' + parseInt(this.layer.height()) + 'px')
5890
+ .addClass('n2-active');
5891
+ }
5892
+ if (document.activeElement) {
5893
+ document.activeElement.blur();
5894
+ }
5895
+ }, this),
5896
+ mouseup: $.proxy(function (e) {
5897
+ this.layerEditor.positionDisplay.removeClass('n2-active');
5898
+ }, this)
5899
+ });
5900
+ };
5901
+
5902
+ Layer.prototype.____makeLayerResizeableStart = function (event, ui) {
5903
+ $('#n2-admin').addClass('n2-ss-resize-layer');
5904
+ this.____makeLayerResizeableResize(event, ui);
5905
+ this.layerEditor.positionDisplay.addClass('n2-active');
5906
+ };
5907
+
5908
+ Layer.prototype.____makeLayerResizeableResize = function (e, ui) {
5909
+ this.layerEditor.positionDisplay
5910
+ .css({
5911
+ left: e.pageX + 10,
5912
+ top: e.pageY + 10
5913
+ })
5914
+ .html('W: ' + ui.size.width + 'px<br />H: ' + ui.size.height + 'px');
5915
+ this.triggerLayerResized();
5916
+ };
5917
+
5918
+ Layer.prototype.____makeLayerResizeableStop = function (event, ui) {
5919
+ window.nextendPreventClick = true;
5920
+ setTimeout(function () {
5921
+ window.nextendPreventClick = false;
5922
+ }, 50);
5923
+ $('#n2-admin').removeClass('n2-ss-resize-layer');
5924
+
5925
+ var isAutoWidth = false;
5926
+ if (ui.originalSize.width == ui.size.width) {
5927
+ var currentValue = this.getProperty(true, 'width');
5928
+ if (this.isDimensionPropertyAccepted(currentValue)) {
5929
+ isAutoWidth = true;
5930
+ this['_syncwidth'](currentValue);
5931
+ }
5932
+ }
5933
+
5934
+ var isAutoHeight = false;
5935
+ if (ui.originalSize.height == ui.size.height) {
5936
+ var currentValue = this.getProperty(true, 'height');
5937
+ if (this.isDimensionPropertyAccepted(currentValue)) {
5938
+ isAutoHeight = true;
5939
+ this['_syncheight'](currentValue);
5940
+ }
5941
+ }
5942
+ this.setPosition(ui.position.left, ui.position.top);
5943
+
5944
+
5945
+ var ratioSizeH = this.layerEditor.getResponsiveRatio('h'),
5946
+ ratioSizeV = this.layerEditor.getResponsiveRatio('v');
5947
+
5948
+ if (!parseInt(this.getProperty(false, 'responsivesize'))) {
5949
+ ratioSizeH = ratioSizeV = 1;
5950
+ }
5951
+
5952
+ if (!isAutoWidth) {
5953
+ var value = Math.round(ui.size.width * (1 / ratioSizeH));
5954
+ this.storeWithModifier('width', value, ratioSizeH, false);
5955
+ this.$.trigger('propertyChanged', ['width', value]);
5956
+ }
5957
+ if (!isAutoHeight) {
5958
+ var value = Math.round(ui.size.height * (1 / ratioSizeV));
5959
+ this.storeWithModifier('height', value, ratioSizeV, false);
5960
+ this.$.trigger('propertyChanged', ['height', value]);
5961
+ }
5962
+ this.triggerLayerResized();
5963
+
5964
+ this.layer.triggerHandler('LayerUnParent');
5965
+
5966
+ this.layerEditor.positionDisplay.removeClass('n2-active');
5967
+ };
5968
+ //</editor-fold>
5969
+
5970
+ //<editor-fold desc="Makes layer draggable">
5971
+
5972
+ /**
5973
+ * Add draggable handles to the specified layer
5974
+ * @param layer
5975
+ * @private
5976
+ */
5977
+ Layer.prototype.___makeLayerDraggable = function () {
5978
+
5979
+ this.layer.nextenddraggable({
5980
+ _containment: this.layerEditor.layerContainerElement,
5981
+ start: $.proxy(this.____makeLayerDraggableStart, this),
5982
+ drag: $.proxy(this.____makeLayerDraggableDrag, this),
5983
+ stop: $.proxy(this.____makeLayerDraggableStop, this),
5984
+ smartguides: $.proxy(function () {
5985
+ this.layer.triggerHandler('LayerParent');
5986
+ return this.layerEditor.getSnap();
5987
+ }, this),
5988
+ tolerance: 5
5989
+ });
5990
+ };
5991
+
5992
+ Layer.prototype.____makeLayerDraggableStart = function (event, ui) {
5993
+ $('#n2-admin').addClass('n2-ss-move-layer');
5994
+ this.____makeLayerDraggableDrag(event, ui);
5995
+ this.layerEditor.positionDisplay.addClass('n2-active');
5996
+
5997
+ var currentValue = this.getProperty(true, 'width');
5998
+ if (this.isDimensionPropertyAccepted(currentValue)) {
5999
+ this.layer.width(this.layer.width() + 0.5); // Center positioned element can wrap the last word to a new line if this fix not added
6000
+ }
6001
+
6002
+ var currentValue = this.getProperty(true, 'height');
6003
+ if (this.isDimensionPropertyAccepted(currentValue)) {
6004
+ this['_syncheight'](currentValue);
6005
+ }
6006
+ };
6007
+
6008
+ Layer.prototype.____makeLayerDraggableDrag = function (e, ui) {
6009
+ this.layerEditor.positionDisplay
6010
+ .css({
6011
+ left: e.pageX + 10,
6012
+ top: e.pageY + 10
6013
+ })
6014
+ .html('L: ' + parseInt(ui.position.left | 0) + 'px<br />T: ' + parseInt(ui.position.top | 0) + 'px');
6015
+ this.triggerLayerResized();
6016
+ };
6017
+
6018
+ Layer.prototype.____makeLayerDraggableStop = function (event, ui) {
6019
+ window.nextendPreventClick = true;
6020
+ setTimeout(function () {
6021
+ window.nextendPreventClick = false;
6022
+ }, 50);
6023
+ $('#n2-admin').removeClass('n2-ss-move-layer');
6024
+
6025
+ this.setPosition(ui.position.left, ui.position.top);
6026
+
6027
+ var currentValue = this.getProperty(true, 'width');
6028
+ if (this.isDimensionPropertyAccepted(currentValue)) {
6029
+ this['_syncwidth'](currentValue);
6030
+ }
6031
+
6032
+ var currentValue = this.getProperty(true, 'height');
6033
+ if (this.isDimensionPropertyAccepted(currentValue)) {
6034
+ this['_syncheight'](currentValue);
6035
+ }
6036
+
6037
+ this.triggerLayerResized();
6038
+
6039
+ this.layer.triggerHandler('LayerUnParent');
6040
+ this.layerEditor.positionDisplay.removeClass('n2-active');
6041
+ };
6042
+
6043
+ Layer.prototype.moveX = function (x) {
6044
+ this.setDeviceBasedAlign();
6045
+ this.setProperty('left', this.getProperty(true, 'left') + x, 'layer');
6046
+ this.triggerLayerResized();
6047
+ };
6048
+
6049
+ Layer.prototype.moveY = function (y) {
6050
+ this.setDeviceBasedAlign();
6051
+ this.setProperty('top', this.getProperty(true, 'top') + y, 'layer');
6052
+ this.triggerLayerResized();
6053
+ };
6054
+
6055
+ Layer.prototype.setPosition = function (left, top) {
6056
+
6057
+ var ratioH = this.layerEditor.getResponsiveRatio('h'),
6058
+ ratioV = this.layerEditor.getResponsiveRatio('v');
6059
+
6060
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
6061
+ ratioH = ratioV = 1;
6062
+ }
6063
+
6064
+ this.setDeviceBasedAlign();
6065
+
6066
+ var parent = this.parent,
6067
+ p = {
6068
+ left: 0,
6069
+ leftMultiplier: 1,
6070
+ top: 0,
6071
+ topMultiplier: 1
6072
+ };
6073
+ if (!parent || !parent.is(':visible')) {
6074
+ parent = this.layer.parent();
6075
+
6076
+
6077
+ switch (this.getProperty(true, 'align')) {
6078
+ case 'center':
6079
+ p.left += parent.width() / 2;
6080
+ break;
6081
+ case 'right':
6082
+ p.left += parent.width();
6083
+ break;
6084
+ }
6085
+
6086
+ switch (this.getProperty(true, 'valign')) {
6087
+ case 'middle':
6088
+ p.top += parent.height() / 2;
6089
+ break;
6090
+ case 'bottom':
6091
+ p.top += parent.height();
6092
+ break;
6093
+ }
6094
+ } else {
6095
+ var position = parent.position();
6096
+ switch (this.getProperty(true, 'parentalign')) {
6097
+ case 'right':
6098
+ p.left = position.left + parent.width();
6099
+ break;
6100
+ case 'center':
6101
+ p.left = position.left + parent.width() / 2;
6102
+ break;
6103
+ default:
6104
+ p.left = position.left;
6105
+ }
6106
+ switch (this.getProperty(true, 'parentvalign')) {
6107
+ case 'bottom':
6108
+ p.top = position.top + parent.height();
6109
+ break;
6110
+ case 'middle':
6111
+ p.top = position.top + parent.height() / 2;
6112
+ break;
6113
+ default:
6114
+ p.top = position.top;
6115
+ }
6116
+ }
6117
+
6118
+
6119
+ var left, needRender = false;
6120
+ switch (this.getProperty(true, 'align')) {
6121
+ case 'left':
6122
+ left = -Math.round((p.left - left) * (1 / ratioH));
6123
+ break;
6124
+ case 'center':
6125
+ left = -Math.round((p.left - left - this.layer.width() / 2) * (1 / ratioH))
6126
+ break;
6127
+ case 'right':
6128
+ left = -Math.round((p.left - left - this.layer.width()) * (1 / ratioH));
6129
+ needRender = true;
6130
+ break;
6131
+ }
6132
+ this.storeWithModifier('left', left, ratioH, needRender);
6133
+ this.$.trigger('propertyChanged', ['left', left]);
6134
+
6135
+ var top, needRender = false;
6136
+ switch (this.getProperty(true, 'valign')) {
6137
+ case 'top':
6138
+ top = -Math.round((p.top - top) * (1 / ratioV));
6139
+ break;
6140
+ case 'middle':
6141
+ top = -Math.round((p.top - top - this.layer.height() / 2) * (1 / ratioV));
6142
+ break;
6143
+ case 'bottom':
6144
+ top = -Math.round((p.top - top - this.layer.height()) * (1 / ratioV));
6145
+ needRender = true;
6146
+ break;
6147
+ }
6148
+ this.storeWithModifier('top', top, ratioV, needRender);
6149
+ this.$.trigger('propertyChanged', ['top', top]);
6150
+ }
6151
+
6152
+ Layer.prototype.setDeviceBasedAlign = function () {
6153
+ var mode = this.getMode();
6154
+ if (typeof this.deviceProperty[mode]['align'] == 'undefined') {
6155
+ this.setProperty('align', this.getProperty(true, 'align'), 'layer');
6156
+ }
6157
+ if (typeof this.deviceProperty[mode]['valign'] == 'undefined') {
6158
+ this.setProperty('valign', this.getProperty(true, 'valign'), 'layer');
6159
+ }
6160
+ };
6161
+ //</editor-fold
6162
+
6163
+ Layer.prototype.snap = function () {
6164
+ this.layer.nextendResizable("option", "smartguides", $.proxy(function () {
6165
+ this.layer.triggerHandler('LayerParent');
6166
+ return this.layerEditor.getSnap();
6167
+ }, this));
6168
+ this.layer.nextenddraggable("option", "smartguides", $.proxy(function () {
6169
+ this.layer.triggerHandler('LayerParent');
6170
+ return this.layerEditor.getSnap();
6171
+ }, this));
6172
+ };
6173
+
6174
+ Layer.prototype.changeEditorMode = function (mode) {
6175
+ var value = parseInt(this.property[mode]);
6176
+ if (value) {
6177
+ this._show();
6178
+ } else {
6179
+ this._hide();
6180
+ }
6181
+
6182
+ this.layer.triggerHandler('LayerShowChange', [mode, value]);
6183
+
6184
+ this._renderModeProperties(false);
6185
+ };
6186
+
6187
+ Layer.prototype.resetMode = function (mode, currentMode) {
6188
+ if (mode != 'desktopPortrait') {
6189
+ var undefined;
6190
+ for (var k in this.property) {
6191
+ this.deviceProperty[mode][k] = undefined;
6192
+ }
6193
+ if (mode == currentMode) {
6194
+ this._renderModeProperties(true);
6195
+ }
6196
+ }
6197
+ };
6198
+
6199
+ Layer.prototype._renderModeProperties = function (isReset) {
6200
+
6201
+ for (var k in this.property) {
6202
+ this.property[k] = this.getProperty(true, k);
6203
+ this.$.trigger('propertyChanged', [k, this.property[k]]);
6204
+ }
6205
+
6206
+ var fontSize = this.getProperty(true, 'fontsize');
6207
+ this.adjustFontSize(this.getProperty(false, 'adaptivefont'), fontSize, false);
6208
+
6209
+ this.layer.attr('data-align', this.property.align);
6210
+ this.layer.attr('data-valign', this.property.valign);
6211
+ if (isReset) {
6212
+ this._resize(true);
6213
+ }
6214
+
6215
+ };
6216
+
6217
+ Layer.prototype.copyMode = function (from, to) {
6218
+ if (from != to) {
6219
+ this.deviceProperty[to] = $.extend({}, this.deviceProperty[to], this.deviceProperty[from]);
6220
+ }
6221
+ };
6222
+
6223
+ Layer.prototype.getMode = function () {
6224
+ return this.layerEditor.getMode();
6225
+ };
6226
+
6227
+ Layer.prototype._resize = function (isForced) {
6228
+ this.resize({
6229
+ slideW: this.layerEditor.getResponsiveRatio('h'),
6230
+ slideH: this.layerEditor.getResponsiveRatio('v')
6231
+ }, isForced);
6232
+ };
6233
+
6234
+ Layer.prototype.doLinearResize = function (ratios) {
6235
+ this.doThrottledTheResize(ratios, true);
6236
+ };
6237
+
6238
+ Layer.prototype.resize = function (ratios, isForced) {
6239
+
6240
+ if (!this.parent || isForced) {
6241
+ //this.doThrottledTheResize(ratios, false);
6242
+ this.addToResizeCollection(this, ratios, false);
6243
+ }
6244
+ };
6245
+
6246
+ Layer.prototype.doTheResize = function (ratios, isLinear, isThrottled) {
6247
+ var ratioPositionH = ratios.slideW,
6248
+ ratioSizeH = ratioPositionH,
6249
+ ratioPositionV = ratios.slideH,
6250
+ ratioSizeV = ratioPositionV;
6251
+
6252
+ if (!parseInt(this.getProperty(false, 'responsivesize'))) {
6253
+ ratioSizeH = ratioSizeV = 1;
6254
+ }
6255
+
6256
+ //var width = this.getProperty(true, 'width');
6257
+ //this.storeWithModifier('width', this.isDimensionPropertyAccepted(width) ? width : Math.round(width), ratioSizeH, true);
6258
+ //var height = this.getProperty(true, 'height');
6259
+ //this.storeWithModifier('height', this.isDimensionPropertyAccepted(height) ? height : Math.round(height), ratioSizeV, true);
6260
+ this.renderWithModifier('width', this.getProperty(true, 'width'), ratioSizeH);
6261
+ this.renderWithModifier('height', this.getProperty(true, 'height'), ratioSizeV);
6262
+
6263
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
6264
+ ratioPositionH = ratioPositionV = 1;
6265
+ }
6266
+ //this.storeWithModifier('left', Math.round(this.getProperty(true, 'left')), ratioPositionH, true);
6267
+ //this.storeWithModifier('top', Math.round(this.getProperty(true, 'top')), ratioPositionV, true);
6268
+ this.renderWithModifier('left', this.getProperty(true, 'left'), ratioPositionH);
6269
+ this.renderWithModifier('top', this.getProperty(true, 'top'), ratioPositionV);
6270
+ if (!isLinear) {
6271
+ this.triggerLayerResized(isThrottled, ratios);
6272
+ }
6273
+ };
6274
+
6275
+ Layer.prototype.resizeParent = function (e, ratios, isThrottled) {
6276
+ //this.doThrottledTheResize(ratios, false, isThrottled);
6277
+ this.addToResizeCollection(this, ratios, isThrottled);
6278
+ };
6279
+
6280
+ Layer.prototype.addToResizeCollection = function (layer, ratios, isThrottled) {
6281
+ resizeCollection.ratios = ratios;
6282
+ resizeCollection.isThrottled = isThrottled;
6283
+ for (var i = 0; i < resizeCollection.layers.length; i++) {
6284
+ if (resizeCollection.layers[i] == this) {
6285
+ resizeCollection.layers.splice(i, 1);
6286
+ break;
6287
+ }
6288
+ }
6289
+ resizeCollection.layers.push(layer);
6290
+
6291
+ requestRender();
6292
+ this.triggerLayerResized(isThrottled, ratios);
6293
+ };
6294
+
6295
+ Layer.prototype.update = function () {
6296
+ var parent = this.parent;
6297
+
6298
+ if (this.getProperty(true, 'align') == 'center') {
6299
+ var left = 0;
6300
+ if (parent) {
6301
+ left = parent.position().left + parent.width() / 2;
6302
+ } else {
6303
+ left = this.layer.parent().width() / 2;
6304
+ }
6305
+ var ratio = this.layerEditor.getResponsiveRatio('h');
6306
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
6307
+ ratio = 1;
6308
+ }
6309
+ this.layer.css('left', (left - this.layer.width() / 2 + this.getProperty(true, 'left') * ratio));
6310
+ }
6311
+
6312
+ if (this.getProperty(true, 'valign') == 'middle') {
6313
+ var top = 0;
6314
+ if (parent) {
6315
+ top = parent.position().top + parent.height() / 2;
6316
+ } else {
6317
+ top = this.layer.parent().height() / 2;
6318
+ }
6319
+ var ratio = this.layerEditor.getResponsiveRatio('v');
6320
+ if (!parseInt(this.getProperty(false, 'responsiveposition'))) {
6321
+ ratio = 1;
6322
+ }
6323
+ this.layer.css('top', (top - this.layer.height() / 2 + this.getProperty(true, 'top') * ratio));
6324
+ }
6325
+ this.triggerLayerResized();
6326
+ };
6327
+
6328
+ Layer.prototype.triggerLayerResized = function (isThrottled, ratios) {
6329
+ if (isThrottled) {
6330
+ this._triggerLayerResized(isThrottled, ratios);
6331
+ } else {
6332
+ this._triggerLayerResizedThrottled(true, ratios);
6333
+ }
6334
+ };
6335
+
6336
+ Layer.prototype._triggerLayerResized = function (isThrottled, ratios) {
6337
+ if (!this.isDeleted) {
6338
+ this.layer.triggerHandler('LayerResized', [ratios || {
6339
+ slideW: this.layerEditor.getResponsiveRatio('h'),
6340
+ slideH: this.layerEditor.getResponsiveRatio('v')
6341
+ }, isThrottled || false]);
6342
+ }
6343
+ };
6344
+
6345
+ Layer.prototype.getStyleText = function () {
6346
+ var style = '';
6347
+ var crop = this.property.crop;
6348
+ if (crop == 'auto') {
6349
+ crop = 'hidden';
6350
+ }
6351
+ style += 'overflow:' + crop + ';';
6352
+ style += 'text-align:' + this.property.inneralign + ';';
6353
+ return style;
6354
+ };
6355
+
6356
+ Layer.prototype.isDimensionPropertyAccepted = function (value) {
6357
+ if ((value + '').match(/[0-9]+%/) || value == 'auto') {
6358
+ return true;
6359
+ }
6360
+ return false;
6361
+ };
6362
+
6363
+ Layer.prototype.history = function (method, value, other, context) {
6364
+ switch (method) {
6365
+ case 'store':
6366
+ var mode = this.getMode();
6367
+ if (!other[1] || other[3] == mode) {
6368
+ this[method](other[1], other[2], value, true);
6369
+ } else {
6370
+ this.deviceProperty[other[3]][other[2]] = value;
6371
+ }
6372
+ this._renderModeProperties(true);
6373
+ break;
6374
+ case 'storeWithModifier':
6375
+ var mode = this.getMode();
6376
+ var ratio = 1;
6377
+ switch (other[1]) {
6378
+ case 'width':
6379
+ case 'left':
6380
+ ratio = this.layerEditor.getResponsiveRatio('h');
6381
+ break;
6382
+ case 'height':
6383
+ case 'top':
6384
+ ratio = this.layerEditor.getResponsiveRatio('v');
6385
+ break;
6386
+ }
6387
+ if (other[2] == mode) {
6388
+ this[method](other[1], value, ratio, true);
6389
+ } else {
6390
+ this.deviceProperty[other[2]][other[1]] = value;
6391
+ }
6392
+ this._renderModeProperties(true);
6393
+ break;
6394
+ case 'addLayer':
6395
+ switch (value) {
6396
+ case 'add':
6397
+ this.layerEditor._zIndexOffset = -1;
6398
+ this.layerEditor._idTranslation = {};
6399
+ var layer = this.layerEditor.loadSingleData($.extend(true, {}, other[0]));
6400
+ smartSlider.history.changeFuture(this, layer);
6401
+ smartSlider.history.changeFuture(this.items[0], layer.items[0]);
6402
+ this.layerEditor.reIndexLayers();
6403
+ this.layerEditor.refreshMode();
6404
+ break;
6405
+ case 'delete':
6406
+ this.delete();
6407
+ break;
6408
+ }
6409
+ break;
6410
+ case 'duplicateLayer':
6411
+ switch (value) {
6412
+ case 'duplicate':
6413
+ var newLayers = [];
6414
+ this.duplicate(true, false, newLayers);
6415
+ for (var i = 0; i < newLayers.length; i++) {
6416
+ smartSlider.history.changeFuture(context.oldLayers[i], newLayers[i]);
6417
+ smartSlider.history.changeFuture(context.oldLayers[i].items[0], newLayers[i].items[0]);
6418
+ }
6419
+ context.oldLayers = [];
6420
+ break;
6421
+ case 'delete':
6422
+ var oldLayers = [];
6423
+ other[0].delete(true, oldLayers);
6424
+ context.oldLayers = oldLayers;
6425
+ break;
6426
+ }
6427
+ break;
6428
+ case 'deleteLayer':
6429
+ switch (value) {
6430
+ case 'create':
6431
+ this.layerEditor._zIndexOffset = -1;
6432
+ this.layerEditor._idTranslation = {};
6433
+ var layer = this.layerEditor.loadSingleData($.extend(true, {}, other[0]));
6434
+ smartSlider.history.changeFuture(this, layer);
6435
+ smartSlider.history.changeFuture(this.items[0], layer.items[0]);
6436
+ this.layerEditor.reIndexLayers();
6437
+ this.layerEditor.refreshMode();
6438
+ break;
6439
+ case 'delete':
6440
+ this.delete();
6441
+ break;
6442
+ }
6443
+ break;
6444
+ case 'storeAnimations':
6445
+ this.animation.storeAnimations(other[0], null, null, $.extend(true, {}, value));
6446
+ break;
6447
+ }
6448
+ };
6449
+
6450
+ scope.NextendSmartSliderLayer = Layer;
6451
+
6452
+
6453
+ })(nextend.smartSlider, n2, window);
6454
+ (function (smartSlider, $, scope, undefined) {
6455
+ var layerClass = '.n2-ss-layer',
6456
+ keys = {
6457
+ 16: 0,
6458
+ 38: 0,
6459
+ 40: 0,
6460
+ 37: 0,
6461
+ 39: 0
6462
+ },
6463
+ nameToIndex = {
6464
+ left: 0,
6465
+ center: 1,
6466
+ right: 2,
6467
+ top: 0,
6468
+ middle: 1,
6469
+ bottom: 2
6470
+ },
6471
+ horizontalAlign = {
6472
+ 97: 'left',
6473
+ 98: 'center',
6474
+ 99: 'right',
6475
+ 100: 'left',
6476
+ 101: 'center',
6477
+ 102: 'right',
6478
+ 103: 'left',
6479
+ 104: 'center',
6480
+ 105: 'right'
6481
+ },
6482
+ verticalAlign = {
6483
+ 97: 'bottom',
6484
+ 98: 'bottom',
6485
+ 99: 'bottom',
6486
+ 100: 'middle',
6487
+ 101: 'middle',
6488
+ 102: 'middle',
6489
+ 103: 'top',
6490
+ 104: 'top',
6491
+ 105: 'top'
6492
+ };
6493
+
6494
+ function AdminSlideLayerManager(layerManager, staticSlide, isUploadDisabled, uploadUrl, uploadDir) {
6495
+ this.activeLayerIndex = -1;
6496
+ this.snapToEnabled = true;
6497
+ this.staticSlide = staticSlide;
6498
+
6499
+ this.layerDefault = {
6500
+ align: null,
6501
+ valign: null
6502
+ };
6503
+
6504
+ this.solo = false;
6505
+
6506
+ this.$ = $(this);
6507
+ smartSlider.layerManager = this;
6508
+
6509
+ this.responsive = smartSlider.frontend.responsive;
6510
+
6511
+ new NextendSmartSliderSidebar();
6512
+
6513
+ this.layerList = [];
6514
+
6515
+ this.layersItemsElement = $('#n2-ss-layers-items-list');
6516
+
6517
+ this.frontendSlideLayers = layerManager;
6518
+
6519
+ this.frontendSlideLayers.setZero();
6520
+
6521
+
6522
+ this.layerContainerElement = smartSlider.$currentSlideElement.find('.n2-ss-layers-container');
6523
+ if (!this.layerContainerElement.length) {
6524
+ this.layerContainerElement = smartSlider.$currentSlideElement;
6525
+ }
6526
+
6527
+ this.layerContainerElement.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />');
6528
+
6529
+
6530
+ this.slideSize = {
6531
+ width: this.layerContainerElement.width(),
6532
+ height: this.layerContainerElement.height()
6533
+ };
6534
+
6535
+ smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.refreshSlideSize, this));
6536
+
6537
+ this.initToolbox();
6538
+
6539
+ new NextendSmartSliderLayerAnimationManager(this);
6540
+
6541
+ this.refreshLayers();
6542
+
6543
+ smartSlider.itemEditor = this.itemEditor = new NextendSmartSliderItemManager(this);
6544
+
6545
+ this.positionDisplay = $('<div class="n2 n2-ss-position-display"/>')
6546
+ .appendTo('body');
6547
+
6548
+ this.zIndexList = [];
6549
+
6550
+ this.layers.each($.proxy(function (i, layer) {
6551
+ new NextendSmartSliderLayer(this, $(layer), this.itemEditor);
6552
+ }, this));
6553
+
6554
+ this.reIndexLayers();
6555
+
6556
+ this._makeLayersOrderable();
6557
+
6558
+ $('#smartslider-slide-toolbox-layer').on('mouseenter', function () {
6559
+ $('#n2-admin').addClass('smartslider-layer-highlight-active');
6560
+ }).on('mouseleave', function () {
6561
+ $('#n2-admin').removeClass('smartslider-layer-highlight-active');
6562
+ });
6563
+
6564
+ this._initDeviceModeChange();
6565
+
6566
+ //this.initBatch();
6567
+ this.initSnapTo();
6568
+ this.initEditorTheme();
6569
+ this.initAlign();
6570
+ this.initParentLinker();
6571
+ this.initEvents();
6572
+
6573
+ var globalAdaptiveFont = $('#n2-ss-adaptive-font').on('click', $.proxy(function () {
6574
+ this.toolboxForm.adaptivefont.data('field').onoff.trigger('click');
6575
+ }, this));
6576
+
6577
+ this.toolboxForm.adaptivefont.on('nextendChange', $.proxy(function () {
6578
+ if (this.toolboxForm.adaptivefont.val() == 1) {
6579
+ globalAdaptiveFont.addClass('n2-active');
6580
+ } else {
6581
+ globalAdaptiveFont.removeClass('n2-active');
6582
+ }
6583
+ }, this));
6584
+
6585
+
6586
+ new NextendElementNumber("n2-ss-font-size", -Number.MAX_VALUE, Number.MAX_VALUE);
6587
+ new NextendElementAutocompleteSimple("n2-ss-font-size", ["60", "80", "100", "120", "140", "160", "180"]);
6588
+
6589
+ var globalFontSize = $('#n2-ss-font-size').on('outsideChange', $.proxy(function () {
6590
+ var value = parseInt(globalFontSize.val());
6591
+ this.toolboxForm.fontsize.val(value).trigger('change');
6592
+ }, this));
6593
+
6594
+ this.toolboxForm.fontsize.on('nextendChange', $.proxy(function () {
6595
+ globalFontSize.data('field').insideChange(this.toolboxForm.fontsize.val());
6596
+ }, this));
6597
+
6598
+ if (this.zIndexList.length > 0) {
6599
+ this.zIndexList[this.zIndexList.length - 1].activate();
6600
+ }
6601
+
6602
+
6603
+ $(window).on({
6604
+ keydown: $.proxy(function (e) {
6605
+ if (e.target.tagName != 'TEXTAREA' && e.target.tagName != 'INPUT' && (!smartSlider.timelineControl || !smartSlider.timelineControl.isActivated())) {
6606
+ if (this.activeLayerIndex != -1) {
6607
+ var keyCode = e.keyCode;
6608
+ if (keyCode >= 49 && keyCode <= 57) {
6609
+ var location = e.originalEvent.location || e.originalEvent.keyLocation || 0;
6610
+ // Fix OSX Chrome numeric keycodes
6611
+ if (location == 3) {
6612
+ keyCode += 48;
6613
+ }
6614
+ }
6615
+
6616
+ if (keyCode == 46) {
6617
+ this.delete();
6618
+ } else if (keyCode == 35) {
6619
+ this.duplicate();
6620
+ e.preventDefault();
6621
+ } else if (keyCode == 16) {
6622
+ keys[keyCode] = 1;
6623
+ } else if (keyCode == 38) {
6624
+ if (!keys[keyCode]) {
6625
+ var fn = $.proxy(function () {
6626
+ this.layerList[this.activeLayerIndex].moveY(-1 * (keys[16] ? 10 : 1))
6627
+ }, this);
6628
+ fn();
6629
+ keys[keyCode] = setInterval(fn, 100);
6630
+ }
6631
+ e.preventDefault();
6632
+ } else if (keyCode == 40) {
6633
+ if (!keys[keyCode]) {
6634
+ var fn = $.proxy(function () {
6635
+ this.layerList[this.activeLayerIndex].moveY((keys[16] ? 10 : 1))
6636
+ }, this);
6637
+ fn();
6638
+ keys[keyCode] = setInterval(fn, 100);
6639
+ }
6640
+ e.preventDefault();
6641
+ } else if (keyCode == 37) {
6642
+ if (!keys[keyCode]) {
6643
+ var fn = $.proxy(function () {
6644
+ this.layerList[this.activeLayerIndex].moveX(-1 * (keys[16] ? 10 : 1))
6645
+ }, this);
6646
+ fn();
6647
+ keys[keyCode] = setInterval(fn, 100);
6648
+ }
6649
+ e.preventDefault();
6650
+ } else if (keyCode == 39) {
6651
+ if (!keys[keyCode]) {
6652
+ var fn = $.proxy(function () {
6653
+ this.layerList[this.activeLayerIndex].moveX((keys[16] ? 10 : 1))
6654
+ }, this);
6655
+ fn();
6656
+ keys[keyCode] = setInterval(fn, 100);
6657
+ }
6658
+ e.preventDefault();
6659
+ } else if (keyCode >= 97 && keyCode <= 105) {
6660
+
6661
+ var hAlign = horizontalAlign[keyCode],
6662
+ vAlign = verticalAlign[keyCode],
6663
+ toZero = false;
6664
+ if (this.toolboxForm.align.val() == hAlign && this.toolboxForm.valign.val() == vAlign) {
6665
+ toZero = true;
6666
+ }
6667
+ // numeric pad
6668
+ this.horizontalAlign(hAlign, toZero);
6669
+ this.verticalAlign(vAlign, toZero);
6670
+
6671
+ } else if (keyCode == 34) {
6672
+ e.preventDefault();
6673
+ var targetIndex = this.layerList[this.activeLayerIndex].zIndex - 1;
6674
+ if (targetIndex < 0) {
6675
+ targetIndex = this.zIndexList.length - 1;
6676
+ }
6677
+ this.zIndexList[targetIndex].activate();
6678
+
6679
+ } else if (keyCode == 33) {
6680
+ e.preventDefault();
6681
+ var targetIndex = this.layerList[this.activeLayerIndex].zIndex + 1;
6682
+ if (targetIndex > this.zIndexList.length - 1) {
6683
+ targetIndex = 0;
6684
+ }
6685
+ this.zIndexList[targetIndex].activate();
6686
+
6687
+ } else if (e.ctrlKey || e.metaKey) {
6688
+ if (keyCode == 90) {
6689
+ if (e.shiftKey) {
6690
+ smartSlider.history.redo();
6691
+ } else {
6692
+ smartSlider.history.undo();
6693
+ }
6694
+ } else if (keyCode == 67) {
6695
+ this.copy();
6696
+ } else if (keyCode == 86) {
6697
+ this.paste(0);
6698
+ }
6699
+ }
6700
+ }
6701
+ }
6702
+ }, this),
6703
+ keyup: $.proxy(function (e) {
6704
+ if (typeof keys[e.keyCode] !== 'undefined' && keys[e.keyCode]) {
6705
+ clearInterval(keys[e.keyCode]);
6706
+ keys[e.keyCode] = 0;
6707
+ }
6708
+ }, this)
6709
+ });
6710
+
6711
+ this.addContextMenu();
6712
+
6713
+ if (!isUploadDisabled) {
6714
+ smartSlider.frontend.sliderElement.fileupload({
6715
+ url: uploadUrl,
6716
+ pasteZone: false,
6717
+ dropZone: smartSlider.frontend.sliderElement,
6718
+ dataType: 'json',
6719
+ paramName: 'image',
6720
+ add: $.proxy(function (e, data) {
6721
+ data.formData = {path: '/' + uploadDir};
6722
+ data.submit();
6723
+ }, this),
6724
+ done: $.proxy(function (e, data) {
6725
+ var response = data.result;
6726
+ if (response.data && response.data.name) {
6727
+ var item = this.itemEditor.createLayerItem('image');
6728
+ item.reRender({
6729
+ image: response.data.url
6730
+ });
6731
+ item.activate(null, true);
6732
+ } else {
6733
+ NextendAjaxHelper.notification(response);
6734
+ }
6735
+
6736
+ }, this),
6737
+ fail: $.proxy(function (e, data) {
6738
+ NextendAjaxHelper.notification(data.jqXHR.responseJSON);
6739
+ }, this),
6740
+
6741
+ start: function () {
6742
+ NextendAjaxHelper.startLoading();
6743
+ },
6744
+
6745
+ stop: function () {
6746
+ setTimeout(function () {
6747
+ NextendAjaxHelper.stopLoading();
6748
+ }, 100);
6749
+ }
6750
+ });
6751
+ }
6752
+
6753
+ this.initHideSidebar();
6754
+ };
6755
+
6756
+ AdminSlideLayerManager.prototype.initHideSidebar = function () {
6757
+ var admin = $('#n2-admin'),
6758
+ hideSidebarButtons = $('.n2-hide-sidebar')
6759
+ .on('click', function () {
6760
+ if (admin.hasClass('n2-sidebar-hidden')) {
6761
+ admin.removeClass('n2-sidebar-hidden');
6762
+ } else {
6763
+ admin.addClass('n2-sidebar-hidden');
6764
+ }
6765
+ $(window).trigger('resize');
6766
+ });
6767
+ };
6768
+
6769
+ AdminSlideLayerManager.prototype.getMode = function () {
6770
+ return this.mode;
6771
+ };
6772
+
6773
+ AdminSlideLayerManager.prototype._getMode = function () {
6774
+ return this.responsive.getNormalizedModeString();
6775
+ };
6776
+
6777
+ AdminSlideLayerManager.prototype.getResponsiveRatio = function (axis) {
6778
+ if (axis == 'h') {
6779
+ return this.responsive.lastRatios.slideW;
6780
+ } else if (axis == 'v') {
6781
+ return this.responsive.lastRatios.slideH;
6782
+ }
6783
+ return 0;
6784
+ };
6785
+
6786
+ AdminSlideLayerManager.prototype.createLayer = function (properties) {
6787
+
6788
+ for (var k in this.layerDefault) {
6789
+ if (this.layerDefault[k] !== null) {
6790
+ properties[k] = this.layerDefault[k];
6791
+ }
6792
+ }
6793
+ var newLayer = new NextendSmartSliderLayer(this, false, this.itemEditor, properties);
6794
+
6795
+ this.reIndexLayers();
6796
+
6797
+ this._makeLayersOrderable();
6798
+
6799
+ return newLayer;
6800
+ };
6801
+
6802
+ AdminSlideLayerManager.prototype.addLayer = function (html, refresh) {
6803
+ var layerObj = this._addLayer(html, refresh);
6804
+
6805
+ smartSlider.history.add($.proxy(function () {
6806
+ return [layerObj, 'addLayer', 'add', 'delete', [layerObj.getData(true)]];
6807
+ }, this));
6808
+
6809
+ return layerObj;
6810
+ };
6811
+
6812
+ AdminSlideLayerManager.prototype._addLayer = function (html, refresh) {
6813
+ var newLayer = $(html);
6814
+ this.layerContainerElement.append(newLayer);
6815
+ var layerObj = new NextendSmartSliderLayer(this, newLayer, this.itemEditor);
6816
+
6817
+ if (refresh) {
6818
+ this.reIndexLayers();
6819
+ this.refreshMode();
6820
+ }
6821
+ return layerObj;
6822
+ };
6823
+
6824
+ AdminSlideLayerManager.prototype.setSolo = function (layer) {
6825
+ if (this.solo) {
6826
+ this.solo.unmarkSolo();
6827
+ if (this.solo === layer) {
6828
+ this.solo = false;
6829
+ smartSlider.$currentSlideElement.removeClass('n2-ss-layer-solo-mode');
6830
+ return;
6831
+ } else {
6832
+ this.solo = false;
6833
+ }
6834
+ }
6835
+
6836
+ this.solo = layer;
6837
+ layer.markSolo();
6838
+ smartSlider.$currentSlideElement.addClass('n2-ss-layer-solo-mode');
6839
+ };
6840
+
6841
+ /**
6842
+ * Force the view to change to the second mode (layer)
6843
+ */
6844
+ AdminSlideLayerManager.prototype.switchToLayerTab = function () {
6845
+ smartSlider.slide._changeView(1);
6846
+ };
6847
+
6848
+ //<editor-fold desc="Initialize the device mode changer">
6849
+
6850
+
6851
+ AdminSlideLayerManager.prototype._initDeviceModeChange = function () {
6852
+ var resetButton = $('#layerresettodesktop').on('click', $.proxy(this.__onResetToDesktopClick, this));
6853
+ this.resetToDesktopTRElement = resetButton.closest('tr');
6854
+ this.resetToDesktopGlobalElement = $('#n2-ss-reset-to-desktop').on('click', $.proxy(function () {
6855
+ if (this.resetToDesktopTRElement.css('display') == 'table-row') {
6856
+ resetButton.trigger('click');
6857
+ }
6858
+ }, this));
6859
+
6860
+
6861
+ var globalShowOnDevice = $('#n2-ss-show-on-device').on('click', $.proxy(function () {
6862
+ this.toolboxForm['showField' + this.mode.charAt(0).toUpperCase() + this.mode.substr(1)].data('field').onoff.trigger('click');
6863
+ }, this));
6864
+
6865
+ this.globalShowOnDeviceCB = function (mode) {
6866
+ if (this.mode == mode) {
6867
+ if (this.toolboxForm['showField' + this.mode.charAt(0).toUpperCase() + this.mode.substr(1)].val() == 1) {
6868
+ globalShowOnDevice.addClass('n2-active');
6869
+ } else {
6870
+ globalShowOnDevice.removeClass('n2-active');
6871
+ }
6872
+ }
6873
+ };
6874
+
6875
+ this.toolboxForm.showFieldDesktopPortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'desktopPortrait'));
6876
+ this.toolboxForm.showFieldDesktopLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'desktopLandscape'));
6877
+
6878
+ this.toolboxForm.showFieldTabletPortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'tabletPortrait'));
6879
+ this.toolboxForm.showFieldTabletLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'tabletLandscape'));
6880
+
6881
+ this.toolboxForm.showFieldMobilePortrait.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobilePortrait'));
6882
+ this.toolboxForm.showFieldMobileLandscape.on('nextendChange', $.proxy(this.globalShowOnDeviceCB, this, 'mobileLandscape'));
6883
+
6884
+ this.__onChangeDeviceOrientation();
6885
+ smartSlider.frontend.sliderElement.on('SliderDeviceOrientation', $.proxy(this.__onChangeDeviceOrientation, this));
6886
+
6887
+
6888
+ //this.__onResize();
6889
+ smartSlider.frontend.sliderElement.on('SliderResize', $.proxy(this.__onResize, this));
6890
+ };
6891
+
6892
+ /**
6893
+ * Refresh the current responsive mode. Example: you are in tablet view and unpublish a layer for tablet, then you should need a refresh on the mode.
6894
+ */
6895
+ AdminSlideLayerManager.prototype.refreshMode = function () {
6896
+
6897
+ this.__onChangeDeviceOrientation();
6898
+
6899
+ smartSlider.frontend.responsive.reTriggerSliderDeviceOrientation();
6900
+ };
6901
+
6902
+ /**
6903
+ * When the device mode changed we have to change the slider
6904
+ * @param mode
6905
+ * @private
6906
+ */
6907
+ AdminSlideLayerManager.prototype.__onChangeDeviceOrientation = function () {
6908
+
6909
+ this.mode = this._getMode();
6910
+ this.globalShowOnDeviceCB(this.mode);
6911
+
6912
+ this.resetToDesktopTRElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : 'table-row'));
6913
+ this.resetToDesktopGlobalElement.css('display', (this.mode == 'desktopPortrait' ? 'none' : ''));
6914
+ for (var i = 0; i < this.layerList.length; i++) {
6915
+ this.layerList[i].changeEditorMode(this.mode);
6916
+ }
6917
+ };
6918
+
6919
+ AdminSlideLayerManager.prototype.__onResize = function (e, ratios) {
6920
+
6921
+ var sortedLayerList = this.getSortedLayers();
6922
+
6923
+ for (var i = 0; i < sortedLayerList.length; i++) {
6924
+ sortedLayerList[i].doLinearResize(ratios);
6925
+ }
6926
+ };
6927
+
6928
+ /**
6929
+ * Reset the custom values of the current mode on the current layer to the desktop values.
6930
+ * @private
6931
+ */
6932
+ AdminSlideLayerManager.prototype.__onResetToDesktopClick = function () {
6933
+ if (this.activeLayerIndex != -1) {
6934
+ var mode = this.getMode();
6935
+ this.layerList[this.activeLayerIndex].resetMode(mode, mode);
6936
+ }
6937
+ };
6938
+
6939
+ AdminSlideLayerManager.prototype.copyOrResetMode = function (mode) {
6940
+
6941
+ var currentMode = this.getMode();
6942
+ if (mode != 'desktopPortrait' && mode == currentMode) {
6943
+ for (var i = 0; i < this.layerList.length; i++) {
6944
+ this.layerList[i].resetMode(mode, currentMode);
6945
+ }
6946
+ } else if (mode != 'desktopPortrait' && currentMode == 'desktopPortrait') {
6947
+ for (var i = 0; i < this.layerList.length; i++) {
6948
+ this.layerList[i].resetMode(mode, currentMode);
6949
+ }
6950
+ } else if (mode != currentMode) {
6951
+ for (var i = 0; i < this.layerList.length; i++) {
6952
+ this.layerList[i].copyMode(currentMode, mode);
6953
+ }
6954
+ }
6955
+
6956
+ };
6957
+
6958
+ AdminSlideLayerManager.prototype.refreshSlideSize = function () {
6959
+ this.slideSize.width = smartSlider.frontend.dimensions.slide.width;
6960
+ this.slideSize.height = smartSlider.frontend.dimensions.slide.height;
6961
+ };
6962
+
6963
+ //</editor-fold>
6964
+
6965
+ AdminSlideLayerManager.prototype._makeLayersOrderable = function () {
6966
+ this.layersOrderableElement = this.layersItemsElement.find(' > ul');
6967
+ this.layersOrderableElement
6968
+ .sortable({
6969
+ axis: "y",
6970
+ helper: 'clone',
6971
+ placeholder: "sortable-placeholder",
6972
+ forcePlaceholderSize: true,
6973
+ tolerance: "pointer",
6974
+ items: '.n2-ss-layer-row',
6975
+ //handle: '.n2-i-order',
6976
+ start: function (event, ui) {
6977
+ $(ui.item).data("startindex", ui.item.index());
6978
+ },
6979
+ stop: $.proxy(function (event, ui) {
6980
+ var startIndex = this.zIndexList.length - $(ui.item).data("startindex") - 1,
6981
+ newIndex = this.zIndexList.length - $(ui.item).index() - 1;
6982
+ if (startIndex != newIndex) {
6983
+ this.zIndexList.splice(newIndex, 0, this.zIndexList.splice(startIndex, 1)[0]);
6984
+ this.reIndexLayers();
6985
+
6986
+ smartSlider.history.add($.proxy(function () {
6987
+ return [this, 'changeZIndex', [startIndex, newIndex], [newIndex, startIndex], []];
6988
+ }, this));
6989
+ }
6990
+ }, this)
6991
+ });
6992
+ };
6993
+
6994
+ AdminSlideLayerManager.prototype.reIndexLayers = function () {
6995
+ this.zIndexList = this.zIndexList.filter(function (item) {
6996
+ return item != undefined
6997
+ });
6998
+
6999
+ for (var i = this.zIndexList.length - 1; i >= 0; i--) {
7000
+ this.zIndexList[i].setZIndex(i);
7001
+ }
7002
+ };
7003
+
7004
+ AdminSlideLayerManager.prototype.initEvents = function () {
7005
+ var parent = $('#n2-tab-events'),
7006
+ content = parent.find('> table').css('display', 'none'),
7007
+ heading = parent.find('.n2-h3'),
7008
+ headingLabel = heading.html(),
7009
+ row = $('<div class="n2-sidebar-row n2-sidebar-header-bg n2-form-dark n2-sets-header"><div class="n2-table"><div class="n2-tr"><div class="n2-td"><div class="n2-h3 n2-uc">' + headingLabel + '</div></div><div style="text-align: ' + (nextend.isRTL() ? 'left' : 'right') + ';" class="n2-td"></div></div></div></div>'),
7010
+ button = $('<a href="#" class="n2-button n2-button-medium n2-button-green n2-h5 n2-uc">' + n2_('Show') + '</a>').on('click', function (e) {
7011
+ e.preventDefault();
7012
+ if (button.hasClass('n2-button-green')) {
7013
+ content.css('display', '');
7014
+ button.html(n2_('Hide'));
7015
+ button.addClass('n2-button-grey');
7016
+ button.removeClass('n2-button-green');
7017
+ $.jStorage.set("n2-ss-events", 1);
7018
+ } else {
7019
+ content.css('display', 'none');
7020
+ button.html(n2_('Show'));
7021
+ button.addClass('n2-button-green');
7022
+ button.removeClass('n2-button-grey');
7023
+ $.jStorage.set("n2-ss-events", 0);
7024
+ }
7025
+ });
7026
+ if ($.jStorage.get("n2-ss-events", 0)) {
7027
+ content.css('display', '');
7028
+ button.html(n2_('Hide'));
7029
+ button.addClass('n2-button-grey');
7030
+ button.removeClass('n2-button-green');
7031
+ }
7032
+ heading.replaceWith(row);
7033
+ button.appendTo(row.find('.n2-td').eq(1));
7034
+ }
7035
+
7036
+ AdminSlideLayerManager.prototype.initSnapTo = function () {
7037
+
7038
+ var field = new NextendElementOnoff("n2-ss-snap");
7039
+
7040
+ if (!$.jStorage.get("n2-ss-snap-to-enabled", 1)) {
7041
+ field.insideChange(0);
7042
+ this.snapToDisable();
7043
+ }
7044
+
7045
+ field.element.on('outsideChange', $.proxy(this.switchSnapTo, this));
7046
+ };
7047
+
7048
+ AdminSlideLayerManager.prototype.switchSnapTo = function (e) {
7049
+ e.preventDefault();
7050
+ if (this.snapToEnabled) {
7051
+ this.snapToDisable();
7052
+ } else {
7053
+ this.snapToEnable();
7054
+ }
7055
+ };
7056
+
7057
+ AdminSlideLayerManager.prototype.snapToDisable = function () {
7058
+ this.snapToEnabled = false;
7059
+ this.snapToChanged(0);
7060
+ };
7061
+
7062
+ AdminSlideLayerManager.prototype.snapToEnable = function () {
7063
+ this.snapToEnabled = true;
7064
+ this.snapToChanged(1);
7065
+ };
7066
+ AdminSlideLayerManager.prototype.snapToChanged = function () {
7067
+ for (var i = 0; i < this.layerList.length; i++) {
7068
+ this.layerList[i].snap();
7069
+ }
7070
+ $.jStorage.set("n2-ss-snap-to-enabled", this.snapToEnabled);
7071
+ };
7072
+
7073
+ AdminSlideLayerManager.prototype.getSnap = function () {
7074
+ if (!this.snapToEnabled) {
7075
+ return false;
7076
+ }
7077
+
7078
+ if (this.staticSlide) {
7079
+ return $('.n2-ss-static-slide .n2-ss-layer:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):visible');
7080
+ }
7081
+ return $('.n2-ss-slide.n2-ss-slide-active .n2-ss-layer:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):visible');
7082
+ };
7083
+
7084
+ AdminSlideLayerManager.prototype.initEditorTheme = function () {
7085
+ this.themeElement = $('#n2-tab-smartslider-editor');
7086
+ this.themeButton = $('#n2-ss-theme').on('click', $.proxy(this.switchEditorTheme, this));
7087
+ if ($.jStorage.get("n2-ss-theme-dark", 0)) {
7088
+ this.themeButton.addClass('n2-active');
7089
+ this.themeElement.addClass('n2-ss-theme-dark');
7090
+ }
7091
+ };
7092
+
7093
+ AdminSlideLayerManager.prototype.switchEditorTheme = function () {
7094
+ $.jStorage.set("n2-ss-theme-dark", !this.themeButton.hasClass('n2-active'));
7095
+ this.themeButton.toggleClass('n2-active');
7096
+ this.themeElement.toggleClass('n2-ss-theme-dark');
7097
+ };
7098
+
7099
+ AdminSlideLayerManager.prototype.initAlign = function () {
7100
+ var hAlignButton = $('#n2-ss-horizontal-align .n2-radio-option'),
7101
+ vAlignButton = $('#n2-ss-vertical-align .n2-radio-option');
7102
+
7103
+ hAlignButton.add(vAlignButton).on('click', $.proxy(function (e) {
7104
+ if (e.ctrlKey || e.metaKey) {
7105
+ var $el = $(e.currentTarget),
7106
+ isActive = $el.hasClass('n2-sub-active'),
7107
+ align = $el.data('align');
7108
+ switch (align) {
7109
+ case 'left':
7110
+ case 'center':
7111
+ case 'right':
7112
+ hAlignButton.removeClass('n2-sub-active');
7113
+ if (isActive) {
7114
+ $.jStorage.set('ss-item-horizontal-align', null);
7115
+ this.layerDefault.align = null;
7116
+ } else {
7117
+ $.jStorage.set('ss-item-horizontal-align', align);
7118
+ this.layerDefault.align = align;
7119
+ $el.addClass('n2-sub-active');
7120
+ }
7121
+ break;
7122
+ case 'top':
7123
+ case 'middle':
7124
+ case 'bottom':
7125
+ vAlignButton.removeClass('n2-sub-active');
7126
+ if (isActive) {
7127
+ $.jStorage.set('ss-item-vertical-align', null);
7128
+ this.layerDefault.valign = null;
7129
+ } else {
7130
+ $.jStorage.set('ss-item-vertical-align', align);
7131
+ this.layerDefault.valign = align;
7132
+ $el.addClass('n2-sub-active');
7133
+ }
7134
+ break;
7135
+ }
7136
+ } else if (this.activeLayerIndex != -1) {
7137
+ var align = $(e.currentTarget).data('align');
7138
+ switch (align) {
7139
+ case 'left':
7140
+ case 'center':
7141
+ case 'right':
7142
+ this.horizontalAlign(align, true);
7143
+ break;
7144
+ case 'top':
7145
+ case 'middle':
7146
+ case 'bottom':
7147
+ this.verticalAlign(align, true);
7148
+ break;
7149
+ }
7150
+ }
7151
+ }, this));
7152
+
7153
+ this.toolboxForm.align.on('nextendChange', $.proxy(function () {
7154
+ hAlignButton.removeClass('n2-active');
7155
+ switch (this.toolboxForm.align.val()) {
7156
+ case 'left':
7157
+ hAlignButton.eq(0).addClass('n2-active');
7158
+ break;
7159
+ case 'center':
7160
+ hAlignButton.eq(1).addClass('n2-active');
7161
+ break;
7162
+ case 'right':
7163
+ hAlignButton.eq(2).addClass('n2-active');
7164
+ break;
7165
+ }
7166
+ }, this));
7167
+ this.toolboxForm.valign.on('nextendChange', $.proxy(function () {
7168
+ vAlignButton.removeClass('n2-active');
7169
+ switch (this.toolboxForm.valign.val()) {
7170
+ case 'top':
7171
+ vAlignButton.eq(0).addClass('n2-active');
7172
+ break;
7173
+ case 'middle':
7174
+ vAlignButton.eq(1).addClass('n2-active');
7175
+ break;
7176
+ case 'bottom':
7177
+ vAlignButton.eq(2).addClass('n2-active');
7178
+ break;
7179
+ }
7180
+ }, this));
7181
+
7182
+
7183
+ var hAlign = $.jStorage.get('ss-item-horizontal-align', null),
7184
+ vAlign = $.jStorage.get('ss-item-vertical-align', null);
7185
+ if (hAlign != null) {
7186
+ hAlignButton.eq(nameToIndex[hAlign]).addClass('n2-sub-active');
7187
+ this.layerDefault.align = hAlign;
7188
+ }
7189
+ if (vAlign != null) {
7190
+ vAlignButton.eq(nameToIndex[vAlign]).addClass('n2-sub-active');
7191
+ this.layerDefault.valign = vAlign;
7192
+ }
7193
+ };
7194
+
7195
+ AdminSlideLayerManager.prototype.horizontalAlign = function (align, toZero) {
7196
+ if (this.toolboxForm.align.val() != align) {
7197
+ this.toolboxForm.align.data('field').options.eq(nameToIndex[align]).trigger('click');
7198
+ } else if (toZero) {
7199
+ this.toolboxForm.left.val(0).trigger('change');
7200
+ }
7201
+ };
7202
+
7203
+ AdminSlideLayerManager.prototype.verticalAlign = function (align, toZero) {
7204
+ if (this.toolboxForm.valign.val() != align) {
7205
+ this.toolboxForm.valign.data('field').options.eq(nameToIndex[align]).trigger('click');
7206
+ } else if (toZero) {
7207
+ this.toolboxForm.top.val(0).trigger('change');
7208
+ }
7209
+ };
7210
+
7211
+ AdminSlideLayerManager.prototype.initParentLinker = function () {
7212
+ var field = this.toolboxForm.parentid.data('field'),
7213
+ parentLinker = $('#n2-ss-parent-linker').on({
7214
+ click: function (e) {
7215
+ field.click(e);
7216
+ },
7217
+ mouseenter: function (e) {
7218
+ field.picker.trigger(e);
7219
+ },
7220
+ mouseleave: function (e) {
7221
+ field.picker.trigger(e);
7222
+ }
7223
+ });
7224
+ };
7225
+
7226
+ /**
7227
+ * Delete all layers on the slide
7228
+ */
7229
+ AdminSlideLayerManager.prototype.deleteLayers = function () {
7230
+ for (var i = this.zIndexList.length - 1; i >= 0; i--) {
7231
+ this.zIndexList[i].delete();
7232
+ }
7233
+ };
7234
+
7235
+ AdminSlideLayerManager.prototype.layerDeleted = function (index) {
7236
+
7237
+ this.reIndexLayers();
7238
+
7239
+ this.layerList.splice(index, 1);
7240
+
7241
+ this.afterLayerDeleted(index);
7242
+ };
7243
+
7244
+ AdminSlideLayerManager.prototype.afterLayerDeleted = NextendThrottle(function (index) {
7245
+
7246
+ var activeLayer = this.getSelectedLayer();
7247
+
7248
+ if (index === this.activeLayerIndex) {
7249
+ this.activeLayerIndex = -1;
7250
+ if (this.zIndexList.length > 0) {
7251
+ this.zIndexList[this.zIndexList.length - 1].activate();
7252
+ } else {
7253
+ this.changeActiveLayer(-1);
7254
+ }
7255
+ } else if (activeLayer) {
7256
+ this.activeLayerIndex = activeLayer.getIndex();
7257
+ }
7258
+ }, 50);
7259
+
7260
+ AdminSlideLayerManager.prototype.getSortedLayers = function () {
7261
+ var list = this.layerList.slice(),
7262
+ children = {};
7263
+ for (var i = list.length - 1; i >= 0; i--) {
7264
+ if (typeof list[i].property.parentid !== 'undefined' && list[i].property.parentid) {
7265
+ if (typeof children[list[i].property.parentid] == 'undefined') {
7266
+ children[list[i].property.parentid] = [];
7267
+ }
7268
+ children[list[i].property.parentid].push(list[i]);
7269
+ list.splice(i, 1);
7270
+ }
7271
+ }
7272
+ for (var i = 0; i < list.length; i++) {
7273
+ if (typeof list[i].property.id !== 'undefined' && list[i].property.id && typeof children[list[i].property.id] !== 'undefined') {
7274
+ children[list[i].property.id].unshift(0);
7275
+ children[list[i].property.id].unshift(i + 1);
7276
+ list.splice.apply(list, children[list[i].property.id]);
7277
+ delete children[list[i].property.id];
7278
+ }
7279
+ }
7280
+ return list;
7281
+ };
7282
+
7283
+
7284
+ AdminSlideLayerManager.prototype.getActiveLayerData = function () {
7285
+ var layers = [];
7286
+ if (typeof this.layerList[this.activeLayerIndex] !== 'undefined') {
7287
+ return this.layerList[this.activeLayerIndex].getDataWithChildren(layers);
7288
+ }
7289
+ return layers;
7290
+ };
7291
+
7292
+ /**
7293
+ * Get the HTML code of the whole slide
7294
+ * @returns {string} HTML
7295
+ */
7296
+ AdminSlideLayerManager.prototype.getHTML = function () {
7297
+ var node = $('<div></div>');
7298
+
7299
+ var list = this.layerList;
7300
+ for (var i = 0; i < list.length; i++) {
7301
+ node.append(list[i].getHTML(true, true));
7302
+ }
7303
+
7304
+ return node.html();
7305
+ };
7306
+
7307
+
7308
+ AdminSlideLayerManager.prototype.getData = function () {
7309
+ var layers = [];
7310
+
7311
+ var list = this.layerList;
7312
+ for (var i = 0; i < list.length; i++) {
7313
+ layers.push(list[i].getData(true));
7314
+ }
7315
+
7316
+ return layers;
7317
+ };
7318
+
7319
+ AdminSlideLayerManager.prototype.loadData = function (data, overwrite) {
7320
+
7321
+ smartSlider.history.add($.proxy(function () {
7322
+ return [this, 'fixActiveLayer', '', '', []];
7323
+ }, this));
7324
+
7325
+ var layers = $.extend(true, [], data);
7326
+ if (overwrite) {
7327
+ this.deleteLayers();
7328
+ }
7329
+ this._zIndexOffset = this.zIndexList.length;
7330
+ this._idTranslation = {};
7331
+ for (var i = 0; i < layers.length; i++) {
7332
+ this.loadSingleData(layers[i])
7333
+ }
7334
+ this.reIndexLayers();
7335
+ this.refreshMode();
7336
+
7337
+ if (this.activeLayerIndex == -1 && this.layerList.length > 0) {
7338
+ this.layerList[0].activate();
7339
+ }
7340
+
7341
+ smartSlider.history.add($.proxy(function () {
7342
+ return [this, 'fixActiveLayer', '', '', []];
7343
+ }, this));
7344
+
7345
+ };
7346
+
7347
+ AdminSlideLayerManager.prototype.loadSingleData = function (layerData) {
7348
+
7349
+ var layer = $('<div class="n2-ss-layer"></div>')
7350
+ .attr('style', layerData.style);
7351
+
7352
+ var storedZIndex = layer.css('zIndex');
7353
+ if (storedZIndex == 'auto' || storedZIndex == '') {
7354
+ if (layerData.zIndex) {
7355
+ storedZIndex = layerData.zIndex;
7356
+ } else {
7357
+ storedZIndex = 1;
7358
+ }
7359
+ }
7360
+ layer.css('zIndex', storedZIndex + this._zIndexOffset);
7361
+ if (layerData.id) {
7362
+ var id = $.fn.uid();
7363
+ this._idTranslation[layerData.id] = id;
7364
+ layer.attr('id', id);
7365
+ }
7366
+ if (layerData.parentid) {
7367
+ if (typeof this._idTranslation[layerData.parentid] != 'undefined') {
7368
+ layerData.parentid = this._idTranslation[layerData.parentid];
7369
+ } else {
7370
+ layerData.parentid = '';
7371
+ }
7372
+ }
7373
+
7374
+ for (var j = 0; j < layerData.items.length; j++) {
7375
+ $('<div class="n2-ss-item n2-ss-item-' + layerData.items[j].type + '"></div>')
7376
+ .data('item', layerData.items[j].type)
7377
+ .data('itemvalues', layerData.items[j].values)
7378
+ .appendTo(layer);
7379
+ }
7380
+
7381
+ delete layerData.style;
7382
+ delete layerData.items;
7383
+ layerData.animations = Base64.encode(JSON.stringify(layerData.animations));
7384
+ for (var k in layerData) {
7385
+ layer.data(k, layerData[k]);
7386
+ }
7387
+ return this.addLayer(layer, false);
7388
+ };
7389
+
7390
+ /**
7391
+ * Reloads the layers by the class name
7392
+ */
7393
+ AdminSlideLayerManager.prototype.refreshLayers = function () {
7394
+ this.layers = this.layerContainerElement.find(layerClass);
7395
+ };
7396
+
7397
+ //<editor-fold desc="Toolbox fields and related stuffs">
7398
+
7399
+ /**
7400
+ * Initialize the sidebar Layer toolbox
7401
+ */
7402
+ AdminSlideLayerManager.prototype.initToolbox = function () {
7403
+
7404
+ this.toolboxElement = $('#smartslider-slide-toolbox-layer');
7405
+
7406
+ this.toolboxForm = {
7407
+ id: $('#layerid'),
7408
+ parentid: $('#layerparentid'),
7409
+ parentalign: $('#layerparentalign'),
7410
+ parentvalign: $('#layerparentvalign'),
7411
+ left: $('#layerleft'),
7412
+ top: $('#layertop'),
7413
+ responsiveposition: $('#layerresponsive-position'),
7414
+ width: $('#layerwidth'),
7415
+ height: $('#layerheight'),
7416
+ responsivesize: $('#layerresponsive-size'),
7417
+ class: $('#layerclass'),
7418
+ showFieldDesktopPortrait: $('#layershow-desktop-portrait'),
7419
+ showFieldDesktopLandscape: $('#layershow-desktop-landscape'),
7420
+ showFieldTabletPortrait: $('#layershow-tablet-portrait'),
7421
+ showFieldTabletLandscape: $('#layershow-tablet-landscape'),
7422
+ showFieldMobilePortrait: $('#layershow-mobile-portrait'),
7423
+ showFieldMobileLandscape: $('#layershow-mobile-landscape'),
7424
+ crop: $('#layercrop'),
7425
+ inneralign: $('#layerinneralign'),
7426
+ parallax: $('#layerparallax'),
7427
+ align: $('#layeralign'),
7428
+ valign: $('#layervalign'),
7429
+ fontsize: $('#layerfont-size'),
7430
+ adaptivefont: $('#layeradaptive-font'),
7431
+ mouseenter: $('#layeronmouseenter'),
7432
+ click: $('#layeronclick'),
7433
+ mouseleave: $('#layeronmouseleave'),
7434
+ play: $('#layeronplay'),
7435
+ pause: $('#layeronpause'),
7436
+ stop: $('#layeronstop')
7437
+ };
7438
+
7439
+ for (var k in this.toolboxForm) {
7440
+ this.toolboxForm[k].on('outsideChange', $.proxy(this.activateLayerPropertyChanged, this, k));
7441
+ }
7442
+
7443
+ if (!this.responsive.isEnabled('desktop', 'Landscape')) {
7444
+ this.toolboxForm.showFieldDesktopLandscape.closest('.n2-mixed-group').css('display', 'none');
7445
+ }
7446
+ if (!this.responsive.isEnabled('tablet', 'Portrait')) {
7447
+ this.toolboxForm.showFieldTabletPortrait.closest('.n2-mixed-group').css('display', 'none');
7448
+ }
7449
+ if (!this.responsive.isEnabled('tablet', 'Landscape')) {
7450
+ this.toolboxForm.showFieldTabletLandscape.closest('.n2-mixed-group').css('display', 'none');
7451
+ }
7452
+ if (!this.responsive.isEnabled('mobile', 'Portrait')) {
7453
+ this.toolboxForm.showFieldMobilePortrait.closest('.n2-mixed-group').css('display', 'none');
7454
+ }
7455
+ if (!this.responsive.isEnabled('mobile', 'Landscape')) {
7456
+ this.toolboxForm.showFieldMobileLandscape.closest('.n2-mixed-group').css('display', 'none');
7457
+ }
7458
+ };
7459
+
7460
+ AdminSlideLayerManager.prototype.activateLayerPropertyChanged = function (name, e) {
7461
+ if (this.activeLayerIndex != -1) {
7462
+ //@todo batch? throttle
7463
+ var value = this.toolboxForm[name].val();
7464
+ this.layerList[this.activeLayerIndex].setProperty(name, value, 'manager');
7465
+ } else {
7466
+ var field = this.toolboxForm[name].data('field');
7467
+ if (typeof field !== 'undefined' && field !== null) {
7468
+ field.insideChange('');
7469
+ }
7470
+ }
7471
+ };
7472
+
7473
+ /**
7474
+ * getter for the currently selected layer
7475
+ * @returns {jQuery|boolean} layer element in jQuery representation or false
7476
+ * @private
7477
+ */
7478
+ AdminSlideLayerManager.prototype.getSelectedLayer = function () {
7479
+ if (this.activeLayerIndex == -1) {
7480
+ return false;
7481
+ }
7482
+ return this.layerList[this.activeLayerIndex];
7483
+ };
7484
+
7485
+ //</editor-fold>
7486
+
7487
+ AdminSlideLayerManager.prototype.changeActiveLayer = function (index) {
7488
+ var lastActive = this.activeLayerIndex;
7489
+ if (lastActive != -1) {
7490
+ var $layer = this.layerList[lastActive];
7491
+ // There is a chance that the layer already deleted
7492
+ if ($layer) {
7493
+ $layer.$.off('propertyChanged.layerEditor');
7494
+
7495
+ $layer.deActivate();
7496
+ }
7497
+ }
7498
+ this.activeLayerIndex = index;
7499
+
7500
+ if (index != -1) {
7501
+ var $layer = this.layerList[index];
7502
+ $layer.$.on('propertyChanged.layerEditor', $.proxy(this.activeLayerPropertyChanged, this));
7503
+
7504
+ $layer.animation.activate();
7505
+
7506
+ var properties = $layer.property;
7507
+ for (var name in properties) {
7508
+ this.activeLayerPropertyChanged({
7509
+ target: $layer
7510
+ }, name, properties[name]);
7511
+ }
7512
+ }
7513
+ };
7514
+
7515
+ AdminSlideLayerManager.prototype.activeLayerPropertyChanged = function (e, name, value) {
7516
+ if (typeof this['_formSet' + name] === 'function') {
7517
+ this['_formSet' + name](value, e.target);
7518
+ } else {
7519
+ var field = this.toolboxForm[name].data('field');
7520
+ if (typeof field !== 'undefined') {
7521
+ field.insideChange(value);
7522
+ }
7523
+ }
7524
+ };
7525
+
7526
+ AdminSlideLayerManager.prototype._formSetname = function (value) {
7527
+
7528
+ };
7529
+
7530
+ AdminSlideLayerManager.prototype._formSetnameSynced = function (value) {
7531
+
7532
+ };
7533
+
7534
+ AdminSlideLayerManager.prototype._formSetdesktopPortrait = function (value, layer) {
7535
+ this.toolboxForm.showFieldDesktopPortrait.data('field').insideChange(value);
7536
+ };
7537
+
7538
+ AdminSlideLayerManager.prototype._formSetdesktopLandscape = function (value, layer) {
7539
+ this.toolboxForm.showFieldDesktopLandscape.data('field').insideChange(value);
7540
+ };
7541
+
7542
+ AdminSlideLayerManager.prototype._formSettabletPortrait = function (value, layer) {
7543
+ this.toolboxForm.showFieldTabletPortrait.data('field').insideChange(value);
7544
+ };
7545
+
7546
+ AdminSlideLayerManager.prototype._formSettabletLandscape = function (value, layer) {
7547
+ this.toolboxForm.showFieldTabletLandscape.data('field').insideChange(value);
7548
+ };
7549
+
7550
+ AdminSlideLayerManager.prototype._formSetmobilePortrait = function (value, layer) {
7551
+ this.toolboxForm.showFieldMobilePortrait.data('field').insideChange(value);
7552
+ };
7553
+
7554
+ AdminSlideLayerManager.prototype._formSetmobileLandscape = function (value, layer) {
7555
+ this.toolboxForm.showFieldMobileLandscape.data('field').insideChange(value);
7556
+ };
7557
+
7558
+ AdminSlideLayerManager.prototype.delete = function () {
7559
+ if (typeof this.layerList[this.activeLayerIndex] !== 'undefined') {
7560
+ this.layerList[this.activeLayerIndex].delete();
7561
+ }
7562
+ };
7563
+
7564
+ AdminSlideLayerManager.prototype.duplicate = function () {
7565
+ if (typeof this.layerList[this.activeLayerIndex] !== 'undefined') {
7566
+ this.layerList[this.activeLayerIndex].duplicate(true, false);
7567
+ }
7568
+ };
7569
+
7570
+ AdminSlideLayerManager.prototype.copy = function (copied) {
7571
+ if (typeof copied === 'undefined') {
7572
+ copied = this.getCopied();
7573
+ }
7574
+ var layers = nextend.smartSlider.layerManager.getActiveLayerData();
7575
+ if (layers.length) {
7576
+ copied.unshift({
7577
+ name: layers[0].name,
7578
+ layers: layers
7579
+ });
7580
+ while (copied.length > 5) {
7581
+ copied.pop();
7582
+ }
7583
+ $.jStorage.set('copied', JSON.stringify(copied));
7584
+ }
7585
+ };
7586
+
7587
+ AdminSlideLayerManager.prototype.paste = function (index, copied) {
7588
+ if (typeof copied === 'undefined') {
7589
+ copied = this.getCopied();
7590
+ }
7591
+ if (copied.length && typeof copied[index] !== 'undefined') {
7592
+ nextend.smartSlider.layerManager.loadData(copied[index].layers, false);
7593
+ }
7594
+ };
7595
+
7596
+ AdminSlideLayerManager.prototype.getCopied = function () {
7597
+
7598
+ var copied = $.jStorage.get('copied');
7599
+ if (copied === null) {
7600
+ return [];
7601
+ }
7602
+ return JSON.parse(copied);
7603
+ };
7604
+
7605
+ AdminSlideLayerManager.prototype.addContextMenu = function () {
7606
+ var that = this;
7607
+
7608
+ $.contextMenu({
7609
+ selector: '#n2-ss-0',
7610
+ build: function ($triggerElement, e) {
7611
+
7612
+ var items = {};
7613
+
7614
+ if (typeof that.layerList[that.activeLayerIndex] !== 'undefined') {
7615
+ items['delete'] = {name: "Delete layer", icon: "delete"};
7616
+ items['duplicate'] = {name: "Duplicate layer", icon: "duplicate"};
7617
+ items['copy'] = {name: "Copy layer", icon: "copy"};
7618
+ }
7619
+
7620
+
7621
+ var copied = that.getCopied();
7622
+ if (copied.length == 1) {
7623
+ items['paste'] = {
7624
+ name: "Paste layer",
7625
+ icon: "paste",
7626
+ callback: $.proxy(that.paste, this, 0, copied)
7627
+ }
7628
+ } else if (copied.length > 1) {
7629
+ var pasteItems = {};
7630
+ for (var i = 0; i < copied.length; i++) {
7631
+ pasteItems['paste' + i] = {
7632
+ name: copied[i].name,
7633
+ callback: $.proxy(that.paste, this, i, copied)
7634
+ }
7635
+ }
7636
+ items['paste'] = {
7637
+ name: "Paste layer",
7638
+ icon: "paste",
7639
+ items: pasteItems
7640
+ }
7641
+ }
7642
+
7643
+ if ($.isEmptyObject(items)) {
7644
+ return false;
7645
+ }
7646
+
7647
+ return {
7648
+ animation: {duration: 0, show: 'show', hide: 'hide'},
7649
+ zIndex: 1000000,
7650
+ callback: function (key, options) {
7651
+ that[key]();
7652
+ },
7653
+ positionSubmenu: function ($menu) {
7654
+ if ($.ui && $.ui.position) {
7655
+ // .position() is provided as a jQuery UI utility
7656
+ // (...and it won't work on hidden elements)
7657
+ $menu.css('display', 'block').position({
7658
+ my: 'left+2 top',
7659
+ at: 'right top',
7660
+ of: this,
7661
+ collision: 'flipfit fit'
7662
+ }).css('display', '');
7663
+ } else {
7664
+ // determine contextMenu position
7665
+ var offset = {
7666
+ top: 0,
7667
+ left: this.outerWidth()
7668
+ };
7669
+ $menu.css(offset);
7670
+ }
7671
+ },
7672
+ items: items
7673
+ };
7674
+ }
7675
+ });
7676
+ };
7677
+
7678
+ AdminSlideLayerManager.prototype.history = function (method, value, other) {
7679
+ switch (method) {
7680
+ case 'changeZIndex':
7681
+ this.zIndexList.splice(value[1], 0, this.zIndexList.splice(value[0], 1)[0]);
7682
+ this.reIndexLayers();
7683
+ break;
7684
+ case 'fixActiveLayer':
7685
+ var selectedLayer = this.getSelectedLayer();
7686
+ if (selectedLayer == false || selectedLayer.isDeleted) {
7687
+
7688
+ if (this.activeLayerIndex == -1 && this.layerList.length > 0) {
7689
+ this.zIndexList[this.zIndexList.length - 1].activate();
7690
+ }
7691
+ }
7692
+ break;
7693
+ }
7694
+ };
7695
+
7696
+ scope.NextendSmartSliderAdminSlideLayerManager = AdminSlideLayerManager;
7697
+
7698
+ })(nextend.smartSlider, n2, window);
library/media/dist/smartslider-backend.min.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ function strip_tags(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(n,"").replace(i,function(e,i){return t.indexOf("<"+i.toLowerCase()+">")>-1?e:""})}var NextendSmartSliderAdminStorage=function(){this.timelineManager=null,this.timelineControl=null,this.slide=null,this.frontend=null,this.generator=null,this.layerManager=null,this.history=null,this.oneSecWidth=200,this.oneSecMs=1e3,this.fps=20,this.pxToFrame=this.oneSecWidth/this.fps,this.$currentSlideElement=null};NextendSmartSliderAdminStorage.prototype.durationToOffsetX=function(e){return e*this.oneSecWidth},NextendSmartSliderAdminStorage.prototype.offsetXToDuration=function(e){return e/this.oneSecWidth},NextendSmartSliderAdminStorage.prototype.normalizeOffsetX=function(e){return Math.round(e/this.pxToFrame)*this.pxToFrame},NextendSmartSliderAdminStorage.prototype.startEditor=function(e,t,i,n,a,s){return null===this.slide&&window[e].started(function(){new SmartSliderAdminSlide(e,t,i,n,a,s)}),this.slide},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new NextendSmartSliderAdminStorage,function(e,t,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new NextendBackgroundAnimationEditorController},n.prototype.createVisual=function(e,t){return new NextendVisualWithSetRowMultipleSelection(e,t,this)},i.NextendBackgroundAnimationManager=n}(nextend.smartSlider,n2,window),function(e,t){function i(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=e(".n2-bg-animation"),this.slides=e(".n2-bg-animation-slide"),this.bgImages=e(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new NextendElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",e.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}i.prototype=Object.create(NextendVisualEditorController.prototype),i.prototype.constructor=i,i.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},i.prototype.get=function(){return null},i.prototype.load=function(e,t,i,n){this.lightbox.addClass("n2-editor-loaded")},i.prototype.setTabs=function(e){},i.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},i.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},i.prototype.pause=function(){this.timeline&&this.timeline.pause()},i.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:e.proxy(this.ended,this)});var t=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new window["NextendSmartSliderBackgroundAnimation"+this.animationProperties.type](this,t,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},i.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},i.prototype.setAnimationProperties=function(e){var t=this.animationProperties;this.animationProperties=e,t||this.next()},t.NextendBackgroundAnimationEditorController=i}(n2,window),function(e,t){function i(t){this.createSliderModal=null,this.ajaxUrl=t,e(".n2-ss-create-slider").click(e.proxy(function(e){e.preventDefault(),e.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(e("body")),e(".n2-ss-demo-slider").click(e.proxy(function(e){e.preventDefault(),e.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}i.prototype.showModal=function(){if(!this.createSliderModal){var t=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"}),n.push({key:"caption",name:n2_("Caption"),image:"$ss$/admin/images/sliderpresets/caption.png"}),this.createSliderModal=new NextendModal({zero:{size:[N2SSPRO?750:550,N2SSPRO?630:520],title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var a=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(e){e.preventDefault(),a.trigger("click")});s.append(this.createInput(n2_("Slider name"),"slidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"sliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"sliderheight","px","width: 30px;")),new NextendElementAutocompleteSimple("sliderwidth",["1920","1400","1000","800","600","400"]),new NextendElementAutocompleteSimple("sliderheight",["800","600","500","400","300","200"]);var r=e("#slidertitle").val(n2_("Slider")).focus(),o=e("#sliderwidth").val(900),l=e("#sliderheight").val(500);o.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var d=this.createImageRadio(n).css("height",N2SSPRO?360:100).appendTo(this.content),p=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),e('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample1.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample2.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample3.png")+"')\"></div>").on("click",e.proxy(function(){this.hide(),t.showDemoSliders()},this)).appendTo(this.content),a.on("click",e.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{sliderTitle:r.val(),sliderSizeWidth:o.val(),sliderSizeHeight:l.val(),preset:p.val()},dataType:"json"}).done(e.proxy(function(e){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},i.prototype.showDemoSliders=function(){var t=this;e("body").css("overflow","hidden");var i=0,n=e('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),a=function(){e("body").css("overflow",""),n.remove(),window.removeEventListener("message",r,!1),t.notificationStack.popStack()},s=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(t.ajaxUrl,{nextendaction:"importDemo"}),data:{key:Base64.encode(e.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},r=function(e){if("http://smartslider3.com"===e.origin||"https://smartslider3.com"===e.origin){var t=e.data;switch(t.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(t.data.href)}):s(t.data.href));case"closeWindow":a()}}};this.notificationStack.enableStack(),NextendEsc.add(e.proxy(function(){return a(),!0},this)),window.addEventListener("message",r,!1)},t.NextendSmartSliderCreateSlider=i}(n2,window),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var n=[],a=arguments[1],s=0;i>s;s++)if(s in t){var r=t[s];e.call(a,r,s,t)&&n.push(r)}return n}),function(e,t,i){function n(){this.$input=e('<input type="text" name="name" />').on({mouseup:function(e){e.stopPropagation()},keyup:e.proxy(function(e){27==e.keyCode&&this.cancel()},this),blur:e.proxy(this.save,this)}),this.$form=e('<form class="n2-inline-form"></form>').append(this.$input).on("submit",e.proxy(this.save,this))}n.prototype.injectNode=function(e,t){this.$input.val(t),e.append(this.$form),this.$input.focus()},n.prototype.save=function(e){e.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},t.NextendSmartSliderAdminInlineField=n}(n2,window),function(e,t,i,n){"use strict";function a(){this.historyStates=50,this.isEnabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.index=-1,this.history=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on("click",t.proxy(this.undo,this)),this.redoBTN=t("#n2-ss-redo").on("click",t.proxy(this.redo,this)),this.updateUI()}a.prototype.updateUI=function(){0==this.index||0==this.history.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.history.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},a.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},a.prototype.add=function(e){this.isEnabled&&this.historyAddAllowed&&(-1!=this.index&&this.history.splice(this.index,this.history.length),this.index=-1,this.isBatched?this.history[this.history.length-1].push(e()):(this.history.push([e()]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.history.length>this.historyStates&&this.history.unshift(),this.updateUI())},a.prototype.off=function(){this.historyAddAllowed=!1},a.prototype.on=function(){this.historyAddAllowed=!0},a.prototype.undo=function(e){if(e&&e.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.history.length-1:this.index--,this.index>=0)for(var t=this.history[this.index],i=t.length-1;i>=0;i--){var n=t[i];n[0].history(n[1],n[3],n[4],n)}else this.index=0;this.on(),this.updateUI()},a.prototype.redo=function(e){if(e&&e.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.history.length){var t=this.history[this.index];this.index++;for(var i=0;i<t.length;i++){var n=t[i];n[0].history(n[1],n[2],n[4],n)}}this.on(),this.updateUI()},a.prototype.changeFuture=function(e,t){for(var i=0;i<this.history.length;i++)for(var n=0;n<this.history[i].length;n++){this.history[i][n][0]===e&&(this.history[i][n][0]=t);for(var a=0;a<this.history[i][n][4].length;a++)this.history[i][n][4][a]===e&&(this.history[i][n][4][a]=t)}},n2(window).ready(function(){e.history=new a})}(nextend.smartSlider,n2,window),function(e,t,i){function n(t){var i=e("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=t,i.on("click",e.proxy(this.openEdit,this)))}n.prototype.openEdit=function(t){t.preventDefault();var i=e("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var t=this.controls.find(".n2-button-green"),a=this.content.find(".n2-form").on("submit",function(e){e.preventDefault(),t.trigger("click")}),s=a.find("table");i.each(e.proxy(function(t,i){var a=e(i),r=e("<tr />").appendTo(s),o=a.data("slideid");r.append(e("<td />").append('<img src="'+a.data("image")+'" style="width:100px;"/>')),r.append(e("<td />").append(n.createInput("Name","title-"+o,a.data("title"),"width: 240px;"))),r.append(e("<td />").append(n.createTextarea("Description","description-"+o,a.data("description"),"width: 330px;height:24px;")));var l=a.data("link").split("|*|");r.append(e("<td />").append(n.createLink("Link","link-"+o,l[0],"width: 180px;"))),r.append(e("<td />").append(n.createTarget("Target","target-"+o,l.length>1?l[1]:"_self",""))),new NextendElementUrl("link-"+o,nextend.NextendElementUrlParams)},this)),t.on("click",e.proxy(function(t){var a={};i.each(e.proxy(function(t,i){var n=e(i),s=n.data("slideid"),r=e("#title-"+s).val(),o=e("#description-"+s).val(),l=e("#link-"+s).val()+"|*|"+e("#target-"+s).val();r==n.data("title")&&o==n.data("description")&&l==n.data("link")||(a[s]={name:r,description:o,link:l})},this)),jQuery.isEmptyObject(a)?this.hide(t):(this.hide(t),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(a))},dataType:"json"}).done(e.proxy(function(t){var i=t.data;for(var n in i){var a=e('.n2-box-slide[data-slideid="'+n+'"]');a.find(".n2-box-placeholder a.n2-h4").html(i[n].title),a.attr("data-title",i[n].rawTitle),a.data("title",i[n].rawTitle),a.attr("data-description",i[n].rawDescription),a.data("description",i[n].rawDescription),a.attr("data-link",i[n].rawLink),a.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(t,i,n){var a="";4==arguments.length&&(a=arguments[3]);var s=e('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+t+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+a+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(t,i,n){var a="";4==arguments.length&&(a=arguments[3]);var s=e('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+t+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+a+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(t,i,n){var a="";4==arguments.length&&(a=arguments[3]);var s=e('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+t+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+a+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(t,i,n){var a="";4==arguments.length&&(a=arguments[3]);var s=e('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+t+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+a+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},t.NextendSmartSliderQuickSlides=n}(n2,window),function(e,t,i){function n(t,i,n,s,r,o){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=n,this.slides=[],this.ajaxUrl=t,this.contentAjaxUrl=i,this.slidesPanel=e("#n2-ss-slides"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),d=0;d<l.length;d++)this.slides.push(new a(this,l.eq(d)));if(this.slides.length>0&&this.slidesPanel.addClass("n2-ss-has-slides"),e(".n2-add-quick-image").on("click",e.proxy(this.addQuickImage,this)),e(".n2-box-slide-add").on("click",e.proxy(this.addQuickImage,this)),e(".n2-add-quick-video").on("click",e.proxy(this.addQuickVideo,this)),e(".n2-add-quick-post").on("click",e.proxy(this.addQuickPost,this)),this.initBulk(),0==e("#n2-ss-slide-editor-main-tab").length&&new NextendSmartSliderSidebarSlides,!s){var p=[];this.slidesContainer.fileupload({url:r,pasteZone:!1,dropZone:this.slidesContainer,dataType:"json",paramName:"image",add:e.proxy(function(e,t){t.formData={path:"/"+o},t.submit()},this),done:e.proxy(function(e,t){var i=t.result;i.data&&i.data.name?p.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:e.proxy(function(e,t){NextendAjaxHelper.notification(t.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:e.proxy(function(){p.length?this._addQuickImages(p):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),p=[]},this)});var h=null;this.slidesContainer.on("dragover",e.proxy(function(t){null!==h?(clearTimeout(h),h=null):this.slidesContainer.addClass("n2-drag-over"),h=setTimeout(e.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),h=null},this),400)},this))}}function a(t,i){this.selected=!1,this.manager=t,this.box=i.data("slide",this).addClass("n2-clickable"),this.normalMode(),this.box.find(".n2-slide-first").on("click",e.proxy(this.setFirst,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",e.proxy(this.switchPublished,this)),this.box.find(".n2-slide-duplicate").on("click",e.proxy(this.duplicate,this)),this.box.find(".n2-slide-delete").on("click",e.proxy(this["delete"],this))}n.prototype.changed=function(){this.slides.length>0?this.slidesPanel.addClass("n2-ss-has-slides"):this.slidesPanel.removeClass("n2-ss-has-slides")},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({items:".n2-box-slide",tolerance:"pointer",stop:e.proxy(this.saveSlideOrder,this),helper:"clone",placeholder:"n2-box-placeholder n2-box"})},n.prototype.saveSlideOrder=function(t){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],a=[],s=[],r=0;r<i.length;r++){var o=i.eq(r).data("slide");n.push(o),a.push(o.getId())}for(var r=0;r<this.slides.length;r++)s.push(this.slides[r].getId());if(JSON.stringify(s)!=JSON.stringify(a)){e(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:a}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var t=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<t.length;n++){var a=t.eq(n).data("slide");i.push(a)}this.slides=i,this.changed(),e(window).triggerHandler("SmartSliderSidebarSlidesChanged")},n.prototype.unsetFirst=function(){for(var e=0;e<this.slides.length;e++)this.slides[e].unsetFirst();this.changed()},n.prototype.addQuickImage=function(t){t.preventDefault(),nextend.imageHelper.openMultipleLightbox(e.proxy(this._addQuickImages,this))},n.prototype._addQuickImages=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(t))}}).done(e.proxy(function(t){var i=e(t.data).insertBefore(this.slidesContainer.find(".n2-clear"));i.each(e.proxy(function(t,i){new a(this,e(i))},this)),this.initSlides()},this))},n.prototype.addQuickVideo=function(t){t.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("Add video")+"</a>"],fn:{show:function(){var t=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(e){e.preventDefault(),t.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=MKmIwHAFjSU"],["Vimeo","https://vimeo.com/144598279"]],["",""])),t.on("click",e.proxy(e.proxy(function(t){t.preventDefault();var a=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,r=a.match(s),o=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=a.match(o),d=a.match(/\.(mp4|ogv|ogg|webm)/i);r?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(r[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(e.proxy(function(e){if(e.items.length){var t=e.items[0].snippet,n=e.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:t.title,description:t.description,image:s.url,video:a})}},this)).fail(function(e){nextend.notificationCenter.error(e.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(e.proxy(function(e){i._addQuickVideo(this,{type:"vimeo",title:e[0].title,description:e[0].description,video:l[3],image:e[0].thumbnail_large})},this)).fail(function(e){nextend.notificationCenter.error(e.responseText)}):d?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(t,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(JSON.stringify(i))}}).done(e.proxy(function(t){var i=e(t.data).insertBefore(this.slidesContainer.find(".n2-clear"));new a(this,i),this.initSlides()},this)),t.hide()},n.prototype.addQuickPost=function(t){if(t.preventDefault(),!this.quickPostModal){var i=this,n={},a=e.proxy(function(e){return"undefined"==typeof n[e]&&(n[e]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:e},dataType:"json"})),n[e]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var t=e("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),r="";t.on("keyup",e.proxy(function(){r=t.val(),a(r).done(e.proxy(function(a){if(t.val()==r){""==r?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),r));for(var o=a.data,l=[],d=this,p=0;p<o.length;p++)l.push([o[p].title,o[p].info,e('<div class="n2-button n2-button-green n2-button-x-small n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:o[p]},function(e){i._addQuickPost(d,e.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(t,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(e.proxy(function(t){var i=e(t.data).insertBefore(this.slidesContainer.find(".n2-clear"));new a(this,i),this.initSlides()},this)),t.hide()},n.prototype.initBulk=function(){e(".n2-slides-bulk").on("click",e.proxy(this.enterBulk,this)),e(".n2-bulk-cancel").on("click",e.proxy(this.leaveBulk,this));var t=e(".n2-bulk-select").find("a");t.eq(0).on("click",e.proxy(function(e){e.preventDefault(),this.bulkSelect(function(e){e.invertSelection()})},this)),t.eq(1).on("click",e.proxy(function(e){e.preventDefault(),this.bulkSelect(function(e){e.select()})},this)),t.eq(2).on("click",e.proxy(function(e){e.preventDefault(),this.bulkSelect(function(e){e.deSelect()})},this)),t.eq(3).on("click",e.proxy(function(e){e.preventDefault(),this.bulkSelect(function(e){e.publishElement.hasClass("n2-active")?e.select():e.deSelect()})},this)),t.eq(4).on("click",e.proxy(function(e){e.preventDefault(),this.bulkSelect(function(e){e.publishElement.hasClass("n2-active")?e.deSelect():e.select()})},this));var i=e(".n2-bulk-action").find("a");i.eq(0).on("click",e.proxy(function(e){e.preventDefault(),this.bulkAction("deleteSlides")},this)),i.eq(1).on("click",e.proxy(function(e){e.preventDefault(),this.bulkAction("duplicateSlides")},this)),i.eq(2).on("click",e.proxy(function(e){e.preventDefault(),this.bulkAction("publishSlides")},this)),i.eq(3).on("click",e.proxy(function(e){e.preventDefault(),this.bulkAction("unPublishSlides")},this))},n.prototype.bulkSelect=function(e){for(var t=0;t<this.slides.length;t++)e(this.slides[t])},n.prototype.bulkAction=function(e){var t=[],i=[];this.bulkSelect(function(e){e.selected&&(t.push(e),i.push(e.getId()))}),i.length?this[e](i,t):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.slidesContainer.sortable("option","disabled",!0),e("#n2-admin").addClass("n2-slide-bulk-mode");for(var t=0;t<this.slides.length;t++)this.slides[t].selectMode()},n.prototype.leaveBulk=function(){this.slidesContainer.sortable("option","disabled",!1),e("#n2-admin").removeClass("n2-slide-bulk-mode");for(var t=0;t<this.slides.length;t++)this.slides[t].normalMode()},n.prototype.deleteSlides=function(t,i){var n=i[0].box.find(".n2-box-button a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,e.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:t}}).done(e.proxy(function(){for(var e=0;e<i.length;e++)i[e].deleted();this.initSlides()},this))},this))},n.prototype.duplicateSlides=function(t,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(e.Event("click",{currentTarget:this.slides[n].box.find(".n2-slide-duplicate")})).done(function(e){e.selectMode()})},n.prototype.publishSlides=function(t,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:t}}).done(e.proxy(function(){for(var e=0;e<i.length;e++)i[e].published();this.changed()},this))},n.prototype.unPublishSlides=function(t,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:t}}).done(e.proxy(function(){for(var e=0;e<i.length;e++)i[e].unPublished();this.changed()},this))},t.NextendSmartSliderAdminSidebarSlides=n,a.prototype.getId=function(){return this.box.data("slideid")},a.prototype.setFirst=function(t){t.stopPropagation(),t.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(e.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-first-slide")},this))},a.prototype.unsetFirst=function(){this.box.removeClass("n2-first-slide")},a.prototype.switchPublished=function(e){e.stopPropagation(),e.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},a.prototype.isPublished=function(){return this.publishElement.hasClass("n2-active")},a.prototype.published=function(){this.publishElement.addClass("n2-active")},a.prototype.unPublished=function(){this.publishElement.removeClass("n2-active")},a.prototype.goToEdit=function(e,t){"A"!=e.target.tagName&&("undefined"!=typeof t&&t?window.open(this.box.data("editurl"),"_blank"):window.location=this.box.data("editurl"))},a.prototype.duplicate=function(t){t.stopPropagation(),t.preventDefault();var i=e.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(e(t.currentTarget).attr("href"),{nextendaction:"duplicate"})}).done(e.proxy(function(t){var n=e(t.data).insertAfter(this.box),s=new a(this.manager,n);this.manager.initSlides(),i.resolve(s)},this)),i},a.prototype["delete"]=function(e){e.stopPropagation(),e.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},a.prototype.deleted=function(){this.box.remove()},a.prototype.selectMode=function(){this.box.off(".n2-slide"),this.box.on("click.n2-slide",e.proxy(this.invertSelection,this))},a.prototype.normalMode=function(){this.box.off(".n2-slide"),this.box.on({"click.n2-slide":e.proxy(this.goToEdit,this),"mousedown.n2-slide":e.proxy(function(e){2!=e.which&&4!=e.which||(e.preventDefault(),this.goToEdit(e,!0))},this)}),this.deSelect()},a.prototype.invertSelection=function(e){e&&e.preventDefault(),this.selected?this.deSelect():this.select()},a.prototype.select=function(){this.selected=!0,this.box.addClass("n2-active")},a.prototype.deSelect=function(){this.selected=!1,this.box.removeClass("n2-active")},t.NextendSmartSliderAdminSlide=a}(n2,window),function(e,t,i,n){function a(){NextendAdminVerticalPane.prototype.constructor.call(this,t(".n2-layers-tab"),t("#n2-ss-layers-items-list").css("overflow","auto"),t("#n2-tabbed-layer-item-animation-tabs > .n2-tabs").css("overflow","auto")),e.sidebarManager=this,this.panelHeading=t("#layeritemeditorpanel").find(".n2-sidebar-tab-switcher .n2-td");var i=t("#n2-ss-slide-sidebar"),n=i.parent().siblings(".n2-td").offset().top-t("#wpadminbar, .navbar").height(),a=t.proxy(function(){t(window).scrollTop()>n?i.addClass("n2-sidebar-fixed"):i.removeClass("n2-sidebar-fixed")},this);this.lateInit(),t(window).scroll(a),a(),new s}function s(){var e=t("#n2-ss-slides");NextendAdminSinglePane.prototype.constructor.call(this,e,e.find(".n2-ss-slides-container").css("overflow","auto")),t(".n2-slides-tab-label").on("click.n2-slides-init",t.proxy(function(e){this.lateInit(),t(e.target).off("click.n2-slides-init")},this))}function r(){var e=t("#n2-ss-slides"),i=e.parents(".n2-sidebar-inner"),n=i.parent().siblings(".n2-td").offset().top-t("#wpadminbar, .navbar").height();t(window).scroll(t.proxy(function(){t(window).scrollTop()>n?i.addClass("n2-sidebar-fixed"):i.removeClass("n2-sidebar-fixed")},this)).trigger("scroll"),NextendAdminSinglePane.prototype.constructor.call(this,e,e.find(".n2-ss-slides-container").css("overflow","auto")),this.lateInit()}a.prototype=Object.create(NextendAdminVerticalPane.prototype),a.prototype.constructor=a,a.prototype.loadDefaults=function(){NextendAdminVerticalPane.prototype.loadDefaults.apply(this,arguments),this.key="smartsliderSlideSidebarRatio"},a.prototype.switchTab=function(e){this.panelHeading.eq(e).trigger("click")},a.prototype.getExcludedHeight=function(){
2
+ var e=0;return e+=t("#n2-ss-slide-editor-main-tab").outerHeight(),e+=t("#n2-ss-item-container").outerHeight(),e+=t("#n2-tabbed-layer-item-animation-tabs > .n2-labels").outerHeight(),e+=this.tab.find(".n2-sidebar-pane-sizer").outerHeight(),e+=1},i.NextendSmartSliderSidebar=a,s.prototype=Object.create(NextendAdminSinglePane.prototype),s.prototype.constructor=s,s.prototype.getExcludedHeight=function(){var e=0;return e+=t("#n2-ss-slide-editor-main-tab").outerHeight(),e+=t(".n2-slides-tab .n2-definition-list").outerHeight(!0),e+=2},i.NextendSmartSliderEditorSidebarSlides=s,r.prototype=Object.create(NextendAdminSinglePane.prototype),r.prototype.constructor=r,r.prototype.getExcludedHeight=function(){var e=0;return e+=t("#n2-ss-slide-editor-main-tab").outerHeight(),e+=t(".n2-sidebar .n2-definition-list").outerHeight(!0),e+=2},i.NextendSmartSliderSidebarSlides=r}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(i,n,a,s,r,o){this.options=t.extend({slideAsFile:0},o),this.readyDeferred=t.Deferred(),e.slide=this,this._warnInternetExplorerUsers(),this.$slideContentElement=t("#"+n),this.slideStartValue=this.$slideContentElement.val(),this.$sliderElement=t("#"+i),e.frontend=window["n2-ss-0"];var l=this.$sliderElement.data("fontsize");nextend.fontManager.setFontSize(l),nextend.styleManager.setFontSize(l),e.$currentSlideElement=e.frontend.adminGetCurrentSlideElement(),new SmartSliderAdminGenerator,e.$currentSlideElement.addClass("n2-ss-currently-edited-slide");var d=e.frontend.parameters.isStaticEdited;new NextendSmartSliderAdminSlideLayerManager(e.$currentSlideElement.data("slide"),d,a,s,r),d||this._initializeBackgroundChanger(),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)}),this.createHistory()}a.prototype.ready=function(e){this.readyDeferred.done(e)},a.prototype.prepareFormForCheck=function(){var t=JSON.stringify(e.layerManager.getData()),i=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(i==t?this.slideStartValue:Base64.encode(t))},a.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,a=t("#smartslider-form").serializeArray();t.each(a,function(e,t){"slide[slide]"==t.name?i.append("slide",new File([t.value],"slide.txt")):i.append(t.name,t.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved")})}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved")})},a.prototype.prepareForm=function(){this.$slideContentElement.val(Base64.encode(JSON.stringify(e.layerManager.getData())))},a.prototype._initializeBackgroundChanger=function(){this.background={slideBackgroundColorField:t("#slidebackgroundColor"),slideBackgroundImageField:t("#slidebackgroundImage"),slideBackgroundImageOpacity:t("#slidebackgroundImageOpacity"),slidebackgroundFocusX:t("#slidebackgroundFocusX"),slidebackgroundFocusY:t("#slidebackgroundFocusY"),slideBackgroundModeField:t("#slidebackgroundMode"),backgroundImageElement:e.$currentSlideElement.find(".nextend-slide-bg"),canvas:e.$currentSlideElement.find(".n2-ss-slide-background")},this.background.slideBackgroundColorField.on("nextendChange",t.proxy(this.__onAfterBackgroundColorChange,this)),this.background.slideBackgroundImageField.on("nextendChange",t.proxy(this.__onAfterBackgroundImageChange,this)),this.background.slideBackgroundImageOpacity.on("nextendChange",t.proxy(this.__onAfterBackgroundImageOpacityChange,this)),this.background.slideBackgroundModeField.on("nextendChange",t.proxy(this.__onAfterBackgroundImageChange,this)),this.background.slidebackgroundFocusX.on("nextendChange",t.proxy(this.__onAfterBackgroundImageChange,this)),this.background.slidebackgroundFocusY.on("nextendChange",t.proxy(this.__onAfterBackgroundImageChange,this));var i=t("#slidethumbnail");if(""==i.val()){var n=t("#item_imageimage"),a=t.proxy(function(e){""!=e&&"$system$/images/placeholder/image.png"!=e&&(i.val(e).trigger("change"),this.background.slideBackgroundImageField.off(".slidethumbnail"),n.off(".slidethumbnail"))},this);this.background.slideBackgroundImageField.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.background.slideBackgroundImageField.val())},this)),n.on("nextendChange.slidethumbnail",t.proxy(function(){a(n.val())},this))}},a.prototype.__onAfterBackgroundColorChange=function(){var e=this.background.slideBackgroundColorField.val();"00"==e.substr(6,8)?this.background.canvas.css("background",""):this.background.canvas.css("background","#"+e.substr(0,6)).css("background",N2Color.hex2rgbaCSS(e))},a.prototype.__onAfterBackgroundImageOpacityChange=function(){e.$currentSlideElement.data("slideBackground").setOpacity(this.background.slideBackgroundImageOpacity.val()/100)},a.prototype.__onAfterBackgroundImageChange=function(){e.$currentSlideElement.data("slideBackground").changeDesktop(e.generator.fill(this.background.slideBackgroundImageField.val()),"",this.background.slideBackgroundModeField.val(),this.background.slidebackgroundFocusX.val(),this.background.slidebackgroundFocusY.val()),this.__onAfterBackgroundImageOpacityChange()},a.prototype._warnInternetExplorerUsers=function(){var e=this.__isInternetExplorer();e&&10>e&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},a.prototype.__isInternetExplorer=function(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")?parseInt(e.split("msie")[1]):!1},a.prototype.getLayout=function(){for(var i=t("#smartslider-form").serializeArray(),n={},a=0;a<i.length;a++){var s=i[a].name.match(/slide\[(.*?)\]/);s&&(n[s[1]]=i[a].value)}return delete n.generator,delete n.published,delete n.publishdates,delete n["record-start"],delete n["record-slides"],delete n.slide,n.slide=e.layerManager.getData(),n},a.prototype.loadLayout=function(i,n,a){var s=i.slide;if(delete i.slide,a?e.layerManager.loadData(s,!0):e.layerManager.loadData(s,!1),n)for(var r in i)t("#slide"+r).val(i[r]).trigger("change");i.slide=s},a.prototype.createHistory=function(){this.slideValues={},n2("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(i,n){var a=t(n),s=a.data("field"),r=a.attr("id");this.slideValues[r]=a.val(),a.on("nextendChange",t.proxy(function(){var i=a.val(),n=this.slideValues[r];this.slideValues[r]=i,e.history.add(t.proxy(function(){return[this,"slideValueChange",i,n,[a,s]]},this))},this))},this))},a.prototype.history=function(e,t,i){switch(e){case"slideValueChange":i[1].insideChange(t)}},i.SmartSliderAdminSlide=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsive=e,this.responsive.setOrientation("portrait"),this.responsive.parameters.onResizeEnabled=0,this.responsive.parameters.forceFull=0,this.responsive._getDevice=this.responsive._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=this.responsive.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),a=e.parameters.deviceModes;this.devices.desktopPortrait=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').appendTo(n),a.desktopLandscape?this.devices.desktopLandscape=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').appendTo(n):this.devices.desktopLandscape=this.devices.desktopPortrait,a.tabletPortrait?this.devices.tabletPortrait=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').appendTo(n):this.devices.tabletPortrait=this.devices.desktopPortrait,a.tabletLandscape?this.devices.tabletLandscape=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').appendTo(n):this.devices.tabletLandscape=this.devices.desktopLandscape,a.mobilePortrait?this.devices.mobilePortrait=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').appendTo(n):this.devices.mobilePortrait=this.devices.tabletPortrait,a.mobileLandscape?this.devices.mobileLandscape=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').appendTo(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),t("#n2-ss-devices").css("width",62*this.deviceOptions.length+"px"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on("click",t.proxy(this.setDeviceMode,this))},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}nextend.ssBeforeResponsive=function(){new a(this)},a.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice).addClass("n2-ss-mode-"+i.device),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},a.prototype.setDeviceMode=function(i){var n=t(i.currentTarget);if((i.ctrlKey||i.metaKey)&&e.layerManager){var a=n.data("orientation");e.layerManager.copyOrResetMode(n.data("device")+a[0].toUpperCase()+a.substr(1))}else this.responsive.setOrientation(n.data("orientation")),this.responsive.setMode(n.data("device"))},a.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},a.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");if(e.length>0){"undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.slider({range:"min",step:1,value:1,min:0,max:102}),this.responsive.sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active"));var i=e.parent(),n=t.proxy(function(e){var t=this.zoom.slider("value");this.zoom.slider("value",t+e)},this),a=null,s=t.proxy(function(e){n(e),a=setInterval(t.proxy(n,this,e),40)},this);i.find(".n2-i-minus").on({mousedown:t.proxy(s,this,-1),mouseup:function(e){console.log(e)},"mouseup mouseleave":function(){a&&(clearInterval(a),a=null)}}),i.find(".n2-i-plus").on({mousedown:t.proxy(s,this,1),"mouseup mouseleave":function(){a&&(clearInterval(a),a=null)}})}},a.prototype.sliderResize=function(e,t){this.setZoom()},a.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},a.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},a.prototype.zoomChangeFixMode=function(e,t){this.zoomChange(t.value,"fix",t)},a.prototype.zoomChangeSyncMode=function(e,t){this.zoomChange(t.value,"sync",t)},a.prototype.zoomChange=function(e,t,i){var n=1;50>e?n=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(n=1+(e-52)/50);var a=parseInt(n*this.containerWidth);switch(this.container.width(a),t){case"sync":this.responsive.doResize();break;default:this.responsive.doResize(!0)}i&&(i.handle.innerHTML=a+"px")},a.prototype.setZoom=function(){var e=this.responsive.containerElement.width()/this.containerWidth,t=50;1>e?t=(e-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:e>1&&(t=50*(e-1)+52);this.zoom.slider("value");this.zoom.slider("value",t)}}(nextend.smartSlider,n2,window),function(e,t){function i(t,i){this.element=e("#"+t),this.managerIdentifier=i,this.element.parent().on("click",e.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",e.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),NextendElement.prototype.constructor.apply(this,arguments)}function n(){i.prototype.constructor.apply(this,arguments)}i.prototype=Object.create(NextendElement.prototype),i.prototype.constructor=i,i.prototype.show=function(t){t.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),e.proxy(this.save,this))},i.prototype.clear=function(e){e.preventDefault(),e.stopPropagation(),this.val("")},i.prototype.save=function(e,t){this.val(t)},i.prototype.val=function(e){this.element.val(e),this.updateName(e),this.triggerOutsideChange()},i.prototype.insideChange=function(e){this.element.val(e),this.updateName(e),this.triggerInsideChange()},i.prototype.updateName=function(e){e=""==e?n2_("Disabled"):e.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(e)},t.NextendElementAnimationManager=i,n.prototype=Object.create(i.prototype),n.prototype.constructor=n,n.prototype.clear=function(e){e.preventDefault(),e.stopPropagation();var t=this.element.val().split("|*|");t[2]="",this.val(t.join("|*|"))},n.prototype.updateName=function(e){var t=e.split("|*|");e=t[2],e=""==e?n2_("Disabled"):e.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(e)},t.NextendElementPostAnimationManager=n}(n2,window),function(e,t){function i(t){this.status=0,this.element=e("#"+t),this.overlays=null,this.aligns=this.element.parent().parent().siblings(),this.globalPicker=e("#n2-ss-parent-linker"),this.picker=this.element.siblings(".n2-ss-layer-picker").on({click:e.proxy(this.click,this),mouseenter:e.proxy(function(){var t=this.element.val();""!=t&&e("#"+t).addClass("n2-highlight")},this),mouseleave:e.proxy(function(){var t=this.element.val();""!=t&&e("#"+t).removeClass("n2-highlight")},this)}),NextendElement.prototype.constructor.apply(this,arguments)}var n={INITIALIZED:0,UNDER_PICK_PARENT:1,UNDER_PICK_CHILD:2},a='<div class="n2-ss-picker-overlay" data-align="left" data-valign="top" /><div class="n2-ss-picker-overlay" data-align="center" data-valign="top" style="left:33%;top:0;" /><div class="n2-ss-picker-overlay" data-align="right" data-valign="top" style="left:66%;top:0;width:34%;" /><div class="n2-ss-picker-overlay" data-align="left" data-valign="middle" style="left:0;top:33%;" /><div class="n2-ss-picker-overlay" data-align="center" data-valign="middle" style="left:33%;top:33%; " /><div class="n2-ss-picker-overlay" data-align="right" data-valign="middle" style="left:66%;top:33%;width:34%;" /><div class="n2-ss-picker-overlay" data-align="left" data-valign="bottom" style="left:0;top:66%;height:34%;" /><div class="n2-ss-picker-overlay" data-align="center" data-valign="bottom" style="left:33%;top:66%;height:34%;" /><div class="n2-ss-picker-overlay" data-align="right" data-valign="bottom" style="left:66%;top:66%;width:34%;height:34%;" />';i.prototype=Object.create(NextendElement.prototype),i.prototype.constructor=i,i.prototype.click=function(t){if(this.status==n.INITIALIZED){e("body").on("mousedown.n2-ss-parent-linker",e.proxy(function(t){var i=e(t.target),n=i.parent();i.hasClass("n2-ss-picker-overlay")||n.hasClass("n2-under-pick")||this.endSelection()},this));var i=nextend.activeLayer.parent().find(".n2-ss-layer").not(nextend.activeLayer),s=function(t){i.each(function(){var n=e(this),a=n.data("layerObject");if(a.getProperty(!1,"parentid")==t){i=i.not(n);var r=a.getProperty(!1,"id");r&&""!=r&&s(r)}})},r=nextend.activeLayer.data("layerObject").getProperty(!1,"id");r&&""!=r&&s(r),i.length>0&&(this.globalPicker.addClass("n2-under-pick"),this.picker.addClass("n2-under-pick"),i.addClass("n2-ss-picking-on-layer"),this.overlays=e(a).appendTo(i),this.overlays.on("mousedown",e.proxy(function(t){var s=e(t.currentTarget),r=s.data("align"),o=s.data("valign"),l=s.parent().data("layerObject");this.status=n.UNDER_PICK_CHILD,this.overlays.remove(),i.removeClass("n2-ss-picking-on-layer"),nextend.activeLayer.addClass("n2-ss-picking-on-layer"),this.overlays=e(a).appendTo(nextend.activeLayer),this.overlays.on("mousedown",e.proxy(function(t){var i=e(t.currentTarget),n=i.data("align"),a=i.data("valign");nextend.activeLayer.removeClass("n2-ss-picking-on-layer"),nextend.activeLayer.data("layerObject").parentPicked(l,r,o,n,a),t.preventDefault(),t.stopPropagation(),this.endSelection()},this)),t.preventDefault(),t.stopPropagation()},this)),NextendEsc.add(e.proxy(function(){return this.endSelection(),!1},this)),this.status=n.UNDER_PICK_PARENT)}else this.status==n.UNDER_PICK_PARENT?(this.change(""),this.endSelection()):this.status==n.UNDER_PICK_CHILD&&(this.change(""),this.endSelection())},i.prototype.endSelection=function(){e("body").off("mousedown.n2-ss-parent-linker"),nextend.activeLayer.parent().find(".n2-ss-layer").removeClass("n2-ss-picking-on-layer"),this.globalPicker.removeClass("n2-under-pick"),this.picker.removeClass("n2-under-pick"),this.overlays&&this.overlays.remove(),this.overlays=null,this.status=n.INITIALIZED,NextendEsc.pop()},i.prototype.change=function(e){this.picker.trigger("mouseleave"),this.element.val(e).trigger("change"),this._setValue(e),this.triggerOutsideChange()},i.prototype.insideChange=function(e){this.element.val(e),this._setValue(e),this.triggerInsideChange()},i.prototype._setValue=function(e){e&&""!=e?(this.picker.addClass("n2-active"),this.aligns.css("display","")):(this.picker.removeClass("n2-active"),this.aligns.css("display","none"))},t.NextendElementLayerPicker=i}(n2,window),function(e,t){function i(t){this.element=e("#"+t),this.setAttribute(),this.element.on("nextendChange",e.proxy(this.setAttribute,this))}i.prototype.setAttribute=function(){e("#n2-admin").attr("data-slider-type",this.element.val())},t.NextendElementSliderType=i}(n2,window),function(e,t){function i(t){this.element=e("#"+t),this.area=e("#"+t+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",e.proxy(this.chooseArea,this)),NextendElement.prototype.constructor.apply(this,arguments)}i.prototype=Object.create(NextendElement.prototype),i.prototype.constructor=i,i.prototype.chooseArea=function(t){var i=parseInt(e(t.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},i.prototype.insideChange=function(e){e=parseInt(e),this.element.val(e),this.setSelected(e),this.triggerInsideChange()},i.prototype.setSelected=function(e){this.areas.removeClass("n2-active"),this.areas.eq(e-1).addClass("n2-active")},t.NextendElementSliderWidgetArea=i}(n2,window),function(e,t){function i(t){this.element=e("#"+t+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",e.proxy(this.onChange,this)),this.onChange()}i.prototype.onChange=function(){var e=this.element.val();"advanced"==e?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),this.tabs.eq(2).css("display","none"))},t.NextendElementWidgetPosition=i}(n2,window),function(e,t,i,n){"use strict";function a(){this._refreshTimeout=null,this.modal=!1,this.group=0,e.generator=this;var i=e.$currentSlideElement.data("variables");if(i){this.variables=i;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,this.button=t('<a href="#" class="n2-form-element-button n2-form-element-button-inverted n2-h5 n2-uc" style="position:absolute; left: -26px; top:50%;margin-top: -14px;font-size: 14px; padding:0; width: 28px;text-align: center;">$</a>').on("click",t.proxy(function(e){e.preventDefault(),this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#slidebackgroundVideoWebm")),this.registerField(t("#slidebackgroundVideoOgg")),this.registerField(t("#linkslidelink_0"))),this.initSlideDataRefresh()}else this.variables=null}a.prototype.fill=function(e){return e},a.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([0-9a-zA-Z_,\/\(\)]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},a.prototype.parseFunction=function(e,t,i,n,a,s){if("undefined"==typeof s){for(var r=a.split(/,(?!.*\))/),o=0;o<r.length;o++)r[o]=this.parseVariable(r[o]);return this[n].apply(this,r)}return this.parseVariable(s)},a.prototype.parseVariable=function(e){var t=e.match(/((([a-z]+)\(([0-9a-zA-Z_,\/\(\)]+)\)))/);if(t)return this.parseFunction.apply(this,t);var i=e.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(i){var n=i[3];if("undefined"==typeof n)n=0;else{var a=parseInt(n);isNaN(a)||(n=Math.max(n,1)-1)}return"undefined"!=typeof this.variables[n]&&"undefined"!=typeof this.variables[n][i[1]]?this.variables[n][i[1]]:""}return e},a.prototype.cleanhtml=function(e){return strip_tags(e,"<p><a><b><br /><br/><i>")},a.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},a.prototype.splitbychars=function(e,t,i){return e.substr(t,i)},a.prototype.splitbywords=function(e,t,i){var n=e,a=n.length,s=Math.max(0,0==t?0:n.indexOf(" ",t)),r=Math.max(0,i>a?a:n.indexOf(" ",i));return n.substr(s,r)},a.prototype.findimage=function(e,t){var i=e,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,a=[],s=null;for(t="undefined"!=typeof t?parseInt(t)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?a.push(s[2]):"undefined"!=typeof s[6]&&a.push(s[6]);return a.length?a.length>t?a[t]:a[a.length-1]:""},a.prototype.findlink=function(e,t){var i=e,n=/href=["\']?([^"\'>]+)["\']?/gi,a=[],s=null;for(t="undefined"!=typeof t?parseInt(t)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&a.push(s[1]);return a.length?a.length>t?a[t]:a[a.length-1]:""},a.prototype.removevarlink=function(e){var t=e,i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return t.replace(i,"")},a.prototype.registerField=function(e){},a.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},a.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0},n=function(){var e=i.key+"/"+i.group;return i.findImage&&(e="findimage("+e+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(e="findlink("+e+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(e="removevarlink("+e+")"),"no"!=i.filter&&(e=i.filter+"("+e+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(e=i.split+"("+e+","+i.splitStart+","+i.splitLength+")"),"{"+e+"}"},a=t('<div class="n2-generator-result-container" />'),s=function(){a.html(t("<div/>").text(e.fill(n())).html())},r=e.group,o=null,l=null,d=t('<div class="n2-generator-insert-variable"/>'),p=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(d),h=t('<div class="n2-group-container" />').appendTo(d);d.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var c=t('<div class="n2-variable-container" />').appendTo(d),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(d));d.append(NextendModal.prototype.createHeading(n2_("Result"))),a.appendTo(d),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Filter")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">'+n2_("No")+'</option><option value="cleanhtml">'+n2_("Clean HTML")+'</option><option value="removehtml">'+n2_("Remove HTML")+"</option></select></div></div></div>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Split by chars")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">'+n2_("No")+'</option><option value="splitbychars">'+n2_("Strict")+'</option><option value="splitbywords">'+n2_("Respect words")+'</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Start")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Length")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>').appendTo(u);var f=u.find("#n2-generator-function-split");f.on("change",t.proxy(function(){i.split=f.val(),s()},this));var m=u.find("#n2-generator-function-split-start");m.on("change",t.proxy(function(){i.splitStart=parseInt(m.val()),s()},this));var g=u.find("#n2-generator-function-split-length");g.on("change",t.proxy(function(){i.splitLength=parseInt(g.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find image")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>').appendTo(u);var v=u.find("#n2-generator-function-findimage");v.on("nextendChange",t.proxy(function(){i.findImage=parseInt(v.val()),s()},this));var x=u.find("#n2-generator-function-findimage-index");x.on("change",t.proxy(function(){i.findImageIndex=parseInt(x.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find link")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>').appendTo(u);var b=u.find("#n2-generator-function-findlink");b.on("nextendChange",t.proxy(function(){i.findLink=parseInt(b.val()),s()},this));var k=u.find("#n2-generator-function-findlink-index");k.on("change",t.proxy(function(){i.findLinkIndex=parseInt(k.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove links")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>').appendTo(u);var w=u.find("#n2-generator-function-removevarlink");w.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(w.val()),s()},this));var S=u.find("#n2-generator-function-removevarlink-index");S.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(S.val()),s()},this));for(var C in this.variables[0])t('<a href="#" class="n2-button n2-button-small n2-button-grey">'+C+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),o.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,C)).appendTo(c);o=c.find("a"),o.eq(0).trigger("click"),1==r&&(p.css("display","none"),h.css("display","none"));for(var _=0;r>_;_++)t('<a href="#" class="n2-button n2-button-small n2-button-grey">'+(_+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,_)).appendTo(h);l=h.find("a"),l.eq(0).trigger("click");var I=!1;this.modal=new NextendModal({zero:{size:[1e3,r>1?560:490],title:n2_("Insert variable"),back:!1,close:!0,content:d,controls:['<a href="#" class="n2-button n2-button-big n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){I||(new NextendElementOnoff("n2-generator-function-findimage"),new NextendElementOnoff("n2-generator-function-findlink"),new NextendElementOnoff("n2-generator-function-removevarlink"),I=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},a.prototype.showModal=function(){this.getModal().show()},a.prototype.insert=function(e){this.activeField.val(e).trigger("change")},a.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},a.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},a.prototype._refresh=function(){for(var t=e.layerManager.layerList,i=0;i<t.length;i++)for(var n=t[i].items,a=0;a<n.length;a++)n[a].reRender()},i.SmartSliderAdminGenerator=a}(nextend.smartSlider,n2,window),function(e,t,i){function n(t){this.ajaxUrl=t,e("#generatorrecord-viewer").on("click",e.proxy(this.showRecords,this))}n.prototype.showRecords=function(t){t.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:e("#smartslider-form").serialize(),dataType:"json"}).done(function(e){var t=new NextendModal({zero:{size:[1300,700],title:"Records",content:e.data.html}},!0);t.content.css("overflow","auto")}).error(function(e){if(200==e.status){var t=new NextendModal({zero:{size:[1300,700],title:"Response",content:e.responseText}},!0);t.content.css("overflow","auto")}})},t.NextendSmartSliderGeneratorRecords=n}(n2,window),function(e,t,i,n){function a(e,a,s,r){this.item=e,this.layer=a,this.itemEditor=s,this.type=this.item.data("item"),this.values=this.item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),
3
+ i["NextendSmartSliderItemParser_"+this.type]!==n?this.parser=new i["NextendSmartSliderItemParser_"+this.type](this):this.parser=new i.NextendSmartSliderItemParser(this),this.item.data("item",this),"undefined"!=typeof r&&(0==this.layer.items.length||this.layer.items.length<=r?this.item.appendTo(this.layer.layer):this.layer.items[r].item.before(this.item)),"undefined"==typeof r||0==this.layer.items.length||this.layer.items.length<=r?this.layer.items.push(this):this.layer.items.splice(r,0,this),0===this.item.children().length&&this.reRender(),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.item),t(window).trigger("ItemCreated")}a.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},a.prototype.activate=function(e,t){this.itemEditor.setActiveItem(this,t)},a.prototype.deActivate=function(){},a.prototype.render=function(e,i,n){this.layer.layer.triggerHandler("itemRender"),this.item.html(this.parser.render(e,i)),this.values=n,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.item);var a=this.parser.getName(i);a=a===!1?this.type:a.replace(/[<> ]/gi,""),this.layer.rename(a,!1),this.layer.update()},a.prototype.reRender=function(e){var i={},n=this.itemEditor,a=n.getItemType(this.type),s=a.template;for(var r in this.values)i[r]=this.values[r];i=t.extend({},this.parser.getDefault(),i,e);var o=t.extend({},i);this.parser.parseAll(i,this),this.values=o;for(var l in i){var d=new RegExp("\\{"+l+"\\}","g");s=s.replace(d,i[l])}this.render(t(s),i,this.values)},a.prototype.duplicate=function(){this.layer.addItem(this.getHTML(),!0)},a.prototype["delete"]=function(){this.item.trigger("mouseleave"),this.item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},a.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},a.prototype.getData=function(){return{type:this.type,values:this.values}},a.prototype.history=function(e,i,n){switch(e){case"updateCurrentItem":this.reRender(t.extend(!0,{},i)),this.values=i,this.itemEditor.setActiveItem(this,!0)}},i.NextendSmartSliderItem=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(e){this.suppressChange=!1,this.activeItemOriginalData=null,this.layerEditor=e,this._initInstalledItems(),this.form={},this.activeForm={form:t("<div></div>")}}a.prototype.setActiveItem=function(e,i){if(e!=this.activeItem||i){this.activeItemOriginalData=null;var n=e.type,a=e.values;this.activeForm.form.css("display","none"),this.activeForm=this.getItemType(n),this.activeItem&&this.activeItem.deActivate(),this.activeItem=e,this.suppressChange=!0;for(var s in a){var r=t("#item_"+n+s).data("field");r&&r.insideChange(a[s])}this.suppressChange=!1,this.activeForm.form.css("display","block")}},a.prototype._initInstalledItems=function(){t("#n2-ss-item-container .n2-ss-core-item").on("click",t.proxy(function(e){this.createLayerItem(t(e.currentTarget).data("item"))},this))},a.prototype.createLayerItem=function(n){var a=this.getItemType(n),s=this.layerEditor.createLayer(t(".n2-ss-core-item-"+n).data("layerproperties")),r=t("<div></div>").data("item",n).data("itemvalues",t.extend(!0,{},a.values)).addClass("n2-ss-item n2-ss-item-"+n),o=new i.NextendSmartSliderItem(r,s,this,0);return s.activate(),e.sidebarManager.switchTab(0),e.history.add(t.proxy(function(){return[this,"createLayer","create","delete",[o,n]]},this)),o},a.prototype.getItemType=function(e){if(this.form[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),a={form:i,template:i.data("itemtemplate"),values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};a.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.form[e]=a}return this.form[e]},a.prototype.updateCurrentItem=function(i){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},a={},s=this.form[this.activeItem.type],r=s.template,o=this.activeItem.parser;s.fields.each(t.proxy(function(e,i){var i=t(i),r=i.attr("name").match(s.fieldNameRegexp)[1];a[r]=n[r]=i.val()},this)),n=t.extend({},o.getDefault(),n),o.parseAll(n,this.activeItem);for(var l in n){var d=new RegExp("\\{"+l+"\\}","g");r=r.replace(d,n[l])}i&&"nextendChange"==i.type&&(e.history.add(t.proxy(function(){return[this.activeItem,"updateCurrentItem",t.extend({},a),this.activeItemOriginalData,[]]},this)),this.activeItemOriginalData=null),this.activeItem.render(t(r),n,a)}},a.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(e){this.updateCurrentItem(e)},100),a.prototype.history=function(t,i,n){switch(t){case"createLayer":switch(i){case"delete":n[0].layer["delete"]();break;case"create":var a=this.createLayerItem(n[1]);e.history.changeFuture(n[0].layer,a.layer),e.history.changeFuture(n[0],a)}}},i.NextendSmartSliderItemManager=a}(nextend.smartSlider,n2,window),function(e,t,i){function n(e){this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.item=e,this.fonts=[],this.styles=[],this.needFill=[],this.added()}n.prototype.getDefault=function(){return{}},n.prototype.added=function(){},n.prototype.addedFont=function(t,i){this.fonts.push({mode:t,name:i}),e.when(nextend.fontManager.addVisualUsage(t,this.item.values[i],this.pre)).done(e.proxy(function(e){e||this.item.changeValue(i,"")},this))},n.prototype.addedStyle=function(t,i){this.styles.push({mode:t,name:i}),e.when(nextend.styleManager.addVisualUsage(t,this.item.values[i],this.pre)).done(e.proxy(function(e){e||this.item.changeValue(i,"")},this))},n.prototype.parseAll=function(e,t){for(var i=0;i<this.fonts.length;i++)e[this.fonts[i].name+"class"]=nextend.fontManager.getClass(e[this.fonts[i].name],this.fonts[i].mode)+" ";for(var i=0;i<this.styles.length;i++)e[this.styles[i].name+"class"]=nextend.styleManager.getClass(e[this.styles[i].name],this.styles[i].mode)+" ";for(var i=0;i<this.needFill.length;i++)e[this.needFill[i]]=nextend.smartSlider.generator.fill(e[this.needFill[i]])},n.prototype.render=function(e,t){return e},n.prototype.getName=function(e){return!1},n.prototype.resizeLayerToImage=function(t,i){e("<img/>").attr("src",i).load(function(){var e=t.layer.layerEditor.slideSize,i=e.width,n=e.height;if(this.width>0&&this.height>0){if(i=parseInt(Math.min(this.width,i)),n=parseInt(Math.min(this.height,n)),nextend.smartSlider.history.off(),e.width/e.height<=i/n)t.layer.setProperty("width",i),t.layer.setProperty("height",this.height*i/this.width);else{var a=Math.min(this.width*e.height/this.height,i);t.layer.setProperty("width",a),t.layer.setProperty("height",this.height*a/this.width)}nextend.smartSlider.history.on()}})},n.prototype.fitLayer=function(e){return!1},t.NextendSmartSliderItemParser=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.added=function(){this.needFill=["content","url"],this.addedFont("link","font"),this.addedStyle("button","style"),nextend.smartSlider.generator.registerField(e("#item_buttoncontent")),nextend.smartSlider.generator.registerField(e("#linkitem_buttonlink_0"))},n.prototype.getName=function(e){return e.content},n.prototype.parseAll=function(e){var t=e.link.split("|*|");e.url=t[0],e.target=t[1],delete e.link,0|e.fullwidth?e.display="block;":e.display="inline-block;",e.extrastyle=0|e.nowrap?"white-space: nowrap;":"",NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments)},t.NextendSmartSliderItemParser_button=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return{link:"#|*|_self",font:"",style:""}},n.prototype.added=function(){this.needFill=["heading","url"],this.addedFont("hover","font"),this.addedStyle("heading","style"),nextend.smartSlider.generator.registerField(e("#item_headingheading")),nextend.smartSlider.generator.registerField(e("#linkitem_headinglink_0"))},n.prototype.getName=function(e){return e.heading},n.prototype.parseAll=function(t){t.uid=e.fn.uid();var i=t.link.split("|*|");t.url=i[0],t.target=i[1],delete t.link,0|t.fullwidth?t.display="block;":t.display="inline-block;",t.extrastyle=0|t.nowrap?"white-space: nowrap;":"",t.heading=e("<div>"+t.heading+"</div>").text().replace(/\n/g,"<br />"),t.priority=2,t["class"]="",NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments),"#"==t.url?t.afontclass="":(t.afontclass=t.fontclass,t.fontclass="")},n.prototype.render=function(e,t){if("#"==t.url){var i=e.find("a");i.parent().html(i.html())}return e},t.NextendSmartSliderItemParser_heading=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return{size:"100%|*|auto",link:"#|*|_self",style:""}},n.prototype.added=function(){this.needFill=["image","url"],this.addedStyle("box","style"),nextend.smartSlider.generator.registerField(e("#item_imageimage")),nextend.smartSlider.generator.registerField(e("#item_imagealt")),nextend.smartSlider.generator.registerField(e("#item_imagetitle")),nextend.smartSlider.generator.registerField(e("#linkitem_imagelink_0"))},n.prototype.getName=function(e){return e.image.split("/").pop()},n.prototype.parseAll=function(e,t){var i=e.size.split("|*|");e.width=i[0],e.height=i[1],delete e.size;var n=e.link.split("|*|");e.url=n[0],e.target=n[1],delete e.link,NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments),t&&"$system$/images/placeholder/image.png"==t.values.image&&e.image!=t.values.image?(e.image=nextend.imageHelper.fixed(e.image),this.resizeLayerToImage(t,e.image)):e.image=nextend.imageHelper.fixed(e.image)},n.prototype.fitLayer=function(e){return this.resizeLayerToImage(e,nextend.imageHelper.fixed(e.values.image)),!0},n.prototype.render=function(e,t){return"#"==t.url&&e.html(e.children("a").html()),e},t.NextendSmartSliderItemParser_image=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}function a(e){var t=!1,i=!1,n="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary";return-1!==e.indexOf("<object")&&(e=e.replace(/<object[\s\S]+?<\/object>/g,function(e){return e.replace(/[\r\n]+/g,"")})),e=e.replace(/<[^<>]+>/g,function(e){return e.replace(/[\r\n]+/g," ")}),-1===e.indexOf("<pre")&&-1===e.indexOf("<script")||(t=!0,e=e.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g,function(e){return e.replace(/(\r\n|\n)/g,"<wp-line-break>")})),-1!==e.indexOf("[caption")&&(i=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(e){return e=e.replace(/<br([^>]*)>/g,"<wp-temp-br$1>"),e=e.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(e){return e.replace(/[\r\n\t]+/," ")}),e.replace(/\s*\n\s*/g,"<wp-temp-br />")})),e+="\n\n",e=e.replace(/<br \/>\s*<br \/>/gi,"\n\n"),e=e.replace(new RegExp("(<(?:"+n+")(?: [^>]*)?>)","gi"),"\n$1"),e=e.replace(new RegExp("(</(?:"+n+")>)","gi"),"$1\n\n"),e=e.replace(/<hr( [^>]*)?>/gi,"<hr$1>\n\n"),e=e.replace(/\r\n|\r/g,"\n"),e=e.replace(/\n\s*\n+/g,"\n\n"),e=e.replace(/([\s\S]+?)\n\n/g,"<p>$1</p>\n"),e=e.replace(/<p>\s*?<\/p>/gi,""),e=e.replace(new RegExp("<p>\\s*(</?(?:"+n+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),e=e.replace(/<p>(<li.+?)<\/p>/gi,"$1"),e=e.replace(/<p>\s*<blockquote([^>]*)>/gi,"<blockquote$1><p>"),e=e.replace(/<\/blockquote>\s*<\/p>/gi,"</p></blockquote>"),e=e.replace(new RegExp("<p>\\s*(</?(?:"+n+")(?: [^>]*)?>)","gi"),"$1"),e=e.replace(new RegExp("(</?(?:"+n+")(?: [^>]*)?>)\\s*</p>","gi"),"$1"),e=e.replace(/\s*\n/gi,"<br />\n"),e=e.replace(new RegExp("(</?(?:"+n+")[^>]*>)\\s*<br />","gi"),"$1"),e=e.replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1"),e=e.replace(/(?:<p>|<br ?\/?>)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|<br ?\/?>)*/gi,"[caption$1[/caption]"),e=e.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,t,i){return i.match(/<p( [^>]*)?>/)?e:t+"<p>"+i+"</p>"}),t&&(e=e.replace(/<wp-line-break>/g,"\n")),i&&(e=e.replace(/<wp-temp-br([^>]*)>/g,"<br$1>")),e}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return{contentmobile:"",contenttablet:"",font:"",style:""}},n.prototype.added=function(){this.needFill=["content","contenttablet","contentmobile"],this.addedFont("paragraph","font"),this.addedStyle("heading","style"),nextend.smartSlider.generator.registerField(e("#item_textcontent")),nextend.smartSlider.generator.registerField(e("#item_textcontenttablet")),nextend.smartSlider.generator.registerField(e("#item_textcontentmobile"))},n.prototype.getName=function(e){return e.content},n.prototype.parseAll=function(e){NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments),e.p=a(e.content),e.ptablet=a(e.contenttablet),e.pmobile=a(e.contentmobile)},n.prototype.render=function(e,t){return""==t.contenttablet&&(e=e.filter(":not(.n2-ss-tablet)"),e.filter(".n2-ss-desktop").addClass("n2-ss-tablet")),""==t.contentmobile&&(e=e.filter(":not(.n2-ss-mobile)"),e.filter(".n2-ss-tablet, .n2-ss-desktop").last().addClass("n2-ss-mobile")),e.find("p").addClass(t.fontclass+" "+t.styleclass),e.find("a").on("click",function(e){e.preventDefault()}),e},t.NextendSmartSliderItemParser_text=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.added=function(){this.needFill=["vimeourl"],nextend.smartSlider.generator.registerField(e("#item_vimeovimeourl"))},n.prototype.getName=function(e){return e.vimeourl},n.prototype.parseAll=function(t,i){var n=i.values.vimeourl!=t.vimeourl;if(NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments),""==t.image&&(t.image="$system$/images/placeholder/video.png"),t.image=nextend.imageHelper.fixed(t.image),n&&""!=t.vimeourl){var a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,s=t.vimeourl.match(a),r=!1;s?r=s[3]:t.vimeourl.match(/^[0-9]+$/)&&(r=t.vimeourl),r?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+encodeURI(r)+".json").done(e.proxy(function(t){e("#item_vimeoimage").val(t[0].thumbnail_large).trigger("change")},this)).fail(function(e){nextend.notificationCenter.error(e.responseText)}):nextend.notificationCenter.error("The provided URL does not match any known Vimeo url or code!")}},n.prototype.fitLayer=function(e){return!0},t.NextendSmartSliderItemParser_vimeo=n}(n2,window),function(e,t,i){function n(){NextendSmartSliderItemParser.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderItemParser.prototype),n.prototype.constructor=n,n.prototype.added=function(){this.needFill=["youtubeurl"],nextend.smartSlider.generator.registerField(e("#item_youtubeyoutubeurl")),nextend.smartSlider.generator.registerField(e("#item_youtubestart"))},n.prototype.getName=function(e){return e.youtubeurl},n.prototype.parseAll=function(t,i){var n=i.values.youtubeurl!=t.youtubeurl;if(NextendSmartSliderItemParser.prototype.parseAll.apply(this,arguments),""==t.image&&(t.image="$system$/images/placeholder/video.png"),t.image=nextend.imageHelper.fixed(t.image),n){var a=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,s=t.youtubeurl.match(a);s?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(s[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(e.proxy(function(t){if(t.items.length){var i=t.items[0].snippet.thumbnails,n=i.maxres||i.standard||i.high||i.medium||i["default"];e("#item_youtubeimage").val(n.url).trigger("change")}},this)).fail(function(e){nextend.notificationCenter.error(e.error.errors[0].message)}):nextend.notificationCenter.error("The provided URL does not match any known YouTube url or code!")}},n.prototype.fitLayer=function(e){return!0},t.NextendSmartSliderItemParser_youtube=n}(n2,window),function(e,t,i,n){"use strict";function a(e,i,n){this.$=t(this),this.animations=e,this.group=i,this.data=n,this.row=t('<li class="n2-ss-animation-row"></li>').data("animation",this);var a=t('<div class="n2-ss-animation-title"></div>').appendTo(this.row);this.label=t("<span>"+this.data.name+"</span>").appendTo(a);t('<div class="n2-actions"></div>').append(t('<a onclick="return false;" href="#"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></a>').on("click",t.proxy(this["delete"],this))).appendTo(a)}a.prototype.getRow=function(){return this.row},a.prototype.edit=function(){this.animations.edit(this.group,this.animations[this.group+"Rows"].index(this.row))},a.prototype.save=function(e){e!==!1&&(this.data=e,this.label.html(e.name),this.$.trigger("animationChanged"))},a.prototype["delete"]=function(t){t&&t.stopPropagation(),this.row.remove(),this.animations.removeAnimation(this),e.layerAnimationManager.update(this.group),this.$.trigger("animationDeleted")},a.prototype.setDelay=function(e){this.data.delay=e},a.prototype.setDuration=function(e){this.data.duration=e},i.NextendSmartSliderLayerAnimation=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(t){this.layerEditor=t,this.createGroup("in",n2_("in"),"#layer-animation-chain-in"),this.lists=this["in"].list,this.createGroup("loop",n2_("loop"),"#layer-animation-chain-loop"),this.createGroup("out",n2_("out"),"#layer-animation-chain-out"),this.lists=this.lists.add(this.loop.list).add(this.out.list),e.layerAnimationManager=this}a.prototype.createGroup=function(e,i,n){n=t(n);var a=t('<div class="n2-sidebar-row n2-sidebar-header-bg n2-form-dark n2-sets-header"><div class="n2-table"><div class="n2-tr"><div class="n2-td"><div class="n2-h3 n2-uc">'+i+'</div></div><div style="text-align: '+(nextend.isRTL()?"left":"right")+';" class="n2-td"></div></div></div></div>').appendTo(n),s=a.find(".n2-td").eq(1);this[e]={container:n,header:a,list:t('<ul class="n2-list n2-h4 n2-list-orderable n2-ss-animation-list"></ul>').on("click",t.proxy(this.editGroup,this,e)).data("group",e).appendTo(n),add:this.getAddButton(e,n2_("Add")).appendTo(s),clear:this.getClearButton(e).appendTo(s)}},a.prototype.getAddButton=function(e,i){var n=t('<a href="#" class="n2-button n2-button-medium n2-button-green n2-h5 n2-uc">'+i+"</a>").on("click",t.proxy(this.createAnimation,this,e));return n},a.prototype.getClearButton=function(e){var i=t('<a href="#" class="n2-button n2-button-medium n2-button-grey n2-h5 n2-uc">'+n2_("Clear")+"</a>").on("click",t.proxy(this.clear,this,e));return i},a.prototype.getActiveLayer=function(){return this.layerEditor.layerList[this.layerEditor.activeLayerIndex]},a.prototype.editGroup=function(e,i){var n=0;if(i&&(i.preventDefault(),n=t(i.target).closest(".n2-ss-animation-row").index()),-1!=n){var a=this.getActiveLayer().animation;a.edit(e,n)}},a.prototype.clear=function(e,t){t&&t.preventDefault(),this.getActiveLayer().animation.clear(e)},a.prototype.createAnimation=function(e,i){i&&i.preventDefault();var n=this.getActiveLayer(),a=n.layer,s=nextend.animationManager;s.controller.setPreviewSize(a.width(),a.height()).setGroup(e);var r={repeatable:1};"in"==e?(r.specialZero=1,r.playEvent=1,s.changeSetById(1e3),s.setTitle(n2_("In animation"))):"loop"==e?(r.repeat=1,r.playEvent=1,r.pauseEvent=1,r.stopEvent=1,s.changeSetById(1200),s.setTitle(n2_("Loop animation"))):"out"==e&&(r.playEvent=1,r.instantOut=1,s.changeSetById(1e3),s.setTitle(n2_("Out animation"))),s.show(r,{animations:[],transformOrigin:"50|*|50|*|0",specialZero:n.animation.data.specialZero,repeatCount:n.animation.data.repeatCount,repeatDelay:n.animation.data.repeatDelay,playEvent:"",pauseEvent:"",stopEvent:"",repeatable:n.animation.data.repeatable,instantOut:n.animation.data.instantOut},t.proxy(this.storeNewAnimation,this,e),{previewMode:!1,previewHTML:!1})},a.prototype.storeNewAnimation=function(e,i,n){if(n.animations.length>0){var a=this.getActiveLayer().animation;a.setTransformOrigin(e,n.transformOrigin),a.setRepeatable(n.repeatable),"in"==e?(a.setSpecialZero(e,n.specialZero),a.setEvent(e,"PlayEvent",n.playEvent)):"loop"==e?(a.setRepeatCount(e,n.repeatCount),a.setRepeatStartDelay(e,n.repeatStartDelay),a.setEvent(e,"PlayEvent",n.playEvent),a.setEvent(e,"PauseEvent",n.pauseEvent),a.setEvent(e,"StopEvent",n.stopEvent)):"out"==e&&(a.setEvent(e,"PlayEvent",n.playEvent),a.setInstantOut(n.instantOut));for(var s=0;s<n.animations.length;s++)a.addAnimation(e,n.animations[s]);this.update(e),t(window).triggerHandler("AnimationAdded")}this.update(e)},a.prototype.activateAnimations=function(e){e.inRows.prependTo(this["in"].list),e.loopRows.prependTo(this.loop.list),e.outRows.prependTo(this.out.list),this.update("in"),this.update("loop"),this.update("out")},a.prototype.update=function(e){this[e].list.children().length?(this[e].add.css("display","none"),this[e].clear.css("display","")):(this[e].add.css("display",""),this[e].clear.css("display","none"))},i.NextendSmartSliderLayerAnimationManager=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(e){this._loaded=!1,this.active=!1,this.layer=e,this.data=null,e.layer.data("adminLayerAnimations",this),this.inRows=t(),this.loopRows=t(),this.outRows=t()}var s={repeatable:0,"in":[],specialZeroIn:0,transformOriginIn:"50|*|50|*|0",inPlayEvent:"",loop:[],repeatCount:0,repeatStartDelay:0,transformOriginLoop:"50|*|50|*|0",loopPlayEvent:"",loopPauseEvent:"",loopStopEvent:"",out:[],transformOriginOut:"50|*|50|*|0",outPlayEvent:"",instantOut:1};a.prototype.deActivate=function(){this.active=!1,this.inRows.detach(),this.loopRows.detach(),this.outRows.detach()},a.prototype.activate=function(){this.active=!0,e.layerAnimationManager.activateAnimations(this)},a.prototype.addAnimation=function(t,i){var n=new NextendSmartSliderLayerAnimation(this,t,i),a=n.getRow();this[t+"Rows"]=this[t+"Rows"].add(a),this.active&&a.appendTo(e.layerAnimationManager[t].list),this.layer.$.trigger("layerAnimationAdded",[t,n])},a.prototype.removeAnimation=function(e){var t=e.group;this[t+"Rows"]=this[t+"Rows"].not(e.row)},a.prototype.clearAll=function(){this._startHistory(),this._clear("in"),this._clear("loop"),this._clear("out"),this._endHistory()},a.prototype.clear=function(e){this._startHistory(),this._clear(e),this._endHistory()},a.prototype._clear=function(e){for(var t=this[e+"Rows"],i=0;i<t.length;i++)t.eq(i).data("animation")["delete"]()},a.prototype.getCurrentData=function(e){for(var t=[],i=0;i<this[e+"Rows"].length;i++)t.push(this[e+"Rows"].eq(i).data("animation").data);var n={animations:t,transformOrigin:this.data["transformOrigin"+this.ucfirst(e)],repeatable:this.data.repeatable};return"in"==e?(n.specialZero=this.data.specialZeroIn,n.playEvent=this.data.inPlayEvent):"loop"==e?(n.repeatCount=this.data.repeatCount,n.repeatStartDelay=this.data.repeatStartDelay,n.playEvent=this.data.loopPlayEvent,n.pauseEvent=this.data.loopPauseEvent,n.stopEvent=this.data.loopStopEvent):"out"==e&&(n.playEvent=this.data.outPlayEvent,n.instantOut=this.data.instantOut),n},a.prototype.edit=function(e,i){for(var n=[],a=0;a<this[e+"Rows"].length;a++)n.push(this[e+"Rows"].eq(a).data("animation").data);var s=nextend.animationManager;s.controller.setPreviewSize(this.layer.layer.width(),this.layer.layer.height()).setGroup(e);var r={repeatable:1},o={animations:n,transformOrigin:this.data["transformOrigin"+this.ucfirst(e)],repeatable:this.data.repeatable};"in"==e?(r.specialZero=1,o.specialZero=this.data.specialZeroIn,r.playEvent=1,o.playEvent=this.data.inPlayEvent,s.changeSetById(1e3),s.setTitle(n2_("In animation"))):"loop"==e?(r.repeat=1,o.repeatCount=this.data.repeatCount,o.repeatStartDelay=this.data.repeatStartDelay,r.playEvent=1,o.playEvent=this.data.loopPlayEvent,r.pauseEvent=1,o.pauseEvent=this.data.loopPauseEvent,r.stopEvent=1,o.stopEvent=this.data.loopStopEvent,s.changeSetById(1200),s.setTitle(n2_("Loop animation"))):"out"==e&&(r.playEvent=1,r.instantOut=1,o.playEvent=this.data.outPlayEvent,o.instantOut=this.data.instantOut,s.changeSetById(1e3),s.setTitle(n2_("Out animation"))),s.show(r,o,t.proxy(this.storeAnimations,this,e,o),{previewMode:!1,previewHTML:!1}),i>0&&s.controller.tabField.options.eq(i).trigger("click")},a.prototype.storeAnimations=function(i,n,a,s){e.history.add(t.proxy(function(){return[this.layer,"storeAnimations",t.extend(!0,{},s),t.extend(!0,{},n),[i]]},this));var r=0,o=this[i+"Rows"];for(this.setTransformOrigin(i,s.transformOrigin),this.setRepeatable(s.repeatable),"in"==i?(this.setSpecialZero(i,s.specialZero),this.setEvent(i,"PlayEvent",s.playEvent)):"loop"==i?(this.setRepeatCount(i,s.repeatCount),this.setRepeatStartDelay(i,s.repeatStartDelay),this.setEvent(i,"PlayEvent",s.playEvent),this.setEvent(i,"PauseEvent",s.pauseEvent),this.setEvent(i,"StopEvent",s.stopEvent)):"out"==i&&(this.setEvent(i,"PlayEvent",s.playEvent),this.setInstantOut(s.instantOut));r<s.animations.length&&r<o.length;r++)o.eq(r).data("animation").save(s.animations[r]);for(;r<s.animations.length;r++)this.addAnimation(i,s.animations[r]);for(;r<o.length;r++)o.eq(r).data("animation")["delete"]();e.layerAnimationManager.update(i)},a.prototype.load=function(){if(this._loaded===!1){var e=this.layer.layer.data("animations");this.data={},t.extend(this.data,s),"undefined"!=typeof e&&t.extend(this.data,t.parseJSON(Base64.decode(e))),this._load("in"),this._load("loop"),this._load("out"),this._loaded=!0}},a.prototype._load=function(e){if("undefined"!=typeof this.data[e]){for(var t=0;t<this.data[e].length;t++)this.addAnimation(e,this.data[e][t]);delete this.data[e]}},a.prototype.getAnimationsCode=function(){if(this._loaded===!1)return this.layer.layer.data("animations");for(var e=t.extend({},this.data,{"in":[],loop:[],out:[]}),i=0;i<this.inRows.length;i++){var n=this.inRows.eq(i).data("animation");e["in"].push(n.data)}for(var i=0;i<this.loopRows.length;i++){var n=this.loopRows.eq(i).data("animation");e.loop.push(n.data)}for(var i=0;i<this.outRows.length;i++){var n=this.outRows.eq(i).data("animation");e.out.push(n.data)}return Base64.encode(JSON.stringify(e))},a.prototype._startHistory=function(){this._oldData={"in":t.extend(!0,{},this.getCurrentData("in")),loop:t.extend(!0,{},this.getCurrentData("loop")),out:t.extend(!0,{},this.getCurrentData("out"))}},a.prototype._endHistory=function(){var i={"in":this.getCurrentData("in"),loop:this.getCurrentData("loop"),out:this.getCurrentData("out")};for(var n in i)e.history.add(t.proxy(function(){return[this.layer,"storeAnimations",t.extend(!0,{},i[n]),t.extend(!0,{},this._oldData[n]),[n]]},this));this._oldData=null},a.prototype.loadData=function(e){this._startHistory(),this._clear("in"),this._clear("loop"),this._clear("out"),this.data={},t.extend(this.data,s),t.extend(this.data,e),this._load("in"),this._load("loop"),this._load("out"),this._endHistory()},a.prototype.getData=function(){for(var e=t.extend({},this.data,{"in":[],loop:[],out:[]}),i=0;i<this.inRows.length;i++){var n=this.inRows.eq(i).data("animation");e["in"].push(t.extend(!0,{},n.data))}for(var i=0;i<this.loopRows.length;i++){var n=this.loopRows.eq(i).data("animation");e.loop.push(t.extend(!0,{},n.data))}for(var i=0;i<this.outRows.length;i++){var n=this.outRows.eq(i).data("animation");e.out.push(t.extend(!0,{},n.data))}return e},a.prototype.setSpecialZero=function(e,t){t=parseInt(t)?1:0,t!=this.data["transformOrigin"+this.ucfirst(e)]&&(this.data.specialZeroIn=t,this.layer.$.trigger("layerAnimationSpecialZeroInChanged"))},a.prototype.setRepeatCount=function(e,t){this.data.repeatCount=t},a.prototype.setRepeatStartDelay=function(e,t){this.data.repeatStartDelay=t},a.prototype.setEvent=function(e,t,i){this.data[e+t]=i},a.prototype.setTransformOrigin=function(e,t){this.data["transformOrigin"+this.ucfirst(e)]=t},a.prototype.setRepeatable=function(e){this.data.repeatable=parseInt(e)?1:0},a.prototype.setInstantOut=function(e){this.data.instantOut=parseInt(e)?1:0},a.prototype.ucfirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},i.NextendSmartSliderLayerAnimations=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(e,i,n,a){if(this.isDeleted=!1,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.doThrottledTheResize=this.doTheResize,this.eye=!1,this.lock=!1,this.parent=!1,this.parentIsVisible=!0,this.$=t(this),this.layerEditor=e,this.timelineLayer=null,i){this.property={id:i.attr("id"),"class":i.data("class"),parentid:i.data("parentid"),parentalign:i.data("desktopportraitparentalign"),parentvalign:i.data("desktopportraitparentvalign"),name:i.data("name")+"",nameSynced:i.data("namesynced"),crop:i.data("crop"),inneralign:i.data("inneralign"),parallax:i.data("parallax"),align:i.data("desktopportraitalign"),valign:i.data("desktopportraitvalign"),fontsize:i.data("desktopportraitfontsize"),adaptivefont:i.data("adaptivefont"),desktopPortrait:parseFloat(i.data("desktopportrait")),desktopLandscape:parseFloat(i.data("desktoplandscape")),tabletPortrait:parseFloat(i.data("tabletportrait")),tabletLandscape:parseFloat(i.data("tabletlandscape")),mobilePortrait:parseFloat(i.data("mobileportrait")),mobileLandscape:parseFloat(i.data("mobilelandscape")),left:parseInt(i.data("desktopportraitleft")),top:parseInt(i.data("desktopportraittop")),responsiveposition:parseInt(i.data("responsiveposition")),responsivesize:parseInt(i.data("responsivesize")),mouseenter:i.data("mouseenter"),click:i.data("click"),mouseleave:i.data("mouseleave"),play:i.data("play"),pause:i.data("pause"),stop:i.data("stop")};var s=i.data("desktopportraitwidth");this.isDimensionPropertyAccepted(s)?this.property.width=s:this.property.width=parseInt(s);var r=i.data("desktopportraitheight");this.isDimensionPropertyAccepted(r)?this.property.height=r:this.property.height=parseInt(r)}else i=t('<div class="n2-ss-layer" style="z-index: '+e.zIndexList.length+';"></div>').appendTo(e.layerContainerElement),this.property=t.extend({id:null,"class":"",parentid:null,parentalign:"center",parentvalign:"middle",name:"New layer",nameSynced:1,crop:"visible",inneralign:"left",parallax:0,align:"center",valign:"middle",fontsize:100,adaptivefont:0,desktopPortrait:1,desktopLandscape:1,tabletPortrait:1,tabletLandscape:1,mobilePortrait:1,mobileLandscape:1,left:0,top:0,responsiveposition:1,width:"auto",height:"auto",responsivesize:1,mouseenter:o,click:o,mouseleave:o,play:o,pause:o,stop:o},a);this.property.id||(this.property.id=null),this.subscribeParentCallbacks={},this.property.parentid?this.subscribeParent():this.property.parentid=null,this.property.parentalign||(this.property.parentalign="center"),this.property.parentvalign||(this.property.parentvalign="middle"),"undefined"==typeof this.property.nameSynced&&(this.property.nameSynced=1),"undefined"==typeof this.property.responsiveposition&&(this.property.responsiveposition=1),"undefined"==typeof this.property.responsivesize&&(this.property.responsivesize=1),this.property.inneralign||(this.property.inneralign="left"),this.property.crop||(this.property.crop="visible"),this.property.parallax||(this.property.parallax=0),"undefined"==typeof this.property.fontsize&&(this.property.fontsize=100),"undefined"==typeof this.property.adaptivefont&&(this.property.adaptivefont=0),this.property.align||(this.property.align="left"),this.property.valign||(this.property.valign="top"),i.attr("data-align",this.property.align),i.attr("data-valign",this.property.valign),this.layer=i.data("layerObject",this),this.layer.css("visibility","hidden"),
4
+ this.zIndex=parseInt(this.layer.css("zIndex")),isNaN(this.zIndex)&&(this.zIndex=0);var l=i.data("eye"),d=i.data("lock");null!==l&&"undefined"!=typeof l&&(this.eye=!!l),null!==d&&"undefined"!=typeof d&&(this.lock=!!d),this.deviceProperty={desktopPortrait:{left:this.property.left,top:this.property.top,width:this.property.width,height:this.property.height,align:this.property.align,valign:this.property.valign,parentalign:this.property.parentalign,parentvalign:this.property.parentvalign,fontsize:this.property.fontsize},desktopLandscape:{left:i.data("desktoplandscapeleft"),top:i.data("desktoplandscapetop"),width:i.data("desktoplandscapewidth"),height:i.data("desktoplandscapeheight"),align:i.data("desktoplandscapealign"),valign:i.data("desktoplandscapevalign"),parentalign:i.data("desktoplandscapeparentalign"),parentvalign:i.data("desktoplandscapeparentvalign"),fontsize:i.data("desktoplandscapefontsize")},tabletPortrait:{left:i.data("tabletportraitleft"),top:i.data("tabletportraittop"),width:i.data("tabletportraitwidth"),height:i.data("tabletportraitheight"),align:i.data("tabletportraitalign"),valign:i.data("tabletportraitvalign"),parentalign:i.data("tabletportraitparentalign"),parentvalign:i.data("tabletportraitparentvalign"),fontsize:i.data("tabletportraitfontsize")},tabletLandscape:{left:i.data("tabletlandscapeleft"),top:i.data("tabletlandscapetop"),width:i.data("tabletlandscapewidth"),height:i.data("tabletlandscapeheight"),align:i.data("tabletlandscapealign"),valign:i.data("tabletlandscapevalign"),parentalign:i.data("tabletlandscapeparentalign"),parentvalign:i.data("tabletlandscapeparentvalign"),fontsize:i.data("tabletlandscapefontsize")},mobilePortrait:{left:i.data("mobileportraitleft"),top:i.data("mobileportraittop"),width:i.data("mobileportraitwidth"),height:i.data("mobileportraitheight"),align:i.data("mobileportraitalign"),valign:i.data("mobileportraitvalign"),parentalign:i.data("mobileportraitparentalign"),parentvalign:i.data("mobileportraitparentvalign"),fontsize:i.data("mobileportraitfontsize")},mobileLandscape:{left:i.data("mobilelandscapeleft"),top:i.data("mobilelandscapetop"),width:i.data("mobilelandscapewidth"),height:i.data("mobilelandscapeheight"),align:i.data("mobilelandscapealign"),valign:i.data("mobilelandscapevalign"),parentalign:i.data("mobilelandscapeparentalign"),parentvalign:i.data("mobilelandscapeparentvalign"),fontsize:i.data("mobilelandscapefontsize")}},this.layersItemsElement=e.layersItemsElement,this.layersItemsUlElement=this.layersItemsElement.find("> ul"),this.createRow(),this.itemEditor=n,this.initItems(),this.___makeLayerAlign(),this.___makeLayerResizeable(),this.___makeLayerDraggable(),e.layerList.push(this),"undefined"==typeof e.zIndexList[this.zIndex]?e.zIndexList[this.zIndex]=this:e.zIndexList.splice(this.zIndex,0,this),this._lock(),this.animation=new NextendSmartSliderLayerAnimations(this),this.layerEditor.$.trigger("layerCreated",this),t(window).triggerHandler("layerCreated"),this.animation.load(),this.layer.on({mousedown:t.proxy(this.activate,this),dblclick:t.proxy(this.fit,this)}),setTimeout(t.proxy(function(){this._resize(!0),this._eye()},this),300)}var s=!1,r=null;window.nextendPreventClick=!1;var o,l=function(){var e=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-e)),e=n+i,setTimeout(function(){t(n+i)},i)}}(),d={raf:!1,ratios:null,isThrottled:!1,layers:[]},p=function(){d.raf===!1&&(d.raf=!0,l(function(){for(var e=0;e<d.layers.length;e++)d.layers[e].isDeleted||d.layers[e].doTheResize(d.ratios,!0,d.isThrottled);d={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};a.prototype.getIndex=function(){return this.layerEditor.layerList.indexOf(this)},a.prototype.getParent=function(){return t("#"+this.getProperty(!1,"parentid")).data("layerObject")},a.prototype.requestID=function(){var e=this.getProperty(!1,"id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},a.prototype.createRow=function(){var e=300,i=null,n=t('<a class="n2-ss-parent-unlink" href="#" onclick="return false;"><i class="n2-i n2-i-layerunlink n2-i-grey-opacity"></i></a>').on("click",t.proxy(this.unlink,this)),a=t('<a href="#" onclick="return false;"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></a>').on("click",t.proxy(this["delete"],this)),s=t('<a href="#" onclick="return false;"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></a>').on("click",t.proxy(this.duplicate,this,!0,!1));this.soloElement=t('<a href="#" onclick="return false;"><i class="n2-i n2-i-bulb n2-i-grey-opacity"></i></a>').css("opacity",.3).on("click",t.proxy(this.switchSolo,this)),this.eyeElement=t('<a href="#" onclick="return false;"><i class="n2-i n2-i-eye n2-i-grey-opacity"></i></a>').on("click",t.proxy(this.switchEye,this)),this.lockElement=t('<a href="#" onclick="return false;"><i class="n2-i n2-i-lock n2-i-grey-opacity"></i></a>').on("click",t.proxy(this.switchLock,this)),this.layerRow=t('<li class="n2-ss-layer-row"></li>').on({mouseenter:t.proxy(function(){this.layer.addClass("n2-highlight")},this),mouseleave:t.proxy(function(e){this.layer.removeClass("n2-highlight")},this)}).appendTo(this.layersItemsUlElement),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>").on({mouseup:t.proxy(function(n){i?(clearTimeout(i),i=null,this.editName()):i=setTimeout(t.proxy(function(){this.activate(),i=null},this),e)},this)}),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').append(this.layerTitleSpan).append(t('<div class="n2-actions"></div>').append(n).append(s).append(a)).append(t('<div class="n2-actions-left"></div>').append(this.eyeElement).append(this.soloElement).append(this.lockElement)).appendTo(this.layerRow).on({mouseup:t.proxy(function(e){"DIV"===e.target.tagName&&this.activate()},this)}),this.editorVisibilityChange()},a.prototype.editorVisibilityChange=function(){switch(this.layersItemsUlElement.children().length){case 0:t("body").removeClass("n2-has-layers");break;case 1:t("body").addClass("n2-has-layers")}},a.prototype.setZIndex=function(e){this.zIndex=e,this.layer.css("zIndex",e),this.layersItemsUlElement.append(this.layerRow),this.$.trigger("layerIndexed",e)},a.prototype.activate=function(e){document.activeElement&&document.activeElement.blur(),0==this.items.length?console.error("The layer do not have item on it!"):this.items[0].activate();var t=this.getIndex();if(this.layerEditor.activeLayerIndex!==t){this.layerRow.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.layerEditor.changeActiveLayer(t),nextend.activeLayer=this.layer;var i=this.layersItemsUlElement.parent(),n=i.scrollTop(),a=this.layerRow.get(0).offsetTop;(n>a||a>n+i.height()-this.layerRow.height())&&i.scrollTop(a),r&&(s.removeClass("n2-highlight2"),clearTimeout(r),r=null),s=this.layer.addClass("n2-highlight2"),r=setTimeout(function(){s.removeClass("n2-highlight2"),s=null,r=null},500)}},a.prototype.deActivate=function(){this.animation&&this.animation.deActivate(),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},a.prototype.fit=function(){var e=this.layer.get(0);this.layerEditor.slideSize,this.layer.position();if(e.scrollWidth>0&&e.scrollHeight>0){for(var t=!1,i=0;i<this.items.length&&!(t=this.items[i].parser.fitLayer(this.items[i]));i++);if(!t){this.setProperty("width","auto","layer"),this.setProperty("height","auto","layer");var n=this.layer.width();Math.abs(this.layerEditor.layerContainerElement.width()-this.layer.position().left-n)<2&&this.setProperty("width",n,"layer")}}},a.prototype.switchToAnimation=function(){e.sidebarManager.switchTab(1)},a.prototype.hide=function(e){this.store(!1,e?e:this.getMode(),0,!0)},a.prototype.show=function(e){this.store(!1,e?e:this.getMode(),1,!0)},a.prototype.switchSolo=function(){this.layerEditor.setSolo(this)},a.prototype.markSolo=function(){this.soloElement.css("opacity",1),this.layer.addClass("n2-ss-layer-solo")},a.prototype.unmarkSolo=function(){this.soloElement.css("opacity",.3),this.layer.removeClass("n2-ss-layer-solo")},a.prototype.switchEye=function(){this.eye=!this.eye,this._eye()},a.prototype._eye=function(){this.eye?(this.eyeElement.css("opacity",.3),this.layer.css("visibility","hidden")):(this.eyeElement.css("opacity",1),this.layer.css("visibility",""))},a.prototype._hide=function(){this.layer.css("display","none")},a.prototype._show=function(){parseInt(this.property[this.layerEditor.getMode()])&&this.layer.css("display","block")},a.prototype.switchLock=function(){this.lock=!this.lock,this._lock()},a.prototype._lock=function(){this.lock?(this.lockElement.css("opacity",1),this.layer.nextenddraggable("disable"),this.layer.nextendResizable("disable"),this.layer.addClass("n2-ss-layer-locked")):(this.lockElement.css("opacity",.3),this.layer.nextenddraggable("enable"),this.layer.nextendResizable("enable"),this.layer.removeClass("n2-ss-layer-locked"))},a.prototype.duplicate=function(i,n,a){var s=this.getHTML(!0,!1),r=s.attr("id");r&&(r=t.fn.uid(),s.attr("id",r)),n&&s.attr("data-parentid",n);var o=this.layerEditor._addLayer(s,!0);"undefined"==typeof a?a=[]:a.push(o),this.layer.triggerHandler("LayerDuplicated",[r,a]),this.layerRow.trigger("mouseleave"),i&&o.activate(),n||e.history.add(t.proxy(function(){return[this,"duplicateLayer","duplicate","delete",[o]]},this))},a.prototype["delete"]=function(i,n){e.history.add(t.proxy(function(){return[this,"deleteLayer","delete","create",[this.getData(!0)]]},this)),this.deActivate();for(var a=0;a<this.items.length;a++)this.items[a]["delete"]();this.layerEditor.zIndexList.splice(this.zIndex,1);var s=this.getProperty(!1,"parentid");s&&this.unSubscribeParent(!0),this.layer.trigger("mouseup"),this.layerEditor.layerDeleted(this.getIndex()),"undefined"==typeof n?n=[]:n.push(this),this.layer.triggerHandler("LayerDeleted",["undefined"!=typeof i?i:!1,n]),this.layer.remove(),this.layerRow.remove(),this.editorVisibilityChange(),this.$.trigger("layerDeleted"),delete this.layer,delete this.itemEditor,delete this.animation,this.isDeleted=!0},a.prototype.getHTML=function(e,i){var n=t('<div class="n2-ss-layer"></div>').attr("style",this.getStyleText());for(var a in this.property)"width"!=a&&"height"!=a&&"left"!=a&&"top"!=a&&n.attr("data-"+a.toLowerCase(),this.property[a]);for(var a in this.deviceProperty)for(var s in this.deviceProperty[a])n.attr("data-"+a.toLowerCase()+s,this.deviceProperty[a][s]);n.css({position:"absolute",zIndex:this.zIndex+1});for(var a in this.deviceProperty.desktop)n.css(a,this.deviceProperty.desktop[a]+"px");if(e)for(var r=0;r<this.items.length;r++)n.append(this.items[r].getHTML(i));var o=this.getProperty(!1,"id");return o&&""!=o&&n.attr("id",o),n.attr("data-eye",this.eye),n.attr("data-lock",this.lock),n.attr("data-animations",this.animation.getAnimationsCode()),n},a.prototype.getData=function(e){var t={zIndex:this.zIndex+1,eye:this.eye,lock:this.lock,animations:this.animation.getData()};for(var i in this.property)switch(i){case"width":case"height":case"left":case"top":case"align":case"valign":case"parentalign":case"parentvalign":case"fontsize":break;default:t[i.toLowerCase()]=this.property[i]}for(var n in this.deviceProperty)for(var a in this.deviceProperty[n]){var s=this.deviceProperty[n][a];"undefined"!=typeof s&&("width"==a&&this.isDimensionPropertyAccepted(s)||"height"==a&&this.isDimensionPropertyAccepted(s)||"align"==a||"valign"==a||"parentalign"==a||"parentvalign"==a||(s=parseFloat(s)),t[n.toLowerCase()+a]=s)}if(e){t.items=[];for(var r=0;r<this.items.length;r++)t.items.push(this.items[r].getData())}return t},a.prototype.getDataWithChildren=function(e){return e.push(this.getData(!0)),this.layer.triggerHandler("LayerGetDataWithChildren",[e]),e},a.prototype.initItems=function(){this.items=[];for(var e=this.layer.find(".n2-ss-item"),t=0;t<e.length;t++)this.addItem(e.eq(t),!1)},a.prototype.addItem=function(e,t){t&&e.appendTo(this.layer),new NextendSmartSliderItem(e,this,this.itemEditor)},a.prototype.editName=function(){var e=new NextendSmartSliderAdminInlineField;e.$input.on({valueChanged:t.proxy(function(e,t){this.rename(t,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),e.injectNode(this.layerTitle,this.property.name)},a.prototype.rename=function(e,t){if(this.property.nameSynced||t){if(t&&(this.property.nameSynced=0),""==e){if(t&&(this.property.nameSynced=1,this.items.length))return this.items[0].reRender(),!1;e="Layer #"+(this.layerEditor.layerList.length+1)}e=e.substr(0,35),this.property.name!=e&&(this.property.name=e,this.layerTitleSpan.html(e),this.$.trigger("layerRenamed",e))}},a.prototype.setProperty=function(e,t,i){switch(e){case"responsiveposition":case"responsivesize":t=parseInt(t);case"id":case"parentid":case"class":case"inneralign":case"crop":case"parallax":case"adaptivefont":case"mouseenter":case"click":case"mouseleave":case"play":case"pause":case"stop":this.store(!1,e,t,!0);break;case"parentalign":case"parentvalign":case"align":case"valign":case"fontsize":this.store(!0,e,t,!0);break;case"width":var n=this.layerEditor.getResponsiveRatio("h");parseInt(this.getProperty(!1,"responsivesize"))||(n=1);var a=t;this.isDimensionPropertyAccepted(t)||(a=~~t,a!=t&&this.$.trigger("propertyChanged",[e,a])),this.storeWithModifier(e,a,n,!0),this._resize(!1);break;case"height":var s=this.layerEditor.getResponsiveRatio("v");parseInt(this.getProperty(!1,"responsivesize"))||(s=1);var a=t;this.isDimensionPropertyAccepted(t)||(a=~~t,a!=t&&this.$.trigger("propertyChanged",[e,a])),this.storeWithModifier(e,a,s,!0),this._resize(!1);break;case"left":var r=this.layerEditor.getResponsiveRatio("h");parseInt(this.getProperty(!1,"responsiveposition"))||(r=1);var a=~~t;a!=t&&this.$.trigger("propertyChanged",[e,a]),this.storeWithModifier(e,a,r,!0);break;case"top":var o=this.layerEditor.getResponsiveRatio("v");parseInt(this.getProperty(!1,"responsiveposition"))||(o=1);var a=~~t;a!=t&&this.$.trigger("propertyChanged",[e,a]),this.storeWithModifier(e,a,o,!0);break;case"showFieldDesktopPortrait":this.store(!1,"desktopPortrait",parseInt(t),!0);break;case"showFieldDesktopLandscape":this.store(!1,"desktopLandscape",parseInt(t),!0);break;case"showFieldTabletPortrait":this.store(!1,"tabletPortrait",parseInt(t),!0);break;case"showFieldTabletLandscape":this.store(!1,"tabletLandscape",parseInt(t),!0);break;case"showFieldMobilePortrait":this.store(!1,"mobilePortrait",parseInt(t),!0);break;case"showFieldMobileLandscape":this.store(!1,"mobileLandscape",parseInt(t),!0)}"manager"!=i&&this.$.trigger("propertyChanged",[e,t])},a.prototype.getProperty=function(e,t){if(e){var i=this.deviceProperty[this.getMode()],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},a.prototype.store=function(i,n,a,s){var r=this.property[n];if(this.property[n]=a,i){var o=this.getMode();e.history.add(t.proxy(function(){return[this,"store",a,this.deviceProperty[o][n],[this.layer,i,n,o]]},this)),this.deviceProperty[o][n]=a}else e.history.add(t.proxy(function(){return[this,"store",a,r,[this.layer,i,n,this.getMode()]]},this));s&&this.render(n,a)},a.prototype.storeWithModifier=function(i,n,a,s){this.property[i]=n;var r=this.getMode();e.history.add(t.proxy(function(){return[this,"storeWithModifier",n,this.deviceProperty[r][i],[this.layer,i,r]]},this)),this.deviceProperty[r][i]=n,s&&this.renderWithModifier(i,n,a)},a.prototype.render=function(e,t){this["_sync"+e](t)},a.prototype.renderWithModifier=function(e,t,i){"width"!=e&&"height"!=e||!this.isDimensionPropertyAccepted(t)?this["_sync"+e](Math.round(t*i)):this["_sync"+e](t)},a.prototype._syncclass=function(e){this.layer.removeClass(),this.layer.addClass("n2-ss-layer"),e&&""!=e&&this.layer.addClass(e)},a.prototype._syncid=function(e){e&&""!=e?this.layer.attr("id",e):this.layer.removeAttr("id")},a.prototype.subscribeParent=function(){var e=this;this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.layer.addClass("n2-ss-layer-parent"),e.layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.layer.removeClass("n2-ss-layer-parent"),e.layer.triggerHandler("LayerUnParent")},LayerDeleted:function(t,i,n){i?e["delete"](i,n):e.setProperty("parentid","","layer")},LayerDuplicated:function(t,i,n){e.duplicate(!1,i,n)},LayerShowChange:function(t,i,n){e.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i){e.getDataWithChildren(i)}},this.parent=n2("#"+this.property.parentid).on(this.subscribeParentCallbacks)},a.prototype.unSubscribeParent=function(e){if(this.layerRow.removeClass("n2-parent-active"),this.parent&&this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},!e){var t=this.layer.position();this.setPosition(t.left,t.top)}},a.prototype.unlink=function(e){e.preventDefault(),this.setProperty("parentid","","layer")},a.prototype.parentPicked=function(e,t,i,n,a){this.setProperty("parentid","","layer"),this.setProperty("align",n,"layer"),this.setProperty("valign",a,"layer"),this.setProperty("parentalign",t,"layer"),this.setProperty("parentvalign",i,"layer"),this.setProperty("parentid",e.requestID(),"layer")},a.prototype._syncparentid=function(e){e&&""!=e?0==t("#"+e).length?this.setProperty("parentid","","layer"):(this.layer.attr("data-parentid",e),this.subscribeParent(),this.setPosition(this.layer.position().left,this.layer.position().top)):(this.layer.removeAttr("data-parentid"),this.unSubscribeParent(!1))},a.prototype._syncparentalign=function(e){this.layer.data("parentalign",e);var t=this.getParent();t&&t._resize(!1)},a.prototype._syncparentvalign=function(e){this.layer.data("parentvalign",e);var t=this.getParent();t&&t._resize(!1)},a.prototype._syncinneralign=function(e){this.layer.css("text-align",e)},a.prototype._synccrop=function(e){"auto"==e&&(e="hidden");var i=this.layer.find("> .n2-ss-layer-mask");if("mask"==e){if(e="hidden",!i.length){i=t("<div class='n2-ss-layer-mask'></div>").appendTo(this.layer);for(var n=0;n<this.items.length;n++)i.append(this.items[n].item)}}else if(i.length)for(var n=0;n<this.items.length;n++)this.layer.append(this.items[n].item),i.remove();this.layer.css("overflow",e)},a.prototype._syncparallax=function(e){},a.prototype._syncalign=function(e,t){"undefined"!==t&&e!=t&&this.setPosition(this.layer.position().left,this.layer.position().top),this.layer.attr("data-align",e)},a.prototype._syncvalign=function(e,t){"undefined"!==t&&e!=t&&this.setPosition(this.layer.position().left,this.layer.position().top),this.layer.attr("data-valign",e)},a.prototype._syncfontsize=function(e){this.adjustFontSize(this.getProperty(!1,"adaptivefont"),e,!0)},a.prototype._syncadaptivefont=function(e){this.adjustFontSize(e,this.getProperty(!0,"fontsize"),!0)},a.prototype.adjustFontSize=function(e,t,i){t=parseInt(t),parseInt(e)?this.layer.css("font-size",nextend.smartSlider.frontend.sliderElement.data("fontsize")*t/100+"px"):100!=t?this.layer.css("font-size",t+"%"):this.layer.css("font-size",""),i&&this.update()},a.prototype._syncleft=function(e){if(this.parent&&this.parentIsVisible){var t=this.parent.position(),i=this.getProperty(!0,"align"),n=this.getProperty(!0,"parentalign"),a=0;switch(n){case"right":a=t.left+this.parent.width();break;case"center":a=t.left+this.parent.width()/2;break;default:a=t.left}switch(i){case"right":this.layer.css({left:"auto",right:this.layer.parent().width()-a-e+"px"});break;case"center":this.layer.css({left:a+e-this.layer.width()/2+"px",right:"auto"});break;default:this.layer.css({left:a+e+"px",right:"auto"})}}else switch(this.getProperty(!0,"align")){case"right":this.layer.css({left:"auto",right:-e+"px"});break;case"center":this.layer.css({left:this.layer.parent().width()/2+e-this.layer.width()/2+"px",right:"auto"});break;default:this.layer.css({left:e+"px",right:"auto"})}this.triggerLayerResized()},a.prototype._synctop=function(e){if(this.parent&&this.parentIsVisible){var t=this.parent.position(),i=this.getProperty(!0,"valign"),n=this.getProperty(!0,"parentvalign"),a=0;switch(n){case"bottom":a=t.top+this.parent.height();break;case"middle":a=t.top+this.parent.height()/2;break;default:a=t.top}switch(i){case"bottom":this.layer.css({top:"auto",bottom:this.layer.parent().height()-a-e+"px"});break;case"middle":this.layer.css({top:a+e-this.layer.height()/2+"px",bottom:"auto"});break;default:this.layer.css({top:a+e+"px",bottom:"auto"})}}else switch(this.getProperty(!0,"valign")){case"bottom":this.layer.css({top:"auto",bottom:-e+"px"});break;case"middle":this.layer.css({top:this.layer.parent().height()/2+e-this.layer.height()/2+"px",bottom:"auto"});break;default:this.layer.css({top:e+"px",bottom:"auto"})}this.triggerLayerResized()},a.prototype._syncresponsiveposition=function(e){this._resize(!1)},a.prototype._syncwidth=function(e){this.layer.css("width",e+(this.isDimensionPropertyAccepted(e)?"":"px"))},a.prototype._syncheight=function(e){this.layer.css("height",e+(this.isDimensionPropertyAccepted(e)?"":"px"))},a.prototype._syncresponsivesize=function(e){this._resize(!1)},a.prototype._syncdesktopPortrait=function(e){this.__syncShowOnDevice("desktopPortrait",e)},a.prototype._syncdesktopLandscape=function(e){this.__syncShowOnDevice("desktopLandscape",e)},a.prototype._synctabletPortrait=function(e){this.__syncShowOnDevice("tabletPortrait",e)},a.prototype._synctabletLandscape=function(e){this.__syncShowOnDevice("tabletLandscape",e)},a.prototype._syncmobilePortrait=function(e){this.__syncShowOnDevice("mobilePortrait",e)},a.prototype._syncmobileLandscape=function(e){this.__syncShowOnDevice("mobileLandscape",e)},a.prototype.__syncShowOnDevice=function(e,t){if(this.getMode()==e){var t=parseInt(t);t?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[e,t]),this.triggerLayerResized()}},a.prototype._syncmouseenter=a.prototype._syncclick=a.prototype._syncmouseleave=a.prototype._syncplay=a.prototype._syncpause=a.prototype._syncstop=function(){},a.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-align-marker" />').appendTo(this.layer)},a.prototype.___makeLayerResizeable=function(){this.layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.layerEditor.layerContainerElement,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),smartguides:t.proxy(function(){return this.layer.triggerHandler("LayerParent"),this.layerEditor.getSnap()},this),tolerance:5}).on({mousedown:t.proxy(function(e){this.lock||this.layerEditor.positionDisplay.css({left:e.pageX+10,top:e.pageY+10}).html("W: "+parseInt(this.layer.width())+"px<br />H: "+parseInt(this.layer.height())+"px").addClass("n2-active"),document.activeElement&&document.activeElement.blur()},this),mouseup:t.proxy(function(e){this.layerEditor.positionDisplay.removeClass("n2-active")},this)})},a.prototype.____makeLayerResizeableStart=function(e,i){t("#n2-admin").addClass("n2-ss-resize-layer"),this.____makeLayerResizeableResize(e,i),this.layerEditor.positionDisplay.addClass("n2-active")},a.prototype.____makeLayerResizeableResize=function(e,t){this.layerEditor.positionDisplay.css({left:e.pageX+10,top:e.pageY+10}).html("W: "+t.size.width+"px<br />H: "+t.size.height+"px"),this.triggerLayerResized()},a.prototype.____makeLayerResizeableStop=function(e,i){window.nextendPreventClick=!0,setTimeout(function(){window.nextendPreventClick=!1},50),t("#n2-admin").removeClass("n2-ss-resize-layer");var n=!1;if(i.originalSize.width==i.size.width){var a=this.getProperty(!0,"width");this.isDimensionPropertyAccepted(a)&&(n=!0,this._syncwidth(a))}var s=!1;if(i.originalSize.height==i.size.height){var a=this.getProperty(!0,"height");this.isDimensionPropertyAccepted(a)&&(s=!0,this._syncheight(a))}this.setPosition(i.position.left,i.position.top);var r=this.layerEditor.getResponsiveRatio("h"),o=this.layerEditor.getResponsiveRatio("v");if(parseInt(this.getProperty(!1,"responsivesize"))||(r=o=1),!n){var l=Math.round(i.size.width*(1/r));this.storeWithModifier("width",l,r,!1),this.$.trigger("propertyChanged",["width",l])}if(!s){var l=Math.round(i.size.height*(1/o));this.storeWithModifier("height",l,o,!1),this.$.trigger("propertyChanged",["height",l])}this.triggerLayerResized(),this.layer.triggerHandler("LayerUnParent"),this.layerEditor.positionDisplay.removeClass("n2-active")},a.prototype.___makeLayerDraggable=function(){this.layer.nextenddraggable({_containment:this.layerEditor.layerContainerElement,start:t.proxy(this.____makeLayerDraggableStart,this),drag:t.proxy(this.____makeLayerDraggableDrag,this),stop:t.proxy(this.____makeLayerDraggableStop,this),smartguides:t.proxy(function(){return this.layer.triggerHandler("LayerParent"),this.layerEditor.getSnap()},this),tolerance:5})},a.prototype.____makeLayerDraggableStart=function(e,i){t("#n2-admin").addClass("n2-ss-move-layer"),this.____makeLayerDraggableDrag(e,i),this.layerEditor.positionDisplay.addClass("n2-active");var n=this.getProperty(!0,"width");this.isDimensionPropertyAccepted(n)&&this.layer.width(this.layer.width()+.5);var n=this.getProperty(!0,"height");this.isDimensionPropertyAccepted(n)&&this._syncheight(n)},a.prototype.____makeLayerDraggableDrag=function(e,t){this.layerEditor.positionDisplay.css({left:e.pageX+10,top:e.pageY+10}).html("L: "+parseInt(0|t.position.left)+"px<br />T: "+parseInt(0|t.position.top)+"px"),this.triggerLayerResized()},a.prototype.____makeLayerDraggableStop=function(e,i){window.nextendPreventClick=!0,setTimeout(function(){window.nextendPreventClick=!1},50),t("#n2-admin").removeClass("n2-ss-move-layer"),this.setPosition(i.position.left,i.position.top);var n=this.getProperty(!0,"width");this.isDimensionPropertyAccepted(n)&&this._syncwidth(n);var n=this.getProperty(!0,"height");this.isDimensionPropertyAccepted(n)&&this._syncheight(n),this.triggerLayerResized(),this.layer.triggerHandler("LayerUnParent"),this.layerEditor.positionDisplay.removeClass("n2-active")},a.prototype.moveX=function(e){this.setDeviceBasedAlign(),this.setProperty("left",this.getProperty(!0,"left")+e,"layer"),this.triggerLayerResized()},a.prototype.moveY=function(e){this.setDeviceBasedAlign(),this.setProperty("top",this.getProperty(!0,"top")+e,"layer"),this.triggerLayerResized()},a.prototype.setPosition=function(e,t){var i=this.layerEditor.getResponsiveRatio("h"),n=this.layerEditor.getResponsiveRatio("v");parseInt(this.getProperty(!1,"responsiveposition"))||(i=n=1),this.setDeviceBasedAlign();var a=this.parent,s={left:0,leftMultiplier:1,top:0,topMultiplier:1};if(a&&a.is(":visible")){var r=a.position();switch(this.getProperty(!0,"parentalign")){case"right":s.left=r.left+a.width();break;case"center":s.left=r.left+a.width()/2;break;default:s.left=r.left}switch(this.getProperty(!0,"parentvalign")){case"bottom":s.top=r.top+a.height();break;case"middle":s.top=r.top+a.height()/2;break;default:s.top=r.top}}else{switch(a=this.layer.parent(),this.getProperty(!0,"align")){case"center":s.left+=a.width()/2;break;case"right":s.left+=a.width()}switch(this.getProperty(!0,"valign")){case"middle":s.top+=a.height()/2;break;case"bottom":s.top+=a.height()}}var e,o=!1;switch(this.getProperty(!0,"align")){case"left":e=-Math.round((s.left-e)*(1/i));break;case"center":e=-Math.round((s.left-e-this.layer.width()/2)*(1/i));break;case"right":e=-Math.round((s.left-e-this.layer.width())*(1/i)),o=!0}this.storeWithModifier("left",e,i,o),this.$.trigger("propertyChanged",["left",e]);var t,o=!1;switch(this.getProperty(!0,"valign")){case"top":t=-Math.round((s.top-t)*(1/n));break;case"middle":t=-Math.round((s.top-t-this.layer.height()/2)*(1/n));break;case"bottom":t=-Math.round((s.top-t-this.layer.height())*(1/n)),o=!0}this.storeWithModifier("top",t,n,o),this.$.trigger("propertyChanged",["top",t])},a.prototype.setDeviceBasedAlign=function(){var e=this.getMode();"undefined"==typeof this.deviceProperty[e].align&&this.setProperty("align",this.getProperty(!0,"align"),"layer"),"undefined"==typeof this.deviceProperty[e].valign&&this.setProperty("valign",this.getProperty(!0,"valign"),"layer")},a.prototype.snap=function(){this.layer.nextendResizable("option","smartguides",t.proxy(function(){return this.layer.triggerHandler("LayerParent"),this.layerEditor.getSnap()},this)),this.layer.nextenddraggable("option","smartguides",t.proxy(function(){return this.layer.triggerHandler("LayerParent"),this.layerEditor.getSnap()},this))},a.prototype.changeEditorMode=function(e){var t=parseInt(this.property[e]);t?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[e,t]),this._renderModeProperties(!1)},a.prototype.resetMode=function(e,t){if("desktopPortrait"!=e){var i;for(var n in this.property)this.deviceProperty[e][n]=i;e==t&&this._renderModeProperties(!0)}},a.prototype._renderModeProperties=function(e){for(var t in this.property)this.property[t]=this.getProperty(!0,t),this.$.trigger("propertyChanged",[t,this.property[t]]);var i=this.getProperty(!0,"fontsize");this.adjustFontSize(this.getProperty(!1,"adaptivefont"),i,!1),this.layer.attr("data-align",this.property.align),this.layer.attr("data-valign",this.property.valign),e&&this._resize(!0)},a.prototype.copyMode=function(e,i){e!=i&&(this.deviceProperty[i]=t.extend({},this.deviceProperty[i],this.deviceProperty[e]))},a.prototype.getMode=function(){return this.layerEditor.getMode()},a.prototype._resize=function(e){this.resize({slideW:this.layerEditor.getResponsiveRatio("h"),slideH:this.layerEditor.getResponsiveRatio("v")},e)},a.prototype.doLinearResize=function(e){this.doThrottledTheResize(e,!0)},a.prototype.resize=function(e,t){this.parent&&!t||this.addToResizeCollection(this,e,!1)},a.prototype.doTheResize=function(e,t,i){var n=e.slideW,a=n,s=e.slideH,r=s;parseInt(this.getProperty(!1,"responsivesize"))||(a=r=1),this.renderWithModifier("width",this.getProperty(!0,"width"),a),this.renderWithModifier("height",this.getProperty(!0,"height"),r),parseInt(this.getProperty(!1,"responsiveposition"))||(n=s=1),this.renderWithModifier("left",this.getProperty(!0,"left"),n),this.renderWithModifier("top",this.getProperty(!0,"top"),s),t||this.triggerLayerResized(i,e)},a.prototype.resizeParent=function(e,t,i){this.addToResizeCollection(this,t,i)},a.prototype.addToResizeCollection=function(e,t,i){d.ratios=t,d.isThrottled=i;for(var n=0;n<d.layers.length;n++)if(d.layers[n]==this){d.layers.splice(n,1);break}d.layers.push(e),p(),this.triggerLayerResized(i,t)},a.prototype.update=function(){var e=this.parent;if("center"==this.getProperty(!0,"align")){var t=0;t=e?e.position().left+e.width()/2:this.layer.parent().width()/2;var i=this.layerEditor.getResponsiveRatio("h");parseInt(this.getProperty(!1,"responsiveposition"))||(i=1),this.layer.css("left",t-this.layer.width()/2+this.getProperty(!0,"left")*i)}if("middle"==this.getProperty(!0,"valign")){var n=0;n=e?e.position().top+e.height()/2:this.layer.parent().height()/2;var i=this.layerEditor.getResponsiveRatio("v");parseInt(this.getProperty(!1,"responsiveposition"))||(i=1),this.layer.css("top",n-this.layer.height()/2+this.getProperty(!0,"top")*i)}this.triggerLayerResized()},a.prototype.triggerLayerResized=function(e,t){e?this._triggerLayerResized(e,t):this._triggerLayerResizedThrottled(!0,t)},a.prototype._triggerLayerResized=function(e,t){this.isDeleted||this.layer.triggerHandler("LayerResized",[t||{slideW:this.layerEditor.getResponsiveRatio("h"),slideH:this.layerEditor.getResponsiveRatio("v")},e||!1])},a.prototype.getStyleText=function(){var e="",t=this.property.crop;return"auto"==t&&(t="hidden"),e+="overflow:"+t+";",e+="text-align:"+this.property.inneralign+";"},a.prototype.isDimensionPropertyAccepted=function(e){return!(!(e+"").match(/[0-9]+%/)&&"auto"!=e)},a.prototype.history=function(i,n,a,s){switch(i){case"store":var r=this.getMode();a[1]&&a[3]!=r?this.deviceProperty[a[3]][a[2]]=n:this[i](a[1],a[2],n,!0),
5
+ this._renderModeProperties(!0);break;case"storeWithModifier":var r=this.getMode(),o=1;switch(a[1]){case"width":case"left":o=this.layerEditor.getResponsiveRatio("h");break;case"height":case"top":o=this.layerEditor.getResponsiveRatio("v")}a[2]==r?this[i](a[1],n,o,!0):this.deviceProperty[a[2]][a[1]]=n,this._renderModeProperties(!0);break;case"addLayer":switch(n){case"add":this.layerEditor._zIndexOffset=-1,this.layerEditor._idTranslation={};var l=this.layerEditor.loadSingleData(t.extend(!0,{},a[0]));e.history.changeFuture(this,l),e.history.changeFuture(this.items[0],l.items[0]),this.layerEditor.reIndexLayers(),this.layerEditor.refreshMode();break;case"delete":this["delete"]()}break;case"duplicateLayer":switch(n){case"duplicate":var d=[];this.duplicate(!0,!1,d);for(var p=0;p<d.length;p++)e.history.changeFuture(s.oldLayers[p],d[p]),e.history.changeFuture(s.oldLayers[p].items[0],d[p].items[0]);s.oldLayers=[];break;case"delete":var h=[];a[0]["delete"](!0,h),s.oldLayers=h}break;case"deleteLayer":switch(n){case"create":this.layerEditor._zIndexOffset=-1,this.layerEditor._idTranslation={};var l=this.layerEditor.loadSingleData(t.extend(!0,{},a[0]));e.history.changeFuture(this,l),e.history.changeFuture(this.items[0],l.items[0]),this.layerEditor.reIndexLayers(),this.layerEditor.refreshMode();break;case"delete":this["delete"]()}break;case"storeAnimations":this.animation.storeAnimations(a[0],null,null,t.extend(!0,{},n))}},i.NextendSmartSliderLayer=a}(nextend.smartSlider,n2,window),function(e,t,i,n){function a(i,n,a,s,o){this.activeLayerIndex=-1,this.snapToEnabled=!0,this.staticSlide=n,this.layerDefault={align:null,valign:null},this.solo=!1,this.$=t(this),e.layerManager=this,this.responsive=e.frontend.responsive,new NextendSmartSliderSidebar,this.layerList=[],this.layersItemsElement=t("#n2-ss-layers-items-list"),this.frontendSlideLayers=i,this.frontendSlideLayers.setZero(),this.layerContainerElement=e.$currentSlideElement.find(".n2-ss-layers-container"),this.layerContainerElement.length||(this.layerContainerElement=e.$currentSlideElement),this.layerContainerElement.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.slideSize={width:this.layerContainerElement.width(),height:this.layerContainerElement.height()},e.frontend.sliderElement.on("SliderResize",t.proxy(this.refreshSlideSize,this)),this.initToolbox(),new NextendSmartSliderLayerAnimationManager(this),this.refreshLayers(),e.itemEditor=this.itemEditor=new NextendSmartSliderItemManager(this),this.positionDisplay=t('<div class="n2 n2-ss-position-display"/>').appendTo("body"),this.zIndexList=[],this.layers.each(t.proxy(function(e,i){new NextendSmartSliderLayer(this,t(i),this.itemEditor)},this)),this.reIndexLayers(),this._makeLayersOrderable(),t("#smartslider-slide-toolbox-layer").on("mouseenter",function(){t("#n2-admin").addClass("smartslider-layer-highlight-active")}).on("mouseleave",function(){t("#n2-admin").removeClass("smartslider-layer-highlight-active")}),this._initDeviceModeChange(),this.initSnapTo(),this.initEditorTheme(),this.initAlign(),this.initParentLinker(),this.initEvents();var p=t("#n2-ss-adaptive-font").on("click",t.proxy(function(){this.toolboxForm.adaptivefont.data("field").onoff.trigger("click")},this));this.toolboxForm.adaptivefont.on("nextendChange",t.proxy(function(){1==this.toolboxForm.adaptivefont.val()?p.addClass("n2-active"):p.removeClass("n2-active")},this)),new NextendElementNumber("n2-ss-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new NextendElementAutocompleteSimple("n2-ss-font-size",["60","80","100","120","140","160","180"]);var h=t("#n2-ss-font-size").on("outsideChange",t.proxy(function(){var e=parseInt(h.val());this.toolboxForm.fontsize.val(e).trigger("change")},this));this.toolboxForm.fontsize.on("nextendChange",t.proxy(function(){h.data("field").insideChange(this.toolboxForm.fontsize.val())},this)),this.zIndexList.length>0&&this.zIndexList[this.zIndexList.length-1].activate(),t(window).on({keydown:t.proxy(function(i){if(!("TEXTAREA"==i.target.tagName||"INPUT"==i.target.tagName||e.timelineControl&&e.timelineControl.isActivated())&&-1!=this.activeLayerIndex){var n=i.keyCode;if(n>=49&&57>=n){var a=i.originalEvent.location||i.originalEvent.keyLocation||0;3==a&&(n+=48)}if(46==n)this["delete"]();else if(35==n)this.duplicate(),i.preventDefault();else if(16==n)r[n]=1;else if(38==n){if(!r[n]){var s=t.proxy(function(){this.layerList[this.activeLayerIndex].moveY(-1*(r[16]?10:1))},this);s(),r[n]=setInterval(s,100)}i.preventDefault()}else if(40==n){if(!r[n]){var s=t.proxy(function(){this.layerList[this.activeLayerIndex].moveY(r[16]?10:1)},this);s(),r[n]=setInterval(s,100)}i.preventDefault()}else if(37==n){if(!r[n]){var s=t.proxy(function(){this.layerList[this.activeLayerIndex].moveX(-1*(r[16]?10:1))},this);s(),r[n]=setInterval(s,100)}i.preventDefault()}else if(39==n){if(!r[n]){var s=t.proxy(function(){this.layerList[this.activeLayerIndex].moveX(r[16]?10:1)},this);s(),r[n]=setInterval(s,100)}i.preventDefault()}else if(n>=97&&105>=n){var o=l[n],p=d[n],h=!1;this.toolboxForm.align.val()==o&&this.toolboxForm.valign.val()==p&&(h=!0),this.horizontalAlign(o,h),this.verticalAlign(p,h)}else if(34==n){i.preventDefault();var c=this.layerList[this.activeLayerIndex].zIndex-1;0>c&&(c=this.zIndexList.length-1),this.zIndexList[c].activate()}else if(33==n){i.preventDefault();var c=this.layerList[this.activeLayerIndex].zIndex+1;c>this.zIndexList.length-1&&(c=0),this.zIndexList[c].activate()}else(i.ctrlKey||i.metaKey)&&(90==n?i.shiftKey?e.history.redo():e.history.undo():67==n?this.copy():86==n&&this.paste(0))}},this),keyup:t.proxy(function(e){"undefined"!=typeof r[e.keyCode]&&r[e.keyCode]&&(clearInterval(r[e.keyCode]),r[e.keyCode]=0)},this)}),this.addContextMenu(),a||e.frontend.sliderElement.fileupload({url:s,pasteZone:!1,dropZone:e.frontend.sliderElement,dataType:"json",paramName:"image",add:t.proxy(function(e,t){t.formData={path:"/"+o},t.submit()},this),done:t.proxy(function(e,t){var i=t.result;if(i.data&&i.data.name){var n=this.itemEditor.createLayerItem("image");n.reRender({image:i.data.url}),n.activate(null,!0)}else NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(e,t){NextendAjaxHelper.notification(t.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}}),this.initHideSidebar()}var s=".n2-ss-layer",r={16:0,38:0,40:0,37:0,39:0},o={left:0,center:1,right:2,top:0,middle:1,bottom:2},l={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},d={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"};a.prototype.initHideSidebar=function(){var e=t("#n2-admin");t(".n2-hide-sidebar").on("click",function(){e.hasClass("n2-sidebar-hidden")?e.removeClass("n2-sidebar-hidden"):e.addClass("n2-sidebar-hidden"),t(window).trigger("resize")})},a.prototype.getMode=function(){return this.mode},a.prototype._getMode=function(){return this.responsive.getNormalizedModeString()},a.prototype.getResponsiveRatio=function(e){return"h"==e?this.responsive.lastRatios.slideW:"v"==e?this.responsive.lastRatios.slideH:0},a.prototype.createLayer=function(e){for(var t in this.layerDefault)null!==this.layerDefault[t]&&(e[t]=this.layerDefault[t]);var i=new NextendSmartSliderLayer(this,!1,this.itemEditor,e);return this.reIndexLayers(),this._makeLayersOrderable(),i},a.prototype.addLayer=function(i,n){var a=this._addLayer(i,n);return e.history.add(t.proxy(function(){return[a,"addLayer","add","delete",[a.getData(!0)]]},this)),a},a.prototype._addLayer=function(e,i){var n=t(e);this.layerContainerElement.append(n);var a=new NextendSmartSliderLayer(this,n,this.itemEditor);return i&&(this.reIndexLayers(),this.refreshMode()),a},a.prototype.setSolo=function(t){if(this.solo){if(this.solo.unmarkSolo(),this.solo===t)return this.solo=!1,void e.$currentSlideElement.removeClass("n2-ss-layer-solo-mode");this.solo=!1}this.solo=t,t.markSolo(),e.$currentSlideElement.addClass("n2-ss-layer-solo-mode")},a.prototype.switchToLayerTab=function(){e.slide._changeView(1)},a.prototype._initDeviceModeChange=function(){var i=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=i.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-reset-to-desktop").on("click",t.proxy(function(){"table-row"==this.resetToDesktopTRElement.css("display")&&i.trigger("click")},this));var n=t("#n2-ss-show-on-device").on("click",t.proxy(function(){this.toolboxForm["showField"+this.mode.charAt(0).toUpperCase()+this.mode.substr(1)].data("field").onoff.trigger("click")},this));this.globalShowOnDeviceCB=function(e){this.mode==e&&(1==this.toolboxForm["showField"+this.mode.charAt(0).toUpperCase()+this.mode.substr(1)].val()?n.addClass("n2-active"):n.removeClass("n2-active"))},this.toolboxForm.showFieldDesktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.toolboxForm.showFieldDesktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.toolboxForm.showFieldTabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.toolboxForm.showFieldTabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.toolboxForm.showFieldMobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.toolboxForm.showFieldMobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),this.__onChangeDeviceOrientation(),e.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(this.__onChangeDeviceOrientation,this)),e.frontend.sliderElement.on("SliderResize",t.proxy(this.__onResize,this))},a.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),e.frontend.responsive.reTriggerSliderDeviceOrientation()},a.prototype.__onChangeDeviceOrientation=function(){this.mode=this._getMode(),this.globalShowOnDeviceCB(this.mode),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":"table-row"),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":"");for(var e=0;e<this.layerList.length;e++)this.layerList[e].changeEditorMode(this.mode)},a.prototype.__onResize=function(e,t){for(var i=this.getSortedLayers(),n=0;n<i.length;n++)i[n].doLinearResize(t)},a.prototype.__onResetToDesktopClick=function(){if(-1!=this.activeLayerIndex){var e=this.getMode();this.layerList[this.activeLayerIndex].resetMode(e,e)}},a.prototype.copyOrResetMode=function(e){var t=this.getMode();if("desktopPortrait"!=e&&e==t)for(var i=0;i<this.layerList.length;i++)this.layerList[i].resetMode(e,t);else if("desktopPortrait"!=e&&"desktopPortrait"==t)for(var i=0;i<this.layerList.length;i++)this.layerList[i].resetMode(e,t);else if(e!=t)for(var i=0;i<this.layerList.length;i++)this.layerList[i].copyMode(t,e)},a.prototype.refreshSlideSize=function(){this.slideSize.width=e.frontend.dimensions.slide.width,this.slideSize.height=e.frontend.dimensions.slide.height},a.prototype._makeLayersOrderable=function(){this.layersOrderableElement=this.layersItemsElement.find(" > ul"),this.layersOrderableElement.sortable({axis:"y",helper:"clone",placeholder:"sortable-placeholder",forcePlaceholderSize:!0,tolerance:"pointer",items:".n2-ss-layer-row",start:function(e,i){t(i.item).data("startindex",i.item.index())},stop:t.proxy(function(i,n){var a=this.zIndexList.length-t(n.item).data("startindex")-1,s=this.zIndexList.length-t(n.item).index()-1;a!=s&&(this.zIndexList.splice(s,0,this.zIndexList.splice(a,1)[0]),this.reIndexLayers(),e.history.add(t.proxy(function(){return[this,"changeZIndex",[a,s],[s,a],[]]},this)))},this)})},a.prototype.reIndexLayers=function(){this.zIndexList=this.zIndexList.filter(function(e){return e!=n});for(var e=this.zIndexList.length-1;e>=0;e--)this.zIndexList[e].setZIndex(e)},a.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find("> table").css("display","none"),n=e.find(".n2-h3"),a=n.html(),s=t('<div class="n2-sidebar-row n2-sidebar-header-bg n2-form-dark n2-sets-header"><div class="n2-table"><div class="n2-tr"><div class="n2-td"><div class="n2-h3 n2-uc">'+a+'</div></div><div style="text-align: '+(nextend.isRTL()?"left":"right")+';" class="n2-td"></div></div></div></div>'),r=t('<a href="#" class="n2-button n2-button-medium n2-button-green n2-h5 n2-uc">'+n2_("Show")+"</a>").on("click",function(e){e.preventDefault(),r.hasClass("n2-button-green")?(i.css("display",""),r.html(n2_("Hide")),r.addClass("n2-button-grey"),r.removeClass("n2-button-green"),t.jStorage.set("n2-ss-events",1)):(i.css("display","none"),r.html(n2_("Show")),r.addClass("n2-button-green"),r.removeClass("n2-button-grey"),t.jStorage.set("n2-ss-events",0))});t.jStorage.get("n2-ss-events",0)&&(i.css("display",""),r.html(n2_("Hide")),r.addClass("n2-button-grey"),r.removeClass("n2-button-green")),n.replaceWith(s),r.appendTo(s.find(".n2-td").eq(1))},a.prototype.initSnapTo=function(){var e=new NextendElementOnoff("n2-ss-snap");t.jStorage.get("n2-ss-snap-to-enabled",1)||(e.insideChange(0),this.snapToDisable()),e.element.on("outsideChange",t.proxy(this.switchSnapTo,this))},a.prototype.switchSnapTo=function(e){e.preventDefault(),this.snapToEnabled?this.snapToDisable():this.snapToEnable()},a.prototype.snapToDisable=function(){this.snapToEnabled=!1,this.snapToChanged(0)},a.prototype.snapToEnable=function(){this.snapToEnabled=!0,this.snapToChanged(1)},a.prototype.snapToChanged=function(){for(var e=0;e<this.layerList.length;e++)this.layerList[e].snap();t.jStorage.set("n2-ss-snap-to-enabled",this.snapToEnabled)},a.prototype.getSnap=function(){return this.snapToEnabled?t(this.staticSlide?".n2-ss-static-slide .n2-ss-layer:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):visible":".n2-ss-slide.n2-ss-slide-active .n2-ss-layer:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):visible"):!1},a.prototype.initEditorTheme=function(){this.themeElement=t("#n2-tab-smartslider-editor"),this.themeButton=t("#n2-ss-theme").on("click",t.proxy(this.switchEditorTheme,this)),t.jStorage.get("n2-ss-theme-dark",0)&&(this.themeButton.addClass("n2-active"),this.themeElement.addClass("n2-ss-theme-dark"))},a.prototype.switchEditorTheme=function(){t.jStorage.set("n2-ss-theme-dark",!this.themeButton.hasClass("n2-active")),this.themeButton.toggleClass("n2-active"),this.themeElement.toggleClass("n2-ss-theme-dark")},a.prototype.initAlign=function(){var e=t("#n2-ss-horizontal-align .n2-radio-option"),i=t("#n2-ss-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var a=t(n.currentTarget),s=a.hasClass("n2-sub-active"),r=a.data("align");switch(r){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",r),this.layerDefault.align=r,a.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",r),this.layerDefault.valign=r,a.addClass("n2-sub-active"))}}else if(-1!=this.activeLayerIndex){var r=t(n.currentTarget).data("align");switch(r){case"left":case"center":case"right":this.horizontalAlign(r,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(r,!0)}}},this)),this.toolboxForm.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.toolboxForm.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.toolboxForm.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.toolboxForm.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),a=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(o[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=a&&(i.eq(o[a]).addClass("n2-sub-active"),this.layerDefault.valign=a)},a.prototype.horizontalAlign=function(e,t){this.toolboxForm.align.val()!=e?this.toolboxForm.align.data("field").options.eq(o[e]).trigger("click"):t&&this.toolboxForm.left.val(0).trigger("change")},a.prototype.verticalAlign=function(e,t){this.toolboxForm.valign.val()!=e?this.toolboxForm.valign.data("field").options.eq(o[e]).trigger("click"):t&&this.toolboxForm.top.val(0).trigger("change")},a.prototype.initParentLinker=function(){var e=this.toolboxForm.parentid.data("field");t("#n2-ss-parent-linker").on({click:function(t){e.click(t)},mouseenter:function(t){e.picker.trigger(t)},mouseleave:function(t){e.picker.trigger(t)}})},a.prototype.deleteLayers=function(){for(var e=this.zIndexList.length-1;e>=0;e--)this.zIndexList[e]["delete"]()},a.prototype.layerDeleted=function(e){this.reIndexLayers(),this.layerList.splice(e,1),this.afterLayerDeleted(e)},a.prototype.afterLayerDeleted=NextendThrottle(function(e){var t=this.getSelectedLayer();e===this.activeLayerIndex?(this.activeLayerIndex=-1,this.zIndexList.length>0?this.zIndexList[this.zIndexList.length-1].activate():this.changeActiveLayer(-1)):t&&(this.activeLayerIndex=t.getIndex())},50),a.prototype.getSortedLayers=function(){for(var e=this.layerList.slice(),t={},i=e.length-1;i>=0;i--)"undefined"!=typeof e[i].property.parentid&&e[i].property.parentid&&("undefined"==typeof t[e[i].property.parentid]&&(t[e[i].property.parentid]=[]),t[e[i].property.parentid].push(e[i]),e.splice(i,1));for(var i=0;i<e.length;i++)"undefined"!=typeof e[i].property.id&&e[i].property.id&&"undefined"!=typeof t[e[i].property.id]&&(t[e[i].property.id].unshift(0),t[e[i].property.id].unshift(i+1),e.splice.apply(e,t[e[i].property.id]),delete t[e[i].property.id]);return e},a.prototype.getActiveLayerData=function(){var e=[];return"undefined"!=typeof this.layerList[this.activeLayerIndex]?this.layerList[this.activeLayerIndex].getDataWithChildren(e):e},a.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.layerList,n=0;n<i.length;n++)e.append(i[n].getHTML(!0,!0));return e.html()},a.prototype.getData=function(){for(var e=[],t=this.layerList,i=0;i<t.length;i++)e.push(t[i].getData(!0));return e},a.prototype.loadData=function(i,n){e.history.add(t.proxy(function(){return[this,"fixActiveLayer","","",[]]},this));var a=t.extend(!0,[],i);n&&this.deleteLayers(),this._zIndexOffset=this.zIndexList.length,this._idTranslation={};for(var s=0;s<a.length;s++)this.loadSingleData(a[s]);this.reIndexLayers(),this.refreshMode(),-1==this.activeLayerIndex&&this.layerList.length>0&&this.layerList[0].activate(),e.history.add(t.proxy(function(){return[this,"fixActiveLayer","","",[]]},this))},a.prototype.loadSingleData=function(e){var i=t('<div class="n2-ss-layer"></div>').attr("style",e.style),n=i.css("zIndex");if("auto"!=n&&""!=n||(n=e.zIndex?e.zIndex:1),i.css("zIndex",n+this._zIndexOffset),e.id){var a=t.fn.uid();this._idTranslation[e.id]=a,i.attr("id",a)}e.parentid&&("undefined"!=typeof this._idTranslation[e.parentid]?e.parentid=this._idTranslation[e.parentid]:e.parentid="");for(var s=0;s<e.items.length;s++)t('<div class="n2-ss-item n2-ss-item-'+e.items[s].type+'"></div>').data("item",e.items[s].type).data("itemvalues",e.items[s].values).appendTo(i);delete e.style,delete e.items,e.animations=Base64.encode(JSON.stringify(e.animations));for(var r in e)i.data(r,e[r]);return this.addLayer(i,!1)},a.prototype.refreshLayers=function(){this.layers=this.layerContainerElement.find(s)},a.prototype.initToolbox=function(){this.toolboxElement=t("#smartslider-slide-toolbox-layer"),this.toolboxForm={id:t("#layerid"),parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),"class":t("#layerclass"),showFieldDesktopPortrait:t("#layershow-desktop-portrait"),showFieldDesktopLandscape:t("#layershow-desktop-landscape"),showFieldTabletPortrait:t("#layershow-tablet-portrait"),showFieldTabletLandscape:t("#layershow-tablet-landscape"),showFieldMobilePortrait:t("#layershow-mobile-portrait"),showFieldMobileLandscape:t("#layershow-mobile-landscape"),crop:t("#layercrop"),inneralign:t("#layerinneralign"),parallax:t("#layerparallax"),align:t("#layeralign"),valign:t("#layervalign"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")};for(var e in this.toolboxForm)this.toolboxForm[e].on("outsideChange",t.proxy(this.activateLayerPropertyChanged,this,e));this.responsive.isEnabled("desktop","Landscape")||this.toolboxForm.showFieldDesktopLandscape.closest(".n2-mixed-group").css("display","none"),this.responsive.isEnabled("tablet","Portrait")||this.toolboxForm.showFieldTabletPortrait.closest(".n2-mixed-group").css("display","none"),this.responsive.isEnabled("tablet","Landscape")||this.toolboxForm.showFieldTabletLandscape.closest(".n2-mixed-group").css("display","none"),this.responsive.isEnabled("mobile","Portrait")||this.toolboxForm.showFieldMobilePortrait.closest(".n2-mixed-group").css("display","none"),this.responsive.isEnabled("mobile","Landscape")||this.toolboxForm.showFieldMobileLandscape.closest(".n2-mixed-group").css("display","none")},a.prototype.activateLayerPropertyChanged=function(e,t){if(-1!=this.activeLayerIndex){var i=this.toolboxForm[e].val();this.layerList[this.activeLayerIndex].setProperty(e,i,"manager")}else{var n=this.toolboxForm[e].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},a.prototype.getSelectedLayer=function(){return-1==this.activeLayerIndex?!1:this.layerList[this.activeLayerIndex]},a.prototype.changeActiveLayer=function(e){var i=this.activeLayerIndex;if(-1!=i){var n=this.layerList[i];n&&(n.$.off("propertyChanged.layerEditor"),n.deActivate())}if(this.activeLayerIndex=e,-1!=e){var n=this.layerList[e];n.$.on("propertyChanged.layerEditor",t.proxy(this.activeLayerPropertyChanged,this)),n.animation.activate();var a=n.property;for(var s in a)this.activeLayerPropertyChanged({target:n},s,a[s])}},a.prototype.activeLayerPropertyChanged=function(e,t,i){if("function"==typeof this["_formSet"+t])this["_formSet"+t](i,e.target);else{var n=this.toolboxForm[t].data("field");"undefined"!=typeof n&&n.insideChange(i)}},a.prototype._formSetname=function(e){},a.prototype._formSetnameSynced=function(e){},a.prototype._formSetdesktopPortrait=function(e,t){this.toolboxForm.showFieldDesktopPortrait.data("field").insideChange(e)},a.prototype._formSetdesktopLandscape=function(e,t){this.toolboxForm.showFieldDesktopLandscape.data("field").insideChange(e)},a.prototype._formSettabletPortrait=function(e,t){this.toolboxForm.showFieldTabletPortrait.data("field").insideChange(e)},a.prototype._formSettabletLandscape=function(e,t){this.toolboxForm.showFieldTabletLandscape.data("field").insideChange(e)},a.prototype._formSetmobilePortrait=function(e,t){this.toolboxForm.showFieldMobilePortrait.data("field").insideChange(e)},a.prototype._formSetmobileLandscape=function(e,t){this.toolboxForm.showFieldMobileLandscape.data("field").insideChange(e)},a.prototype["delete"]=function(){"undefined"!=typeof this.layerList[this.activeLayerIndex]&&this.layerList[this.activeLayerIndex]["delete"]()},a.prototype.duplicate=function(){"undefined"!=typeof this.layerList[this.activeLayerIndex]&&this.layerList[this.activeLayerIndex].duplicate(!0,!1)},a.prototype.copy=function(e){"undefined"==typeof e&&(e=this.getCopied());var i=nextend.smartSlider.layerManager.getActiveLayerData();if(i.length){for(e.unshift({name:i[0].name,layers:i});e.length>5;)e.pop();t.jStorage.set("copied",JSON.stringify(e))}},a.prototype.paste=function(e,t){"undefined"==typeof t&&(t=this.getCopied()),t.length&&"undefined"!=typeof t[e]&&nextend.smartSlider.layerManager.loadData(t[e].layers,!1)},a.prototype.getCopied=function(){var e=t.jStorage.get("copied");return null===e?[]:JSON.parse(e)},a.prototype.addContextMenu=function(){var e=this;t.contextMenu({selector:"#n2-ss-0",build:function(i,n){var a={};"undefined"!=typeof e.layerList[e.activeLayerIndex]&&(a["delete"]={name:"Delete layer",icon:"delete"},a.duplicate={name:"Duplicate layer",icon:"duplicate"},a.copy={name:"Copy layer",icon:"copy"});var s=e.getCopied();if(1==s.length)a.paste={name:"Paste layer",icon:"paste",callback:t.proxy(e.paste,this,0,s)};else if(s.length>1){for(var r={},o=0;o<s.length;o++)r["paste"+o]={name:s[o].name,callback:t.proxy(e.paste,this,o,s)};a.paste={name:"Paste layer",icon:"paste",items:r}}return t.isEmptyObject(a)?!1:{animation:{duration:0,show:"show",hide:"hide"},zIndex:1e6,callback:function(t,i){e[t]()},positionSubmenu:function(e){if(t.ui&&t.ui.position)e.css("display","block").position({my:"left+2 top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var i={top:0,left:this.outerWidth()};e.css(i)}},items:a}}})},a.prototype.history=function(e,t,i){switch(e){case"changeZIndex":this.zIndexList.splice(t[1],0,this.zIndexList.splice(t[0],1)[0]),this.reIndexLayers();break;case"fixActiveLayer":var n=this.getSelectedLayer();(0==n||n.isDeleted)&&-1==this.activeLayerIndex&&this.layerList.length>0&&this.zIndexList[this.zIndexList.length-1].activate()}},i.NextendSmartSliderAdminSlideLayerManager=a}(nextend.smartSlider,n2,window);
library/media/dist/smartslider-free.js ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ var currentLoads = parseInt(n2.jStorage.get('SS3FREELOADS', 0)),
3
+ currentStatus = parseInt(n2.jStorage.get('SS3FREE', 0)),
4
+ counter = 0,
5
+ setStatus = function (status) {
6
+ if ((currentStatus & status) == 0) {
7
+ currentStatus = currentStatus | status;
8
+ n2.jStorage.set('SS3FREE', currentStatus);
9
+ }
10
+ },
11
+ STATUS = {
12
+ CREATE_SLIDER: 2,
13
+ ADD_SAMPLE_SLIDER: 4,
14
+ EDIT_SLIDER: 8,
15
+ EDIT_SLIDE: 16,
16
+ ADD_LAYER: 32,
17
+ ADD_SLIDES: 64
18
+ }, CB = {
19
+ CREATE_SLIDER: function () {
20
+ $('.n2-box.n2-ss-create-slider').on('mousedown', function () {
21
+ setStatus(STATUS.CREATE_SLIDER);
22
+ });
23
+ },
24
+ ADD_SAMPLE_SLIDER: function () {
25
+ $('.n2-ss-demo-slider').on('mousedown', function () {
26
+ setStatus(STATUS.ADD_SAMPLE_SLIDER);
27
+ });
28
+ },
29
+ EDIT_SLIDER: function () {
30
+ if ($('#slidertitle').length) {
31
+ $('.n2-main-top-bar .n2-button-green').on('mousedown', function () {
32
+ setStatus(STATUS.EDIT_SLIDER);
33
+ });
34
+ }
35
+ },
36
+ ADD_SLIDES: function () {
37
+ $('.n2-slides-add').on('mousedown', function () {
38
+ setStatus(STATUS.ADD_SLIDES);
39
+ });
40
+ },
41
+ EDIT_SLIDE: function () {
42
+ if ($('#slidetitle').length) {
43
+ setStatus(STATUS.EDIT_SLIDE);
44
+ }
45
+ },
46
+ ADD_LAYER: function () {
47
+ $('#n2-ss-item-container .n2-ss-core-item').on('mousedown', function () {
48
+ setStatus(STATUS.ADD_LAYER);
49
+ });
50
+ }
51
+ };
52
+ $(window).ready(function () {
53
+ for (var k in CB) {
54
+ if ((currentStatus & STATUS[k]) == 0) {
55
+ CB[k]();
56
+ } else {
57
+ counter++;
58
+ }
59
+ }
60
+
61
+ n2.jStorage.set('SS3FREELOADS', currentLoads + 1);
62
+
63
+ if (currentLoads > 30 && counter > 4) {
64
+ $.ajax({
65
+ type: 'GET',
66
+ url: NextendAjaxHelper.makeAjaxUrl(window.location.href, {
67
+ nextendcontroller: 'settings',
68
+ nextendaction: 'rated'
69
+ }),
70
+ dataType: 'json'
71
+ }).done(function () {
72
+ n2.jStorage.set('SS3FREELOADS', 0)
73
+ n2.jStorage.set('SS3FREE', 0);
74
+ });
75
+
76
+ var modal = new NextendModal({
77
+ zero: {
78
+ size: [
79
+ 600,
80
+ 440
81
+ ],
82
+ title: n2_('Hurray! You\'re almost an expert!'),
83
+ back: false,
84
+ close: true,
85
+ content: '<img src="' + nextend.imageHelper.fixed('$ss$/admin/images/free/getpro1.jpg') + '" />' +
86
+ '<div class="n2-h2">Are you satisfied with Smart Slider 3?</div>',
87
+ controls: [
88
+ '<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Yes') + '</a>',
89
+ '<a href="http://smartslider3.com/suggestion/?utm_campaign=smartslider3&utm_source=gopro-not-satisfied&utm_medium=smartslider-' + N2PLATFORM + '-' + (N2SSPRO ? 'pro' : 'free') + '" target="_blank" class="n2-button n2-button-big n2-button-red n2-uc n2-h4">' + n2_('No') + '</a>'
90
+ ],
91
+ fn: {
92
+ show: function () {
93
+ this.controls.eq(0).on('click', $.proxy(function (e) {
94
+ e.preventDefault();
95
+ this.loadPane('pro');
96
+ }, this));
97
+ this.controls.eq(1).find('.n2-button-red').on('click', $.proxy(function () {
98
+ this.hide();
99
+ }, this));
100
+ }
101
+ }
102
+ },
103
+ pro: {
104
+ size: [
105
+ 600,
106
+ N2PLATFORM == 'wordpress' ? 522 : 442
107
+ ],
108
+ title: n2_('Be a professional!'),
109
+ back: false,
110
+ close: true,
111
+ content: '<img src="' + nextend.imageHelper.fixed('$ss$/admin/images/free/getpro2.jpg') + '" />' +
112
+ '<div class="n2-h3">Take your slider to the next level with Smart Slider 3 PRO!</div>' +
113
+ '<a href="' + window.N2SSWHYPRO + '" target="_blank" style="margin-top: 20px;" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('See all features') + '</a>',
114
+ fn: {
115
+ show: function () {
116
+ if (N2PLATFORM == 'wordpress') {
117
+ this.content.append('<div class="n2-ss-rate"><div class="n2-h3">If you have a minute share your experience!</div><a href="https://wordpress.org/support/view/plugin-reviews/smart-slider-3" target="_blank" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">' + n2_('Add your own review') + '</a></div>')
118
+ }
119
+ }
120
+ }
121
+ }
122
+ });
123
+ modal.setCustomClass('n2-ss-go-pro');
124
+ modal.show();
125
+ }
126
+ });
127
+ })(n2);
library/media/dist/smartslider-free.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(n){var e=parseInt(n2.jStorage.get("SS3FREELOADS",0)),t=parseInt(n2.jStorage.get("SS3FREE",0)),o=0,s=function(n){0==(t&n)&&(t|=n,n2.jStorage.set("SS3FREE",t))},i={CREATE_SLIDER:2,ADD_SAMPLE_SLIDER:4,EDIT_SLIDER:8,EDIT_SLIDE:16,ADD_LAYER:32,ADD_SLIDES:64},r={CREATE_SLIDER:function(){n(".n2-box.n2-ss-create-slider").on("mousedown",function(){s(i.CREATE_SLIDER)})},ADD_SAMPLE_SLIDER:function(){n(".n2-ss-demo-slider").on("mousedown",function(){s(i.ADD_SAMPLE_SLIDER)})},EDIT_SLIDER:function(){n("#slidertitle").length&&n(".n2-main-top-bar .n2-button-green").on("mousedown",function(){s(i.EDIT_SLIDER)})},ADD_SLIDES:function(){n(".n2-slides-add").on("mousedown",function(){s(i.ADD_SLIDES)})},EDIT_SLIDE:function(){n("#slidetitle").length&&s(i.EDIT_SLIDE)},ADD_LAYER:function(){n("#n2-ss-item-container .n2-ss-core-item").on("mousedown",function(){s(i.ADD_LAYER)})}};n(window).ready(function(){for(var s in r)0==(t&i[s])?r[s]():o++;if(n2.jStorage.set("SS3FREELOADS",e+1),e>30&&o>4){n.ajax({type:"GET",url:NextendAjaxHelper.makeAjaxUrl(window.location.href,{nextendcontroller:"settings",nextendaction:"rated"}),dataType:"json"}).done(function(){n2.jStorage.set("SS3FREELOADS",0),n2.jStorage.set("SS3FREE",0)});var a=new NextendModal({zero:{size:[600,440],title:n2_("Hurray! You're almost an expert!"),back:!1,close:!0,content:'<img src="'+nextend.imageHelper.fixed("$ss$/admin/images/free/getpro1.jpg")+'" /><div class="n2-h2">Are you satisfied with Smart Slider 3?</div>',controls:['<a href="#" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("Yes")+"</a>",'<a href="http://smartslider3.com/suggestion/?utm_campaign=smartslider3&utm_source=gopro-not-satisfied&utm_medium=smartslider-'+N2PLATFORM+"-"+(N2SSPRO?"pro":"free")+'" target="_blank" class="n2-button n2-button-big n2-button-red n2-uc n2-h4">'+n2_("No")+"</a>"],fn:{show:function(){this.controls.eq(0).on("click",n.proxy(function(n){n.preventDefault(),this.loadPane("pro")},this)),this.controls.eq(1).find(".n2-button-red").on("click",n.proxy(function(){this.hide()},this))}}},pro:{size:[600,"wordpress"==N2PLATFORM?522:442],title:n2_("Be a professional!"),back:!1,close:!0,content:'<img src="'+nextend.imageHelper.fixed("$ss$/admin/images/free/getpro2.jpg")+'" /><div class="n2-h3">Take your slider to the next level with Smart Slider 3 PRO!</div><a href="'+window.N2SSWHYPRO+'" target="_blank" style="margin-top: 20px;" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("See all features")+"</a>",fn:{show:function(){"wordpress"==N2PLATFORM&&this.content.append('<div class="n2-ss-rate"><div class="n2-h3">If you have a minute share your experience!</div><a href="https://wordpress.org/support/view/plugin-reviews/smart-slider-3" target="_blank" class="n2-button n2-button-big n2-button-green n2-uc n2-h4">'+n2_("Add your own review")+"</a></div>")}}}});a.setCustomClass("n2-ss-go-pro"),a.show()}})}(n2);
library/media/dist/smartslider-frontend.js ADDED
@@ -0,0 +1,6020 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($, scope, undefined) {
2
+
3
+ function NextendSmartSliderBackgroundImages(slider) {
4
+ this.device = null;
5
+
6
+ this.load = $.Deferred();
7
+
8
+ this.slider = slider;
9
+ this.slides = this.slider.realSlides;
10
+
11
+ this.lazyLoad = slider.parameters.lazyLoad;
12
+ this.lazyLoadNeighbor = slider.parameters.lazyLoadNeighbor;
13
+
14
+ this.deviceDeferred = $.Deferred();
15
+
16
+ /**
17
+ * @type {NextendSmartSliderBackgroundImage[]}
18
+ */
19
+ this.backgroundImages = [];
20
+ for (var i = 0; i < this.slides.length; i++) {
21
+ var image = this.slides.eq(i).find('.n2-ss-slide-background');
22
+ if (image.length > 0) {
23
+ this.backgroundImages[i] = new NextendSmartSliderBackgroundImage(i, image, this);
24
+ } else {
25
+ this.backgroundImages[i] = false;
26
+ }
27
+ this.slides.eq(i).data('slideBackground', this.backgroundImages[i]);
28
+ }
29
+
30
+ this.slider.sliderElement.one('SliderDevice', $.proxy(this.onSlideDeviceChangedFirst, this));
31
+
32
+ };
33
+
34
+ NextendSmartSliderBackgroundImages.prototype.whenWithProgress = function (arrayOfPromises) {
35
+ var cntr = 0, defer = $.Deferred();
36
+ for (var i = 0; i < arrayOfPromises.length; i++) {
37
+ arrayOfPromises[i].done(function () {
38
+ defer.notify(++cntr, arrayOfPromises.length);
39
+ });
40
+ }
41
+ // It is kind of an anti-pattern to use our own deferred and
42
+ // then just resolve it when the promise is resolved
43
+ // But, we can only call .notify() on a defer so if we want to use that,
44
+ // we are forced to make our own deferred
45
+ $.when.apply($, arrayOfPromises).done(function () {
46
+ defer.resolveWith(null, arguments);
47
+ });
48
+ return defer.promise();
49
+ };
50
+
51
+ NextendSmartSliderBackgroundImages.prototype.getBackgroundImages = function () {
52
+ return this.backgroundImages;
53
+ };
54
+
55
+ NextendSmartSliderBackgroundImages.prototype.onSlideDeviceChangedFirst = function (e, device) {
56
+ this.onSlideDeviceChanged(e, device);
57
+ this.deviceDeferred.resolve();
58
+ this.slider.sliderElement.on('SliderDevice', $.proxy(this.onSlideDeviceChanged, this));
59
+
60
+ if (this.lazyLoad == 1) {
61
+ this.preLoad = this.preLoadLazyNeighbor;
62
+
63
+ this.load = $.when(this.preLoad(this.slider.currentSlideIndex));
64
+ } else if (this.lazyLoad == 2) { // delayed
65
+ $(window).load($.proxy(this.preLoadAll, this));
66
+
67
+ this.load = $.when(this.preLoad(this.slider.currentSlideIndex));
68
+ } else {
69
+ this.load = this.whenWithProgress(this.preLoadAll());
70
+ }
71
+ };
72
+
73
+ NextendSmartSliderBackgroundImages.prototype.onSlideDeviceChanged = function (e, device) {
74
+ this.device = device;
75
+ for (var i = 0; i < this.backgroundImages.length; i++) {
76
+ if (this.backgroundImages[i]) {
77
+ this.backgroundImages[i].onSlideDeviceChanged(device);
78
+ }
79
+ }
80
+ };
81
+
82
+ NextendSmartSliderBackgroundImages.prototype.changed = function (i) {
83
+ if (this.lazyLoad == 1 || this.lazyLoad == 2) {
84
+ if (i == this.slider.currentSlideIndex) {
85
+ this.preLoad(i);
86
+ }
87
+ } else {
88
+ this.preLoad(i);
89
+ }
90
+ };
91
+
92
+ NextendSmartSliderBackgroundImages.prototype.preLoadCurrent = function () {
93
+ this.preLoad(this.slider.currentSlideIndex);
94
+ };
95
+
96
+ NextendSmartSliderBackgroundImages.prototype.preLoadAll = function () {
97
+ var deferreds = [];
98
+ for (var i = 0; i < this.backgroundImages.length; i++) {
99
+ deferreds.push(this._preLoad(i));
100
+ }
101
+ return deferreds;
102
+ };
103
+
104
+ NextendSmartSliderBackgroundImages.prototype.preLoad = function (i) {
105
+ return this._preLoad(i);
106
+ };
107
+
108
+ NextendSmartSliderBackgroundImages.prototype.preLoadLazyNeighbor = function (i) {
109
+
110
+ var lazyLoadNeighbor = this.lazyLoadNeighbor,
111
+ deferreds = [this._preLoad(i)];
112
+
113
+ if (lazyLoadNeighbor) {
114
+ var j = 0,
115
+ k = i;
116
+ while (j < lazyLoadNeighbor) {
117
+ k--;
118
+ if (k < 0) {
119
+ k = this.backgroundImages.length - 1;
120
+ }
121
+ deferreds.push(this._preLoad(k));
122
+ j++;
123
+ }
124
+ j = 0;
125
+ k = i;
126
+ while (j < lazyLoadNeighbor) {
127
+ k++;
128
+ if (k >= this.backgroundImages.length) {
129
+ k = 0;
130
+ }
131
+ deferreds.push(this._preLoad(k));
132
+ j++;
133
+ }
134
+ }
135
+
136
+ var renderedDeferred = $.Deferred();
137
+ if (deferreds[0].state() != true && deferreds[0].state() != 'resolved') {
138
+ var timeout = setTimeout($.proxy(function () {
139
+ this.slider.load.showSpinner('backgroundImage' + i);
140
+ timeout = null;
141
+ }, this), 50);
142
+
143
+ $.when.apply($, deferreds).done($.proxy(function () {
144
+ if (timeout) {
145
+ clearTimeout(timeout);
146
+ timeout = null;
147
+ } else {
148
+ this.slider.load.removeSpinner('backgroundImage' + i);
149
+ }
150
+ setTimeout(function () {
151
+ renderedDeferred.resolve();
152
+ }, 100);
153
+ }, this));
154
+
155
+ } else {
156
+ setTimeout(function () {
157
+ renderedDeferred.resolve();
158
+ }, 100);
159
+ }
160
+
161
+ return renderedDeferred;
162
+ };
163
+
164
+ NextendSmartSliderBackgroundImages.prototype._preLoad = function (i) {
165
+ if (this.backgroundImages[i]) {
166
+ return this.backgroundImages[i].preLoad();
167
+ } else {
168
+ return true
169
+ }
170
+ };
171
+
172
+ NextendSmartSliderBackgroundImages.prototype.hack = function () {
173
+ for (var i = 0; i < this.backgroundImages.length; i++) {
174
+ if (this.backgroundImages[i]) {
175
+ this.backgroundImages[i].hack();
176
+ }
177
+ }
178
+ };
179
+
180
+ scope.NextendSmartSliderBackgroundImages = NextendSmartSliderBackgroundImages;
181
+
182
+ function NextendSmartSliderBackgroundImage(i, element, manager) {
183
+ this.responsiveElement = false;
184
+ this.loadStarted = false;
185
+
186
+ this.i = i;
187
+ this.element = element;
188
+ this.manager = manager;
189
+ this.loadDeferred = $.Deferred();
190
+
191
+ var image = element.find('.n2-ss-slide-background-image');
192
+ this.image = image;
193
+ if (image.hasClass('n2-ss-slide-simple')) {
194
+ this.mode = 'simple';
195
+ this.currentSrc = image.attr('src');
196
+ } else if (image.hasClass('n2-ss-slide-fill')) {
197
+ this.mode = 'fill';
198
+ this.currentSrc = image.attr('src');
199
+ } else if (image.hasClass('n2-ss-slide-fit')) {
200
+ this.mode = 'fit';
201
+ this.currentSrc = image.attr('src');
202
+ } else if (image.hasClass('n2-ss-slide-stretch')) {
203
+ this.mode = 'stretch';
204
+ this.currentSrc = image.attr('src');
205
+ } else if (image.hasClass('n2-ss-slide-center')) {
206
+ this.mode = 'center';
207
+ var matches = image.css('backgroundImage').match(/url\(["]*([^)"]+)["]*\)/i);
208
+ if (matches.length > 0) {
209
+ this.currentSrc = matches[1];
210
+ }
211
+ } else if (image.hasClass('n2-ss-slide-tile')) {
212
+ this.mode = 'tile';
213
+ var matches = image.css('backgroundImage').match(/url\(["]*([^)"]+)["]*\)/i);
214
+ if (matches.length > 0) {
215
+ this.currentSrc = matches[1];
216
+ }
217
+ } else if (image.hasClass('n2-ss-slide-fixed')) {
218
+ this.mode = 'fixed';
219
+ var matches = image.css('backgroundImage').match(/url\(["]*([^)"]+)["]*\)/i);
220
+ if (matches.length > 0) {
221
+ this.currentSrc = matches[1];
222
+ }
223
+ } else {
224
+ this.mode = 'fill';
225
+ this.currentSrc = '';
226
+ }
227
+
228
+ this.x = image.data('x');
229
+ this.y = image.data('y');
230
+
231
+ this.hash = element.data('hash');
232
+
233
+ this.desktopSrc = element.data('desktop');
234
+ this.tabletSrc = element.data('tablet');
235
+ this.mobileSrc = element.data('mobile');
236
+
237
+ if (nextend.isRetina) {
238
+ var retina = element.data('desktop-retina');
239
+ if (retina) {
240
+ this.desktopSrc = retina;
241
+ }
242
+ retina = element.data('tablet-retina');
243
+ if (retina) {
244
+ this.tabletSrc = retina;
245
+ }
246
+ retina = element.data('mobile-retina');
247
+ if (retina) {
248
+ this.mobileSrc = retina;
249
+ }
250
+ }
251
+ var opacity = element.data('opacity');
252
+ if (opacity >= 0 && opacity < 1) {
253
+ this.opacity = opacity;
254
+ }
255
+
256
+ if (manager.slider.isAdmin) {
257
+ this._change = this.change;
258
+ this.change = this.changeAdmin;
259
+ }
260
+
261
+ this.listenImageManager();
262
+
263
+ };
264
+
265
+ NextendSmartSliderBackgroundImage.prototype.fixNatural = function (DOMelement) {
266
+ var img = new Image();
267
+ img.src = DOMelement.src;
268
+ DOMelement.naturalWidth = img.width;
269
+ DOMelement.naturalHeight = img.height;
270
+ };
271
+
272
+ NextendSmartSliderBackgroundImage.prototype.preLoad = function () {
273
+ if (this.loadDeferred.state() == 'pending') {
274
+ this.loadStarted = true;
275
+ this.manager.deviceDeferred.done($.proxy(function () {
276
+ this.onSlideDeviceChanged(this.manager.device);
277
+ this.element.n2imagesLoaded($.proxy(function () {
278
+ this.isLoaded = true;
279
+ var imageNode = this.image[0];
280
+ if (imageNode.tagName == 'IMG' && typeof imageNode.naturalWidth === 'undefined') {
281
+ this.fixNatural(imageNode);
282
+ }
283
+ this.loadDeferred.resolve(this.element);
284
+ }, this));
285
+ }, this));
286
+ }
287
+ return this.loadDeferred;
288
+ };
289
+
290
+ NextendSmartSliderBackgroundImage.prototype.afterLoaded = function () {
291
+ return $.when(this.loadDeferred, this.manager.slider.responsive.ready);
292
+ };
293
+
294
+ NextendSmartSliderBackgroundImage.prototype.onSlideDeviceChanged = function (device) {
295
+ var newSrc = this.desktopSrc;
296
+ if (device.device == 'mobile') {
297
+ if (this.mobileSrc) {
298
+ newSrc = this.mobileSrc;
299
+ } else if (this.tabletSrc) {
300
+ newSrc = this.tabletSrc;
301
+ }
302
+ } else if (device.device == 'tablet') {
303
+ if (this.tabletSrc) {
304
+ newSrc = this.tabletSrc;
305
+ }
306
+ }
307
+ this.change(newSrc, '', this.mode, this.x, this.y);
308
+ };
309
+
310
+ /**
311
+ * @param {NextendSmartSliderResponsiveElementBackgroundImage} responsiveElement
312
+ */
313
+ NextendSmartSliderBackgroundImage.prototype.addResponsiveElement = function (responsiveElement) {
314
+ this.responsiveElement = responsiveElement;
315
+ };
316
+
317
+ NextendSmartSliderBackgroundImage.prototype.listenImageManager = function () {
318
+ if (this.hash != '') {
319
+ $(window).on(this.hash, $.proxy(this.onImageManagerChanged, this));
320
+ }
321
+ };
322
+
323
+ NextendSmartSliderBackgroundImage.prototype.notListenImageManager = function () {
324
+ if (this.hash != '') {
325
+ $(window).off(this.hash, null, $.proxy(this.onImageManagerChanged, this));
326
+ }
327
+ };
328
+
329
+ NextendSmartSliderBackgroundImage.prototype.onImageManagerChanged = function (e, imageData) {
330
+ this.tabletSrc = imageData.tablet.image;
331
+ this.mobileSrc = imageData.mobile.image;
332
+ if (this.manager.device.device == 'tablet' || this.manager.device.device == 'mobile') {
333
+ this.onSlideDeviceChanged(this.manager.device);
334
+ }
335
+ };
336
+
337
+ NextendSmartSliderBackgroundImage.prototype.changeDesktop = function (src, alt, newMode, x, y) {
338
+ this.notListenImageManager();
339
+ this.desktopSrc = src;
340
+ this.hash = md5(src);
341
+
342
+ if (newMode == 'default') {
343
+ newMode = nextend.smartSlider.slideBackgroundMode;
344
+ }
345
+
346
+ this.change(src, alt, newMode, x, y);
347
+
348
+ if (src != '') {
349
+ var img = new Image();
350
+ img.addEventListener("load", $.proxy(function () {
351
+ $.when(nextend.imageManager.getVisual(src))
352
+ .done($.proxy(function (visual) {
353
+ this.onImageManagerChanged(null, visual.value);
354
+ this.listenImageManager();
355
+ }, this));
356
+ }, this), false);
357
+ img.src = nextend.imageHelper.fixed(src);
358
+ } else {
359
+ this.tabletSrc = '';
360
+ this.mobileSrc = '';
361
+ }
362
+ };
363
+
364
+ NextendSmartSliderBackgroundImage.prototype.changeAdmin = function (src, alt, newMode, x, y) {
365
+ if (this.manager.slider.parameters.dynamicHeight) {
366
+ newMode = 'simple';
367
+ }
368
+ this._change(nextend.imageHelper.fixed(src), alt, newMode, x, y);
369
+ };
370
+
371
+ NextendSmartSliderBackgroundImage.prototype.change = function (src, alt, newMode, x, y) {
372
+ x = parseInt(x);
373
+ y = parseInt(y);
374
+ if (isNaN(x)) {
375
+ x = 50;
376
+ }
377
+ x = Math.max(0, Math.min(100, x));
378
+ if (isNaN(y)) {
379
+ y = 50;
380
+ }
381
+ y = Math.max(0, Math.min(100, y));
382
+ if (this.currentSrc != src || this.mode != newMode || this.x != x || this.y != y) {
383
+ if (this.loadStarted) {
384
+ n2c.log('Slide background changed: ', src);
385
+ var node = null;
386
+ switch (newMode) {
387
+ case 'simple':
388
+ node = $('<img data-x="' + x + '" data-y="' + y + '" src="' + src + '" class="n2-ss-slide-background-image n2-ss-slide-simple" />');
389
+ break;
390
+ case 'fill':
391
+ node = $('<img data-x="' + x + '" data-y="' + y + '" src="' + src + '" class="n2-ss-slide-background-image n2-ss-slide-fill" />');
392
+ this.responsiveElement.setCentered();
393
+ break;
394
+ case 'fit':
395
+ node = $('<img data-x="' + x + '" data-y="' + y + '" src="' + src + '" class="n2-ss-slide-background-image n2-ss-slide-fit" />');
396
+ this.responsiveElement.setCentered();
397
+ break;
398
+ case 'stretch':
399
+ node = $('<img data-x="' + x + '" data-y="' + y + '" src="' + src + '" class="n2-ss-slide-background-image n2-ss-slide-stretch" />');
400
+ this.responsiveElement.unsetCentered();
401
+ break;
402
+ case 'center':
403
+ node = $('<div style="background-image: url(\'' + src + '\');background-position:' + x + '% ' + y + '%;" class="n2-ss-slide-background-image n2-ss-slide-center"></div>');
404
+ this.responsiveElement.unsetCentered();
405
+ break;
406
+ case 'tile':
407
+ node = $('<div style="background-image: url(\'' + src + '\');background-position:' + x + '% ' + y + '%;" class="n2-ss-slide-background-image n2-ss-slide-tile"></div>');
408
+ this.responsiveElement.unsetCentered();
409
+ break;
410
+ }
411
+
412
+ if (src == '') {
413
+ node.css('display', 'none');
414
+ }
415
+ node.css('opacity', this.opacity);
416
+ this.image
417
+ .replaceWith(node)
418
+ .remove();
419
+ this.responsiveElement.element = this.image = node;
420
+ this.currentSrc = src;
421
+ this.mode = newMode;
422
+ this.x = x;
423
+ this.y = y;
424
+
425
+ if (this.loadDeferred.state() == 'pending') {
426
+ this.loadDeferred.resolve();
427
+ }
428
+ this.loadDeferred = $.Deferred();
429
+ this.manager.changed(this.i);
430
+
431
+ switch (newMode) {
432
+ case 'fill':
433
+ case 'fit':
434
+ this.afterLoaded().done($.proxy(function () {
435
+ this.responsiveElement.afterLoaded();
436
+ this.responsiveElement.refreshRatio();
437
+ this.responsiveElement._refreshResize();
438
+ }, this));
439
+ break;
440
+ case 'stretch':
441
+ case 'center':
442
+ case 'tile':
443
+ case 'fixed':
444
+ case 'simple':
445
+ this.responsiveElement._refreshResize();
446
+ break;
447
+ }
448
+ }
449
+ }
450
+ };
451
+
452
+ NextendSmartSliderBackgroundImage.prototype.setOpacity = function (opacity) {
453
+ this.opacity = opacity;
454
+ this.image.css('opacity', opacity);
455
+ };
456
+
457
+ NextendSmartSliderBackgroundImage.prototype.hack = function () {
458
+ NextendTween.set(this.element, {
459
+ rotation: 0.0001
460
+ });
461
+ };
462
+
463
+ scope.NextendSmartSliderBackgroundImage = NextendSmartSliderBackgroundImage;
464
+
465
+
466
+ })(n2, window);
467
+ (function ($, scope, undefined) {
468
+
469
+ function NextendSmartSliderLoad(smartSlider, parameters) {
470
+ this.smartSlider = smartSlider;
471
+ this.spinnerKey = 'fadePlaceholder';
472
+
473
+ this.id = smartSlider.sliderElement.attr('id');
474
+
475
+ this.parameters = $.extend({
476
+ fade: 1,
477
+ scroll: 0
478
+ }, parameters);
479
+
480
+ this.spinner = $('#' + this.id + '-spinner');
481
+
482
+ this.deferred = $.Deferred();
483
+ };
484
+
485
+
486
+ NextendSmartSliderLoad.prototype.start = function () {
487
+ if (this.parameters.scroll) {
488
+
489
+ var $window = $(window);
490
+ $window.on('scroll.' + this.id, $.proxy(this.onScroll, this));
491
+ this.onScroll();
492
+
493
+ } else if (this.parameters.fade) {
494
+ this.loadingArea = $('#' + this.id + '-placeholder').eq(0);
495
+ this.showSpinner('fadePlaceholder');
496
+ n2c.log('Fade on load - start wait');
497
+
498
+
499
+ var spinnerCounter = this.spinner.find('.n2-ss-spinner-counter');
500
+ if (spinnerCounter.length) {
501
+ this.smartSlider.backgroundImages.load.progress($.proxy(function (current, total) {
502
+ spinnerCounter.html(Math.round(current / (total + 1) * 100) + '%');
503
+ }, this));
504
+ }
505
+
506
+ $.when(this.smartSlider.responsive.ready, this.smartSlider.backgroundImages.load).done($.proxy(this.showSlider, this));
507
+
508
+ } else {
509
+ this.smartSlider.responsive.ready.done($.proxy(function () {
510
+ this.showSlider();
511
+ }, this));
512
+ }
513
+ };
514
+
515
+ NextendSmartSliderLoad.prototype.onScroll = function () {
516
+ var $window = $(window);
517
+ if (($window.scrollTop() + $window.height() > (this.smartSlider.sliderElement.offset().top + 100))) {
518
+
519
+ n2c.log('Fade on scroll - reached');
520
+
521
+ $.when(this.smartSlider.responsive.ready, this.smartSlider.backgroundImages.load).done($.proxy(this.showSlider, this));
522
+
523
+ $window.off('scroll.' + this.id);
524
+ }
525
+ };
526
+
527
+ NextendSmartSliderLoad.prototype.showSlider = function (cb) {
528
+ n2c.log('Images loaded');
529
+
530
+ $.when.apply($, this.smartSlider.widgetDeferreds).done($.proxy(function () {
531
+ n2c.log('Event: BeforeVisible');
532
+ this.smartSlider.responsive.doResize();
533
+ this.smartSlider.sliderElement.trigger('BeforeVisible');
534
+
535
+ n2c.log('Fade start');
536
+ this.smartSlider.sliderElement
537
+ .addClass('n2-ss-loaded')
538
+ .removeClass('n2notransition');
539
+
540
+ this.removeSpinner('fadePlaceholder');
541
+ $('#' + this.id + '-placeholder').remove();
542
+ this.loadingArea = this.smartSlider.sliderElement;
543
+
544
+ if (typeof cb === 'function') {
545
+ cb(this.deferred);
546
+ } else {
547
+ this.deferred.resolve();
548
+ }
549
+ }, this));
550
+ };
551
+
552
+ NextendSmartSliderLoad.prototype.loaded = function (fn) {
553
+ this.deferred.done(fn);
554
+ },
555
+
556
+ NextendSmartSliderLoad.prototype.showSpinner = function (spinnerKey) {
557
+ this.spinnerKey = spinnerKey;
558
+ this.spinner.appendTo(this.loadingArea);
559
+ };
560
+
561
+ NextendSmartSliderLoad.prototype.removeSpinner = function (spinnerKey) {
562
+ if (this.spinnerKey == spinnerKey) {
563
+ this.spinner.detach();
564
+ this.spinnerKey = '';
565
+ }
566
+ };
567
+
568
+ scope.NextendSmartSliderLoad = NextendSmartSliderLoad;
569
+
570
+ })(n2, window);
571
+ (function ($, scope, undefined) {
572
+ function NextendSmartSlider() {
573
+ this.sliders = {};
574
+ this.readys = {};
575
+
576
+ this._resetCounters = [];
577
+ }
578
+
579
+ NextendSmartSlider.prototype.makeReady = function (id, slider) {
580
+ this.sliders[id] = slider;
581
+ if (typeof this.readys[id] !== 'undefined') {
582
+ for (var i = 0; i < this.readys[id].length; i++) {
583
+ this.readys[id][i].call(slider, slider, slider.sliderElement);
584
+ }
585
+ }
586
+ };
587
+
588
+ NextendSmartSlider.prototype.ready = function (id, callback) {
589
+ if (typeof this.sliders[id] !== 'undefined') {
590
+ callback.call(this.sliders[id], this.sliders[id], this.sliders[id].sliderElement);
591
+ } else {
592
+ if (typeof this.readys[id] == 'undefined') {
593
+ this.readys[id] = [];
594
+ }
595
+ this.readys[id].push(callback);
596
+ }
597
+ };
598
+
599
+ NextendSmartSlider.prototype.trigger = function (el, event) {
600
+ var $el = n2(el),
601
+ split = event.split(','),
602
+ slide = $el.closest('.n2-ss-slide,.n2-ss-static-slide');
603
+
604
+ if (split.length > 1) {
605
+ if ($.inArray(el, this._resetCounters) == -1) {
606
+ this._resetCounters.push(el);
607
+
608
+ slide.on('layerAnimationSetStart.resetCounter', function () {
609
+ $el.data('eventCounter', 0);
610
+ });
611
+ }
612
+ var counter = $el.data('eventCounter') || 0
613
+ event = split[counter];
614
+ counter++;
615
+ if (counter > split.length - 1) {
616
+ counter = 0;
617
+ }
618
+ $el.data('eventCounter', counter);
619
+ }
620
+ slide.triggerHandler(event);
621
+ };
622
+
623
+ NextendSmartSlider.prototype.applyAction = function (el, action) {
624
+ var ss = n2(el).closest('.n2-ss-slider').data('ss');
625
+ ss[action].apply(ss, Array.prototype.slice.call(arguments, 2));
626
+ };
627
+
628
+ window.n2ss = new NextendSmartSlider();
629
+ })(n2, window);
630
+ (function ($, scope, undefined) {
631
+
632
+ function NextendSmartSliderAbstract(elementID, parameters) {
633
+ this.startedDeferred = $.Deferred();
634
+
635
+ if (elementID instanceof n2) {
636
+ elementID = '#' + elementID.attr('id');
637
+ }
638
+
639
+ var id = elementID.substr(1);
640
+
641
+ if (window[id] && window[id] instanceof NextendSmartSliderAbstract) {
642
+ return false;
643
+ }
644
+
645
+ // Register our object to a global variable
646
+ window[id] = this;
647
+ this.readyDeferred = $.Deferred();
648
+
649
+ $(elementID).n2waitUntilExists(elementID, $.proxy(function () {
650
+ var sliderElement = $(elementID);
651
+
652
+ // Store them as we might need to change them back
653
+ this.nextCarousel = this.next;
654
+ this.previousCarousel = this.previous;
655
+
656
+ if (sliderElement.prop('tagName') == 'SCRIPT') {
657
+ var dependency = sliderElement.data('dependency'),
658
+ delay = sliderElement.data('delay'),
659
+ rocketLoad = $.proxy(function () {
660
+ var rocketSlider = $(sliderElement.html().replace(/<_s_c_r_i_p_t/g, '<script').replace(/<_\/_s_c_r_i_p_t/g, '</script'));
661
+ sliderElement.replaceWith(rocketSlider);
662
+ this.postInit(id, $(elementID), parameters);
663
+ $(window).triggerHandler('n2Rocket', [this.sliderElement]);
664
+ }, this);
665
+ if (dependency && $('#n2-ss-' + dependency).length) {
666
+ n2ss.ready(dependency, $.proxy(function (slider) {
667
+ slider.ready(rocketLoad);
668
+ }, this));
669
+ } else if (delay) {
670
+ setTimeout(rocketLoad, delay);
671
+ } else {
672
+ rocketLoad();
673
+ }
674
+ } else {
675
+ this.postInit(id, sliderElement, parameters);
676
+ }
677
+ }, this), true);
678
+ };
679
+
680
+ NextendSmartSliderAbstract.prototype.postInit = function (id, sliderElement, parameters) {
681
+ if (parameters.isDelayed) {
682
+ setTimeout($.proxy(this._postInit, this, id, sliderElement, parameters), 200);
683
+ } else {
684
+ this._postInit(id, sliderElement, parameters);
685
+ }
686
+ };
687
+
688
+ NextendSmartSliderAbstract.prototype._postInit = function (id, sliderElement, parameters) {
689
+ var hasDimension = sliderElement.is(':visible');
690
+ if (hasDimension) {
691
+ this.__postInit(id, sliderElement, parameters);
692
+ } else {
693
+ setTimeout($.proxy(this._postInit, this, id, sliderElement, parameters), 200);
694
+ }
695
+ };
696
+
697
+ NextendSmartSliderAbstract.prototype.__postInit = function (id, sliderElement, parameters) {
698
+ this.killed = false;
699
+ this.isAdmin = false;
700
+ this.currentSlideIndex = 0;
701
+ this.responsive = false;
702
+ this.layerMode = true;
703
+ this._lastChangeTime = 0;
704
+ n2c.log('Slider init: ', id);
705
+ this.id = parseInt(id.replace('n2-ss-', ''));
706
+
707
+ this.sliderElement = sliderElement.data('ss', this);
708
+
709
+ this.parameters = $.extend({
710
+ admin: false,
711
+ playWhenVisible: 1,
712
+ isStaticEdited: false,
713
+ callbacks: '',
714
+ autoplay: {},
715
+ blockrightclick: false,
716
+ maintainSession: 0,
717
+ align: 'normal',
718
+ controls: {
719
+ drag: false,
720
+ touch: 'horizontal',
721
+ keyboard: false,
722
+ scroll: false,
723
+ tilt: false
724
+ },
725
+ hardwareAcceleration: true,
726
+ layerMode: {
727
+ playOnce: 0,
728
+ playFirstLayer: 1,
729
+ mode: 'skippable',
730
+ inAnimation: 'mainInEnd'
731
+ },
732
+ foreverLayerAnimation: false,
733
+ parallax: {
734
+ enabled: 0,
735
+ mobile: 0,
736
+ horizontal: 'mouse',
737
+ vertical: 'mouse',
738
+ origin: 'enter'
739
+ },
740
+ load: {},
741
+ mainanimation: {},
742
+ randomize: {
743
+ randomize: 0,
744
+ randomizeFirst: 0
745
+ },
746
+ responsive: {},
747
+ lazyload: {
748
+ enabled: 0
749
+ },
750
+ postBackgroundAnimations: false,
751
+ initCallbacks: [],
752
+ dynamicHeight: 0,
753
+ lightbox: [],
754
+ lightboxDeviceImages: [],
755
+ titles: [],
756
+ descriptions: []
757
+ }, parameters);
758
+
759
+ try {
760
+ eval(this.parameters.callbacks);
761
+ } catch (e) {
762
+ console.error(e);
763
+ }
764
+
765
+ this.startVisibilityCheck();
766
+ n2ss.makeReady(this.id, this);
767
+
768
+
769
+ this.widgetDeferreds = [];
770
+ this.sliderElement.on('addWidget', $.proxy(this.addWidget, this));
771
+
772
+ this.isAdmin = !!this.parameters.admin;
773
+ if (this.isAdmin) {
774
+ this.changeTo = function () {
775
+ };
776
+ }
777
+
778
+ this.load = new NextendSmartSliderLoad(this, this.parameters.load);
779
+
780
+ this.findSlides();
781
+
782
+ this.randomize();
783
+
784
+ this.currentSlideIndex = this.__getActiveSlideIndex();
785
+
786
+ var forceActiveSlideIndex = typeof window['ss' + this.id] !== 'undefined' ? parseInt(window['ss' + this.id]) : null;
787
+ if (forceActiveSlideIndex !== null) {
788
+ this.changeActiveBeforeLoad(forceActiveSlideIndex);
789
+ }
790
+
791
+ if (!this.isAdmin && this.parameters.maintainSession && typeof sessionStorage !== 'undefined') {
792
+ var sessionIndex = parseInt(sessionStorage.getItem('ss-' + this.id));
793
+ if (forceActiveSlideIndex === null && sessionIndex !== null) {
794
+ this.changeActiveBeforeLoad(sessionIndex);
795
+ }
796
+ this.sliderElement.on('mainAnimationComplete', $.proxy(function (e, animation, previous, next) {
797
+ sessionStorage.setItem('ss-' + this.id, next);
798
+ }, this));
799
+ }
800
+
801
+ this.backgroundImages = new NextendSmartSliderBackgroundImages(this);
802
+
803
+ n2c.log('First slide index: ', this.currentSlideIndex);
804
+
805
+ for (var i = 0; i < this.parameters.initCallbacks.length; i++) {
806
+ (new Function(this.parameters.initCallbacks[i]))(this);
807
+ }
808
+
809
+ this.initSlides();
810
+
811
+ this.widgets = new NextendSmartSliderWidgets(this);
812
+
813
+ this.sliderElement.on('universalenter', $.proxy(function () {
814
+ this.sliderElement.addClass('n2-hover');
815
+ }, this)).on('universalleave', $.proxy(function (e) {
816
+ e.stopPropagation();
817
+ this.sliderElement.removeClass('n2-hover');
818
+ }, this));
819
+
820
+
821
+ this.controls = {};
822
+
823
+ if (this.layerMode) {
824
+ this.initMainAnimationWithLayerAnimation();
825
+ }
826
+
827
+ if (this.parameters.blockrightclick) {
828
+ this.sliderElement.bind("contextmenu", function (e) {
829
+ e.preventDefault();
830
+ });
831
+ }
832
+
833
+ this.initMainAnimation();
834
+ this.initResponsiveMode();
835
+
836
+ if (this.killed) {
837
+ return;
838
+ }
839
+
840
+ this.initControls();
841
+
842
+ this.startedDeferred.resolve(this);
843
+
844
+ if (!this.isAdmin) {
845
+ var event = 'click';
846
+ if (this.parameters.controls.touch != '0' && this.parameters.controls.touch) {
847
+ event = 'n2click';
848
+ }
849
+ this.sliderElement.find('[data-n2click]').each(function (i, el) {
850
+ var el = $(el);
851
+ el.on(event, function () {
852
+ eval(el.data('n2click'));
853
+ });
854
+ });
855
+
856
+ this.sliderElement.find('[data-click]').each(function (i, el) {
857
+ var el = $(el).on('click', function () {
858
+ eval(el.data('click'));
859
+ }).css('cursor', 'pointer');
860
+ });
861
+
862
+ this.sliderElement.find('[data-n2middleclick]').on('mousedown', function (e) {
863
+ var el = $(this);
864
+ if (e.which == 2 || e.which == 4) {
865
+ e.preventDefault();
866
+ eval(el.data('n2middleclick'));
867
+ }
868
+ });
869
+
870
+ this.sliderElement.find('[data-mouseenter]').each(function (i, el) {
871
+ var el = $(el).on('mouseenter', function () {
872
+ eval(el.data('mouseenter'));
873
+ });
874
+ });
875
+
876
+ this.sliderElement.find('[data-mouseleave]').each(function (i, el) {
877
+ var el = $(el).on('mouseleave', function () {
878
+ eval(el.data('mouseleave'));
879
+ });
880
+ });
881
+
882
+ this.sliderElement.find('[data-play]').each(function (i, el) {
883
+ var el = $(el).on('n2play', function () {
884
+ eval(el.data('play'));
885
+ });
886
+ });
887
+
888
+ this.sliderElement.find('[data-pause]').each(function (i, el) {
889
+ var el = $(el).on('n2pause', function () {
890
+ eval(el.data('pause'));
891
+ });
892
+ });
893
+
894
+ this.sliderElement.find('[data-stop]').each(function (i, el) {
895
+ var el = $(el).on('n2stop', function () {
896
+ eval(el.data('stop'));
897
+ });
898
+ });
899
+
900
+ var preventFocus = false;
901
+ this.slides.find('a').on('mousedown', function (e) {
902
+ preventFocus = true;
903
+ setTimeout(function () {
904
+ preventFocus = false;
905
+ }, 100);
906
+ });
907
+
908
+ this.slides.find('a').on('focus', $.proxy(function (e) {
909
+ if (!preventFocus) {
910
+ var slideIndex = this.findSlideIndexByElement(e.currentTarget);
911
+ if (slideIndex != -1 && slideIndex != this.currentSlideIndex) {
912
+ this.changeTo(slideIndex, false, false);
913
+ }
914
+ }
915
+ }, this));
916
+ }
917
+
918
+ this.preReadyResolve();
919
+
920
+ this.initCarousel();
921
+ };
922
+
923
+ NextendSmartSliderAbstract.prototype.initSlides = function () {
924
+ if (this.layerMode) {
925
+ if (this.isAdmin && this.type != 'showcase') {
926
+ new NextendSmartSliderSlide(this, this.slides.eq(this.currentSlideIndex), 1);
927
+ } else {
928
+ for (var i = 0; i < this.slides.length; i++) {
929
+ new NextendSmartSliderSlide(this, this.slides.eq(i), this.currentSlideIndex == i);
930
+ }
931
+ }
932
+
933
+ var staticSlide = this.findStaticSlide();
934
+ if (staticSlide.length) {
935
+ new NextendSmartSliderSlide(this, staticSlide, true, true);
936
+ }
937
+ }
938
+ };
939
+
940
+ NextendSmartSliderAbstract.prototype.getRealIndex = function (index) {
941
+ return index;
942
+ };
943
+
944
+ NextendSmartSliderAbstract.prototype.changeActiveBeforeLoad = function (index) {
945
+ if (index > 0 && index < this.slides.length && this.currentSlideIndex != index) {
946
+ this.unsetActiveSlide(this.slides.eq(this.currentSlideIndex));
947
+ this.setActiveSlide(this.slides.eq(index));
948
+ this.currentSlideIndex = index;
949
+ this.ready($.proxy(function () {
950
+ this.sliderElement.trigger('sliderSwitchTo', [index, this.getRealIndex(index)]);
951
+ }, this));
952
+ }
953
+ };
954
+
955
+ NextendSmartSliderAbstract.prototype.kill = function () {
956
+ this.killed = true;
957
+ $('#' + this.sliderElement.attr('id') + '-placeholder').remove();
958
+ this.sliderElement.closest('.n2-ss-align').remove();
959
+ };
960
+
961
+ NextendSmartSliderAbstract.prototype.randomize = function () {
962
+ if (this.parameters.randomize.randomizeFirst) {
963
+ this.slides.filter('.n2-ss-slide-active').removeClass('n2-ss-slide-active');
964
+ this.slides.eq(Math.floor(Math.random() * this.slides.length)).addClass('n2-ss-slide-active');
965
+ }
966
+
967
+ if (this.parameters.randomize.randomize) {
968
+ this.shuffleSlides();
969
+ }
970
+ };
971
+
972
+ NextendSmartSliderAbstract.prototype.shuffleSlides = function () {
973
+ for (var i = 0; i < this.slides.length; i++) {
974
+ this.slides.eq(i).data('originalIndex', i);
975
+ }
976
+ this.slides.sort(function () {
977
+ return (Math.round(Math.random()) - 0.5);
978
+ });
979
+ this.slides.appendTo(this.slides.parent());
980
+
981
+ this.shuffled = [];
982
+ for (var i = 0; i < this.slides.length; i++) {
983
+ this.shuffled[i] = this.slides.eq(i).data('originalIndex');
984
+ }
985
+ }
986
+
987
+ NextendSmartSliderAbstract.prototype.findSlides = function () {
988
+
989
+ this.realSlides = this.slides = this.sliderElement.find('.n2-ss-slide');
990
+ };
991
+
992
+ NextendSmartSliderAbstract.prototype.findStaticSlide = function () {
993
+ return this.sliderElement.find('.n2-ss-static-slide');
994
+ };
995
+
996
+ NextendSmartSliderAbstract.prototype.addWidget = function (e, deferred) {
997
+ this.widgetDeferreds.push(deferred);
998
+ };
999
+
1000
+ NextendSmartSliderAbstract.prototype.started = function (fn) {
1001
+ this.startedDeferred.done($.proxy(fn, this));
1002
+ };
1003
+
1004
+ NextendSmartSliderAbstract.prototype.preReadyResolve = function () {
1005
+ // Hack to allow time to widgets to register
1006
+ setTimeout($.proxy(this._preReadyResolve, this), 1);
1007
+ };
1008
+
1009
+ NextendSmartSliderAbstract.prototype._preReadyResolve = function () {
1010
+
1011
+ this.load.start();
1012
+ this.load.loaded($.proxy(this.readyResolve, this));
1013
+ };
1014
+
1015
+ NextendSmartSliderAbstract.prototype.readyResolve = function () {
1016
+ n2c.log('Slider ready');
1017
+ $(window).scroll(); // To force other sliders to recalculate the scroll position
1018
+
1019
+ this.readyDeferred.resolve();
1020
+ };
1021
+
1022
+ NextendSmartSliderAbstract.prototype.ready = function (fn) {
1023
+ this.readyDeferred.done($.proxy(fn, this));
1024
+ };
1025
+
1026
+ NextendSmartSliderAbstract.prototype.startVisibilityCheck = function () {
1027
+ this.visibleDeferred = $.Deferred();
1028
+ if (this.parameters.playWhenVisible) {
1029
+ this.ready($.proxy(function () {
1030
+ $(window).on('scroll.n2-ss-visible' + this.id + ' resize.n2-ss-visible' + this.id, $.proxy(this.checkIfVisible, this));
1031
+ this.checkIfVisible();
1032
+ }, this));
1033
+ } else {
1034
+ this.ready($.proxy(function () {
1035
+ this.visibleDeferred.resolve();
1036
+ }, this));
1037
+ }
1038
+ };
1039
+
1040
+ NextendSmartSliderAbstract.prototype.checkIfVisible = function () {
1041
+ var TopView = $(window).scrollTop(),
1042
+ BotView = TopView + $(window).height(),
1043
+ middlePoint = this.sliderElement.offset().top + this.sliderElement.height() / 2;
1044
+ if (TopView <= middlePoint && BotView >= middlePoint) {
1045
+ $(window).off('scroll.n2-ss-visible' + this.id + ' resize.n2-ss-visible' + this.id, $.proxy(this.checkIfVisible, this));
1046
+ this.visibleDeferred.resolve();
1047
+ }
1048
+ };
1049
+
1050
+ NextendSmartSliderAbstract.prototype.visible = function (fn) {
1051
+ this.visibleDeferred.done($.proxy(fn, this));
1052
+ };
1053
+
1054
+ NextendSmartSliderAbstract.prototype.isPlaying = function () {
1055
+ if (this.mainAnimation.getState() != 'ended') {
1056
+ return true;
1057
+ }
1058
+ return false;
1059
+ };
1060
+
1061
+ NextendSmartSliderAbstract.prototype.focus = function (isSystem) {
1062
+ var deferred = $.Deferred();
1063
+ if (typeof isSystem == 'undefined') {
1064
+ isSystem = 0;
1065
+ }
1066
+ if (this.responsive.parameters.focusUser && !isSystem || this.responsive.parameters.focusAutoplay && isSystem) {
1067
+ var top = this.sliderElement.offset().top - this.responsive.verticalOffsetSelectors.height();
1068
+ if ($(window).scrollTop() != top) {
1069
+ $("html, body").animate({scrollTop: top}, 400, $.proxy(function () {
1070
+ deferred.resolve();
1071
+ }, this));
1072
+ } else {
1073
+ deferred.resolve();
1074
+ }
1075
+ } else {
1076
+ deferred.resolve();
1077
+ }
1078
+ return deferred;
1079
+ };
1080
+
1081
+ NextendSmartSliderAbstract.prototype.initCarousel = function () {
1082
+ if (!parseInt(this.parameters.carousel)) {
1083
+ // Replace the methods
1084
+ this.next = this.nextNotCarousel;
1085
+ this.previous = this.previousNotCarousel;
1086
+
1087
+ var slides = this.slides.length;
1088
+ var previousArrowOpacity = 1,
1089
+ previousArrow = this.sliderElement.find('.nextend-arrow-previous'),
1090
+ previous = function (opacity) {
1091
+ if (opacity != previousArrowOpacity) {
1092
+ NextendTween.to(previousArrow, 0.4, {opacity: opacity}).play();
1093
+ previousArrowOpacity = opacity;
1094
+ }
1095
+ };
1096
+ var nextArrowOpacity = 1,
1097
+ nextArrow = this.sliderElement.find('.nextend-arrow-next'),
1098
+ next = function (opacity) {
1099
+ if (opacity != nextArrowOpacity) {
1100
+ NextendTween.to(nextArrow, 0.4, {opacity: opacity}).play();
1101
+ nextArrowOpacity = opacity;
1102
+ }
1103
+ };
1104
+
1105
+ var process = function (i) {
1106
+ if (i == 0) {
1107
+ previous(0);
1108
+ } else {
1109
+ previous(1);
1110
+ }
1111
+ if (i == slides - 1) {
1112
+ next(0);
1113
+ } else {
1114
+ next(1);
1115
+ }
1116
+ };
1117
+
1118
+ process(this.__getActiveSlideIndex())
1119
+
1120
+ this.sliderElement.on('sliderSwitchTo', function (e, i) {
1121
+ process(i);
1122
+ });
1123
+ }
1124
+ };
1125
+
1126
+ NextendSmartSliderAbstract.prototype.next = function (isSystem, customAnimation) {
1127
+ var nextIndex = this.currentSlideIndex + 1;
1128
+ if (nextIndex >= this.slides.length) {
1129
+ nextIndex = 0;
1130
+ }
1131
+ return this.changeTo(nextIndex, false, isSystem, customAnimation);
1132
+ };
1133
+
1134
+ NextendSmartSliderAbstract.prototype.previous = function (isSystem, customAnimation) {
1135
+ var nextIndex = this.currentSlideIndex - 1;
1136
+ if (nextIndex < 0) {
1137
+ nextIndex = this.slides.length - 1;
1138
+ }
1139
+ return this.changeTo(nextIndex, true, isSystem, customAnimation);
1140
+ };
1141
+
1142
+ NextendSmartSliderAbstract.prototype.nextNotCarousel = function (isSystem, customAnimation) {
1143
+ var nextIndex = this.currentSlideIndex + 1;
1144
+ if (nextIndex < this.slides.length) {
1145
+ return this.changeTo(nextIndex, false, isSystem, customAnimation);
1146
+ }
1147
+ return false;
1148
+ };
1149
+
1150
+ NextendSmartSliderAbstract.prototype.previousNotCarousel = function (isSystem, customAnimation) {
1151
+ var nextIndex = this.currentSlideIndex - 1;
1152
+ if (nextIndex >= 0) {
1153
+ return this.changeTo(nextIndex, true, isSystem, customAnimation);
1154
+ }
1155
+ return false;
1156
+ };
1157
+
1158
+ NextendSmartSliderAbstract.prototype.directionalChangeToReal = function (nextSlideIndex) {
1159
+ this.directionalChangeTo(nextSlideIndex);
1160
+ };
1161
+
1162
+ NextendSmartSliderAbstract.prototype.directionalChangeTo = function (nextSlideIndex) {
1163
+ if (nextSlideIndex > this.currentSlideIndex) {
1164
+ this.changeTo(nextSlideIndex, false);
1165
+ } else {
1166
+ this.changeTo(nextSlideIndex, true);
1167
+ }
1168
+ };
1169
+
1170
+ NextendSmartSliderAbstract.prototype.changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
1171
+ nextSlideIndex = parseInt(nextSlideIndex);
1172
+
1173
+ if (nextSlideIndex != this.currentSlideIndex) {
1174
+ n2c.log('Event: sliderSwitchTo: ', 'targetSlideIndex');
1175
+ this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
1176
+ var time = $.now();
1177
+ $.when(this.backgroundImages.preLoad(nextSlideIndex), this.focus(isSystem)).done($.proxy(function () {
1178
+
1179
+ if (this._lastChangeTime <= time) {
1180
+ this._lastChangeTime = time;
1181
+ // If the current main animation haven't finished yet or the prefered next slide is the same as our current slide we have nothing to do
1182
+ var state = this.mainAnimation.getState();
1183
+ if (state == 'ended') {
1184
+
1185
+ if (typeof isSystem === 'undefined') {
1186
+ isSystem = false;
1187
+ }
1188
+
1189
+ var animation = this.mainAnimation;
1190
+ if (typeof customAnimation !== 'undefined') {
1191
+ animation = customAnimation;
1192
+ }
1193
+
1194
+ this._changeTo(nextSlideIndex, reversed, isSystem, customAnimation);
1195
+
1196
+ n2c.log('Change From:', this.currentSlideIndex, ' To: ', nextSlideIndex, ' Reversed: ', reversed, ' System: ', isSystem);
1197
+ animation.changeTo(this.currentSlideIndex, this.slides.eq(this.currentSlideIndex), nextSlideIndex, this.slides.eq(nextSlideIndex), reversed, isSystem);
1198
+
1199
+ this.currentSlideIndex = nextSlideIndex;
1200
+
1201
+ } else if (state == 'playing') {
1202
+ this.sliderElement.off('.fastChange').one('mainAnimationComplete.fastChange', $.proxy(function () {
1203
+ this.changeTo.call(this, nextSlideIndex, reversed, isSystem, customAnimation);
1204
+ }, this));
1205
+ this.mainAnimation.timeScale(this.mainAnimation.timeScale() * 2);
1206
+ }
1207
+ }
1208
+ }, this));
1209
+ return true;
1210
+ }
1211
+ return false;
1212
+ };
1213
+
1214
+ NextendSmartSliderAbstract.prototype._changeTo = function (nextSlideIndex, reversed, isSystem, customAnimation) {
1215
+
1216
+ };
1217
+
1218
+ NextendSmartSliderAbstract.prototype.revertTo = function (nextSlideIndex, originalNextSlideIndex) {
1219
+ this.unsetActiveSlide(this.slides.eq(originalNextSlideIndex));
1220
+ this.setActiveSlide(this.slides.eq(nextSlideIndex));
1221
+ this.currentSlideIndex = nextSlideIndex;
1222
+ this.sliderElement.trigger('sliderSwitchTo', [nextSlideIndex, this.getRealIndex(nextSlideIndex)]);
1223
+ }
1224
+
1225
+ NextendSmartSliderAbstract.prototype.__getActiveSlideIndex = function () {
1226
+ var index = this.slides.index(this.slides.filter('.n2-ss-slide-active'));
1227
+ if (index === -1) {
1228
+ index = 0;
1229
+ }
1230
+ return index;
1231
+ };
1232
+
1233
+ NextendSmartSliderAbstract.prototype.setActiveSlide = function (slide) {
1234
+ slide.addClass('n2-ss-slide-active');
1235
+ };
1236
+
1237
+ NextendSmartSliderAbstract.prototype.unsetActiveSlide = function (slide) {
1238
+ slide.removeClass('n2-ss-slide-active');
1239
+ };
1240
+
1241
+ NextendSmartSliderAbstract.prototype.initMainAnimationWithLayerAnimation = function () {
1242
+
1243
+ if (this.parameters.layerMode.mode == 'forced') {
1244
+ this.sliderElement.on('preChangeToPlay', $.proxy(function (e, deferred, deferredHandled, currentSlide, nextSlide) {
1245
+ deferredHandled.handled = true;
1246
+ currentSlide.on('layerAnimationCompleteOut.layers', function () {
1247
+ currentSlide.off('layerAnimationCompleteOut.layers');
1248
+ deferred.resolve();
1249
+ });
1250
+ this.callOnSlide(currentSlide, 'playOut');
1251
+ }, this));
1252
+ }
1253
+
1254
+
1255
+ this.sliderElement.on('mainAnimationStart', $.proxy(this.onMainAnimationStartSyncLayers, this, this.parameters.layerMode))
1256
+ .on('reverseModeEnabled', $.proxy(this.onMainAnimationStartSyncLayersReverse, this, this.parameters.layerMode));
1257
+ };
1258
+
1259
+ NextendSmartSliderAbstract.prototype.onMainAnimationStartSyncLayers = function (layerMode, e, animation, previousSlideIndex, currentSlideIndex) {
1260
+ var inSlide = this.slides.eq(currentSlideIndex),
1261
+ outSlide = this.slides.eq(previousSlideIndex);
1262
+ if (layerMode.inAnimation == 'mainInStart') {
1263
+ inSlide.one('mainAnimationStartIn.layers', $.proxy(function () {
1264
+ inSlide.off('mainAnimationStartInCancel.layers');
1265
+ this.callOnSlide(inSlide, 'playIn');
1266
+ }, this));
1267
+ } else if (layerMode.inAnimation == 'mainInEnd') {
1268
+ inSlide.one('mainAnimationCompleteIn.layers', $.proxy(function () {
1269
+ inSlide.off('mainAnimationStartInCancel.layers');
1270
+ this.callOnSlide(inSlide, 'playIn');
1271
+ }, this));
1272
+ }
1273
+
1274
+ if (layerMode.mode == 'skippable') {
1275
+ outSlide.on('mainAnimationCompleteOut.layers', $.proxy(function () {
1276
+ outSlide.off('mainAnimationCompleteOut.layers');
1277
+ if (layerMode.playOnce) {
1278
+ if (!this.parameters.foreverLayerAnimation) {
1279
+ this.callOnSlide(outSlide, 'pause');
1280
+ }
1281
+ } else {
1282
+ this.callOnSlide(outSlide, 'reset');
1283
+ }
1284
+ }, this));
1285
+ }
1286
+
1287
+ inSlide.one('mainAnimationStartInCancel.layers', function () {
1288
+ inSlide.off('mainAnimationStartIn.layers');
1289
+ inSlide.off('mainAnimationCompleteIn.layers');
1290
+ });
1291
+ };
1292
+
1293
+ NextendSmartSliderAbstract.prototype.onMainAnimationStartSyncLayersReverse = function (layerMode, e, reverseSlideIndex) {
1294
+ var reverseSlide = this.slides.eq(reverseSlideIndex);
1295
+ if (layerMode.inAnimation == 'mainInStart') {
1296
+ reverseSlide.one('mainAnimationStartIn.layers', $.proxy(function () {
1297
+ this.callOnSlide(reverseSlide, 'playIn');
1298
+ }, this));
1299
+ } else if (layerMode.inAnimation == 'mainInEnd') {
1300
+ reverseSlide.one('mainAnimationCompleteIn.layers', $.proxy(function () {
1301
+ this.sliderElement.off('mainAnimationComplete.layers');
1302
+ this.callOnSlide(reverseSlide, 'playIn');
1303
+ }, this));
1304
+ }
1305
+
1306
+ this.sliderElement.one('mainAnimationComplete.layers', function () {
1307
+ reverseSlide.off('mainAnimationStartIn.layers');
1308
+ reverseSlide.off('mainAnimationCompleteIn.layers');
1309
+ });
1310
+ };
1311
+
1312
+ NextendSmartSliderAbstract.prototype.callOnSlide = function (slide, functionName) {
1313
+ slide.data('slide')[functionName]();
1314
+ };
1315
+
1316
+ NextendSmartSliderAbstract.prototype.findSlideIndexByElement = function (element) {
1317
+ element = $(element);
1318
+ for (var i = 0; i < this.slides.length; i++) {
1319
+ if (this.slides.eq(i).has(element).length === 1) {
1320
+ return i;
1321
+ }
1322
+ }
1323
+ return -1;
1324
+ };
1325
+
1326
+ NextendSmartSliderAbstract.prototype.initMainAnimation = function () {
1327
+ };
1328
+
1329
+ NextendSmartSliderAbstract.prototype.initResponsiveMode = function () {
1330
+ new scope[this.responsiveClass](this, this.parameters.responsive);
1331
+ this.dimensions = this.responsive.responsiveDimensions;
1332
+ };
1333
+
1334
+ NextendSmartSliderAbstract.prototype.initControls = function () {
1335
+
1336
+ if (!this.parameters.admin) {
1337
+ if (this.parameters.controls.touch != '0') {
1338
+ new NextendSmartSliderControlTouch(this, this.parameters.controls.touch, {
1339
+ fallbackToMouseEvents: this.parameters.controls.drag
1340
+ });
1341
+ }
1342
+
1343
+ if (this.parameters.controls.keyboard) {
1344
+ if (typeof this.controls.touch !== 'undefined') {
1345
+ new NextendSmartSliderControlKeyboard(this, this.controls.touch._direction.axis);
1346
+ } else {
1347
+ new NextendSmartSliderControlKeyboard(this, 'horizontal');
1348
+ }
1349
+ }
1350
+
1351
+ if (this.parameters.controls.scroll) {
1352
+ new NextendSmartSliderControlScroll(this);
1353
+ }
1354
+
1355
+ if (this.parameters.controls.tilt) {
1356
+ new NextendSmartSliderControlTilt(this);
1357
+ }
1358
+
1359
+ new NextendSmartSliderControlAutoplay(this, this.parameters.autoplay);
1360
+
1361
+ }
1362
+ };
1363
+
1364
+ NextendSmartSliderAbstract.prototype.slideToID = function (id, direction) {
1365
+ var index = this.slides.index(this.slides.filter('[data-id="' + id + '"]'));
1366
+ if (index != -1) {
1367
+ return this.slide(index, direction);
1368
+ }
1369
+
1370
+ var slider = $('[data-id="' + id + '"]').closest('.n2-ss-slider');
1371
+ if (slider.length) {
1372
+ var offsetTop = 0;
1373
+ if (typeof n2ScrollOffsetSelector !== "undefined") {
1374
+ offsetTop = n2(n2ScrollOffsetSelector).outerHeight();
1375
+ }
1376
+ n2("html, body").animate({scrollTop: slider.offset().top - offsetTop}, 400);
1377
+ return slider.data('ss').slideToID(id, direction);
1378
+ }
1379
+ };
1380
+
1381
+ NextendSmartSliderAbstract.prototype.slide = function (index, direction) {
1382
+ if (index >= 0 && index < this.slides.length) {
1383
+ if (typeof direction == 'undefined') {
1384
+ if (parseInt(this.parameters.carousel)) {
1385
+ if (this.currentSlideIndex == this.slides.length - 1 && index == 0) {
1386
+ return this.next();
1387
+ } else {
1388
+ if (this.currentSlideIndex > index) {
1389
+ return this.changeTo(index, true);
1390
+ } else {
1391
+ return this.changeTo(index);
1392
+ }
1393
+ }
1394
+ } else {
1395
+ if (this.currentSlideIndex > index) {
1396
+ return this.changeTo(index, true);
1397
+ } else {
1398
+ return this.changeTo(index);
1399
+ }
1400
+ }
1401
+ } else {
1402
+ return this.changeTo(index, !direction);
1403
+ }
1404
+ }
1405
+ return false;
1406
+ };
1407
+
1408
+ NextendSmartSliderAbstract.prototype.adminGetCurrentSlideElement = function () {
1409
+
1410
+ if (this.parameters.isStaticEdited) {
1411
+ return this.findStaticSlide();
1412
+ }
1413
+ return this.slides.eq(this.currentSlideIndex);
1414
+ };
1415
+
1416
+ scope.NextendSmartSliderAbstract = NextendSmartSliderAbstract;
1417
+
1418
+ ;
1419
+ (function ($, window) {
1420
+
1421
+ var intervals = {};
1422
+ var removeListener = function (selector) {
1423
+
1424
+ if (intervals[selector]) {
1425
+
1426
+ window.clearInterval(intervals[selector]);
1427
+ intervals[selector] = null;
1428
+ }
1429
+ };
1430
+ var found = 'n2waitUntilExists.found';
1431
+
1432
+ /**
1433
+ * @function
1434
+ * @property {object} jQuery plugin which runs handler function once specified
1435
+ * element is inserted into the DOM
1436
+ * @param {function|string} handler
1437
+ * A function to execute at the time when the element is inserted or
1438
+ * string "remove" to remove the listener from the given selector
1439
+ * @param {bool} shouldRunHandlerOnce
1440
+ * Optional: if true, handler is unbound after its first invocation
1441
+ * @example jQuery(selector).n2waitUntilExists(function);
1442
+ */
1443
+
1444
+ $.fn.n2waitUntilExists = function (selector, handler, shouldRunHandlerOnce, isChild) {
1445
+ var $this = $(selector);
1446
+ var $elements = $this.not(function () {
1447
+ return $(this).data(found);
1448
+ });
1449
+
1450
+ if (handler === 'remove') {
1451
+
1452
+ // Hijack and remove interval immediately if the code requests
1453
+ removeListener(selector);
1454
+ }
1455
+ else {
1456
+
1457
+ // Run the handler on all found elements and mark as found
1458
+ $elements.each(handler).data(found, true);
1459
+
1460
+ if (shouldRunHandlerOnce && $this.length) {
1461
+
1462
+ // Element was found, implying the handler already ran for all
1463
+ // matched elements
1464
+ removeListener(selector);
1465
+ }
1466
+ else if (!isChild) {
1467
+
1468
+ // If this is a recurring search or if the target has not yet been
1469
+ // found, create an interval to continue searching for the target
1470
+ intervals[selector] = window.setInterval(function () {
1471
+
1472
+ $this.n2waitUntilExists(selector, handler, shouldRunHandlerOnce, true);
1473
+ }, 500);
1474
+ }
1475
+ }
1476
+
1477
+ return $this;
1478
+ };
1479
+
1480
+ }(n2, window));
1481
+
1482
+ })(n2, window);
1483
+ (function ($, scope, undefined) {
1484
+
1485
+ function NextendSmartSliderWidgets(slider) {
1486
+ this.slider = slider;
1487
+ this.sliderElement = slider.sliderElement.on('BeforeVisible', $.proxy(this.onReady, this));
1488
+
1489
+ this.initExcludeSlides();
1490
+ }
1491
+
1492
+ NextendSmartSliderWidgets.prototype.onReady = function () {
1493
+ this.dimensions = this.slider.dimensions;
1494
+
1495
+ this.widgets = {
1496
+ previous: this.sliderElement.find('.nextend-arrow-previous'),
1497
+ next: this.sliderElement.find('.nextend-arrow-next'),
1498
+ bullet: this.sliderElement.find('.nextend-bullet-bar'),
1499
+ autoplay: this.sliderElement.find('.nextend-autoplay'),
1500
+ indicator: this.sliderElement.find('.nextend-indicator'),
1501
+ bar: this.sliderElement.find('.nextend-bar'),
1502
+ thumbnail: this.sliderElement.find('.nextend-thumbnail'),
1503
+ shadow: this.sliderElement.find('.nextend-shadow'),
1504
+ fullscreen: this.sliderElement.find('.nextend-fullscreen'),
1505
+ html: this.sliderElement.find('.nextend-widget-html')
1506
+ };
1507
+
1508
+ this.variableElementsDimension = {
1509
+ width: this.sliderElement.find('[data-sswidth]'),
1510
+ height: this.sliderElement.find('[data-ssheight]')
1511
+ };
1512
+
1513
+ this.variableElements = {
1514
+ top: this.sliderElement.find('[data-sstop]'),
1515
+ right: this.sliderElement.find('[data-ssright]'),
1516
+ bottom: this.sliderElement.find('[data-ssbottom]'),
1517
+ left: this.sliderElement.find('[data-ssleft]')
1518
+ };
1519
+
1520
+ this.slider.sliderElement.on('SliderAnimatedResize', $.proxy(this.onAnimatedResize, this));
1521
+ this.slider.sliderElement.on('SliderResize', $.proxy(this.onResize, this));
1522
+ this.slider.sliderElement.one('slideCountChanged', $.proxy(function () {
1523
+ this.onResize(this.slider.responsive.lastRatios);
1524
+ }, this));
1525
+
1526
+ //this.slider.ready($.proxy(function () {
1527
+ this.onResize(this.slider.responsive.lastRatios);
1528
+ //}, this));
1529
+ this.initHover();
1530
+ };
1531
+
1532
+ NextendSmartSliderWidgets.prototype.initHover = function () {
1533
+ var timeout = null,
1534
+ widgets = this.sliderElement.find('.n2-ss-widget-hover');
1535
+ if (widgets.length > 0) {
1536
+ this.sliderElement.on('universalenter', function (e) {
1537
+ var slider = $(this);
1538
+ if (timeout) clearTimeout(timeout);
1539
+ widgets.css('visibility', 'visible');
1540
+ setTimeout(function () {
1541
+ slider.addClass('n2-ss-widget-hover-show');
1542
+ }, 50);
1543
+ }).on('universalleave', function () {
1544
+ var slide = this;
1545
+ if (timeout) clearTimeout(timeout);
1546
+ timeout = setTimeout(function () {
1547
+ $(slide).removeClass('n2-ss-widget-hover-show');
1548
+ timeout = setTimeout(function () {
1549
+ widgets.css('visibility', 'hidden');
1550
+ }, 400);
1551
+ }, 500);
1552
+ });
1553
+ }
1554
+ };
1555
+
1556
+ NextendSmartSliderWidgets.prototype.initExcludeSlides = function () {
1557
+ var widgets = this.sliderElement.find('.n2-ss-widget[data-exclude-slides]'),
1558
+ hideOrShow = function (widget, excludedSlides, currentSlideIndex) {
1559
+ if ($.inArray((currentSlideIndex + 1) + '', excludedSlides) != -1) {
1560
+ widget.addClass('n2-ss-widget-hidden');
1561
+ } else {
1562
+ widget.removeClass('n2-ss-widget-hidden');
1563
+ }
1564
+ };
1565
+ widgets.each($.proxy(function (i, el) {
1566
+ var widget = $(el),
1567
+ excludedSlides = widget.attr('data-exclude-slides').split(',');
1568
+ for (var i = excludedSlides.length - 1; i >= 0; i--) {
1569
+ var parts = excludedSlides[i].split('-');
1570
+ if (parts.length == 2 && parseInt(parts[0]) <= parseInt(parts[1])) {
1571
+ excludedSlides[i] = parts[0];
1572
+ parts[0] = parseInt(parts[0]);
1573
+ parts[1] = parseInt(parts[1]);
1574
+ for (var j = parts[0] + 1; j <= parts[1]; j++) {
1575
+ excludedSlides.push(j + '');
1576
+ }
1577
+ }
1578
+ }
1579
+ hideOrShow(widget, excludedSlides, this.slider.currentSlideIndex);
1580
+ this.slider.sliderElement
1581
+ .on('sliderSwitchTo', function (e, targetSlideIndex) {
1582
+ hideOrShow(widget, excludedSlides, targetSlideIndex);
1583
+ });
1584
+ }, this));
1585
+ };
1586
+
1587
+ NextendSmartSliderWidgets.prototype.onAnimatedResize = function (e, ratios, timeline, duration) {
1588
+ for (var key in this.widgets) {
1589
+ var el = this.widgets[key],
1590
+ visible = el.is(":visible");
1591
+ this.dimensions[key + 'width'] = visible ? el.outerWidth(false) : 0;
1592
+ this.dimensions[key + 'height'] = visible ? el.outerHeight(false) : 0;
1593
+ }
1594
+
1595
+ // Compatibility variables for the old version
1596
+ this.dimensions['width'] = this.dimensions.slider.width;
1597
+ this.dimensions['height'] = this.dimensions.slider.height;
1598
+ this.dimensions['outerwidth'] = this.sliderElement.parent().width();
1599
+ this.dimensions['outerheight'] = this.sliderElement.parent().height();
1600
+ this.dimensions['canvaswidth'] = this.dimensions.slide.width;
1601
+ this.dimensions['canvasheight'] = this.dimensions.slide.height;
1602
+ this.dimensions['margintop'] = this.dimensions.slider.marginTop;
1603
+ this.dimensions['marginright'] = this.dimensions.slider.marginRight;
1604
+ this.dimensions['marginbottom'] = this.dimensions.slider.marginBottom;
1605
+ this.dimensions['marginleft'] = this.dimensions.slider.marginLeft;
1606
+
1607
+ var variableText = '';
1608
+ for (var key in this.dimensions) {
1609
+ var value = this.dimensions[key];
1610
+ if (typeof value == "object") {
1611
+ for (var key2 in value) {
1612
+ variableText += "var " + key + key2 + " = " + value[key2] + ";";
1613
+ }
1614
+ } else {
1615
+ variableText += "var " + key + " = " + value + ";";
1616
+ }
1617
+ }
1618
+ eval(variableText);
1619
+
1620
+ for (var k in this.variableElementsDimension) {
1621
+ for (var i = 0; i < this.variableElementsDimension[k].length; i++) {
1622
+ var el = this.variableElementsDimension[k].eq(i);
1623
+ if (el.is(':visible')) {
1624
+ var to = {};
1625
+ try {
1626
+ to[k] = eval(el.data('ss' + k)) + 'px';
1627
+ for (var widget in this.widgets) {
1628
+ if (this.widgets[widget].filter(el).length) {
1629
+ if (k == 'width') {
1630
+ this.dimensions[widget + k] = el.outerWidth(false);
1631
+ } else if (k == 'height') {
1632
+ this.dimensions[widget + k] = el.outerHeight(false);
1633
+ }
1634
+ eval(widget + k + " = " + this.dimensions[widget + k] + ";");
1635
+ }
1636
+ }
1637
+ } catch (e) {
1638
+ console.log(el, ' position variable: ' + e.message + ': ', el.data('ss' + k));
1639
+ }
1640
+ timeline.to(el, duration, to, 0);
1641
+ }
1642
+ }
1643
+ }
1644
+
1645
+ for (var k in this.variableElements) {
1646
+ for (var i = 0; i < this.variableElements[k].length; i++) {
1647
+ var el = this.variableElements[k].eq(i);
1648
+ try {
1649
+ var to = {};
1650
+ to[k] = eval(el.data('ss' + k)) + 'px';
1651
+ timeline.to(el, duration, to, 0);
1652
+ } catch (e) {
1653
+ console.log(el, ' position variable: ' + e.message + ': ', el.data('ss' + k));
1654
+ }
1655
+ }
1656
+ }
1657
+ };
1658
+
1659
+
1660
+ NextendSmartSliderWidgets.prototype.onResize = function (e, ratios, responsive, timeline) {
1661
+ if (timeline) {
1662
+ return;
1663
+ }
1664
+
1665
+
1666
+ for (var k in this.variableElements) {
1667
+ for (var i = 0; i < this.variableElements[k].length; i++) {
1668
+ var last = this.variableElements[k].data('n2Last' + k);
1669
+ if (last > 0) {
1670
+ this.variableElements[k].css(k, 0);
1671
+ }
1672
+ }
1673
+ }
1674
+
1675
+ for (var key in this.widgets) {
1676
+ var el = this.widgets[key],
1677
+ visible = el.length && el.is(":visible");
1678
+ if (el.length && el.is(":visible")) {
1679
+ this.dimensions[key + 'width'] = el.outerWidth(false);
1680
+ this.dimensions[key + 'height'] = el.outerHeight(false);
1681
+
1682
+ } else {
1683
+ this.dimensions[key + 'width'] = 0;
1684
+ this.dimensions[key + 'height'] = 0;
1685
+ }
1686
+ }
1687
+
1688
+
1689
+ for (var k in this.variableElements) {
1690
+ for (var i = 0; i < this.variableElements[k].length; i++) {
1691
+ var last = this.variableElements[k].data('n2Last' + k);
1692
+ if (last > 0) {
1693
+ this.variableElements[k].css(k, last);
1694
+ }
1695
+ }
1696
+ }
1697
+
1698
+ // Compatibility variables for the old version
1699
+ this.dimensions['width'] = this.dimensions.slider.width;
1700
+ this.dimensions['height'] = this.dimensions.slider.height;
1701
+ this.dimensions['outerwidth'] = this.sliderElement.parent().width();
1702
+ this.dimensions['outerheight'] = this.sliderElement.parent().height();
1703
+ this.dimensions['canvaswidth'] = this.dimensions.slide.width;
1704
+ this.dimensions['canvasheight'] = this.dimensions.slide.height;
1705
+ this.dimensions['margintop'] = this.dimensions.slider.marginTop;
1706
+ this.dimensions['marginright'] = this.dimensions.slider.marginRight;
1707
+ this.dimensions['marginbottom'] = this.dimensions.slider.marginBottom;
1708
+ this.dimensions['marginleft'] = this.dimensions.slider.marginLeft;
1709
+
1710
+ var variableText = '';
1711
+ for (var key in this.dimensions) {
1712
+ var value = this.dimensions[key];
1713
+ if (typeof value == "object") {
1714
+ for (var key2 in value) {
1715
+ variableText += "var " + key + key2 + " = " + value[key2] + ";";
1716
+ }
1717
+ } else {
1718
+ variableText += "var " + key + " = " + value + ";";
1719
+ }
1720
+ }
1721
+ eval(variableText);
1722
+
1723
+ for (var k in this.variableElementsDimension) {
1724
+ for (var i = 0; i < this.variableElementsDimension[k].length; i++) {
1725
+ var el = this.variableElementsDimension[k].eq(i);
1726
+ if (el.is(':visible')) {
1727
+ try {
1728
+ el.css(k, eval(el.data('ss' + k)) + 'px');
1729
+ for (var widget in this.widgets) {
1730
+ if (this.widgets[widget].filter(el).length) {
1731
+ if (k == 'width') {
1732
+ this.dimensions[widget + k] = el.outerWidth(false);
1733
+ } else if (k == 'height') {
1734
+ this.dimensions[widget + k] = el.outerHeight(false);
1735
+ }
1736
+ eval(widget + k + " = " + this.dimensions[widget + k] + ";");
1737
+ }
1738
+ }
1739
+ } catch (e) {
1740
+ console.log(el, ' position variable: ' + e.message + ': ', el.data('ss' + k));
1741
+ }
1742
+ }
1743
+ }
1744
+ }
1745
+
1746
+ for (var k in this.variableElements) {
1747
+ for (var i = 0; i < this.variableElements[k].length; i++) {
1748
+ var el = this.variableElements[k].eq(i);
1749
+ try {
1750
+ var value = eval(el.data('ss' + k));
1751
+ el.css(k, value + 'px');
1752
+ el.data('n2Last' + k, value);
1753
+ } catch (e) {
1754
+ console.log(el, ' position variable: ' + e.message + ': ', el.data('ss' + k));
1755
+ }
1756
+ }
1757
+ }
1758
+
1759
+ this.slider.responsive.refreshStaticSizes();
1760
+
1761
+ };
1762
+
1763
+ scope.NextendSmartSliderWidgets = NextendSmartSliderWidgets;
1764
+
1765
+ })(n2, window);
1766
+ (function ($, scope, undefined) {
1767
+ function NextendSmartSliderBackgroundAnimationAbstract(sliderBackgroundAnimation, currentImage, nextImage, animationProperties, durationMultiplier, reversed) {
1768
+
1769
+ this.durationMultiplier = durationMultiplier;
1770
+
1771
+ this.original = {
1772
+ currentImage: currentImage,
1773
+ nextImage: nextImage
1774
+ };
1775
+
1776
+ this.animationProperties = animationProperties;
1777
+
1778
+ this.reversed = reversed;
1779
+
1780
+ this.timeline = sliderBackgroundAnimation.timeline;
1781
+
1782
+ this.containerElement = sliderBackgroundAnimation.bgAnimationElement;
1783
+
1784
+ this.shiftedBackgroundAnimation = sliderBackgroundAnimation.parameters.shiftedBackgroundAnimation;
1785
+
1786
+ this.clonedImages = {};
1787
+
1788
+ };
1789
+
1790
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.postSetup = function () {
1791
+ };
1792
+
1793
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.ended = function () {
1794
+
1795
+ };
1796
+
1797
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.revertEnded = function () {
1798
+
1799
+ };
1800
+
1801
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.placeNextImage = function () {
1802
+ this.clonedImages.nextImage = this.original.nextImage.clone().css({
1803
+ position: 'absolute',
1804
+ top: 0,
1805
+ left: 0
1806
+ });
1807
+
1808
+ this.containerElement.append(this.clonedImages.nextImage);
1809
+ };
1810
+
1811
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.placeCurrentImage = function () {
1812
+ this.clonedImages.currentImage = this.original.currentImage.clone().css({
1813
+ position: 'absolute',
1814
+ top: 0,
1815
+ left: 0
1816
+ });
1817
+
1818
+ this.containerElement.append(this.clonedImages.currentImage);
1819
+ };
1820
+
1821
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.hideOriginals = function () {
1822
+ this.original.currentImage.css('opacity', 0);
1823
+ this.original.nextImage.css('opacity', 0);
1824
+ };
1825
+
1826
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.resetAll = function () {
1827
+ this.original.currentImage.css('opacity', 1);
1828
+ this.original.nextImage.css('opacity', 1);
1829
+ this.containerElement.html('');
1830
+ };
1831
+
1832
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.getExtraDelay = function () {
1833
+ return 0;
1834
+ };
1835
+
1836
+ scope.NextendSmartSliderBackgroundAnimationAbstract = NextendSmartSliderBackgroundAnimationAbstract;
1837
+ })(n2, window);
1838
+
1839
+ (function ($, scope, undefined) {
1840
+
1841
+ function NextendSmartSliderBackgroundAnimationFluxAbstract() {
1842
+ this.shiftedPreSetup = false;
1843
+ this._clonedCurrent = false;
1844
+ this._clonedNext = false;
1845
+
1846
+ NextendSmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this, arguments);
1847
+
1848
+ this.w = this.original.currentImage.width();
1849
+ this.h = this.original.currentImage.height();
1850
+ };
1851
+
1852
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype = Object.create(NextendSmartSliderBackgroundAnimationAbstract.prototype);
1853
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.constructor = NextendSmartSliderBackgroundAnimationFluxAbstract;
1854
+
1855
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.clonedCurrent = function () {
1856
+ if (!this._clonedCurrent) {
1857
+ this._clonedCurrent = this.original.currentImage
1858
+ .clone()
1859
+ .css({
1860
+ width: this.w,
1861
+ height: this.h
1862
+ });
1863
+ }
1864
+ return this._clonedCurrent;
1865
+ };
1866
+
1867
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.clonedNext = function () {
1868
+ if (!this._clonedNext) {
1869
+ this._clonedNext = this.original.nextImage
1870
+ .clone()
1871
+ .css({
1872
+ width: this.w,
1873
+ height: this.h
1874
+ });
1875
+ }
1876
+ return this._clonedNext;
1877
+ };
1878
+
1879
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.preSetup = function () {
1880
+ if (this.shiftedBackgroundAnimation != 0) {
1881
+ this.shiftedPreSetup = true;
1882
+ } else {
1883
+ this._preSetup();
1884
+ }
1885
+ };
1886
+
1887
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype._preSetup = function (skipFadeOut) {
1888
+ this.timeline.to(this.original.currentImage.get(0), this.getExtraDelay(), {
1889
+ opacity: 0
1890
+ }, 0);
1891
+
1892
+ this.original.nextImage.css('opacity', 0);
1893
+ };
1894
+
1895
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.postSetup = function () {
1896
+ this.timeline.to(this.original.nextImage.get(0), this.getExtraDelay(), {
1897
+ opacity: 1
1898
+ });
1899
+ };
1900
+
1901
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.getExtraDelay = function () {
1902
+ return .2;
1903
+ };
1904
+
1905
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.ended = function () {
1906
+ this.original.currentImage.css('opacity', 1);
1907
+ this.containerElement.html('');
1908
+ };
1909
+
1910
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.revertEnded = function () {
1911
+ this.original.nextImage.css('opacity', 1);
1912
+ this.containerElement.html('');
1913
+ };
1914
+
1915
+ scope.NextendSmartSliderBackgroundAnimationFluxAbstract = NextendSmartSliderBackgroundAnimationFluxAbstract;
1916
+
1917
+
1918
+ function NextendSmartSliderBackgroundAnimationTiled() {
1919
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this, arguments);
1920
+
1921
+ this.setup();
1922
+ };
1923
+
1924
+ NextendSmartSliderBackgroundAnimationTiled.prototype = Object.create(NextendSmartSliderBackgroundAnimationFluxAbstract.prototype);
1925
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor = NextendSmartSliderBackgroundAnimationTiled;
1926
+
1927
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup = function (animation) {
1928
+
1929
+ var container = $('<div></div>').css({
1930
+ position: 'absolute',
1931
+ left: 0,
1932
+ top: 0,
1933
+ width: this.w,
1934
+ height: this.h/*,
1935
+ overflow: 'hidden'*/
1936
+ });
1937
+ this.container = container;
1938
+ NextendTween.set(container.get(0), {
1939
+ force3D: true,
1940
+ perspective: 1000
1941
+ });
1942
+
1943
+ var animatablesMulti = [],
1944
+ animatables = [];
1945
+
1946
+ var columns = animation.columns,
1947
+ rows = animation.rows,
1948
+ colWidth = Math.floor(this.w / columns),
1949
+ rowHeight = Math.floor(this.h / rows);
1950
+
1951
+ var colRemainder = this.w - (columns * colWidth),
1952
+ colAddPerLoop = Math.ceil(colRemainder / columns),
1953
+ rowRemainder = this.h - (rows * rowHeight),
1954
+ rowAddPerLoop = Math.ceil(rowRemainder / rows),
1955
+ totalLeft = 0;
1956
+
1957
+ for (var col = 0; col < columns; col++) {
1958
+ animatablesMulti[col] = [];
1959
+ var thisColWidth = colWidth,
1960
+ totalTop = 0;
1961
+
1962
+ if (colRemainder > 0) {
1963
+ var add = colRemainder >= colAddPerLoop ? colAddPerLoop : colRemainder;
1964
+ thisColWidth += add;
1965
+ colRemainder -= add;
1966
+ }
1967
+
1968
+ var thisRowRemainder = rowRemainder;
1969
+
1970
+ for (var row = 0; row < rows; row++) {
1971
+ var thisRowHeight = rowHeight;
1972
+
1973
+ if (thisRowRemainder > 0) {
1974
+ var add = thisRowRemainder >= rowAddPerLoop ? rowAddPerLoop : thisRowRemainder;
1975
+ thisRowHeight += add;
1976
+ thisRowRemainder -= add;
1977
+ }
1978
+ var tile = $('<div class="tile tile-' + col + '-' + row + '"></div>').css({
1979
+ position: 'absolute',
1980
+ top: totalTop + 'px',
1981
+ left: totalLeft + 'px',
1982
+ width: thisColWidth + 'px',
1983
+ height: thisRowHeight + 'px',
1984
+ zIndex: -Math.abs(col - parseInt(columns / 2)) + columns - Math.abs(row - parseInt(rows / 2))
1985
+ }).appendTo(container);
1986
+
1987
+ var animatable = this.renderTile(tile, thisColWidth, thisRowHeight, animation, totalLeft, totalTop);
1988
+ animatables.push(animatable);
1989
+ animatablesMulti[col][row] = animatable;
1990
+
1991
+ totalTop += thisRowHeight;
1992
+ }
1993
+ totalLeft += thisColWidth;
1994
+ }
1995
+
1996
+ container.appendTo(this.containerElement);
1997
+
1998
+ this.preSetup();
1999
+
2000
+ this.animate(animation, animatables, animatablesMulti);
2001
+ };
2002
+
2003
+ NextendSmartSliderBackgroundAnimationTiled.prototype.animate = function (animation, animatables, animatablesMulti) {
2004
+ this['sequence' + animation.tiles.sequence]($.proxy(this.transform, this, animation), animatables, animatablesMulti, animation.tiles.delay * this.durationMultiplier);
2005
+ };
2006
+
2007
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceParallel = function (transform, cuboids) {
2008
+ transform(cuboids, null);
2009
+ };
2010
+
2011
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceRandom = function (transform, cuboids, cuboidsMulti, delay) {
2012
+ var total = this.timeline.totalDuration();
2013
+ for (var i = 0; i < cuboids.length; i++) {
2014
+ transform(cuboids[i], total + Math.random() * delay);
2015
+ }
2016
+ };
2017
+
2018
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceForwardCol = function (transform, cuboids, cuboidsMulti, delay) {
2019
+ var total = this.timeline.totalDuration();
2020
+ for (var i = 0; i < cuboids.length; i++) {
2021
+ transform(cuboids[i], total + delay * i);
2022
+ }
2023
+ };
2024
+
2025
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceBackwardCol = function (transform, cuboids, cuboidsMulti, delay) {
2026
+ var total = this.timeline.totalDuration(),
2027
+ length = cuboids.length - 1;
2028
+ for (var i = 0; i < cuboids.length; i++) {
2029
+ transform(cuboids[i], total + delay * (length - i));
2030
+ }
2031
+ };
2032
+
2033
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceForwardRow = function (transform, cuboids, cuboidsMulti, delay) {
2034
+ var total = this.timeline.totalDuration(),
2035
+ i = 0;
2036
+ for (var row = 0; row < cuboidsMulti[0].length; row++) {
2037
+ for (var col = 0; col < cuboidsMulti.length; col++) {
2038
+ transform(cuboidsMulti[col][row], total + delay * i);
2039
+ i++;
2040
+ }
2041
+ }
2042
+ };
2043
+
2044
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceBackwardRow = function (transform, cuboids, cuboidsMulti, delay) {
2045
+ var total = this.timeline.totalDuration(),
2046
+ i = cuboids.length - 1;
2047
+ for (var row = 0; row < cuboidsMulti[0].length; row++) {
2048
+ for (var col = 0; col < cuboidsMulti.length; col++) {
2049
+ transform(cuboidsMulti[col][row], total + delay * i);
2050
+ i--;
2051
+ }
2052
+ }
2053
+ };
2054
+
2055
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceForwardDiagonal = function (transform, cuboids, cuboidsMulti, delay) {
2056
+ var total = this.timeline.totalDuration();
2057
+ for (var row = 0; row < cuboidsMulti[0].length; row++) {
2058
+ for (var col = 0; col < cuboidsMulti.length; col++) {
2059
+ transform(cuboidsMulti[col][row], total + delay * (col + row));
2060
+ }
2061
+ }
2062
+ };
2063
+
2064
+ NextendSmartSliderBackgroundAnimationTiled.prototype.sequenceBackwardDiagonal = function (transform, cuboids, cuboidsMulti, delay) {
2065
+ var total = this.timeline.totalDuration(),
2066
+ length = cuboidsMulti[0].length + cuboidsMulti.length - 2;
2067
+ for (var row = 0; row < cuboidsMulti[0].length; row++) {
2068
+ for (var col = 0; col < cuboidsMulti.length; col++) {
2069
+ transform(cuboidsMulti[col][row], total + delay * (length - col - row));
2070
+ }
2071
+ }
2072
+ };
2073
+
2074
+ scope.NextendSmartSliderBackgroundAnimationTiled = NextendSmartSliderBackgroundAnimationTiled;
2075
+
2076
+
2077
+ function NextendSmartSliderBackgroundAnimationFlat() {
2078
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this, arguments);
2079
+ };
2080
+
2081
+ NextendSmartSliderBackgroundAnimationFlat.prototype = Object.create(NextendSmartSliderBackgroundAnimationTiled.prototype);
2082
+ NextendSmartSliderBackgroundAnimationFlat.prototype.constructor = NextendSmartSliderBackgroundAnimationFlat;
2083
+
2084
+ NextendSmartSliderBackgroundAnimationFlat.prototype.setup = function () {
2085
+
2086
+ var animation = $.extend(true, {
2087
+ columns: 1,
2088
+ rows: 1,
2089
+ tiles: {
2090
+ cropOuter: false,
2091
+ crop: true,
2092
+ delay: 0, // Delay between the starting of the tiles sequence. Ex.: #1 batch start: 0s, #2: .2s, #3: .4s
2093
+ sequence: 'Parallel' // Parallel, Random, ForwardCol, BackwardCol, ForwardRow, BackwardRow, ForwardDiagonal, BackwardDiagonal
2094
+ },
2095
+ main: {
2096
+ type: 'next', // Enable animation on the specified tile: current, next, both
2097
+ duration: 0.5,
2098
+ real3D: true, // Enable perspective
2099
+ zIndex: 1, // z-index of the current image. Change it to 2 to show it over the second image.
2100
+ current: { // Animation of the current tile
2101
+ ease: 'easeInOutCubic'
2102
+ },
2103
+ next: { // Animation of the next tile
2104
+ ease: 'easeInOutCubic'
2105
+ }
2106
+ }
2107
+ }, this.animationProperties);
2108
+
2109
+ if (this.reversed) {
2110
+ if (typeof animation.invert !== 'undefined') {
2111
+ $.extend(true, animation.main, animation.invert);
2112
+ }
2113
+
2114
+ if (typeof animation.invertTiles !== 'undefined') {
2115
+ $.extend(animation.tiles, animation.invertTiles);
2116
+ }
2117
+ }
2118
+
2119
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup.call(this, animation);
2120
+
2121
+ if (animation.tiles.cropOuter) {
2122
+ this.container.css('overflow', 'hidden');
2123
+ }
2124
+ };
2125
+
2126
+ NextendSmartSliderBackgroundAnimationFlat.prototype.renderTile = function (tile, w, h, animation, totalLeft, totalTop) {
2127
+
2128
+ if (animation.tiles.crop) {
2129
+ tile.css('overflow', 'hidden');
2130
+ }
2131
+
2132
+ var current = $('<div></div>')
2133
+ .css({
2134
+ position: 'absolute',
2135
+ left: 0,
2136
+ top: 0,
2137
+ width: w,
2138
+ height: h,
2139
+ overflow: 'hidden',
2140
+ zIndex: animation.main.zIndex
2141
+ })
2142
+ .append(this.clonedCurrent().clone().css({
2143
+ position: 'absolute',
2144
+ top: -totalTop + 'px',
2145
+ left: -totalLeft + 'px'
2146
+ }))
2147
+ .appendTo(tile);
2148
+ var next = $('<div></div>')
2149
+ .css({
2150
+ position: 'absolute',
2151
+ left: 0,
2152
+ top: 0,
2153
+ width: w,
2154
+ height: h,
2155
+ overflow: 'hidden',
2156
+ zIndex: 1
2157
+ })
2158
+ .append(this.clonedNext().clone().css({
2159
+ position: 'absolute',
2160
+ top: -totalTop + 'px',
2161
+ left: -totalLeft + 'px'
2162
+ }))
2163
+ .appendTo(tile);
2164
+
2165
+ if (animation.main.real3D) {
2166
+ NextendTween.set(tile.get(0), {
2167
+ transformStyle: "preserve-3d"
2168
+ });
2169
+ NextendTween.set(current.get(0), {
2170
+ transformStyle: "preserve-3d"
2171
+ });
2172
+ NextendTween.set(next.get(0), {
2173
+ transformStyle: "preserve-3d"
2174
+ });
2175
+ }
2176
+
2177
+ return {
2178
+ current: current,
2179
+ next: next
2180
+ }
2181
+ };
2182
+
2183
+ NextendSmartSliderBackgroundAnimationFlat.prototype.transform = function (animation, animatable, total) {
2184
+
2185
+ var main = animation.main;
2186
+
2187
+ if (main.type == 'current' || main.type == 'both') {
2188
+ this.timeline.to(animatable.current, main.duration * this.durationMultiplier, main.current, total);
2189
+ }
2190
+
2191
+ if (main.type == 'next' || main.type == 'both') {
2192
+ this.timeline.from(animatable.next, main.duration * this.durationMultiplier, main.next, total);
2193
+ }
2194
+ };
2195
+ scope.NextendSmartSliderBackgroundAnimationFlat = NextendSmartSliderBackgroundAnimationFlat;
2196
+
2197
+
2198
+ function NextendSmartSliderBackgroundAnimationCubic() {
2199
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this, arguments);
2200
+ };
2201
+
2202
+ NextendSmartSliderBackgroundAnimationCubic.prototype = Object.create(NextendSmartSliderBackgroundAnimationTiled.prototype);
2203
+ NextendSmartSliderBackgroundAnimationCubic.prototype.constructor = NextendSmartSliderBackgroundAnimationCubic;
2204
+
2205
+
2206
+ NextendSmartSliderBackgroundAnimationCubic.prototype.setup = function () {
2207
+ var animation = $.extend(true, {
2208
+ columns: 1,
2209
+ rows: 1,
2210
+ fullCube: true,
2211
+ tiles: {
2212
+ delay: 0.2, // Delay between the starting of the tiles sequence. Ex.: #1 batch start: 0s, #2: .2s, #3: .4s
2213
+ sequence: 'Parallel' // Parallel, Random, ForwardCol, BackwardCol, ForwardRow, BackwardRow, ForwardDiagonal, BackwardDiagonal
2214
+ },
2215
+ depth: 50, // Used only when side is "Back"
2216
+ main: {
2217
+ side: 'Left', // Left, Right, Top, Bottom, Back, BackInvert
2218
+ duration: 0.5,
2219
+ ease: 'easeInOutCubic',
2220
+ direction: 'horizontal', // horizontal, vertical // Used when side points to Back
2221
+ real3D: true // Enable perspective
2222
+ },
2223
+ pre: [], // Animations to play on tiles before main
2224
+ post: [] // Animations to play on tiles after main
2225
+ }, this.animationProperties);
2226
+ animation.fullCube = true;
2227
+
2228
+ if (this.reversed) {
2229
+ if (typeof animation.invert !== 'undefined') {
2230
+ $.extend(true, animation.main, animation.invert);
2231
+ }
2232
+
2233
+ if (typeof animation.invertTiles !== 'undefined') {
2234
+ $.extend(animation.tiles, animation.invertTiles);
2235
+ }
2236
+ }
2237
+
2238
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup.call(this, animation);
2239
+ };
2240
+
2241
+ NextendSmartSliderBackgroundAnimationCubic.prototype.renderTile = function (tile, w, h, animation, totalLeft, totalTop) {
2242
+
2243
+ var d = animation.depth;
2244
+
2245
+ switch (d) {
2246
+ case 'width':
2247
+ d = w;
2248
+ break;
2249
+ case 'height':
2250
+ d = h;
2251
+ break;
2252
+ }
2253
+ switch (animation.main.side) {
2254
+ case 'Top':
2255
+ case 'Bottom':
2256
+ d = h;
2257
+ break;
2258
+ case 'Left':
2259
+ case 'Right':
2260
+ d = w;
2261
+ break;
2262
+ }
2263
+
2264
+ if (animation.main.real3D) {
2265
+ NextendTween.set(tile.get(0), {
2266
+ transformStyle: "preserve-3d"
2267
+ });
2268
+ }
2269
+ var cuboid = $('<div class="cuboid"></div>').css({
2270
+ position: 'absolute',
2271
+ left: '0',
2272
+ top: '0',
2273
+ width: '100%',
2274
+ height: '100%'
2275
+ }).appendTo(tile);
2276
+ NextendTween.set(cuboid.get(0), {
2277
+ transformStyle: "preserve-3d",
2278
+ z: -d / 2
2279
+ });
2280
+
2281
+ var backRotationZ = 0;
2282
+ if (animation.main.direction == 'horizontal') {
2283
+ backRotationZ = 180;
2284
+ }
2285
+ var back = this.getSide(cuboid, w, h, 0, 0, -d / 2, 180, 0, backRotationZ),
2286
+ sides = {
2287
+ Back: back,
2288
+ BackInvert: back
2289
+ };
2290
+ if (animation.fullCube || animation.main.direction == 'vertical') {
2291
+ sides.Bottom = this.getSide(cuboid, w, d, 0, h - d / 2, 0, -90, 0, 0);
2292
+ sides.Top = this.getSide(cuboid, w, d, 0, -d / 2, 0, 90, 0, 0);
2293
+ }
2294
+
2295
+ sides.Front = this.getSide(cuboid, w, h, 0, 0, d / 2, 0, 0, 0);
2296
+ if (animation.fullCube || animation.main.direction == 'horizontal') {
2297
+ sides.Left = this.getSide(cuboid, d, h, -d / 2, 0, 0, 0, -90, 0);
2298
+ sides.Right = this.getSide(cuboid, d, h, w - d / 2, 0, 0, 0, 90, 0);
2299
+ }
2300
+
2301
+ sides.Front.append(this.clonedCurrent().clone().css({
2302
+ position: 'absolute',
2303
+ top: -totalTop + 'px',
2304
+ left: -totalLeft + 'px'
2305
+ }));
2306
+
2307
+ sides[animation.main.side].append(this.clonedNext().clone().css({
2308
+ position: 'absolute',
2309
+ top: -totalTop + 'px',
2310
+ left: -totalLeft + 'px'
2311
+ }));
2312
+
2313
+ return cuboid;
2314
+ };
2315
+
2316
+ NextendSmartSliderBackgroundAnimationCubic.prototype.getSide = function (cuboid, w, h, x, y, z, rX, rY, rZ) {
2317
+ var side = $('<div class="n2-3d-side"></div>')
2318
+ .css({
2319
+ width: w,
2320
+ height: h
2321
+ })
2322
+ .appendTo(cuboid);
2323
+ NextendTween.set(side.get(0), {
2324
+ x: x,
2325
+ y: y,
2326
+ z: z,
2327
+ rotationX: rX,
2328
+ rotationY: rY,
2329
+ rotationZ: rZ,
2330
+ backfaceVisibility: "hidden"
2331
+ });
2332
+ return side;
2333
+ };
2334
+
2335
+ NextendSmartSliderBackgroundAnimationCubic.prototype.addAnimation = function (animation, cuboids) {
2336
+ var duration = animation.duration;
2337
+ delete animation.duration;
2338
+ this.timeline.to(cuboids, duration * this.durationMultiplier, animation);
2339
+ };
2340
+
2341
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transform = function (animation, cuboid, position) {
2342
+
2343
+ for (var i = 0; i < animation.pre.length; i++) {
2344
+ var _a = animation.pre[i];
2345
+ var duration = _a.duration * this.durationMultiplier;
2346
+ this.timeline.to(cuboid, duration, _a, position);
2347
+ position += duration;
2348
+ }
2349
+
2350
+ this['transform' + animation.main.side](animation.main, cuboid, position);
2351
+ position += animation.main.duration;
2352
+
2353
+ for (var i = 0; i < animation.post.length; i++) {
2354
+ var _a = animation.post[i];
2355
+ var duration = _a.duration * this.durationMultiplier;
2356
+ this.timeline.to(cuboid, duration, _a, position);
2357
+ position += duration;
2358
+ }
2359
+ };
2360
+
2361
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformLeft = function (main, cuboid, total) {
2362
+ this._transform(main, cuboid, total, 0, 90, 0);
2363
+ };
2364
+
2365
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformRight = function (main, cuboid, total) {
2366
+ this._transform(main, cuboid, total, 0, -90, 0);
2367
+ };
2368
+
2369
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformTop = function (main, cuboid, total) {
2370
+ this._transform(main, cuboid, total, -90, 0, 0);
2371
+ };
2372
+
2373
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformBottom = function (main, cuboid, total) {
2374
+ this._transform(main, cuboid, total, 90, 0, 0);
2375
+ };
2376
+
2377
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformBack = function (main, cuboid, total) {
2378
+ if (main.direction == 'horizontal') {
2379
+ this._transform(main, cuboid, total, 0, 180, 0);
2380
+ } else {
2381
+ this._transform(main, cuboid, total, 180, 0, 0);
2382
+ }
2383
+ };
2384
+
2385
+ NextendSmartSliderBackgroundAnimationCubic.prototype.transformBackInvert = function (main, cuboid, total) {
2386
+ if (main.direction == 'horizontal') {
2387
+ this._transform(main, cuboid, total, 0, -180, 0);
2388
+ } else {
2389
+ this._transform(main, cuboid, total, -180, 0, 0);
2390
+ }
2391
+ };
2392
+
2393
+ NextendSmartSliderBackgroundAnimationCubic.prototype._transform = function (main, cuboid, total, rX, rY, rZ) {
2394
+ this.timeline.to(cuboid, main.duration * this.durationMultiplier, {
2395
+ rotationX: rX,
2396
+ rotationY: rY,
2397
+ rotationZ: rZ,
2398
+ ease: main.ease
2399
+ }, total);
2400
+ };
2401
+
2402
+ scope.NextendSmartSliderBackgroundAnimationCubic = NextendSmartSliderBackgroundAnimationCubic;
2403
+
2404
+
2405
+ function NextendSmartSliderBackgroundAnimationTurn() {
2406
+ NextendSmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this, arguments);
2407
+
2408
+ var animation = $.extend(true, {
2409
+ perspective: this.w * 1.5,
2410
+ duration: 0.8,
2411
+ direction: 'left'
2412
+ }, this.animationProperties);
2413
+
2414
+ if (this.reversed) {
2415
+ if (animation.direction == 'left') {
2416
+ animation.direction = 'right';
2417
+ } else {
2418
+ animation.direction = 'left';
2419
+ }
2420
+ }
2421
+
2422
+ var w2 = parseInt(this.w / 2);
2423
+
2424
+ this.clonedCurrent().css({
2425
+ 'position': 'absolute',
2426
+ 'top': 0,
2427
+ 'left': (animation.direction == 'left' ? -1 * (this.w / 2) : 0)
2428
+ });
2429
+
2430
+ this.clonedNext().css({
2431
+ 'position': 'absolute',
2432
+ 'top': 0,
2433
+ 'left': (animation.direction == 'left' ? 0 : -1 * (this.w / 2))
2434
+ });
2435
+
2436
+ var tab = $('<div class="tab"></div>').css({
2437
+ width: w2,
2438
+ height: this.h,
2439
+ position: 'absolute',
2440
+ top: '0px',
2441
+ left: animation.direction == 'left' ? w2 : '0',
2442
+ 'z-index': 101
2443
+ });
2444
+
2445
+ NextendTween.set(tab, {
2446
+ transformStyle: 'preserve-3d',
2447
+ transformOrigin: animation.direction == 'left' ? '0px 0px' : w2 + 'px 0px'
2448
+ });
2449
+
2450
+ var front = $('<div class="n2-ff-3d"></div>').append(this.clonedCurrent())
2451
+ .css({
2452
+ width: w2,
2453
+ height: this.h,
2454
+ position: 'absolute',
2455
+ top: 0,
2456
+ left: 0,
2457
+ '-webkit-transform': 'translateZ(0.1px)',
2458
+ overflow: 'hidden'
2459
+ })
2460
+ .appendTo(tab);
2461
+
2462
+ NextendTween.set(front, {
2463
+ backfaceVisibility: 'hidden',
2464
+ transformStyle: 'preserve-3d'
2465
+ });
2466
+
2467
+
2468
+ var back = $('<div class="n2-ff-3d"></div>')
2469
+ .append(this.clonedNext())
2470
+ .appendTo(tab)
2471
+ .css({
2472
+ width: w2,
2473
+ height: this.h,
2474
+ position: 'absolute',
2475
+ top: 0,
2476
+ left: 0,
2477
+ overflow: 'hidden'
2478
+ });
2479
+
2480
+ NextendTween.set(back, {
2481
+ backfaceVisibility: 'hidden',
2482
+ transformStyle: 'preserve-3d',
2483
+ rotationY: 180,
2484
+ rotationZ: 0
2485
+ });
2486
+
2487
+ var current = $('<div></div>')
2488
+ .append(this.clonedCurrent().clone().css('left', (animation.direction == 'left' ? 0 : -w2))).css({
2489
+ position: 'absolute',
2490
+ top: 0,
2491
+ left: animation.direction == 'left' ? '0' : w2,
2492
+ width: w2,
2493
+ height: this.h,
2494
+ zIndex: 100,
2495
+ overflow: 'hidden'
2496
+ }),
2497
+ overlay = $('<div class="overlay"></div>').css({
2498
+ position: 'absolute',
2499
+ top: 0,
2500
+ left: animation.direction == 'left' ? w2 : 0,
2501
+ width: w2,
2502
+ height: this.h,
2503
+ background: '#000',
2504
+ opacity: 1,
2505
+ overflow: 'hidden'
2506
+ }),
2507
+
2508
+ container = $('<div></div>').css({
2509
+ width: this.w,
2510
+ height: this.h,
2511
+ position: 'absolute',
2512
+ top: 0,
2513
+ left: 0
2514
+ }).append(tab).append(current).append(overlay);
2515
+
2516
+
2517
+ NextendTween.set(container, {
2518
+ perspective: animation.perspective,
2519
+ perspectiveOrigin: '50% 50%'
2520
+ });
2521
+
2522
+ this.placeNextImage();
2523
+ this.clonedImages.nextImage.css({
2524
+ overflow: 'hidden',
2525
+ width: '100%',
2526
+ height: '100%'
2527
+ });
2528
+
2529
+ this.containerElement.append(container);
2530
+
2531
+ this.preSetup();
2532
+
2533
+ this.timeline.to(tab.get(0), animation.duration * this.durationMultiplier, {
2534
+ rotationY: (animation.direction == 'left' ? -180 : 180)
2535
+ }, 0);
2536
+
2537
+ this.timeline.to(overlay.get(0), animation.duration * this.durationMultiplier, {
2538
+ opacity: 0
2539
+ }, 0);
2540
+ };
2541
+
2542
+ NextendSmartSliderBackgroundAnimationTurn.prototype = Object.create(NextendSmartSliderBackgroundAnimationFluxAbstract.prototype);
2543
+ NextendSmartSliderBackgroundAnimationTurn.prototype.constructor = NextendSmartSliderBackgroundAnimationTurn;
2544
+
2545
+
2546
+ NextendSmartSliderBackgroundAnimationTurn.prototype.getExtraDelay = function () {
2547
+ return 0;
2548
+ };
2549
+
2550
+ scope.NextendSmartSliderBackgroundAnimationTurn = NextendSmartSliderBackgroundAnimationTurn;
2551
+
2552
+
2553
+ function NextendSmartSliderBackgroundAnimationExplode() {
2554
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this, arguments);
2555
+ };
2556
+
2557
+ NextendSmartSliderBackgroundAnimationExplode.prototype = Object.create(NextendSmartSliderBackgroundAnimationTiled.prototype);
2558
+ NextendSmartSliderBackgroundAnimationExplode.prototype.constructor = NextendSmartSliderBackgroundAnimationExplode;
2559
+
2560
+
2561
+ NextendSmartSliderBackgroundAnimationExplode.prototype.setup = function () {
2562
+
2563
+ var animation = $.extend(true, {
2564
+ columns: 1,
2565
+ rows: 1,
2566
+ reverse: false,
2567
+ tiles: {
2568
+ delay: 0, // Delay between the starting of the tiles sequence. Ex.: #1 batch start: 0s, #2: .2s, #3: .4s
2569
+ sequence: 'Parallel' // Parallel, Random, ForwardCol, BackwardCol, ForwardRow, BackwardRow, ForwardDiagonal, BackwardDiagonal
2570
+ },
2571
+ main: {
2572
+ duration: 0.5,
2573
+ zIndex: 2, // z-index of the current image. Change it to 2 to show it over the second image.
2574
+ current: { // Animation of the current tile
2575
+ ease: 'easeInOutCubic'
2576
+ }
2577
+ }
2578
+ }, this.animationProperties);
2579
+
2580
+ this.placeNextImage();
2581
+ this.clonedImages.nextImage.css({
2582
+ overflow: 'hidden',
2583
+ width: '100%',
2584
+ height: '100%'
2585
+ });
2586
+
2587
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup.call(this, animation);
2588
+ };
2589
+
2590
+ NextendSmartSliderBackgroundAnimationExplode.prototype.renderTile = function (tile, w, h, animation, totalLeft, totalTop) {
2591
+
2592
+ var current = $('<div></div>')
2593
+ .css({
2594
+ position: 'absolute',
2595
+ left: 0,
2596
+ top: 0,
2597
+ width: w,
2598
+ height: h,
2599
+ overflow: 'hidden',
2600
+ zIndex: animation.main.zIndex
2601
+ })
2602
+ .append(this.clonedCurrent().clone().css({
2603
+ position: 'absolute',
2604
+ top: -totalTop + 'px',
2605
+ left: -totalLeft + 'px'
2606
+ }))
2607
+ .appendTo(tile);
2608
+
2609
+ NextendTween.set(tile.get(0), {
2610
+ transformPerspective: 1000,
2611
+ transformStyle: "preserve-3d"
2612
+ });
2613
+
2614
+ return {
2615
+ current: current,
2616
+ tile: tile
2617
+ }
2618
+ };
2619
+
2620
+ NextendSmartSliderBackgroundAnimationExplode.prototype.transform = function (animation, animatable, total) {
2621
+
2622
+ var current = $.extend(true, {}, animation.main.current);
2623
+
2624
+ current.rotationX = (Math.random() * 3 - 1) * 90;
2625
+ current.rotationY = (Math.random() * 3 - 1) * 90;
2626
+ current.rotationZ = (Math.random() * 3 - 1) * 90;
2627
+ this.timeline.to(animatable.tile, animation.main.duration * this.durationMultiplier, current, total);
2628
+ };
2629
+
2630
+ scope.NextendSmartSliderBackgroundAnimationExplode = NextendSmartSliderBackgroundAnimationExplode;
2631
+
2632
+
2633
+ function NextendSmartSliderBackgroundAnimationExplodeReversed() {
2634
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this, arguments);
2635
+ };
2636
+
2637
+ NextendSmartSliderBackgroundAnimationExplodeReversed.prototype = Object.create(NextendSmartSliderBackgroundAnimationTiled.prototype);
2638
+ NextendSmartSliderBackgroundAnimationExplodeReversed.prototype.constructor = NextendSmartSliderBackgroundAnimationExplodeReversed;
2639
+
2640
+
2641
+ NextendSmartSliderBackgroundAnimationExplodeReversed.prototype.setup = function () {
2642
+
2643
+ var animation = $.extend(true, {
2644
+ columns: 1,
2645
+ rows: 1,
2646
+ reverse: false,
2647
+ tiles: {
2648
+ delay: 0, // Delay between the starting of the tiles sequence. Ex.: #1 batch start: 0s, #2: .2s, #3: .4s
2649
+ sequence: 'Parallel' // Parallel, Random, ForwardCol, BackwardCol, ForwardRow, BackwardRow, ForwardDiagonal, BackwardDiagonal
2650
+ },
2651
+ main: {
2652
+ duration: 0.5,
2653
+ zIndex: 2, // z-index of the current image. Change it to 2 to show it over the second image.
2654
+ current: { // Animation of the current tile
2655
+ ease: 'easeInOutCubic'
2656
+ }
2657
+ }
2658
+ }, this.animationProperties);
2659
+
2660
+ this.placeCurrentImage();
2661
+ this.clonedImages.currentImage.css({
2662
+ overflow: 'hidden',
2663
+ width: '100%',
2664
+ height: '100%'
2665
+ });
2666
+
2667
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup.call(this, animation);
2668
+ };
2669
+
2670
+ NextendSmartSliderBackgroundAnimationExplodeReversed.prototype.renderTile = function (tile, w, h, animation, totalLeft, totalTop) {
2671
+
2672
+ var next = $('<div></div>')
2673
+ .css({
2674
+ position: 'absolute',
2675
+ left: 0,
2676
+ top: 0,
2677
+ width: w,
2678
+ height: h,
2679
+ overflow: 'hidden',
2680
+ zIndex: animation.main.zIndex
2681
+ })
2682
+ .append(this.clonedNext().clone().css({
2683
+ position: 'absolute',
2684
+ top: -totalTop + 'px',
2685
+ left: -totalLeft + 'px'
2686
+ }))
2687
+ .appendTo(tile);
2688
+
2689
+ NextendTween.set(tile.get(0), {
2690
+ transformPerspective: 1000,
2691
+ transformStyle: "preserve-3d"
2692
+ });
2693
+
2694
+ return {
2695
+ next: next,
2696
+ tile: tile
2697
+ }
2698
+ };
2699
+
2700
+ NextendSmartSliderBackgroundAnimationExplodeReversed.prototype.transform = function (animation, animatable, total) {
2701
+
2702
+ var current = $.extend(true, {}, animation.main.current);
2703
+
2704
+ current.rotationX = (Math.random() * 3 - 1) * 90;
2705
+ current.rotationY = (Math.random() * 3 - 1) * 90;
2706
+ current.rotationZ = (Math.random() * 3 - 1) * 30;
2707
+ this.timeline.from(animatable.tile, animation.main.duration * this.durationMultiplier, current, total);
2708
+ };
2709
+
2710
+ scope.NextendSmartSliderBackgroundAnimationExplodeReversed = NextendSmartSliderBackgroundAnimationExplodeReversed;
2711
+
2712
+
2713
+ function NextendSmartSliderBackgroundAnimationSlixes() {
2714
+ NextendSmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this, arguments);
2715
+ };
2716
+
2717
+ NextendSmartSliderBackgroundAnimationSlixes.prototype = Object.create(NextendSmartSliderBackgroundAnimationTiled.prototype);
2718
+ NextendSmartSliderBackgroundAnimationSlixes.prototype.constructor = NextendSmartSliderBackgroundAnimationSlixes;
2719
+
2720
+
2721
+ NextendSmartSliderBackgroundAnimationSlixes.prototype.setup = function () {
2722
+
2723
+ var animation = $.extend(true, {
2724
+ columns: 2,
2725
+ rows: 2,
2726
+ main: {
2727
+ duration: 2,
2728
+ zIndex: 2 // z-index of the current image. Change it to 2 to show it over the second image.
2729
+ }
2730
+ }, this.animationProperties);
2731
+
2732
+ this.placeNextImage();
2733
+ this.clonedImages.nextImage.css({
2734
+ overflow: 'hidden',
2735
+ width: '100%',
2736
+ height: '100%'
2737
+ });
2738
+
2739
+ NextendSmartSliderBackgroundAnimationTiled.prototype.setup.call(this, animation);
2740
+ };
2741
+
2742
+ NextendSmartSliderBackgroundAnimationSlixes.prototype.renderTile = function (tile, w, h, animation, totalLeft, totalTop) {
2743
+ this.container.css('overflow', 'hidden');
2744
+
2745
+ var current = $('<div></div>')
2746
+ .css({
2747
+ position: 'absolute',
2748
+ left: 0,
2749
+ top: 0,
2750
+ width: w,
2751
+ height: h,
2752
+ overflow: 'hidden',
2753
+ zIndex: animation.main.zIndex
2754
+ })
2755
+ .append(this.clonedCurrent().clone().css({
2756
+ position: 'absolute',
2757
+ top: -totalTop + 'px',
2758
+ left: -totalLeft + 'px'
2759
+ }))
2760
+ .appendTo(tile);
2761
+
2762
+ NextendTween.set(tile.get(0), {
2763
+ transformPerspective: 1000,
2764
+ transformStyle: "preserve-3d"
2765
+ });
2766
+
2767
+ return {
2768
+ current: current,
2769
+ tile: tile
2770
+ }
2771
+ };
2772
+
2773
+ NextendSmartSliderBackgroundAnimationSlixes.prototype.animate = function (animation, animatables, animatablesMulti) {
2774
+
2775
+ this.timeline.to(animatablesMulti[0][0].tile, animation.main.duration * this.durationMultiplier, {
2776
+ left: '-50%',
2777
+ ease: 'easeInOutCubic'
2778
+ }, 0);
2779
+ this.timeline.to(animatablesMulti[0][1].tile, animation.main.duration * this.durationMultiplier, {
2780
+ left: '-50%',
2781
+ ease: 'easeInOutCubic'
2782
+ }, 0.3);
2783
+
2784
+ this.timeline.to(animatablesMulti[1][0].tile, animation.main.duration * this.durationMultiplier, {
2785
+ left: '100%',
2786
+ ease: 'easeInOutCubic'
2787
+ }, 0.15);
2788
+ this.timeline.to(animatablesMulti[1][1].tile, animation.main.duration * this.durationMultiplier, {
2789
+ left: '100%',
2790
+ ease: 'easeInOutCubic'
2791
+ }, 0.45);
2792
+
2793
+ $('<div />').css({
2794
+ position: 'absolute',
2795
+ left: 0,
2796
+ top: 0,
2797
+ width: '100%',
2798
+ height: '100%',
2799
+ overflow: 'hidden'
2800
+ }).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage);
2801
+
2802
+ this.timeline.fromTo(this.clonedImages.nextImage, animation.main.duration * this.durationMultiplier, {
2803
+ scale: 1.3
2804
+ }, {
2805
+ scale: 1
2806
+ }, 0.45);
2807
+ };
2808
+ scope.NextendSmartSliderBackgroundAnimationSlixes = NextendSmartSliderBackgroundAnimationSlixes;
2809
+
2810
+ })
2811
+ (n2, window);
2812
+ /**
2813
+ * Abstract class for all the main animations
2814
+ * @type {NextendSmartSliderMainAnimationAbstract}
2815
+ * @abstract
2816
+ */
2817
+ (function ($, scope, undefined) {
2818
+ function NextendSmartSliderMainAnimationAbstract(slider, parameters) {
2819
+
2820
+ this.state = 'ended';
2821
+ this.isTouch = false;
2822
+ this.isReverseAllowed = true;
2823
+ this.isReverseEnabled = false;
2824
+ this.reverseSlideIndex = -1;
2825
+
2826
+ this.slider = slider;
2827
+
2828
+ this.parameters = $.extend({
2829
+ duration: 1500,
2830
+ ease: 'easeInOutQuint'
2831
+ }, parameters);
2832
+
2833
+ this.parameters.duration /= 1000;
2834
+
2835
+ this.sliderElement = slider.sliderElement;
2836
+
2837
+ this.timeline = new NextendTimeline({
2838
+ paused: true
2839
+ });
2840
+
2841
+ this.sliderElement.on('mainAnimationStart', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
2842
+ this.currentSlideIndex = currentSlideIndex;
2843
+ this.nextSlideIndex = nextSlideIndex;
2844
+ }, this));
2845
+ };
2846
+
2847
+ NextendSmartSliderMainAnimationAbstract.prototype.enableReverseMode = function () {
2848
+ this.isReverseEnabled = true;
2849
+
2850
+ this.reverseTimeline = new NextendTimeline({
2851
+ paused: true
2852
+ });
2853
+
2854
+ this.sliderElement.triggerHandler('reverseModeEnabled', this.reverseSlideIndex);
2855
+ };
2856
+
2857
+ NextendSmartSliderMainAnimationAbstract.prototype.disableReverseMode = function () {
2858
+ this.isReverseEnabled = false;
2859
+ };
2860
+
2861
+ NextendSmartSliderMainAnimationAbstract.prototype.setTouch = function (direction) {
2862
+ this.isTouch = direction;
2863
+ };
2864
+
2865
+ NextendSmartSliderMainAnimationAbstract.prototype.setTouchProgress = function (progress) {
2866
+ if (this.isReverseEnabled) {
2867
+ this._setTouchProgressWithReverse(progress);
2868
+ } else {
2869
+ this._setTouchProgress(progress);
2870
+ }
2871
+ };
2872
+
2873
+ NextendSmartSliderMainAnimationAbstract.prototype._setTouchProgress = function (progress) {
2874
+ if (this.state != 'ended') {
2875
+ if (progress <= 0) {
2876
+ this.timeline.progress(Math.max(progress, 0.000001), false);
2877
+ } else if (progress >= 0 && progress <= 1) {
2878
+ this.timeline.progress(progress);
2879
+ }
2880
+ }
2881
+ };
2882
+
2883
+ NextendSmartSliderMainAnimationAbstract.prototype._setTouchProgressWithReverse = function (progress) {
2884
+ if (progress == 0) {
2885
+ this.reverseTimeline.progress(0);
2886
+ this.timeline.progress(progress, false);
2887
+ } else if (progress >= 0 && progress <= 1) {
2888
+ this.reverseTimeline.progress(0);
2889
+ this.timeline.progress(progress);
2890
+ } else if (progress < 0 && progress >= -1) {
2891
+ this.timeline.progress(0);
2892
+ this.reverseTimeline.progress(Math.abs(progress));
2893
+ }
2894
+ };
2895
+
2896
+
2897
+ NextendSmartSliderMainAnimationAbstract.prototype.setTouchEnd = function (hasDirection, progress, duration) {
2898
+ if (this.state != 'ended') {
2899
+ if (this.isReverseEnabled) {
2900
+ this._setTouchEndWithReverse(hasDirection, progress, duration);
2901
+ } else {
2902
+ this._setTouchEnd(hasDirection, progress, duration);
2903
+ }
2904
+ }
2905
+ };
2906
+
2907
+ NextendSmartSliderMainAnimationAbstract.prototype._setTouchEnd = function (hasDirection, progress, duration) {
2908
+ if (hasDirection && progress > 0) {
2909
+ this.fixTouchDuration(this.timeline, progress, duration);
2910
+ this.timeline.play();
2911
+ } else {
2912
+ this.revertCB(this.timeline);
2913
+ this.fixTouchDuration(this.timeline, 1 - progress, duration);
2914
+ this.timeline.reverse();
2915
+
2916
+ this.willRevertTo(this.currentSlideIndex, this.nextSlideIndex);
2917
+ }
2918
+ };
2919
+
2920
+ NextendSmartSliderMainAnimationAbstract.prototype._setTouchEndWithReverse = function (hasDirection, progress, duration) {
2921
+ if (hasDirection) {
2922
+ if (progress < 0 && this.reverseTimeline.totalDuration() > 0) {
2923
+ this.fixTouchDuration(this.reverseTimeline, progress, duration);
2924
+ this.reverseTimeline.play();
2925
+
2926
+ this.willRevertTo(this.reverseSlideIndex, this.nextSlideIndex);
2927
+ } else {
2928
+
2929
+ this.willCleanSlideIndex(this.reverseSlideIndex);
2930
+ this.fixTouchDuration(this.timeline, progress, duration);
2931
+ this.timeline.play();
2932
+ }
2933
+ } else {
2934
+ if (progress < 0) {
2935
+ this.revertCB(this.reverseTimeline);
2936
+ this.fixTouchDuration(this.reverseTimeline, 1 - progress, duration);
2937
+ this.reverseTimeline.reverse();
2938
+ } else {
2939
+ this.revertCB(this.timeline);
2940
+ this.fixTouchDuration(this.timeline, 1 - progress, duration);
2941
+ this.timeline.reverse();
2942
+ }
2943
+
2944
+ this.willCleanSlideIndex(this.reverseSlideIndex);
2945
+
2946
+ this.willRevertTo(this.currentSlideIndex, this.nextSlideIndex);
2947
+ }
2948
+ };
2949
+
2950
+ NextendSmartSliderMainAnimationAbstract.prototype.fixTouchDuration = function (timeline, progress, duration) {
2951
+ var totalDuration = timeline.totalDuration(),
2952
+ modifiedDuration = Math.max(totalDuration / 3, Math.min(totalDuration, duration / Math.abs(progress) / 1000));
2953
+ if (modifiedDuration != totalDuration) {
2954
+ timeline.totalDuration(modifiedDuration);
2955
+ }
2956
+ };
2957
+
2958
+ NextendSmartSliderMainAnimationAbstract.prototype.getState = function () {
2959
+ return this.state;
2960
+ };
2961
+
2962
+ NextendSmartSliderMainAnimationAbstract.prototype.timeScale = function () {
2963
+ if (arguments.length > 0) {
2964
+ this.timeline.timeScale(arguments[0]);
2965
+ return this;
2966
+ }
2967
+ return this.timeline.timeScale();
2968
+ };
2969
+
2970
+ NextendSmartSliderMainAnimationAbstract.prototype.preChangeToPlay = function (deferred, currentSlide, nextSlide) {
2971
+ var deferredHandled = {
2972
+ handled: false
2973
+ };
2974
+
2975
+ this.sliderElement.trigger('preChangeToPlay', [deferred, deferredHandled, currentSlide, nextSlide]);
2976
+
2977
+ if (!deferredHandled.handled) {
2978
+ deferred.resolve();
2979
+ }
2980
+ };
2981
+
2982
+ NextendSmartSliderMainAnimationAbstract.prototype.changeTo = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed, isSystem) {
2983
+
2984
+ this._initAnimation(currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed);
2985
+
2986
+ this.state = 'initAnimation';
2987
+
2988
+ this.timeline.paused(true);
2989
+ this.timeline.eventCallback('onStart', this.onChangeToStart, [currentSlideIndex, nextSlideIndex, isSystem], this);
2990
+ this.timeline.eventCallback('onComplete', this.onChangeToComplete, [currentSlideIndex, nextSlideIndex, isSystem], this);
2991
+ this.timeline.eventCallback('onReverseComplete', null);
2992
+
2993
+ this.revertCB = $.proxy(function (timeline) {
2994
+ timeline.eventCallback('onReverseComplete', this.onReverseChangeToComplete, [nextSlideIndex, currentSlideIndex, isSystem], this);
2995
+ }, this);
2996
+
2997
+ if (this.slider.parameters.dynamicHeight) {
2998
+ var tl = new NextendTimeline();
2999
+ this.slider.responsive.doResize(false, tl, nextSlideIndex, 0.6);
3000
+ this.timeline.add(tl);
3001
+ }
3002
+
3003
+
3004
+ // If the animation is in touch mode, we do not need to play the timeline as the touch will set the actual progress and also play later...
3005
+ if (!this.isTouch) {
3006
+ var deferred = $.Deferred();
3007
+
3008
+ deferred.done($.proxy(function () {
3009
+ this.play();
3010
+ }, this.timeline));
3011
+
3012
+ this.preChangeToPlay(deferred, currentSlide, nextSlide);
3013
+ } else {
3014
+ this.slider.callOnSlide(currentSlide, 'onOutAnimationsPlayed');
3015
+ }
3016
+ };
3017
+
3018
+
3019
+ NextendSmartSliderMainAnimationAbstract.prototype.willRevertTo = function (slideIndex, originalNextSlideIndex) {
3020
+
3021
+ this.sliderElement.triggerHandler('mainAnimationWillRevertTo', [slideIndex, originalNextSlideIndex]);
3022
+
3023
+ this.sliderElement.one('mainAnimationComplete', $.proxy(this.revertTo, this, slideIndex, originalNextSlideIndex));
3024
+ };
3025
+
3026
+
3027
+ NextendSmartSliderMainAnimationAbstract.prototype.revertTo = function (slideIndex, originalNextSlideIndex) {
3028
+ this.slider.revertTo(slideIndex, originalNextSlideIndex);
3029
+
3030
+ // Cancel the pre-initialized layer animations on the original next slide.
3031
+ this.slider.slides.eq(originalNextSlideIndex).triggerHandler('mainAnimationStartInCancel');
3032
+ };
3033
+
3034
+
3035
+ NextendSmartSliderMainAnimationAbstract.prototype.willCleanSlideIndex = function (slideIndex) {
3036
+
3037
+ this.sliderElement.one('mainAnimationComplete', $.proxy(this.cleanSlideIndex, this, slideIndex));
3038
+ };
3039
+
3040
+ NextendSmartSliderMainAnimationAbstract.prototype.cleanSlideIndex = function () {
3041
+
3042
+ };
3043
+
3044
+ /**
3045
+ * @abstract
3046
+ * @param currentSlideIndex
3047
+ * @param currentSlide
3048
+ * @param nextSlideIndex
3049
+ * @param nextSlide
3050
+ * @param reversed
3051
+ * @private
3052
+ */
3053
+ NextendSmartSliderMainAnimationAbstract.prototype._initAnimation = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed) {
3054
+
3055
+ };
3056
+
3057
+ NextendSmartSliderMainAnimationAbstract.prototype.onChangeToStart = function (previousSlideIndex, currentSlideIndex, isSystem) {
3058
+
3059
+ this.state = 'playing';
3060
+
3061
+ var parameters = [this, previousSlideIndex, currentSlideIndex, isSystem];
3062
+
3063
+ n2c.log('Event: mainAnimationStart: ', parameters, '{NextendSmartSliderMainAnimationAbstract}, previousSlideIndex, currentSlideIndex, isSystem');
3064
+ this.sliderElement.trigger('mainAnimationStart', parameters);
3065
+
3066
+ this.slider.slides.eq(previousSlideIndex).trigger('mainAnimationStartOut', parameters);
3067
+ this.slider.slides.eq(currentSlideIndex).trigger('mainAnimationStartIn', parameters);
3068
+ };
3069
+
3070
+ NextendSmartSliderMainAnimationAbstract.prototype.onChangeToComplete = function (previousSlideIndex, currentSlideIndex, isSystem) {
3071
+ var parameters = [this, previousSlideIndex, currentSlideIndex, isSystem];
3072
+
3073
+ this.clearTimelines();
3074
+
3075
+ this.disableReverseMode();
3076
+
3077
+ this.slider.slides.eq(previousSlideIndex).trigger('mainAnimationCompleteOut', parameters);
3078
+ this.slider.slides.eq(currentSlideIndex).trigger('mainAnimationCompleteIn', parameters);
3079
+
3080
+ this.state = 'ended';
3081
+
3082
+ n2c.log('Event: mainAnimationComplete: ', parameters, '{NextendSmartSliderMainAnimationAbstract}, previousSlideIndex, currentSlideIndex, isSystem');
3083
+ this.sliderElement.trigger('mainAnimationComplete', parameters);
3084
+ };
3085
+
3086
+ NextendSmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete = function (previousSlideIndex, currentSlideIndex, isSystem) {
3087
+ NextendSmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this, arguments);
3088
+ };
3089
+
3090
+ NextendSmartSliderMainAnimationAbstract.prototype.clearTimelines = function () {
3091
+ // When the animation done, clear the timeline
3092
+ this.revertCB = function () {
3093
+ };
3094
+ this.timeline.clear();
3095
+ this.timeline.timeScale(1);
3096
+ //this.reverseTimeline.clear();
3097
+ //this.reverseTimeline.timeScale(1);
3098
+
3099
+ }
3100
+
3101
+ NextendSmartSliderMainAnimationAbstract.prototype.getEase = function () {
3102
+ if (this.isTouch) {
3103
+ return 'linear';
3104
+ }
3105
+ return this.parameters.ease;
3106
+ };
3107
+ scope.NextendSmartSliderMainAnimationAbstract = NextendSmartSliderMainAnimationAbstract;
3108
+ })(n2, window);
3109
+ (function ($, scope, undefined) {
3110
+ var preventMouseEnter = false;
3111
+
3112
+ function NextendSmartSliderControlAutoplay(slider, parameters) {
3113
+ this._paused = true;
3114
+ this._wait = false;
3115
+ this._disabled = false;
3116
+ this._currentCount = 0;
3117
+ this._progressEnabled = false;
3118
+ this.timeline = null;
3119
+
3120
+ this.deferredsMediaPlaying = null;
3121
+ this.deferredMouseLeave = null;
3122
+ this.deferredMouseEnter = null;
3123
+ this.mainAnimationDeferred = true;
3124
+ this.autoplayDeferred = null;
3125
+
3126
+ this.slider = slider;
3127
+
3128
+ this.parameters = $.extend({
3129
+ enabled: 0,
3130
+ start: 1,
3131
+ duration: 8000,
3132
+ autoplayToSlide: 0,
3133
+ autoplayToSlideIndex: -1,
3134
+ allowReStart: 0,
3135
+ pause: {
3136
+ mouse: 'enter',
3137
+ click: true,
3138
+ mediaStarted: true
3139
+ },
3140
+ resume: {
3141
+ click: 0,
3142
+ mouse: 0,
3143
+ mediaEnded: true
3144
+ }
3145
+ }, parameters);
3146
+
3147
+ if (this.parameters.enabled) {
3148
+
3149
+ this.parameters.duration /= 1000;
3150
+
3151
+ slider.controls.autoplay = this;
3152
+
3153
+ this.deferredsExtraPlaying = {};
3154
+
3155
+ this.slider.visible($.proxy(this.onReady, this));
3156
+
3157
+ } else {
3158
+ this.disable();
3159
+ }
3160
+
3161
+ slider.controls.autoplay = this;
3162
+ };
3163
+
3164
+ NextendSmartSliderControlAutoplay.prototype.onReady = function () {
3165
+ this.autoplayDeferred = $.Deferred();
3166
+
3167
+ var obj = {
3168
+ _progress: 0
3169
+ };
3170
+ this.timeline = NextendTween.to(obj, this.getSlideDuration(this.slider.currentSlideIndex), {
3171
+ _progress: 1,
3172
+ paused: true,
3173
+ onComplete: $.proxy(this.next, this)
3174
+ });
3175
+
3176
+ if (this._progressEnabled) {
3177
+ this.enableProgress();
3178
+ }
3179
+
3180
+
3181
+ var sliderElement = this.slider.sliderElement;
3182
+
3183
+ if (this.parameters.start) {
3184
+ this.continueAutoplay();
3185
+ } else {
3186
+ this.pauseAutoplayExtraPlaying(null, 'autoplayButton');
3187
+ }
3188
+
3189
+ sliderElement.on('mainAnimationStart.autoplay', $.proxy(this.onMainAnimationStart, this));
3190
+
3191
+ if (this.parameters.pause.mouse != '0') {
3192
+ sliderElement.on("touchend.autoplay", function () {
3193
+ preventMouseEnter = true;
3194
+ setTimeout(function () {
3195
+ preventMouseEnter = false;
3196
+ }, 300)
3197
+ });
3198
+ switch (this.parameters.pause.mouse) {
3199
+ case 'enter':
3200
+ sliderElement.on('mouseenter.autoplay', $.proxy(this.pauseAutoplayMouseEnter, this));
3201
+ sliderElement.on('mouseleave.autoplay', $.proxy(this.pauseAutoplayMouseEnterEnded, this));
3202
+ break;
3203
+ case 'leave':
3204
+ sliderElement.on('mouseleave.autoplay', $.proxy(this.pauseAutoplayMouseLeave, this));
3205
+ sliderElement.on('mouseenter.autoplay', $.proxy(this.pauseAutoplayMouseLeaveEnded, this));
3206
+ break;
3207
+ }
3208
+ }
3209
+ if (this.parameters.pause.click && !this.parameters.resume.click) {
3210
+ sliderElement.on('universalclick.autoplay', $.proxy(this.pauseAutoplayUniversal, this));
3211
+ } else if (!this.parameters.pause.click && this.parameters.resume.click) {
3212
+ sliderElement.on('universalclick.autoplay', $.proxy(function (e) {
3213
+ this.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
3214
+ }, this));
3215
+ } else if (this.parameters.pause.click && this.parameters.resume.click) {
3216
+ sliderElement.on('universalclick.autoplay', $.proxy(function (e) {
3217
+ if (!this._paused) {
3218
+ this.pauseAutoplayUniversal(e);
3219
+ } else {
3220
+ this.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
3221
+ }
3222
+ }, this));
3223
+ }
3224
+ if (this.parameters.pause.mediaStarted) {
3225
+ this.deferredsMediaPlaying = {};
3226
+ sliderElement.on('mediaStarted.autoplay', $.proxy(this.pauseAutoplayMediaPlaying, this));
3227
+ sliderElement.on('mediaEnded.autoplay', $.proxy(this.pauseAutoplayMediaPlayingEnded, this));
3228
+ }
3229
+
3230
+ if (this.parameters.resume.mouse != '0') {
3231
+ switch (this.parameters.resume.mouse) {
3232
+ case 'enter':
3233
+ if (this.parameters.pause.mouse == '0') {
3234
+ sliderElement.on('mouseenter.autoplay', $.proxy(function (e) {
3235
+ this.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
3236
+ }, this));
3237
+ } else {
3238
+ sliderElement.on('mouseenter.autoplay', $.proxy(this.continueAutoplay, this));
3239
+ }
3240
+ break;
3241
+ case 'leave':
3242
+ if (this.parameters.pause.mouse == '0') {
3243
+ sliderElement.on('mouseleave.autoplay', $.proxy(function (e) {
3244
+ this.pauseAutoplayExtraPlayingEnded(e, 'autoplayButton');
3245
+ }, this));
3246
+ } else {
3247
+ sliderElement.on('mouseleave.autoplay', $.proxy(this.continueAutoplay, this));
3248
+ }
3249
+ break;
3250
+ }
3251
+ }
3252
+
3253
+ if (this.parameters.resume.mediaEnded) {
3254
+ sliderElement.on('mediaEnded.autoplay', $.proxy(this.continueAutoplay, this));
3255
+ }
3256
+ sliderElement.on('autoplayExtraWait.autoplay', $.proxy(this.pauseAutoplayExtraPlaying, this));
3257
+ sliderElement.on('autoplayExtraContinue.autoplay', $.proxy(this.pauseAutoplayExtraPlayingEnded, this));
3258
+
3259
+
3260
+ this.slider.sliderElement.on('mainAnimationComplete.autoplay', $.proxy(this.onMainAnimationComplete, this));
3261
+
3262
+ };
3263
+
3264
+ NextendSmartSliderControlAutoplay.prototype.enableProgress = function () {
3265
+ if (this.timeline) {
3266
+ this.timeline.eventCallback('onUpdate', $.proxy(this.onUpdate, this));
3267
+ }
3268
+ this._progressEnabled = true;
3269
+ };
3270
+
3271
+
3272
+ NextendSmartSliderControlAutoplay.prototype.onMainAnimationStart = function (e, animation, previousSlideIndex, currentSlideIndex, isSystem) {
3273
+ this.mainAnimationDeferred = $.Deferred();
3274
+ this.deActivate(0, 'wait');
3275
+ for (var k in this.deferredsMediaPlaying) {
3276
+ this.deferredsMediaPlaying[k].resolve();
3277
+ }
3278
+ };
3279
+
3280
+ NextendSmartSliderControlAutoplay.prototype.onMainAnimationComplete = function (e, animation, previousSlideIndex, currentSlideIndex) {
3281
+
3282
+ if (this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.currentSlideIndex + 1) {
3283
+ this.limitAutoplay();
3284
+ }
3285
+
3286
+ this.timeline.duration(this.getSlideDuration(currentSlideIndex));
3287
+
3288
+ this.mainAnimationDeferred.resolve();
3289
+
3290
+ this.continueAutoplay();
3291
+ };
3292
+
3293
+ NextendSmartSliderControlAutoplay.prototype.getSlideDuration = function (index) {
3294
+ var slide = this.slider.realSlides.eq(this.slider.getRealIndex(index)).data('slide'),
3295
+ duration = slide.minimumSlideDuration;
3296
+
3297
+ if (duration < 0.3 && duration < this.parameters.duration) {
3298
+ duration = this.parameters.duration;
3299
+ }
3300
+ return duration;
3301
+ };
3302
+
3303
+ NextendSmartSliderControlAutoplay.prototype.continueAutoplay = function (e) {
3304
+ if (this.autoplayDeferred.state() == 'pending') {
3305
+ this.autoplayDeferred.reject();
3306
+ }
3307
+ var deferreds = [];
3308
+ for (var k in this.deferredsExtraPlaying) {
3309
+ deferreds.push(this.deferredsExtraPlaying[k]);
3310
+ }
3311
+ for (var k in this.deferredsMediaPlaying) {
3312
+ deferreds.push(this.deferredsMediaPlaying[k]);
3313
+ }
3314
+ deferreds.push(this.deferredMouseEnter);
3315
+ deferreds.push(this.mainAnimationDeferred);
3316
+
3317
+ this.autoplayDeferred = $.Deferred();
3318
+ this.autoplayDeferred.done($.proxy(this._continueAutoplay, this));
3319
+
3320
+ $.when.apply($, deferreds).done($.proxy(function () {
3321
+ if (this.autoplayDeferred.state() == 'pending') {
3322
+ this.autoplayDeferred.resolve();
3323
+ }
3324
+ }, this));
3325
+ };
3326
+
3327
+ NextendSmartSliderControlAutoplay.prototype._continueAutoplay = function () {
3328
+ if ((this._paused || this._wait) && !this._disabled) {
3329
+ this._paused = false;
3330
+ this._wait = false;
3331
+ n2c.log('Event: autoplayStarted');
3332
+ this.slider.sliderElement.triggerHandler('autoplayStarted');
3333
+
3334
+ if (this.timeline.progress() == 1) {
3335
+ this.timeline.pause(0, false);
3336
+ }
3337
+
3338
+ this.startTimeout(null);
3339
+ }
3340
+ };
3341
+
3342
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayUniversal = function (e) {
3343
+ //this.autoplayDeferred.reject();
3344
+ this.pauseAutoplayExtraPlaying(e, 'autoplayButton');
3345
+ this.deActivate(null, 'pause');
3346
+ };
3347
+
3348
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMouseEnter = function () {
3349
+ if (!preventMouseEnter) {
3350
+ this.autoplayDeferred.reject();
3351
+ this.deferredMouseEnter = $.Deferred();
3352
+ this.deActivate(null, this.parameters.resume.mouse == 'leave' ? 'wait' : 'pause');
3353
+ }
3354
+ };
3355
+
3356
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMouseEnterEnded = function () {
3357
+ if (this.deferredMouseEnter) {
3358
+ this.deferredMouseEnter.resolve();
3359
+ }
3360
+ };
3361
+
3362
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMouseLeave = function () {
3363
+ this.autoplayDeferred.reject();
3364
+ this.deferredMouseLeave = $.Deferred();
3365
+ this.deActivate(null, this.parameters.resume.mouse == 'enter' ? 'wait' : 'pause');
3366
+ };
3367
+
3368
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMouseLeaveEnded = function () {
3369
+ if (this.deferredMouseLeave) {
3370
+ this.deferredMouseLeave.resolve();
3371
+ }
3372
+ };
3373
+
3374
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMediaPlaying = function (e, obj) {
3375
+ if (typeof this.deferredsMediaPlaying[obj] !== 'undefined') {
3376
+ this.autoplayDeferred.reject();
3377
+ }
3378
+ this.deferredsMediaPlaying[obj] = $.Deferred();
3379
+ this.deActivate(null, 'wait');
3380
+ };
3381
+
3382
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayMediaPlayingEnded = function (e, obj) {
3383
+ if (typeof this.deferredsMediaPlaying[obj] !== 'undefined') {
3384
+ this.autoplayDeferred.reject();
3385
+ this.deferredsMediaPlaying[obj].resolve();
3386
+ delete this.deferredsMediaPlaying[obj];
3387
+ }
3388
+ };
3389
+
3390
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayExtraPlaying = function (e, obj) {
3391
+ if (typeof this.deferredsExtraPlaying[obj] !== 'undefined') {
3392
+ this.autoplayDeferred.reject();
3393
+ }
3394
+ this.deferredsExtraPlaying[obj] = $.Deferred();
3395
+ this.deActivate(null, 'pause');
3396
+ };
3397
+
3398
+ NextendSmartSliderControlAutoplay.prototype.pauseAutoplayExtraPlayingEnded = function (e, obj) {
3399
+ if (typeof this.deferredsExtraPlaying[obj] !== 'undefined') {
3400
+ this.autoplayDeferred.reject();
3401
+ this.deferredsExtraPlaying[obj].resolve();
3402
+ delete this.deferredsExtraPlaying[obj];
3403
+ }
3404
+ this.continueAutoplay();
3405
+ };
3406
+
3407
+ NextendSmartSliderControlAutoplay.prototype.deActivate = function (seekTo, mode) {
3408
+ if (mode == 'pause') {
3409
+ if (!this._paused) {
3410
+ this._paused = true;
3411
+ if (seekTo !== 0) {
3412
+ n2c.log('Event: autoplayPaused');
3413
+ this.slider.sliderElement.triggerHandler('autoplayPaused');
3414
+ }
3415
+ }
3416
+ } else if (mode == 'wait') {
3417
+ if (!this._wait) {
3418
+ this._wait = true;
3419
+ if (seekTo !== 0) {
3420
+ n2c.log('Event: autoplayWait');
3421
+ this.slider.sliderElement.triggerHandler('autoplayWait');
3422
+ }
3423
+ }
3424
+ }
3425
+
3426
+ if (this.timeline) {
3427
+ this.timeline.pause(seekTo, false);
3428
+ }
3429
+ };
3430
+
3431
+ NextendSmartSliderControlAutoplay.prototype.disable = function () {
3432
+ this.deActivate(0, 'pause');
3433
+ this.slider.sliderElement.triggerHandler('autoplayPaused');
3434
+ this.slider.sliderElement.triggerHandler('autoplayDisabled');
3435
+ this.slider.sliderElement.off('.autoplay');
3436
+ n2c.log('Autoplay: disable');
3437
+ this._disabled = true;
3438
+ };
3439
+
3440
+ NextendSmartSliderControlAutoplay.prototype.startTimeout = function (time) {
3441
+ if (!this._paused && !this._disabled) {
3442
+ this.timeline.play(time);
3443
+ }
3444
+ };
3445
+
3446
+ NextendSmartSliderControlAutoplay.prototype.next = function () {
3447
+ this.timeline.pause();
3448
+ this._currentCount++;
3449
+ /**
3450
+ * We have reached the maximum slides in the autoplay so disable it completely
3451
+ */
3452
+ if (this.parameters.autoplayToSlide > 0 && this._currentCount >= this.parameters.autoplayToSlide || this.parameters.autoplayToSlideIndex >= 0 && this.parameters.autoplayToSlideIndex == this.slider.currentSlideIndex + 2) {
3453
+ this.limitAutoplay();
3454
+ }
3455
+
3456
+ this.slider.nextCarousel(true);
3457
+ };
3458
+
3459
+ NextendSmartSliderControlAutoplay.prototype.limitAutoplay = function () {
3460
+ n2c.log('Autoplay: auto play to slide value reached');
3461
+ if (!this.parameters.allowReStart) {
3462
+ this.disable();
3463
+ } else {
3464
+ this._currentCount = 0;
3465
+ this.slider.sliderElement.triggerHandler('autoplayExtraWait', 'autoplayButton');
3466
+ }
3467
+ }
3468
+
3469
+ NextendSmartSliderControlAutoplay.prototype.onUpdate = function () {
3470
+ this.slider.sliderElement.triggerHandler('autoplay', this.timeline.progress());
3471
+ };
3472
+
3473
+ scope.NextendSmartSliderControlAutoplay = NextendSmartSliderControlAutoplay;
3474
+ })(n2, window);
3475
+ (function ($, scope, undefined) {
3476
+ "use strict";
3477
+ function NextendSmartSliderControlKeyboard(slider, direction, parameters) {
3478
+
3479
+ this.slider = slider;
3480
+
3481
+ this.parameters = $.extend({}, parameters);
3482
+
3483
+ if (direction == 'vertical') {
3484
+ this.parseEvent = NextendSmartSliderControlKeyboard.prototype.parseEventVertical;
3485
+ } else {
3486
+ this.parseEvent = NextendSmartSliderControlKeyboard.prototype.parseEventHorizontal;
3487
+ }
3488
+
3489
+ $(document).on('keydown', $.proxy(this.onKeyDown, this));
3490
+
3491
+ slider.controls.keyboard = this;
3492
+ };
3493
+
3494
+ NextendSmartSliderControlKeyboard.prototype.isSliderOnScreen = function () {
3495
+ var offset = this.slider.sliderElement.offset(),
3496
+ scrollTop = $(window).scrollTop(),
3497
+ height = this.slider.sliderElement.height();
3498
+ if (offset.top + height * 0.5 >= scrollTop && offset.top - height * 0.5 <= scrollTop + $(window).height()) {
3499
+ return true;
3500
+ }
3501
+ return false;
3502
+ };
3503
+
3504
+ NextendSmartSliderControlKeyboard.prototype.onKeyDown = function (e) {
3505
+
3506
+ if (e.target.tagName.match(/BODY|DIV|IMG/)) {
3507
+ if (this.isSliderOnScreen()) {
3508
+ e = e || window.event;
3509
+ if (this.parseEvent.call(this, e)) {
3510
+ e.preventDefault();
3511
+ e.stopImmediatePropagation();
3512
+ }
3513
+ }
3514
+ }
3515
+ };
3516
+
3517
+ NextendSmartSliderControlKeyboard.prototype.parseEventHorizontal = function (e) {
3518
+ switch (e.keyCode) {
3519
+ case 39: // right arrow
3520
+ this.slider[nextend.rtl.next]();
3521
+ return true;
3522
+ case 37: // left arrow
3523
+ this.slider[nextend.rtl.previous]();
3524
+ return true;
3525
+ default:
3526
+ return false;
3527
+ }
3528
+ };
3529
+
3530
+ NextendSmartSliderControlKeyboard.prototype.parseEventVertical = function (e) {
3531
+ switch (e.keyCode) {
3532
+ case 40: // down arrow
3533
+ this.slider.next();
3534
+ return true;
3535
+ case 38: // up arrow
3536
+ this.slider.previous();
3537
+ return true;
3538
+ default:
3539
+ return false;
3540
+ }
3541
+ };
3542
+ scope.NextendSmartSliderControlKeyboard = NextendSmartSliderControlKeyboard;
3543
+ })(n2, window);
3544
+ (function ($, scope, undefined) {
3545
+ "use strict";
3546
+ function NextendSmartSliderControlScroll(slider) {
3547
+
3548
+ this.preventScroll = false
3549
+
3550
+ this.slider = slider;
3551
+
3552
+ slider.sliderElement.on('DOMMouseScroll mousewheel', $.proxy(this.onMouseWheel, this));
3553
+
3554
+ slider.controls.scroll = this;
3555
+ };
3556
+
3557
+ NextendSmartSliderControlScroll.prototype.onMouseWheel = function (e) {
3558
+ if (!this.preventScroll) {
3559
+
3560
+ var up = false;
3561
+ if (e.originalEvent) {
3562
+ if (e.originalEvent.wheelDelta) up = e.originalEvent.wheelDelta / -1 < 0;
3563
+ if (e.originalEvent.deltaY) up = e.originalEvent.deltaY < 0;
3564
+ if (e.originalEvent.detail) up = e.originalEvent.detail < 0;
3565
+ }
3566
+
3567
+ if (up) {
3568
+ if (this.slider.previous()) {
3569
+ this.preventScroll = true;
3570
+ // Stops the browser normal scroll
3571
+ e.preventDefault();
3572
+ }
3573
+ } else {
3574
+ if (this.slider.next()) {
3575
+ this.preventScroll = true;
3576
+ // Stops the browser normal scroll
3577
+ e.preventDefault();
3578
+ }
3579
+ }
3580
+ setTimeout($.proxy(function () {
3581
+ this.preventScroll = false;
3582
+ }, this), 1000);
3583
+ } else {
3584
+ e.preventDefault();
3585
+ }
3586
+ };
3587
+ scope.NextendSmartSliderControlScroll = NextendSmartSliderControlScroll;
3588
+ })(n2, window);
3589
+ (function ($, scope, undefined) {
3590
+ "use strict";
3591
+ function NextendSmartSliderControlTilt(slider, parameters) {
3592
+
3593
+ if (typeof window.DeviceOrientationEvent == 'undefined' || typeof window.orientation == 'undefined') {
3594
+ return "Not supported";
3595
+ }
3596
+ this.timeout = null;
3597
+
3598
+ this.slider = slider;
3599
+
3600
+ this.parameters = $.extend({
3601
+ duration: 2000
3602
+ }, parameters);
3603
+
3604
+ this.orientationchange();
3605
+
3606
+ window.addEventListener('orientationchange', $.proxy(this.orientationchange, this));
3607
+
3608
+ window.addEventListener("deviceorientation", $.proxy(this.handleOrientation, this), true);
3609
+
3610
+ slider.controls.tilt = this;
3611
+ };
3612
+
3613
+ NextendSmartSliderControlTilt.prototype.orientationchange = function () {
3614
+ switch (window.orientation) {
3615
+ case -90:
3616
+ case 90:
3617
+ this.parseEvent = NextendSmartSliderControlTilt.prototype.parseEventHorizontalLandscape;
3618
+ break;
3619
+ default:
3620
+ this.parseEvent = NextendSmartSliderControlTilt.prototype.parseEventHorizontal;
3621
+ break;
3622
+ }
3623
+ };
3624
+
3625
+ NextendSmartSliderControlTilt.prototype.clearTimeout = function () {
3626
+ this.timeout = null;
3627
+ };
3628
+
3629
+ NextendSmartSliderControlTilt.prototype.handleOrientation = function (e) {
3630
+ if (this.timeout == null && this.parseEvent.call(this, e)) {
3631
+ this.timeout = setTimeout($.proxy(this.clearTimeout, this), this.parameters.duration);
3632
+
3633
+ e.preventDefault();
3634
+ }
3635
+ };
3636
+
3637
+ NextendSmartSliderControlTilt.prototype.parseEventHorizontal = function (e) {
3638
+ if (e.gamma > 10) { // right tilt
3639
+ this.slider.next();
3640
+ return true;
3641
+ } else if (e.gamma < -10) { // left tilt
3642
+ this.slider.previous();
3643
+ return true;
3644
+ }
3645
+ return false;
3646
+ };
3647
+
3648
+ NextendSmartSliderControlTilt.prototype.parseEventHorizontalLandscape = function (e) {
3649
+ if (e.beta < -10) { // right tilt
3650
+ this.slider.next();
3651
+ return true;
3652
+ } else if (e.beta > 10) { // left tilt
3653
+ this.slider.previous();
3654
+ return true;
3655
+ }
3656
+ return false;
3657
+ };
3658
+
3659
+ scope.NextendSmartSliderControlTilt = NextendSmartSliderControlTilt;
3660
+
3661
+ })(n2, window);
3662
+ (function ($, scope, undefined) {
3663
+ "use strict";
3664
+ var pointer = window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
3665
+ hadDirection = false,
3666
+ preventMultipleTap = false;
3667
+
3668
+ function NextendSmartSliderControlTouch(slider, _direction, parameters) {
3669
+ this.currentAnimation = null;
3670
+ this.slider = slider;
3671
+
3672
+ this._animation = slider.mainAnimation;
3673
+
3674
+ this.parameters = $.extend({
3675
+ fallbackToMouseEvents: true
3676
+ }, parameters);
3677
+
3678
+ this.swipeElement = this.slider.sliderElement.find('> div').eq(0);
3679
+
3680
+ if (_direction == 'vertical') {
3681
+ this.setVertical();
3682
+ } else if (_direction == 'horizontal') {
3683
+ this.setHorizontal();
3684
+ }
3685
+
3686
+ var initTouch = $.proxy(function () {
3687
+ var that = this;
3688
+ N2EventBurrito(this.swipeElement.get(0), {
3689
+ mouse: this.parameters.fallbackToMouseEvents,
3690
+ axis: _direction == 'horizontal' ? 'x' : 'y',
3691
+ start: function (event, start) {
3692
+ hadDirection = false;
3693
+ },
3694
+ move: function (event, start, diff, speed, isRealScrolling) {
3695
+ var direction = that._direction.measure(diff);
3696
+ if (!isRealScrolling && direction != 'unknown' && that.currentAnimation === null) {
3697
+ if (that._animation.state != 'ended') {
3698
+ // skip the event as the current animation is still playing
3699
+ return false;
3700
+ }
3701
+ that.distance = [0];
3702
+ that.swipeElement.addClass('n2-grabbing');
3703
+
3704
+ // Force the main animation into touch mode horizontal/vertical
3705
+ that._animation.setTouch(that._direction.axis);
3706
+
3707
+ that.currentAnimation = {
3708
+ direction: direction,
3709
+ percent: 0
3710
+ };
3711
+ var isChangePossible = that.slider[that._direction[direction]](false);
3712
+ if (!isChangePossible) {
3713
+ that.currentAnimation = null;
3714
+ return false;
3715
+ }
3716
+ }
3717
+
3718
+ if (that.currentAnimation) {
3719
+ var realDistance = that._direction.get(diff, that.currentAnimation.direction);
3720
+ that.logDistance(realDistance);
3721
+ if (that.currentAnimation.percent < 1) {
3722
+ var percent = Math.max(-0.99999, Math.min(0.99999, realDistance / that.slider.dimensions.slider[that._property]));
3723
+ that.currentAnimation.percent = percent;
3724
+ that._animation.setTouchProgress(percent);
3725
+ }
3726
+ if ((hadDirection || Math.abs(realDistance) > that._direction.minDistance) && event.cancelable) {
3727
+ hadDirection = true;
3728
+ return true;
3729
+ }
3730
+ }
3731
+ return false;
3732
+ },
3733
+ end: function (event, start, diff, speed, isRealScrolling) {
3734
+ if (that.currentAnimation !== null) {
3735
+ var targetDirection = isRealScrolling ? 0 : that.measureRealDirection();
3736
+ var progress = that._animation.timeline.progress();
3737
+ if (progress != 1) {
3738
+ that._animation.setTouchEnd(targetDirection, that.currentAnimation.percent, diff.time);
3739
+ }
3740
+ that.swipeElement.removeClass('n2-grabbing');
3741
+
3742
+ // Switch back the animation into the original mode when our touch is ended
3743
+ that._animation.setTouch(false);
3744
+ that.currentAnimation = null;
3745
+ }
3746
+
3747
+ if (Math.abs(diff.x) < 10 && Math.abs(diff.y) < 10) {
3748
+ that.onTap(event);
3749
+ }
3750
+ }
3751
+ });
3752
+ }, this);
3753
+
3754
+ if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
3755
+ var parent = this.swipeElement.parent();
3756
+ if (parent.css('opacity') != 1) {
3757
+ this.swipeElement.parent().one('transitionend', initTouch);
3758
+ } else {
3759
+ initTouch();
3760
+ }
3761
+ } else {
3762
+ initTouch();
3763
+ }
3764
+
3765
+ if (!this.parameters.fallbackToMouseEvents) {
3766
+ this.swipeElement.on('click', $.proxy(this.onTap, this));
3767
+ }
3768
+
3769
+ if (this.parameters.fallbackToMouseEvents) {
3770
+ this.swipeElement.addClass('n2-grab');
3771
+ }
3772
+
3773
+ slider.controls.touch = this;
3774
+ };
3775
+
3776
+ NextendSmartSliderControlTouch.prototype.setHorizontal = function () {
3777
+
3778
+ this._property = 'width';
3779
+
3780
+ this._direction = {
3781
+ left: nextend.rtl.next,
3782
+ right: nextend.rtl.previous,
3783
+ up: null,
3784
+ down: null,
3785
+ axis: 'horizontal',
3786
+ minDistance: 10,
3787
+ measure: function (diff) {
3788
+ if ((!hadDirection && Math.abs(diff.x) < 10) || diff.x == 0 || Math.abs(diff.x) < Math.abs(diff.y)) return 'unknown';
3789
+ return diff.x < 0 ? 'left' : 'right';
3790
+ },
3791
+ get: function (diff, direction) {
3792
+ if (direction == 'left') {
3793
+ return -diff.x;
3794
+ }
3795
+ return diff.x;
3796
+ }
3797
+ };
3798
+
3799
+ if (pointer) {
3800
+ this.swipeElement.css('-ms-touch-action', 'pan-y');
3801
+ this.swipeElement.css('touch-action', 'pan-y');
3802
+ }
3803
+ };
3804
+
3805
+ NextendSmartSliderControlTouch.prototype.setVertical = function () {
3806
+
3807
+ this._property = 'height';
3808
+
3809
+ this._direction = {
3810
+ left: null,
3811
+ right: null,
3812
+ up: 'next',
3813
+ down: 'previous',
3814
+ axis: 'vertical',
3815
+ minDistance: 1,
3816
+ measure: function (diff) {
3817
+ if ((!hadDirection && Math.abs(diff.y) < 1) || diff.y == 0 || Math.abs(diff.y) < Math.abs(diff.x)) return 'unknown';
3818
+ return diff.y < 0 ? 'up' : 'down';
3819
+ },
3820
+ get: function (diff, direction) {
3821
+ if (direction == 'up') {
3822
+ return -diff.y;
3823
+ }
3824
+ return diff.y;
3825
+ }
3826
+ };
3827
+
3828
+ if (pointer) {
3829
+ this.swipeElement.css('-ms-touch-action', 'pan-x');
3830
+ this.swipeElement.css('touch-action', 'pan-x');
3831
+ }
3832
+ };
3833
+
3834
+ NextendSmartSliderControlTouch.prototype.logDistance = function (realDistance) {
3835
+ if (this.distance.length > 3) {
3836
+ this.distance.shift();
3837
+ }
3838
+ this.distance.push(realDistance);
3839
+ };
3840
+
3841
+ NextendSmartSliderControlTouch.prototype.measureRealDirection = function () {
3842
+ var firstValue = this.distance[0],
3843
+ lastValue = this.distance[this.distance.length - 1];
3844
+
3845
+ if ((lastValue >= 0 && firstValue > lastValue) || (lastValue < 0 && firstValue < lastValue)) {
3846
+ return 0;
3847
+ }
3848
+ return 1;
3849
+ };
3850
+
3851
+ NextendSmartSliderControlTouch.prototype.onTap = function (e) {
3852
+ if (!preventMultipleTap) {
3853
+ $(e.target).trigger('n2click');
3854
+ preventMultipleTap = true;
3855
+ setTimeout(function () {
3856
+ preventMultipleTap = false;
3857
+ }, 500);
3858
+ }
3859
+ };
3860
+
3861
+ scope.NextendSmartSliderControlTouch = NextendSmartSliderControlTouch;
3862
+
3863
+ })(n2, window);
3864
+ (function ($, scope, undefined) {
3865
+
3866
+ /**
3867
+ * NOT_INITIALIZED -> INITIALIZED -> READY_TO_START -> PLAYING -> ENDED
3868
+ * <-----------------------------/
3869
+ */
3870
+ var SlideStatus = {
3871
+ NOT_INITIALIZED: -1,
3872
+ INITIALIZED: 0,
3873
+ READY_TO_START: 1,
3874
+ PLAYING: 2,
3875
+ ENDED: 3
3876
+ },
3877
+ TimelineMode = {
3878
+ event: 0,
3879
+ linear: 1
3880
+ },
3881
+ LayerStatus = {
3882
+ NOT_INITIALIZED: -1,
3883
+ INITIALIZED: 1,
3884
+ PLAY_IN_DISABLED: 2,
3885
+ PLAY_IN_STARTED: 3,
3886
+ PLAY_IN_PAUSED: 4,
3887
+ PLAY_IN_ENDED: 5,
3888
+ PLAY_LOOP_STARTED: 6,
3889
+ PLAY_LOOP_PAUSED: 7,
3890
+ PLAY_LOOP_ENDED: 8,
3891
+ PLAY_OUT_STARTED: 9,
3892
+ PLAY_OUT_PAUSED: 10,
3893
+ PLAY_OUT_ENDED: 11
3894
+ },
3895
+ In = {
3896
+ NOT_INITIALIZED: -1,
3897
+ NO: 0,
3898
+ INITIALIZED: 1
3899
+ },
3900
+ Loop = {
3901
+ NOT_INITIALIZED: -1,
3902
+ NO: 0,
3903
+ INITIALIZED: 1
3904
+ },
3905
+ Out = {
3906
+ NOT_INITIALIZED: -1,
3907
+ NO: 0,
3908
+ INITIALIZED: 1
3909
+ },
3910
+ zero = {
3911
+ opacity: 1,
3912
+ x: 0,
3913
+ y: 0,
3914
+ z: 0,
3915
+ rotationX: 0,
3916
+ rotationY: 0,
3917
+ rotationZ: 0,
3918
+ scaleX: 1,
3919
+ scaleY: 1,
3920
+ scaleZ: 1,
3921
+ skewX: 0
3922
+ },
3923
+ responsiveProperties = ['left', 'top', 'width', 'height'];
3924
+
3925
+
3926
+ if (/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent)) {
3927
+ function getPos($element) {
3928
+ return $element.position();
3929
+ }
3930
+ } else {
3931
+ function getPos($element) {
3932
+ return {
3933
+ left: $element.prop('offsetLeft'),
3934
+ top: $element.prop('offsetTop')
3935
+ }
3936
+ }
3937
+ }
3938
+
3939
+ function Slide(slider, $slideElement, isFirstSlide, isStaticSlide) {
3940
+ if (typeof isStaticSlide === 'undefined') {
3941
+ isStaticSlide = false;
3942
+ }
3943
+ this.isStaticSlide = isStaticSlide;
3944
+ this.status = SlideStatus.NOT_INITIALIZED;
3945
+ this.slider = slider;
3946
+ this.slider.isFirstSlide = true;
3947
+
3948
+ this.$slideElement = $slideElement;
3949
+
3950
+ $slideElement.data('slide', this);
3951
+
3952
+ if (!slider.parameters.admin) {
3953
+ this.minimumSlideDuration = $slideElement.data('slide-duration');
3954
+ if (!$.isNumeric(this.minimumSlideDuration)) {
3955
+ this.minimumSlideDuration = 0;
3956
+ }
3957
+ } else {
3958
+ this.minimumSlideDuration = 0;
3959
+ }
3960
+
3961
+ this.findLayers();
3962
+
3963
+ if (!this.slider.parameters.admin || !$slideElement.is(this.slider.adminGetCurrentSlideElement())) {
3964
+ this.initResponsiveMode();
3965
+ }
3966
+
3967
+ this.status = SlideStatus.INITIALIZED;
3968
+
3969
+ this.playOnce = (!this.slider.isAdmin && this.slider.parameters.layerMode.playOnce);
3970
+ };
3971
+
3972
+ Slide.prototype.isActive = function () {
3973
+ return this.$slideElement.hasClass('n2-ss-slide-active');
3974
+ };
3975
+
3976
+ Slide.prototype.findLayers = function () {
3977
+ this.$layers = this.$slideElement.find('.n2-ss-layer')
3978
+ .each($.proxy(function (i, el) {
3979
+ var $el = $(el);
3980
+ for (var j = 0; j < responsiveProperties.length; j++) {
3981
+ var property = responsiveProperties[j];
3982
+ $el.data('desktop' + property, parseFloat(el.style[property]));
3983
+ }
3984
+ var parent = this.getLayerProperty($el, 'parentid');
3985
+ if (typeof parent !== 'undefined' && parent) {
3986
+ parent = $('#' + parent);
3987
+ if (parent.length > 0) {
3988
+ $el.data('parent', parent);
3989
+ }
3990
+ } else {
3991
+ $el.data('parent', false);
3992
+ }
3993
+ }, this));
3994
+ this.$parallax = this.$layers.filter('[data-parallax]');
3995
+ };
3996
+
3997
+ Slide.prototype.getLayerResponsiveProperty = function (layer, mode, property) {
3998
+ var value = layer.data(mode + property);
3999
+ if (typeof value != 'undefined') {
4000
+ return value;
4001
+ }
4002
+ if (mode != 'desktopportrait') {
4003
+ return layer.data('desktopportrait' + property);
4004
+ }
4005
+ return 0;
4006
+ };
4007
+
4008
+ Slide.prototype.getLayerProperty = function (layer, property) {
4009
+ return layer.data(property);
4010
+ };
4011
+
4012
+ Slide.prototype.initResponsiveMode = function () {
4013
+ this.slider.sliderElement.on('SliderDeviceOrientation', $.proxy(function (e, modes) {
4014
+ var mode = modes.device + modes.orientation.toLowerCase();
4015
+ this.currentMode = mode;
4016
+ this.$layers.each($.proxy(function (i, el) {
4017
+ var layer = $(el),
4018
+ show = layer.data(mode),
4019
+ parent = layer.data('parent');
4020
+ if ((typeof show == 'undefined' || parseInt(show))) {
4021
+ if (this.getLayerProperty(layer, 'adaptivefont')) {
4022
+ layer.css('font-size', (16 * this.getLayerResponsiveProperty(layer, this.currentMode, 'fontsize') / 100) + 'px');
4023
+ } else {
4024
+ layer.css('font-size', this.getLayerResponsiveProperty(layer, this.currentMode, 'fontsize') + '%');
4025
+ }
4026
+ layer.data('shows', 1);
4027
+ layer.css('display', 'block');
4028
+ } else {
4029
+ layer.data('shows', 0);
4030
+ layer.css('display', 'none');
4031
+ }
4032
+ }, this));
4033
+ }, this))
4034
+ .on('SliderResize', $.proxy(function (e, ratios, responsive) {
4035
+
4036
+ var dimensions = responsive.responsiveDimensions;
4037
+
4038
+ this.$layers.each($.proxy(function (i, el) {
4039
+ this.repositionLayer($(el), ratios, dimensions);
4040
+ }, this));
4041
+ }, this));
4042
+ };
4043
+
4044
+ Slide.prototype.isDimensionPropertyAccepted = function (value) {
4045
+ if ((value + '').match(/[0-9]+%/) || value == 'auto') {
4046
+ return true;
4047
+ }
4048
+ return false;
4049
+ };
4050
+
4051
+ Slide.prototype.repositionLayer = function (layer, ratios, dimensions) {
4052
+ var ratioPositionH = ratios.slideW,
4053
+ ratioSizeH = ratioPositionH,
4054
+ ratioPositionV = ratios.slideH,
4055
+ ratioSizeV = ratioPositionV;
4056
+
4057
+ if (!parseInt(this.getLayerProperty(layer, 'responsivesize'))) {
4058
+ ratioSizeH = ratioSizeV = 1;
4059
+ }
4060
+
4061
+ var width = this.getLayerResponsiveProperty(layer, this.currentMode, 'width');
4062
+ layer.css('width', this.isDimensionPropertyAccepted(width) ? width : (width * ratioSizeH) + 'px');
4063
+ var height = this.getLayerResponsiveProperty(layer, this.currentMode, 'height');
4064
+ layer.css('height', this.isDimensionPropertyAccepted(height) ? height : (height * ratioSizeV) + 'px');
4065
+
4066
+ if (!parseInt(this.getLayerProperty(layer, 'responsiveposition'))) {
4067
+ ratioPositionH = ratioPositionV = 1;
4068
+ }
4069
+
4070
+
4071
+ var left = this.getLayerResponsiveProperty(layer, this.currentMode, 'left') * ratioPositionH,
4072
+ top = this.getLayerResponsiveProperty(layer, this.currentMode, 'top') * ratioPositionV,
4073
+ align = this.getLayerResponsiveProperty(layer, this.currentMode, 'align'),
4074
+ valign = this.getLayerResponsiveProperty(layer, this.currentMode, 'valign');
4075
+
4076
+
4077
+ var positionCSS = {
4078
+ left: 'auto',
4079
+ top: 'auto',
4080
+ right: 'auto',
4081
+ bottom: 'auto'
4082
+ },
4083
+ parent = this.getLayerProperty(layer, 'parent');
4084
+
4085
+ if (parent && parent.data('shows')) {
4086
+ var position = getPos(parent),
4087
+ p = {left: 0, top: 0};
4088
+
4089
+ switch (this.getLayerResponsiveProperty(layer, this.currentMode, 'parentalign')) {
4090
+ case 'right':
4091
+ p.left = position.left + parent.width();
4092
+ break;
4093
+ case 'center':
4094
+ p.left = position.left + parent.width() / 2;
4095
+ break;
4096
+ default:
4097
+ p.left = position.left;
4098
+ }
4099
+
4100
+ switch (align) {
4101
+ case 'right':
4102
+ positionCSS.right = (layer.parent().width() - p.left - left) + 'px';
4103
+ break;
4104
+ case 'center':
4105
+ positionCSS.left = (p.left + left - layer.width() / 2) + 'px';
4106
+ break;
4107
+ default:
4108
+ positionCSS.left = (p.left + left) + 'px';
4109
+ break;
4110
+ }
4111
+
4112
+
4113
+ switch (this.getLayerResponsiveProperty(layer, this.currentMode, 'parentvalign')) {
4114
+ case 'bottom':
4115
+ p.top = position.top + parent.height();
4116
+ break;
4117
+ case 'middle':
4118
+ p.top = position.top + parent.height() / 2;
4119
+ break;
4120
+ default:
4121
+ p.top = position.top;
4122
+ }
4123
+
4124
+ switch (valign) {
4125
+ case 'bottom':
4126
+ positionCSS.bottom = (layer.parent().height() - p.top - top) + 'px';
4127
+ break;
4128
+ case 'middle':
4129
+ positionCSS.top = (p.top + top - layer.height() / 2) + 'px';
4130
+ break;
4131
+ default:
4132
+ positionCSS.top = (p.top + top) + 'px';
4133
+ break;
4134
+ }
4135
+
4136
+
4137
+ } else {
4138
+ switch (align) {
4139
+ case 'right':
4140
+ positionCSS.right = -left + 'px';
4141
+ break;
4142
+ case 'center':
4143
+ positionCSS.left = ((this.isStaticSlide ? layer.parent().width() : dimensions.slide.width) / 2 + left - layer.width() / 2) + 'px';
4144
+ break;
4145
+ default:
4146
+ positionCSS.left = left + 'px';
4147
+ break;
4148
+ }
4149
+
4150
+ switch (valign) {
4151
+ case 'bottom':
4152
+ positionCSS.bottom = -top + 'px';
4153
+ break;
4154
+ case 'middle':
4155
+ positionCSS.top = ((this.isStaticSlide ? layer.parent().height() : dimensions.slide.height) / 2 + top - layer.height() / 2) + 'px';
4156
+ break;
4157
+ default:
4158
+ positionCSS.top = top + 'px';
4159
+ break;
4160
+ }
4161
+ }
4162
+ layer.css(positionCSS);
4163
+ };
4164
+
4165
+ Slide.prototype.setZero = function () {
4166
+ this.$slideElement.trigger('layerSetZero', this);
4167
+ };
4168
+
4169
+ Slide.prototype.setZeroAll = function () {
4170
+ this.$slideElement.trigger('layerSetZeroAll', this);
4171
+ };
4172
+
4173
+ Slide.prototype.setStart = function () {
4174
+ if (this.status == SlideStatus.INITIALIZED) {
4175
+ this.$slideElement.trigger('layerAnimationSetStart');
4176
+ this.status = SlideStatus.READY_TO_START;
4177
+ }
4178
+ };
4179
+
4180
+ Slide.prototype.playIn = function () {
4181
+ if (this.status == SlideStatus.READY_TO_START) {
4182
+ this.status = SlideStatus.PLAYING;
4183
+ this.$slideElement.trigger('layerAnimationPlayIn');
4184
+ }
4185
+ };
4186
+
4187
+ Slide.prototype.playOut = function () {
4188
+ if (this.status == SlideStatus.PLAYING) {
4189
+ var deferreds = [];
4190
+ this.$slideElement.triggerHandler('beforeMainSwitch', [deferreds]);
4191
+
4192
+ $.when.apply($, deferreds)
4193
+ .done($.proxy(function () {
4194
+ this.onOutAnimationsPlayed();
4195
+ }, this));
4196
+ } else {
4197
+ this.onOutAnimationsPlayed();
4198
+ }
4199
+ };
4200
+
4201
+ Slide.prototype.onOutAnimationsPlayed = function () {
4202
+ if (!this.playOnce) {
4203
+ this.status = SlideStatus.INITIALIZED;
4204
+ } else {
4205
+ this.status = SlideStatus.ENDED;
4206
+ }
4207
+ this.$slideElement.trigger('layerAnimationCompleteOut');
4208
+ };
4209
+
4210
+ Slide.prototype.pause = function () {
4211
+ this.$slideElement.triggerHandler('layerPause');
4212
+ };
4213
+
4214
+ Slide.prototype.reset = function () {
4215
+ this.$slideElement.triggerHandler('layerReset');
4216
+ this.status = SlideStatus.INITIALIZED;
4217
+ };
4218
+
4219
+ Slide.prototype.getTimeline = function () {
4220
+ return this.layers.getTimeline();
4221
+ };
4222
+
4223
+ scope.NextendSmartSliderSlide = Slide;
4224
+
4225
+ function SlideLayers(slide, $layers, mode, ratios) {
4226
+ this.layerAnimations = [];
4227
+ this.slide = slide;
4228
+ slide.$slideElement.off(".n2-ss-animations");
4229
+ for (var i = 0; i < $layers.length; i++) {
4230
+ var $layer = $layers.eq(i);
4231
+ this.layerAnimations.push(new SlideLayerAnimations(slide, this, $layer, $layer.find('.n2-ss-layer-mask, .n2-ss-layer-parallax').addBack().last(), mode, ratios));
4232
+ }
4233
+ };
4234
+
4235
+ SlideLayers.prototype.refresh = function (ratios) {
4236
+ for (var i = 0; i < this.layerAnimations.length; i++) {
4237
+ this.layerAnimations[i].refresh(ratios);
4238
+ }
4239
+ };
4240
+
4241
+ SlideLayers.prototype.getTimeline = function () {
4242
+ var timeline = new NextendTimeline({
4243
+ paused: 1
4244
+ });
4245
+ for (var i = 0; i < this.layerAnimations.length; i++) {
4246
+ var animation = this.layerAnimations[i];
4247
+ timeline.add(animation.linearTimeline, 0);
4248
+ animation.linearTimeline.paused(false);
4249
+
4250
+ }
4251
+ return timeline;
4252
+ };
4253
+ scope.NextendSmartSliderSlideLayers = SlideLayers;
4254
+
4255
+ })(n2, window);
4256
+ (function ($, scope, undefined) {
4257
+
4258
+ var isTablet = null,
4259
+ isMobile = null;
4260
+
4261
+ function NextendSmartSliderResponsive(slider, parameters) {
4262
+ this.disableTransitions = false;
4263
+ this.disableTransitionsTimeout = null;
4264
+
4265
+ if (slider.isAdmin) {
4266
+ this.doResize = NextendThrottle(this.doResize, 50);
4267
+ }
4268
+
4269
+ if (typeof nextend.fontsDeferred === 'undefined') {
4270
+ this.triggerResize = this._triggerResize;
4271
+ }
4272
+
4273
+
4274
+ this.fixedEditRatio = 1;
4275
+ this.normalizeTimeout = null;
4276
+ this.delayedResizeAdded = false;
4277
+
4278
+ this.deviceMode = NextendSmartSliderResponsive.DeviceMode.UNKNOWN;
4279
+ this.orientationMode = NextendSmartSliderResponsive.OrientationMode.SCREEN;
4280
+ this.orientation = NextendSmartSliderResponsive.DeviceOrientation.UNKNOWN;
4281
+ this.lastRatios = {
4282
+ ratio: -1
4283
+ };
4284
+ this.normalizedMode = 'unknownUnknown';
4285
+
4286
+ slider.responsive = this;
4287
+
4288
+ this.widgetMargins = {
4289
+ Top: [],
4290
+ Right: [],
4291
+ Bottom: [],
4292
+ Left: []
4293
+ };
4294
+ this.staticSizes = {
4295
+ paddingTop: 0,
4296
+ paddingRight: 0,
4297
+ paddingBottom: 0,
4298
+ paddingLeft: 0
4299
+ };
4300
+ this.enabledWidgetMargins = [];
4301
+
4302
+ this.slider = slider;
4303
+ this.sliderElement = slider.sliderElement;
4304
+
4305
+
4306
+ this.alignElement = this.slider.sliderElement.closest('.n2-ss-align');
4307
+
4308
+ var ready = this.ready = $.Deferred();
4309
+
4310
+ this.sliderElement.triggerHandler('SliderResponsiveStarted');
4311
+
4312
+ this.sliderElement.one('SliderResize', function () {
4313
+ ready.resolve();
4314
+ });
4315
+
4316
+ this.containerElementPadding = this.sliderElement.parent();
4317
+ this.containerElement = this.containerElementPadding.parent();
4318
+ this.parameters = $.extend({
4319
+ desktop: 1,
4320
+ tablet: 1,
4321
+ mobile: 1,
4322
+
4323
+ onResizeEnabled: true,
4324
+ type: 'auto',
4325
+ downscale: true,
4326
+ upscale: false,
4327
+ constrainRatio: true,
4328
+ minimumHeight: 0,
4329
+ maximumHeight: 0,
4330
+ minimumHeightRatio: 0,
4331
+ maximumHeightRatio: {
4332
+ desktopLandscape: 0,
4333
+ desktopPortrait: 0,
4334
+ mobileLandscape: 0,
4335
+ mobilePortrait: 0,
4336
+ tabletLandscape: 0,
4337
+ tabletPortrait: 0
4338
+ },
4339
+ maximumSlideWidth: 0,
4340
+ maximumSlideWidthLandscape: 0,
4341
+ maximumSlideWidthRatio: -1,
4342
+ maximumSlideWidthTablet: 0,
4343
+ maximumSlideWidthTabletLandscape: 0,
4344
+ maximumSlideWidthMobile: 0,
4345
+ maximumSlideWidthMobileLandscape: 0,
4346
+ maximumSlideWidthConstrainHeight: 0,
4347
+ forceFull: 0,
4348
+ verticalOffsetSelectors: '',
4349
+
4350
+ focusUser: 0,
4351
+ focusAutoplay: 0,
4352
+
4353
+ deviceModes: {
4354
+ desktopLandscape: 1,
4355
+ desktopPortrait: 0,
4356
+ mobileLandscape: 0,
4357
+ mobilePortrait: 0,
4358
+ tabletLandscape: 0,
4359
+ tabletPortrait: 0
4360
+ },
4361
+ normalizedDeviceModes: {
4362
+ unknownUnknown: ["unknown", "Unknown"],
4363
+ desktopPortrait: ["desktop", "Portrait"]
4364
+ },
4365
+ verticalRatioModifiers: {
4366
+ unknownUnknown: 1,
4367
+ desktopLandscape: 1,
4368
+ desktopPortrait: 1,
4369
+ mobileLandscape: 1,
4370
+ mobilePortrait: 1,
4371
+ tabletLandscape: 1,
4372
+ tabletPortrait: 1
4373
+ },
4374
+ minimumFontSizes: {
4375
+ desktopLandscape: 0,
4376
+ desktopPortrait: 0,
4377
+ mobileLandscape: 0,
4378
+ mobilePortrait: 0,
4379
+ tabletLandscape: 0,
4380
+ tabletPortrait: 0
4381
+ },
4382
+ ratioToDevice: {
4383
+ Portrait: {
4384
+ tablet: 0,
4385
+ mobile: 0
4386
+ },
4387
+ Landscape: {
4388
+ tablet: 0,
4389
+ mobile: 0
4390
+ }
4391
+ },
4392
+ sliderWidthToDevice: {
4393
+ desktopLandscape: 0,
4394
+ desktopPortrait: 0,
4395
+ mobileLandscape: 0,
4396
+ mobilePortrait: 0,
4397
+ tabletLandscape: 0,
4398
+ tabletPortrait: 0
4399
+ },
4400
+
4401
+ basedOn: 'combined',
4402
+ desktopPortraitScreenWidth: 1200,
4403
+ tabletPortraitScreenWidth: 800,
4404
+ mobilePortraitScreenWidth: 440,
4405
+ tabletLandscapeScreenWidth: 1024,
4406
+ mobileLandscapeScreenWidth: 740,
4407
+ orientationMode: 'width_and_height',
4408
+ scrollFix: 0,
4409
+ overflowHiddenPage: 0
4410
+ }, parameters);
4411
+
4412
+
4413
+ if (!this.slider.isAdmin && this.parameters.overflowHiddenPage) {
4414
+ $('html, body').css('overflow', 'hidden');
4415
+ }
4416
+
4417
+ if (this.parameters.orientationMode == 'width') {
4418
+ this.orientationMode = NextendSmartSliderResponsive.OrientationMode.SCREEN_WIDTH_ONLY;
4419
+ }
4420
+
4421
+ nextend.smallestZoom = Math.min(Math.max(parameters.sliderWidthToDevice.mobilePortrait, 120), 380);
4422
+
4423
+ switch (this.parameters.basedOn) {
4424
+ case 'screen':
4425
+ break;
4426
+ default:
4427
+ if (isTablet == null) {
4428
+ var md = new MobileDetect(window.navigator.userAgent, 801);
4429
+ isTablet = !!md.tablet();
4430
+ isMobile = !!md.phone();
4431
+ }
4432
+ }
4433
+
4434
+ if (!this.slider.isAdmin) {
4435
+ if (!this.parameters.desktop || !this.parameters.tablet || !this.parameters.mobile) {
4436
+ if (isTablet == null) {
4437
+ var md = new MobileDetect(window.navigator.userAgent, 801);
4438
+ isTablet = !!md.tablet();
4439
+ isMobile = !!md.phone();
4440
+ }
4441
+ if (!this.parameters.mobile && isMobile || !this.parameters.tablet && isTablet || !this.parameters.desktop && !isTablet && !isMobile) {
4442
+ this.slider.kill();
4443
+ return;
4444
+ }
4445
+ }
4446
+ }
4447
+
4448
+ this.verticalOffsetSelectors = $(this.parameters.verticalOffsetSelectors);
4449
+
4450
+ n2c.log('Responsive: Store defaults');
4451
+ this.storeDefaults();
4452
+
4453
+ if (this.parameters.minimumHeight > 0) {
4454
+ this.parameters.minimumHeightRatio = this.parameters.minimumHeight / this.responsiveDimensions.startHeight;
4455
+ }
4456
+
4457
+ if (this.parameters.maximumHeight > 0 && this.parameters.maximumHeight >= this.parameters.minimumHeight) {
4458
+ this.parameters.maximumHeightRatio = {
4459
+ desktopPortrait: this.parameters.maximumHeight / this.responsiveDimensions.startHeight
4460
+ };
4461
+ this.parameters.maximumHeightRatio.desktopLandscape = this.parameters.maximumHeightRatio.desktopPortrait;
4462
+ this.parameters.maximumHeightRatio.tabletPortrait = this.parameters.maximumHeightRatio.desktopPortrait;
4463
+ this.parameters.maximumHeightRatio.tabletLandscape = this.parameters.maximumHeightRatio.desktopPortrait;
4464
+ this.parameters.maximumHeightRatio.mobilePortrait = this.parameters.maximumHeightRatio.desktopPortrait;
4465
+ this.parameters.maximumHeightRatio.mobileLandscape = this.parameters.maximumHeightRatio.desktopPortrait;
4466
+ }
4467
+
4468
+ if (this.parameters.maximumSlideWidth > 0) {
4469
+ this.parameters.maximumSlideWidthRatio = {
4470
+ desktopPortrait: this.parameters.maximumSlideWidth / this.responsiveDimensions.startSlideWidth,
4471
+ desktopLandscape: this.parameters.maximumSlideWidthLandscape / this.responsiveDimensions.startSlideWidth,
4472
+ tabletPortrait: this.parameters.maximumSlideWidthTablet / this.responsiveDimensions.startSlideWidth,
4473
+ tabletLandscape: this.parameters.maximumSlideWidthTabletLandscape / this.responsiveDimensions.startSlideWidth,
4474
+ mobilePortrait: this.parameters.maximumSlideWidthMobile / this.responsiveDimensions.startSlideWidth,
4475
+ mobileLandscape: this.parameters.maximumSlideWidthMobileLandscape / this.responsiveDimensions.startSlideWidth
4476
+ }
4477
+
4478
+ if (this.parameters.maximumSlideWidthConstrainHeight) {
4479
+ this.parameters.maximumHeightRatio = this.parameters.maximumSlideWidthRatio;
4480
+ }
4481
+ }
4482
+
4483
+ n2c.log('Responsive: First resize');
4484
+ if (typeof nextend !== 'undefined' && typeof nextend['ssBeforeResponsive'] !== 'undefined') {
4485
+ nextend['ssBeforeResponsive'].call(this);
4486
+ }
4487
+
4488
+ this.onResize();
4489
+ if (this.parameters.onResizeEnabled || this.parameters.type == 'adaptive') {
4490
+ $(window).on('resize', $.proxy(this.onResize, this));
4491
+
4492
+
4493
+ this.sliderElement.on('SliderInternalResize', $.proxy(this.onResize, this));
4494
+
4495
+ if (this.parameters.scrollFix) {
4496
+ try {
4497
+ var that = this,
4498
+ iframe = $('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>')
4499
+ .on('load', function (e) {
4500
+ $(e.target.contentWindow ? e.target.contentWindow : e.target.contentDocument.defaultView).on('resize', function () {
4501
+ that.sliderElement.triggerHandler('SliderInternalResize');
4502
+ });
4503
+ }).insertBefore(this.containerElement);
4504
+ } catch (e) {
4505
+ }
4506
+ }
4507
+ }
4508
+ };
4509
+
4510
+ NextendSmartSliderResponsive.OrientationMode = {
4511
+ SCREEN: 0,
4512
+ ADMIN_LANDSCAPE: 1,
4513
+ ADMIN_PORTRAIT: 2,
4514
+ SCREEN_WIDTH_ONLY: 3
4515
+ };
4516
+ NextendSmartSliderResponsive.DeviceOrientation = {
4517
+ UNKNOWN: 0,
4518
+ LANDSCAPE: 1,
4519
+ PORTRAIT: 2
4520
+ };
4521
+ NextendSmartSliderResponsive._DeviceOrientation = {
4522
+ 0: 'Unknown',
4523
+ 1: 'Landscape',
4524
+ 2: 'Portrait'
4525
+ };
4526
+ NextendSmartSliderResponsive.DeviceMode = {
4527
+ UNKNOWN: 0,
4528
+ DESKTOP: 1,
4529
+ TABLET: 2,
4530
+ MOBILE: 3
4531
+ };
4532
+ NextendSmartSliderResponsive._DeviceMode = {
4533
+ 0: 'unknown',
4534
+ 1: 'desktop',
4535
+ 2: 'tablet',
4536
+ 3: 'mobile'
4537
+ };
4538
+
4539
+ NextendSmartSliderResponsive.prototype.getOuterWidth = function () {
4540
+ var rd = this.responsiveDimensions;
4541
+ return rd.startSliderWidth + rd.startSliderMarginLeft + rd.startSliderMarginRight;
4542
+ };
4543
+
4544
+ NextendSmartSliderResponsive.prototype.storeDefaults = function () {
4545
+
4546
+ // We should use outerWidth(true) as we need proper margin calculation for the ratio
4547
+ this.responsiveDimensions = {
4548
+ startWidth: this.sliderElement.outerWidth(true),
4549
+ startHeight: this.sliderElement.outerHeight(true)
4550
+ };
4551
+
4552
+ /**
4553
+ * @type {NextendSmartSliderResponsiveElement[]}
4554
+ */
4555
+ this.responsiveElements = [];
4556
+
4557
+ this.helperElements = {};
4558
+
4559
+ this.addResponsiveElements();
4560
+
4561
+ this.margins = {
4562
+ top: this.responsiveDimensions.startSliderMarginTop,
4563
+ right: this.responsiveDimensions.startSliderMarginRight,
4564
+ bottom: this.responsiveDimensions.startSliderMarginBottom,
4565
+ left: this.responsiveDimensions.startSliderMarginLeft
4566
+ }
4567
+ };
4568
+
4569
+ /**
4570
+ * @abstract
4571
+ */
4572
+ NextendSmartSliderResponsive.prototype.addResponsiveElements = function () {
4573
+ };
4574
+
4575
+ /**
4576
+ * Add an element list as a single element. Other elements in the list will get the same property as the first element.
4577
+ * @param element
4578
+ * @param cssproperties
4579
+ * @param name
4580
+ */
4581
+ NextendSmartSliderResponsive.prototype.addResponsiveElement = function (element, cssproperties, group, name) {
4582
+ if (typeof group === 'undefined' || !group) {
4583
+ group = 'ratio';
4584
+ }
4585
+ var responsiveElement = new NextendSmartSliderResponsiveElement(this, group, element, cssproperties, name);
4586
+ this.responsiveElements.push(responsiveElement);
4587
+ return responsiveElement;
4588
+ };
4589
+
4590
+ NextendSmartSliderResponsive.prototype.addResponsiveElementBackgroundImage = function (element, backgroundImage, cssproperties, group, name) {
4591
+ if (typeof group === 'undefined' || !group) {
4592
+ group = 'ratio';
4593
+ }
4594
+ var responsiveElement = new NextendSmartSliderResponsiveElementBackgroundImage(this, backgroundImage, group, element, cssproperties, name);
4595
+ this.responsiveElements.push(responsiveElement);
4596
+ return responsiveElement;
4597
+ };
4598
+
4599
+ /**
4600
+ * Add each element from the list as a single element. It is good for image list as every image might have different dimensions
4601
+ * @param elements
4602
+ * @param cssproperties
4603
+ * @param name
4604
+ */
4605
+ NextendSmartSliderResponsive.prototype.addResponsiveElementAsSingle = function (elements, cssproperties, group, name) {
4606
+ var responsiveElements = [];
4607
+ for (var i = 0; i < elements.length; i++) {
4608
+ responsiveElements.push(this.addResponsiveElement(elements.eq(i), cssproperties.slice(0), group, name));
4609
+ }
4610
+ return responsiveElements;
4611
+ };
4612
+
4613
+ NextendSmartSliderResponsive.prototype.addResponsiveElementBackgroundImageAsSingle = function (elements, backgroundImage, cssproperties, group, name) {
4614
+ var responsiveElements = [];
4615
+ for (var i = 0; i < elements.length; i++) {
4616
+ responsiveElements.push(this.addResponsiveElementBackgroundImage(elements.eq(i), backgroundImage, cssproperties.slice(0), group, name));
4617
+ }
4618
+ return responsiveElements;
4619
+ };
4620
+
4621
+ NextendSmartSliderResponsive.prototype.resizeResponsiveElements = function (ratios, timeline, duration) {
4622
+ for (var i = 0; i < this.responsiveElements.length; i++) {
4623
+ var responsiveElement = this.responsiveElements[i];
4624
+ if (typeof ratios[responsiveElement.group] === 'undefined') {
4625
+ console.log('error with ' + responsiveElement.group);
4626
+ }
4627
+ responsiveElement.resize(this.responsiveDimensions, ratios[responsiveElement.group], timeline, duration);
4628
+ }
4629
+ };
4630
+
4631
+ NextendSmartSliderResponsive.prototype.getDeviceMode = function () {
4632
+ return NextendSmartSliderResponsive._DeviceMode[this.deviceMode];
4633
+ };
4634
+
4635
+ NextendSmartSliderResponsive.prototype.getDeviceModeOrientation = function () {
4636
+ return NextendSmartSliderResponsive._DeviceMode[this.deviceMode] + NextendSmartSliderResponsive._DeviceOrientation[this.orientation];
4637
+ };
4638
+
4639
+ NextendSmartSliderResponsive.prototype.onResize = function () {
4640
+ if (this.slider.mainAnimation.getState() == 'ended') {
4641
+ this.doResize();
4642
+ } else if (!this.delayedResizeAdded) {
4643
+ this.delayedResizeAdded = true;
4644
+ this.sliderElement.on('mainAnimationComplete.responsive', $.proxy(this._doDelayedResize, this));
4645
+ }
4646
+ };
4647
+
4648
+ NextendSmartSliderResponsive.prototype._doDelayedResize = function () {
4649
+ this.doResize();
4650
+ this.delayedResizeAdded = false;
4651
+ };
4652
+
4653
+
4654
+ NextendSmartSliderResponsive.prototype.doNormalizedResize = function () {
4655
+ if (this.normalizeTimeout) {
4656
+ clearTimeout(this.normalizeTimeout);
4657
+ }
4658
+
4659
+ this.normalizeTimeout = setTimeout($.proxy(this.doResize, this), 10);
4660
+ };
4661
+
4662
+ NextendSmartSliderResponsive.prototype._getOrientation = function () {
4663
+ if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.SCREEN) {
4664
+ if (window.innerHeight <= window.innerWidth) {
4665
+ return NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE;
4666
+ } else {
4667
+ return NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT;
4668
+ }
4669
+ } else if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT) {
4670
+ return NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT;
4671
+ } else if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE) {
4672
+ return NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE;
4673
+ }
4674
+ };
4675
+
4676
+ NextendSmartSliderResponsive.prototype._getDevice = function () {
4677
+ switch (this.parameters.basedOn) {
4678
+ case 'combined':
4679
+ return this._getDeviceDevice(this._getDeviceScreenWidth());
4680
+ case 'device':
4681
+ return this._getDeviceDevice(NextendSmartSliderResponsive.DeviceMode.DESKTOP);
4682
+ case 'screen':
4683
+ return this._getDeviceScreenWidth();
4684
+ }
4685
+ };
4686
+
4687
+ NextendSmartSliderResponsive.prototype._getDeviceScreenWidth = function () {
4688
+ var viewportWidth = window.innerWidth;
4689
+ if (this.orientation == NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT) {
4690
+ if (viewportWidth < this.parameters.mobilePortraitScreenWidth) {
4691
+ return NextendSmartSliderResponsive.DeviceMode.MOBILE;
4692
+ } else if (viewportWidth < this.parameters.tabletPortraitScreenWidth) {
4693
+ return NextendSmartSliderResponsive.DeviceMode.TABLET;
4694
+ }
4695
+ } else {
4696
+ if (viewportWidth < this.parameters.mobileLandscapeScreenWidth) {
4697
+ return NextendSmartSliderResponsive.DeviceMode.MOBILE;
4698
+ } else if (viewportWidth < this.parameters.tabletLandscapeScreenWidth) {
4699
+ return NextendSmartSliderResponsive.DeviceMode.TABLET;
4700
+ }
4701
+ }
4702
+ return NextendSmartSliderResponsive.DeviceMode.DESKTOP;
4703
+ };
4704
+
4705
+ NextendSmartSliderResponsive.prototype._getDeviceAndOrientationByScreenWidth = function () {
4706
+ var viewportWidth = window.innerWidth;
4707
+ if (viewportWidth < this.parameters.mobilePortraitScreenWidth) {
4708
+ return [NextendSmartSliderResponsive.DeviceMode.MOBILE, NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT];
4709
+ } else if (viewportWidth < this.parameters.mobileLandscapeScreenWidth) {
4710
+ return [NextendSmartSliderResponsive.DeviceMode.MOBILE, NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE];
4711
+ } else if (viewportWidth < this.parameters.tabletPortraitScreenWidth) {
4712
+ return [NextendSmartSliderResponsive.DeviceMode.TABLET, NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT];
4713
+ } else if (viewportWidth < this.parameters.tabletLandscapeScreenWidth) {
4714
+ return [NextendSmartSliderResponsive.DeviceMode.TABLET, NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE];
4715
+ } else if (viewportWidth < this.parameters.desktopPortraitScreenWidth) {
4716
+ return [NextendSmartSliderResponsive.DeviceMode.DESKTOP, NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT];
4717
+ }
4718
+ return [NextendSmartSliderResponsive.DeviceMode.DESKTOP, NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE];
4719
+ };
4720
+
4721
+ NextendSmartSliderResponsive.prototype._getDeviceDevice = function (device) {
4722
+ if (isMobile === true) {
4723
+ return NextendSmartSliderResponsive.DeviceMode.MOBILE;
4724
+ } else if (isTablet && device != NextendSmartSliderResponsive.DeviceMode.MOBILE) {
4725
+ return NextendSmartSliderResponsive.DeviceMode.TABLET;
4726
+ }
4727
+ return device;
4728
+ };
4729
+
4730
+ NextendSmartSliderResponsive.prototype._getDeviceZoom = function (ratio) {
4731
+ var orientation;
4732
+ if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT) {
4733
+ orientation = NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT;
4734
+ } else if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE) {
4735
+ orientation = NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE;
4736
+ }
4737
+ var targetMode = NextendSmartSliderResponsive.DeviceMode.DESKTOP;
4738
+
4739
+ if (ratio - this.parameters.ratioToDevice[NextendSmartSliderResponsive._DeviceOrientation[orientation]].mobile < 0.001) {
4740
+ targetMode = NextendSmartSliderResponsive.DeviceMode.MOBILE;
4741
+ } else if (ratio - this.parameters.ratioToDevice[NextendSmartSliderResponsive._DeviceOrientation[orientation]].tablet < 0.001) {
4742
+ targetMode = NextendSmartSliderResponsive.DeviceMode.TABLET;
4743
+ }
4744
+ return targetMode;
4745
+ };
4746
+
4747
+ NextendSmartSliderResponsive.prototype.reTriggerSliderDeviceOrientation = function () {
4748
+ var normalized = this._normalizeMode(NextendSmartSliderResponsive._DeviceMode[this.deviceMode], NextendSmartSliderResponsive._DeviceOrientation[this.orientation]);
4749
+ this.sliderElement.trigger('SliderDeviceOrientation', {
4750
+ lastDevice: normalized[0],
4751
+ lastOrientation: normalized[1],
4752
+ device: normalized[0],
4753
+ orientation: normalized[1]
4754
+ });
4755
+ };
4756
+
4757
+ NextendSmartSliderResponsive.prototype.doResize = function (fixedMode, timeline, nextSlideIndex, duration) {
4758
+
4759
+ if (!this.disableTransitions) {
4760
+ this.disableTransitions = true;
4761
+ this.sliderElement.addClass('n2notransition');
4762
+ if (this.disableTransitionsTimeout) {
4763
+ clearTimeout(this.disableTransitionsTimeout);
4764
+ }
4765
+ this.disableTransitionsTimeout = setTimeout($.proxy(function () {
4766
+ this.sliderElement.removeClass('n2notransition');
4767
+ this.disableTransitions = false;
4768
+ }, this), 500);
4769
+ }
4770
+
4771
+ // required to force recalculate if the thumbnails widget get hidden.
4772
+ this.refreshMargin();
4773
+
4774
+ if (this.slider.parameters.align == 'center') {
4775
+ if (this.parameters.type == 'fullpage') {
4776
+ this.alignElement.css('maxWidth', 'none');
4777
+ } else {
4778
+ this.alignElement.css('maxWidth', this.responsiveDimensions.startWidth);
4779
+ }
4780
+ }
4781
+
4782
+ if (!this.slider.isAdmin) {
4783
+ if (this.parameters.forceFull) {
4784
+ $('body').css('overflow-x', 'hidden');
4785
+ var windowWidth = document.body.clientWidth || document.documentElement.clientWidth,
4786
+ outerEl = this.containerElement.parent(),
4787
+ outerElOffset = outerEl.offset();
4788
+ if (nextend.isRTL) {
4789
+ outerElOffset.right = windowWidth - (outerElOffset.left + outerEl.outerWidth());
4790
+ }
4791
+ this.containerElement.css(nextend.rtl.marginLeft, -outerElOffset[nextend.rtl.left] - parseInt(outerEl.css('paddingLeft')) - parseInt(outerEl.css('borderLeftWidth'))).width(windowWidth);
4792
+ }
4793
+ }
4794
+ var ratio = this.containerElementPadding.width() / this.getOuterWidth();
4795
+
4796
+
4797
+ var hasOrientationOrDeviceChange = false,
4798
+ lastOrientation = this.orientation,
4799
+ lastDevice = this.deviceMode,
4800
+ targetOrientation = null,
4801
+ targetMode = null;
4802
+
4803
+ if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.SCREEN_WIDTH_ONLY) {
4804
+ var deviceOrientation = this._getDeviceAndOrientationByScreenWidth();
4805
+ targetMode = deviceOrientation[0]
4806
+ targetOrientation = deviceOrientation[1];
4807
+ } else {
4808
+ targetOrientation = this._getOrientation()
4809
+ }
4810
+
4811
+ if (this.orientation != targetOrientation) {
4812
+ this.orientation = targetOrientation;
4813
+ hasOrientationOrDeviceChange = true;
4814
+ n2c.log('Event: SliderOrientation', {
4815
+ lastOrientation: NextendSmartSliderResponsive._DeviceOrientation[lastOrientation],
4816
+ orientation: NextendSmartSliderResponsive._DeviceOrientation[targetOrientation]
4817
+ });
4818
+ this.sliderElement.trigger('SliderOrientation', {
4819
+ lastOrientation: NextendSmartSliderResponsive._DeviceOrientation[lastOrientation],
4820
+ orientation: NextendSmartSliderResponsive._DeviceOrientation[targetOrientation]
4821
+ });
4822
+ }
4823
+
4824
+ if (!fixedMode) {
4825
+ if (this.orientationMode != NextendSmartSliderResponsive.OrientationMode.SCREEN_WIDTH_ONLY) {
4826
+ targetMode = this._getDevice(ratio);
4827
+ }
4828
+
4829
+ if (this.deviceMode != targetMode) {
4830
+ this.deviceMode = targetMode;
4831
+ this.sliderElement.removeClass('n2-ss-' + NextendSmartSliderResponsive._DeviceMode[lastDevice])
4832
+ .addClass('n2-ss-' + NextendSmartSliderResponsive._DeviceMode[targetMode]);
4833
+ n2c.log('Event: SliderDevice', {
4834
+ lastDevice: NextendSmartSliderResponsive._DeviceMode[lastDevice],
4835
+ device: NextendSmartSliderResponsive._DeviceMode[targetMode]
4836
+ });
4837
+ this.sliderElement.trigger('SliderDevice', {
4838
+ lastDevice: NextendSmartSliderResponsive._DeviceMode[lastDevice],
4839
+ device: NextendSmartSliderResponsive._DeviceMode[targetMode]
4840
+ });
4841
+ hasOrientationOrDeviceChange = true;
4842
+ }
4843
+ }
4844
+
4845
+ if (!this.slider.isAdmin) {
4846
+ if (this.parameters.type == 'fullpage') {
4847
+ this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()] = this.parameters.minimumHeightRatio = ((document.documentElement.clientHeight || document.body.clientHeight) - this.getVerticalOffsetHeight()) / this.responsiveDimensions.startHeight;
4848
+ }
4849
+ }
4850
+
4851
+ if (hasOrientationOrDeviceChange) {
4852
+ var lastNormalized = this._normalizeMode(NextendSmartSliderResponsive._DeviceMode[lastDevice], NextendSmartSliderResponsive._DeviceOrientation[lastOrientation]),
4853
+ normalized = this._normalizeMode(NextendSmartSliderResponsive._DeviceMode[this.deviceMode], NextendSmartSliderResponsive._DeviceOrientation[this.orientation]);
4854
+
4855
+ if (lastNormalized[0] != normalized[0] || lastNormalized[1] != normalized[1]) {
4856
+ this.normalizedMode = normalized[0] + normalized[1];
4857
+ n2c.log('Event: SliderDeviceOrientation', {
4858
+ lastDevice: lastNormalized[0],
4859
+ lastOrientation: lastNormalized[1],
4860
+ device: normalized[0],
4861
+ orientation: normalized[1]
4862
+ });
4863
+ this.sliderElement.trigger('SliderDeviceOrientation', {
4864
+ lastDevice: lastNormalized[0],
4865
+ lastOrientation: lastNormalized[1],
4866
+ device: normalized[0],
4867
+ orientation: normalized[1]
4868
+ });
4869
+ }
4870
+ }
4871
+ /*
4872
+ if (this.parameters.type == 'adaptive') {
4873
+ this._doResize(this.parameters.sliderWidthToDevice[this.normalizedMode] / this.parameters.sliderWidthToDevice.desktopPortrait);
4874
+ } else {
4875
+ */
4876
+ var zeroRatio = this.parameters.sliderWidthToDevice[this.normalizedMode] / this.parameters.sliderWidthToDevice.desktopPortrait;
4877
+ if (!this.parameters.downscale && ratio < zeroRatio) {
4878
+ ratio = zeroRatio;
4879
+ } else if (!this.parameters.upscale && ratio > zeroRatio) {
4880
+ ratio = zeroRatio;
4881
+ }
4882
+ this._doResize(ratio, timeline, nextSlideIndex, duration);
4883
+ //}
4884
+
4885
+ if (this.slider.parameters.align == 'center') {
4886
+ this.alignElement.css('maxWidth', this.responsiveDimensions.slider.width);
4887
+ }
4888
+ };
4889
+
4890
+ NextendSmartSliderResponsive.prototype._normalizeMode = function (device, orientation) {
4891
+ return this.parameters.normalizedDeviceModes[device + orientation];
4892
+ };
4893
+
4894
+ NextendSmartSliderResponsive.prototype.getNormalizedModeString = function () {
4895
+ var normalized = this._normalizeMode(NextendSmartSliderResponsive._DeviceMode[this.deviceMode], NextendSmartSliderResponsive._DeviceOrientation[this.orientation]);
4896
+ return normalized.join('');
4897
+ };
4898
+
4899
+ NextendSmartSliderResponsive.prototype.getModeString = function () {
4900
+ return NextendSmartSliderResponsive._DeviceMode[this.deviceMode] + NextendSmartSliderResponsive._DeviceOrientation[this.orientation];
4901
+ };
4902
+
4903
+ NextendSmartSliderResponsive.prototype.isEnabled = function (device, orientation) {
4904
+ return this.parameters.deviceModes[device + orientation];
4905
+ };
4906
+
4907
+ NextendSmartSliderResponsive.prototype._doResize = function (ratio, timeline, nextSlideIndex, duration) {
4908
+ var ratios = {
4909
+ ratio: ratio,
4910
+ w: ratio,
4911
+ h: ratio,
4912
+ slideW: ratio,
4913
+ slideH: ratio,
4914
+ fontRatio: 1
4915
+ };
4916
+
4917
+ this._buildRatios(ratios, this.slider.parameters.dynamicHeight, nextSlideIndex);
4918
+ /*
4919
+ if (this.fixedEditRatio && this.slider.isAdmin) {
4920
+ ratios.w = ratios.slideW;
4921
+ ratios.h = ratios.slideH;
4922
+ }
4923
+ */
4924
+ ratios.fontRatio = ratios.slideW;
4925
+
4926
+
4927
+ var isChanged = false;
4928
+ for (var k in ratios) {
4929
+ if (ratios[k] != this.lastRatios[k]) {
4930
+ isChanged = true;
4931
+ break;
4932
+ }
4933
+ }
4934
+
4935
+ if (isChanged) {
4936
+ this.resizeResponsiveElements(ratios, timeline, duration);
4937
+ this.lastRatios = ratios;
4938
+
4939
+ if (timeline) {
4940
+ this.sliderElement.trigger('SliderAnimatedResize', [ratios, timeline, duration]);
4941
+ timeline.eventCallback("onComplete", function () {
4942
+ this.triggerResize(ratios, timeline);
4943
+ }, [], this);
4944
+ } else {
4945
+ this.triggerResize(ratios, timeline);
4946
+ }
4947
+ }
4948
+ };
4949
+
4950
+ NextendSmartSliderResponsive.prototype.triggerResize = function (ratios, timeline) {
4951
+ nextend.fontsDeferred.done($.proxy(function () {
4952
+ this.triggerResize = this._triggerResize;
4953
+ this._triggerResize(ratios, timeline);
4954
+ }, this));
4955
+ };
4956
+
4957
+ NextendSmartSliderResponsive.prototype._triggerResize = function (ratios, timeline) {
4958
+ n2c.log('Event: SliderResize', ratios);
4959
+ this.sliderElement.trigger('SliderResize', [ratios, this, timeline]);
4960
+ };
4961
+
4962
+ NextendSmartSliderResponsive.prototype._buildRatios = function (ratios, dynamicHeight, nextSlideIndex) {
4963
+
4964
+ var deviceModeOrientation = this.getDeviceModeOrientation();
4965
+
4966
+ if (this.parameters.maximumSlideWidthRatio[deviceModeOrientation] > 0 && ratios.slideW > this.parameters.maximumSlideWidthRatio[deviceModeOrientation]) {
4967
+ ratios.slideW = this.parameters.maximumSlideWidthRatio[deviceModeOrientation];
4968
+ }
4969
+
4970
+ ratios.slideW = ratios.slideH = Math.min(ratios.slideW, ratios.slideH);
4971
+
4972
+
4973
+ var verticalRatioModifier = this.parameters.verticalRatioModifiers[deviceModeOrientation];
4974
+ ratios.slideH *= verticalRatioModifier;
4975
+ if (this.parameters.type == 'fullpage') {
4976
+
4977
+ if (this.parameters.minimumHeightRatio > 0) {
4978
+ ratios.h = Math.max(ratios.h, this.parameters.minimumHeightRatio);
4979
+ }
4980
+
4981
+ if (this.parameters.maximumHeightRatio[deviceModeOrientation] > 0) {
4982
+ ratios.h = Math.min(ratios.h, this.parameters.maximumHeightRatio[deviceModeOrientation]);
4983
+ }
4984
+
4985
+ if (this.slider.isAdmin) {
4986
+ ratios.w = ratios.slideW;
4987
+ ratios.h = ratios.slideH;
4988
+ } else {
4989
+ if (!this.parameters.constrainRatio) {
4990
+ ratios.slideW = ratios.w;
4991
+ ratios.slideH = ratios.h;
4992
+ } else {
4993
+ ratios.slideH = Math.min(ratios.slideH, ratios.h);
4994
+ ratios.slideH = ratios.slideW = Math.min(ratios.slideW, ratios.slideH);
4995
+ }
4996
+ }
4997
+ } else {
4998
+ ratios.h *= verticalRatioModifier;
4999
+
5000
+ if (this.parameters.minimumHeightRatio > 0) {
5001
+ ratios.h = Math.max(ratios.h, this.parameters.minimumHeightRatio);
5002
+ }
5003
+
5004
+ if (this.parameters.maximumHeightRatio[deviceModeOrientation] > 0) {
5005
+ ratios.h = Math.min(ratios.h, this.parameters.maximumHeightRatio[deviceModeOrientation]);
5006
+ }
5007
+
5008
+ ratios.slideH = Math.min(ratios.slideH, ratios.h);
5009
+ ratios.slideW = ratios.slideH / verticalRatioModifier;
5010
+
5011
+ if (this.slider.type == "showcase") {
5012
+ ratios.slideW = Math.min(ratios.slideW, ratios.w);
5013
+ ratios.slideH = Math.min(ratios.slideW, ratios.slideH);
5014
+ }
5015
+
5016
+ if (dynamicHeight) {
5017
+
5018
+ var slideIndex = this.slider.currentSlideIndex;
5019
+ if (typeof nextSlideIndex !== 'undefined') {
5020
+ slideIndex = nextSlideIndex;
5021
+ }
5022
+
5023
+ var backgroundRatio = this.slider.backgroundImages.backgroundImages[slideIndex].responsiveElement.relativeRatio;
5024
+ if (backgroundRatio != -1) {
5025
+ ratios.slideH *= backgroundRatio;
5026
+ ratios.h *= backgroundRatio;
5027
+ }
5028
+ }
5029
+ }
5030
+
5031
+ this.sliderElement.triggerHandler('responsiveBuildRatios', [ratios]);
5032
+ };
5033
+
5034
+ NextendSmartSliderResponsive.prototype.setOrientation = function (newOrientation) {
5035
+ if (newOrientation == 'portrait') {
5036
+ this.orientationMode = NextendSmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT;
5037
+ } else if (newOrientation == 'landscape') {
5038
+ this.orientationMode = NextendSmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE;
5039
+ }
5040
+ };
5041
+
5042
+ NextendSmartSliderResponsive.prototype.setMode = function (newMode) {
5043
+ var orientation;
5044
+ if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_PORTRAIT) {
5045
+ orientation = NextendSmartSliderResponsive.DeviceOrientation.PORTRAIT;
5046
+ } else if (this.orientationMode == NextendSmartSliderResponsive.OrientationMode.ADMIN_LANDSCAPE) {
5047
+ orientation = NextendSmartSliderResponsive.DeviceOrientation.LANDSCAPE;
5048
+ }
5049
+ var width = this.parameters.sliderWidthToDevice[newMode + NextendSmartSliderResponsive._DeviceOrientation[orientation]];
5050
+ width = nextend.smallestZoom + (((this.parameters.sliderWidthToDevice['desktopPortrait'] - nextend.smallestZoom)) / 50) * Math.floor((width - nextend.smallestZoom) / (((this.parameters.sliderWidthToDevice['desktopPortrait'] - nextend.smallestZoom)) / 50));
5051
+ this.setSize(width);
5052
+ if (this.containerElement.width() > width) {
5053
+ // We have to find a proper value for the zoom slider - backend only
5054
+ width = this.parameters.sliderWidthToDevice[newMode + NextendSmartSliderResponsive._DeviceOrientation[orientation]] - (this.parameters.sliderWidthToDevice['desktopPortrait'] - nextend.smallestZoom) / 50;
5055
+ this.setSize(width);
5056
+ }
5057
+ };
5058
+
5059
+ NextendSmartSliderResponsive.prototype.setSize = function (targetWidth) {
5060
+ this.containerElement.width(targetWidth);
5061
+
5062
+ this.doResize();
5063
+ };
5064
+
5065
+ /**
5066
+ * Required for maximum slide width calculation
5067
+ * @returns {null}
5068
+ */
5069
+ NextendSmartSliderResponsive.prototype.getCanvas = function () {
5070
+ return null;
5071
+ };
5072
+
5073
+ NextendSmartSliderResponsive.prototype.getVerticalOffsetHeight = function () {
5074
+ var h = 0;
5075
+ for (var i = 0; i < this.verticalOffsetSelectors.length; i++) {
5076
+ h += this.verticalOffsetSelectors.eq(i).outerHeight();
5077
+ }
5078
+ return h;
5079
+ };
5080
+
5081
+ NextendSmartSliderResponsive.prototype.addMargin = function (side, widget) {
5082
+ this.widgetMargins[side].push(widget);
5083
+ if (widget.isVisible()) {
5084
+ this._addMarginSize(side, widget.getSize());
5085
+ this.enabledWidgetMargins.push(widget);
5086
+ }
5087
+ this.doNormalizedResize();
5088
+ };
5089
+
5090
+ NextendSmartSliderResponsive.prototype.addStaticMargin = function (side, widget) {
5091
+ if (!this.widgetStaticMargins) {
5092
+ this.widgetStaticMargins = {
5093
+ Top: [],
5094
+ Right: [],
5095
+ Bottom: [],
5096
+ Left: []
5097
+ };
5098
+ }
5099
+ this.widgetStaticMargins[side].push(widget);
5100
+ this.doNormalizedResize();
5101
+ };
5102
+
5103
+ NextendSmartSliderResponsive.prototype.refreshMargin = function () {
5104
+ for (var side in this.widgetMargins) {
5105
+ var widgets = this.widgetMargins[side];
5106
+ for (var i = widgets.length - 1; i >= 0; i--) {
5107
+ var widget = widgets[i];
5108
+ if (widget.isVisible()) {
5109
+ if ($.inArray(widget, this.enabledWidgetMargins) == -1) {
5110
+ this._addMarginSize(side, widget.getSize());
5111
+ this.enabledWidgetMargins.push(widget);
5112
+ }
5113
+ } else {
5114
+ var index = $.inArray(widget, this.enabledWidgetMargins);
5115
+ if (index != -1) {
5116
+ this._addMarginSize(side, -widget.getSize());
5117
+ this.enabledWidgetMargins.splice(index, 1);
5118
+ }
5119
+ }
5120
+ }
5121
+ }
5122
+ this.refreshStaticSizes();
5123
+ };
5124
+
5125
+ NextendSmartSliderResponsive.prototype.refreshStaticSizes = function () {
5126
+ if (this.widgetStaticMargins) {
5127
+ var staticSizes = {
5128
+ paddingTop: 0,
5129
+ paddingRight: 0,
5130
+ paddingBottom: 0,
5131
+ paddingLeft: 0
5132
+ };
5133
+ for (var side in this.widgetStaticMargins) {
5134
+ var widgets = this.widgetStaticMargins[side];
5135
+ for (var i = widgets.length - 1; i >= 0; i--) {
5136
+ var widget = widgets[i];
5137
+ if (widget.isVisible()) {
5138
+ staticSizes['padding' + side] += widget.getSize();
5139
+ }
5140
+ }
5141
+ }
5142
+ for (var k in staticSizes) {
5143
+ this.containerElementPadding.css(staticSizes);
5144
+ }
5145
+ this.staticSizes = staticSizes;
5146
+ }
5147
+ }
5148
+
5149
+ NextendSmartSliderResponsive.prototype._addMarginSize = function (side, size) {
5150
+ var axis = null;
5151
+ switch (side) {
5152
+ case 'Top':
5153
+ case 'Bottom':
5154
+ axis = this._sliderVertical;
5155
+ break;
5156
+ default:
5157
+ axis = this._sliderHorizontal;
5158
+ }
5159
+ axis.data['margin' + side] += size;
5160
+ this.responsiveDimensions['startSliderMargin' + side] += size;
5161
+ };
5162
+
5163
+ scope.NextendSmartSliderResponsive = NextendSmartSliderResponsive;
5164
+ })(n2, window);
5165
+ (function ($, scope, undefined) {
5166
+
5167
+ function capitalize(str) {
5168
+ return str.charAt(0).toUpperCase() + str.slice(1);
5169
+ }
5170
+
5171
+ /**
5172
+ * @constructor
5173
+ * @param responsive {NextendSmartSliderResponsive} caller object
5174
+ * @param group {String}
5175
+ * @param element {jQuery}
5176
+ * @param cssProperties {Array} Array of properties which will be responsive
5177
+ * @param name {String} we will register the changed values for this namespace in the global NextendSmartSliderResponsive objects' responsiveDimensions property
5178
+ */
5179
+ function NextendSmartSliderResponsiveElement(responsive, group, element, cssProperties, name) {
5180
+ this.loadDefaults();
5181
+ this._lastRatio = 1;
5182
+ this.responsive = responsive;
5183
+
5184
+ this.group = group;
5185
+
5186
+ this.element = element;
5187
+
5188
+ this.lazyload = this.responsive.slider.parameters.lazyload.enabled;
5189
+
5190
+ this._readyDeferred = $.Deferred();
5191
+
5192
+ if (typeof name !== 'undefined') {
5193
+ this.name = name;
5194
+ } else {
5195
+ this.name = null;
5196
+ }
5197
+
5198
+ this.tagName = element.prop("tagName");
5199
+
5200
+ this.data = {};
5201
+
5202
+ this.helper = {
5203
+ /**
5204
+ * Holds the current element's parent element, which is required for the centered mode
5205
+ */
5206
+ parent: null,
5207
+ /**
5208
+ * Holds the current element's parent original width and height for images
5209
+ */
5210
+ parentProps: null,
5211
+ /**
5212
+ * If font size is enabled for the current element, this will hold the different font sized for the different devices
5213
+ */
5214
+ fontSize: false,
5215
+ /**
5216
+ * If this is enabled, the responsive mode will try to position the actual element into the center of the parent element
5217
+ */
5218
+ centered: false
5219
+ };
5220
+
5221
+ if (!this.customLoad) {
5222
+ switch (this.tagName) {
5223
+ case 'IMG':
5224
+ var parent = element.parent();
5225
+ // The images doesn't have their original(not the real dimension, it is the place
5226
+ // what was taken right after the load) width and height values in the future.
5227
+ // So we will calculate the original size from the parent element size
5228
+ // We will assume that the image was 100% width to its parent
5229
+ this.helper.parentProps = {
5230
+ width: parent.width(),
5231
+ height: parent.height()
5232
+ }
5233
+ // Images might not have proper height and width values when not loaded
5234
+ // Let's wait for them
5235
+ if (this.lazyload) {
5236
+ // Lazy load happens much later than the imagesloaded, but this is why it is lazy :)
5237
+ element.on('lazyloaded', $.proxy(this._lateInitIMG, this, cssProperties));
5238
+ } else {
5239
+ element.n2imagesLoaded($.proxy(this._lateInitIMG, this, cssProperties));
5240
+ }
5241
+ break;
5242
+ // We don't have anything to wait so we can start our later initialization
5243
+ default:
5244
+ this._lateInit(cssProperties);
5245
+ }
5246
+ } else {
5247
+ this.customLoad(cssProperties);
5248
+ }
5249
+
5250
+ };
5251
+
5252
+ NextendSmartSliderResponsiveElement.prototype.loadDefaults = function () {
5253
+ this.customLoad = false;
5254
+ this.lazyload = false;
5255
+ };
5256
+
5257
+ NextendSmartSliderResponsiveElement.prototype._lateInit = function (cssProperties) {
5258
+
5259
+ this._cssProperties = cssProperties;
5260
+
5261
+ this.reloadDefault();
5262
+
5263
+ /**
5264
+ * If font-size is responsive on the element, we init this feature on the element.
5265
+ */
5266
+ if ($.inArray('fontSize', cssProperties) != -1) {
5267
+
5268
+ this.data['fontSize'] = this.element.data('fontsize');
5269
+
5270
+ this.helper.fontSize = {
5271
+ fontSize: this.element.data('fontsize'),
5272
+ desktopPortrait: this.element.data('minfontsizedesktopportrait'),
5273
+ desktopLandscape: this.element.data('minfontsizedesktoplandscape'),
5274
+ tabletPortrait: this.element.data('minfontsizetabletportrait'),
5275
+ tabletLandscape: this.element.data('minfontsizetabletlandscape'),
5276
+ mobilePortrait: this.element.data('minfontsizemobileportrait'),
5277
+ mobileLandscape: this.element.data('minfontsizemobilelandscape')
5278
+ };
5279
+
5280
+ // Sets the proper font size for the current mode
5281
+ //this.setFontSizeByMode(this.responsive.mode.mode);
5282
+
5283
+ // When the mode changes we have to adjust the original font size value in the data
5284
+ this.responsive.sliderElement.on('SliderDeviceOrientation', $.proxy(this.onModeChange, this));
5285
+ }
5286
+
5287
+ // Our resource is finished with the loading, so we can enable the normal resize method.
5288
+ this.resize = this._resize;
5289
+
5290
+ // We are ready
5291
+ this._readyDeferred.resolve();
5292
+ };
5293
+
5294
+ NextendSmartSliderResponsiveElement.prototype.reloadDefault = function () {
5295
+
5296
+ for (var i = 0; i < this._cssProperties.length; i++) {
5297
+ var propName = this._cssProperties[i];
5298
+ this.data[propName] = parseInt(this.element.css(propName));
5299
+ }
5300
+ if (this.name) {
5301
+ var d = this.responsive.responsiveDimensions;
5302
+ for (var k in this.data) {
5303
+ d['start' + capitalize(this.name) + capitalize(k)] = this.data[k];
5304
+ }
5305
+ }
5306
+ };
5307
+
5308
+ NextendSmartSliderResponsiveElement.prototype._lateInitIMG = function (cssProperties, e) {
5309
+
5310
+ // As our background images has 100% width, we know that the original img size was the same as the parent's width.
5311
+ // Then we can calculate the original height of the img as the parent element's ratio might not the same as the background image
5312
+
5313
+ var width = this.element.width(),
5314
+ height = this.element.height();
5315
+
5316
+ height = parseInt(this.helper.parentProps.width / width * height);
5317
+ width = this.helper.parentProps.width;
5318
+
5319
+ var widthIndex = $.inArray('width', cssProperties);
5320
+ if (widthIndex != -1) {
5321
+ cssProperties.splice(widthIndex, 1);
5322
+ this.data['width'] = width;
5323
+ }
5324
+ var heightIndex = $.inArray('height', cssProperties);
5325
+ if (heightIndex != -1) {
5326
+ cssProperties.splice(heightIndex, 1);
5327
+ this.data['height'] = height;
5328
+ }
5329
+ this._lateInit(cssProperties);
5330
+ };
5331
+
5332
+ /**
5333
+ * You can use it as the normal jQuery ready, except it check for the current element list
5334
+ * @param {function} fn
5335
+ */
5336
+ NextendSmartSliderResponsiveElement.prototype.ready = function (fn) {
5337
+ this._readyDeferred.done(fn);
5338
+ };
5339
+
5340
+ /**
5341
+ * When the element list is not loaded yet, we have to add the current resize call to the ready event.
5342
+ * @example You have an image which is not loaded yet, but a resize happens on the browser. We have to make the resize later when the image is ready!
5343
+ * @param responsiveDimensions
5344
+ * @param ratio
5345
+ */
5346
+ NextendSmartSliderResponsiveElement.prototype.resize = function (responsiveDimensions, ratio) {
5347
+ this.ready($.proxy(this.resize, this, responsiveDimensions, ratio));
5348
+ this._lastRatio = ratio;
5349
+ };
5350
+
5351
+ NextendSmartSliderResponsiveElement.prototype._resize = function (responsiveDimensions, ratio, timeline, duration) {
5352
+ if (this.name && typeof responsiveDimensions[this.name] === 'undefined') {
5353
+ responsiveDimensions[this.name] = {};
5354
+ }
5355
+
5356
+ var to = {};
5357
+ for (var propName in this.data) {
5358
+ var value = this.data[propName] * ratio;
5359
+ if (typeof this[propName + 'Prepare'] == 'function') {
5360
+ value = this[propName + 'Prepare'](value);
5361
+ }
5362
+
5363
+ if (this.name) {
5364
+ responsiveDimensions[this.name][propName] = value;
5365
+ }
5366
+ to[propName] = value;
5367
+ }
5368
+ if (timeline) {
5369
+ timeline.to(this.element, duration, to, 0);
5370
+ } else {
5371
+ this.element.css(to);
5372
+
5373
+ if (this.helper.centered) {
5374
+ // when centered feature enabled we have to set the proper margins for the element to make it centered
5375
+ if (n2const.isIOS && this.tagName == 'IMG') {
5376
+ // If this fix not applied, IOS might not calculate the correct width and height for the image
5377
+ this.element.css({
5378
+ marginTop: 1
5379
+ });
5380
+ this.element.css(nextend.rtl.marginLeft, 1);
5381
+ }
5382
+ this.element.css({
5383
+ marginTop: this.getVerticalMargin(parseInt((this.helper.parent.height() - this.element.height()) / 2))
5384
+ });
5385
+ this.element.css(nextend.rtl.marginLeft, this.getHorizontalMargin(parseInt((this.helper.parent.width() - this.element.width()) / 2)));
5386
+ }
5387
+ }
5388
+ this._lastRatio = ratio;
5389
+ };
5390
+
5391
+ NextendSmartSliderResponsiveElement.prototype.getHorizontalMargin = function (left) {
5392
+ return left;
5393
+ }
5394
+
5395
+ NextendSmartSliderResponsiveElement.prototype.getVerticalMargin = function (top) {
5396
+ return top;
5397
+ }
5398
+
5399
+ NextendSmartSliderResponsiveElement.prototype._refreshResize = function () {
5400
+ this.responsive.ready.done($.proxy(function () {
5401
+ this._resize(this.responsive.responsiveDimensions, this.responsive.lastRatios[this.group]);
5402
+ }, this));
5403
+ };
5404
+
5405
+ NextendSmartSliderResponsiveElement.prototype.widthPrepare = function (value) {
5406
+ return Math.round(value);
5407
+ };
5408
+
5409
+ NextendSmartSliderResponsiveElement.prototype.heightPrepare = function (value) {
5410
+ return Math.round(value);
5411
+ };
5412
+
5413
+ NextendSmartSliderResponsiveElement.prototype.marginLeftPrepare = function (value) {
5414
+ return parseInt(value);
5415
+ };
5416
+
5417
+ NextendSmartSliderResponsiveElement.prototype.marginRightPrepare = function (value) {
5418
+ return parseInt(value);
5419
+ };
5420
+
5421
+ NextendSmartSliderResponsiveElement.prototype.lineHeightPrepare = function (value) {
5422
+ return value + 'px';
5423
+ };
5424
+
5425
+ NextendSmartSliderResponsiveElement.prototype.fontSizePrepare = function (value) {
5426
+ var mode = this.responsive.getNormalizedModeString();
5427
+ if (value < this.helper.fontSize[mode]) {
5428
+ return this.helper.fontSize[mode];
5429
+ }
5430
+ return value;
5431
+ };
5432
+
5433
+ /**
5434
+ * Enables the centered feature on the current element.
5435
+ */
5436
+ NextendSmartSliderResponsiveElement.prototype.setCentered = function () {
5437
+ this.helper.parent = this.element.parent();
5438
+ this.helper.centered = true;
5439
+ };
5440
+ NextendSmartSliderResponsiveElement.prototype.unsetCentered = function () {
5441
+ this.helper.centered = false;
5442
+ };
5443
+ NextendSmartSliderResponsiveElement.prototype.onModeChange = function () {
5444
+ this.setFontSizeByMode();
5445
+ };
5446
+
5447
+ /**
5448
+ * Changes the original font size based on the current mode and also updates the current value on the element.
5449
+ * @param mode
5450
+ */
5451
+ NextendSmartSliderResponsiveElement.prototype.setFontSizeByMode = function () {
5452
+ this.element.css('fontSize', this.fontSizePrepare(this.data['fontSize'] * this._lastRatio));
5453
+ };
5454
+ scope.NextendSmartSliderResponsiveElement = NextendSmartSliderResponsiveElement;
5455
+
5456
+
5457
+ function NextendSmartSliderResponsiveElementBackgroundImage(responsive, backgroundImage, group, element, cssProperties, name) {
5458
+
5459
+ this.ratio = -1;
5460
+ this.relativeRatio = 1;
5461
+
5462
+ this.x = 50;
5463
+ this.y = 50;
5464
+
5465
+ this.backgroundImage = backgroundImage;
5466
+
5467
+ NextendSmartSliderResponsiveElement.prototype.constructor.call(this, responsive, group, element, cssProperties, name);
5468
+
5469
+ backgroundImage.addResponsiveElement(this);
5470
+ };
5471
+
5472
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype = Object.create(NextendSmartSliderResponsiveElement.prototype);
5473
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.constructor = NextendSmartSliderResponsiveElementBackgroundImage;
5474
+
5475
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.customLoad = function (cssProperties) {
5476
+ var parent = this.element.parent();
5477
+ // The images doesn't have their original(not the real dimension, it is the place
5478
+ // what was taken right after the load) width and height values in the future.
5479
+ // So we will calculate the original size from the parent element size
5480
+ // We will assume that the image was 100% width to its parent
5481
+ this.helper.parentProps = {
5482
+ width: parent.width(),
5483
+ height: parent.height()
5484
+ }
5485
+ this.backgroundImage.afterLoaded().done($.proxy(function () {
5486
+ this._lateInitIMG(cssProperties);
5487
+ }, this));
5488
+ };
5489
+
5490
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype._lateInitIMG = function (cssProperties, e) {
5491
+ if (this.backgroundImage.mode == 'fill' || this.backgroundImage.mode == 'fit' || this.backgroundImage.mode == 'simple') {
5492
+ this.refreshRatio();
5493
+ if (!this.responsive.slider.parameters.dynamicHeight) {
5494
+ this.setCentered();
5495
+ }
5496
+ }
5497
+
5498
+ this._lateInit(cssProperties);
5499
+ };
5500
+
5501
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.afterLoaded = function () {
5502
+ if (this.backgroundImage.mode == 'fill' || this.backgroundImage.mode == 'fit' || this.backgroundImage.mode == 'simple') {
5503
+ this.refreshRatio();
5504
+ if (!this.responsive.slider.parameters.dynamicHeight) {
5505
+ this.setCentered();
5506
+ }
5507
+ }
5508
+ };
5509
+
5510
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype._resize = function (responsiveDimensions, ratio, timeline, duration) {
5511
+ if (this.responsive.slider.parameters.dynamicHeight) {
5512
+ this.element.css({
5513
+ width: '100%',
5514
+ height: '100%'
5515
+ });
5516
+ } else {
5517
+ var slideOuter = responsiveDimensions.slideouter || responsiveDimensions.slide;
5518
+
5519
+ var slideOuterRatio = slideOuter.width / slideOuter.height;
5520
+ if (this.backgroundImage.mode == 'fill') {
5521
+ if (slideOuterRatio > this.ratio) {
5522
+ this.element.css({
5523
+ width: '100%',
5524
+ height: 'auto'
5525
+ });
5526
+ } else {
5527
+ this.element.css({
5528
+ width: 'auto',
5529
+ height: '100%'
5530
+ });
5531
+ }
5532
+ } else if (this.backgroundImage.mode == 'fit') {
5533
+ if (slideOuterRatio < this.ratio) {
5534
+ this.element.css({
5535
+ width: '100%',
5536
+ height: 'auto'
5537
+ });
5538
+ } else {
5539
+ this.element.css({
5540
+ width: 'auto',
5541
+ height: '100%'
5542
+ });
5543
+ }
5544
+ }
5545
+ }
5546
+
5547
+ NextendSmartSliderResponsiveElement.prototype._resize.call(this, responsiveDimensions, ratio, timeline, duration);
5548
+ };
5549
+
5550
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.refreshRatio = function () {
5551
+ var w = this.element.prop('naturalWidth'),
5552
+ h = this.element.prop('naturalHeight');
5553
+ this.ratio = w / h;
5554
+ var slideW = this.responsive.responsiveDimensions.startSlideWidth,
5555
+ slideH = this.responsive.responsiveDimensions.startSlideHeight;
5556
+ this.relativeRatio = (slideW / slideH) / this.ratio;
5557
+
5558
+ this.x = parseInt(this.element.data('x'));
5559
+ if (isNaN(this.x)) {
5560
+ this.x = 50;
5561
+ }
5562
+ this.y = parseInt(this.element.data('y'));
5563
+ if (isNaN(this.y)) {
5564
+ this.y = 50;
5565
+ }
5566
+ };
5567
+
5568
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.getHorizontalMargin = function (left) {
5569
+ return left * (this.x / 50);
5570
+ }
5571
+
5572
+ NextendSmartSliderResponsiveElementBackgroundImage.prototype.getVerticalMargin = function (top) {
5573
+ return top * (this.y / 50);
5574
+ }
5575
+
5576
+ scope.NextendSmartSliderResponsiveElementBackgroundImage = NextendSmartSliderResponsiveElementBackgroundImage;
5577
+
5578
+ })(n2, window);
5579
+ (function ($, scope, undefined) {
5580
+
5581
+ function NextendSmartSliderVimeoItem(slider, id, sliderid, parameters, hasImage) {
5582
+ this.readyDeferred = $.Deferred();
5583
+
5584
+ this.slider = slider;
5585
+ this.playerId = id;
5586
+
5587
+ this.parameters = $.extend({
5588
+ vimeourl: "//vimeo.com/144598279",
5589
+ center: 0,
5590
+ autoplay: "0",
5591
+ reset: "0",
5592
+ title: "1",
5593
+ byline: "1",
5594
+ portrait: "0",
5595
+ loop: "0",
5596
+ color: "00adef",
5597
+ volume: "-1"
5598
+ }, parameters);
5599
+
5600
+ if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
5601
+ this.parameters.autoplay = 0;
5602
+ }
5603
+
5604
+ if (this.parameters.autoplay == 1 || !hasImage || n2const.isMobile) {
5605
+ this.ready($.proxy(this.initVimeoPlayer, this));
5606
+ } else {
5607
+ $("#" + this.playerId).on('click.vimeo n2click.vimeo', $.proxy(function (e) {
5608
+ $(e.currentTarget).off('.vimeo');
5609
+ e.preventDefault();
5610
+ e.stopPropagation();
5611
+ this.ready($.proxy(function () {
5612
+ this.readyDeferred.done($.proxy(function () {
5613
+ this.play();
5614
+ }, this));
5615
+ this.initVimeoPlayer();
5616
+ }, this));
5617
+ }, this));
5618
+ }
5619
+ };
5620
+
5621
+ NextendSmartSliderVimeoItem.vimeoDeferred = null;
5622
+
5623
+ NextendSmartSliderVimeoItem.prototype.ready = function (callback) {
5624
+ if (NextendSmartSliderVimeoItem.vimeoDeferred === null) {
5625
+ NextendSmartSliderVimeoItem.vimeoDeferred = $.getScript((window.location.protocol == "https:" ? 'https://secure-a.vimeocdn.com/js/froogaloop2.min.js' : 'http://a.vimeocdn.com/js/froogaloop2.min.js'));
5626
+ }
5627
+ NextendSmartSliderVimeoItem.vimeoDeferred.done(callback);
5628
+ };
5629
+
5630
+ NextendSmartSliderVimeoItem.prototype.initVimeoPlayer = function () {
5631
+ var playerElement = n2('<iframe id="' + this.playerId + '_video" src="//player.vimeo.com/video/' + this.parameters.vimeocode + '?api=1&autoplay=0&player_id=' + this.playerId +
5632
+ '_video&title=' + this.parameters.title + '&byline=' + this.parameters.byline + '&portrait=' + this.parameters.portrait + '&color=' + this.parameters.color +
5633
+ '&loop=' + this.parameters.loop + '" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');
5634
+ $("#" + this.playerId).append(playerElement);
5635
+
5636
+ this.isStatic = playerElement.closest('.n2-ss-static-slide').length;
5637
+
5638
+ this.player = $f(playerElement[0]);
5639
+ this.playerElement = $(this.player.element);
5640
+ this.player.addEvent('ready', $.proxy(this.onReady, this));
5641
+ };
5642
+
5643
+ NextendSmartSliderVimeoItem.prototype.onReady = function () {
5644
+ var volume = parseFloat(this.parameters.volume);
5645
+ if (volume >= 0) {
5646
+ this.setVolume(volume);
5647
+ }
5648
+
5649
+ this.slideIndex = this.slider.findSlideIndexByElement(this.playerElement);
5650
+
5651
+ if (this.parameters.center == 1) {
5652
+ this.onResize();
5653
+
5654
+ this.slider.sliderElement.on('SliderResize', $.proxy(this.onResize, this))
5655
+ }
5656
+ var layer = this.playerElement.parent().parent();
5657
+
5658
+ this.player.addEvent('play', $.proxy(function () {
5659
+ if (!this.isStatic) {
5660
+ this.slider.sliderElement.trigger('mediaStarted', this.playerId);
5661
+ }
5662
+ layer.triggerHandler('n2play');
5663
+ }, this));
5664
+
5665
+ this.player.addEvent('pause', $.proxy(function () {
5666
+ layer.triggerHandler('n2pause');
5667
+ }));
5668
+
5669
+ this.player.addEvent('finish', $.proxy(function () {
5670
+ if (!this.isStatic) {
5671
+ this.slider.sliderElement.trigger('mediaEnded', this.playerId);
5672
+ }
5673
+ layer.triggerHandler('n2stop');
5674
+ }, this));
5675
+
5676
+ if (!this.isStatic) {
5677
+ //pause video when slide changed
5678
+ this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
5679
+ if (currentSlideIndex != this.slideIndex) {
5680
+ if (parseInt(this.parameters.reset)) {
5681
+ this.reset();
5682
+ } else {
5683
+ this.pause();
5684
+ }
5685
+ }
5686
+ }, this));
5687
+ }
5688
+
5689
+ if (this.parameters.autoplay == 1) {
5690
+ this.slider.visible($.proxy(this.initAutoplay, this));
5691
+ }
5692
+ this.readyDeferred.resolve();
5693
+ };
5694
+
5695
+ NextendSmartSliderVimeoItem.prototype.onResize = function () {
5696
+ var controls = 52,
5697
+ parent = this.playerElement.parent(),
5698
+ width = parent.width() + controls,
5699
+ height = parent.height() + controls,
5700
+ aspectRatio = 16 / 9,
5701
+ css = {
5702
+ width: width,
5703
+ height: height,
5704
+ marginTop: 0
5705
+ };
5706
+ css[nextend.rtl.marginLeft] = 0;
5707
+ if (width / height > aspectRatio) {
5708
+ css.height = width * aspectRatio;
5709
+ css.marginTop = (height - css.height) / 2;
5710
+ } else {
5711
+ css.width = height * aspectRatio;
5712
+ css[nextend.rtl.marginLeft] = (width - css.width) / 2;
5713
+ }
5714
+ this.playerElement.css(css);
5715
+ };
5716
+
5717
+ NextendSmartSliderVimeoItem.prototype.initAutoplay = function () {
5718
+
5719
+ if (!this.isStatic) {
5720
+ //change slide
5721
+ this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
5722
+ if (currentSlideIndex == this.slideIndex) {
5723
+ this.play();
5724
+ }
5725
+ }, this));
5726
+
5727
+ if (this.slider.currentSlideIndex == this.slideIndex) {
5728
+ this.play();
5729
+ }
5730
+ } else {
5731
+ this.play();
5732
+ }
5733
+ };
5734
+
5735
+ NextendSmartSliderVimeoItem.prototype.play = function () {
5736
+ this.slider.sliderElement.trigger('mediaStarted', this.playerId);
5737
+ this.player.api("play");
5738
+ };
5739
+
5740
+ NextendSmartSliderVimeoItem.prototype.pause = function () {
5741
+ this.player.api("pause");
5742
+ };
5743
+
5744
+ NextendSmartSliderVimeoItem.prototype.reset = function () {
5745
+ this.player.api("seekTo", 0);
5746
+ };
5747
+
5748
+ NextendSmartSliderVimeoItem.prototype.setVolume = function (volume) {
5749
+ this.player.api('setVolume', volume);
5750
+ };
5751
+
5752
+ scope.NextendSmartSliderVimeoItem = NextendSmartSliderVimeoItem;
5753
+
5754
+ })(n2, window);
5755
+ (function ($, scope, undefined) {
5756
+
5757
+ function NextendSmartSliderYouTubeItem(slider, id, parameters, hasImage) {
5758
+ this.readyDeferred = $.Deferred();
5759
+ this.slider = slider;
5760
+ this.playerId = id;
5761
+
5762
+ this.parameters = $.extend({
5763
+ youtubeurl: "//www.youtube.com/watch?v=MKmIwHAFjSU",
5764
+ youtubecode: "MKmIwHAFjSU",
5765
+ center: 0,
5766
+ autoplay: "1",
5767
+ theme: "dark",
5768
+ related: "1",
5769
+ vq: "default",
5770
+ volume: "-1",
5771
+ loop: 0,
5772
+ reset: 0,
5773
+ query: [],
5774
+ }, parameters);
5775
+
5776
+ if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
5777
+ this.parameters.autoplay = 0;
5778
+ }
5779
+
5780
+ if (this.parameters.autoplay == 1 || !hasImage || n2const.isMobile) {
5781
+ this.ready($.proxy(this.initYoutubePlayer, this));
5782
+ } else {
5783
+ $("#" + this.playerId).on('click.youtube n2click.youtube', $.proxy(function (e) {
5784
+ $(e.currentTarget).off('.youtube');
5785
+ e.preventDefault();
5786
+ e.stopPropagation();
5787
+ this.ready($.proxy(function () {
5788
+ this.readyDeferred.done($.proxy(function () {
5789
+ this.play();
5790
+ }, this));
5791
+ this.initYoutubePlayer();
5792
+ }, this));
5793
+ }, this));
5794
+ }
5795
+ }
5796
+
5797
+ NextendSmartSliderYouTubeItem.YTDeferred = null;
5798
+ NextendSmartSliderYouTubeItem.prototype.ready = function (callback) {
5799
+ if (NextendSmartSliderYouTubeItem.YTDeferred === null) {
5800
+ NextendSmartSliderYouTubeItem.YTDeferred = $.Deferred();
5801
+ if (typeof YT === 'undefined') {
5802
+ var otherYTCB = function () {
5803
+ };
5804
+ if (typeof window.onYouTubeIframeAPIReady === 'function') {
5805
+ otherYTCB = window.onYouTubeIframeAPIReady;
5806
+ }
5807
+
5808
+ window.onYouTubeIframeAPIReady = function () {
5809
+ NextendSmartSliderYouTubeItem.YTDeferred.resolve();
5810
+ otherYTCB();
5811
+ };
5812
+ $.getScript("https://www.youtube.com/iframe_api");
5813
+ } else {
5814
+ if (YT.loaded) {
5815
+ NextendSmartSliderYouTubeItem.YTDeferred.resolve();
5816
+ } else {
5817
+ var interval = setInterval(function () {
5818
+ if (YT.loaded) {
5819
+ NextendSmartSliderYouTubeItem.YTDeferred.resolve();
5820
+ clearInterval(interval);
5821
+ }
5822
+ }, 200);
5823
+ }
5824
+ }
5825
+ }
5826
+ NextendSmartSliderYouTubeItem.YTDeferred.done(callback);
5827
+ };
5828
+
5829
+
5830
+ NextendSmartSliderYouTubeItem.prototype.initYoutubePlayer = function () {
5831
+ var player = $("#" + this.playerId),
5832
+ layer = player.closest(".n2-ss-layer");
5833
+ this.isStatic = player.closest('.n2-ss-static-slide').length;
5834
+
5835
+ var vars = {
5836
+ enablejsapi: 1,
5837
+ origin: window.location.protocol + "//" + window.location.host,
5838
+ theme: this.parameters.theme,
5839
+ modestbranding: 1,
5840
+ wmode: "opaque",
5841
+ rel: this.parameters.related,
5842
+ vq: this.parameters.vq,
5843
+ start: this.parameters.start
5844
+ };
5845
+
5846
+ if (this.parameters.center == 1) {
5847
+ vars.controls = 0;
5848
+ vars.showinfo = 0;
5849
+ }
5850
+ if (this.parameters.controls != 1) {
5851
+ vars.autohide = 1;
5852
+ vars.controls = 0;
5853
+ vars.showinfo = 0;
5854
+ }
5855
+
5856
+ if (+(navigator.platform.toUpperCase().indexOf('MAC') >= 0 && navigator.userAgent.search("Firefox") > -1)) {
5857
+ vars.html5 = 1;
5858
+ }
5859
+
5860
+ for (var k in this.parameters.query) {
5861
+ if (this.parameters.query.hasOwnProperty(k)) {
5862
+ vars[k] = this.parameters.query[k];
5863
+ }
5864
+ }
5865
+ ;
5866
+
5867
+ this.player = new YT.Player(this.playerId, {
5868
+ videoId: this.parameters.youtubecode,
5869
+ wmode: 'opaque',
5870
+ playerVars: vars,
5871
+ events: {
5872
+ onReady: $.proxy(this.onReady, this),
5873
+ onStateChange: $.proxy(function (state) {
5874
+ switch (state.data) {
5875
+ case YT.PlayerState.PLAYING:
5876
+ if (!this.isStatic) {
5877
+ this.slider.sliderElement.trigger('mediaStarted', this.playerId);
5878
+ }
5879
+ layer.triggerHandler('n2play');
5880
+ break;
5881
+ case YT.PlayerState.PAUSED:
5882
+ layer.triggerHandler('n2pause');
5883
+ break;
5884
+ case YT.PlayerState.ENDED:
5885
+ if (this.parameters.loop == 1) {
5886
+ this.player.seekTo(0);
5887
+ this.player.playVideo();
5888
+ } else {
5889
+ if (!this.isStatic) {
5890
+ this.slider.sliderElement.trigger('mediaEnded', this.playerId);
5891
+ }
5892
+ layer.triggerHandler('n2stop');
5893
+ }
5894
+ break;
5895
+
5896
+ }
5897
+ }, this)
5898
+ }
5899
+ });
5900
+
5901
+ this.playerElement = $("#" + this.playerId);
5902
+
5903
+ this.slideIndex = this.slider.findSlideIndexByElement(this.playerElement);
5904
+ if (this.parameters.center == 1) {
5905
+ this.onResize();
5906
+
5907
+ this.slider.sliderElement.on('SliderResize', $.proxy(this.onResize, this))
5908
+ }
5909
+
5910
+ };
5911
+
5912
+ NextendSmartSliderYouTubeItem.prototype.onReady = function (state) {
5913
+
5914
+ var volume = parseFloat(this.parameters.volume);
5915
+ if (volume >= 0) {
5916
+ this.setVolume(volume);
5917
+ }
5918
+
5919
+ if (this.parameters.autoplay == 1) {
5920
+ this.slider.visible($.proxy(this.initAutoplay, this));
5921
+ }
5922
+
5923
+ if (!this.isStatic) {
5924
+ //pause video when slide changed
5925
+ this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
5926
+ if (currentSlideIndex != this.slideIndex) {
5927
+ this.pause();
5928
+ }
5929
+ }, this));
5930
+ if (this.parameters.reset) {
5931
+ this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
5932
+ if (currentSlideIndex != this.slideIndex && this.player.getCurrentTime() != 0) {
5933
+ this.player.pauseVideo();
5934
+ this.player.seekTo(0);
5935
+ }
5936
+ }, this));
5937
+ }
5938
+ }
5939
+ this.readyDeferred.resolve();
5940
+ };
5941
+
5942
+ NextendSmartSliderYouTubeItem.prototype.onResize = function () {
5943
+ var controls = 100,
5944
+ parent = this.playerElement.parent(),
5945
+ width = parent.width(),
5946
+ height = parent.height() + controls,
5947
+ aspectRatio = 16 / 9,
5948
+ css = {
5949
+ width: width,
5950
+ height: height,
5951
+ marginTop: 0
5952
+ };
5953
+ css[nextend.rtl.marginLeft] = 0;
5954
+ if (width / height > aspectRatio) {
5955
+ css.height = width * aspectRatio;
5956
+ css.marginTop = (height - css.height) / 2;
5957
+ } else {
5958
+ css.width = height * aspectRatio;
5959
+ css[nextend.rtl.marginLeft] = (width - css.width) / 2;
5960
+ }
5961
+ this.playerElement.css(css);
5962
+ };
5963
+
5964
+ NextendSmartSliderYouTubeItem.prototype.initAutoplay = function () {
5965
+
5966
+ if (!this.isStatic) {
5967
+ //change slide
5968
+ this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
5969
+ if (currentSlideIndex == this.slideIndex) {
5970
+ this.play();
5971
+ }
5972
+ }, this));
5973
+
5974
+ if (this.slider.currentSlideIndex == this.slideIndex) {
5975
+ this.play();
5976
+ }
5977
+ } else {
5978
+ this.play();
5979
+ }
5980
+ };
5981
+
5982
+ NextendSmartSliderYouTubeItem.prototype.play = function () {
5983
+ if (this.isStopped()) {
5984
+ this.slider.sliderElement.trigger('mediaStarted', this.playerId);
5985
+ this.player.playVideo();
5986
+ }
5987
+ };
5988
+
5989
+ NextendSmartSliderYouTubeItem.prototype.pause = function () {
5990
+ if (!this.isStopped()) {
5991
+ this.player.pauseVideo();
5992
+ }
5993
+ };
5994
+
5995
+ NextendSmartSliderYouTubeItem.prototype.stop = function () {
5996
+ this.player.stopVideo();
5997
+ };
5998
+
5999
+ NextendSmartSliderYouTubeItem.prototype.isStopped = function () {
6000
+ var state = this.player.getPlayerState();
6001
+ switch (state) {
6002
+ case -1:
6003
+ case 0:
6004
+ case 2:
6005
+ case 5:
6006
+ return true;
6007
+ break;
6008
+ default:
6009
+ return false;
6010
+ break;
6011
+ }
6012
+ };
6013
+
6014
+ NextendSmartSliderYouTubeItem.prototype.setVolume = function (volume) {
6015
+ this.player.setVolume(volume * 100);
6016
+ };
6017
+
6018
+ scope.NextendSmartSliderYouTubeItem = NextendSmartSliderYouTubeItem;
6019
+
6020
+ })(n2, window);
library/media/dist/smartslider-frontend.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ !function(e,t,i){function s(t){this.device=null,this.load=e.Deferred(),this.slider=t,this.slides=this.slider.realSlides,this.lazyLoad=t.parameters.lazyLoad,this.lazyLoadNeighbor=t.parameters.lazyLoadNeighbor,this.deviceDeferred=e.Deferred(),this.backgroundImages=[];for(var i=0;i<this.slides.length;i++){var s=this.slides.eq(i).find(".n2-ss-slide-background");s.length>0?this.backgroundImages[i]=new n(i,s,this):this.backgroundImages[i]=!1,this.slides.eq(i).data("slideBackground",this.backgroundImages[i])}this.slider.sliderElement.one("SliderDevice",e.proxy(this.onSlideDeviceChangedFirst,this))}function n(t,i,s){this.responsiveElement=!1,this.loadStarted=!1,this.i=t,this.element=i,this.manager=s,this.loadDeferred=e.Deferred();var n=i.find(".n2-ss-slide-background-image");if(this.image=n,n.hasClass("n2-ss-slide-simple"))this.mode="simple",this.currentSrc=n.attr("src");else if(n.hasClass("n2-ss-slide-fill"))this.mode="fill",this.currentSrc=n.attr("src");else if(n.hasClass("n2-ss-slide-fit"))this.mode="fit",this.currentSrc=n.attr("src");else if(n.hasClass("n2-ss-slide-stretch"))this.mode="stretch",this.currentSrc=n.attr("src");else if(n.hasClass("n2-ss-slide-center")){this.mode="center";var r=n.css("backgroundImage").match(/url\(["]*([^)"]+)["]*\)/i);r.length>0&&(this.currentSrc=r[1])}else if(n.hasClass("n2-ss-slide-tile")){this.mode="tile";var r=n.css("backgroundImage").match(/url\(["]*([^)"]+)["]*\)/i);r.length>0&&(this.currentSrc=r[1])}else if(n.hasClass("n2-ss-slide-fixed")){this.mode="fixed";var r=n.css("backgroundImage").match(/url\(["]*([^)"]+)["]*\)/i);r.length>0&&(this.currentSrc=r[1])}else this.mode="fill",this.currentSrc="";if(this.x=n.data("x"),this.y=n.data("y"),this.hash=i.data("hash"),this.desktopSrc=i.data("desktop"),this.tabletSrc=i.data("tablet"),this.mobileSrc=i.data("mobile"),nextend.isRetina){var o=i.data("desktop-retina");o&&(this.desktopSrc=o),o=i.data("tablet-retina"),o&&(this.tabletSrc=o),o=i.data("mobile-retina"),o&&(this.mobileSrc=o)}var a=i.data("opacity");a>=0&&1>a&&(this.opacity=a),s.slider.isAdmin&&(this._change=this.change,this.change=this.changeAdmin),this.listenImageManager()}s.prototype.whenWithProgress=function(t){for(var i=0,s=e.Deferred(),n=0;n<t.length;n++)t[n].done(function(){s.notify(++i,t.length)});return e.when.apply(e,t).done(function(){s.resolveWith(null,arguments)}),s.promise()},s.prototype.getBackgroundImages=function(){return this.backgroundImages},s.prototype.onSlideDeviceChangedFirst=function(t,i){this.onSlideDeviceChanged(t,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onSlideDeviceChanged,this)),1==this.lazyLoad?(this.preLoad=this.preLoadLazyNeighbor,this.load=e.when(this.preLoad(this.slider.currentSlideIndex))):2==this.lazyLoad?(e(window).load(e.proxy(this.preLoadAll,this)),this.load=e.when(this.preLoad(this.slider.currentSlideIndex))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(e,t){this.device=t;for(var i=0;i<this.backgroundImages.length;i++)this.backgroundImages[i]&&this.backgroundImages[i].onSlideDeviceChanged(t)},s.prototype.changed=function(e){1==this.lazyLoad||2==this.lazyLoad?e==this.slider.currentSlideIndex&&this.preLoad(e):this.preLoad(e)},s.prototype.preLoadCurrent=function(){this.preLoad(this.slider.currentSlideIndex)},s.prototype.preLoadAll=function(){for(var e=[],t=0;t<this.backgroundImages.length;t++)e.push(this._preLoad(t));return e},s.prototype.preLoad=function(e){return this._preLoad(e)},s.prototype.preLoadLazyNeighbor=function(t){var i=this.lazyLoadNeighbor,s=[this._preLoad(t)];if(i){for(var n=0,r=t;i>n;)r--,0>r&&(r=this.backgroundImages.length-1),s.push(this._preLoad(r)),n++;for(n=0,r=t;i>n;)r++,r>=this.backgroundImages.length&&(r=0),s.push(this._preLoad(r)),n++}var o=e.Deferred();if(1!=s[0].state()&&"resolved"!=s[0].state()){var a=setTimeout(e.proxy(function(){this.slider.load.showSpinner("backgroundImage"+t),a=null},this),50);e.when.apply(e,s).done(e.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+t),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return o},s.prototype._preLoad=function(e){return this.backgroundImages[e]?this.backgroundImages[e].preLoad():!0},s.prototype.hack=function(){for(var e=0;e<this.backgroundImages.length;e++)this.backgroundImages[e]&&this.backgroundImages[e].hack()},t.NextendSmartSliderBackgroundImages=s,n.prototype.fixNatural=function(e){var t=new Image;t.src=e.src,e.naturalWidth=t.width,e.naturalHeight=t.height},n.prototype.preLoad=function(){return"pending"==this.loadDeferred.state()&&(this.loadStarted=!0,this.manager.deviceDeferred.done(e.proxy(function(){this.onSlideDeviceChanged(this.manager.device),this.element.n2imagesLoaded(e.proxy(function(){this.isLoaded=!0;var e=this.image[0];"IMG"==e.tagName&&"undefined"==typeof e.naturalWidth&&this.fixNatural(e),this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},n.prototype.afterLoaded=function(){return e.when(this.loadDeferred,this.manager.slider.responsive.ready)},n.prototype.onSlideDeviceChanged=function(e){var t=this.desktopSrc;"mobile"==e.device?this.mobileSrc?t=this.mobileSrc:this.tabletSrc&&(t=this.tabletSrc):"tablet"==e.device&&this.tabletSrc&&(t=this.tabletSrc),this.change(t,"",this.mode,this.x,this.y)},n.prototype.addResponsiveElement=function(e){this.responsiveElement=e},n.prototype.listenImageManager=function(){""!=this.hash&&e(window).on(this.hash,e.proxy(this.onImageManagerChanged,this))},n.prototype.notListenImageManager=function(){""!=this.hash&&e(window).off(this.hash,null,e.proxy(this.onImageManagerChanged,this))},n.prototype.onImageManagerChanged=function(e,t){this.tabletSrc=t.tablet.image,this.mobileSrc=t.mobile.image,"tablet"!=this.manager.device.device&&"mobile"!=this.manager.device.device||this.onSlideDeviceChanged(this.manager.device)},n.prototype.changeDesktop=function(t,i,s,n,r){if(this.notListenImageManager(),this.desktopSrc=t,this.hash=md5(t),"default"==s&&(s=nextend.smartSlider.slideBackgroundMode),this.change(t,i,s,n,r),""!=t){var o=new Image;o.addEventListener("load",e.proxy(function(){e.when(nextend.imageManager.getVisual(t)).done(e.proxy(function(e){this.onImageManagerChanged(null,e.value),this.listenImageManager()},this))},this),!1),o.src=nextend.imageHelper.fixed(t)}else this.tabletSrc="",this.mobileSrc=""},n.prototype.changeAdmin=function(e,t,i,s,n){this.manager.slider.parameters.dynamicHeight&&(i="simple"),this._change(nextend.imageHelper.fixed(e),t,i,s,n)},n.prototype.change=function(t,i,s,n,r){if(n=parseInt(n),r=parseInt(r),isNaN(n)&&(n=50),n=Math.max(0,Math.min(100,n)),isNaN(r)&&(r=50),r=Math.max(0,Math.min(100,r)),(this.currentSrc!=t||this.mode!=s||this.x!=n||this.y!=r)&&this.loadStarted){var o=null;switch(s){case"simple":o=e('<img data-x="'+n+'" data-y="'+r+'" src="'+t+'" class="n2-ss-slide-background-image n2-ss-slide-simple" />');break;case"fill":o=e('<img data-x="'+n+'" data-y="'+r+'" src="'+t+'" class="n2-ss-slide-background-image n2-ss-slide-fill" />'),this.responsiveElement.setCentered();break;case"fit":o=e('<img data-x="'+n+'" data-y="'+r+'" src="'+t+'" class="n2-ss-slide-background-image n2-ss-slide-fit" />'),this.responsiveElement.setCentered();break;case"stretch":o=e('<img data-x="'+n+'" data-y="'+r+'" src="'+t+'" class="n2-ss-slide-background-image n2-ss-slide-stretch" />'),this.responsiveElement.unsetCentered();break;case"center":o=e("<div style=\"background-image: url('"+t+"');background-position:"+n+"% "+r+'%;" class="n2-ss-slide-background-image n2-ss-slide-center"></div>'),this.responsiveElement.unsetCentered();break;case"tile":o=e("<div style=\"background-image: url('"+t+"');background-position:"+n+"% "+r+'%;" class="n2-ss-slide-background-image n2-ss-slide-tile"></div>'),this.responsiveElement.unsetCentered()}switch(""==t&&o.css("display","none"),o.css("opacity",this.opacity),this.image.replaceWith(o).remove(),this.responsiveElement.element=this.image=o,this.currentSrc=t,this.mode=s,this.x=n,this.y=r,"pending"==this.loadDeferred.state()&&this.loadDeferred.resolve(),this.loadDeferred=e.Deferred(),this.manager.changed(this.i),s){case"fill":case"fit":this.afterLoaded().done(e.proxy(function(){this.responsiveElement.afterLoaded(),this.responsiveElement.refreshRatio(),this.responsiveElement._refreshResize()},this));break;case"stretch":case"center":case"tile":case"fixed":case"simple":this.responsiveElement._refreshResize()}}},n.prototype.setOpacity=function(e){this.opacity=e,this.image.css("opacity",e)},n.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},t.NextendSmartSliderBackgroundImage=n}(n2,window),function(e,t,i){function s(t,i){this.smartSlider=t,this.spinnerKey="fadePlaceholder",this.id=t.sliderElement.attr("id"),this.parameters=e.extend({fade:1,scroll:0},i),this.spinner=e("#"+this.id+"-spinner"),this.deferred=e.Deferred()}s.prototype.start=function(){if(this.parameters.scroll){var t=e(window);t.on("scroll."+this.id,e.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=e("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&this.smartSlider.backgroundImages.load.progress(e.proxy(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")},this)),e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load).done(e.proxy(this.showSlider,this))}else this.smartSlider.responsive.ready.done(e.proxy(function(){this.showSlider()},this))},s.prototype.onScroll=function(){var t=e(window);t.scrollTop()+t.height()>this.smartSlider.sliderElement.offset().top+100&&(e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load).done(e.proxy(this.showSlider,this)),t.off("scroll."+this.id))},s.prototype.showSlider=function(t){e.when.apply(e,this.smartSlider.widgetDeferreds).done(e.proxy(function(){this.smartSlider.responsive.doResize(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),e("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof t?t(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(e){this.deferred.done(e)},s.prototype.showSpinner=function(e){this.spinnerKey=e,this.spinner.appendTo(this.loadingArea)},s.prototype.removeSpinner=function(e){this.spinnerKey==e&&(this.spinner.detach(),this.spinnerKey="")},t.NextendSmartSliderLoad=s}(n2,window),function(e,t,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}s.prototype.makeReady=function(e,t){if(this.sliders[e]=t,"undefined"!=typeof this.readys[e])for(var i=0;i<this.readys[e].length;i++)this.readys[e][i].call(t,t,t.sliderElement)},s.prototype.ready=function(e,t){"undefined"!=typeof this.sliders[e]?t.call(this.sliders[e],this.sliders[e],this.sliders[e].sliderElement):("undefined"==typeof this.readys[e]&&(this.readys[e]=[]),this.readys[e].push(t))},s.prototype.trigger=function(t,i){var s=n2(t),n=i.split(","),r=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(n.length>1){-1==e.inArray(t,this._resetCounters)&&(this._resetCounters.push(t),r.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=n[o],o++,o>n.length-1&&(o=0),s.data("eventCounter",o)}r.triggerHandler(i)},s.prototype.applyAction=function(e,t){var i=n2(e).closest(".n2-ss-slider").data("ss");i[t].apply(i,Array.prototype.slice.call(arguments,2))},window.n2ss=new s}(n2,window),function($,scope,undefined){function NextendSmartSliderAbstract(e,t){this.startedDeferred=$.Deferred(),e instanceof n2&&(e="#"+e.attr("id"));var i=e.substr(1);return window[i]&&window[i]instanceof NextendSmartSliderAbstract?!1:(window[i]=this,this.readyDeferred=$.Deferred(),void $(e).n2waitUntilExists(e,$.proxy(function(){var s=$(e);if(this.nextCarousel=this.next,this.previousCarousel=this.previous,"SCRIPT"==s.prop("tagName")){var n=s.data("dependency"),r=s.data("delay"),o=$.proxy(function(){var n=$(s.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));s.replaceWith(n),this.postInit(i,$(e),t),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);n&&$("#n2-ss-"+n).length?n2ss.ready(n,$.proxy(function(e){e.ready(o)},this)):r?setTimeout(o,r):o()}else this.postInit(i,s,t)},this),!0))}NextendSmartSliderAbstract.prototype.postInit=function(e,t,i){i.isDelayed?setTimeout($.proxy(this._postInit,this,e,t,i),200):this._postInit(e,t,i)},NextendSmartSliderAbstract.prototype._postInit=function(e,t,i){var s=t.is(":visible");s?this.__postInit(e,t,i):setTimeout($.proxy(this._postInit,this,e,t,i),200)},NextendSmartSliderAbstract.prototype.__postInit=function(id,sliderElement,parameters){this.killed=!1,this.isAdmin=!1,this.currentSlideIndex=0,this.responsive=!1,this.layerMode=!0,this._lastChangeTime=0,this.id=parseInt(id.replace("n2-ss-","")),this.sliderElement=sliderElement.data("ss",this),this.parameters=$.extend({admin:!1,playWhenVisible:1,isStaticEdited:!1,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[]},parameters);try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin=!!this.parameters.admin,this.isAdmin&&(this.changeTo=function(){}),this.load=new NextendSmartSliderLoad(this,this.parameters.load),this.findSlides(),this.randomize(),this.currentSlideIndex=this.__getActiveSlideIndex();var forceActiveSlideIndex="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;if(null!==forceActiveSlideIndex&&this.changeActiveBeforeLoad(forceActiveSlideIndex),!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var sessionIndex=parseInt(sessionStorage.getItem("ss-"+this.id));null===forceActiveSlideIndex&&null!==sessionIndex&&this.changeActiveBeforeLoad(sessionIndex),this.sliderElement.on("mainAnimationComplete",$.proxy(function(e,t,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}this.backgroundImages=new NextendSmartSliderBackgroundImages(this);for(var i=0;i<this.parameters.initCallbacks.length;i++)new Function(this.parameters.initCallbacks[i])(this);if(this.initSlides(),this.widgets=new NextendSmartSliderWidgets(this),this.sliderElement.on("universalenter",$.proxy(function(){this.sliderElement.addClass("n2-hover")},this)).on("universalleave",$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover")},this)),this.controls={},this.layerMode&&this.initMainAnimationWithLayerAnimation(),this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){if(this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";"0"!=this.parameters.controls.touch&&this.parameters.controls.touch&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})});var preventFocus=!1;this.slides.find("a").on("mousedown",function(e){preventFocus=!0,setTimeout(function(){preventFocus=!1},100)}),this.slides.find("a").on("focus",$.proxy(function(e){if(!preventFocus){var t=this.findSlideIndexByElement(e.currentTarget);-1!=t&&t!=this.currentSlideIndex&&this.changeTo(t,!1,!1)}},this))}this.preReadyResolve(),this.initCarousel()}},NextendSmartSliderAbstract.prototype.initSlides=function(){if(this.layerMode){if(this.isAdmin&&"showcase"!=this.type)new NextendSmartSliderSlide(this,this.slides.eq(this.currentSlideIndex),1);else for(var e=0;e<this.slides.length;e++)new NextendSmartSliderSlide(this,this.slides.eq(e),this.currentSlideIndex==e);var t=this.findStaticSlide();t.length&&new NextendSmartSliderSlide(this,t,!0,!0)}},NextendSmartSliderAbstract.prototype.getRealIndex=function(e){return e},NextendSmartSliderAbstract.prototype.changeActiveBeforeLoad=function(e){e>0&&e<this.slides.length&&this.currentSlideIndex!=e&&(this.unsetActiveSlide(this.slides.eq(this.currentSlideIndex)),this.setActiveSlide(this.slides.eq(e)),this.currentSlideIndex=e,this.ready($.proxy(function(){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},this)))},NextendSmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},NextendSmartSliderAbstract.prototype.randomize=function(){this.parameters.randomize.randomizeFirst&&(this.slides.filter(".n2-ss-slide-active").removeClass("n2-ss-slide-active"),this.slides.eq(Math.floor(Math.random()*this.slides.length)).addClass("n2-ss-slide-active")),this.parameters.randomize.randomize&&this.shuffleSlides()},NextendSmartSliderAbstract.prototype.shuffleSlides=function(){for(var e=0;e<this.slides.length;e++)this.slides.eq(e).data("originalIndex",e);this.slides.sort(function(){return Math.round(Math.random())-.5}),this.slides.appendTo(this.slides.parent()),this.shuffled=[];for(var e=0;e<this.slides.length;e++)this.shuffled[e]=this.slides.eq(e).data("originalIndex")},NextendSmartSliderAbstract.prototype.findSlides=function(){this.realSlides=this.slides=this.sliderElement.find(".n2-ss-slide")},NextendSmartSliderAbstract.prototype.findStaticSlide=function(){return this.sliderElement.find(".n2-ss-static-slide")},NextendSmartSliderAbstract.prototype.addWidget=function(e,t){this.widgetDeferreds.push(t)},NextendSmartSliderAbstract.prototype.started=function(e){this.startedDeferred.done($.proxy(e,this))},NextendSmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},NextendSmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},NextendSmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},NextendSmartSliderAbstract.prototype.ready=function(e){this.readyDeferred.done($.proxy(e,this))},NextendSmartSliderAbstract.prototype.startVisibilityCheck=function(){this.visibleDeferred=$.Deferred(),this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},NextendSmartSliderAbstract.prototype.checkIfVisible=function(){var e=$(window).scrollTop(),t=e+$(window).height(),i=this.sliderElement.offset().top+this.sliderElement.height()/2;i>=e&&t>=i&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.visibleDeferred.resolve())},NextendSmartSliderAbstract.prototype.visible=function(e){this.visibleDeferred.done($.proxy(e,this))},NextendSmartSliderAbstract.prototype.isPlaying=function(){return"ended"!=this.mainAnimation.getState()},NextendSmartSliderAbstract.prototype.focus=function(e){var t=$.Deferred();if("undefined"==typeof e&&(e=0),this.responsive.parameters.focusUser&&!e||this.responsive.parameters.focusAutoplay&&e){var i=this.sliderElement.offset().top-this.responsive.verticalOffsetSelectors.height();$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){t.resolve()},this)):t.resolve()}else t.resolve();return t},NextendSmartSliderAbstract.prototype.initCarousel=function(){if(!parseInt(this.parameters.carousel)){this.next=this.nextNotCarousel,this.previous=this.previousNotCarousel;var e=this.slides.length,t=1,i=this.sliderElement.find(".nextend-arrow-previous"),s=function(e){e!=t&&(NextendTween.to(i,.4,{opacity:e}).play(),t=e)},n=1,r=this.sliderElement.find(".nextend-arrow-next"),o=function(e){e!=n&&(NextendTween.to(r,.4,{opacity:e}).play(),n=e)},a=function(t){s(0==t?0:1),o(t==e-1?0:1)};a(this.__getActiveSlideIndex()),this.sliderElement.on("sliderSwitchTo",function(e,t){a(t)})}},NextendSmartSliderAbstract.prototype.next=function(e,t){var i=this.currentSlideIndex+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,e,t)},NextendSmartSliderAbstract.prototype.previous=function(e,t){var i=this.currentSlideIndex-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,e,t)},NextendSmartSliderAbstract.prototype.nextNotCarousel=function(e,t){var i=this.currentSlideIndex+1;return i<this.slides.length?this.changeTo(i,!1,e,t):!1},NextendSmartSliderAbstract.prototype.previousNotCarousel=function(e,t){var i=this.currentSlideIndex-1;return i>=0?this.changeTo(i,!0,e,t):!1},NextendSmartSliderAbstract.prototype.directionalChangeToReal=function(e){this.directionalChangeTo(e)},NextendSmartSliderAbstract.prototype.directionalChangeTo=function(e){e>this.currentSlideIndex?this.changeTo(e,!1):this.changeTo(e,!0)},NextendSmartSliderAbstract.prototype.changeTo=function(e,t,i,s){if(e=parseInt(e),e!=this.currentSlideIndex){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)]);var n=$.now();return $.when(this.backgroundImages.preLoad(e),this.focus(i)).done($.proxy(function(){if(this._lastChangeTime<=n){this._lastChangeTime=n;var r=this.mainAnimation.getState();if("ended"==r){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(e,t,i,s),o.changeTo(this.currentSlideIndex,this.slides.eq(this.currentSlideIndex),e,this.slides.eq(e),t,i),this.currentSlideIndex=e}else"playing"==r&&(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,e,t,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},NextendSmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},NextendSmartSliderAbstract.prototype.revertTo=function(e,t){this.unsetActiveSlide(this.slides.eq(t)),this.setActiveSlide(this.slides.eq(e)),this.currentSlideIndex=e,this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},NextendSmartSliderAbstract.prototype.__getActiveSlideIndex=function(){var e=this.slides.index(this.slides.filter(".n2-ss-slide-active"));return-1===e&&(e=0),e},NextendSmartSliderAbstract.prototype.setActiveSlide=function(e){e.addClass("n2-ss-slide-active")},NextendSmartSliderAbstract.prototype.unsetActiveSlide=function(e){e.removeClass("n2-ss-slide-active")},NextendSmartSliderAbstract.prototype.initMainAnimationWithLayerAnimation=function(){"forced"==this.parameters.layerMode.mode&&this.sliderElement.on("preChangeToPlay",$.proxy(function(e,t,i,s,n){i.handled=!0,s.on("layerAnimationCompleteOut.layers",function(){s.off("layerAnimationCompleteOut.layers"),t.resolve()}),this.callOnSlide(s,"playOut")},this)),this.sliderElement.on("mainAnimationStart",$.proxy(this.onMainAnimationStartSyncLayers,this,this.parameters.layerMode)).on("reverseModeEnabled",$.proxy(this.onMainAnimationStartSyncLayersReverse,this,this.parameters.layerMode))},NextendSmartSliderAbstract.prototype.onMainAnimationStartSyncLayers=function(e,t,i,s,n){var r=this.slides.eq(n),o=this.slides.eq(s);"mainInStart"==e.inAnimation?r.one("mainAnimationStartIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),this.callOnSlide(r,"playIn")},this)):"mainInEnd"==e.inAnimation&&r.one("mainAnimationCompleteIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),this.callOnSlide(r,"playIn")},this)),"skippable"==e.mode&&o.on("mainAnimationCompleteOut.layers",$.proxy(function(){o.off("mainAnimationCompleteOut.layers"),e.playOnce?this.parameters.foreverLayerAnimation||this.callOnSlide(o,"pause"):this.callOnSlide(o,"reset")},this)),r.one("mainAnimationStartInCancel.layers",function(){r.off("mainAnimationStartIn.layers"),r.off("mainAnimationCompleteIn.layers")})},NextendSmartSliderAbstract.prototype.onMainAnimationStartSyncLayersReverse=function(e,t,i){var s=this.slides.eq(i);"mainInStart"==e.inAnimation?s.one("mainAnimationStartIn.layers",$.proxy(function(){this.callOnSlide(s,"playIn")},this)):"mainInEnd"==e.inAnimation&&s.one("mainAnimationCompleteIn.layers",$.proxy(function(){this.sliderElement.off("mainAnimationComplete.layers"),this.callOnSlide(s,"playIn")},this)),this.sliderElement.one("mainAnimationComplete.layers",function(){s.off("mainAnimationStartIn.layers"),s.off("mainAnimationCompleteIn.layers")})},NextendSmartSliderAbstract.prototype.callOnSlide=function(e,t){e.data("slide")[t]()},NextendSmartSliderAbstract.prototype.findSlideIndexByElement=function(e){e=$(e);for(var t=0;t<this.slides.length;t++)if(1===this.slides.eq(t).has(e).length)return t;return-1},NextendSmartSliderAbstract.prototype.initMainAnimation=function(){},NextendSmartSliderAbstract.prototype.initResponsiveMode=function(){new scope[this.responsiveClass](this,this.parameters.responsive),this.dimensions=this.responsive.responsiveDimensions},NextendSmartSliderAbstract.prototype.initControls=function(){this.parameters.admin||("0"!=this.parameters.controls.touch&&new NextendSmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new NextendSmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new NextendSmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new NextendSmartSliderControlScroll(this),this.parameters.controls.tilt&&new NextendSmartSliderControlTilt(this),new NextendSmartSliderControlAutoplay(this,this.parameters.autoplay))},NextendSmartSliderAbstract.prototype.slideToID=function(e,t){var i=this.slides.index(this.slides.filter('[data-id="'+e+'"]'));if(-1!=i)return this.slide(i,t);var s=$('[data-id="'+e+'"]').closest(".n2-ss-slider");if(s.length){var n=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(n=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-n},400),s.data("ss").slideToID(e,t)}},NextendSmartSliderAbstract.prototype.slide=function(e,t){return e>=0&&e<this.slides.length?"undefined"==typeof t?parseInt(this.parameters.carousel)&&this.currentSlideIndex==this.slides.length-1&&0==e?this.next():this.currentSlideIndex>e?this.changeTo(e,!0):this.changeTo(e):this.changeTo(e,!t):!1},NextendSmartSliderAbstract.prototype.adminGetCurrentSlideElement=function(){return this.parameters.isStaticEdited?this.findStaticSlide():this.slides.eq(this.currentSlideIndex)},scope.NextendSmartSliderAbstract=NextendSmartSliderAbstract,function(e,t){var i={},s=function(e){i[e]&&(t.clearInterval(i[e]),i[e]=null)},n="n2waitUntilExists.found";e.fn.n2waitUntilExists=function(r,o,a,l){var d=e(r),h=d.not(function(){return e(this).data(n)});return"remove"===o?s(r):(h.each(o).data(n,!0),a&&d.length?s(r):l||(i[r]=t.setInterval(function(){d.n2waitUntilExists(r,o,a,!0)},500))),d}}(n2,window)}(n2,window),function($,scope,undefined){function NextendSmartSliderWidgets(e){this.slider=e,this.sliderElement=e.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.initExcludeSlides()}NextendSmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".nextend-bullet-bar"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")},this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.initHover()},NextendSmartSliderWidgets.prototype.initHover=function(){var e=null,t=this.sliderElement.find(".n2-ss-widget-hover");t.length>0&&this.sliderElement.on("universalenter",function(i){var s=$(this);e&&clearTimeout(e),t.css("visibility","visible"),setTimeout(function(){s.addClass("n2-ss-widget-hover-show")},50)}).on("universalleave",function(){var i=this;e&&clearTimeout(e),e=setTimeout(function(){$(i).removeClass("n2-ss-widget-hover-show"),e=setTimeout(function(){t.css("visibility","hidden")},400)},500)})},NextendSmartSliderWidgets.prototype.initExcludeSlides=function(){var e=this.sliderElement.find(".n2-ss-widget[data-exclude-slides]"),t=function(e,t,i){-1!=$.inArray(i+1+"",t)?e.addClass("n2-ss-widget-hidden"):e.removeClass("n2-ss-widget-hidden")};e.each($.proxy(function(e,i){for(var s=$(i),n=s.attr("data-exclude-slides").split(","),e=n.length-1;e>=0;e--){var r=n[e].split("-");if(2==r.length&&parseInt(r[0])<=parseInt(r[1])){n[e]=r[0],r[0]=parseInt(r[0]),r[1]=parseInt(r[1]);for(var o=r[0]+1;o<=r[1];o++)n.push(o+"")}}t(s,n,this.slider.currentSlideIndex),this.slider.sliderElement.on("sliderSwitchTo",function(e,i){t(s,n,i)})},this))},NextendSmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){
2
+ var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},NextendSmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},scope.NextendSmartSliderWidgets=NextendSmartSliderWidgets}(n2,window),function(e,t,i){function s(e,t,i,s,n,r){this.durationMultiplier=n,this.original={currentImage:t,nextImage:i},this.animationProperties=s,this.reversed=r,this.timeline=e.timeline,this.containerElement=e.bgAnimationElement,this.shiftedBackgroundAnimation=e.parameters.shiftedBackgroundAnimation,this.clonedImages={}}s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},t.NextendSmartSliderBackgroundAnimationAbstract=s}(n2,window),function(e,t,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,NextendSmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}function n(){s.prototype.constructor.apply(this,arguments),this.setup()}function r(){n.prototype.constructor.apply(this,arguments)}function o(){n.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments);var t=e.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==t.direction?t.direction="right":t.direction="left");var i=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==t.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==t.direction?0:-1*(this.w/2)});var n=e('<div class="tab"></div>').css({width:i,height:this.h,position:"absolute",top:"0px",left:"left"==t.direction?i:"0","z-index":101});NextendTween.set(n,{transformStyle:"preserve-3d",transformOrigin:"left"==t.direction?"0px 0px":i+"px 0px"});var r=e('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:i,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(n);NextendTween.set(r,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=e('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(n).css({width:i,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=e("<div></div>").append(this.clonedCurrent().clone().css("left","left"==t.direction?0:-i)).css({position:"absolute",top:0,left:"left"==t.direction?"0":i,width:i,height:this.h,zIndex:100,overflow:"hidden"}),l=e('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==t.direction?i:0,width:i,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),d=e("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(n).append(a).append(l);NextendTween.set(d,{perspective:t.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(d),this.preSetup(),this.timeline.to(n.get(0),t.duration*this.durationMultiplier,{rotationY:"left"==t.direction?-180:180},0),this.timeline.to(l.get(0),t.duration*this.durationMultiplier,{opacity:0},0)}function l(){n.prototype.constructor.apply(this,arguments)}function d(){n.prototype.constructor.apply(this,arguments)}function h(){n.prototype.constructor.apply(this,arguments)}s.prototype=Object.create(NextendSmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h})),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h})),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(e){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},t.NextendSmartSliderBackgroundAnimationFluxAbstract=s,n.prototype=Object.create(s.prototype),n.prototype.constructor=n,n.prototype.setup=function(t){var i=e("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],n=[],r=t.columns,o=t.rows,a=Math.floor(this.w/r),l=Math.floor(this.h/o),d=this.w-r*a,h=Math.ceil(d/r),p=this.h-o*l,c=Math.ceil(p/o),m=0,u=0;r>u;u++){s[u]=[];var f=a,y=0;if(d>0){var g=d>=h?h:d;f+=g,d-=g}for(var v=p,S=0;o>S;S++){var x=l;if(v>0){var g=v>=c?c:v;x+=g,v-=g}var b=e('<div class="tile tile-'+u+"-"+S+'"></div>').css({position:"absolute",top:y+"px",left:m+"px",width:f+"px",height:x+"px",zIndex:-Math.abs(u-parseInt(r/2))+r-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(b,f,x,t,m,y);n.push(w),s[u][S]=w,y+=x}m+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(t,n,s)},n.prototype.animate=function(t,i,s){this["sequence"+t.tiles.sequence](e.proxy(this.transform,this,t),i,s,t.tiles.delay*this.durationMultiplier)},n.prototype.sequenceParallel=function(e,t){e(t,null)},n.prototype.sequenceRandom=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<t.length;r++)e(t[r],n+Math.random()*s)},n.prototype.sequenceForwardCol=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<t.length;r++)e(t[r],n+s*r)},n.prototype.sequenceBackwardCol=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=t.length-1,o=0;o<t.length;o++)e(t[o],n+s*(r-o))},n.prototype.sequenceForwardRow=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*r),r++},n.prototype.sequenceBackwardRow=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=t.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*r),r--},n.prototype.sequenceForwardDiagonal=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=0;r<i[0].length;r++)for(var o=0;o<i.length;o++)e(i[o][r],n+s*(o+r))},n.prototype.sequenceBackwardDiagonal=function(e,t,i,s){for(var n=this.timeline.totalDuration(),r=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],n+s*(r-a-o))},t.NextendSmartSliderBackgroundAnimationTiled=n,r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.prototype.setup=function(){var t=e.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof t.invert&&e.extend(!0,t.main,t.invert),"undefined"!=typeof t.invertTiles&&e.extend(t.tiles,t.invertTiles)),n.prototype.setup.call(this,t),t.tiles.cropOuter&&this.container.css("overflow","hidden")},r.prototype.renderTile=function(t,i,s,n,r,o){n.tiles.crop&&t.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t),l=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return n.main.real3D&&(NextendTween.set(t.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},r.prototype.transform=function(e,t,i){var s=e.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(t.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(t.next,s.duration*this.durationMultiplier,s.next,i)},t.NextendSmartSliderBackgroundAnimationFlat=r,o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.setup=function(){var t=e.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);t.fullCube=!0,this.reversed&&("undefined"!=typeof t.invert&&e.extend(!0,t.main,t.invert),"undefined"!=typeof t.invertTiles&&e.extend(t.tiles,t.invertTiles)),n.prototype.setup.call(this,t)},o.prototype.renderTile=function(t,i,s,n,r,o){var a=n.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(n.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}n.main.real3D&&NextendTween.set(t.get(0),{transformStyle:"preserve-3d"});var l=e('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(t);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var d=0;"horizontal"==n.main.direction&&(d=180);var h=this.getSide(l,i,s,0,0,-a/2,180,0,d),p={Back:h,BackInvert:h};return(n.fullCube||"vertical"==n.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(n.fullCube||"horizontal"==n.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),p[n.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})),l},o.prototype.getSide=function(t,i,s,n,r,o,a,l,d){var h=e('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(t);return NextendTween.set(h.get(0),{x:n,y:r,z:o,rotationX:a,rotationY:l,rotationZ:d,backfaceVisibility:"hidden"}),h},o.prototype.addAnimation=function(e,t){var i=e.duration;delete e.duration,this.timeline.to(t,i*this.durationMultiplier,e)},o.prototype.transform=function(e,t,i){for(var s=0;s<e.pre.length;s++){var n=e.pre[s],r=n.duration*this.durationMultiplier;this.timeline.to(t,r,n,i),i+=r}this["transform"+e.main.side](e.main,t,i),i+=e.main.duration;for(var s=0;s<e.post.length;s++){var n=e.post[s],r=n.duration*this.durationMultiplier;this.timeline.to(t,r,n,i),i+=r}},o.prototype.transformLeft=function(e,t,i){this._transform(e,t,i,0,90,0)},o.prototype.transformRight=function(e,t,i){this._transform(e,t,i,0,-90,0)},o.prototype.transformTop=function(e,t,i){this._transform(e,t,i,-90,0,0)},o.prototype.transformBottom=function(e,t,i){this._transform(e,t,i,90,0,0)},o.prototype.transformBack=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,180,0):this._transform(e,t,i,180,0,0)},o.prototype.transformBackInvert=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,-180,0):this._transform(e,t,i,-180,0,0)},o.prototype._transform=function(e,t,i,s,n,r){this.timeline.to(t,e.duration*this.durationMultiplier,{rotationX:s,rotationY:n,rotationZ:r,ease:e.ease},i)},t.NextendSmartSliderBackgroundAnimationCubic=o,a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.getExtraDelay=function(){return 0},t.NextendSmartSliderBackgroundAnimationTurn=a,l.prototype=Object.create(n.prototype),l.prototype.constructor=l,l.prototype.setup=function(){var t=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),n.prototype.setup.call(this,t)},l.prototype.renderTile=function(t,i,s,n,r,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},l.prototype.transform=function(t,i,s){var n=e.extend(!0,{},t.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,t.main.duration*this.durationMultiplier,n,s)},t.NextendSmartSliderBackgroundAnimationExplode=l,d.prototype=Object.create(n.prototype),d.prototype.constructor=d,d.prototype.setup=function(){var t=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),n.prototype.setup.call(this,t)},d.prototype.renderTile=function(t,i,s,n,r,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:t}},d.prototype.transform=function(t,i,s){var n=e.extend(!0,{},t.main.current);n.rotationX=90*(3*Math.random()-1),n.rotationY=90*(3*Math.random()-1),n.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,t.main.duration*this.durationMultiplier,n,s)},t.NextendSmartSliderBackgroundAnimationExplodeReversed=d,h.prototype=Object.create(n.prototype),h.prototype.constructor=h,h.prototype.setup=function(){var t=e.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),n.prototype.setup.call(this,t)},h.prototype.renderTile=function(t,i,s,n,r,o){this.container.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:n.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-r+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},h.prototype.animate=function(t,i,s){this.timeline.to(s[0][0].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),e("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,t.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},t.NextendSmartSliderBackgroundAnimationSlixes=h}(n2,window),function(e,t,i){function s(t,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=-1,this.slider=t,this.parameters=e.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=t.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s){this.currentSlideIndex=i,this.nextSlideIndex=s},this))}s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(e){this.isTouch=e},s.prototype.setTouchProgress=function(e){this.isReverseEnabled?this._setTouchProgressWithReverse(e):this._setTouchProgress(e)},s.prototype._setTouchProgress=function(e){"ended"!=this.state&&(0>=e?this.timeline.progress(Math.max(e,1e-6),!1):e>=0&&1>=e&&this.timeline.progress(e))},s.prototype._setTouchProgressWithReverse=function(e){0==e?(this.reverseTimeline.progress(0),this.timeline.progress(e,!1)):e>=0&&1>=e?(this.reverseTimeline.progress(0),this.timeline.progress(e)):0>e&&e>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(e)))},s.prototype.setTouchEnd=function(e,t,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(e,t,i):this._setTouchEnd(e,t,i))},s.prototype._setTouchEnd=function(e,t,i){e&&t>0?(this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse(),this.willRevertTo(this.currentSlideIndex,this.nextSlideIndex))},s.prototype._setTouchEndWithReverse=function(e,t,i){e?0>t&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,t,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this.nextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(0>t?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-t,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this.currentSlideIndex,this.nextSlideIndex))},s.prototype.fixTouchDuration=function(e,t,i){var s=e.totalDuration(),n=Math.max(s/3,Math.min(s,i/Math.abs(t)/1e3));n!=s&&e.totalDuration(n)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.preChangeToPlay=function(e,t,i){var s={handled:!1};this.sliderElement.trigger("preChangeToPlay",[e,s,t,i]),s.handled||e.resolve()},s.prototype.changeTo=function(t,i,s,n,r,o){if(this._initAnimation(t,i,s,n,r),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[t,s,o],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[t,s,o],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=e.proxy(function(e){e.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[s,t,o],this)},this),this.slider.parameters.dynamicHeight){var a=new NextendTimeline;this.slider.responsive.doResize(!1,a,s,.6),this.timeline.add(a)}if(this.isTouch)this.slider.callOnSlide(i,"onOutAnimationsPlayed");else{var l=e.Deferred();l.done(e.proxy(function(){this.play()},this.timeline)),this.preChangeToPlay(l,i,n)}},s.prototype.willRevertTo=function(t,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[t,i]),this.sliderElement.one("mainAnimationComplete",e.proxy(this.revertTo,this,t,i))},s.prototype.revertTo=function(e,t){this.slider.revertTo(e,t),this.slider.slides.eq(t).triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(t){this.sliderElement.one("mainAnimationComplete",e.proxy(this.cleanSlideIndex,this,t))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(e,t,i,s,n){},s.prototype.onChangeToStart=function(e,t,i){this.state="playing";var s=[this,e,t,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides.eq(e).trigger("mainAnimationStartOut",s),this.slider.slides.eq(t).trigger("mainAnimationStartIn",s)},s.prototype.onChangeToComplete=function(e,t,i){var s=[this,e,t,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides.eq(e).trigger("mainAnimationCompleteOut",s),this.slider.slides.eq(t).trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},s.prototype.onReverseChangeToComplete=function(e,t,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},t.NextendSmartSliderMainAnimationAbstract=s}(n2,window),function(e,t,i){function s(t,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=t,this.parameters=e.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,t.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(e.proxy(this.onReady,this))):this.disable(),t.controls.autoplay=this}var n=!1;s.prototype.onReady=function(){this.autoplayDeferred=e.Deferred();var t={_progress:0};this.timeline=NextendTween.to(t,this.getSlideDuration(this.slider.currentSlideIndex),{_progress:1,paused:!0,onComplete:e.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",e.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){n=!0,setTimeout(function(){n=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",e.proxy(function(e){this._paused?this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"):this.pauseAutoplayUniversal(e)},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",e.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",e.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":"0"==this.parameters.pause.mouse?i.on("mouseenter.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):i.on("mouseenter.autoplay",e.proxy(this.continueAutoplay,this));break;case"leave":"0"==this.parameters.pause.mouse?i.on("mouseleave.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):i.on("mouseleave.autoplay",e.proxy(this.continueAutoplay,this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",e.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",e.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",e.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",e.proxy(this.onMainAnimationComplete,this))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",e.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.prototype.onMainAnimationStart=function(t,i,s,n,r){this.mainAnimationDeferred=e.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},s.prototype.onMainAnimationComplete=function(e,t,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentSlideIndex+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},s.prototype.getSlideDuration=function(e){var t=this.slider.realSlides.eq(this.slider.getRealIndex(e)).data("slide"),i=t.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.prototype.continueAutoplay=function(t){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);i.push(this.deferredMouseEnter),i.push(this.mainAnimationDeferred),this.autoplayDeferred=e.Deferred(),this.autoplayDeferred.done(e.proxy(this._continueAutoplay,this)),e.when.apply(e,i).done(e.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve()},this))},s.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},s.prototype.pauseAutoplayUniversal=function(e){this.pauseAutoplayExtraPlaying(e,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){n||(this.autoplayDeferred.reject(),this.deferredMouseEnter=e.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=e.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(t,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=e.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsMediaPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[t].resolve(),delete this.deferredsMediaPlaying[t])},s.prototype.pauseAutoplayExtraPlaying=function(t,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=e.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsExtraPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[t].resolve(),delete this.deferredsExtraPlaying[t]),this.continueAutoplay()},s.prototype.deActivate=function(e,t){"pause"==t?this._paused||(this._paused=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==t&&(this._wait||(this._wait=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(e,!1)},s.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},s.prototype.startTimeout=function(e){this._paused||this._disabled||this.timeline.play(e)},s.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentSlideIndex+2)&&this.limitAutoplay(),
3
+ this.slider.nextCarousel(!0)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},t.NextendSmartSliderControlAutoplay=s}(n2,window),function(e,t,i){"use strict";function s(t,i,n){this.slider=t,this.parameters=e.extend({},n),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,e(document).on("keydown",e.proxy(this.onKeyDown,this)),t.controls.keyboard=this}s.prototype.isSliderOnScreen=function(){var t=this.slider.sliderElement.offset(),i=e(window).scrollTop(),s=this.slider.sliderElement.height();return t.top+.5*s>=i&&t.top-.5*s<=i+e(window).height()},s.prototype.onKeyDown=function(e){e.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(e=e||window.event,this.parseEvent.call(this,e)&&(e.preventDefault(),e.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},t.NextendSmartSliderControlKeyboard=s}(n2,window),function(e,t,i){"use strict";function s(t){this.preventScroll=!1,this.slider=t,t.sliderElement.on("DOMMouseScroll mousewheel",e.proxy(this.onMouseWheel,this)),t.controls.scroll=this}s.prototype.onMouseWheel=function(t){if(this.preventScroll)t.preventDefault();else{var i=!1;t.originalEvent&&(t.originalEvent.wheelDelta&&(i=t.originalEvent.wheelDelta/-1<0),t.originalEvent.deltaY&&(i=t.originalEvent.deltaY<0),t.originalEvent.detail&&(i=t.originalEvent.detail<0)),i?this.slider.previous()&&(this.preventScroll=!0,t.preventDefault()):this.slider.next()&&(this.preventScroll=!0,t.preventDefault()),setTimeout(e.proxy(function(){this.preventScroll=!1},this),1e3)}},t.NextendSmartSliderControlScroll=s}(n2,window),function(e,t,i){"use strict";function s(t,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=t,this.parameters=e.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",e.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",e.proxy(this.handleOrientation,this),!0),void(t.controls.tilt=this))}s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(t){null==this.timeout&&this.parseEvent.call(this,t)&&(this.timeout=setTimeout(e.proxy(this.clearTimeout,this),this.parameters.duration),t.preventDefault())},s.prototype.parseEventHorizontal=function(e){return e.gamma>10?(this.slider.next(),!0):e.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(e){return e.beta<-10?(this.slider.next(),!0):e.beta>10?(this.slider.previous(),!0):!1},t.NextendSmartSliderControlTilt=s}(n2,window),function(e,t,i){"use strict";function s(t,i,s){this.currentAnimation=null,this.slider=t,this._animation=t.mainAnimation,this.parameters=e.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> div").eq(0),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var n=e.proxy(function(){var e=this;N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(e,t){r=!1},move:function(t,i,s,n,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e._animation.setTouch(e._direction.axis),e.currentAnimation={direction:a,percent:0};var l=e.slider[e._direction[a]](!1);if(!l)return e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),e.currentAnimation.percent<1){var h=Math.max(-.99999,Math.min(.99999,d/e.slider.dimensions.slider[e._property]));e.currentAnimation.percent=h,e._animation.setTouchProgress(h)}if((r||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return r=!0,!0}return!1},end:function(t,i,s,n,r){if(null!==e.currentAnimation){var o=r?0:e.measureRealDirection(),a=e._animation.timeline.progress();1!=a&&e._animation.setTouchEnd(o,e.currentAnimation.percent,s.time),e.swipeElement.removeClass("n2-grabbing"),e._animation.setTouch(!1),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10&&e.onTap(t)}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",n):n()}else n();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",e.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),t.controls.touch=this}var n=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,r=!1,o=!1;s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(e){return!r&&Math.abs(e.x)<10||0==e.x||Math.abs(e.x)<Math.abs(e.y)?"unknown":e.x<0?"left":"right"},get:function(e,t){return"left"==t?-e.x:e.x}},n&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(e){return!r&&Math.abs(e.y)<1||0==e.y||Math.abs(e.y)<Math.abs(e.x)?"unknown":e.y<0?"up":"down"},get:function(e,t){return"up"==t?-e.y:e.y}},n&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(e){this.distance.length>3&&this.distance.shift(),this.distance.push(e)},s.prototype.measureRealDirection=function(){var e=this.distance[0],t=this.distance[this.distance.length-1];return t>=0&&e>t||0>t&&t>e?0:1},s.prototype.onTap=function(t){o||(e(t.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},t.NextendSmartSliderControlTouch=s}(n2,window),function(e,t,i){function s(e){return e.position()}function s(e){return{left:e.prop("offsetLeft"),top:e.prop("offsetTop")}}function n(t,i,s,n){"undefined"==typeof n&&(n=!1),this.isStaticSlide=n,this.status=o.NOT_INITIALIZED,this.slider=t,this.slider.isFirstSlide=!0,this.$slideElement=i,i.data("slide",this),t.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=i.data("slide-duration"),e.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0)),this.findLayers(),this.slider.parameters.admin&&i.is(this.slider.adminGetCurrentSlideElement())||this.initResponsiveMode(),this.status=o.INITIALIZED,this.playOnce=!this.slider.isAdmin&&this.slider.parameters.layerMode.playOnce}function r(e,t,i,s){this.layerAnimations=[],this.slide=e,e.$slideElement.off(".n2-ss-animations");for(var n=0;n<t.length;n++){var r=t.eq(n);this.layerAnimations.push(new SlideLayerAnimations(e,this,r,r.find(".n2-ss-layer-mask, .n2-ss-layer-parallax").addBack().last(),i,s))}}var o={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3},a=["left","top","width","height"];/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent),n.prototype.isActive=function(){return this.$slideElement.hasClass("n2-ss-slide-active")},n.prototype.findLayers=function(){this.$layers=this.$slideElement.find(".n2-ss-layer").each(e.proxy(function(t,i){for(var s=e(i),n=0;n<a.length;n++){var r=a[n];s.data("desktop"+r,parseFloat(i.style[r]))}var o=this.getLayerProperty(s,"parentid");"undefined"!=typeof o&&o?(o=e("#"+o),o.length>0&&s.data("parent",o)):s.data("parent",!1)},this)),this.$parallax=this.$layers.filter("[data-parallax]")},n.prototype.getLayerResponsiveProperty=function(e,t,i){var s=e.data(t+i);return"undefined"!=typeof s?s:"desktopportrait"!=t?e.data("desktopportrait"+i):0},n.prototype.getLayerProperty=function(e,t){return e.data(t)},n.prototype.initResponsiveMode=function(){this.slider.sliderElement.on("SliderDeviceOrientation",e.proxy(function(t,i){var s=i.device+i.orientation.toLowerCase();this.currentMode=s,this.$layers.each(e.proxy(function(t,i){var n=e(i),r=n.data(s);n.data("parent");"undefined"==typeof r||parseInt(r)?(this.getLayerProperty(n,"adaptivefont")?n.css("font-size",16*this.getLayerResponsiveProperty(n,this.currentMode,"fontsize")/100+"px"):n.css("font-size",this.getLayerResponsiveProperty(n,this.currentMode,"fontsize")+"%"),n.data("shows",1),n.css("display","block")):(n.data("shows",0),n.css("display","none"))},this))},this)).on("SliderResize",e.proxy(function(t,i,s){var n=s.responsiveDimensions;this.$layers.each(e.proxy(function(t,s){this.repositionLayer(e(s),i,n)},this))},this))},n.prototype.isDimensionPropertyAccepted=function(e){return!(!(e+"").match(/[0-9]+%/)&&"auto"!=e)},n.prototype.repositionLayer=function(e,t,i){var n=t.slideW,r=n,o=t.slideH,a=o;parseInt(this.getLayerProperty(e,"responsivesize"))||(r=a=1);var l=this.getLayerResponsiveProperty(e,this.currentMode,"width");e.css("width",this.isDimensionPropertyAccepted(l)?l:l*r+"px");var d=this.getLayerResponsiveProperty(e,this.currentMode,"height");e.css("height",this.isDimensionPropertyAccepted(d)?d:d*a+"px"),parseInt(this.getLayerProperty(e,"responsiveposition"))||(n=o=1);var h=this.getLayerResponsiveProperty(e,this.currentMode,"left")*n,p=this.getLayerResponsiveProperty(e,this.currentMode,"top")*o,c=this.getLayerResponsiveProperty(e,this.currentMode,"align"),m=this.getLayerResponsiveProperty(e,this.currentMode,"valign"),u={left:"auto",top:"auto",right:"auto",bottom:"auto"},f=this.getLayerProperty(e,"parent");if(f&&f.data("shows")){var y=s(f),g={left:0,top:0};switch(this.getLayerResponsiveProperty(e,this.currentMode,"parentalign")){case"right":g.left=y.left+f.width();break;case"center":g.left=y.left+f.width()/2;break;default:g.left=y.left}switch(c){case"right":u.right=e.parent().width()-g.left-h+"px";break;case"center":u.left=g.left+h-e.width()/2+"px";break;default:u.left=g.left+h+"px"}switch(this.getLayerResponsiveProperty(e,this.currentMode,"parentvalign")){case"bottom":g.top=y.top+f.height();break;case"middle":g.top=y.top+f.height()/2;break;default:g.top=y.top}switch(m){case"bottom":u.bottom=e.parent().height()-g.top-p+"px";break;case"middle":u.top=g.top+p-e.height()/2+"px";break;default:u.top=g.top+p+"px"}}else{switch(c){case"right":u.right=-h+"px";break;case"center":u.left=(this.isStaticSlide?e.parent().width():i.slide.width)/2+h-e.width()/2+"px";break;default:u.left=h+"px"}switch(m){case"bottom":u.bottom=-p+"px";break;case"middle":u.top=(this.isStaticSlide?e.parent().height():i.slide.height)/2+p-e.height()/2+"px";break;default:u.top=p+"px"}}e.css(u)},n.prototype.setZero=function(){this.$slideElement.trigger("layerSetZero",this)},n.prototype.setZeroAll=function(){this.$slideElement.trigger("layerSetZeroAll",this)},n.prototype.setStart=function(){this.status==o.INITIALIZED&&(this.$slideElement.trigger("layerAnimationSetStart"),this.status=o.READY_TO_START)},n.prototype.playIn=function(){this.status==o.READY_TO_START&&(this.status=o.PLAYING,this.$slideElement.trigger("layerAnimationPlayIn"))},n.prototype.playOut=function(){if(this.status==o.PLAYING){var t=[];this.$slideElement.triggerHandler("beforeMainSwitch",[t]),e.when.apply(e,t).done(e.proxy(function(){this.onOutAnimationsPlayed()},this))}else this.onOutAnimationsPlayed()},n.prototype.onOutAnimationsPlayed=function(){this.playOnce?this.status=o.ENDED:this.status=o.INITIALIZED,this.$slideElement.trigger("layerAnimationCompleteOut")},n.prototype.pause=function(){this.$slideElement.triggerHandler("layerPause")},n.prototype.reset=function(){this.$slideElement.triggerHandler("layerReset"),this.status=o.INITIALIZED},n.prototype.getTimeline=function(){return this.layers.getTimeline()},t.NextendSmartSliderSlide=n,r.prototype.refresh=function(e){for(var t=0;t<this.layerAnimations.length;t++)this.layerAnimations[t].refresh(e)},r.prototype.getTimeline=function(){for(var e=new NextendTimeline({paused:1}),t=0;t<this.layerAnimations.length;t++){var i=this.layerAnimations[t];e.add(i.linearTimeline,0),i.linearTimeline.paused(!1)}return e},t.NextendSmartSliderSlideLayers=r}(n2,window),function(e,t,i){function s(t,i){this.disableTransitions=!1,this.disableTransitionsTimeout=null,t.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),"undefined"==typeof nextend.fontsDeferred&&(this.triggerResize=this._triggerResize),this.fixedEditRatio=1,this.normalizeTimeout=null,this.delayedResizeAdded=!1,this.deviceMode=s.DeviceMode.UNKNOWN,this.orientationMode=s.OrientationMode.SCREEN,this.orientation=s.DeviceOrientation.UNKNOWN,this.lastRatios={ratio:-1},this.normalizedMode="unknownUnknown",t.responsive=this,this.widgetMargins={Top:[],Right:[],Bottom:[],Left:[]},this.staticSizes={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},this.enabledWidgetMargins=[],this.slider=t,this.sliderElement=t.sliderElement,this.alignElement=this.slider.sliderElement.closest(".n2-ss-align");var o=this.ready=e.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){o.resolve()}),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),this.parameters=e.extend({desktop:1,tablet:1,mobile:1,onResizeEnabled:!0,type:"auto",downscale:!0,upscale:!1,constrainRatio:!0,minimumHeight:0,maximumHeight:0,minimumHeightRatio:0,maximumHeightRatio:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},maximumSlideWidth:0,maximumSlideWidthLandscape:0,maximumSlideWidthRatio:-1,maximumSlideWidthTablet:0,maximumSlideWidthTabletLandscape:0,maximumSlideWidthMobile:0,maximumSlideWidthMobileLandscape:0,maximumSlideWidthConstrainHeight:0,forceFull:0,verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},normalizedDeviceModes:{unknownUnknown:["unknown","Unknown"],desktopPortrait:["desktop","Portrait"]},verticalRatioModifiers:{unknownUnknown:1,desktopLandscape:1,desktopPortrait:1,mobileLandscape:1,mobilePortrait:1,tabletLandscape:1,tabletPortrait:1},minimumFontSizes:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},ratioToDevice:{Portrait:{tablet:0,mobile:0},Landscape:{tablet:0,mobile:0}},sliderWidthToDevice:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},basedOn:"combined",desktopPortraitScreenWidth:1200,tabletPortraitScreenWidth:800,mobilePortraitScreenWidth:440,tabletLandscapeScreenWidth:1024,mobileLandscapeScreenWidth:740,orientationMode:"width_and_height",scrollFix:0,overflowHiddenPage:0},i),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&e("html, body").css("overflow","hidden"),"width"==this.parameters.orientationMode&&(this.orientationMode=s.OrientationMode.SCREEN_WIDTH_ONLY),nextend.smallestZoom=Math.min(Math.max(i.sliderWidthToDevice.mobilePortrait,120),380),this.parameters.basedOn){case"screen":break;default:if(null==n){var a=new MobileDetect(window.navigator.userAgent,801);n=!!a.tablet(),r=!!a.phone()}}if(!(this.slider.isAdmin||this.parameters.desktop&&this.parameters.tablet&&this.parameters.mobile)){if(null==n){var a=new MobileDetect(window.navigator.userAgent,801);n=!!a.tablet(),r=!!a.phone()}if(!this.parameters.mobile&&r||!this.parameters.tablet&&n||!this.parameters.desktop&&!n&&!r)return void this.slider.kill()}if(this.verticalOffsetSelectors=e(this.parameters.verticalOffsetSelectors),this.storeDefaults(),this.parameters.minimumHeight>0&&(this.parameters.minimumHeightRatio=this.parameters.minimumHeight/this.responsiveDimensions.startHeight),this.parameters.maximumHeight>0&&this.parameters.maximumHeight>=this.parameters.minimumHeight&&(this.parameters.maximumHeightRatio={desktopPortrait:this.parameters.maximumHeight/this.responsiveDimensions.startHeight},this.parameters.maximumHeightRatio.desktopLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletPortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobilePortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobileLandscape=this.parameters.maximumHeightRatio.desktopPortrait),this.parameters.maximumSlideWidth>0&&(this.parameters.maximumSlideWidthRatio={desktopPortrait:this.parameters.maximumSlideWidth/this.responsiveDimensions.startSlideWidth,desktopLandscape:this.parameters.maximumSlideWidthLandscape/this.responsiveDimensions.startSlideWidth,tabletPortrait:this.parameters.maximumSlideWidthTablet/this.responsiveDimensions.startSlideWidth,tabletLandscape:this.parameters.maximumSlideWidthTabletLandscape/this.responsiveDimensions.startSlideWidth,mobilePortrait:this.parameters.maximumSlideWidthMobile/this.responsiveDimensions.startSlideWidth,mobileLandscape:this.parameters.maximumSlideWidthMobileLandscape/this.responsiveDimensions.startSlideWidth},this.parameters.maximumSlideWidthConstrainHeight&&(this.parameters.maximumHeightRatio=this.parameters.maximumSlideWidthRatio)),"undefined"!=typeof nextend&&"undefined"!=typeof nextend.ssBeforeResponsive&&nextend.ssBeforeResponsive.call(this),this.onResize(),(this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)&&(e(window).on("resize",e.proxy(this.onResize,this)),this.sliderElement.on("SliderInternalResize",e.proxy(this.onResize,this)),this.parameters.scrollFix))try{var l=this;e('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>').on("load",function(t){e(t.target.contentWindow?t.target.contentWindow:t.target.contentDocument.defaultView).on("resize",function(){l.sliderElement.triggerHandler("SliderInternalResize")})}).insertBefore(this.containerElement)}catch(d){}}var n=null,r=null;s.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},s.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},s._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},s.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},s._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},s.prototype.getOuterWidth=function(){var e=this.responsiveDimensions;return e.startSliderWidth+e.startSliderMarginLeft+e.startSliderMarginRight},s.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!0)},this.responsiveElements=[],this.helperElements={},this.addResponsiveElements(),this.margins={top:this.responsiveDimensions.startSliderMarginTop,right:this.responsiveDimensions.startSliderMarginRight,bottom:this.responsiveDimensions.startSliderMarginBottom,left:this.responsiveDimensions.startSliderMarginLeft}},s.prototype.addResponsiveElements=function(){},s.prototype.addResponsiveElement=function(e,t,i,s){"undefined"!=typeof i&&i||(i="ratio");var n=new NextendSmartSliderResponsiveElement(this,i,e,t,s);return this.responsiveElements.push(n),n},s.prototype.addResponsiveElementBackgroundImage=function(e,t,i,s,n){"undefined"!=typeof s&&s||(s="ratio");var r=new NextendSmartSliderResponsiveElementBackgroundImage(this,t,s,e,i,n);return this.responsiveElements.push(r),r},s.prototype.addResponsiveElementAsSingle=function(e,t,i,s){for(var n=[],r=0;r<e.length;r++)n.push(this.addResponsiveElement(e.eq(r),t.slice(0),i,s));return n},s.prototype.addResponsiveElementBackgroundImageAsSingle=function(e,t,i,s,n){for(var r=[],o=0;o<e.length;o++)r.push(this.addResponsiveElementBackgroundImage(e.eq(o),t,i.slice(0),s,n));return r},s.prototype.resizeResponsiveElements=function(e,t,i){for(var s=0;s<this.responsiveElements.length;s++){var n=this.responsiveElements[s];"undefined"==typeof e[n.group]&&console.log("error with "+n.group),n.resize(this.responsiveDimensions,e[n.group],t,i)}},s.prototype.getDeviceMode=function(){return s._DeviceMode[this.deviceMode]},s.prototype.getDeviceModeOrientation=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.onResize=function(){"ended"==this.slider.mainAnimation.getState()?this.doResize():this.delayedResizeAdded||(this.delayedResizeAdded=!0,this.sliderElement.on("mainAnimationComplete.responsive",e.proxy(this._doDelayedResize,this)))},s.prototype._doDelayedResize=function(){this.doResize(),this.delayedResizeAdded=!1},s.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(e.proxy(this.doResize,this),10)},s.prototype._getOrientation=function(){return this.orientationMode==s.OrientationMode.SCREEN?window.innerHeight<=window.innerWidth?s.DeviceOrientation.LANDSCAPE:s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE?s.DeviceOrientation.LANDSCAPE:void 0},s.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(s.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},s.prototype._getDeviceScreenWidth=function(){var e=window.innerWidth;if(this.orientation==s.DeviceOrientation.PORTRAIT){if(e<this.parameters.mobilePortraitScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletPortraitScreenWidth)return s.DeviceMode.TABLET}else{if(e<this.parameters.mobileLandscapeScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletLandscapeScreenWidth)return s.DeviceMode.TABLET}return s.DeviceMode.DESKTOP},s.prototype._getDeviceAndOrientationByScreenWidth=function(){var e=window.innerWidth;return e<this.parameters.mobilePortraitScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.PORTRAIT]:e<this.parameters.mobileLandscapeScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.tabletPortraitScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.PORTRAIT]:e<this.parameters.tabletLandscapeScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.desktopPortraitScreenWidth?[s.DeviceMode.DESKTOP,s.DeviceOrientation.PORTRAIT]:[s.DeviceMode.DESKTOP,s.DeviceOrientation.LANDSCAPE]},s.prototype._getDeviceDevice=function(e){return r===!0?s.DeviceMode.MOBILE:n&&e!=s.DeviceMode.MOBILE?s.DeviceMode.TABLET:e},s.prototype._getDeviceZoom=function(e){var t;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?t=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(t=s.DeviceOrientation.LANDSCAPE);var i=s.DeviceMode.DESKTOP;return e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].mobile<.001?i=s.DeviceMode.MOBILE:e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].tablet<.001&&(i=s.DeviceMode.TABLET),i},s.prototype.reTriggerSliderDeviceOrientation=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:e[0],lastOrientation:e[1],device:e[0],orientation:e[1]})},s.prototype.doResize=function(t,i,n,r){if(this.disableTransitions||(this.disableTransitions=!0,this.sliderElement.addClass("n2notransition"),this.disableTransitionsTimeout&&clearTimeout(this.disableTransitionsTimeout),this.disableTransitionsTimeout=setTimeout(e.proxy(function(){this.sliderElement.removeClass("n2notransition"),this.disableTransitions=!1},this),500)),this.refreshMargin(),"center"==this.slider.parameters.align&&("fullpage"==this.parameters.type?this.alignElement.css("maxWidth","none"):this.alignElement.css("maxWidth",this.responsiveDimensions.startWidth)),!this.slider.isAdmin&&this.parameters.forceFull){e("body").css("overflow-x","hidden");var o=document.body.clientWidth||document.documentElement.clientWidth,a=this.containerElement.parent(),l=a.offset();nextend.isRTL&&(l.right=o-(l.left+a.outerWidth())),this.containerElement.css(nextend.rtl.marginLeft,-l[nextend.rtl.left]-parseInt(a.css("paddingLeft"))-parseInt(a.css("borderLeftWidth"))).width(o)}var d=this.containerElementPadding.width()/this.getOuterWidth(),h=!1,p=this.orientation,c=this.deviceMode,m=null,u=null;if(this.orientationMode==s.OrientationMode.SCREEN_WIDTH_ONLY){var f=this._getDeviceAndOrientationByScreenWidth();u=f[0],m=f[1]}else m=this._getOrientation();if(this.orientation!=m&&(this.orientation=m,h=!0,this.sliderElement.trigger("SliderOrientation",{lastOrientation:s._DeviceOrientation[p],orientation:s._DeviceOrientation[m]})),t||(this.orientationMode!=s.OrientationMode.SCREEN_WIDTH_ONLY&&(u=this._getDevice(d)),this.deviceMode!=u&&(this.deviceMode=u,this.sliderElement.removeClass("n2-ss-"+s._DeviceMode[c]).addClass("n2-ss-"+s._DeviceMode[u]),this.sliderElement.trigger("SliderDevice",{lastDevice:s._DeviceMode[c],device:s._DeviceMode[u]}),h=!0)),this.slider.isAdmin||"fullpage"==this.parameters.type&&(this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=((document.documentElement.clientHeight||document.body.clientHeight)-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight),h){var y=this._normalizeMode(s._DeviceMode[c],s._DeviceOrientation[p]),g=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);y[0]==g[0]&&y[1]==g[1]||(this.normalizedMode=g[0]+g[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:y[0],lastOrientation:y[1],device:g[0],orientation:g[1]}))}var v=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&v>d?d=v:!this.parameters.upscale&&d>v&&(d=v),this._doResize(d,i,n,r),"center"==this.slider.parameters.align&&this.alignElement.css("maxWidth",this.responsiveDimensions.slider.width)},s.prototype._normalizeMode=function(e,t){return this.parameters.normalizedDeviceModes[e+t]},s.prototype.getNormalizedModeString=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);return e.join("")},s.prototype.getModeString=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.isEnabled=function(e,t){return this.parameters.deviceModes[e+t]},s.prototype._doResize=function(e,t,i,s){var n={ratio:e,w:e,h:e,slideW:e,slideH:e,fontRatio:1};this._buildRatios(n,this.slider.parameters.dynamicHeight,i),n.fontRatio=n.slideW;var r=!1;for(var o in n)if(n[o]!=this.lastRatios[o]){r=!0;break}r&&(this.resizeResponsiveElements(n,t,s),this.lastRatios=n,t?(this.sliderElement.trigger("SliderAnimatedResize",[n,t,s]),t.eventCallback("onComplete",function(){this.triggerResize(n,t)},[],this)):this.triggerResize(n,t))},s.prototype.triggerResize=function(t,i){nextend.fontsDeferred.done(e.proxy(function(){this.triggerResize=this._triggerResize,this._triggerResize(t,i)},this))},s.prototype._triggerResize=function(e,t){this.sliderElement.trigger("SliderResize",[e,this,t])},s.prototype._buildRatios=function(e,t,i){var s=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideW=e.slideH=Math.min(e.slideW,e.slideH);var n=this.parameters.verticalRatioModifiers[s];if(e.slideH*=n,"fullpage"==this.parameters.type)this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),this.slider.isAdmin?(e.w=e.slideW,e.h=e.slideH):this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.slideW=e.w,e.slideH=e.h);else if(e.h*=n,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),e.slideH=Math.min(e.slideH,e.h),e.slideW=e.slideH/n,"showcase"==this.slider.type&&(e.slideW=Math.min(e.slideW,e.w),e.slideH=Math.min(e.slideW,e.slideH)),t){var r=this.slider.currentSlideIndex;"undefined"!=typeof i&&(r=i);var o=this.slider.backgroundImages.backgroundImages[r].responsiveElement.relativeRatio;-1!=o&&(e.slideH*=o,e.h*=o)}this.sliderElement.triggerHandler("responsiveBuildRatios",[e])},s.prototype.setOrientation=function(e){"portrait"==e?this.orientationMode=s.OrientationMode.ADMIN_PORTRAIT:"landscape"==e&&(this.orientationMode=s.OrientationMode.ADMIN_LANDSCAPE)},s.prototype.setMode=function(e){var t;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?t=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(t=s.DeviceOrientation.LANDSCAPE);var i=this.parameters.sliderWidthToDevice[e+s._DeviceOrientation[t]];i=nextend.smallestZoom+(this.parameters.sliderWidthToDevice.desktopPortrait-nextend.smallestZoom)/50*Math.floor((i-nextend.smallestZoom)/((this.parameters.sliderWidthToDevice.desktopPortrait-nextend.smallestZoom)/50)),this.setSize(i),this.containerElement.width()>i&&(i=this.parameters.sliderWidthToDevice[e+s._DeviceOrientation[t]]-(this.parameters.sliderWidthToDevice.desktopPortrait-nextend.smallestZoom)/50,this.setSize(i))},s.prototype.setSize=function(e){this.containerElement.width(e),this.doResize()},s.prototype.getCanvas=function(){return null},s.prototype.getVerticalOffsetHeight=function(){for(var e=0,t=0;t<this.verticalOffsetSelectors.length;t++)e+=this.verticalOffsetSelectors.eq(t).outerHeight();return e},s.prototype.addMargin=function(e,t){this.widgetMargins[e].push(t),t.isVisible()&&(this._addMarginSize(e,t.getSize()),this.enabledWidgetMargins.push(t)),this.doNormalizedResize()},s.prototype.addStaticMargin=function(e,t){this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[e].push(t),this.doNormalizedResize()},s.prototype.refreshMargin=function(){for(var t in this.widgetMargins)for(var i=this.widgetMargins[t],s=i.length-1;s>=0;s--){var n=i[s];if(n.isVisible())-1==e.inArray(n,this.enabledWidgetMargins)&&(this._addMarginSize(t,n.getSize()),this.enabledWidgetMargins.push(n));else{var r=e.inArray(n,this.enabledWidgetMargins);-1!=r&&(this._addMarginSize(t,-n.getSize()),this.enabledWidgetMargins.splice(r,1))}}this.refreshStaticSizes()},s.prototype.refreshStaticSizes=function(){if(this.widgetStaticMargins){var e={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};for(var t in this.widgetStaticMargins)for(var i=this.widgetStaticMargins[t],s=i.length-1;s>=0;s--){var n=i[s];n.isVisible()&&(e["padding"+t]+=n.getSize())}for(var r in e)this.containerElementPadding.css(e);this.staticSizes=e}},s.prototype._addMarginSize=function(e,t){var i=null;switch(e){case"Top":case"Bottom":i=this._sliderVertical;break;default:i=this._sliderHorizontal}i.data["margin"+e]+=t,this.responsiveDimensions["startSliderMargin"+e]+=t},t.NextendSmartSliderResponsive=s}(n2,window),function(e,t,i){function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(t,i,s,n,r){if(this.loadDefaults(),this._lastRatio=1,this.responsive=t,this.group=i,this.element=s,this.lazyload=this.responsive.slider.parameters.lazyload.enabled,
4
+ this._readyDeferred=e.Deferred(),"undefined"!=typeof r?this.name=r:this.name=null,this.tagName=s.prop("tagName"),this.data={},this.helper={parent:null,parentProps:null,fontSize:!1,centered:!1},this.customLoad)this.customLoad(n);else switch(this.tagName){case"IMG":var o=s.parent();this.helper.parentProps={width:o.width(),height:o.height()},this.lazyload?s.on("lazyloaded",e.proxy(this._lateInitIMG,this,n)):s.n2imagesLoaded(e.proxy(this._lateInitIMG,this,n));break;default:this._lateInit(n)}}function r(e,t,i,s,r,o){this.ratio=-1,this.relativeRatio=1,this.x=50,this.y=50,this.backgroundImage=t,n.prototype.constructor.call(this,e,i,s,r,o),t.addResponsiveElement(this)}n.prototype.loadDefaults=function(){this.customLoad=!1,this.lazyload=!1},n.prototype._lateInit=function(t){this._cssProperties=t,this.reloadDefault(),-1!=e.inArray("fontSize",t)&&(this.data.fontSize=this.element.data("fontsize"),this.helper.fontSize={fontSize:this.element.data("fontsize"),desktopPortrait:this.element.data("minfontsizedesktopportrait"),desktopLandscape:this.element.data("minfontsizedesktoplandscape"),tabletPortrait:this.element.data("minfontsizetabletportrait"),tabletLandscape:this.element.data("minfontsizetabletlandscape"),mobilePortrait:this.element.data("minfontsizemobileportrait"),mobileLandscape:this.element.data("minfontsizemobilelandscape")},this.responsive.sliderElement.on("SliderDeviceOrientation",e.proxy(this.onModeChange,this))),this.resize=this._resize,this._readyDeferred.resolve()},n.prototype.reloadDefault=function(){for(var e=0;e<this._cssProperties.length;e++){var t=this._cssProperties[e];this.data[t]=parseInt(this.element.css(t))}if(this.name){var i=this.responsive.responsiveDimensions;for(var n in this.data)i["start"+s(this.name)+s(n)]=this.data[n]}},n.prototype._lateInitIMG=function(t,i){var s=this.element.width(),n=this.element.height();n=parseInt(this.helper.parentProps.width/s*n),s=this.helper.parentProps.width;var r=e.inArray("width",t);-1!=r&&(t.splice(r,1),this.data.width=s);var o=e.inArray("height",t);-1!=o&&(t.splice(o,1),this.data.height=n),this._lateInit(t)},n.prototype.ready=function(e){this._readyDeferred.done(e)},n.prototype.resize=function(t,i){this.ready(e.proxy(this.resize,this,t,i)),this._lastRatio=i},n.prototype._resize=function(e,t,i,s){this.name&&"undefined"==typeof e[this.name]&&(e[this.name]={});var n={};for(var r in this.data){var o=this.data[r]*t;"function"==typeof this[r+"Prepare"]&&(o=this[r+"Prepare"](o)),this.name&&(e[this.name][r]=o),n[r]=o}i?i.to(this.element,s,n,0):(this.element.css(n),this.helper.centered&&(n2const.isIOS&&"IMG"==this.tagName&&(this.element.css({marginTop:1}),this.element.css(nextend.rtl.marginLeft,1)),this.element.css({marginTop:this.getVerticalMargin(parseInt((this.helper.parent.height()-this.element.height())/2))}),this.element.css(nextend.rtl.marginLeft,this.getHorizontalMargin(parseInt((this.helper.parent.width()-this.element.width())/2))))),this._lastRatio=t},n.prototype.getHorizontalMargin=function(e){return e},n.prototype.getVerticalMargin=function(e){return e},n.prototype._refreshResize=function(){this.responsive.ready.done(e.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.group])},this))},n.prototype.widthPrepare=function(e){return Math.round(e)},n.prototype.heightPrepare=function(e){return Math.round(e)},n.prototype.marginLeftPrepare=function(e){return parseInt(e)},n.prototype.marginRightPrepare=function(e){return parseInt(e)},n.prototype.lineHeightPrepare=function(e){return e+"px"},n.prototype.fontSizePrepare=function(e){var t=this.responsive.getNormalizedModeString();return e<this.helper.fontSize[t]?this.helper.fontSize[t]:e},n.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},n.prototype.unsetCentered=function(){this.helper.centered=!1},n.prototype.onModeChange=function(){this.setFontSizeByMode()},n.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},t.NextendSmartSliderResponsiveElement=n,r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.prototype.customLoad=function(t){var i=this.element.parent();this.helper.parentProps={width:i.width(),height:i.height()},this.backgroundImage.afterLoaded().done(e.proxy(function(){this._lateInitIMG(t)},this))},r.prototype._lateInitIMG=function(e,t){"fill"!=this.backgroundImage.mode&&"fit"!=this.backgroundImage.mode&&"simple"!=this.backgroundImage.mode||(this.refreshRatio(),this.responsive.slider.parameters.dynamicHeight||this.setCentered()),this._lateInit(e)},r.prototype.afterLoaded=function(){"fill"!=this.backgroundImage.mode&&"fit"!=this.backgroundImage.mode&&"simple"!=this.backgroundImage.mode||(this.refreshRatio(),this.responsive.slider.parameters.dynamicHeight||this.setCentered())},r.prototype._resize=function(e,t,i,s){if(this.responsive.slider.parameters.dynamicHeight)this.element.css({width:"100%",height:"100%"});else{var r=e.slideouter||e.slide,o=r.width/r.height;"fill"==this.backgroundImage.mode?o>this.ratio?this.element.css({width:"100%",height:"auto"}):this.element.css({width:"auto",height:"100%"}):"fit"==this.backgroundImage.mode&&(o<this.ratio?this.element.css({width:"100%",height:"auto"}):this.element.css({width:"auto",height:"100%"}))}n.prototype._resize.call(this,e,t,i,s)},r.prototype.refreshRatio=function(){var e=this.element.prop("naturalWidth"),t=this.element.prop("naturalHeight");this.ratio=e/t;var i=this.responsive.responsiveDimensions.startSlideWidth,s=this.responsive.responsiveDimensions.startSlideHeight;this.relativeRatio=i/s/this.ratio,this.x=parseInt(this.element.data("x")),isNaN(this.x)&&(this.x=50),this.y=parseInt(this.element.data("y")),isNaN(this.y)&&(this.y=50)},r.prototype.getHorizontalMargin=function(e){return e*(this.x/50)},r.prototype.getVerticalMargin=function(e){return e*(this.y/50)},t.NextendSmartSliderResponsiveElementBackgroundImage=r}(n2,window),function(e,t,i){function s(t,i,s,n,r){this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.parameters=e.extend({vimeourl:"//vimeo.com/144598279",center:0,autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},n),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!r||n2const.isMobile?this.ready(e.proxy(this.initVimeoPlayer,this)):e("#"+this.playerId).on("click.vimeo n2click.vimeo",e.proxy(function(t){e(t.currentTarget).off(".vimeo"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initVimeoPlayer()},this))},this))}s.vimeoDeferred=null,s.prototype.ready=function(t){null===s.vimeoDeferred&&(s.vimeoDeferred=e.getScript("https:"==window.location.protocol?"https://secure-a.vimeocdn.com/js/froogaloop2.min.js":"http://a.vimeocdn.com/js/froogaloop2.min.js")),s.vimeoDeferred.done(t)},s.prototype.initVimeoPlayer=function(){var t=n2('<iframe id="'+this.playerId+'_video" src="//player.vimeo.com/video/'+this.parameters.vimeocode+"?api=1&autoplay=0&player_id="+this.playerId+"_video&title="+this.parameters.title+"&byline="+this.parameters.byline+"&portrait="+this.parameters.portrait+"&color="+this.parameters.color+"&loop="+this.parameters.loop+'" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');e("#"+this.playerId).append(t),this.isStatic=t.closest(".n2-ss-static-slide").length,this.player=$f(t[0]),this.playerElement=e(this.player.element),this.player.addEvent("ready",e.proxy(this.onReady,this))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>=0&&this.setVolume(t),this.slideIndex=this.slider.findSlideIndexByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)));var i=this.playerElement.parent().parent();this.player.addEvent("play",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play")},this)),this.player.addEvent("pause",e.proxy(function(){i.triggerHandler("n2pause")})),this.player.addEvent("finish",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop")},this)),this.isStatic||this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&(parseInt(this.parameters.reset)?this.reset():this.pause())},this)),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=52,t=this.playerElement.parent(),i=t.width()+e,s=t.height()+e,n=16/9,r={width:i,height:s,marginTop:0};r[nextend.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?this.play():(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s==this.slideIndex&&this.play()},this)),this.slider.currentSlideIndex==this.slideIndex&&this.play())},s.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.api("play")},s.prototype.pause=function(){this.player.api("pause")},s.prototype.reset=function(){this.player.api("seekTo",0)},s.prototype.setVolume=function(e){this.player.api("setVolume",e)},t.NextendSmartSliderVimeoItem=s}(n2,window),function(e,t,i){function s(t,i,s,n){this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.parameters=e.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",theme:"dark",related:"1",vq:"default",volume:"-1",loop:0,reset:0,query:[]},s),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!n||n2const.isMobile?this.ready(e.proxy(this.initYoutubePlayer,this)):e("#"+this.playerId).on("click.youtube n2click.youtube",e.proxy(function(t){e(t.currentTarget).off(".youtube"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initYoutubePlayer()},this))},this))}s.YTDeferred=null,s.prototype.ready=function(t){if(null===s.YTDeferred)if(s.YTDeferred=e.Deferred(),"undefined"==typeof YT){var i=function(){};"function"==typeof window.onYouTubeIframeAPIReady&&(i=window.onYouTubeIframeAPIReady),window.onYouTubeIframeAPIReady=function(){s.YTDeferred.resolve(),i()},e.getScript("https://www.youtube.com/iframe_api")}else if(YT.loaded)s.YTDeferred.resolve();else var n=setInterval(function(){YT.loaded&&(s.YTDeferred.resolve(),clearInterval(n))},200);s.YTDeferred.done(t)},s.prototype.initYoutubePlayer=function(){var t=e("#"+this.playerId),i=t.closest(".n2-ss-layer");this.isStatic=t.closest(".n2-ss-static-slide").length;var s={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,theme:this.parameters.theme,modestbranding:1,wmode:"opaque",rel:this.parameters.related,vq:this.parameters.vq,start:this.parameters.start};1==this.parameters.center&&(s.controls=0,s.showinfo=0),1!=this.parameters.controls&&(s.autohide=1,s.controls=0,s.showinfo=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(s.html5=1);for(var n in this.parameters.query)this.parameters.query.hasOwnProperty(n)&&(s[n]=this.parameters.query[n]);this.player=new YT.Player(this.playerId,{videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:s,events:{onReady:e.proxy(this.onReady,this),onStateChange:e.proxy(function(e){switch(e.data){case YT.PlayerState.PLAYING:this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:i.triggerHandler("n2pause");break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(0),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"))}},this)}}),this.playerElement=e("#"+this.playerId),this.slideIndex=this.slider.findSlideIndexByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)))},s.prototype.onReady=function(t){var i=parseFloat(this.parameters.volume);i>=0&&this.setVolume(i),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&this.pause()},this)),this.parameters.reset&&this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s!=this.slideIndex&&0!=this.player.getCurrentTime()&&(this.player.pauseVideo(),this.player.seekTo(0))},this))),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=100,t=this.playerElement.parent(),i=t.width(),s=t.height()+e,n=16/9,r={width:i,height:s,marginTop:0};r[nextend.rtl.marginLeft]=0,i/s>n?(r.height=i*n,r.marginTop=(s-r.height)/2):(r.width=s*n,r[nextend.rtl.marginLeft]=(i-r.width)/2),this.playerElement.css(r)},s.prototype.initAutoplay=function(){this.isStatic?this.play():(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(e,t,i,s,n){s==this.slideIndex&&this.play()},this)),this.slider.currentSlideIndex==this.slideIndex&&this.play())},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},s.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},s.prototype.stop=function(){this.player.stopVideo()},s.prototype.isStopped=function(){var e=this.player.getPlayerState();switch(e){case-1:case 0:case 2:case 5:return!0;default:return!1}},s.prototype.setVolume=function(e){this.player.setVolume(100*e)},t.NextendSmartSliderYouTubeItem=s}(n2,window);
library/media/images/fillmode/center.png ADDED
Binary file
library/media/images/fillmode/default.png ADDED
Binary file
library/media/images/fillmode/fill.png ADDED
Binary file
library/media/images/fillmode/fit.png ADDED
Binary file
library/media/images/fillmode/stretch.png ADDED
Binary file
library/media/images/fillmode/tile.png ADDED
Binary file
library/media/images/play.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <circle cx="24" cy="24" r="24" fill="#000" opacity=".6"/>
4
+ <path fill="#FFF" d="M19.8 32c-.124 0-.247-.028-.36-.08-.264-.116-.436-.375-.44-.664V16.744c.005-.29.176-.55.44-.666.273-.126.592-.1.84.07l10.4 7.257c.2.132.32.355.32.595s-.12.463-.32.595l-10.4 7.256c-.14.1-.31.15-.48.15z"/>
5
+ </g>
6
+ </svg>
library/media/images/thumbnail-types/videoDark.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <circle cx="24" cy="24" r="24" fill="#000" opacity=".6"/>
4
+ <path fill="#FFF" d="M19.8 32c-.124 0-.247-.028-.36-.08-.264-.116-.436-.375-.44-.664V16.744c.005-.29.176-.55.44-.666.273-.126.592-.1.84.07l10.4 7.257c.2.132.32.355.32.595s-.12.463-.32.595l-10.4 7.256c-.14.1-.31.15-.48.15z"/>
5
+ </g>
6
+ </svg>
library/media/less/backgroundanimation.n2less ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (~'div@{id}') {
2
+
3
+ .n2-ss-background-animation {
4
+ position: absolute;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ z-index: 3;
10
+
11
+ img {
12
+ max-width: none;
13
+ }
14
+
15
+ .n2-3d-side {
16
+ position: absolute;
17
+ left: 0;
18
+ top: 0;
19
+ overflow: hidden;
20
+ background: #333;
21
+ outline: 1px solid rgba(0, 0, 0, 0);
22
+ }
23
+
24
+ .n2-ff-3d,
25
+ .tile {
26
+ outline: 1px solid rgba(0, 0, 0, 0);
27
+ }
28
+ }
29
+
30
+ }
library/media/less/clear.n2less ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (~'div@{id}') {
2
+
3
+ z-index: 3;
4
+ margin: @margin;
5
+ position: relative;
6
+ text-align: left;
7
+
8
+ [dir="rtl"] & {
9
+ text-align: right;
10
+ }
11
+
12
+ [dir="rtl"] & .n2-ss-slide-background {
13
+ text-align: left;
14
+ }
15
+
16
+ * {
17
+ font-size: inherit;
18
+ line-height: inherit;
19
+ }
20
+
21
+ *,
22
+ *:before,
23
+ *:after {
24
+ -moz-box-sizing: content-box;
25
+ box-sizing: content-box;
26
+ }
27
+
28
+ &.n2-ss-load-fade {
29
+ position: absolute;
30
+ opacity: 0;
31
+ -webkit-transition: opacity 0.3s ease-in-out;
32
+ -moz-transition: opacity 0.3s ease-in-out;
33
+ transition: opacity 0.3s ease-in-out;
34
+
35
+ &.n2-ss-loaded {
36
+ opacity: 1;
37
+ position: relative;
38
+ }
39
+ }
40
+
41
+ .unselectable {
42
+ -moz-user-select: -moz-none;
43
+ -khtml-user-select: none;
44
+ -webkit-user-select: none;
45
+
46
+ /*
47
+ Introduced in IE 10.
48
+ See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
49
+ */
50
+ -ms-user-select: none;
51
+ user-select: none;
52
+ }
53
+
54
+ &.n2notransition * {
55
+ -webkit-transition: none !important;
56
+ -moz-transition: none !important;
57
+ -o-transition: none !important;
58
+ transition: none !important;
59
+ }
60
+
61
+ a {
62
+ border: 0;
63
+ }
64
+
65
+ a,
66
+ a:focus {
67
+ outline: none !important;
68
+ transition: none 0s;
69
+ }
70
+
71
+ h1,
72
+ h2,
73
+ h3,
74
+ h4,
75
+ h5,
76
+ h6,
77
+ p {
78
+ margin: 0;
79
+ padding-left: 0;
80
+ padding-right: 0;
81
+ height: auto;
82
+ width: auto;
83
+ border: 0;
84
+ box-shadow: none;
85
+ }
86
+
87
+ img {
88
+ box-shadow: none;
89
+ -webkit-border-radius: 0;
90
+ -moz-border-radius: 0;
91
+ border-radius: 0;
92
+ background: transparent;
93
+ background: none;
94
+ padding: 0;
95
+ margin: 0;
96
+ border: 0;
97
+ vertical-align: top;
98
+ }
99
+
100
+ ul, li, img, a, p, ol, textarea, input, button {
101
+ -moz-transition: none 0s;
102
+ -webkit-transition: none 0s;
103
+ -o-transition: none 0s;
104
+ transition: none 0s;
105
+ }
106
+
107
+ .n2-ss-slide,
108
+ .n2-ss-canvas {
109
+ position: relative;
110
+ }
111
+
112
+ .n2-ss-slide,
113
+ .n2-ss-canvas {
114
+ overflow: hidden !important;
115
+ }
116
+
117
+ .n2-ss-slide-background,
118
+ .n2-ss-slide-background > div {
119
+ position: absolute;
120
+ top: 0;
121
+ left: 0;
122
+ width: 100%;
123
+ height: 100%;
124
+ }
125
+
126
+ .n2-ss-slide .n2-ss-slide-background img {
127
+ max-width: none;
128
+ }
129
+
130
+ .n2-ss-slide-fill {
131
+
132
+ }
133
+
134
+ .n2-ss-slide-fit {
135
+
136
+ }
137
+
138
+ .n2-ss-slide-simple {
139
+ width: 100% !important;
140
+ height: 100% !important;
141
+ }
142
+
143
+ .n2-ss-slide-stretch {
144
+ width: 100%;
145
+ height: 100%;
146
+ }
147
+
148
+ .n2-ss-slide-center {
149
+ background-repeat: no-repeat;
150
+ background-position: 50% 50%;
151
+ }
152
+
153
+ .n2-ss-slide-tile {
154
+ background-repeat: repeat;
155
+ background-position: 50% 50%;
156
+ }
157
+
158
+ .n2-ss-slide-fixed {
159
+ background-size: cover;
160
+ background-position: 50% 50%;
161
+ }
162
+
163
+ .n2-ss-slide-background-video {
164
+ position: absolute;
165
+ top: 0;
166
+ left: 0;
167
+ visibility: hidden;
168
+ }
169
+
170
+ .n2-ss-slide-background-video.n2-active {
171
+ visibility: visible;
172
+ }
173
+
174
+ .n2-ss-layers-container {
175
+ visibility: hidden;
176
+ position: relative;
177
+ width: 100%;
178
+ height: 100%;
179
+ }
180
+
181
+ [onclick].n2-ss-layers-container {
182
+ visibility: visible;
183
+ }
184
+
185
+ .ssPerspective() when (@hasPerspective = 1) {
186
+ .n2-ss-layers-container {
187
+ -webkit-perspective: @perspective;
188
+ perspective: @perspective;
189
+ }
190
+ }
191
+ .ssPerspective();
192
+
193
+ .n2-ss-layers-container > * {
194
+ visibility: visible;
195
+ }
196
+
197
+ .n2-ss-layer {
198
+ position: absolute;
199
+ outline: 1px solid RGBA(0, 0, 0, 0);
200
+ }
201
+
202
+ .n2-ss-layer-parallax,
203
+ .n2-ss-layer-mask {
204
+ width: 100%;
205
+ height: 100%;
206
+ }
207
+
208
+ &.n2-ss-mobile .n2-ss-slider-1,
209
+ &.n2-ss-tablet .n2-ss-slider-1 {
210
+ background-attachment: scroll !important;
211
+ }
212
+
213
+ .n2-ss-widget {
214
+ display: none;
215
+ -webkit-backface-visibility: hidden;
216
+ -webkit-perspective: 1;
217
+ z-index: 12;
218
+ font-size: 16px;
219
+ -webkit-transition: opacity 0.4s ease;
220
+ -moz-transition: opacity 0.4s ease;
221
+ -o-transition: opacity 0.4s ease;
222
+ transition: opacity 0.4s ease;
223
+ opacity: 1;
224
+ }
225
+
226
+ .n2-ss-widget.n2-ss-widget-hidden {
227
+ opacity: 0 !important;
228
+ }
229
+
230
+ &.n2-ss-tablet .n2-ss-widget {
231
+ font-size: 14px;
232
+ }
233
+
234
+ &.n2-ss-mobile .n2-ss-widget {
235
+ font-size: 12px;
236
+ }
237
+
238
+ .n2-ss-tablet,
239
+ .n2-ss-mobile,
240
+ &.n2-ss-tablet .n2-ss-desktop,
241
+ &.n2-ss-mobile .n2-ss-desktop {
242
+ display: none;
243
+ }
244
+
245
+ .n2-ss-desktop,
246
+ &.n2-ss-desktop .n2-ss-desktop,
247
+ &.n2-ss-tablet .n2-ss-tablet,
248
+ &.n2-ss-mobile .n2-ss-mobile {
249
+ display: block;
250
+ }
251
+
252
+ &.n2-ss-desktop .n2-ss-widget-display-desktop,
253
+ &.n2-ss-tablet .n2-ss-widget-display-tablet,
254
+ &.n2-ss-mobile .n2-ss-widget-display-mobile {
255
+ display: block;
256
+ }
257
+
258
+ .n2-ss-desktop.n2-ib,
259
+ &.n2-ss-desktop .n2-ss-desktop.n2-ib,
260
+ &.n2-ss-tablet .n2-ss-tablet.n2-ib,
261
+ &.n2-ss-mobile .n2-ss-mobile.n2-ib {
262
+ display: inline-block;
263
+ }
264
+
265
+ &.n2-ss-desktop .n2-ss-widget-display-desktop.n2-ib,
266
+ &.n2-ss-tablet .n2-ss-widget-display-tablet.n2-ib,
267
+ &.n2-ss-mobile .n2-ss-widget-display-mobile.n2-ib {
268
+ display: inline-block;
269
+ }
270
+
271
+ .n2-ss-widget-always {
272
+ -webkit-transform: translate3d(0, 0, 0);
273
+ }
274
+
275
+ & .n2-ss-widget-display-hover {
276
+ opacity: 0;
277
+ -webkit-transition: opacity 0.4s ease;
278
+ -moz-transition: opacity 0.4s ease;
279
+ -o-transition: opacity 0.4s ease;
280
+ transition: opacity 0.4s ease;
281
+ }
282
+
283
+ &.n2-hover .n2-ss-widget-display-hover {
284
+ opacity: 1;
285
+ }
286
+
287
+ .n2-ss-static-slide {
288
+ position: absolute;
289
+ top: 0;
290
+ left: 0;
291
+ width: 100%;
292
+ height: 100%;
293
+ z-index: 11;
294
+ visibility: hidden;
295
+ display: block;
296
+ -webkit-backface-visibility: hidden;
297
+ }
298
+
299
+ .n2-ss-static-slide .n2-ss-layer,
300
+ .n2-ss-static-slide > div {
301
+ visibility: visible;
302
+ }
303
+
304
+ .n2-ss-slide .nextend-slide-bg {
305
+ position: absolute;
306
+ top: 0;
307
+ left: 0;
308
+ width: 100%;
309
+ max-width: none !important;
310
+ height: auto;
311
+ background: rgba(0, 0, 0, 0.002);
312
+ }
313
+
314
+ video {
315
+ max-width: none;
316
+ }
317
+
318
+ iframe {
319
+ max-width: none;
320
+ }
321
+
322
+ .n2-ss-item-iframe {
323
+ height: 100%;
324
+ }
325
+
326
+ .n2-grab {
327
+ cursor: url(../cursor/openhand.cur), move;
328
+ cursor: -webkit-grab;
329
+ cursor: -moz-grab;
330
+ cursor: grab;
331
+ }
332
+
333
+ .n2-grabbing {
334
+ cursor: url(../cursor/closedhand.cur), move;
335
+ cursor: -webkit-grabbing;
336
+ cursor: -moz-grabbing;
337
+ cursor: grabbing;
338
+ }
339
+
340
+ .n2-video-play {
341
+ width: 48px;
342
+ height: 48px;
343
+ margin-left: -24px;
344
+ margin-top: -24px;
345
+ position: absolute;
346
+ left: 50%;
347
+ top: 50%;
348
+ }
349
+
350
+ form {
351
+ margin: 0;
352
+ border: 0;
353
+ padding: 0;
354
+ }
355
+
356
+ .n2-fake-input,
357
+ input.n2-ow {
358
+ height: auto;
359
+ width: auto;
360
+ -webkit-box-sizing: border-box;
361
+ -moz-box-sizing: border-box;
362
+ box-sizing: border-box;
363
+ margin: 0;
364
+ border: 0;
365
+ padding: 0;
366
+ display: inline-block;
367
+ vertical-align: middle;
368
+ white-space: normal;
369
+ background: none;
370
+ line-height: 1;
371
+
372
+ /* Browsers have different default form fonts */
373
+ font-size: 13px;
374
+ font-family: Arial;
375
+ box-shadow: none;
376
+ }
377
+
378
+ input.n2-ow:focus {
379
+ outline: 0;
380
+ }
381
+
382
+ .n2-fake-input,
383
+ input.n2-ow[placeholder] {
384
+ overflow: hidden;
385
+ text-overflow: clip;
386
+ }
387
+ ::-moz-placeholder {
388
+ text-overflow: clip;
389
+ color: inherit;
390
+ }
391
+ /* firefox 19+ */
392
+ input:-moz-placeholder {
393
+ text-overflow: clip;
394
+ color: inherit;
395
+ }
396
+
397
+ table {
398
+ table-layout: auto;
399
+ margin: 0;
400
+ }
401
+
402
+ .n2-ss-thumbnail-type {
403
+ width: 48px;
404
+ height: 48px;
405
+ margin-left: -24px;
406
+ margin-top: -24px;
407
+ position: absolute;
408
+ left: 50%;
409
+ top: 50%;
410
+ }
411
+
412
+ .n2-ss-icon-normal {
413
+ display: inline-block;
414
+ }
415
+
416
+ .n2-ss-icon-hover,
417
+ .n2-ss-icon-has-hover:HOVER .n2-ss-icon-normal {
418
+ display: none;
419
+ }
420
+
421
+ .n2-ss-icon-has-hover:HOVER .n2-ss-icon-hover {
422
+ display: inline-block;
423
+ }
424
+
425
+ }
426
+
427
+ .clear {
428
+ clear: both;
429
+ }
430
+
431
+ .n2-in-fullscreen *{
432
+ -webkit-animation-name: initial;
433
+ animation-name: initial;
434
+ }
435
+ .n2-in-fullscreen [data-uk-scrollspy*='uk-animation-']:not([data-uk-scrollspy*='target']){
436
+ opacity: 1;
437
+ }
library/media/less/clearv2.n2less ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ a.n2-ow {
2
+ border: 0;
3
+ }
4
+
5
+ a.n2-ow,
6
+ a.n2-ow :focus {
7
+ outline: none !important;
8
+ transition: none 0s;
9
+ }
10
+
11
+ h1.n2-ow,
12
+ h2.n2-ow,
13
+ h3.n2-ow,
14
+ h4.n2-ow,
15
+ h5.n2-ow,
16
+ h6.n2-ow,
17
+ p.n2-ow {
18
+ margin: 0;
19
+ padding-left: 0;
20
+ padding-right: 0;
21
+ height: auto;
22
+ width: auto;
23
+ border: 0;
24
+ box-shadow: none;
25
+ }
26
+
27
+ img.n2-ow {
28
+ box-shadow: none;
29
+ -webkit-border-radius: 0;
30
+ -moz-border-radius: 0;
31
+ border-radius: 0;
32
+ background: transparent;
33
+ background: none;
34
+ padding: 0;
35
+ margin: 0;
36
+ border: 0;
37
+ vertical-align: top;
38
+ }
39
+
40
+ form.n2-ow {
41
+ margin: 0;
42
+ border: 0;
43
+ padding: 0;
44
+ }
45
+
46
+ .n2-fake-input.n2-ow,
47
+ input.n2-ow {
48
+ height: auto;
49
+ width: auto;
50
+ -webkit-box-sizing: border-box;
51
+ -moz-box-sizing: border-box;
52
+ box-sizing: border-box;
53
+ margin: 0;
54
+ border: 0;
55
+ padding: 0;
56
+ display: inline-block;
57
+ vertical-align: middle;
58
+ white-space: normal;
59
+ background: none;
60
+ line-height: 1;
61
+
62
+ /* Browsers have different default form fonts */
63
+ font-size: 13px;
64
+ font-family: Arial;
65
+ box-shadow: none;
66
+ }
67
+
68
+ input.n2-ow:focus {
69
+ outline: 0;
70
+ }
71
+
72
+ .n2-fake-input.n2-ow,
73
+ input.n2-ow[placeholder] {
74
+ overflow: hidden;
75
+ text-overflow: clip;
76
+ }
77
+
78
+ .n2-ow::-moz-placeholder {
79
+ text-overflow: clip;
80
+ color: inherit;
81
+ }
82
+
83
+ /* firefox 19+ */
84
+ input.n2-ow:-moz-placeholder {
85
+ text-overflow: clip;
86
+ color: inherit;
87
+ }
88
+
89
+ table.n2-ow {
90
+ table-layout: auto;
91
+ margin: 0;
92
+ }
93
+
94
+ video.n2-ow {
95
+ max-width: none;
96
+ }
97
+
98
+ iframe.n2-ow {
99
+ max-width: none;
100
+ }
101
+
102
+ (~'div@{id}') {
103
+
104
+ z-index: 3;
105
+ margin: @margin;
106
+ position: relative;
107
+ text-align: left;
108
+
109
+ [dir="rtl"] & {
110
+ text-align: right;
111
+ }
112
+
113
+ * {
114
+ font-size: inherit;
115
+ line-height: inherit;
116
+ }
117
+
118
+ *,
119
+ *:before,
120
+ *:after {
121
+ -moz-box-sizing: content-box;
122
+ box-sizing: content-box;
123
+ }
124
+
125
+ &.n2-ss-load-fade {
126
+ position: absolute;
127
+ opacity: 0;
128
+ -webkit-transition: opacity 0.3s ease-in-out;
129
+ -moz-transition: opacity 0.3s ease-in-out;
130
+ transition: opacity 0.3s ease-in-out;
131
+
132
+ &.n2-ss-loaded {
133
+ opacity: 1;
134
+ position: relative;
135
+ }
136
+ }
137
+
138
+ .unselectable {
139
+ -moz-user-select: -moz-none;
140
+ -khtml-user-select: none;
141
+ -webkit-user-select: none;
142
+
143
+ /*
144
+ Introduced in IE 10.
145
+ See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
146
+ */
147
+ -ms-user-select: none;
148
+ user-select: none;
149
+ }
150
+
151
+ &.n2notransition * {
152
+ -webkit-transition: none !important;
153
+ -moz-transition: none !important;
154
+ -o-transition: none !important;
155
+ transition: none !important;
156
+ }
157
+
158
+ ul, li, img, a, p, ol, textarea, input, button {
159
+ -moz-transition: none 0s;
160
+ -webkit-transition: none 0s;
161
+ -o-transition: none 0s;
162
+ transition: none 0s;
163
+ }
164
+
165
+ .n2-ss-slide,
166
+ .n2-ss-canvas {
167
+ position: relative;
168
+ }
169
+
170
+ .n2-ss-slide,
171
+ .n2-ss-canvas {
172
+ overflow: hidden !important;
173
+ }
174
+
175
+ .n2-ss-slide-background,
176
+ .n2-ss-slide-background > div {
177
+ position: absolute;
178
+ top: 0;
179
+ left: 0;
180
+ width: 100%;
181
+ height: 100%;
182
+ }
183
+
184
+ .n2-ss-slide .n2-ss-slide-background img {
185
+ max-width: none;
186
+ }
187
+
188
+ .n2-ss-slide-fill {
189
+
190
+ }
191
+
192
+ .n2-ss-slide-fit {
193
+
194
+ }
195
+
196
+ .n2-ss-slide-simple {
197
+ width: 100% !important;
198
+ height: 100% !important;
199
+ }
200
+
201
+ .n2-ss-slide-stretch {
202
+ width: 100%;
203
+ height: 100%;
204
+ }
205
+
206
+ .n2-ss-slide-center {
207
+ background-repeat: no-repeat;
208
+ background-position: 50% 50%;
209
+ }
210
+
211
+ .n2-ss-slide-tile {
212
+ background-repeat: repeat;
213
+ background-position: 50% 50%;
214
+ }
215
+
216
+ .n2-ss-slide-fixed {
217
+ background-size: cover;
218
+ background-position: 50% 50%;
219
+ }
220
+
221
+ .n2-ss-slide-background-video {
222
+ position: absolute;
223
+ top: 0;
224
+ left: 0;
225
+ visibility: hidden;
226
+ }
227
+
228
+ .n2-ss-slide-background-video.n2-active {
229
+ visibility: visible;
230
+ }
231
+
232
+ .n2-ss-layers-container {
233
+ visibility: hidden;
234
+ position: relative;
235
+ width: 100%;
236
+ height: 100%;
237
+ }
238
+
239
+ [onclick].n2-ss-layers-container {
240
+ visibility: visible;
241
+ }
242
+
243
+ .ssPerspective() when (@hasPerspective = 1) {
244
+ .n2-ss-layers-container {
245
+ -webkit-perspective: @perspective;
246
+ perspective: @perspective;
247
+ }
248
+ }
249
+ .ssPerspective();
250
+
251
+ .n2-ss-layers-container > * {
252
+ visibility: visible;
253
+ }
254
+
255
+ .n2-ss-layer {
256
+ position: absolute;
257
+ outline: 1px solid RGBA(0, 0, 0, 0);
258
+ }
259
+
260
+ .n2-ss-layer-parallax,
261
+ .n2-ss-layer-mask {
262
+ width: 100%;
263
+ height: 100%;
264
+ }
265
+
266
+ &.n2-ss-mobile .n2-ss-slider-1,
267
+ &.n2-ss-tablet .n2-ss-slider-1 {
268
+ background-attachment: scroll !important;
269
+ }
270
+
271
+ .n2-ss-widget {
272
+ display: none;
273
+ -webkit-backface-visibility: hidden;
274
+ -webkit-perspective: 1;
275
+ z-index: 12;
276
+ font-size: 16px;
277
+ -webkit-transition: opacity 0.4s ease;
278
+ -moz-transition: opacity 0.4s ease;
279
+ -o-transition: opacity 0.4s ease;
280
+ transition: opacity 0.4s ease;
281
+ opacity: 1;
282
+ }
283
+
284
+ .n2-ss-widget.n2-ss-widget-hidden {
285
+ opacity: 0 !important;
286
+ }
287
+
288
+ &.n2-ss-tablet .n2-ss-widget {
289
+ font-size: 14px;
290
+ }
291
+
292
+ &.n2-ss-mobile .n2-ss-widget {
293
+ font-size: 12px;
294
+ }
295
+
296
+ .n2-ss-tablet,
297
+ .n2-ss-mobile,
298
+ &.n2-ss-tablet .n2-ss-desktop,
299
+ &.n2-ss-mobile .n2-ss-desktop {
300
+ display: none;
301
+ }
302
+
303
+ .n2-ss-desktop,
304
+ &.n2-ss-desktop .n2-ss-desktop,
305
+ &.n2-ss-tablet .n2-ss-tablet,
306
+ &.n2-ss-mobile .n2-ss-mobile {
307
+ display: block;
308
+ }
309
+
310
+ &.n2-ss-desktop .n2-ss-widget-display-desktop,
311
+ &.n2-ss-tablet .n2-ss-widget-display-tablet,
312
+ &.n2-ss-mobile .n2-ss-widget-display-mobile {
313
+ display: block;
314
+ }
315
+
316
+ .n2-ss-desktop.n2-ib,
317
+ &.n2-ss-desktop .n2-ss-desktop.n2-ib,
318
+ &.n2-ss-tablet .n2-ss-tablet.n2-ib,
319
+ &.n2-ss-mobile .n2-ss-mobile.n2-ib {
320
+ display: inline-block;
321
+ }
322
+
323
+ &.n2-ss-desktop .n2-ss-widget-display-desktop.n2-ib,
324
+ &.n2-ss-tablet .n2-ss-widget-display-tablet.n2-ib,
325
+ &.n2-ss-mobile .n2-ss-widget-display-mobile.n2-ib {
326
+ display: inline-block;
327
+ }
328
+
329
+ .n2-ss-widget-always {
330
+ -webkit-transform: translate3d(0, 0, 0);
331
+ }
332
+
333
+ & .n2-ss-widget-display-hover {
334
+ opacity: 0;
335
+ -webkit-transition: opacity 0.4s ease;
336
+ -moz-transition: opacity 0.4s ease;
337
+ -o-transition: opacity 0.4s ease;
338
+ transition: opacity 0.4s ease;
339
+ }
340
+
341
+ &.n2-hover .n2-ss-widget-display-hover {
342
+ opacity: 1;
343
+ }
344
+
345
+ .n2-ss-static-slide {
346
+ position: absolute;
347
+ top: 0;
348
+ left: 0;
349
+ width: 100%;
350
+ height: 100%;
351
+ z-index: 11;
352
+ visibility: hidden;
353
+ display: block;
354
+ -webkit-backface-visibility: hidden;
355
+ }
356
+
357
+ .n2-ss-static-slide .n2-ss-layer,
358
+ .n2-ss-static-slide > div {
359
+ visibility: visible;
360
+ }
361
+
362
+ .n2-ss-slide .nextend-slide-bg {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ width: 100%;
367
+ max-width: none !important;
368
+ height: auto;
369
+ background: rgba(0, 0, 0, 0.002);
370
+ }
371
+
372
+ .n2-ss-item-iframe {
373
+ height: 100%;
374
+ }
375
+
376
+ .n2-grab {
377
+ cursor: url(../cursor/openhand.cur), move;
378
+ cursor: -webkit-grab;
379
+ cursor: -moz-grab;
380
+ cursor: grab;
381
+ }
382
+
383
+ .n2-grabbing {
384
+ cursor: url(../cursor/closedhand.cur), move;
385
+ cursor: -webkit-grabbing;
386
+ cursor: -moz-grabbing;
387
+ cursor: grabbing;
388
+ }
389
+
390
+ .n2-video-play {
391
+ width: 48px;
392
+ height: 48px;
393
+ margin-left: -24px;
394
+ margin-top: -24px;
395
+ position: absolute;
396
+ left: 50%;
397
+ top: 50%;
398
+ }
399
+
400
+ .n2-ss-thumbnail-type {
401
+ width: 48px;
402
+ height: 48px;
403
+ margin-left: -24px;
404
+ margin-top: -24px;
405
+ position: absolute;
406
+ left: 50%;
407
+ top: 50%;
408
+ }
409
+
410
+ .n2-ss-icon-normal {
411
+ display: inline-block;
412
+ }
413
+
414
+ .n2-ss-icon-hover,
415
+ .n2-ss-icon-has-hover:HOVER .n2-ss-icon-normal {
416
+ display: none;
417
+ }
418
+
419
+ .n2-ss-icon-has-hover:HOVER .n2-ss-icon-hover {
420
+ display: inline-block;
421
+ }
422
+
423
+ }
424
+
425
+ .clear {
426
+ clear: both;
427
+ }
428
+
429
+ .n2-in-fullscreen *{
430
+ -webkit-animation-name: initial;
431
+ animation-name: initial;
432
+ }
433
+ .n2-in-fullscreen [data-uk-scrollspy*='uk-animation-']:not([data-uk-scrollspy*='target']){
434
+ opacity: 1;
435
+ }
library/media/less/spinner.n2less ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (~'div@{id}') {
2
+
3
+ .nextend-spinnerhidden {
4
+ position: absolute;
5
+ left: -10000px;
6
+ }
7
+
8
+ .nextend-spinner {
9
+ position: absolute;
10
+ top: 50%;
11
+ left: 50%;
12
+ margin: -25px 0 0 -15px;
13
+ z-index: 1000;
14
+ width: 50px;
15
+ height: 30px;
16
+ text-align: center;
17
+ font-size: 10px;
18
+ background-color: RGBA(0, 0, 0, 0.6);
19
+ border-radius: 3px;
20
+ padding: 10px 15px;
21
+ }
22
+
23
+ .nextend-spinner > div {
24
+ background-color: #f6f6f6;
25
+ height: 100%;
26
+ width: 6px;
27
+ display: inline-block;
28
+
29
+ -webkit-animation: nextendstretchdelay 1.2s infinite ease-in-out;
30
+ animation: nextendstretchdelay 1.2s infinite ease-in-out;
31
+ }
32
+
33
+ .nextend-spinner .rect2 {
34
+ -webkit-animation-delay: -1.1s;
35
+ animation-delay: -1.1s;
36
+ }
37
+
38
+ .nextend-spinner .rect3 {
39
+ -webkit-animation-delay: -1.0s;
40
+ animation-delay: -1.0s;
41
+ }
42
+
43
+ .nextend-spinner .rect4 {
44
+ -webkit-animation-delay: -0.9s;
45
+ animation-delay: -0.9s;
46
+ }
47
+
48
+ .nextend-spinner .rect5 {
49
+ -webkit-animation-delay: -0.8s;
50
+ animation-delay: -0.8s;
51
+ }
52
+ }
53
+
54
+ @-webkit-keyframes nextendstretchdelay {
55
+ 0%, 40%, 100% {
56
+ -webkit-transform: scaleY(0.4)
57
+ }
58
+ 20% {
59
+ -webkit-transform: scaleY(1.0)
60
+ }
61
+ }
62
+
63
+ @keyframes nextendstretchdelay {
64
+ 0%, 40%, 100% {
65
+ transform: scaleY(0.4);
66
+ -webkit-transform: scaleY(0.4);
67
+ }
68
+ 20% {
69
+ transform: scaleY(1.0);
70
+ -webkit-transform: scaleY(1.0);
71
+ }
72
+ }
library/media/plugins/responsive/auto/auto/subformimage.png ADDED
Binary file
library/media/plugins/responsive/fullwidth/fullwidth/subformimage.png ADDED
Binary file
library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.js ADDED
@@ -0,0 +1,766 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($, scope, undefined) {
2
+
3
+
4
+ function NextendSmartSliderMainAnimationSimple(slider, parameters) {
5
+
6
+ this.postBackgroundAnimation = false;
7
+ this._currentBackgroundAnimation = false;
8
+
9
+ parameters = $.extend({
10
+ delay: 0,
11
+ parallax: 0.45,
12
+ type: 'horizontal',
13
+ shiftedBackgroundAnimation: 'auto'
14
+ }, parameters);
15
+ parameters.delay /= 1000;
16
+
17
+ NextendSmartSliderMainAnimationAbstract.prototype.constructor.apply(this, arguments);
18
+
19
+ this.setActiveSlide(this.slider.slides.eq(this.slider.currentSlideIndex));
20
+
21
+ this.animations = [];
22
+
23
+ switch (this.parameters.type) {
24
+ case 'vertical':
25
+ if (this.parameters.parallax == 1) {
26
+ this.animations.push(this._mainAnimationVertical);
27
+ } else {
28
+ this.animations.push(this._mainAnimationVerticalParallax);
29
+ }
30
+ break;
31
+ case 'no':
32
+ this.animations.push(this._mainAnimationNo);
33
+ break;
34
+ case 'fade':
35
+ this.animations.push(this._mainAnimationFade);
36
+ break;
37
+ case 'crossfade':
38
+ this.animations.push(this._mainAnimationCrossFade);
39
+ break;
40
+ default:
41
+ if (this.parameters.parallax == 1) {
42
+ this.animations.push(this._mainAnimationHorizontal);
43
+ } else {
44
+ this.animations.push(this._mainAnimationHorizontalParallax);
45
+ }
46
+ }
47
+ };
48
+
49
+ NextendSmartSliderMainAnimationSimple.prototype = Object.create(NextendSmartSliderMainAnimationAbstract.prototype);
50
+ NextendSmartSliderMainAnimationSimple.prototype.constructor = NextendSmartSliderMainAnimationSimple;
51
+
52
+
53
+ NextendSmartSliderMainAnimationSimple.prototype.changeTo = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed, isSystem) {
54
+ if (this.postBackgroundAnimation) {
55
+ this.postBackgroundAnimation.start(currentSlideIndex, nextSlideIndex);
56
+ }
57
+
58
+ NextendSmartSliderMainAnimationAbstract.prototype.changeTo.apply(this, arguments);
59
+ };
60
+
61
+ /**
62
+ * Used to hide non active slides
63
+ * @param slide
64
+ */
65
+ NextendSmartSliderMainAnimationSimple.prototype.setActiveSlide = function (slide) {
66
+ var notActiveSlides = this.slider.slides.not(slide);
67
+ for (var i = 0; i < notActiveSlides.length; i++) {
68
+ this._hideSlide(notActiveSlides.eq(i));
69
+ }
70
+ };
71
+
72
+ /**
73
+ * Hides the slide, but not the usual way. Simply positions them outside of the slider area.
74
+ * If we use the visibility or display property to hide we would end up corrupted YouTube api.
75
+ * If opacity 0 might also work, but that might need additional resource from the browser
76
+ * @param slide
77
+ * @private
78
+ */
79
+ NextendSmartSliderMainAnimationSimple.prototype._hideSlide = function (slide) {
80
+ var obj = {};
81
+ obj[nextend.rtl.left] = '-100000px';
82
+ NextendTween.set(slide.get(0), obj);
83
+ };
84
+
85
+ NextendSmartSliderMainAnimationSimple.prototype._showSlide = function (slide) {
86
+ var obj = {};
87
+ obj[nextend.rtl.left] = 0;
88
+ NextendTween.set(slide.get(0), obj);
89
+ };
90
+
91
+ NextendSmartSliderMainAnimationAbstract.prototype.cleanSlideIndex = function (slideIndex) {
92
+ this._hideSlide(this.slider.slides.eq(slideIndex));
93
+ };
94
+
95
+
96
+ NextendSmartSliderMainAnimationSimple.prototype.revertTo = function (slideIndex, originalNextSlideIndex) {
97
+
98
+ var originalNextSlide = this.slider.slides.eq(originalNextSlideIndex)
99
+ .css('zIndex', '');
100
+ this._hideSlide(originalNextSlide);
101
+
102
+ NextendSmartSliderMainAnimationAbstract.prototype.revertTo.apply(this, arguments);
103
+ };
104
+
105
+ NextendSmartSliderMainAnimationSimple.prototype._getAnimation = function () {
106
+ return $.proxy(this.animations[Math.floor(Math.random() * this.animations.length)], this);
107
+ };
108
+
109
+ NextendSmartSliderMainAnimationSimple.prototype._initAnimation = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed) {
110
+ var animation = this._getAnimation();
111
+
112
+ animation(currentSlide, nextSlide, reversed, currentSlideIndex, nextSlideIndex);
113
+ };
114
+
115
+ NextendSmartSliderMainAnimationSimple.prototype.onChangeToComplete = function (previousSlideIndex, currentSlideIndex, isSystem) {
116
+
117
+ this._hideSlide(this.slider.slides.eq(previousSlideIndex));
118
+
119
+ NextendSmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this, arguments);
120
+ };
121
+
122
+ NextendSmartSliderMainAnimationSimple.prototype.onReverseChangeToComplete = function (previousSlideIndex, currentSlideIndex, isSystem) {
123
+
124
+ this._hideSlide(this.slider.slides.eq(previousSlideIndex));
125
+
126
+ NextendSmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete.apply(this, arguments);
127
+ };
128
+
129
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationNo = function (currentSlide, nextSlide) {
130
+
131
+ this._showSlide(nextSlide);
132
+
133
+ this.slider.unsetActiveSlide(currentSlide);
134
+
135
+ nextSlide.css('opacity', 0);
136
+
137
+ this.slider.setActiveSlide(nextSlide);
138
+
139
+ var totalDuration = this.timeline.totalDuration(),
140
+ extraDelay = this.getExtraDelay();
141
+
142
+ if (this._currentBackgroundAnimation && this.parameters.shiftedBackgroundAnimation) {
143
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
144
+ this._currentBackgroundAnimation._preSetup();
145
+ }
146
+ }
147
+
148
+ if (totalDuration == 0) {
149
+ totalDuration = 0.00001;
150
+ extraDelay += totalDuration;
151
+ }
152
+
153
+ this.timeline.set(currentSlide, {
154
+ opacity: 0
155
+ }, extraDelay);
156
+
157
+ this.timeline.set(nextSlide, {
158
+ opacity: 1
159
+ }, totalDuration);
160
+
161
+ this.sliderElement.on('mainAnimationComplete.n2-simple-no', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
162
+ this.sliderElement.off('mainAnimationComplete.n2-simple-no');
163
+ this.slider.slides.eq(currentSlideIndex)
164
+ .css('opacity', '');
165
+ this.slider.slides.eq(nextSlideIndex)
166
+ .css('opacity', '');
167
+ }, this));
168
+ };
169
+
170
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationFade = function (currentSlide, nextSlide) {
171
+ currentSlide.css('zIndex', 5);
172
+ this._showSlide(nextSlide);
173
+
174
+ this.slider.unsetActiveSlide(currentSlide);
175
+ this.slider.setActiveSlide(nextSlide);
176
+
177
+ var adjustedTiming = this.adjustMainAnimation();
178
+
179
+ if (this.parameters.shiftedBackgroundAnimation != 0) {
180
+ var needShift = false,
181
+ resetShift = false;
182
+ if (this.parameters.shiftedBackgroundAnimation == 'auto') {
183
+ if (currentSlide.data('slide').$layers.length > 0) {
184
+ needShift = true;
185
+ } else {
186
+ resetShift = true;
187
+ }
188
+ } else {
189
+ needShift = true;
190
+ }
191
+
192
+ if (this._currentBackgroundAnimation && needShift) {
193
+ this.timeline.shiftChildren(adjustedTiming.outDuration - adjustedTiming.extraDelay);
194
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
195
+ this._currentBackgroundAnimation._preSetup();
196
+ }
197
+ } else if (resetShift) {
198
+ this.timeline.shiftChildren(adjustedTiming.extraDelay);
199
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
200
+ this._currentBackgroundAnimation._preSetup();
201
+ }
202
+ }
203
+ }
204
+
205
+ this.timeline.to(currentSlide.get(0), adjustedTiming.outDuration, {
206
+ opacity: 0,
207
+ ease: this.getEase()
208
+ }, adjustedTiming.outDelay);
209
+
210
+ nextSlide.css('opacity', 1);
211
+
212
+ this.sliderElement.on('mainAnimationComplete.n2-simple-fade', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
213
+ this.sliderElement.off('mainAnimationComplete.n2-simple-fade');
214
+ this.slider.slides.eq(currentSlideIndex)
215
+ .css('zIndex', '')
216
+ .css('opacity', '');
217
+ this.slider.slides.eq(nextSlideIndex)
218
+ .css('opacity', '');
219
+ }, this));
220
+ };
221
+
222
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationCrossFade = function (currentSlide, nextSlide) {
223
+ currentSlide.css('zIndex', 5);
224
+ nextSlide.css('opacity', 0);
225
+ this._showSlide(nextSlide);
226
+
227
+ this.slider.unsetActiveSlide(currentSlide);
228
+ this.slider.setActiveSlide(nextSlide);
229
+
230
+ var adjustedTiming = this.adjustMainAnimation();
231
+
232
+ if (this.parameters.shiftedBackgroundAnimation != 0) {
233
+ var needShift = false,
234
+ resetShift = false;
235
+ if (this.parameters.shiftedBackgroundAnimation == 'auto') {
236
+ if (currentSlide.data('slide').$layers.length > 0) {
237
+ needShift = true;
238
+ } else {
239
+ resetShift = true;
240
+ }
241
+ } else {
242
+ needShift = true;
243
+ }
244
+
245
+ if (this._currentBackgroundAnimation && needShift) {
246
+ this.timeline.shiftChildren(adjustedTiming.outDuration - adjustedTiming.extraDelay);
247
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
248
+ this._currentBackgroundAnimation._preSetup();
249
+ }
250
+ } else if (resetShift) {
251
+ this.timeline.shiftChildren(adjustedTiming.extraDelay);
252
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
253
+ this._currentBackgroundAnimation._preSetup();
254
+ }
255
+ }
256
+ }
257
+
258
+ this.timeline.to(currentSlide.get(0), adjustedTiming.outDuration, {
259
+ opacity: 0,
260
+ ease: this.getEase()
261
+ }, adjustedTiming.outDelay);
262
+
263
+ this.timeline.to(nextSlide.get(0), adjustedTiming.inDuration, {
264
+ opacity: 1,
265
+ ease: this.getEase()
266
+ }, adjustedTiming.inDelay);
267
+
268
+ this.sliderElement.on('mainAnimationComplete.n2-simple-fade', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
269
+ this.sliderElement.off('mainAnimationComplete.n2-simple-fade');
270
+ this.slider.slides.eq(currentSlideIndex)
271
+ .css('zIndex', '')
272
+ .css('opacity', '');
273
+ this.slider.slides.eq(nextSlideIndex)
274
+ .css('opacity', '');
275
+ }, this));
276
+ };
277
+
278
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationHorizontal = function (currentSlide, nextSlide, reversed, currentSlideIndex, nextSlideIndex) {
279
+ this.__mainAnimationDirection(currentSlide, nextSlide, 'horizontal', 1, reversed, currentSlideIndex, nextSlideIndex);
280
+ };
281
+
282
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationVertical = function (currentSlide, nextSlide, reversed, currentSlideIndex, nextSlideIndex) {
283
+ this._showSlide(nextSlide);
284
+ this.__mainAnimationDirection(currentSlide, nextSlide, 'vertical', 1, reversed, currentSlideIndex, nextSlideIndex);
285
+ };
286
+
287
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationHorizontalParallax = function (currentSlide, nextSlide, reversed) {
288
+ this.__mainAnimationDirection(currentSlide, nextSlide, 'horizontal', this.parameters.parallax, reversed);
289
+ };
290
+
291
+ NextendSmartSliderMainAnimationSimple.prototype._mainAnimationVerticalParallax = function (currentSlide, nextSlide, reversed) {
292
+ this._showSlide(nextSlide);
293
+ this.__mainAnimationDirection(currentSlide, nextSlide, 'vertical', this.parameters.parallax, reversed);
294
+ };
295
+
296
+ NextendSmartSliderMainAnimationSimple.prototype.__mainAnimationDirection = function (currentSlide, nextSlide, direction, parallax, reversed, currentSlideIndex, nextSlideIndex) {
297
+ var property = '',
298
+ propertyValue = 0,
299
+ parallaxProperty = '',
300
+ originalPropertyValue = 0;
301
+
302
+ if (direction == 'horizontal') {
303
+ property = nextend.rtl.left;
304
+ parallaxProperty = 'width';
305
+ originalPropertyValue = propertyValue = this.slider.dimensions.slideouter.width;
306
+ } else if (direction == 'vertical') {
307
+ property = 'top';
308
+ parallaxProperty = 'height';
309
+ originalPropertyValue = propertyValue = this.slider.dimensions.slideouter.height;
310
+ }
311
+
312
+ if (reversed) {
313
+ propertyValue *= -1;
314
+ }
315
+
316
+ var inProperties = {
317
+ ease: this.getEase()
318
+ },
319
+ outProperties = {
320
+ ease: this.getEase()
321
+ };
322
+ var from = {};
323
+ if (parallax != 1) {
324
+ if (!reversed) {
325
+ currentSlide.css('zIndex', 6);
326
+ propertyValue *= parallax;
327
+ nextSlide.css(property, propertyValue);
328
+ from[property] = propertyValue;
329
+ } else {
330
+ currentSlide.css('zIndex', 6);
331
+ inProperties[parallaxProperty] = -propertyValue;
332
+ propertyValue *= parallax;
333
+ from[property] = propertyValue;
334
+ from[parallaxProperty] = -propertyValue;
335
+ }
336
+ } else {
337
+ nextSlide.css(property, propertyValue);
338
+ from[property] = propertyValue;
339
+ }
340
+
341
+ nextSlide.css('zIndex', 5);
342
+
343
+ if (reversed || parallax == 1) {
344
+ currentSlide.css('zIndex', 4);
345
+ }
346
+
347
+ this.slider.unsetActiveSlide(currentSlide);
348
+ this.slider.setActiveSlide(nextSlide);
349
+
350
+ var adjustedTiming = this.adjustMainAnimation();
351
+
352
+ inProperties[property] = 0;
353
+
354
+ this.timeline.fromTo(nextSlide.get(0), adjustedTiming.inDuration, from, inProperties, adjustedTiming.inDelay);
355
+ outProperties[property] = -propertyValue;
356
+ if (!reversed && parallax != 1) {
357
+ outProperties[parallaxProperty] = propertyValue;
358
+ }
359
+
360
+ if (this.parameters.shiftedBackgroundAnimation != 0) {
361
+ var needShift = false,
362
+ resetShift = false;
363
+ if (this.parameters.shiftedBackgroundAnimation == 'auto') {
364
+ if (currentSlide.data('slide').$layers.length > 0) {
365
+ needShift = true;
366
+ } else {
367
+ resetShift = true;
368
+ }
369
+ } else {
370
+ needShift = true;
371
+ }
372
+
373
+ if (this._currentBackgroundAnimation && needShift) {
374
+ this.timeline.shiftChildren(adjustedTiming.outDuration - adjustedTiming.extraDelay);
375
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
376
+ this._currentBackgroundAnimation._preSetup();
377
+ }
378
+ } else if (resetShift) {
379
+ this.timeline.shiftChildren(adjustedTiming.extraDelay);
380
+ if (this._currentBackgroundAnimation.shiftedPreSetup) {
381
+ this._currentBackgroundAnimation._preSetup();
382
+ }
383
+ }
384
+ }
385
+
386
+
387
+ this.timeline.to(currentSlide.get(0), adjustedTiming.outDuration, outProperties, adjustedTiming.outDelay);
388
+
389
+ if (this.isTouch && this.isReverseAllowed && parallax == 1) {
390
+ var reverseSlideIndex = reversed ? currentSlideIndex + 1 : currentSlideIndex - 1;
391
+ if (reverseSlideIndex < 0) {
392
+ if (this.slider.parameters.carousel) {
393
+ reverseSlideIndex = this.slider.slides.length - 1;
394
+ } else {
395
+ reverseSlideIndex = currentSlideIndex;
396
+ }
397
+ } else if (reverseSlideIndex >= this.slider.slides.length) {
398
+ if (this.slider.parameters.carousel) {
399
+ reverseSlideIndex = 0;
400
+ } else {
401
+ reverseSlideIndex = currentSlideIndex;
402
+ }
403
+ }
404
+ this.reverseSlideIndex = reverseSlideIndex;
405
+ if (reverseSlideIndex != nextSlideIndex) {
406
+
407
+ if (reverseSlideIndex != currentSlideIndex) {
408
+ this.enableReverseMode();
409
+
410
+ var reverseSlide = this.slider.slides.eq(reverseSlideIndex);
411
+ if (direction == 'vertical') {
412
+ this._showSlide(reverseSlide);
413
+ }
414
+ reverseSlide.css(property, propertyValue);
415
+ var reversedInFrom = {},
416
+ reversedInProperties = {
417
+ ease: this.getEase()
418
+ },
419
+ reversedOutFrom = {},
420
+ reversedOutProperties = {
421
+ ease: this.getEase()
422
+ };
423
+
424
+ reversedInProperties[property] = 0;
425
+ reversedInFrom[property] = -propertyValue;
426
+ reversedOutProperties[property] = propertyValue
427
+ reversedOutFrom[property] = 0;
428
+
429
+ reverseSlide.trigger('mainAnimationStartIn', [this, currentSlideIndex, reverseSlideIndex, false]);
430
+ this.reverseTimeline.paused(true);
431
+ this.reverseTimeline.eventCallback('onComplete', this.onChangeToComplete, [currentSlideIndex, reverseSlideIndex, false], this);
432
+
433
+ this.reverseTimeline.fromTo(reverseSlide.get(0), adjustedTiming.inDuration, reversedInFrom, reversedInProperties, adjustedTiming.inDelay);
434
+ this.reverseTimeline.fromTo(currentSlide.get(0), adjustedTiming.inDuration, reversedOutFrom, reversedOutProperties, adjustedTiming.inDelay);
435
+ }
436
+ }
437
+ }
438
+
439
+
440
+ this.sliderElement.on('mainAnimationComplete.n2-simple-fade', $.proxy(function (e, animation, currentSlideIndex, nextSlideIndex) {
441
+ this.sliderElement.off('mainAnimationComplete.n2-simple-fade');
442
+ this.slider.slides.eq(nextSlideIndex)
443
+ .css('zIndex', '')
444
+ .css(property, '');
445
+ this.slider.slides.eq(currentSlideIndex)
446
+ .css('zIndex', '')
447
+ .css(parallaxProperty, originalPropertyValue);
448
+ }, this));
449
+ };
450
+
451
+ NextendSmartSliderMainAnimationSimple.prototype.getExtraDelay = function () {
452
+ return 0;
453
+ };
454
+
455
+ NextendSmartSliderMainAnimationSimple.prototype.adjustMainAnimation = function () {
456
+ var duration = this.parameters.duration,
457
+ delay = this.parameters.delay,
458
+ backgroundAnimationDuration = this.timeline.totalDuration(),
459
+ extraDelay = this.getExtraDelay();
460
+ if (backgroundAnimationDuration > 0) {
461
+ var totalMainAnimationDuration = duration + delay;
462
+ if (totalMainAnimationDuration > backgroundAnimationDuration) {
463
+ duration = duration * backgroundAnimationDuration / totalMainAnimationDuration;
464
+ delay = delay * backgroundAnimationDuration / totalMainAnimationDuration;
465
+ if (delay < extraDelay) {
466
+ duration -= (extraDelay - delay);
467
+ delay = extraDelay;
468
+ }
469
+ } else {
470
+ return {
471
+ inDuration: duration,
472
+ outDuration: duration,
473
+ inDelay: backgroundAnimationDuration - duration,
474
+ outDelay: extraDelay,
475
+ extraDelay: extraDelay
476
+ }
477
+ }
478
+ } else {
479
+ delay += extraDelay;
480
+ }
481
+ return {
482
+ inDuration: duration,
483
+ outDuration: duration,
484
+ inDelay: delay,
485
+ outDelay: delay,
486
+ extraDelay: extraDelay
487
+ }
488
+ };
489
+
490
+ NextendSmartSliderMainAnimationSimple.prototype.hasBackgroundAnimation = function () {
491
+ return false;
492
+ };
493
+
494
+ scope.NextendSmartSliderMainAnimationSimple = NextendSmartSliderMainAnimationSimple;
495
+
496
+ })(n2, window);
497
+ (function ($, scope, undefined) {
498
+
499
+ function NextendSmartSliderFrontendBackgroundAnimation(slider, parameters, backgroundAnimations) {
500
+ this._currentBackgroundAnimation = false;
501
+ NextendSmartSliderMainAnimationSimple.prototype.constructor.call(this, slider, parameters);
502
+ this.isReverseAllowed = false;
503
+
504
+ this.bgAnimationElement = this.sliderElement.find('.n2-ss-background-animation');
505
+
506
+ this.backgroundAnimations = $.extend({
507
+ global: 0,
508
+ speed: 'normal',
509
+ slides: []
510
+ }, backgroundAnimations);
511
+
512
+ this.backgroundImages = slider.backgroundImages.getBackgroundImages();
513
+
514
+ /**
515
+ * Hack to force browser to better image rendering {@link http://stackoverflow.com/a/14308227/305604}
516
+ * Prevents a Firefox glitch
517
+ */
518
+ slider.backgroundImages.hack();
519
+ };
520
+
521
+ NextendSmartSliderFrontendBackgroundAnimation.prototype = Object.create(NextendSmartSliderMainAnimationSimple.prototype);
522
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.constructor = NextendSmartSliderFrontendBackgroundAnimation;
523
+
524
+ /**
525
+ * @returns [{NextendSmartSliderBackgroundAnimationAbstract}, {string}]
526
+ */
527
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.getBackgroundAnimation = function (i) {
528
+ var animations = this.backgroundAnimations.global,
529
+ speed = this.backgroundAnimations.speed;
530
+ if (typeof this.backgroundAnimations.slides[i] != 'undefined' && this.backgroundAnimations.slides[i]) {
531
+ var animation = this.backgroundAnimations.slides[i];
532
+ animations = animation.animation;
533
+ speed = animation.speed;
534
+ }
535
+ if (!animations) {
536
+ return false;
537
+ }
538
+ return [animations[Math.floor(Math.random() * animations.length)], speed];
539
+ },
540
+
541
+ /**
542
+ * Initialize the current background animation
543
+ * @param currentSlideIndex
544
+ * @param currentSlide
545
+ * @param nextSlideIndex
546
+ * @param nextSlide
547
+ * @param reversed
548
+ * @private
549
+ */
550
+ NextendSmartSliderFrontendBackgroundAnimation.prototype._initAnimation = function (currentSlideIndex, currentSlide, nextSlideIndex, nextSlide, reversed) {
551
+ this._currentBackgroundAnimation = false;
552
+ var currentImage = this.backgroundImages[currentSlideIndex],
553
+ nextImage = this.backgroundImages[nextSlideIndex];
554
+
555
+ if (currentImage && nextImage) {
556
+ var backgroundAnimation = this.getBackgroundAnimation(nextSlideIndex);
557
+
558
+ if (backgroundAnimation !== false) {
559
+ var durationMultiplier = 1;
560
+ switch (backgroundAnimation[1]) {
561
+ case 'superSlow':
562
+ durationMultiplier = 3;
563
+ break;
564
+ case 'slow':
565
+ durationMultiplier = 1.5;
566
+ break;
567
+ case 'fast':
568
+ durationMultiplier = 0.75;
569
+ break;
570
+ case 'superFast':
571
+ durationMultiplier = 0.5;
572
+ break;
573
+ }
574
+ this._currentBackgroundAnimation = new window['NextendSmartSliderBackgroundAnimation' + backgroundAnimation[0].type](this, currentImage.element, nextImage.element, backgroundAnimation[0], durationMultiplier, reversed);
575
+
576
+ NextendSmartSliderMainAnimationSimple.prototype._initAnimation.apply(this, arguments);
577
+
578
+ this._currentBackgroundAnimation.postSetup();
579
+
580
+ this.timeline.set($('<div />'), {
581
+ opacity: 1, onComplete: $.proxy(function () {
582
+ if (this._currentBackgroundAnimation) {
583
+ this._currentBackgroundAnimation.ended();
584
+ this._currentBackgroundAnimation = false;
585
+ }
586
+ }, this)
587
+ });
588
+
589
+ return;
590
+ }
591
+ }
592
+
593
+ NextendSmartSliderMainAnimationSimple.prototype._initAnimation.apply(this, arguments);
594
+ };
595
+
596
+ /**
597
+ * Remove the background animation when the current animation finish
598
+ * @param previousSlideIndex
599
+ * @param currentSlideIndex
600
+ */
601
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.onChangeToComplete = function (previousSlideIndex, currentSlideIndex) {
602
+ if (this._currentBackgroundAnimation) {
603
+ this._currentBackgroundAnimation.ended();
604
+ this._currentBackgroundAnimation = false;
605
+ }
606
+ NextendSmartSliderMainAnimationSimple.prototype.onChangeToComplete.apply(this, arguments);
607
+ };
608
+
609
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.onReverseChangeToComplete = function (previousSlideIndex, currentSlideIndex, isSystem) {
610
+ if (this._currentBackgroundAnimation) {
611
+ this._currentBackgroundAnimation.revertEnded();
612
+ this._currentBackgroundAnimation = false;
613
+ }
614
+ NextendSmartSliderMainAnimationSimple.prototype.onReverseChangeToComplete.apply(this, arguments);
615
+ };
616
+
617
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.getExtraDelay = function () {
618
+ if (this._currentBackgroundAnimation) {
619
+ return this._currentBackgroundAnimation.getExtraDelay();
620
+ }
621
+ return 0;
622
+ };
623
+
624
+ NextendSmartSliderFrontendBackgroundAnimation.prototype.hasBackgroundAnimation = function () {
625
+ return this._currentBackgroundAnimation;
626
+ };
627
+
628
+ scope.NextendSmartSliderFrontendBackgroundAnimation = NextendSmartSliderFrontendBackgroundAnimation;
629
+
630
+ })(n2, window);
631
+ (function ($, scope, undefined) {
632
+
633
+ function NextendSmartSliderResponsiveSimple() {
634
+ this.round = 1;
635
+ NextendSmartSliderResponsive.prototype.constructor.apply(this, arguments);
636
+ };
637
+
638
+ NextendSmartSliderResponsiveSimple.prototype = Object.create(NextendSmartSliderResponsive.prototype);
639
+ NextendSmartSliderResponsiveSimple.prototype.constructor = NextendSmartSliderResponsiveSimple;
640
+
641
+ NextendSmartSliderResponsiveSimple.prototype.addResponsiveElements = function () {
642
+ this.helperElements = {};
643
+
644
+ this._sliderHorizontal = this.addResponsiveElement(this.sliderElement, ['width', 'marginLeft', 'marginRight'], 'w', 'slider');
645
+ this.addResponsiveElement(this.sliderElement.find('.n2-ss-slider-1'), ['width', 'paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth'], 'w');
646
+
647
+ this._sliderVertical = this.addResponsiveElement(this.sliderElement, ['height', 'marginTop', 'marginBottom'], 'h', 'slider');
648
+ this.addResponsiveElement(this.sliderElement, ['fontSize'], 'fontRatio', 'slider');
649
+ this.addResponsiveElement(this.sliderElement.find('.n2-ss-slider-1'), ['height', 'paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'], 'h');
650
+
651
+ this.helperElements.canvas = this.addResponsiveElement(this.sliderElement.find('.n2-ss-slide'), ['width'], 'w', 'slideouter');
652
+
653
+ this.addResponsiveElement(this.sliderElement.find('.n2-ss-slide'), ['height'], 'h', 'slideouter');
654
+
655
+ var layerContainers = this.sliderElement.find('.n2-ss-layers-container');
656
+ this.addResponsiveElement(layerContainers, ['width'], 'slideW', 'slide');
657
+ this.addResponsiveElement(layerContainers, ['height'], 'slideH', 'slide').setCentered();
658
+
659
+ var parallax = this.slider.parameters.mainanimation.parallax;
660
+ var backgroundImages = this.slider.backgroundImages.getBackgroundImages();
661
+ for (var i = 0; i < backgroundImages.length; i++) {
662
+ if (parallax != 1) {
663
+ this.addResponsiveElement(backgroundImages[i].element, ['width'], 'w');
664
+ this.addResponsiveElement(backgroundImages[i].element, ['height'], 'h');
665
+ }
666
+
667
+ this.addResponsiveElementBackgroundImageAsSingle(backgroundImages[i].image, backgroundImages[i], []);
668
+ }
669
+
670
+
671
+ var video = this.sliderElement.find('.n2-ss-slider-background-video');
672
+ if (video.length) {
673
+ if (video[0].videoWidth > 0) {
674
+ this.videoPlayerReady(video);
675
+ } else {
676
+ video[0].addEventListener('error', $.proxy(this.videoPlayerError, this, video), true);
677
+ video[0].addEventListener('canplay', $.proxy(this.videoPlayerReady, this, video));
678
+ }
679
+ }
680
+ };
681
+
682
+ NextendSmartSliderResponsiveSimple.prototype.getCanvas = function () {
683
+ return this.helperElements.canvas;
684
+ };
685
+
686
+ NextendSmartSliderResponsiveSimple.prototype.videoPlayerError = function (video) {
687
+ video.remove();
688
+ };
689
+
690
+ NextendSmartSliderResponsiveSimple.prototype.videoPlayerReady = function (video) {
691
+ video.data('ratio', video[0].videoWidth / video[0].videoHeight);
692
+ video.addClass('n2-active');
693
+
694
+ this.slider.ready($.proxy(function () {
695
+ this.slider.sliderElement.on('SliderResize', $.proxy(this.resizeVideo, this, video));
696
+ this.resizeVideo(video);
697
+ }, this));
698
+ };
699
+
700
+ NextendSmartSliderResponsiveSimple.prototype.resizeVideo = function (video) {
701
+
702
+ var mode = video.data('mode'),
703
+ ratio = video.data('ratio'),
704
+ slideOuter = this.slider.dimensions.slideouter || this.slider.dimensions.slide,
705
+ slideOuterRatio = slideOuter.width / slideOuter.height;
706
+
707
+ if (mode == 'fill') {
708
+ if (slideOuterRatio > ratio) {
709
+ video.css({
710
+ width: '100%',
711
+ height: 'auto'
712
+ });
713
+ } else {
714
+ video.css({
715
+ width: 'auto',
716
+ height: '100%'
717
+ });
718
+ }
719
+ } else if (mode == 'fit') {
720
+ if (slideOuterRatio < ratio) {
721
+ video.css({
722
+ width: '100%',
723
+ height: 'auto'
724
+ });
725
+ } else {
726
+ video.css({
727
+ width: 'auto',
728
+ height: '100%'
729
+ });
730
+ }
731
+ }
732
+ };
733
+
734
+ scope.NextendSmartSliderResponsiveSimple = NextendSmartSliderResponsiveSimple;
735
+
736
+ })(n2, window);
737
+ (function ($, scope, undefined) {
738
+
739
+ function NextendSmartSliderSimple(elementID, parameters) {
740
+
741
+ this.type = 'simple';
742
+ this.responsiveClass = 'NextendSmartSliderResponsiveSimple';
743
+
744
+ parameters = $.extend({
745
+ bgAnimations: 0,
746
+ carousel: 1
747
+ }, parameters);
748
+
749
+ NextendSmartSliderAbstract.prototype.constructor.call(this, elementID, parameters);
750
+ };
751
+
752
+ NextendSmartSliderSimple.prototype = Object.create(NextendSmartSliderAbstract.prototype);
753
+ NextendSmartSliderSimple.prototype.constructor = NextendSmartSliderSimple;
754
+
755
+ NextendSmartSliderSimple.prototype.initMainAnimation = function () {
756
+
757
+ if (nModernizr.csstransforms3d && nModernizr.csstransformspreserve3d && this.parameters.bgAnimations) {
758
+ this.mainAnimation = new NextendSmartSliderFrontendBackgroundAnimation(this, this.parameters.mainanimation, this.parameters.bgAnimations);
759
+ } else {
760
+ this.mainAnimation = new NextendSmartSliderMainAnimationSimple(this, this.parameters.mainanimation);
761
+ }
762
+ };
763
+
764
+ scope.NextendSmartSliderSimple = NextendSmartSliderSimple;
765
+
766
+ })(n2, window);
library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,i,e){function n(i,e){switch(this.postBackgroundAnimation=!1,this._currentBackgroundAnimation=!1,e=t.extend({delay:0,parallax:.45,type:"horizontal",shiftedBackgroundAnimation:"auto"},e),e.delay/=1e3,NextendSmartSliderMainAnimationAbstract.prototype.constructor.apply(this,arguments),this.setActiveSlide(this.slider.slides.eq(this.slider.currentSlideIndex)),this.animations=[],this.parameters.type){case"vertical":1==this.parameters.parallax?this.animations.push(this._mainAnimationVertical):this.animations.push(this._mainAnimationVerticalParallax);break;case"no":this.animations.push(this._mainAnimationNo);break;case"fade":this.animations.push(this._mainAnimationFade);break;case"crossfade":this.animations.push(this._mainAnimationCrossFade);break;default:1==this.parameters.parallax?this.animations.push(this._mainAnimationHorizontal):this.animations.push(this._mainAnimationHorizontalParallax)}}n.prototype=Object.create(NextendSmartSliderMainAnimationAbstract.prototype),n.prototype.constructor=n,n.prototype.changeTo=function(t,i,e,n,s,a){this.postBackgroundAnimation&&this.postBackgroundAnimation.start(t,e),NextendSmartSliderMainAnimationAbstract.prototype.changeTo.apply(this,arguments)},n.prototype.setActiveSlide=function(t){for(var i=this.slider.slides.not(t),e=0;e<i.length;e++)this._hideSlide(i.eq(e))},n.prototype._hideSlide=function(t){var i={};i[nextend.rtl.left]="-100000px",NextendTween.set(t.get(0),i)},n.prototype._showSlide=function(t){var i={};i[nextend.rtl.left]=0,NextendTween.set(t.get(0),i)},NextendSmartSliderMainAnimationAbstract.prototype.cleanSlideIndex=function(t){this._hideSlide(this.slider.slides.eq(t))},n.prototype.revertTo=function(t,i){var e=this.slider.slides.eq(i).css("zIndex","");this._hideSlide(e),NextendSmartSliderMainAnimationAbstract.prototype.revertTo.apply(this,arguments)},n.prototype._getAnimation=function(){return t.proxy(this.animations[Math.floor(Math.random()*this.animations.length)],this)},n.prototype._initAnimation=function(t,i,e,n,s){var a=this._getAnimation();a(i,n,s,t,e)},n.prototype.onChangeToComplete=function(t,i,e){this._hideSlide(this.slider.slides.eq(t)),NextendSmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(t,i,e){this._hideSlide(this.slider.slides.eq(t)),NextendSmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype._mainAnimationNo=function(i,e){this._showSlide(e),this.slider.unsetActiveSlide(i),e.css("opacity",0),this.slider.setActiveSlide(e);var n=this.timeline.totalDuration(),s=this.getExtraDelay();this._currentBackgroundAnimation&&this.parameters.shiftedBackgroundAnimation&&this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup(),0==n&&(n=1e-5,s+=n),this.timeline.set(i,{opacity:0},s),this.timeline.set(e,{opacity:1},n),this.sliderElement.on("mainAnimationComplete.n2-simple-no",t.proxy(function(t,i,e,n){this.sliderElement.off("mainAnimationComplete.n2-simple-no"),this.slider.slides.eq(e).css("opacity",""),this.slider.slides.eq(n).css("opacity","")},this))},n.prototype._mainAnimationFade=function(i,e){i.css("zIndex",5),this._showSlide(e),this.slider.unsetActiveSlide(i),this.slider.setActiveSlide(e);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var s=!1,a=!1;"auto"==this.parameters.shiftedBackgroundAnimation?i.data("slide").$layers.length>0?s=!0:a=!0:s=!0,this._currentBackgroundAnimation&&s?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):a&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(i.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),e.css("opacity",1),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",t.proxy(function(t,i,e,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade"),this.slider.slides.eq(e).css("zIndex","").css("opacity",""),this.slider.slides.eq(n).css("opacity","")},this))},n.prototype._mainAnimationCrossFade=function(i,e){i.css("zIndex",5),e.css("opacity",0),this._showSlide(e),this.slider.unsetActiveSlide(i),this.slider.setActiveSlide(e);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var s=!1,a=!1;"auto"==this.parameters.shiftedBackgroundAnimation?i.data("slide").$layers.length>0?s=!0:a=!0:s=!0,this._currentBackgroundAnimation&&s?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):a&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(i.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),this.timeline.to(e.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",t.proxy(function(t,i,e,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade"),this.slider.slides.eq(e).css("zIndex","").css("opacity",""),this.slider.slides.eq(n).css("opacity","")},this))},n.prototype._mainAnimationHorizontal=function(t,i,e,n,s){this.__mainAnimationDirection(t,i,"horizontal",1,e,n,s)},n.prototype._mainAnimationVertical=function(t,i,e,n,s){this._showSlide(i),this.__mainAnimationDirection(t,i,"vertical",1,e,n,s)},n.prototype._mainAnimationHorizontalParallax=function(t,i,e){this.__mainAnimationDirection(t,i,"horizontal",this.parameters.parallax,e)},n.prototype._mainAnimationVerticalParallax=function(t,i,e){this._showSlide(i),this.__mainAnimationDirection(t,i,"vertical",this.parameters.parallax,e)},n.prototype.__mainAnimationDirection=function(i,e,n,s,a,o,r){var d="",l=0,h="",m=0;"horizontal"==n?(d=nextend.rtl.left,h="width",m=l=this.slider.dimensions.slideouter.width):"vertical"==n&&(d="top",h="height",m=l=this.slider.dimensions.slideouter.height),a&&(l*=-1);var p={ease:this.getEase()},c={ease:this.getEase()},u={};1!=s?a?(i.css("zIndex",6),p[h]=-l,l*=s,u[d]=l,u[h]=-l):(i.css("zIndex",6),l*=s,e.css(d,l),u[d]=l):(e.css(d,l),u[d]=l),e.css("zIndex",5),(a||1==s)&&i.css("zIndex",4),this.slider.unsetActiveSlide(i),this.slider.setActiveSlide(e);var g=this.adjustMainAnimation();if(p[d]=0,this.timeline.fromTo(e.get(0),g.inDuration,u,p,g.inDelay),c[d]=-l,a||1==s||(c[h]=l),0!=this.parameters.shiftedBackgroundAnimation){var A=!1,y=!1;"auto"==this.parameters.shiftedBackgroundAnimation?i.data("slide").$layers.length>0?A=!0:y=!0:A=!0,this._currentBackgroundAnimation&&A?(this.timeline.shiftChildren(g.outDuration-g.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):y&&(this.timeline.shiftChildren(g.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}if(this.timeline.to(i.get(0),g.outDuration,c,g.outDelay),this.isTouch&&this.isReverseAllowed&&1==s){var f=a?o+1:o-1;if(0>f?f=this.slider.parameters.carousel?this.slider.slides.length-1:o:f>=this.slider.slides.length&&(f=this.slider.parameters.carousel?0:o),this.reverseSlideIndex=f,f!=r&&f!=o){this.enableReverseMode();var S=this.slider.slides.eq(f);"vertical"==n&&this._showSlide(S),S.css(d,l);var v={},_={ease:this.getEase()},x={},k={ease:this.getEase()};_[d]=0,v[d]=-l,k[d]=l,x[d]=0,S.trigger("mainAnimationStartIn",[this,o,f,!1]),this.reverseTimeline.paused(!0),this.reverseTimeline.eventCallback("onComplete",this.onChangeToComplete,[o,f,!1],this),this.reverseTimeline.fromTo(S.get(0),g.inDuration,v,_,g.inDelay),this.reverseTimeline.fromTo(i.get(0),g.inDuration,x,k,g.inDelay)}}this.sliderElement.on("mainAnimationComplete.n2-simple-fade",t.proxy(function(t,i,e,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade"),this.slider.slides.eq(n).css("zIndex","").css(d,""),this.slider.slides.eq(e).css("zIndex","").css(h,m)},this))},n.prototype.getExtraDelay=function(){return 0},n.prototype.adjustMainAnimation=function(){var t=this.parameters.duration,i=this.parameters.delay,e=this.timeline.totalDuration(),n=this.getExtraDelay();if(e>0){var s=t+i;if(!(s>e))return{inDuration:t,outDuration:t,inDelay:e-t,outDelay:n,extraDelay:n};t=t*e/s,i=i*e/s,n>i&&(t-=n-i,i=n)}else i+=n;return{inDuration:t,outDuration:t,inDelay:i,outDelay:i,extraDelay:n}},n.prototype.hasBackgroundAnimation=function(){return!1},i.NextendSmartSliderMainAnimationSimple=n}(n2,window),function(t,i,e){function n(i,e,n){this._currentBackgroundAnimation=!1,NextendSmartSliderMainAnimationSimple.prototype.constructor.call(this,i,e),this.isReverseAllowed=!1,this.bgAnimationElement=this.sliderElement.find(".n2-ss-background-animation"),this.backgroundAnimations=t.extend({global:0,speed:"normal",slides:[]},n),this.backgroundImages=i.backgroundImages.getBackgroundImages(),i.backgroundImages.hack()}n.prototype=Object.create(NextendSmartSliderMainAnimationSimple.prototype),n.prototype.constructor=n,n.prototype.getBackgroundAnimation=function(t){var i=this.backgroundAnimations.global,e=this.backgroundAnimations.speed;if("undefined"!=typeof this.backgroundAnimations.slides[t]&&this.backgroundAnimations.slides[t]){var n=this.backgroundAnimations.slides[t];i=n.animation,e=n.speed}return i?[i[Math.floor(Math.random()*i.length)],e]:!1},n.prototype._initAnimation=function(i,e,n,s,a){this._currentBackgroundAnimation=!1;var o=this.backgroundImages[i],r=this.backgroundImages[n];if(o&&r){var d=this.getBackgroundAnimation(n);if(d!==!1){var l=1;switch(d[1]){case"superSlow":l=3;break;case"slow":l=1.5;break;case"fast":l=.75;break;case"superFast":l=.5}return this._currentBackgroundAnimation=new window["NextendSmartSliderBackgroundAnimation"+d[0].type](this,o.element,r.element,d[0],l,a),NextendSmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments),this._currentBackgroundAnimation.postSetup(),void this.timeline.set(t("<div />"),{opacity:1,onComplete:t.proxy(function(){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1)},this)})}}NextendSmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments)},n.prototype.onChangeToComplete=function(t,i){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1),NextendSmartSliderMainAnimationSimple.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(t,i,e){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.revertEnded(),this._currentBackgroundAnimation=!1),NextendSmartSliderMainAnimationSimple.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype.getExtraDelay=function(){return this._currentBackgroundAnimation?this._currentBackgroundAnimation.getExtraDelay():0},n.prototype.hasBackgroundAnimation=function(){return this._currentBackgroundAnimation},i.NextendSmartSliderFrontendBackgroundAnimation=n}(n2,window),function(t,i,e){function n(){this.round=1,NextendSmartSliderResponsive.prototype.constructor.apply(this,arguments)}n.prototype=Object.create(NextendSmartSliderResponsive.prototype),n.prototype.constructor=n,n.prototype.addResponsiveElements=function(){this.helperElements={},this._sliderHorizontal=this.addResponsiveElement(this.sliderElement,["width","marginLeft","marginRight"],"w","slider"),this.addResponsiveElement(this.sliderElement.find(".n2-ss-slider-1"),["width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],"w"),this._sliderVertical=this.addResponsiveElement(this.sliderElement,["height","marginTop","marginBottom"],"h","slider"),this.addResponsiveElement(this.sliderElement,["fontSize"],"fontRatio","slider"),this.addResponsiveElement(this.sliderElement.find(".n2-ss-slider-1"),["height","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],"h"),this.helperElements.canvas=this.addResponsiveElement(this.sliderElement.find(".n2-ss-slide"),["width"],"w","slideouter"),this.addResponsiveElement(this.sliderElement.find(".n2-ss-slide"),["height"],"h","slideouter");var i=this.sliderElement.find(".n2-ss-layers-container");this.addResponsiveElement(i,["width"],"slideW","slide"),this.addResponsiveElement(i,["height"],"slideH","slide").setCentered();for(var e=this.slider.parameters.mainanimation.parallax,n=this.slider.backgroundImages.getBackgroundImages(),s=0;s<n.length;s++)1!=e&&(this.addResponsiveElement(n[s].element,["width"],"w"),this.addResponsiveElement(n[s].element,["height"],"h")),this.addResponsiveElementBackgroundImageAsSingle(n[s].image,n[s],[]);var a=this.sliderElement.find(".n2-ss-slider-background-video");a.length&&(a[0].videoWidth>0?this.videoPlayerReady(a):(a[0].addEventListener("error",t.proxy(this.videoPlayerError,this,a),!0),a[0].addEventListener("canplay",t.proxy(this.videoPlayerReady,this,a))))},n.prototype.getCanvas=function(){return this.helperElements.canvas},n.prototype.videoPlayerError=function(t){t.remove()},n.prototype.videoPlayerReady=function(i){i.data("ratio",i[0].videoWidth/i[0].videoHeight),i.addClass("n2-active"),this.slider.ready(t.proxy(function(){this.slider.sliderElement.on("SliderResize",t.proxy(this.resizeVideo,this,i)),this.resizeVideo(i)},this))},n.prototype.resizeVideo=function(t){var i=t.data("mode"),e=t.data("ratio"),n=this.slider.dimensions.slideouter||this.slider.dimensions.slide,s=n.width/n.height;"fill"==i?s>e?t.css({width:"100%",height:"auto"}):t.css({width:"auto",height:"100%"}):"fit"==i&&(e>s?t.css({width:"100%",height:"auto"}):t.css({width:"auto",height:"100%"}))},i.NextendSmartSliderResponsiveSimple=n}(n2,window),function(t,i,e){function n(i,e){this.type="simple",this.responsiveClass="NextendSmartSliderResponsiveSimple",e=t.extend({bgAnimations:0,carousel:1},e),NextendSmartSliderAbstract.prototype.constructor.call(this,i,e)}n.prototype=Object.create(NextendSmartSliderAbstract.prototype),n.prototype.constructor=n,n.prototype.initMainAnimation=function(){nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d&&this.parameters.bgAnimations?this.mainAnimation=new NextendSmartSliderFrontendBackgroundAnimation(this,this.parameters.mainanimation,this.parameters.bgAnimations):this.mainAnimation=new NextendSmartSliderMainAnimationSimple(this,this.parameters.mainanimation)},i.NextendSmartSliderSimple=n}(n2,window);
library/media/plugins/type/simple/simple/style.n2less ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import 'elements.n2less';
2
+ @import '@{clear}';
3
+ @import 'backgroundanimation.n2less';
4
+
5
+ (~'div@{id}') {
6
+ width: @width;
7
+ height: @height;
8
+ float: left;
9
+
10
+ html[dir="rtl"] & {
11
+ float: right;
12
+ }
13
+
14
+ .n2-ss-slider-1 {
15
+ position: relative;
16
+ padding-top: @paddingt;
17
+ padding-right: @paddingr;
18
+ padding-bottom: @paddingb;
19
+ padding-left: @paddingl;
20
+ height: @inner1height;
21
+ border-style: solid;
22
+ border-width: @border;
23
+ border-color: @borderhex;
24
+ border-color: @borderrgba;
25
+ .border-radius(@borderRadius, @borderRadius, @borderRadius, @borderRadius);
26
+ background-repeat: repeat;
27
+ background-position: 50% 50%;
28
+ background-size: @backgroundSize;
29
+ background-attachment: @backgroundAttachment;
30
+ }
31
+
32
+ .n2-ss-slider-background-video-container {
33
+ position: absolute;
34
+ left: 0;
35
+ top: 0;
36
+ width: 100%;
37
+ height: 100%;
38
+ overflow: hidden;
39
+ }
40
+
41
+ .n2-ss-slider-background-video {
42
+
43
+ }
44
+
45
+ .n2-ss-slider-2 {
46
+ position: relative;
47
+ width: 100%;
48
+ height: 100%;
49
+ }
50
+
51
+ .n2-ss-slider-3 {
52
+ position: relative;
53
+ width: 100%;
54
+ height: 100%;
55
+ overflow: hidden;
56
+ outline: 1px solid transparent;
57
+ z-index: 10;
58
+ }
59
+
60
+ .x-firefox & .n2-ss-slider-2 {
61
+ opacity: 0.99999;
62
+ }
63
+
64
+ .n2-ss-slide {
65
+ position: absolute;
66
+ top: 0;
67
+ left: 0;
68
+ width: @canvaswidth;
69
+ height: @canvasheight;
70
+ z-index: 2;
71
+ display: block;
72
+ -webkit-backface-visibility: hidden;
73
+ }
74
+
75
+ .n2-ss-layers-container {
76
+ position: relative;
77
+ width: @canvaswidth;
78
+ height: @canvasheight;
79
+ }
80
+
81
+ .n2-ss-slide-active {
82
+ z-index: 3;
83
+ }
84
+ }
library/media/plugins/type/simple/simple/subformimage.png ADDED
Binary file
library/media/plugins/widget/arrow/arrow/disabled.png ADDED
Binary file
library/media/plugins/widget/autoplay/autoplay/disabled.png ADDED
Binary file
library/media/plugins/widget/bar/bar/disabled.png ADDED
Binary file
library/media/plugins/widget/bullet/bullet/disabled.png ADDED
Binary file
library/media/plugins/widget/shadow/shadow/disabled.png ADDED
Binary file
library/media/plugins/widget/thumbnail/thumbnail/disabled.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/arrow.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($, scope, undefined) {
2
+ function NextendSmartSliderWidgetArrowImage(id, desktopRatio, tabletRatio, mobileRatio) {
3
+ this.slider = window[id];
4
+
5
+ this.slider.started($.proxy(this.start, this, id, desktopRatio, tabletRatio, mobileRatio));
6
+ };
7
+
8
+ NextendSmartSliderWidgetArrowImage.prototype.start = function (id, desktopRatio, tabletRatio, mobileRatio) {
9
+ if (this.slider.sliderElement.data('arrow')) {
10
+ return false;
11
+ }
12
+ this.slider.sliderElement.data('arrow', this);
13
+
14
+ this.deferred = $.Deferred();
15
+
16
+ this.slider.sliderElement
17
+ .on('SliderDevice', $.proxy(this.onDevice, this))
18
+ .trigger('addWidget', this.deferred);
19
+
20
+ this.previous = $('#' + id + '-arrow-previous').on('click', $.proxy(function (e) {
21
+ e.stopPropagation();
22
+ this.slider[nextend.rtl.previous]();
23
+ }, this));
24
+
25
+ this.previousResize = this.previous.find('.n2-resize');
26
+ if (this.previousResize.length == 0) {
27
+ this.previousResize = this.previous;
28
+ }
29
+
30
+
31
+ this.next = $('#' + id + '-arrow-next').on('click', $.proxy(function (e) {
32
+ e.stopPropagation();
33
+ this.slider[nextend.rtl.next]();
34
+ }, this));
35
+
36
+ this.nextResize = this.next.find('.n2-resize');
37
+ if (this.nextResize.length == 0) {
38
+ this.nextResize = this.next;
39
+ }
40
+
41
+ this.desktopRatio = desktopRatio;
42
+ this.tabletRatio = tabletRatio;
43
+ this.mobileRatio = mobileRatio;
44
+
45
+ $.when(this.previous.n2imagesLoaded(), this.next.n2imagesLoaded()).always($.proxy(this.loaded, this));
46
+ };
47
+
48
+ NextendSmartSliderWidgetArrowImage.prototype.loaded = function () {
49
+ this.previousWidth = this.previousResize.width();
50
+ this.previousHeight = this.previousResize.height();
51
+
52
+ this.nextWidth = this.nextResize.width();
53
+ this.nextHeight = this.nextResize.height();
54
+ this.onDevice(null, {device: this.slider.responsive.getDeviceMode()});
55
+
56
+ this.deferred.resolve();
57
+ };
58
+
59
+ NextendSmartSliderWidgetArrowImage.prototype.onDevice = function (e, device) {
60
+ var ratio = 1;
61
+ switch (device.device) {
62
+ case 'tablet':
63
+ ratio = this.tabletRatio;
64
+ break;
65
+ case 'mobile':
66
+ ratio = this.mobileRatio;
67
+ break;
68
+ default:
69
+ ratio = this.desktopRatio;
70
+ }
71
+ this.previousResize.width(this.previousWidth * ratio);
72
+ this.previousResize.height(this.previousHeight * ratio);
73
+ this.nextResize.width(this.nextWidth * ratio);
74
+ this.nextResize.height(this.nextHeight * ratio);
75
+ };
76
+
77
+
78
+ scope.NextendSmartSliderWidgetArrowImage = NextendSmartSliderWidgetArrowImage;
79
+ })(n2, window);
library/media/plugins/widgetarrow/image/image/arrow.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,i,t){function s(i,t,s,h){this.slider=window[i],this.slider.started(e.proxy(this.start,this,i,t,s,h))}s.prototype.start=function(i,t,s,h){return this.slider.sliderElement.data("arrow")?!1:(this.slider.sliderElement.data("arrow",this),this.deferred=e.Deferred(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onDevice,this)).trigger("addWidget",this.deferred),this.previous=e("#"+i+"-arrow-previous").on("click",e.proxy(function(e){e.stopPropagation(),this.slider[nextend.rtl.previous]()},this)),this.previousResize=this.previous.find(".n2-resize"),0==this.previousResize.length&&(this.previousResize=this.previous),this.next=e("#"+i+"-arrow-next").on("click",e.proxy(function(e){e.stopPropagation(),this.slider[nextend.rtl.next]()},this)),this.nextResize=this.next.find(".n2-resize"),0==this.nextResize.length&&(this.nextResize=this.next),this.desktopRatio=t,this.tabletRatio=s,this.mobileRatio=h,void e.when(this.previous.n2imagesLoaded(),this.next.n2imagesLoaded()).always(e.proxy(this.loaded,this)))},s.prototype.loaded=function(){this.previousWidth=this.previousResize.width(),this.previousHeight=this.previousResize.height(),this.nextWidth=this.nextResize.width(),this.nextHeight=this.nextResize.height(),this.onDevice(null,{device:this.slider.responsive.getDeviceMode()}),this.deferred.resolve()},s.prototype.onDevice=function(e,i){var t=1;switch(i.device){case"tablet":t=this.tabletRatio;break;case"mobile":t=this.mobileRatio;break;default:t=this.desktopRatio}this.previousResize.width(this.previousWidth*t),this.previousResize.height(this.previousHeight*t),this.nextResize.width(this.nextWidth*t),this.nextResize.height(this.nextHeight*t)},i.NextendSmartSliderWidgetArrowImage=s}(n2,window);
library/media/plugins/widgetarrow/image/image/image.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/imageBigRectangle.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/imageEmpty.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/imageSmallRectangle.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/imageVertical.png ADDED
Binary file
library/media/plugins/widgetarrow/image/image/next/circle-stroke.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M18.19 11.087c-.235-.206-.54-.337-.878-.337-.724 0-1.312.588-1.312 1.313 0 .387.17.73.438.972l1.83 1.652H10.31C9.588 14.687 9 15.275 9 16s.588 1.313 1.313 1.313h7.954l-1.833 1.65c-.263.243-.434.587-.434.974 0 .725.588 1.313 1.313 1.313.337 0 .642-.13.875-.34l4.378-3.934c.263-.244.434-.588.434-.976s-.17-.732-.438-.972l-4.37-3.94zM16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25.375C9.718 27.375 4.625 22.282 4.625 16S9.718 4.625 16 4.625 27.375 9.718 27.375 16 22.282 27.375 16 27.375z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/full.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M12 8.99c0-.423.204-.722.61-.897.408-.173.772-.104 1.092.21l7.006 6.974c.202.2.298.437.287.716 0 .267-.096.498-.287.69l-7.006 7c-.32.32-.684.39-1.092.21-.406-.175-.61-.483-.61-.923V8.99z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/normal.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M13.286 25.61c-.24.253-.52.377-.84.377-.318 0-.6-.124-.84-.376l-1.245-1.297c-.24-.252-.36-.544-.36-.878 0-.334.12-.626.36-.878l6.328-6.6L10.36 9.43c-.24-.25-.36-.54-.36-.864 0-.323.12-.612.36-.864l1.245-1.325c.24-.252.523-.377.848-.377.323 0 .602.125.833.377l8.366 8.746c.24.25.363.546.363.882 0 .34-.122.634-.363.886l-8.366 8.72z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/simple-horizontal.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22 15.997v-.003c0-.404-.176-.768-.46-1.028h.002l-9-8.572-.004.004C12.268 6.15 11.902 6 11.5 6c-.83 0-1.5.64-1.5 1.43 0 .432.203.82.523 1.082l7.86 7.485-7.963 7.583c-.26.257-.42.606-.42.99 0 .79.67 1.43 1.5 1.43.404 0 .77-.153 1.04-.4l9.002-8.57v-.002c.282-.26.458-.624.458-1.028v-.003z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/simple-vertical.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M23.58 10.42l-7.583 7.962-7.485-7.86C8.25 10.202 7.862 10 7.43 10 6.64 10 6 10.67 6 11.5c0 .403.15.768.398 1.037l-.004.004 8.57 9.003h.002c.26.282.624.458 1.028.458H16c.404 0 .77-.175 1.03-.46v.003l8.57-9c.247-.27.4-.637.4-1.042 0-.83-.64-1.5-1.43-1.5-.384 0-.733.16-.99.42z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/thin-horizontal.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M10.722 4.293c-.394-.39-1.032-.39-1.427 0-.393.39-.393 1.03 0 1.42l11.283 10.28-11.283 10.29c-.393.39-.393 1.02 0 1.42.395.39 1.033.39 1.427 0l12.007-10.94c.21-.21.3-.49.284-.77.014-.27-.076-.55-.286-.76L10.72 4.293z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/next/thin-vertical.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M27.7 9.293c-.393-.39-1.03-.39-1.42 0l-10.284 11.29L5.714 9.293c-.392-.39-1.028-.39-1.42 0-.392.4-.392 1.04 0 1.43l10.943 12.01c.21.21.486.3.76.28.273.02.55-.07.76-.28L27.7 10.723c.39-.39.39-1.03 0-1.43" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/previous/circle-stroke.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M21.688 14.688h-7.955l1.833-1.65-.004-.003c.267-.24.438-.585.438-.973 0-.724-.588-1.312-1.313-1.312-.337 0-.642.13-.874.34l-.004-.003-4.376 3.937.004.004C9.17 15.268 9 15.612 9 16s.17.732.438.972l-.004.004 4.375 3.937.002-.003c.233.21.538.34.876.34.724 0 1.312-.588 1.312-1.313 0-.387-.17-.73-.438-.972l.004-.003-1.833-1.65h7.954c.725 0 1.313-.587 1.313-1.312 0-.725-.588-1.313-1.313-1.313zM16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25.375C9.718 27.375 4.625 22.282 4.625 16S9.718 4.625 16 4.625 27.375 9.718 27.375 16 22.282 27.375 16 27.375z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/previous/full.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="#FFF" opacity="1" fill-rule="evenodd" d="M18.9958 8.9907c0-.424-.204-.723-.61-.898-.409-.173-.772-.104-1.093.209l-7.006 6.975c-.201.199-.297.437-.286.716 0 .267.096.498.286.689l7.006 7.001c.321.321.684.389 1.093.209.406-.174.61-.482.61-.922V8.9907z"/></svg>
library/media/plugins/widgetarrow/image/image/previous/normal.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path fill="#FFF" fill-rule="evenodd" d="M20.654 9.43l-6.326 6.525 6.326 6.6c.242.253.36.545.36.88 0 .333-.118.625-.36.877l-1.244 1.3c-.24.25-.523.375-.84.375-.32 0-.6-.124-.84-.376l-8.367-8.72c-.24-.25-.363-.54-.363-.88 0-.334.122-.63.363-.88l8.367-8.75c.23-.252.51-.377.83-.377.325 0 .607.126.85.378l1.242 1.326c.242.252.36.54.36.864 0 .32-.118.61-.36.86z" opacity="1"/>
3
+ </svg>
library/media/plugins/widgetarrow/image/image/previous/simple-horizontal.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M21.58 23.58l-7.962-7.583 7.86-7.485c.32-.262.522-.65.522-1.083C22 6.64 21.328 6 20.5 6c-.403 0-.768.15-1.038.398l-.004-.004-9 8.57v.002c-.282.26-.458.624-.458 1.028V16c0 .404.176.77.46 1.03h-.002l9 8.57c.27.247.638.4 1.042.4.83 0 1.5-.64 1.5-1.43 0-.384-.16-.733-.42-.99z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/previous/simple-vertical.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M8.42 21.58l7.583-7.962 7.485 7.86c.262.32.65.522 1.083.522.79 0 1.43-.672 1.43-1.5 0-.403-.15-.768-.397-1.037l.004-.005-8.57-9h-.002c-.26-.282-.624-.458-1.028-.458H16c-.404 0-.77.176-1.03.46v-.002l-8.57 9c-.247.27-.4.638-.4 1.042 0 .83.64 1.5 1.43 1.5.384 0 .733-.16.99-.42z" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/previous/thin-horizontal.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M11.433 15.992L22.69 5.712c.393-.39.393-1.03 0-1.42-.393-.39-1.03-.39-1.423 0l-11.98 10.94c-.21.21-.3.49-.285.76-.015.28.075.56.284.77l11.98 10.94c.393.39 1.03.39 1.424 0 .393-.4.393-1.03 0-1.42l-11.257-10.29" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/previous/thin-vertical.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M27.7 21.263L16.756 9.283c-.21-.21-.487-.3-.76-.28-.274-.02-.55.07-.76.28L4.292 21.263c-.39.4-.39 1.03 0 1.43.393.39 1.03.39 1.42 0l10.283-11.26 10.284 11.26c.39.39 1.026.39 1.42 0 .39-.4.39-1.03 0-1.43" fill="#FFF" opacity="1" fill-rule="evenodd"/></svg>
library/media/plugins/widgetarrow/image/image/style.n2less ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (~'div#@{sliderid}') {
2
+ .nextend-arrow {
3
+ cursor: pointer;
4
+ overflow: hidden;
5
+ line-height: 0 !important;
6
+ }
7
+
8
+ .nextend-arrow img {
9
+ vertical-align: top;
10
+ width: auto;
11
+ height: auto;
12
+ max-width: 100%;
13
+ max-height: 100%;
14
+ display: inline;
15
+ }
16
+
17
+ .nextend-arrow img.n2-arrow-hover-img {
18
+ display: none;
19
+ }
20
+
21
+ .nextend-arrow:HOVER img.n2-arrow-hover-img {
22
+ display: inline;
23
+ }
24
+
25
+ .nextend-arrow:HOVER img.n2-arrow-normal-img {
26
+ display: none;
27
+ }
28
+
29
+ .nextend-arrow-animated {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .nextend-arrow-animated > div {
34
+ position: relative;
35
+ }
36
+
37
+ .nextend-arrow-animated .n2-active {
38
+ position: absolute;
39
+ }
40
+
41
+ .nextend-arrow-animated-fade {
42
+ transition: background 0.3s, opacity 0.4s;
43
+ }
44
+
45
+ .nextend-arrow-animated-horizontal > div {
46
+ transition: all 0.4s;
47
+ left: 0;
48
+ }
49
+
50
+ .nextend-arrow-animated-horizontal .n2-active {
51
+ top: 0;
52
+ }
53
+
54
+ .nextend-arrow-previous.nextend-arrow-animated-horizontal:HOVER > div,
55
+ .nextend-arrow-next.nextend-arrow-animated-horizontal .n2-active {
56
+ left: -100%;
57
+ }
58
+
59
+ .nextend-arrow-previous.nextend-arrow-animated-horizontal .n2-active,
60
+ .nextend-arrow-next.nextend-arrow-animated-horizontal:HOVER > div {
61
+ left: 100%;
62
+ }
63
+
64
+ .nextend-arrow.nextend-arrow-animated-horizontal:HOVER .n2-active {
65
+ left: 0;
66
+ }
67
+
68
+ .nextend-arrow-animated-vertical > div {
69
+ transition: all 0.4s;
70
+ top: 0;
71
+ }
72
+
73
+ .nextend-arrow-animated-vertical .n2-active {
74
+ left: 0;
75
+ }
76
+
77
+ .nextend-arrow-animated-vertical .n2-active {
78
+ top: -100%;
79
+ }
80
+
81
+ .nextend-arrow-animated-vertical:HOVER > div {
82
+ top: 100%;
83
+ }
84
+
85
+ .nextend-arrow-animated-vertical:HOVER .n2-active {
86
+ top: 0;
87
+ }
88
+ }
library/media/plugins/widgetautoplay/image/image/autoplay.js ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($, scope, undefined) {
2
+ "use strict";
3
+ function NextendSmartSliderWidgetAutoplayImage(id, desktopRatio, tabletRatio, mobileRatio) {
4
+
5
+ this.slider = window[id];
6
+
7
+ this.slider.started($.proxy(this.start, this, id, desktopRatio, tabletRatio, mobileRatio));
8
+ };
9
+
10
+ NextendSmartSliderWidgetAutoplayImage.prototype.start = function (id, desktopRatio, tabletRatio, mobileRatio) {
11
+
12
+ if (this.slider.sliderElement.data('autoplay')) {
13
+ return false;
14
+ }
15
+ this.slider.sliderElement.data('autoplay', this);
16
+
17
+ this.paused = false;
18
+
19
+ this.button = this.slider.sliderElement.find('.nextend-autoplay');
20
+
21
+ // Autoplay not enabled, so just destroy the widget
22
+ if (this.slider.controls.autoplay._disabled) {
23
+ this.destroy();
24
+ } else {
25
+ if (!this.slider.controls.autoplay.parameters.start) {
26
+ this.paused = true;
27
+ this.setPaused();
28
+ }
29
+ this.deferred = $.Deferred();
30
+ this.slider.sliderElement
31
+ .on({
32
+ 'SliderDevice.n2-widget-autoplay': $.proxy(this.onDevice, this),
33
+ 'autoplayStarted.n2-widget-autoplay': $.proxy(this.setPlaying, this),
34
+ 'autoplayPaused.n2-widget-autoplay': $.proxy(this.setPaused, this),
35
+ 'autoplayDisabled.n2-widget-autoplay': $.proxy(this.destroy, this)
36
+ })
37
+ .trigger('addWidget', this.deferred);
38
+
39
+ this.button.on('universalclick', $.proxy(this.switchState, this));
40
+
41
+ this.desktopRatio = desktopRatio;
42
+ this.tabletRatio = tabletRatio;
43
+ this.mobileRatio = mobileRatio;
44
+
45
+ this.button.n2imagesLoaded().always($.proxy(this.loaded, this));
46
+ }
47
+ };
48
+
49
+ NextendSmartSliderWidgetAutoplayImage.prototype.loaded = function () {
50
+ this.width = this.button.width();
51
+ this.height = this.button.height();
52
+
53
+ this.onDevice(null, {device: this.slider.responsive.getDeviceMode()});
54
+
55
+ this.deferred.resolve();
56
+ };
57
+
58
+ NextendSmartSliderWidgetAutoplayImage.prototype.onDevice = function (e, device) {
59
+ var ratio = 1;
60
+ switch (device.device) {
61
+ case 'tablet':
62
+ ratio = this.tabletRatio;
63
+ break;
64
+ case 'mobile':
65
+ ratio = this.mobileRatio;
66
+ break;
67
+ default:
68
+ ratio = this.desktopRatio;
69
+ }
70
+ this.button.width(this.width * ratio);
71
+ this.button.height(this.height * ratio);
72
+ };
73
+
74
+ NextendSmartSliderWidgetAutoplayImage.prototype.switchState = function (e) {
75
+ e.preventDefault();
76
+ e.stopImmediatePropagation();
77
+ if (!this.paused) {
78
+ this.setPaused();
79
+ this.slider.sliderElement.triggerHandler('autoplayExtraWait', 'autoplayButton');
80
+ } else {
81
+ this.setPlaying();
82
+ this.slider.sliderElement.triggerHa