Unlimited Elements For Elementor (Free Widgets, Addons, Templates) - Version 1.5.31

Version Description

Download this release

Release Info

Developer valiano
Plugin Icon 128x128 Unlimited Elements For Elementor (Free Widgets, Addons, Templates)
Version 1.5.31
Comparing to
See all releases

Code changes from version 1.5.22 to 1.5.31

Files changed (70) hide show
  1. assets_libraries/filters/ue_filters.js +238 -74
  2. assets_libraries/owl-carousel-new/owl.carousel.js +34 -15
  3. assets_libraries/owl-carousel-new/owl.carousel.min.js +1 -1
  4. assets_libraries/remote/ue-remote-controls.js +92 -11
  5. assets_libraries/unitegallery/css/unite-gallery.css +62 -110
  6. assets_libraries/unitegallery/js/unitegallery.js +663 -459
  7. assets_libraries/unitegallery/js/unitegallery.min.js +2 -2
  8. assets_libraries/unitegallery/release_log.txt +14 -1
  9. assets_libraries/unitegallery/skins/default/slider_bullets.png +0 -0
  10. assets_libraries/unitegallery/skins/default/tile_bullets_blue.png +0 -0
  11. assets_libraries/unitegallery/skins/default/tile_bullets_brown.png +0 -0
  12. assets_libraries/unitegallery/skins/default/tile_bullets_gray.png +0 -0
  13. assets_libraries/unitegallery/skins/default/tile_bullets_green.png +0 -0
  14. assets_libraries/unitegallery/skins/default/tile_bullets_red.png +0 -0
  15. css/unitecreator_styles.css +37 -0
  16. inc_php/unitecreator_actions.class.php +4 -0
  17. inc_php/unitecreator_addon_config.class.php +4 -3
  18. inc_php/unitecreator_addons.class.php +42 -19
  19. inc_php/unitecreator_dialog_param.class.php +6 -0
  20. inc_php/unitecreator_entrance_animations.class.php +13 -10
  21. inc_php/unitecreator_filters_process.class.php +231 -97
  22. inc_php/unitecreator_operations.class.php +19 -1
  23. inc_php/unitecreator_output.class.php +14 -3
  24. inc_php/unitecreator_params_processor.class.php +9 -4
  25. inc_php/unitecreator_settings_output.class.php +5 -1
  26. inc_php/unitecreator_template_engine.class.php +10 -3
  27. includes.php +1 -1
  28. js/admin.js +2 -1
  29. js/unitecreator_helper.js +331 -0
  30. js/unitecreator_testaddon_new.js +116 -0
  31. provider/acf_integrate.class.php +5 -2
  32. provider/admin_notices.class.php +53 -3
  33. provider/core/plugins/unlimited_elements/copy_paste.class.php +0 -247
  34. provider/core/plugins/unlimited_elements/dialog_param_elementor.class.php +16 -0
  35. provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js +47 -12
  36. provider/core/plugins/unlimited_elements/elementor/elementor_integrate.class.php +70 -26
  37. provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php +33 -10
  38. provider/core/plugins/unlimited_elements/elementor/pagination.class.php +10 -7
  39. provider/core/plugins/unlimited_elements/elementor/plugin.php +2 -2
  40. provider/core/plugins/unlimited_elements/globals.class.php +34 -0
  41. provider/core/plugins/unlimited_elements/helper_provider_core.class.php +1 -1
  42. provider/core/plugins/unlimited_elements/provider_core_admin.class.php +5 -3
  43. provider/freemius/includes/class-freemius.php +1 -3
  44. provider/freemius/includes/managers/class-fs-key-value-storage.php +10 -0
  45. provider/freemius/languages/freemius-cs_CZ.mo +0 -0
  46. provider/freemius/languages/freemius-da_DK.mo +0 -0
  47. provider/freemius/languages/freemius-de_DE.mo +0 -0
  48. provider/freemius/languages/freemius-en.mo +0 -0
  49. provider/freemius/languages/freemius-es_ES.mo +0 -0
  50. provider/freemius/languages/freemius-fr_FR.mo +0 -0
  51. provider/freemius/languages/freemius-he_IL.mo +0 -0
  52. provider/freemius/languages/freemius-hu_HU.mo +0 -0
  53. provider/freemius/languages/freemius-it_IT.mo +0 -0
  54. provider/freemius/languages/freemius-ja.mo +0 -0
  55. provider/freemius/languages/freemius-nl_NL.mo +0 -0
  56. provider/freemius/languages/freemius-ru_RU.mo +0 -0
  57. provider/freemius/languages/freemius-ta.mo +0 -0
  58. provider/freemius/languages/freemius-zh_CN.mo +0 -0
  59. provider/freemius/languages/freemius.pot +584 -1172
  60. provider/freemius/package.json +1 -1
  61. provider/freemius/start.php +1 -1
  62. provider/functions_wordpress.class.php +22 -1
  63. provider/integrations.class.php +4 -1
  64. provider/provider_functions.class.php +13 -1
  65. provider/provider_helper.class.php +1 -0
  66. provider/provider_params_processor.class.php +230 -42
  67. provider/provider_settings.class.php +54 -13
  68. provider/provider_settings_multisource.class.php +73 -15
  69. provider/provider_template_engine.class.php +6 -1
  70. readme.txt +538 -66
assets_libraries/filters/ue_filters.js CHANGED
@@ -5,11 +5,14 @@ function UEDynamicFilters(){
5
  var g_urlAjax, g_lastGridAjaxCall, g_cache = {}, g_objBody;
6
  var g_remote = null, g_lastSyncGrids;
7
 
 
 
8
  var g_types = {
9
  PAGINATION:"pagination",
10
  LOADMORE:"loadmore",
11
  TERMS_LIST:"terms_list",
12
- SEARCH: "search"
 
13
  };
14
 
15
  var g_vars = {
@@ -17,12 +20,16 @@ function UEDynamicFilters(){
17
  CLASS_GRID:"uc-filterable-grid",
18
  DEBUG_AJAX_OPTIONS: false,
19
  CLASS_CLICKED:"uc-clicked",
20
- CLASS_HIDDEN: "uc-filter-hidden",
21
  CLASS_INITING: "uc-filter-initing",
 
22
  CLASS_REFRESH_SOON: "uc-ajax-refresh-soon",
23
  EVENT_SET_HTML_ITEMS: "uc_ajax_sethtml",
24
  EVENT_AJAX_REFRESHED: "uc_ajax_refreshed", //on grid
25
- EVENT_AJAX_REFRESHED_BODY: "uc_ajax_refreshed_body" //on grid
 
 
 
26
  };
27
 
28
  var g_options = {
@@ -132,6 +139,19 @@ function UEDynamicFilters(){
132
  */
133
  function getClosestByOffset(objParents, objElement, isVertical){
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  var objClosest = null;
136
  var minDiff = 1000000;
137
 
@@ -140,8 +160,19 @@ function UEDynamicFilters(){
140
  jQuery.each(objParents, function(index, parent){
141
 
142
  var objParent = jQuery(parent);
143
-
 
 
144
  var distance = 0;
 
 
 
 
 
 
 
 
 
145
  var parentOffset = objParent.offset();
146
 
147
  if(isVertical == true){
@@ -161,14 +192,32 @@ function UEDynamicFilters(){
161
 
162
  var distance = getOffsetsDistance(parentOffset, elementOffset);
163
  }
164
-
 
 
 
 
 
 
 
 
165
  if(distance < minDiff){
166
  minDiff = distance;
167
- objClosest = objParent;
168
  }
169
 
170
  });
171
-
 
 
 
 
 
 
 
 
 
 
172
  return(objClosest);
173
  }
174
 
@@ -196,23 +245,31 @@ function UEDynamicFilters(){
196
 
197
  //in case there are nothing:
198
  var objGrids = getAllGrids();
199
-
200
  if(objGrids.length == 0)
201
  return(null);
202
 
203
- //get from current section
 
 
 
 
 
 
 
 
204
  var objSection = objSource.parents("section");
205
 
206
  var objGrid = objSection.find("."+ g_vars.CLASS_GRID);
207
 
208
  if(objGrid.length == 1)
209
  return(objGrid);
210
-
211
  //get closest by offset
212
 
213
- var objSingleGrid = getClosestByOffset(objGrid, objSource, true);
214
-
215
- if(objSingleGrid.length == 1)
216
  return(objSingleGrid);
217
 
218
  //return first grid in the list
@@ -372,12 +429,11 @@ function UEDynamicFilters(){
372
  if(!objGrids)
373
  objGrids = objGrid;
374
  else
375
- objGrids.add(objGrid);
376
-
377
  arrWidgetIDs.push(objWidgetID);
378
  }
379
 
380
-
381
  var strWidgetIDs = arrWidgetIDs.toString();
382
 
383
  var objOutput = {};
@@ -411,7 +467,13 @@ function UEDynamicFilters(){
411
  //get synced grids
412
 
413
  var objSyncedData = getSyncedWidgetData(objElement);
414
-
 
 
 
 
 
 
415
  //get layout id
416
  var objLayout = objWidget.parents(".elementor");
417
 
@@ -526,13 +588,22 @@ function UEDynamicFilters(){
526
 
527
  switch(role){
528
  case "child":
529
- if(isHideChildren == true)
530
- objFilter.addClass(g_vars.CLASS_HIDDEN);
531
- else
532
- objFilter.removeClass(g_vars.CLASS_HIDDEN);
533
 
534
- //put initing class
535
- objFilter.addClass(g_vars.CLASS_INITING);
 
 
 
 
 
 
 
 
 
 
 
 
 
536
 
537
  break;
538
  }
@@ -559,6 +630,13 @@ function UEDynamicFilters(){
559
  objAll.addClass("uc-selected");
560
 
561
  break;
 
 
 
 
 
 
 
562
  }
563
 
564
  }
@@ -582,7 +660,7 @@ function UEDynamicFilters(){
582
  return(null);
583
 
584
  var numPage = objCurrentLink.text();
585
-
586
  if(jQuery.isNumeric(numPage) == false)
587
  numPage = null;
588
 
@@ -639,7 +717,6 @@ function UEDynamicFilters(){
639
  return(false);
640
  }
641
 
642
-
643
  objLinkCurrent.removeClass("current");
644
 
645
  objLink.addClass("current");
@@ -650,12 +727,12 @@ function UEDynamicFilters(){
650
  throw new Error("Grid not found!");
651
 
652
  //run the ajax, prevent default
653
-
 
654
  objPagination.addClass(g_vars.CLASS_CLICKED);
655
 
656
- refreshAjaxGrid(objGrid);
657
 
658
- event.preventDefault();
659
  return(false);
660
  }
661
 
@@ -728,10 +805,29 @@ function UEDynamicFilters(){
728
 
729
  objLoadMore.addClass(g_vars.CLASS_CLICKED);
730
 
731
- refreshAjaxGrid(objGrid, "loadmore");
732
 
733
  }
734
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
 
736
 
737
  function ________TERMS_LIST_______________(){}
@@ -745,19 +841,38 @@ function UEDynamicFilters(){
745
  var className = "uc-selected";
746
 
747
  event.preventDefault();
748
-
749
  var objLink = jQuery(this);
750
 
751
- var objTermsFilter = objLink.parents(".uc-grid-filter");
 
 
 
 
 
 
 
 
 
752
 
753
- //set not refresh next iteration, because of the clicked
754
- setNoRefreshFilter(objTermsFilter);
 
 
 
755
 
756
- var objActiveLinks = objLink.siblings("."+className).not(objLink);
 
 
 
 
 
 
 
757
 
758
- objActiveLinks.removeClass(className);
759
- objLink.addClass(className);
760
 
 
 
761
  var objGrid = objTermsFilter.data("grid");
762
 
763
  if(!objGrid || objGrid.length == 0)
@@ -785,15 +900,26 @@ function UEDynamicFilters(){
785
  * get terms list term id
786
  */
787
  function getTermsListSelectedTerm(objFilter){
788
-
789
  if(!objFilter)
790
  return(null);
791
 
 
 
792
  var objSelected = objFilter.find(".uc-selected");
793
 
 
 
 
 
 
 
 
 
 
794
  if(objSelected.length == 0)
795
  return(null);
796
-
797
  var id = objSelected.data("id");
798
  var slug = objSelected.data("slug");
799
  var taxonomy = objSelected.data("taxonomy");
@@ -818,15 +944,16 @@ function UEDynamicFilters(){
818
  */
819
  function onFilterChange(){
820
 
821
- trace("filter change");
822
-
823
  var objFilter = jQuery(this);
824
 
825
- trace(objFilter);
826
 
 
827
 
 
828
  }
829
 
 
830
  function ________INIT_FILTERS_______________(){}
831
 
832
  /**
@@ -834,8 +961,13 @@ function UEDynamicFilters(){
834
  */
835
  function getFilterTaxIDs(objFilter, objIDs){
836
 
 
 
837
  //skip the if
838
- var objItems = objFilter.find(".ue_taxonomy_item");
 
 
 
839
 
840
  if(objItems.length == 0)
841
  return(objIDs);
@@ -851,6 +983,7 @@ function UEDynamicFilters(){
851
  objIDs[taxID] = true;
852
  });
853
 
 
854
  return(objIDs);
855
  }
856
 
@@ -1216,11 +1349,18 @@ function UEDynamicFilters(){
1216
 
1217
  var htmlInner = objHtml.html();
1218
 
 
 
 
 
 
 
1219
  objFilter.removeClass(g_vars.CLASS_INITING);
1220
  objFilter.removeClass(g_vars.CLASS_REFRESH_SOON);
1221
 
1222
  objFilter.html(htmlInner);
1223
 
 
1224
  //---- put the debug if exists
1225
 
1226
  var htmlDebug = null;
@@ -1592,9 +1732,12 @@ function UEDynamicFilters(){
1592
  */
1593
  function refreshAjaxGrid(objGrid, refreshType){
1594
 
1595
- var isLoadMore = (refreshType == "loadmore");
1596
  var isFiltersInit = (refreshType == "filters");
1597
 
 
 
 
1598
  //get all grid filters
1599
  var objFilters = objGrid.data("filters");
1600
 
@@ -1604,7 +1747,7 @@ function UEDynamicFilters(){
1604
  if(objFilters.length == 0)
1605
  return(false);
1606
 
1607
- var objAjaxOptions = getGridAjaxOptions(objFilters, objGrid, isFiltersInit);
1608
 
1609
  if(!objAjaxOptions){
1610
 
@@ -1643,14 +1786,8 @@ function UEDynamicFilters(){
1643
  var ajaxUrlInitial = objGrid.data("initajaxurl");
1644
 
1645
  history.replaceState({"ucaction":"change", "ajaxurl":ajaxUrlInitial, "gridid":gridID}, null, urlReplace);
1646
-
1647
- trace("replace");
1648
-
1649
  }
1650
 
1651
- //push new state
1652
- trace("push");
1653
-
1654
  history.pushState({"ucaction":"change", "ajaxurl":ajaxUrl, "gridid":gridID}, null, urlReplace); //with back
1655
 
1656
  }
@@ -1695,6 +1832,9 @@ function UEDynamicFilters(){
1695
  //ajax reload
1696
  g_lastGridAjaxCall = objGrid;
1697
 
 
 
 
1698
  ajaxRequest(ajaxUrl,null,null, function(response){
1699
 
1700
  if(isLoadMore !== true){
@@ -1722,7 +1862,21 @@ function UEDynamicFilters(){
1722
  /**
1723
  * get grid ajax options
1724
  */
1725
- function getGridAjaxOptions(objFilters, objGrid, isFiltersInitMode){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1726
 
1727
  if(!objFilters)
1728
  return(null);
@@ -1742,8 +1896,6 @@ function UEDynamicFilters(){
1742
  var strSelectedTerms = "";
1743
 
1744
 
1745
- //add widget id of the filter to refresh
1746
-
1747
  //get ajax options
1748
  jQuery.each(objFilters, function(index, objFilter){
1749
 
@@ -1763,16 +1915,16 @@ function UEDynamicFilters(){
1763
 
1764
  var paginationData = getPaginationSelectedData(objFilter);
1765
 
1766
- var urlPagination = getVal(paginationData, "url");
1767
-
1768
  var paginationPage = getVal(paginationData, "page");
1769
 
1770
  if(paginationPage)
1771
- page = paginationPage;
1772
- else
1773
- if(urlPagination)
1774
- urlAjax = urlPagination;
1775
-
 
 
1776
  objFilter.removeClass(g_vars.CLASS_CLICKED);
1777
  }
1778
 
@@ -1798,10 +1950,11 @@ function UEDynamicFilters(){
1798
 
1799
  break;
1800
  case g_types.TERMS_LIST:
 
1801
 
1802
  //if not init mode - take first item
1803
  var objTerm = getTermsListSelectedTerm(objFilter);
1804
-
1805
  if(objTerm){
1806
 
1807
  if(isFiltersInitMode == false)
@@ -1814,19 +1967,21 @@ function UEDynamicFilters(){
1814
  strSelectedTerms += termID;
1815
  }
1816
  }
1817
-
1818
  //replace mode
1819
 
1820
  var modeReplace = objFilter.data("replace-mode");
1821
  if(modeReplace === true)
1822
  isReplaceMode = true;
1823
 
 
 
 
1824
  break;
1825
  default:
1826
  throw new Error("Unknown filter type: "+type);
1827
  break;
1828
  }
1829
-
1830
 
1831
  //handle filters init mode
1832
 
@@ -1850,6 +2005,7 @@ function UEDynamicFilters(){
1850
  var isMainFilter = (filterRole == "main");
1851
 
1852
  //add to refresh filter if it's qualify
 
1853
  var isRefresh = true;
1854
 
1855
  if(isFiltersInitMode == false && isMainFilter === true)
@@ -2025,11 +2181,10 @@ function UEDynamicFilters(){
2025
  }
2026
 
2027
 
2028
-
2029
  /**
2030
  * init filter and bing to grid
2031
  */
2032
- function initFilter(objFilter){
2033
 
2034
  var objGrid = getClosestGrid(objFilter);
2035
 
@@ -2053,6 +2208,14 @@ function UEDynamicFilters(){
2053
  //bind filter to grid
2054
  bindFilterToGrid(objGrid, objFilter);
2055
 
 
 
 
 
 
 
 
 
2056
  }
2057
 
2058
 
@@ -2085,13 +2248,18 @@ function UEDynamicFilters(){
2085
  break;
2086
  case g_types.TERMS_LIST:
2087
 
2088
- objParent.on("click",".ue_taxonomy a.ue_taxonomy_item", onTermsLinkClick);
2089
 
2090
  break;
2091
  case g_types.SEARCH:
2092
 
2093
  objParent.on("filter_change",".uc-search-filter__input", onFilterChange);
2094
 
 
 
 
 
 
2095
  break;
2096
  default:
2097
  trace("init by type - unrecognized type: "+type);
@@ -2112,14 +2280,13 @@ function UEDynamicFilters(){
2112
  return(false);
2113
 
2114
  var arrTypes = {};
2115
-
2116
  jQuery.each(objFilters, function(index, filter){
2117
 
2118
  var objFilter = jQuery(filter);
2119
-
2120
- initFilter(objFilter);
2121
-
2122
  var type = getFilterType(objFilter);
 
 
2123
 
2124
  arrTypes[type] = true;
2125
 
@@ -2203,10 +2370,7 @@ function UEDynamicFilters(){
2203
 
2204
  if(!history.state)
2205
  return(true);
2206
-
2207
- trace("on pop");
2208
- trace(history.state);
2209
-
2210
  var action = getVal(history.state, "ucaction");
2211
 
2212
  if(!action)
5
  var g_urlAjax, g_lastGridAjaxCall, g_cache = {}, g_objBody;
6
  var g_remote = null, g_lastSyncGrids;
7
 
8
+ var g_showDebug = false;
9
+
10
  var g_types = {
11
  PAGINATION:"pagination",
12
  LOADMORE:"loadmore",
13
  TERMS_LIST:"terms_list",
14
+ SEARCH: "search",
15
+ SELECT: "select"
16
  };
17
 
18
  var g_vars = {
20
  CLASS_GRID:"uc-filterable-grid",
21
  DEBUG_AJAX_OPTIONS: false,
22
  CLASS_CLICKED:"uc-clicked",
23
+ CLASS_HIDDEN: "uc-filter-hidden", //don't refresh with this class
24
  CLASS_INITING: "uc-filter-initing",
25
+ CLASS_INITING_HIDDEN: "uc-initing-filter-hidden",
26
  CLASS_REFRESH_SOON: "uc-ajax-refresh-soon",
27
  EVENT_SET_HTML_ITEMS: "uc_ajax_sethtml",
28
  EVENT_AJAX_REFRESHED: "uc_ajax_refreshed", //on grid
29
+ EVENT_AJAX_REFRESHED_BODY: "uc_ajax_refreshed_body", //on grid
30
+ EVENT_INIT_FILTER:"init_filter",
31
+ REFRESH_MODE_PAGINATION: "pagination",
32
+ REFRESH_MODE_LOADMORE: "loadmore"
33
  };
34
 
35
  var g_options = {
139
  */
140
  function getClosestByOffset(objParents, objElement, isVertical){
141
 
142
+ if(objParents.length == 0){
143
+ throw new Error("get closest by offset error - grids not found");
144
+ }
145
+
146
+
147
+ if(g_showDebug == true){
148
+
149
+ trace("get closest grids for");
150
+ trace(objElement)
151
+ trace("parents");
152
+ trace(objParents);
153
+ }
154
+
155
  var objClosest = null;
156
  var minDiff = 1000000;
157
 
160
  jQuery.each(objParents, function(index, parent){
161
 
162
  var objParent = jQuery(parent);
163
+
164
+ var objGrid = jQuery(parent); //return this one
165
+
166
  var distance = 0;
167
+
168
+ var isVisible = objParent.is(":visible");
169
+
170
+ var constantHeight = null;
171
+
172
+ if(isVisible == false){
173
+ objParent = objParent.parent();
174
+ }
175
+
176
  var parentOffset = objParent.offset();
177
 
178
  if(isVertical == true){
192
 
193
  var distance = getOffsetsDistance(parentOffset, elementOffset);
194
  }
195
+
196
+ if(g_showDebug == true){
197
+
198
+ trace(objParent);
199
+ trace("distance: " + distance);
200
+
201
+ trace("is vertical: " + isVertical);
202
+ }
203
+
204
  if(distance < minDiff){
205
  minDiff = distance;
206
+ objClosest = objGrid;
207
  }
208
 
209
  });
210
+
211
+ if(g_showDebug == true){
212
+
213
+ trace("filter: ");
214
+ trace(objElement);
215
+
216
+ trace("Closest grid found:");
217
+ trace(objClosest);
218
+ }
219
+
220
+
221
  return(objClosest);
222
  }
223
 
245
 
246
  //in case there are nothing:
247
  var objGrids = getAllGrids();
248
+
249
  if(objGrids.length == 0)
250
  return(null);
251
 
252
+ if(g_showDebug == true){
253
+
254
+ trace("get closest grids");
255
+ trace(objSource);
256
+ trace(objGrids);
257
+ }
258
+
259
+ //get grid from current section
260
+
261
  var objSection = objSource.parents("section");
262
 
263
  var objGrid = objSection.find("."+ g_vars.CLASS_GRID);
264
 
265
  if(objGrid.length == 1)
266
  return(objGrid);
267
+
268
  //get closest by offset
269
 
270
+ var objSingleGrid = getClosestByOffset(objGrids, objSource, true);
271
+
272
+ if(objSingleGrid && objSingleGrid.length == 1)
273
  return(objSingleGrid);
274
 
275
  //return first grid in the list
429
  if(!objGrids)
430
  objGrids = objGrid;
431
  else
432
+ objGrids = objGrids.add(objGrid);
433
+
434
  arrWidgetIDs.push(objWidgetID);
435
  }
436
 
 
437
  var strWidgetIDs = arrWidgetIDs.toString();
438
 
439
  var objOutput = {};
467
  //get synced grids
468
 
469
  var objSyncedData = getSyncedWidgetData(objElement);
470
+
471
+ if(g_showDebug && objSyncedData){
472
+
473
+ trace("sync data");
474
+ trace(objSyncedData);
475
+ }
476
+
477
  //get layout id
478
  var objLayout = objWidget.parents(".elementor");
479
 
588
 
589
  switch(role){
590
  case "child":
 
 
 
 
591
 
592
+ if(isHideChildren == true){
593
+
594
+ //hide the child filters and not refresh
595
+
596
+ objFilter.addClass(g_vars.CLASS_HIDDEN);
597
+ }
598
+ else{
599
+
600
+ //hide the filters and refresh
601
+
602
+ objFilter.removeClass(g_vars.CLASS_HIDDEN);
603
+
604
+ objFilter.addClass(g_vars.CLASS_INITING);
605
+ objFilter.addClass(g_vars.CLASS_INITING_HIDDEN);
606
+ }
607
 
608
  break;
609
  }
630
  objAll.addClass("uc-selected");
631
 
632
  break;
633
+ case g_types.SELECT:
634
+
635
+ var objSelect = objFilter.find("select");
636
+ objSelect.val("");
637
+
638
+ break;
639
+
640
  }
641
 
642
  }
660
  return(null);
661
 
662
  var numPage = objCurrentLink.text();
663
+
664
  if(jQuery.isNumeric(numPage) == false)
665
  numPage = null;
666
 
717
  return(false);
718
  }
719
 
 
720
  objLinkCurrent.removeClass("current");
721
 
722
  objLink.addClass("current");
727
  throw new Error("Grid not found!");
728
 
729
  //run the ajax, prevent default
730
+ event.preventDefault();
731
+
732
  objPagination.addClass(g_vars.CLASS_CLICKED);
733
 
734
+ refreshAjaxGrid(objGrid, g_vars.REFRESH_MODE_PAGINATION);
735
 
 
736
  return(false);
737
  }
738
 
805
 
806
  objLoadMore.addClass(g_vars.CLASS_CLICKED);
807
 
808
+ refreshAjaxGrid(objGrid, g_vars.REFRESH_MODE_LOADMORE);
809
 
810
  }
811
 
812
+ function ________SELECT_______________(){}
813
+
814
+ /**
815
+ * init select filter, select the selected item (avoid cache)
816
+ */
817
+ function initSelectFilter(objFilter){
818
+
819
+ var objSelected = objFilter.find(".uc-selected");
820
+
821
+ if(objSelected.length == 0)
822
+ return(false);
823
+
824
+ var value = objSelected.attr("value");
825
+
826
+ var objSelect = objFilter.find("select");
827
+
828
+ objSelect.val(value);
829
+
830
+ }
831
 
832
 
833
  function ________TERMS_LIST_______________(){}
841
  var className = "uc-selected";
842
 
843
  event.preventDefault();
844
+
845
  var objLink = jQuery(this);
846
 
847
+ if(objLink.hasClass("uc-grid-filter")){
848
+
849
+ var objTermsFilter = objLink;
850
+
851
+ }else{
852
+
853
+ var objTermsFilter = objLink.parents(".uc-grid-filter");
854
+ }
855
+
856
+ var filterType = getFilterType(objTermsFilter);
857
 
858
+ if(filterType == g_types.SELECT){
859
+
860
+ var objLink = objTermsFilter.find("option:selected");
861
+
862
+ }
863
 
864
+ if(filterType == g_types.TERMS_LIST){
865
+
866
+ var objActiveLinks = objLink.siblings("."+className).not(objLink);
867
+
868
+ objActiveLinks.removeClass(className);
869
+ objLink.addClass(className);
870
+
871
+ }
872
 
 
 
873
 
874
+ //set not refresh next iteration, because of the clicked
875
+ setNoRefreshFilter(objTermsFilter);
876
  var objGrid = objTermsFilter.data("grid");
877
 
878
  if(!objGrid || objGrid.length == 0)
900
  * get terms list term id
901
  */
902
  function getTermsListSelectedTerm(objFilter){
903
+
904
  if(!objFilter)
905
  return(null);
906
 
907
+ var filterType = getFilterType(objFilter);
908
+
909
  var objSelected = objFilter.find(".uc-selected");
910
 
911
+ if(filterType == g_types.SELECT){
912
+
913
+ var objSelected = objFilter.find("option:selected");
914
+
915
+ }else{
916
+
917
+ var objSelected = objFilter.find(".uc-selected");
918
+ }
919
+
920
  if(objSelected.length == 0)
921
  return(null);
922
+
923
  var id = objSelected.data("id");
924
  var slug = objSelected.data("slug");
925
  var taxonomy = objSelected.data("taxonomy");
944
  */
945
  function onFilterChange(){
946
 
 
 
947
  var objFilter = jQuery(this);
948
 
949
+ setNoRefreshFilter(objFilter);
950
 
951
+ trace("filter chanage!");
952
 
953
+ return(false);
954
  }
955
 
956
+
957
  function ________INIT_FILTERS_______________(){}
958
 
959
  /**
961
  */
962
  function getFilterTaxIDs(objFilter, objIDs){
963
 
964
+ var type = getFilterType(objFilter);
965
+
966
  //skip the if
967
+ if(type == g_types.SELECT)
968
+ var objItems = objFilter.find("option");
969
+ else
970
+ var objItems = objFilter.find(".ue_taxonomy_item");
971
 
972
  if(objItems.length == 0)
973
  return(objIDs);
983
  objIDs[taxID] = true;
984
  });
985
 
986
+
987
  return(objIDs);
988
  }
989
 
1349
 
1350
  var htmlInner = objHtml.html();
1351
 
1352
+ //set the class
1353
+
1354
+ var filterClassName = objHtml.attr("class");
1355
+
1356
+ objFilter.attr("class", filterClassName);
1357
+
1358
  objFilter.removeClass(g_vars.CLASS_INITING);
1359
  objFilter.removeClass(g_vars.CLASS_REFRESH_SOON);
1360
 
1361
  objFilter.html(htmlInner);
1362
 
1363
+
1364
  //---- put the debug if exists
1365
 
1366
  var htmlDebug = null;
1732
  */
1733
  function refreshAjaxGrid(objGrid, refreshType){
1734
 
1735
+ var isLoadMore = (refreshType == g_vars.REFRESH_MODE_LOADMORE); //for the output
1736
  var isFiltersInit = (refreshType == "filters");
1737
 
1738
+ //for the options - not refresh other filters
1739
+ var isLoadMoreMode = (refreshType == g_vars.REFRESH_MODE_LOADMORE || refreshType == g_vars.REFRESH_MODE_PAGINATION);
1740
+
1741
  //get all grid filters
1742
  var objFilters = objGrid.data("filters");
1743
 
1747
  if(objFilters.length == 0)
1748
  return(false);
1749
 
1750
+ var objAjaxOptions = getGridAjaxOptions(objFilters, objGrid, isFiltersInit, isLoadMoreMode);
1751
 
1752
  if(!objAjaxOptions){
1753
 
1786
  var ajaxUrlInitial = objGrid.data("initajaxurl");
1787
 
1788
  history.replaceState({"ucaction":"change", "ajaxurl":ajaxUrlInitial, "gridid":gridID}, null, urlReplace);
 
 
 
1789
  }
1790
 
 
 
 
1791
  history.pushState({"ucaction":"change", "ajaxurl":ajaxUrl, "gridid":gridID}, null, urlReplace); //with back
1792
 
1793
  }
1832
  //ajax reload
1833
  g_lastGridAjaxCall = objGrid;
1834
 
1835
+
1836
+ //trace("chek me");return(false);
1837
+
1838
  ajaxRequest(ajaxUrl,null,null, function(response){
1839
 
1840
  if(isLoadMore !== true){
1862
  /**
1863
  * get grid ajax options
1864
  */
1865
+ function getGridAjaxOptions(objFilters, objGrid, isFiltersInitMode, isLoadMoreMode){
1866
+
1867
+ if(!isLoadMoreMode)
1868
+ var isLoadMoreMode = false;
1869
+
1870
+ if(g_showDebug){
1871
+ trace("getGridAjaxOptions");
1872
+
1873
+ trace("Filters:");
1874
+ trace(objFilters);
1875
+
1876
+ trace("grid:");
1877
+ trace(objGrid);
1878
+ trace("is init: " + isFiltersInitMode);
1879
+ }
1880
 
1881
  if(!objFilters)
1882
  return(null);
1896
  var strSelectedTerms = "";
1897
 
1898
 
 
 
1899
  //get ajax options
1900
  jQuery.each(objFilters, function(index, objFilter){
1901
 
1915
 
1916
  var paginationData = getPaginationSelectedData(objFilter);
1917
 
 
 
1918
  var paginationPage = getVal(paginationData, "page");
1919
 
1920
  if(paginationPage)
1921
+ page = paginationPage; //never set the url
1922
+
1923
+ if(g_showDebug){
1924
+ trace("pagination data");
1925
+ trace(paginationData);
1926
+ }
1927
+
1928
  objFilter.removeClass(g_vars.CLASS_CLICKED);
1929
  }
1930
 
1950
 
1951
  break;
1952
  case g_types.TERMS_LIST:
1953
+ case g_types.SELECT:
1954
 
1955
  //if not init mode - take first item
1956
  var objTerm = getTermsListSelectedTerm(objFilter);
1957
+
1958
  if(objTerm){
1959
 
1960
  if(isFiltersInitMode == false)
1967
  strSelectedTerms += termID;
1968
  }
1969
  }
1970
+
1971
  //replace mode
1972
 
1973
  var modeReplace = objFilter.data("replace-mode");
1974
  if(modeReplace === true)
1975
  isReplaceMode = true;
1976
 
1977
+ if(isLoadMoreMode == true)
1978
+ isNoRefresh = true;
1979
+
1980
  break;
1981
  default:
1982
  throw new Error("Unknown filter type: "+type);
1983
  break;
1984
  }
 
1985
 
1986
  //handle filters init mode
1987
 
2005
  var isMainFilter = (filterRole == "main");
2006
 
2007
  //add to refresh filter if it's qualify
2008
+
2009
  var isRefresh = true;
2010
 
2011
  if(isFiltersInitMode == false && isMainFilter === true)
2181
  }
2182
 
2183
 
 
2184
  /**
2185
  * init filter and bing to grid
2186
  */
2187
+ function initFilter(objFilter, type){
2188
 
2189
  var objGrid = getClosestGrid(objFilter);
2190
 
2208
  //bind filter to grid
2209
  bindFilterToGrid(objGrid, objFilter);
2210
 
2211
+ switch(type){
2212
+ case g_types.SELECT:
2213
+ initSelectFilter(objFilter);
2214
+ break;
2215
+ }
2216
+
2217
+ objFilter.trigger(g_vars.EVENT_INIT_FILTER);
2218
+
2219
  }
2220
 
2221
 
2248
  break;
2249
  case g_types.TERMS_LIST:
2250
 
2251
+ objParent.on("click",".ue_taxonomy.uc-grid-filter a.ue_taxonomy_item", onTermsLinkClick);
2252
 
2253
  break;
2254
  case g_types.SEARCH:
2255
 
2256
  objParent.on("filter_change",".uc-search-filter__input", onFilterChange);
2257
 
2258
+ break;
2259
+ case g_types.SELECT:
2260
+
2261
+ objParent.on("change", ".uc-select-filter__select", onTermsLinkClick);
2262
+
2263
  break;
2264
  default:
2265
  trace("init by type - unrecognized type: "+type);
2280
  return(false);
2281
 
2282
  var arrTypes = {};
2283
+
2284
  jQuery.each(objFilters, function(index, filter){
2285
 
2286
  var objFilter = jQuery(filter);
 
 
 
2287
  var type = getFilterType(objFilter);
2288
+
2289
+ initFilter(objFilter, type);
2290
 
2291
  arrTypes[type] = true;
2292
 
2370
 
2371
  if(!history.state)
2372
  return(true);
2373
+
 
 
 
2374
  var action = getVal(history.state, "ucaction");
2375
 
2376
  if(!action)
assets_libraries/owl-carousel-new/owl.carousel.js CHANGED
@@ -1,10 +1,10 @@
1
  /**
2
- * Owl Carousel v2.3.7 - UE7
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
6
  /**
7
- * Owl carousel
8
  * @version 2.3.5
9
  * @author Bartosz Wojciechowski
10
  * @author David Deutsch
@@ -1678,14 +1678,18 @@
1678
  content = content.find('.' + this.settings.nestedItemSelector);
1679
  }
1680
 
1681
- content.filter(function() {
1682
- return this.nodeType === 1;
1683
- }).each($.proxy(function(index, item) {
1684
- item = this.prepare(item);
1685
- this.$stage.append(item);
1686
- this._items.push(item);
1687
- this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1688
- }, this));
 
 
 
 
1689
 
1690
  this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
1691
 
@@ -2924,25 +2928,40 @@
2924
  return;
2925
  }
2926
 
 
 
2927
  this.core.speed(0);
2928
 
 
 
 
2929
  var left,
2930
  clear = $.proxy(this.clear, this),
2931
  previous = this.core.$stage.children().eq(this.previous),
2932
  next = this.core.$stage.children().eq(this.next),
2933
  incoming = this.core.settings.animateIn,
2934
  outgoing = this.core.settings.animateOut;
2935
-
2936
  if (this.core.current() === this.previous) {
2937
  return;
2938
  }
2939
 
2940
  if (outgoing) {
 
 
 
 
 
 
 
 
 
 
 
 
2941
  left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
2942
- previous.one($.support.animation.end, clear)
2943
- .css( { 'left': left + 'px' } )
2944
- .addClass('animated owl-animated-out')
2945
- .addClass(outgoing);
2946
  }
2947
 
2948
  if (incoming) {
1
  /**
2
+ * Owl Carousel v2.3.7 - UE8
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
6
  /**
7
+ * Owl carousel
8
  * @version 2.3.5
9
  * @author Bartosz Wojciechowski
10
  * @author David Deutsch
1678
  content = content.find('.' + this.settings.nestedItemSelector);
1679
  }
1680
 
1681
+ if(content && content.length){
1682
+
1683
+ content.filter(function() {
1684
+ return this.nodeType === 1;
1685
+ }).each($.proxy(function(index, item) {
1686
+ item = this.prepare(item);
1687
+ this.$stage.append(item);
1688
+ this._items.push(item);
1689
+ this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
1690
+ }, this));
1691
+
1692
+ }
1693
 
1694
  this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
1695
 
2928
  return;
2929
  }
2930
 
2931
+ var oldSpeed = this.core._speed;
2932
+
2933
  this.core.speed(0);
2934
 
2935
+ if(!oldSpeed)
2936
+ oldSpeed = 1000;
2937
+
2938
  var left,
2939
  clear = $.proxy(this.clear, this),
2940
  previous = this.core.$stage.children().eq(this.previous),
2941
  next = this.core.$stage.children().eq(this.next),
2942
  incoming = this.core.settings.animateIn,
2943
  outgoing = this.core.settings.animateOut;
2944
+
2945
  if (this.core.current() === this.previous) {
2946
  return;
2947
  }
2948
 
2949
  if (outgoing) {
2950
+
2951
+ previous.one($.support.animation.end, clear).addClass('animated owl-animated-out').addClass(outgoing);
2952
+
2953
+ var objAnimation = jQuery('.'+outgoing);
2954
+ var animationName = objAnimation.css('animation-name');
2955
+
2956
+ if(animationName == 'none'){
2957
+
2958
+ this.core.speed(oldSpeed);
2959
+ return;
2960
+ }
2961
+
2962
  left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
2963
+ previous.css( { 'left': left + 'px' } )
2964
+
 
 
2965
  }
2966
 
2967
  if (incoming) {
assets_libraries/owl-carousel-new/owl.carousel.min.js CHANGED
@@ -16,4 +16,4 @@
16
  * @todo stagePadding calculate wrong active classes
17
  */
18
 
19
- !function($,b,c,d){if(void 0===e)function e(a){console.log(a)}var f=!1;function g(a){if(!1==f)return!1;e(a)}function a(b,c){this.settings=null,this.options=$.extend({},a.Defaults,c),this.$element=$(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){this.settings.paddingType;var a=(this.width()/this.settings.items).toFixed(3)-this.settings.margin;return this.settings.item_size_gap&&(a+=this.settings.item_size_gap),a},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},$.each(["onResize","onThrottledResize"],$.proxy(function(b,a){this._handlers[a]=$.proxy(this[a],this)},this)),$.each(a.Plugins,$.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),$.each(a.Workers,$.proxy(function(b,a){this._pipe.push({filter:a.filter,run:$.proxy(a.run,this)})},this)),this.setup(),this.initialize()}a.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,debug:!1},a.Width={Default:"default",Inner:"inner",Outer:"outer"},a.Type={Event:"event",State:"state"},a.Plugins={},a.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width(),g("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(d){var a=this.settings.margin||"",e=!this.settings.autoWidth,b=this.settings.rtl,c={width:"auto","margin-left":b?a:"","margin-right":b?"":a};e||this.$stage.children().css(c),d.css=c}},{filter:["width","items","settings"],run:function(b){!0===this.settings.debug&&(f=!0),g("run!"),1==this.settings.items&& !0==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,g("set items size gap: 1")),g("settings - stage padding type: "+this.settings.paddingType),g("settings - stage padding: "+this.settings.stagePadding),(!this.settings.paddingType||"none"==this.settings.paddingType)&&this.settings.stagePadding&&(this.settings.paddingType="both",g("set stage padding type - both"));var a=this.getItemWidth();if(g("Item width: "+a),this.settings.stagePadding>a){this.settings.stagePadding=0;var c=this.getItemWidth();this.settings.stagePadding=Math.floor(.5*c);var a=this.getItemWidth();g("set new stagePadding: "+this.settings.stagePadding+" and item width: "+a)}for(merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],b.items={merge:!1,width:a};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,b.items.merge=merge>1||b.items.merge,widths[iterator]=grid?a*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var a=[],b=this._items,c=this.settings,f=Math.max(2*c.items,4),h=2*Math.ceil(b.length/2),d=c.loop&&b.length?c.rewind?f:Math.max(f,h):0,g="",e="";for(d/=2;d>0;)a.push(this.normalize(a.length/2,!0)),g+=b[a[a.length-1]][0].outerHTML,a.push(this.normalize(b.length-1-(a.length-1)/2,!0)),e=b[a[a.length-1]][0].outerHTML+e,d-=1;this._clones=a,$(g).addClass("cloned").appendTo(this.$stage),$(e).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var c=this.settings.rtl?1:-1,d=this._clones.length+this._items.length,b=-1,h=0,a=[];++b<d;){var e=(a[b-1]||0)+(this._widths[this.relative(b)]+this.settings.margin)*c;a.push(e)}if(this.settings.item_size_gap)for(var f in a)a[f]-=this.settings.item_size_gap;g("Set coordinates"),g(a),this._coordinates=a}},{filter:["width","items","settings"],run:function(){var b=this.settings.stagePadding,a=this._coordinates,e=this.settings.paddingType,c=this.$stage.parent(),j=c.width();g("parent Outer Stage Width: "+c.width()),g("element width this.$element.width(): "+this.$element.width());var k={width:Math.ceil(Math.abs(a[a.length-1])),"padding-left":"","padding-right":""},f={width:Math.ceil(Math.abs(a[a.length-1]))+2*b,"padding-left":b||"","padding-right":b||""},h={width:Math.ceil(Math.abs(a[a.length-1]))+b,"padding-left":b||"","padding-right":""},i={width:Math.ceil(Math.abs(a[a.length-1]))+b,"padding-left":"","padding-right":b||""},d={width:j};g("set outer stage css"),g(d),"none"==e?(this.$stage.css(k),c.width(d)):"both"==e?(this.$stage.css(f),c.css(d),g("Set stage width css (both)"),g(f)):"left"==e?(this.$stage.css(h),c.css(d),g("Set stage width css (left)"),g(h)):"right"==e&&(this.$stage.css(i),c.css(d),g("Set stage width css (right)"),g(i))}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var b,c,a,f,g=this.settings.rtl?1:-1,d=2*this.settings.stagePadding,e=this.coordinates(this.current())+d,h=e+this.width()*g,i=[];for(("left"==this.settings.paddingType||"right"==this.settings.paddingType)&&(d=this.settings.stagePadding),a=0,f=this._coordinates.length;a<f;a++)b=this._coordinates[a-1]||0,c=Math.abs(this._coordinates[a])+d*g,(this.op(b,"<=",e)&&this.op(b,">",h)||this.op(c,"<",e)&&this.op(c,">",h))&&i.push(a);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){if(this.settings.setActiveClass&&this.settings.setActiveClass){var a=!0;this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(a=!0):this.settings.setActiveClassOnMobile||1!=this.$stage.children(".active").length||(a=!1),!0==a?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):!1==a&&this.$stage.children().removeClass("uc-active-item")}}}],a.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=$("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap($("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},a.prototype.initializeItems=function(){var a=this.$element.find(".owl-item");if(a.length){this._items=a.get().map(function(a){return $(a)}),this._mergers=this._items.map(function(){return 1}),this.refresh();return}this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},a.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle){var a,b,c,e=this.$element;e.children().sort(function(){return Math.round(Math.random())-.5}).each(function(){e.append(this)})}this.settings.autoWidth&&!this.is("pre-loading")&&(a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},a.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},a.prototype.setup=function(){var d=this.viewport(),b=this.options.responsive,c=-1,a=null;b?($.each(b,function(a){a<=d&&a>c&&(c=Number(a))}),"function"==typeof(a=$.extend({},this.options,b[c])).stagePadding&&(a.stagePadding=a.stagePadding()),delete a.responsive,a.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+c))):a=$.extend({},this.options),this.trigger("change",{property:{name:"settings",value:a}}),this._breakpoint=c,this.settings=a,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},a.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},a.prototype.prepare=function(b){var a=this.trigger("prepare",{content:b});return a.data||(a.data=$("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:a.data}),a.data},a.prototype.update=function(){for(var a=0,b=this._pipe.length,c=$.proxy(function(a){return this[a]},this._invalidated),d={};a<b;)(this._invalidated.all||$.grep(this._pipe[a].filter,c).length>0)&&this._pipe[a].run(d),a++;this._invalidated={},this.is("valid")||this.enter("valid")},a.prototype.width=function(c){var b;switch(c=c||a.Width.Default){case a.Width.Inner:case a.Width.Outer:b=this._width,g("calc width for dimention: "+c);default:switch(this.settings.paddingType){case"left":case"right":g("calc width with stagePadding: "+this.settings.paddingType),b=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":g("calc width with stagePadding: "+this.settings.paddingType),b=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:b=this._width+this.settings.margin,g("calc width without stagePadding for dimention: "+c)}}return g("carousel width (no stagepadding and margins): "+b),b},a.prototype.refresh=function(){g("---------------------refresh carousel-----------------------"),g("window width: "+b.innerWidth),g("element width: "+this.$element.width()),g("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},a.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},a.prototype.onResize=function(){return(g("---------------------resize carousel-----------------------"),this._items.length)?this.isVisible()?(g("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented())?(this.leave("resizing"),!1):void(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),this.trigger("resized")):(g("not visible"),!1):(g("same length"),!1)},a.prototype.registerEventHandlers=function(){$.support.transition&&this.$stage.on($.support.transition.end+".owl.core",$.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",$.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",$.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",$.proxy(this.onDragEnd,this)))},a.prototype.onDragStart=function(b){var a=null;3!==b.which&&($.support.transform?a={x:(a=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===a.length?12:4],y:a[16===a.length?13:5]}:(a=this.$stage.position(),a={x:this.settings.rtl?a.left+this.$stage.width()-this.width()+this.settings.margin:a.left,y:a.top}),this.is("animating")&&($.support.transform?this.animate(a.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=new Date().getTime(),this._drag.target=$(b.target),this._drag.stage.start=a,this._drag.stage.current=a,this._drag.pointer=this.pointer(b),$(c).on("mouseup.owl.core touchend.owl.core",$.proxy(this.onDragEnd,this)),$(c).one("mousemove.owl.core touchmove.owl.core",$.proxy(function(a){var b=this.difference(this._drag.pointer,this.pointer(a));$(c).on("mousemove.owl.core touchmove.owl.core",$.proxy(this.onDragMove,this)),Math.abs(b.x)<Math.abs(b.y)&&this.is("valid")||(a.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},a.prototype.onDragMove=function(e){var a=null,b=null,d=null,f=this.difference(this._drag.pointer,this.pointer(e)),c=this.difference(this._drag.stage.start,f);this.is("dragging")&&(e.preventDefault(),this.settings.loop?(a=this.coordinates(this.minimum()),b=this.coordinates(this.maximum()+1)-a,c.x=((c.x-a)%b+b)%b+a):(a=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),b=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*f.x/5:0,c.x=Math.max(Math.min(c.x,a+d),b+d)),this._drag.stage.current=c,this.animate(c.x))},a.prototype.onDragEnd=function(d){var a=this.difference(this._drag.pointer,this.pointer(d)),e=this._drag.stage.current,b=a.x>0^this.settings.rtl?"left":"right";$(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==a.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==a.x?b:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=b,(Math.abs(a.x)>3||new Date().getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},a.prototype.closest=function(a,e){var b=-1,f=this.width(),c=this.coordinates();return this.settings.freeDrag||$.each(c,$.proxy(function(g,h){return"left"===e&&a>h-30&&a<h+30?b=g:"right"===e&&a>h-f-30&&a<h-f+30?b=g+1:this.op(a,"<",h)&&this.op(a,">",d!==c[g+1]?c[g+1]:h-f)&&(b="left"===e?g+1:g),-1===b},this)),!this.settings.loop&&(this.op(a,">",c[this.minimum()])?b=a=this.minimum():this.op(a,"<",c[this.maximum()])&&(b=a=this.maximum())),b},a.prototype.animate=function(a){var b=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),b&&(this.enter("animating"),this.trigger("translate")),$.support.transition?(g("Go to coordinate: "+a),this.$stage.css({transform:"translateX("+a+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):b?this.$stage.animate({left:a+"px"},this.speed(),this.settings.fallbackEasing,$.proxy(this.onTransitionEnd,this)):this.$stage.css({left:a+"px"}),this.scrollToHead()},a.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},a.prototype.current=function(a){if(a===d)return this._current;if(0!==this._items.length){if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});d!==b.data&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current}},a.prototype.invalidate=function(a){return"string"===$.type(a)&&(this._invalidated[a]=!0,this.is("valid")&&this.leave("valid")),$.map(this._invalidated,function(b,a){return a})},a.prototype.reset=function(a){d!==(a=this.normalize(a))&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},a.prototype.normalize=function(a,e){var b=this._items.length,c=e?0:this._clones.length;return!this.isNumeric(a)||b<1?a=d:(a<0||a>=b+c)&&(a=((a-c/2)%b+b)%b+c/2),a},a.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},a.prototype.maximum=function(f){var a,d,e,b=this.settings,c=this._coordinates.length;if(b.loop)c=this._clones.length/2+this._items.length-1;else if(b.autoWidth||b.merge){if(a=this._items.length)for(d=this._items[--a].width(),e=this.$element.width();(a--)&&!((d+=this._items[a].width()+this.settings.margin)>e););c=a+1}else c=b.center?this._items.length-1:this._items.length-b.items;return f&&(c-=this._clones.length/2),Math.max(c,0)},a.prototype.minimum=function(a){return a?0:this._clones.length/2},a.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},a.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},a.prototype.clones=function(a){var b=this._clones.length/2,c=b+this._items.length,e=function(a){return a%2==0?c+a/2:b-(a+1)/2};return a===d?$.map(this._clones,function(b,a){return e(a)}):$.map(this._clones,function(b,c){return b===a?e(c):null})},a.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},a.prototype.coordinates=function(b){var a,e=1,c=b-1;return b===d?$.map(this._coordinates,$.proxy(function(b,a){return this.coordinates(a)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,c=b+1),a=this._coordinates[b],a+=(this.width()-a+(this._coordinates[c]||0))/2*e):a=this._coordinates[c]||0,a=Math.ceil(a))},a.prototype.duration=function(b,c,a){return 0===a?0:Math.min(Math.max(Math.abs(c-b),1),6)*Math.abs(a||this.settings.smartSpeed)},a.prototype.to=function(a,h){var d=this.current(),e=null,b=a-this.relative(d),f=this._items.length,g=this.minimum(),c=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(b)>f/2&&(b+=-1*((b>0)-(b<0))*f),(e=(((a=d+b)-g)%f+f)%f+g)!==a&&e-b<=c&&e-b>0&&(d=e-b,a=e,this.reset(d))):this.settings.rewind?(c+=1,a=(a%c+c)%c):a=Math.max(g,Math.min(c,a)),this.speed(this.duration(d,a,h)),this.current(a),this.isVisible()&&this.update()},a.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},a.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},a.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},a.prototype.viewport=function(){var a;return this.options.responsiveBaseElement!==b?a=$(this.options.responsiveBaseElement).width():b.innerWidth?a=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?a=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),a},a.prototype.replace=function(a){this.$stage.empty(),this._items=[],a&&(a=a instanceof jQuery?a:$(a)),this.settings.nestedItemSelector&&(a=a.find("."+this.settings.nestedItemSelector)),a.filter(function(){return 1===this.nodeType}).each($.proxy(function(b,a){a=this.prepare(a),this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},a.prototype.add=function(a,b){var c=this.relative(this._current);b=b===d?this._items.length:this.normalize(b,!0),a=a instanceof jQuery?a:$(a),this.trigger("add",{content:a,position:b}),a=this.prepare(a),0===this._items.length||b===this._items.length?(0===this._items.length&&this.$stage.append(a),0!==this._items.length&&this._items[b-1].after(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[c]&&this.reset(this._items[c].index()),this.invalidate("items"),this.trigger("added",{content:a,position:b})},a.prototype.remove=function(a){d!==(a=this.normalize(a,!0))&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},a.prototype.preloadAutoWidthImages=function(a){a.each($.proxy(function(b,a){this.enter("pre-loading"),a=$(a),$(new Image).one("load",$.proxy(function(b){a.attr("src",b.target.src),a.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",a.attr("src")||a.attr("data-src")||a.attr("data-src-retina"))},this))},a.prototype.isElementInViewport=function(a){var c=a.offset().top,e=c+a.outerHeight(),d=jQuery(b).scrollTop(),f=d+jQuery(b).height();return e>d&&c<f},a.prototype.scrollToTop=function(a,b){jQuery("html, body").animate({scrollTop:a+b},400)},a.prototype.scrollToHead=function(){if(!1==this.settings.scrollToHead|| !0==this.settings.autoplay||this.is("initializing")||this.is("resizing"))return!1;var a=this.$element;if(!0==this.isElementInViewport(a))return!1;var b=this.$element.offset().top,c=this.settings.scrollToHeadOffset;this.scrollToTop(b,c)},a.prototype.destroy=function(){for(var a in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),$(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[a].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},a.prototype.op=function(a,d,b){var c=this.settings.rtl;switch(d){case"<":return c?a>b:a<b;case">":return c?a<b:a>b;case">=":return c?a<=b:a>=b;case"<=":return c?a>=b:a<=b}},a.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},a.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},a.prototype.trigger=function(b,f,d,h,i){var g={item:{count:this._items.length,index:this.current()}},e=$.camelCase($.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),c=$.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),$.extend({relatedTarget:this},g,f));return!this._supress[b]&&($.each(this._plugins,function(b,a){a.onTrigger&&a.onTrigger(c)}),this.register({type:a.Type.Event,name:b}),this.$element.trigger(c),this.settings&&"function"==typeof this.settings[e]&&this.settings[e].call(this,c)),c},a.prototype.enter=function(a){$.each([a].concat(this._states.tags[a]||[]),$.proxy(function(b,a){d===this._states.current[a]&&(this._states.current[a]=0),this._states.current[a]++},this))},a.prototype.leave=function(a){$.each([a].concat(this._states.tags[a]||[]),$.proxy(function(b,a){this._states.current[a]--},this))},a.prototype.register=function(b){if(b.type===a.Type.Event){if($.event.special[b.name]||($.event.special[b.name]={}),!$.event.special[b.name].owl){var c=$.event.special[b.name]._default;$.event.special[b.name]._default=function(a){return c&&c.apply&&(!a.namespace|| -1===a.namespace.indexOf("owl"))?c.apply(this,arguments):a.namespace&&a.namespace.indexOf("owl")> -1},$.event.special[b.name].owl=!0}}else b.type===a.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=$.grep(this._states.tags[b.name],$.proxy(function(a,c){return $.inArray(a,this._states.tags[b.name])===c},this)))},a.prototype.suppress=function(a){$.each(a,$.proxy(function(b,a){this._supress[a]=!0},this))},a.prototype.release=function(a){$.each(a,$.proxy(function(b,a){delete this._supress[a]},this))},a.prototype.pointer=function(a){var c={x:null,y:null};return(a=(a=a.originalEvent||a||b.event).touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a).pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},a.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},a.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},$.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=$(this),d=e.data("owl.carousel");d||(d=new a(this,"object"==typeof b&&b),e.data("owl.carousel",d),$.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(c,b){d.register({type:a.Type.Event,name:b}),d.$element.on(b+".owl.carousel.core",$.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([b]),d[b].apply(this,[].slice.call(arguments,1)),this.release([b]))},d))})),"string"==typeof b&&"_"!==b.charAt(0)&&d[b].apply(d,c)})},$.fn.owlCarousel.Constructor=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this._core.$element.on(this._handlers)};a.Defaults={autoRefresh:!0,autoRefreshInterval:500},a.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval($.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},a.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},a.prototype.destroy=function(){var a,c;for(a in b.clearInterval(this._interval),this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":$.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var a=this._core.settings,c=a.center&&Math.ceil(a.items/2)||a.items,e=a.center&& -1*c||0,d=(b.property&& void 0!==b.property.value?b.property.value:this._core.current())+e,f=this._core.clones().length,g=$.proxy(function(b,a){this.load(a)},this);for(a.lazyLoadEager>0&&(c+=a.lazyLoadEager,a.loop&&(d-=a.lazyLoadEager,c++));(e++)<c;)this.load(f/2+this._core.relative(d)),f&&$.each(this._core.clones(this._core.relative(d)),g),d++}},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this._core.$element.on(this._handlers)};a.Defaults={lazyLoad:!1,lazyLoadEager:0},a.prototype.load=function(d){var a=this._core.$stage.children().eq(d),c=a&&a.find(".owl-lazy");!c||$.inArray(a.get(0),this._loaded)> -1||(c.each($.proxy(function(f,e){var d,a=$(e),c=b.devicePixelRatio>1&&a.attr("data-src-retina")||a.attr("data-src")||a.attr("data-srcset");this._core.trigger("load",{element:a,url:c},"lazy"),a.is("img")?a.one("load.owl.lazy",$.proxy(function(){a.css("opacity",1),this._core.trigger("loaded",{element:a,url:c},"lazy")},this)).attr("src",c):a.is("source")?a.one("load.owl.lazy",$.proxy(function(){this._core.trigger("loaded",{element:a,url:c},"lazy")},this)).attr("srcset",c):((d=new Image).onload=$.proxy(function(){a.css({"background-image":'url("'+c+'")',opacity:"1"}),this._core.trigger("loaded",{element:a,url:c},"lazy")},this),d.src=c)},this)),this._loaded.push(a.get(0)))},a.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},$.fn.owlCarousel.Constructor.Plugins.Lazy=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":$.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;$(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),$(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};a.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},a.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],a=0;$.each(e,function(b,a){f.push($(a).height())}),(a=Math.max.apply(null,f))<=1&&d&&this._previousHeight&&(a=this._previousHeight),this._previousHeight=a,this._core.$stage.parent().height(a).addClass(this._core.settings.autoHeightClass)},a.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},$.fn.owlCarousel.Constructor.Plugins.AutoHeight=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":$.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":$.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":$.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":$.proxy(function(a){if(a.namespace){var b=$(a.content).find(".owl-video");b.length&&(b.css("display","none"),this.fetch(b,$(a.content)))}},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",$.proxy(function(a){this.play(a)},this))};a.Defaults={video:!1,videoHeight:!1,videoWidth:!1},a.prototype.fetch=function(a,e){var d=a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube",b=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),f=a.attr("data-width")||this._core.settings.videoWidth,g=a.attr("data-height")||this._core.settings.videoHeight,c=a.attr("href");if(c){if((b=c.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")> -1)d="youtube";else if(b[3].indexOf("vimeo")> -1)d="vimeo";else if(b[3].indexOf("vzaar")> -1)d="vzaar";else throw new Error("Video URL not supported.");b=b[6]}else throw new Error("Missing video URL.");this._videos[c]={type:d,id:b,width:f,height:g},e.attr("data-video",c),this.thumbnail(a,this._videos[c])},a.prototype.thumbnail=function(c,a){var i,j,f,g=a.width&&a.height?"width:"+a.width+"px;height:"+a.height+"px;":"",b=c.find("img"),d="src",h="",k=this._core.settings,e=function(a){j='<div class="owl-video-play-icon"></div>',i=k.lazyLoad?$("<div/>",{class:"owl-video-tn "+h,srcType:a}):$("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+a+")"}),c.after(i),c.after(j)};if(c.wrap($("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(d="data-src",h="owl-lazy"),b.length)return e(b.attr(d)),b.remove(),!1;"youtube"===a.type?e(f="//img.youtube.com/vi/"+a.id+"/hqdefault.jpg"):"vimeo"===a.type?$.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+a.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){e(f=a[0].thumbnail_large)}}):"vzaar"===a.type&&$.ajax({type:"GET",url:"//vzaar.com/api/videos/"+a.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){e(f=a.framegrab_url)}})},a.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},a.prototype.play=function(d){var b,c=$(d.target).closest("."+this._core.settings.itemClass),a=this._videos[c.attr("data-video")],e=a.width||"100%",f=a.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),c=this._core.items(this._core.relative(c.index())),this._core.reset(c.index()),(b=$('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",f),b.attr("width",e),"youtube"===a.type?b.attr("src","//www.youtube.com/embed/"+a.id+"?autoplay=1&rel=0&v="+a.id):"vimeo"===a.type?b.attr("src","//player.vimeo.com/video/"+a.id+"?autoplay=1"):"vzaar"===a.type&&b.attr("src","//view.vzaar.com/"+a.id+"/player?autoplay=true"),$(b).wrap('<div class="owl-video-frame" />').insertAfter(c.find(".owl-video")),this._playing=c.addClass("owl-video-playing"))},a.prototype.isInFullScreen=function(){var a=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return a&&$(a).parent().hasClass("owl-video-frame")},a.prototype.destroy=function(){var a,b;for(a in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},$.fn.owlCarousel.Constructor.Plugins.Video=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(b){this.core=b,this.core.options=$.extend({},a.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":$.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":$.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":$.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};a.Defaults={animateOut:!1,animateIn:!1},a.prototype.swap=function(){if(1===this.core.settings.items&&$.support.animation&&$.support.transition){this.core.speed(0);var a,b=$.proxy(this.clear,this),e=this.core.$stage.children().eq(this.previous),f=this.core.$stage.children().eq(this.next),c=this.core.settings.animateIn,d=this.core.settings.animateOut;this.core.current()!==this.previous&&(d&&(a=this.core.coordinates(this.previous)-this.core.coordinates(this.next),e.one($.support.animation.end,b).css({left:a+"px"}).addClass("animated owl-animated-out").addClass(d)),c&&f.one($.support.animation.end,b).addClass("animated owl-animated-in").addClass(c))}},a.prototype.clear=function(a){$(a.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},a.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},$.fn.owlCarousel.Constructor.Plugins.Animate=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){var a=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":$.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":$.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":$.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":$.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":$.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":$.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":$.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=$.extend({},a.Defaults,this._core.options)};a.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},a.prototype._next=function(a){this._call=b.setTimeout($.proxy(this._next,this,a),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(a||this._core.settings.autoplaySpeed)},a.prototype.read=function(){return new Date().getTime()-this._time},a.prototype.play=function(a,d){var c;this._core.is("rotating")||this._core.enter("rotating"),a=a||this._core.settings.autoplayTimeout,c=Math.min(this._time%(this._timeout||a),a),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%a-c,this._timeout=a,this._call=b.setTimeout($.proxy(this._next,this,d),a-c)},a.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},a.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},a.prototype.destroy=function(){var a,b;for(a in this.stop(),this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},$.fn.owlCarousel.Constructor.Plugins.autoplay=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){"use strict";var a=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+$(a.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":$.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":$.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":$.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":$.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this.$element.on(this._handlers)};a.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},a.prototype.initialize=function(){var b,a=this._core.settings;if(this._controls.$relative=(a.navContainer?$(a.navContainer):$("<div>").addClass(a.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=$("<"+a.navElement+' value="previous item" title="previous item">').addClass(a.navClass[0]).html(a.navText[0]).prependTo(this._controls.$relative).on("click",$.proxy(function(b){this.prev(a.navSpeed)},this)),this._controls.$next=$("<"+a.navElement+' value="next item" title="next item">').addClass(a.navClass[1]).html(a.navText[1]).appendTo(this._controls.$relative).on("click",$.proxy(function(b){this.next(a.navSpeed)},this)),a.changeItemOnClick){var c=this._core.$stage.children(),d=this._core.clones().length/2;c.on("click",$.proxy(function(b){var c=$(b.currentTarget).index();this.to(c-d,a.navSpeed,!0)},this))}for(b in a.dotsData||(this._templates=[$('<button role="button">').addClass(a.dotClass).append($("<span>")).prop("outerHTML")]),this._controls.$absolute=(a.dotsContainer?$(a.dotsContainer):$("<div>").addClass(a.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",$.proxy(function(b){var c=$(b.target).parent().is(this._controls.$absolute)?$(b.target).index():$(b.target).parent().index();b.preventDefault(),this.to(c,a.dotsSpeed)},this)),this._overrides)this._core[b]=$.proxy(this[b],this)},a.prototype.destroy=function(){var b,a,c,d,e;for(b in e=this._core.settings,this._handlers)this.$element.off(b,this._handlers[b]);for(a in this._controls)"$relative"===a&&e.navContainer?this._controls[a].html(""):this._controls[a].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.prototype.update=function(){var b,c,d=this._core.clones().length/2,g=d+this._core.items().length,e=this._core.maximum(!0),a=this._core.settings,f=a.center||a.autoWidth||a.dotsData?1:a.dotsEach||a.items;if("page"!==a.slideBy&&(a.slideBy=Math.min(a.slideBy,a.items)),a.dots||"page"==a.slideBy)for(this._pages=[],b=d,c=0;b<g;b++){if(c>=f||0===c){if(this._pages.push({start:Math.min(e,b-d),end:b-d+f-1}),Math.min(e,b-d)===e)break;c=0}c+=this._core.mergers(this._core.relative(b))}},a.prototype.draw=function(){var b,a=this._core.settings,c=this._core.items().length<=a.items,d=this._core.relative(this._core.current()),e=a.loop||a.rewind;this._controls.$relative.toggleClass("disabled",!a.nav||c),a.nav&&(this._controls.$previous.toggleClass("disabled",!e&&d<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!e&&d>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!a.dots||c),a.dots&&(b=this._pages.length-this._controls.$absolute.children().length,a.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq($.inArray(this.current(),this._pages)).addClass("active"))},a.prototype.onTrigger=function(b){var a=this._core.settings;b.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:a&&(a.center||a.autoWidth||a.dotsData?1:a.dotsEach||a.items)}},a.prototype.current=function(){var a=this._core.relative(this._core.current());return $.grep(this._pages,$.proxy(function(b,c){return b.start<=a&&b.end>=a},this)).pop()},a.prototype.getPosition=function(d){var a,b,c=this._core.settings;return"page"==c.slideBy?(a=$.inArray(this.current(),this._pages),b=this._pages.length,d?++a:--a,a=this._pages[(a%b+b)%b].start):(a=this._core.relative(this._core.current()),b=this._core.items().length,d?a+=c.slideBy:a-=c.slideBy),a},a.prototype.next=function(a){$.proxy(this._overrides.to,this._core)(this.getPosition(!0),a)},a.prototype.prev=function(a){$.proxy(this._overrides.to,this._core)(this.getPosition(!1),a)},a.prototype.to=function(b,c,d){var a;!d&&this._pages.length?(a=this._pages.length,$.proxy(this._overrides.to,this._core)(this._pages[(b%a+a)%a].start,c)):$.proxy(this._overrides.to,this._core)(b,c)},$.fn.owlCarousel.Constructor.Plugins.Navigation=a}(window.Zepto||window.jQuery,window,document),function($,b,c,d){"use strict";var a=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":$.proxy(function(a){a.namespace&&"URLHash"===this._core.settings.startPosition&&$(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":$.proxy(function(a){if(a.namespace){var b=$(a.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");b&&(this._hashes[b]=a.content)}},this),"changed.owl.carousel":$.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),a=$.map(this._hashes,function(a,b){return a===d?b:null}).join();a&&b.location.hash.slice(1)!==a&&(b.location.hash=a)}},this)},this._core.options=$.extend({},a.Defaults,this._core.options),this.$element.on(this._handlers),$(b).on("hashchange.owl.navigation",$.proxy(function(e){var c=b.location.hash.substring(1),d=this._core.$stage.children(),a=this._hashes[c]&&d.index(this._hashes[c]);void 0!==a&&a!==this._core.current()&&this._core.to(this._core.relative(a),!1,!0)},this))};a.Defaults={URLhashListener:!1},a.prototype.destroy=function(){var a,c;for(a in $(b).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},$.fn.owlCarousel.Constructor.Plugins.Hash=a}(window.Zepto||window.jQuery,window,document),function($,d,e,f){var g=$("<support>").get(0).style,h="Webkit Moz O ms".split(" "),c={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a={csstransforms:function(){return!!i("transform")},csstransforms3d:function(){return!!i("perspective")},csstransitions:function(){return!!i("transition")},cssanimations:function(){return!!i("animation")}};function i(a,d){var c=!1,b=a.charAt(0).toUpperCase()+a.slice(1);return $.each((a+" "+h.join(b+" ")+b).split(" "),function(b,a){if(void 0!==g[a])return c=!d||a,!1}),c}function b(a){return i(a,!0)}a.csstransitions()&&($.support.transition=new String(b("transition")),$.support.transition.end=c.transition.end[$.support.transition]),a.cssanimations()&&($.support.animation=new String(b("animation")),$.support.animation.end=c.animation.end[$.support.animation]),a.csstransforms()&&($.support.transform=new String(b("transform")),$.support.transform3d=a.csstransforms3d())}(window.Zepto||window.jQuery,window,document)
16
  * @todo stagePadding calculate wrong active classes
17
  */
18
 
19
+ !function(h,n,s,a){function e(t){console.log(t)}var o=!1;function l(t){0!=o&&e(t)}function c(t,e){this.settings=null,this.options=h.extend({},c.Defaults,e),this.$element=h(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){switch(this.settings.paddingType){case"left":case"right":case"both":default:var t=(this.width()/this.settings.items).toFixed(3)-this.settings.margin}return this.settings.item_size_gap&&(t+=this.settings.item_size_gap),t},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},h.each(["onResize","onThrottledResize"],h.proxy(function(t,e){this._handlers[e]=h.proxy(this[e],this)},this)),h.each(c.Plugins,h.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),h.each(c.Workers,h.proxy(function(t,e){this._pipe.push({filter:e.filter,run:h.proxy(e.run,this)})},this)),this.setup(),this.initialize()}c.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:n,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,debug:!1},c.Width={Default:"default",Inner:"inner",Outer:"outer"},c.Type={Event:"event",State:"state"},c.Plugins={},c.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width(),l("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,e={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(e),t.css=e}},{filter:["width","items","settings"],run:function(t){!0===this.settings.debug&&(o=!0),l("run!"),1==this.settings.items&&1==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,l("set items size gap: 1")),l("settings - stage padding type: "+this.settings.paddingType),l("settings - stage padding: "+this.settings.stagePadding),this.settings.paddingType&&"none"!=this.settings.paddingType||!this.settings.stagePadding||(this.settings.paddingType="both",l("set stage padding type - both"));var e,i=this.getItemWidth();for(l("Item width: "+i),this.settings.stagePadding>i&&(this.settings.stagePadding=0,e=this.getItemWidth(),this.settings.stagePadding=Math.floor(.5*e),i=this.getItemWidth(),l("set new stagePadding: "+this.settings.stagePadding+" and item width: "+i)),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],t.items={merge:!1,width:i};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,t.items.merge=1<merge||t.items.merge,widths[iterator]=grid?i*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,h(r).addClass("cloned").appendTo(this.$stage),h(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=[];++i<e;){var n=(s[i-1]||0)+(this._widths[this.relative(i)]+this.settings.margin)*t;s.push(n)}if(this.settings.item_size_gap)for(var o in s)s[o]-=this.settings.item_size_gap;l("Set coordinates"),l(s),this._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i=this.settings.paddingType,s=this.$stage.parent(),n=s.width();l("parent Outer Stage Width: "+s.width()),l("element width this.$element.width(): "+this.$element.width());var o={width:Math.ceil(Math.abs(e[e.length-1])),"padding-left":"","padding-right":""},r={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""},a={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":t||"","padding-right":""},t={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":"","padding-right":t||""},n={width:n};l("set outer stage css"),l(n),"none"==i?(this.$stage.css(o),s.width(n)):"both"==i?(this.$stage.css(r),s.css(n),l("Set stage width css (both)"),l(r)):"left"==i?(this.$stage.css(a),s.css(n),l("Set stage width css (left)"),l(a)):"right"==i&&(this.$stage.css(t),s.css(n),l("Set stage width css (right)"),l(t))}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for("left"!=this.settings.paddingType&&"right"!=this.settings.paddingType||(o=this.settings.stagePadding),i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){var t;this.settings.setActiveClass&&this.settings.setActiveClass&&(t=!0,this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item"))}}],c.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=h("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(h("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},c.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return h(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},c.prototype.initialize=function(){var t,e,i;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle&&(t=this.$element).children().sort(function(){return Math.round(Math.random())-.5}).each(function(){t.append(this)}),this.settings.autoWidth&&!this.is("pre-loading")&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:a,i=this.$element.children(i).width(),e.length&&i<=0&&this.preloadAutoWidthImages(e)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},c.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},c.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(h.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=h.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=h.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},c.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},c.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=h("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},c.prototype.update=function(){for(var t=0,e=this._pipe.length,i=h.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<h.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t++;this._invalidated={},this.is("valid")||this.enter("valid")},c.prototype.width=function(t){var e;switch(t=t||c.Width.Default){case c.Width.Inner:case c.Width.Outer:e=this._width,l("calc width for dimention: "+t);default:switch(this.settings.paddingType){case"left":case"right":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:e=this._width+this.settings.margin,l("calc width without stagePadding for dimention: "+t)}}return l("carousel width (no stagepadding and margins): "+e),e},c.prototype.refresh=function(){l("---------------------refresh carousel-----------------------"),l("window width: "+n.innerWidth),l("element width: "+this.$element.width()),l("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},c.prototype.onThrottledResize=function(){n.clearTimeout(this.resizeTimer),this.resizeTimer=n.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},c.prototype.onResize=function(){return l("---------------------resize carousel-----------------------"),this._items.length?this.isVisible()?(l("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),void this.trigger("resized"))):(l("not visible"),!1):(l("same length"),!1)},c.prototype.registerEventHandlers=function(){h.support.transition&&this.$stage.on(h.support.transition.end+".owl.core",h.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(n,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",h.proxy(this.onDragEnd,this)))},c.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=h.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(h.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=h(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),h(s).on("mouseup.owl.core touchend.owl.core",h.proxy(this.onDragEnd,this)),h(s).one("mousemove.owl.core touchmove.owl.core",h.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));h(s).on("mousemove.owl.core touchmove.owl.core",h.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},c.prototype.onDragMove=function(t){var e,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(i=this.coordinates(this.minimum()),s=this.coordinates(this.maximum()+1)-i,o.x=((o.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),e=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,i+e),s+e)),this._drag.stage.current=o,this.animate(o.x))},c.prototype.onDragEnd=function(t){var e=this.difference(this._drag.pointer,this.pointer(t)),i=this._drag.stage.current,t=0<e.x^this.settings.rtl?"left":"right";h(s).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==e.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(i.x,0!==e.x?t:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=t,(3<Math.abs(e.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},c.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||h.each(r,h.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",r[t+1]!==a?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?n=i=this.minimum():this.op(i,"<",r[this.maximum()])&&(n=i=this.maximum())),n},c.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),h.support.transition?(l("Go to coordinate: "+t),this.$stage.css({transform:"translateX("+t+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,h.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"}),this.scrollToHead()},c.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},c.prototype.current=function(t){return t===a?this._current:0===this._items.length?a:(t=this.normalize(t),this._current!==t&&((e=this.trigger("change",{property:{name:"position",value:t}})).data!==a&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current);var e},c.prototype.invalidate=function(t){return"string"===h.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),h.map(this._invalidated,function(t,e){return e})},c.prototype.reset=function(t){(t=this.normalize(t))!==a&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},c.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=a:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},c.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},c.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!(s<(i+=this._items[e].width()+this.settings.margin)););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},c.prototype.minimum=function(t){return t?0:this._clones.length/2},c.prototype.items=function(t){return t===a?this._items.slice():(t=this.normalize(t,!0),this._items[t])},c.prototype.mergers=function(t){return t===a?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},c.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return i===a?h.map(this._clones,function(t,e){return s(e)}):h.map(this._clones,function(t,e){return t===i?s(e):null})},c.prototype.speed=function(t){return t!==a&&(this._speed=t),this._speed},c.prototype.coordinates=function(t){var e,i=1,s=t-1;return t===a?h.map(this._coordinates,h.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,e=Math.ceil(e))},c.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},c.prototype.to=function(t,e){var i,s=this.current(),n=t-this.relative(s),o=(0<n)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(i=(((t=s+n)-a)%r+r)%r+a)!==t&&i-n<=h&&0<i-n&&(s=i-n,t=i,this.reset(s))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(s,t,e)),this.current(t),this.isVisible()&&this.update()},c.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},c.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},c.prototype.onTransitionEnd=function(t){if(t!==a&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},c.prototype.viewport=function(){var t;return this.options.responsiveBaseElement!==n?t=h(this.options.responsiveBaseElement).width():n.innerWidth?t=n.innerWidth:s.documentElement&&s.documentElement.clientWidth?t=s.documentElement.clientWidth:console.warn("Can not detect viewport width."),t},c.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof jQuery?t:h(t)),this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector)),t&&t.length&&t.filter(function(){return 1===this.nodeType}).each(h.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},c.prototype.add=function(t,e){var i=this.relative(this._current);e=e===a?this._items.length:this.normalize(e,!0),t=t instanceof jQuery?t:h(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},c.prototype.remove=function(t){(t=this.normalize(t,!0))!==a&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},c.prototype.preloadAutoWidthImages=function(t){t.each(h.proxy(function(t,e){this.enter("pre-loading"),e=h(e),h(new Image).one("load",h.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},c.prototype.isElementInViewport=function(t){var e=t.offset().top,i=e+t.outerHeight(),s=jQuery(n).scrollTop(),t=s+jQuery(n).height();return s<i&&e<t},c.prototype.scrollToTop=function(t,e){jQuery("html, body").animate({scrollTop:t+e},400)},c.prototype.scrollToHead=function(){if(0==this.settings.scrollToHead)return!1;if(1==this.settings.autoplay)return!1;if(this.is("initializing"))return!1;if(this.is("resizing"))return!1;var t=this.$element;if(1==this.isElementInViewport(t))return!1;var e=this.$element.offset().top,t=this.settings.scrollToHeadOffset;this.scrollToTop(e,t)},c.prototype.destroy=function(){for(var t in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),h(s).off(".owl.core"),!1!==this.settings.responsive&&(n.clearTimeout(this.resizeTimer),this.off(n,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[t].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},c.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},c.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},c.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},c.prototype.trigger=function(t,e,i,s,n){var o={item:{count:this._items.length,index:this.current()}},r=h.camelCase(h.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),a=h.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),h.extend({relatedTarget:this},o,e));return this._supress[t]||(h.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(a)}),this.register({type:c.Type.Event,name:t}),this.$element.trigger(a),this.settings&&"function"==typeof this.settings[r]&&this.settings[r].call(this,a)),a},c.prototype.enter=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]===a&&(this._states.current[e]=0),this._states.current[e]++},this))},c.prototype.leave=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]--},this))},c.prototype.register=function(i){var e;i.type===c.Type.Event?(h.event.special[i.name]||(h.event.special[i.name]={}),h.event.special[i.name].owl||(e=h.event.special[i.name]._default,h.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},h.event.special[i.name].owl=!0)):i.type===c.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=h.grep(this._states.tags[i.name],h.proxy(function(t,e){return h.inArray(t,this._states.tags[i.name])===e},this)))},c.prototype.suppress=function(t){h.each(t,h.proxy(function(t,e){this._supress[e]=!0},this))},c.prototype.release=function(t){h.each(t,h.proxy(function(t,e){delete this._supress[e]},this))},c.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||n.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},c.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},c.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},h.fn.owlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=h(this),i=t.data("owl.carousel");i||(i=new c(this,"object"==typeof e&&e),t.data("owl.carousel",i),h.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:c.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",h.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},h.fn.owlCarousel.Constructor=c}(window.Zepto||window.jQuery,window,document),function(e,i){var s=function(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(a,n){var e=function(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var e=this._core.settings,i=e.center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this);for(0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop&&(n-=e.lazyLoadEager,i++));s++<i;)this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var e=this._core.$stage.children().eq(t),t=e&&e.find(".owl-lazy");!t||-1<a.inArray(e.get(0),this._loaded)||(t.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(e.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(n,i){var s=function(t){this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var e=this;n(i).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(i).resize(function(){e._core.settings.autoHeight&&(null!=e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(c,e){var i=function(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;!t.namespace||(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[e.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),(t=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),t.attr("width",s),"youtube"===i.type?t.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?t.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&t.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(t).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){var e=function(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&r.support.animation&&r.support.transition){var t=this.core._speed;this.core.speed(0),t=t||1e3;var e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut;if(this.core.current()!==this.previous){if(o){if(i.one(r.support.animation.end,e).addClass("animated owl-animated-out").addClass(o),"none"==jQuery("."+o).css("animation-name"))return void this.core.speed(t);t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:t+"px"})}n&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)}}},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,(window,document)),function(s,n,e){var i=function(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},i.prototype._next=function(t){this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.play=function(t,e){var i;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i)},i.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"))},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call))},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var e=function(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=n.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var t,e,i,s=this._core.settings;for(t in this._controls.$relative=(s.navContainer?n(s.navContainer):n("<div>").addClass(s.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=n("<"+s.navElement+' value="previous item" title="previous item">').addClass(s.navClass[0]).html(s.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(t){this.prev(s.navSpeed)},this)),this._controls.$next=n("<"+s.navElement+' value="next item" title="next item">').addClass(s.navClass[1]).html(s.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(t){this.next(s.navSpeed)},this)),s.changeItemOnClick&&(e=this._core.$stage.children(),i=this._core.clones().length/2,e.on("click",n.proxy(function(t){t=n(t.currentTarget).index();this.to(t-i,s.navSpeed,!0)},this))),s.dotsData||(this._templates=[n('<button role="button">').addClass(s.dotClass).append(n("<span>")).prop("outerHTML")]),this._controls.$absolute=(s.dotsContainer?n(s.dotsContainer):n("<div>").addClass(s.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",n.proxy(function(t){var e=(n(t.target).parent().is(this._controls.$absolute)?n(t.target):n(t.target).parent()).index();t.preventDefault(),this.to(e,s.dotsSpeed)},this)),this._overrides)this._core[t]=n.proxy(this[t],this)},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0;t<s;t++){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=this._core.items().length<=t.items,i=this._core.relative(this._core.current()),s=t.loop||t.rewind;this._controls.$relative.toggleClass("disabled",!t.nav||e),t.nav&&(this._controls.$previous.toggleClass("disabled",!s&&i<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!s&&i>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!t.dots||e),t.dots&&(e=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=e?this._controls.$absolute.html(this._templates.join("")):0<e?this._controls.$absolute.append(new Array(1+e).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var i=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(t,e){return t.start<=i&&t.end>=i},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"==s.slideBy?(e=n.inArray(this.current(),this._pages),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)},e.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):n.proxy(this._overrides.to,this._core)(t,e)},n.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,(window,document)),function(s,n){"use strict";var e=function(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;!t.namespace||(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),(t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t))},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(t){var e=n.location.hash.substring(1),i=this._core.$stage.children(),e=this._hashes[e]&&i.index(this._hashes[e]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(n,o){var r=n("<support>").get(0).style,a="Webkit Moz O ms".split(" "),t={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},e=function(){return!!h("transform")},i=function(){return!!h("perspective")},s=function(){return!!h("animation")};function h(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+a.join(e+" ")+e).split(" "),function(t,e){if(r[e]!==o)return s=!i||e,!1}),s}function l(t){return h(t,!0)}!function(){return!!h("transition")}()||(n.support.transition=new String(l("transition")),n.support.transition.end=t.transition.end[n.support.transition]),s()&&(n.support.animation=new String(l("animation")),n.support.animation.end=t.animation.end[n.support.animation]),e()&&(n.support.transform=new String(l("transform")),n.support.transform3d=i())}(window.Zepto||window.jQuery,(window,void document));
assets_libraries/remote/ue-remote-controls.js CHANGED
@@ -642,9 +642,9 @@ function UERemoteCarouselAPI(){
642
 
643
  validateInited();
644
 
645
-
646
  switch(action){
647
  case "next":
 
648
  g_owlCarousel.trigger('next.owl.carousel');
649
  break;
650
  case "prev":
@@ -969,7 +969,7 @@ function UESyncObject(){
969
  this.on = function(action, func){
970
 
971
  var realAction = "uc_remote_sync_"+g_groupName+"_action_"+action;
972
-
973
  jQuery("body").on(realAction, func);
974
 
975
  }
@@ -1000,8 +1000,6 @@ function UESyncObject(){
1000
  if(textWidgets)
1001
  text += "sync with: " + textWidgets;
1002
 
1003
- //TODO: add debug remote id
1004
-
1005
  return(text);
1006
  }
1007
 
@@ -1143,9 +1141,11 @@ function UERemoteWidgets(){
1143
  syncid:null,
1144
  options_api:null,
1145
  debug_connect:false,
 
1146
  debug_show_ids:false,
1147
  debug_show_widget: "",
1148
- trace_debug:false
 
1149
  };
1150
 
1151
  var g_types = {
@@ -1279,6 +1279,31 @@ function UERemoteWidgets(){
1279
  return(objClosest);
1280
  }
1281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1282
 
1283
  /**
1284
  * detect closest parent
@@ -1287,7 +1312,7 @@ function UERemoteWidgets(){
1287
 
1288
  if(!objParents)
1289
  var objParents = jQuery(".uc-remote-parent").not(g_objWidget);
1290
-
1291
  if(g_vars.trace_debug){
1292
  trace("detect closest start. group:");
1293
  trace(objParents);
@@ -1314,9 +1339,21 @@ function UERemoteWidgets(){
1314
  //find by offset
1315
 
1316
  if(g_vars.trace_debug){
1317
- trace("filter offset");
 
 
 
 
 
 
1318
  }
1319
 
 
 
 
 
 
 
1320
  var objClosest = getClosestByOffset(objParents, g_objWidget);
1321
 
1322
  if(objClosest)
@@ -1361,6 +1398,10 @@ function UERemoteWidgets(){
1361
  if(!g_objParent || g_objParent.length == 0){
1362
 
1363
  if(g_parentID == "auto"){
 
 
 
 
1364
 
1365
  g_objParent = detectClosestParent();
1366
 
@@ -1489,6 +1530,17 @@ function UERemoteWidgets(){
1489
  if(!g_objWidget)
1490
  initWidget(widgetID);
1491
 
 
 
 
 
 
 
 
 
 
 
 
1492
  g_vars.is_inited = initParent();
1493
 
1494
  if(g_vars.is_inited == false){
@@ -1843,6 +1895,30 @@ function UERemoteWidgets(){
1843
 
1844
  }
1845
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1846
  /**
1847
  * check widget debug
1848
  */
@@ -1861,6 +1937,8 @@ function UERemoteWidgets(){
1861
 
1862
  checkWidgetDebugWork();
1863
 
 
 
1864
  }
1865
 
1866
  /**
@@ -1922,7 +2000,6 @@ function UERemoteWidgets(){
1922
  return(false);
1923
  }
1924
 
1925
-
1926
  changeItemByAction(action);
1927
  return(false);
1928
  break;
@@ -2180,8 +2257,12 @@ function UERemoteWidgets(){
2180
 
2181
  var isInited = initAPI();
2182
 
2183
- if(isInited == false)
2184
- throw new Error("Sync Error - can't init api");
 
 
 
 
2185
 
2186
  g_vars.syncid = syncID;
2187
 
@@ -2227,7 +2308,7 @@ function UERemoteWidgets(){
2227
  var isDebug = g_objParent.data("debug");
2228
 
2229
  g_vars.is_debug = isDebug;
2230
-
2231
  if(isDebug === true)
2232
  addParentDebug(objParent);
2233
 
642
 
643
  validateInited();
644
 
 
645
  switch(action){
646
  case "next":
647
+
648
  g_owlCarousel.trigger('next.owl.carousel');
649
  break;
650
  case "prev":
969
  this.on = function(action, func){
970
 
971
  var realAction = "uc_remote_sync_"+g_groupName+"_action_"+action;
972
+
973
  jQuery("body").on(realAction, func);
974
 
975
  }
1000
  if(textWidgets)
1001
  text += "sync with: " + textWidgets;
1002
 
 
 
1003
  return(text);
1004
  }
1005
 
1141
  syncid:null,
1142
  options_api:null,
1143
  debug_connect:false,
1144
+ show_connection_debug:false,
1145
  debug_show_ids:false,
1146
  debug_show_widget: "",
1147
+ trace_debug:false,
1148
+ show_trace_when_debug_on: false
1149
  };
1150
 
1151
  var g_types = {
1279
  return(objClosest);
1280
  }
1281
 
1282
+ /**
1283
+ * filter parents by section
1284
+ */
1285
+ function filterParentsBySection(objParents, objElement){
1286
+
1287
+ var objSection = objElement.closest(".elementor-top-section");
1288
+
1289
+ if(objSection.length == 0)
1290
+ return(objParents);
1291
+
1292
+ var section = objSection[0];
1293
+
1294
+ var objFiltered = objParents.filter(function(index, parent){
1295
+
1296
+ var isContains = jQuery.contains(section, parent);
1297
+
1298
+ return isContains;
1299
+ });
1300
+
1301
+ if(objFiltered.length)
1302
+ return(objFiltered);
1303
+
1304
+ return(objParents);
1305
+ }
1306
+
1307
 
1308
  /**
1309
  * detect closest parent
1312
 
1313
  if(!objParents)
1314
  var objParents = jQuery(".uc-remote-parent").not(g_objWidget);
1315
+
1316
  if(g_vars.trace_debug){
1317
  trace("detect closest start. group:");
1318
  trace(objParents);
1339
  //find by offset
1340
 
1341
  if(g_vars.trace_debug){
1342
+ trace("filter by section");
1343
+ }
1344
+
1345
+ var objParents = filterParentsBySection(objParents, g_objWidget);
1346
+
1347
+ if(g_vars.trace_debug){
1348
+ trace(objParents);
1349
  }
1350
 
1351
+ if(objParents.length == 1)
1352
+ return(objParents);
1353
+
1354
+ if(g_vars.trace_debug)
1355
+ trace("get closest by parent");
1356
+
1357
  var objClosest = getClosestByOffset(objParents, g_objWidget);
1358
 
1359
  if(objClosest)
1398
  if(!g_objParent || g_objParent.length == 0){
1399
 
1400
  if(g_parentID == "auto"){
1401
+
1402
+ if(g_vars.trace_debug){
1403
+ trace("auto detect selected");
1404
+ }
1405
 
1406
  g_objParent = detectClosestParent();
1407
 
1530
  if(!g_objWidget)
1531
  initWidget(widgetID);
1532
 
1533
+ //init the debug related
1534
+
1535
+ var isDebug = g_objWidget.data("debug");
1536
+ if(isDebug === true){
1537
+
1538
+ if(g_vars.show_trace_when_debug_on == true)
1539
+ g_vars.trace_debug = true;
1540
+
1541
+ g_vars.show_connection_debug = true;
1542
+ }
1543
+
1544
  g_vars.is_inited = initParent();
1545
 
1546
  if(g_vars.is_inited == false){
1895
 
1896
  }
1897
 
1898
+ /**
1899
+ * check and put debug connection
1900
+ */
1901
+ function checkDebugConnectionText(){
1902
+
1903
+ if(!g_objWidget)
1904
+ return(false);
1905
+
1906
+ if(g_vars.show_connection_debug == false)
1907
+ return(false);
1908
+
1909
+ if(!g_objParent || g_objParent.length == 0)
1910
+ throw new Error("Not conneted to no parent");
1911
+
1912
+ var widgetName = g_objParent.data("widgetname");
1913
+ var widgetID = g_objParent.attr("id");
1914
+
1915
+ var text = "connected to <a href='#"+widgetID+"' style='color:green;text-decoration:underline'><b>" + widgetName + "</b></a>";
1916
+
1917
+ displayTextOnWidget(g_objWidget, text, "debug");
1918
+
1919
+ }
1920
+
1921
+
1922
  /**
1923
  * check widget debug
1924
  */
1937
 
1938
  checkWidgetDebugWork();
1939
 
1940
+ checkDebugConnectionText();
1941
+
1942
  }
1943
 
1944
  /**
2000
  return(false);
2001
  }
2002
 
 
2003
  changeItemByAction(action);
2004
  return(false);
2005
  break;
2257
 
2258
  var isInited = initAPI();
2259
 
2260
+ if(isInited == false){
2261
+
2262
+ var widgetID = g_objParent.attr("id");
2263
+
2264
+ throw new Error("Sync Error - can't init api for "+widgetID+", please check if the widget is inited and working.");
2265
+ }
2266
 
2267
  g_vars.syncid = syncID;
2268
 
2308
  var isDebug = g_objParent.data("debug");
2309
 
2310
  g_vars.is_debug = isDebug;
2311
+
2312
  if(isDebug === true)
2313
  addParentDebug(objParent);
2314
 
assets_libraries/unitegallery/css/unite-gallery.css CHANGED
@@ -247,24 +247,29 @@
247
  position:absolute;
248
  z-index:2;
249
  cursor:pointer;
 
 
 
250
  }
251
 
252
  .ug-slider-wrapper .ug-button-videoplay.ug-type-square{
253
  width:86px;
254
  height:66px;
255
- background-image:url('../images/play-button-square.png');
256
- background-position:0px -66px;
 
257
  }
258
 
259
  .ug-slider-wrapper .ug-button-videoplay.ug-type-square.ug-button-hover{
260
- background-position:0px 0px;
261
  }
262
 
263
 
264
  .ug-slider-wrapper .ug-button-videoplay.ug-type-round{
265
  width:76px;
266
  height:76px;
267
- background-image:url('../images/play-button-round.png');
 
268
  opacity:0.9;
269
  filter: alpha(opacity = 90);
270
  transition: all 0.3s ease 0s !important;
@@ -449,11 +454,16 @@ img.ug-sepia-effect{
449
  }
450
 
451
  .ug-gallery-wrapper .ug-bullets .ug-bullet{
452
- background-repeat:no-repeat;
453
  cursor:pointer;
454
  display:block;
455
  float:left;
456
  z-index:2;
 
 
 
 
 
 
457
  }
458
 
459
  .ug-gallery-wrapper .ug-bullets .ug-bullet:first-child{
@@ -580,8 +590,19 @@ img.ug-sepia-effect{
580
  position:absolute;
581
  z-index:13;
582
  cursor:pointer;
 
 
 
 
 
 
 
 
 
583
  }
584
 
 
 
585
  .ug-gallery-wrapper .ug-overlay-disabled{
586
  position:absolute;
587
  z-index:100;
@@ -609,6 +630,7 @@ img.ug-sepia-effect{
609
 
610
  .ug-strip-panel .ug-strip-arrow.ug-button-disabled{
611
  cursor:default;
 
612
  }
613
 
614
 
@@ -988,38 +1010,13 @@ img.ug-sepia-effect{
988
 
989
  /* --- bullets -- */
990
 
991
- .ug-bullets.ug-skin-default .ug-bullet{
 
992
  width:15px;
993
  height:15px;
994
- background-image:url('../skins/default/slider_bullets.png');
995
- background-position:top left;
996
  margin-left:5px;
997
  }
998
 
999
- .ug-bullets.ug-skin-default .ug-bullet.ug-bullet-active{
1000
- background-position:bottom left;
1001
- }
1002
-
1003
- .ug-bullets.ug-skin-default.ug-bullets-gray .ug-bullet{
1004
- background-image:url('../skins/default/tile_bullets_gray.png');
1005
- }
1006
-
1007
- .ug-bullets.ug-skin-default.ug-bullets-blue .ug-bullet{
1008
- background-image:url('../skins/default/tile_bullets_blue.png');
1009
- }
1010
-
1011
- .ug-bullets.ug-skin-default.ug-bullets-brown .ug-bullet{
1012
- background-image:url('../skins/default/tile_bullets_brown.png');
1013
- }
1014
-
1015
- .ug-bullets.ug-skin-default.ug-bullets-green .ug-bullet{
1016
- background-image:url('../skins/default/tile_bullets_green.png');
1017
- }
1018
-
1019
- .ug-bullets.ug-skin-default.ug-bullets-red .ug-bullet{
1020
- background-image:url('../skins/default/tile_bullets_red.png');
1021
- }
1022
-
1023
  .ug-button-tile-navigation{
1024
  width:36px;
1025
  height:36px;
@@ -1070,46 +1067,44 @@ img.ug-sepia-effect{
1070
 
1071
  .ug-button-play.ug-skin-default{
1072
  position:absolute;
1073
- background-image:url('../skins/default/button_playpause.png');
1074
  width:14px;
1075
  height:17px;
1076
  cursor:pointer;
1077
- background-position:0px 0px;
1078
  }
1079
 
1080
  .ug-button-play.ug-skin-default.ug-button-hover{
1081
- background-position:0px -17px;
1082
  }
1083
 
1084
  .ug-button-play.ug-skin-default.ug-stop-mode{
1085
- background-position:0px -34px;
1086
  }
1087
 
1088
  .ug-button-play.ug-skin-default.ug-stop-mode.ug-button-hover{
1089
- background-position:0px -51px;
1090
  }
1091
 
1092
  /* --- fullscreen button -- */
1093
 
1094
  .ug-button-fullscreen.ug-skin-default{
1095
  position:absolute;
1096
- background-image:url('../skins/default/button_fullscreen.png');
1097
  width:16px;
1098
  height:16px;
1099
  cursor:pointer;
1100
- background-position:0px 0px;
1101
  }
1102
 
1103
  .ug-button-fullscreen.ug-skin-default.ug-button-hover{
1104
- background-position:0px -16px;
1105
  }
1106
 
1107
  .ug-button-fullscreen.ug-skin-default.ug-fullscreenmode{
1108
- background-position:0px -32px;
1109
  }
1110
 
1111
  .ug-button-fullscreen.ug-skin-default.ug-fullscreenmode.ug-button-hover{
1112
- background-position:0px -48px;
1113
  }
1114
 
1115
 
@@ -1276,23 +1271,12 @@ img.ug-sepia-effect{
1276
 
1277
  .ug-strip-panel .ug-strip-arrow-left.ug-skin-default .ug-strip-arrow-tip,
1278
  .ug-strip-panel .ug-strip-arrow-right.ug-skin-default .ug-strip-arrow-tip{
1279
- background-position:0px 0px;
1280
- background-repeat:no-repeat;
1281
- width:4px;
1282
- height:7px;
1283
- }
1284
-
1285
- .ug-strip-panel .ug-strip-arrow-left.ug-skin-default .ug-strip-arrow-tip{
1286
- background-image:url('../skins/default/arrows_strip_left.png');
1287
- }
1288
-
1289
- .ug-strip-panel .ug-strip-arrow-right.ug-skin-default .ug-strip-arrow-tip{
1290
- background-image:url('../skins/default/arrows_strip_right.png');
1291
  }
1292
 
1293
  .ug-strip-panel .ug-strip-arrow-left.ug-skin-default.ug-button-hover .ug-strip-arrow-tip,
1294
  .ug-strip-panel .ug-strip-arrow-right.ug-skin-default.ug-button-hover .ug-strip-arrow-tip{
1295
- background-position:0px -7px;
1296
  }
1297
 
1298
 
@@ -1304,29 +1288,25 @@ img.ug-sepia-effect{
1304
  width:50px;
1305
  }
1306
 
1307
- .ug-strip-panel .ug-strip-arrow-up.ug-skin-default .ug-strip-arrow-tip,
1308
- .ug-strip-panel .ug-strip-arrow-down.ug-skin-default .ug-strip-arrow-tip{
1309
- background-position:0px 0px;
1310
- background-repeat:no-repeat;
1311
- width:7px;
1312
- height:4px;
1313
  }
1314
 
1315
- .ug-strip-panel .ug-strip-arrow-up.ug-skin-default .ug-strip-arrow-tip{
1316
- background-image:url('../skins/default/arrows_strip_up.png');
 
1317
  }
1318
 
1319
- .ug-strip-panel .ug-strip-arrow-down.ug-skin-default .ug-strip-arrow-tip{
1320
- background-image:url('../skins/default/arrows_strip_down.png');
1321
  }
1322
 
1323
  .ug-strip-panel .ug-strip-arrow-up.ug-skin-default.ug-button-hover .ug-strip-arrow-tip,
1324
  .ug-strip-panel .ug-strip-arrow-down.ug-skin-default.ug-button-hover .ug-strip-arrow-tip{
1325
- background-position:-7px 0px;
1326
  }
1327
 
1328
  .ug-strip-panel .ug-strip-arrow.ug-skin-default.ug-button-disabled .ug-strip-arrow-tip{
1329
- background-position:0px 0px;
1330
  opacity:0.5;
1331
  filter: alpha(opacity = 50);
1332
  }
@@ -1337,62 +1317,34 @@ img.ug-sepia-effect{
1337
  /* left and right handle */
1338
  .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default,
1339
  .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default{
1340
- width:22px;
1341
  height:36px;
1342
- background-image:url('../skins/default/grid_handle_black_left.png');
1343
- background-repeat:no-repeat;
1344
- background-position:0px -36px;
1345
  }
1346
 
1347
- .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default{
1348
- background-image:url('../skins/default/grid_handle_black_right.png');
1349
- background-position:0px -36px;
1350
- }
1351
-
1352
- .ug-gallery-wrapper .ug-handle-tip-left.ug-button-hover.ug-skin-default,
1353
- .ug-gallery-wrapper .ug-handle-tip-right.ug-button-hover.ug-skin-default{
1354
- background-position:0px -0px;
1355
  }
1356
 
1357
- .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default.ug-button-closed,
1358
- .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default.ug-button-closed{
1359
- background-position:0px -108px;
1360
  }
1361
 
1362
- .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default.ug-button-closed.ug-button-hover,
1363
- .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default.ug-button-closed.ug-button-hover{
1364
- background-position:0px -72px;
1365
- }
1366
-
1367
-
1368
  /* top and bottom handle */
1369
 
1370
  .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default,
1371
  .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default{
1372
  width:36px;
1373
- height:22px;
1374
- background-image:url('../skins/default/grid_handle_black_top.png');
1375
- background-repeat:no-repeat;
1376
- background-position:-36px 0px;
1377
- }
1378
-
1379
- .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default{
1380
- background-image:url('../skins/default/grid_handle_black_bottom.png');
1381
- background-position:-36px 0px;
1382
- }
1383
-
1384
- .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default.ug-button-hover,
1385
- .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default.ug-button-hover{
1386
- background-position:0px 0px;
1387
- }
1388
-
1389
- .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default.ug-button-closed,
1390
- .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default.ug-button-closed{
1391
- background-position:-108px 0px;
1392
  }
1393
 
1394
- .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default.ug-button-closed.ug-button-hover,
1395
- .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default.ug-button-closed.ug-button-hover{
1396
- background-position:-72px 0px;
1397
  }
1398
 
 
 
 
 
247
  position:absolute;
248
  z-index:2;
249
  cursor:pointer;
250
+ display: flex;
251
+ justify-content: center;
252
+ align-items: center;
253
  }
254
 
255
  .ug-slider-wrapper .ug-button-videoplay.ug-type-square{
256
  width:86px;
257
  height:66px;
258
+ background-color: #000000;
259
+ opacity: .6;
260
+ border-radius: 5px;
261
  }
262
 
263
  .ug-slider-wrapper .ug-button-videoplay.ug-type-square.ug-button-hover{
264
+ opacity: .8;
265
  }
266
 
267
 
268
  .ug-slider-wrapper .ug-button-videoplay.ug-type-round{
269
  width:76px;
270
  height:76px;
271
+ background-color: #000000;
272
+ border-radius: 50%;
273
  opacity:0.9;
274
  filter: alpha(opacity = 90);
275
  transition: all 0.3s ease 0s !important;
454
  }
455
 
456
  .ug-gallery-wrapper .ug-bullets .ug-bullet{
 
457
  cursor:pointer;
458
  display:block;
459
  float:left;
460
  z-index:2;
461
+ border-radius: 50%;
462
+ border: 1px solid #ffffff;
463
+ }
464
+
465
+ .ug-gallery-wrapper .ug-bullets .ug-bullet.ug-bullet-active{
466
+ background-color: #ffffff;
467
  }
468
 
469
  .ug-gallery-wrapper .ug-bullets .ug-bullet:first-child{
590
  position:absolute;
591
  z-index:13;
592
  cursor:pointer;
593
+ background-color: #000000;
594
+ }
595
+
596
+ .ug-gallery-wrapper .ug-panel-handle-tip svg{
597
+ position: absolute;
598
+ top: 50%;
599
+ left: 50%;
600
+ transform: translate(-50%, -50%);
601
+ opacity: 0.7;
602
  }
603
 
604
+
605
+
606
  .ug-gallery-wrapper .ug-overlay-disabled{
607
  position:absolute;
608
  z-index:100;
630
 
631
  .ug-strip-panel .ug-strip-arrow.ug-button-disabled{
632
  cursor:default;
633
+ opacity:0.5;
634
  }
635
 
636
 
1010
 
1011
  /* --- bullets -- */
1012
 
1013
+ .ug-bullets .ug-bullet{
1014
+ box-sizing: border-box;
1015
  width:15px;
1016
  height:15px;
 
 
1017
  margin-left:5px;
1018
  }
1019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1020
  .ug-button-tile-navigation{
1021
  width:36px;
1022
  height:36px;
1067
 
1068
  .ug-button-play.ug-skin-default{
1069
  position:absolute;
 
1070
  width:14px;
1071
  height:17px;
1072
  cursor:pointer;
1073
+ opacity: .5;
1074
  }
1075
 
1076
  .ug-button-play.ug-skin-default.ug-button-hover{
1077
+ opacity: 1;
1078
  }
1079
 
1080
  .ug-button-play.ug-skin-default.ug-stop-mode{
1081
+ opacity: .5;
1082
  }
1083
 
1084
  .ug-button-play.ug-skin-default.ug-stop-mode.ug-button-hover{
1085
+ opacity: 1;
1086
  }
1087
 
1088
  /* --- fullscreen button -- */
1089
 
1090
  .ug-button-fullscreen.ug-skin-default{
1091
  position:absolute;
 
1092
  width:16px;
1093
  height:16px;
1094
  cursor:pointer;
1095
+ opacity: .5;
1096
  }
1097
 
1098
  .ug-button-fullscreen.ug-skin-default.ug-button-hover{
1099
+ opacity: 1;
1100
  }
1101
 
1102
  .ug-button-fullscreen.ug-skin-default.ug-fullscreenmode{
1103
+ opacity: .5;
1104
  }
1105
 
1106
  .ug-button-fullscreen.ug-skin-default.ug-fullscreenmode.ug-button-hover{
1107
+ opacity: 1;
1108
  }
1109
 
1110
 
1271
 
1272
  .ug-strip-panel .ug-strip-arrow-left.ug-skin-default .ug-strip-arrow-tip,
1273
  .ug-strip-panel .ug-strip-arrow-right.ug-skin-default .ug-strip-arrow-tip{
1274
+ opacity: .7;
 
 
 
 
 
 
 
 
 
 
 
1275
  }
1276
 
1277
  .ug-strip-panel .ug-strip-arrow-left.ug-skin-default.ug-button-hover .ug-strip-arrow-tip,
1278
  .ug-strip-panel .ug-strip-arrow-right.ug-skin-default.ug-button-hover .ug-strip-arrow-tip{
1279
+ opacity: 1;
1280
  }
1281
 
1282
 
1288
  width:50px;
1289
  }
1290
 
1291
+ .ug-strip-panel .ug-strip-arrow-up.ug-skin-default .ug-strip-arrow-tip svg{
1292
+ transform: rotate(90deg);
 
 
 
 
1293
  }
1294
 
1295
+ .ug-strip-panel .ug-strip-arrow-up.ug-skin-default .ug-strip-arrow-tip,
1296
+ .ug-strip-panel .ug-strip-arrow-down.ug-skin-default .ug-strip-arrow-tip{
1297
+ opacity: .5;
1298
  }
1299
 
1300
+ .ug-strip-panel .ug-strip-arrow-down.ug-skin-default .ug-strip-arrow-tip svg{
1301
+ transform: rotate(90deg);
1302
  }
1303
 
1304
  .ug-strip-panel .ug-strip-arrow-up.ug-skin-default.ug-button-hover .ug-strip-arrow-tip,
1305
  .ug-strip-panel .ug-strip-arrow-down.ug-skin-default.ug-button-hover .ug-strip-arrow-tip{
1306
+ opacity: 1;
1307
  }
1308
 
1309
  .ug-strip-panel .ug-strip-arrow.ug-skin-default.ug-button-disabled .ug-strip-arrow-tip{
 
1310
  opacity:0.5;
1311
  filter: alpha(opacity = 50);
1312
  }
1317
  /* left and right handle */
1318
  .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default,
1319
  .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default{
1320
+ width:26px;
1321
  height:36px;
 
 
 
1322
  }
1323
 
1324
+ .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default.ug-button-hover svg,
1325
+ .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default.ug-button-hover svg{
1326
+ opacity: 1;
 
 
 
 
 
1327
  }
1328
 
1329
+ .ug-gallery-wrapper .ug-handle-tip-left.ug-skin-default.ug-button-closed svg,
1330
+ .ug-gallery-wrapper .ug-handle-tip-right.ug-skin-default.ug-button-closed svg{
1331
+ transform: rotate(180deg) translate(50%, 50%);
1332
  }
1333
 
 
 
 
 
 
 
1334
  /* top and bottom handle */
1335
 
1336
  .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default,
1337
  .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default{
1338
  width:36px;
1339
+ height:26px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1340
  }
1341
 
1342
+ .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default.ug-button-hover svg,
1343
+ .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default.ug-button-hover svg{
1344
+ opacity: 1;
1345
  }
1346
 
1347
+ .ug-gallery-wrapper .ug-handle-tip-top.ug-skin-default.ug-button-closed svg,
1348
+ .ug-gallery-wrapper .ug-handle-tip-bottom.ug-skin-default.ug-button-closed svg{
1349
+ transform: rotate(180deg) translate(50%, 50%);
1350
+ }
assets_libraries/unitegallery/js/unitegallery.js CHANGED
@@ -1,7 +1,8 @@
1
- //Unite Gallery, Version: 1.7.61, released 26 July 2022
2
 
3
  //------ ug-common-libraries.js------
4
 
 
5
  /** -------------- MouseWheel ---------------------*/
6
 
7
  !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=h.call(arguments,1),u=0,r=0,d=0,f=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(r=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(r=-1*d,d=0),u=0===d?r:d,"deltaY"in s&&(d=-1*s.deltaY,u=d),"deltaX"in s&&(r=s.deltaX,0===d&&(u=-1*r)),0!==d||0!==r){if(1===s.deltaMode){var c=e.data(this,"mousewheel-line-height");u*=c,d*=c,r*=c}else if(2===s.deltaMode){var m=e.data(this,"mousewheel-page-height");u*=m,d*=m,r*=m}return f=Math.max(Math.abs(d),Math.abs(r)),(!l||l>f)&&(l=f,i(s,f)&&(l/=40)),i(s,f)&&(u/=40,r/=40,d/=40),u=Math[u>=1?"floor":"ceil"](u/l),r=Math[r>=1?"floor":"ceil"](r/l),d=Math[d>=1?"floor":"ceil"](d/l),t.deltaX=r,t.deltaY=d,t.deltaFactor=l,t.deltaMode=0,a.unshift(t,u,r,d),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){l=null}function i(e,t){return r.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,l,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice;if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var r=e.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",r.getLineHeight(this)),e.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=a.length;e;)this.removeEventListener(a[--e],t,!1);else this.onmousewheel=null},getLineHeight:function(t){return parseInt(e(t)["offsetParent"in e.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
@@ -411,9 +412,7 @@ function UGFunctions(){
411
  */
412
  this.addFullScreenChangeEvent = function(func){
413
 
414
- if(document["webkitCancelFullScreen"])
415
- addEvent("webkitfullscreenchange",document,func);
416
- else if(document["msExitFullscreen"])
417
  addEvent("MSFullscreenChange",document,func);
418
  else if(document["mozCancelFullScreen"])
419
  addEvent("mozfullscreenchange",document,func);
@@ -551,12 +550,13 @@ function UGFunctions(){
551
  imageLeft = (maxWidth - imageWidth) / 2;
552
  imageTop = (maxHeight - imageHeight) / 2;
553
 
554
- }else if(scaleMode == "fill"){
 
555
  var ratio = originalWidth / originalHeight;
556
 
557
  imageHeight = maxHeight;
558
  imageWidth = imageHeight * ratio;
559
-
560
  if(imageWidth < maxWidth){
561
  imageWidth = maxWidth;
562
  imageHeight = imageWidth / ratio;
@@ -564,6 +564,10 @@ function UGFunctions(){
564
  //center y position
565
  imageLeft = 0;
566
  imageTop = Math.round((imageHeight - maxHeight) / 2 * -1);
 
 
 
 
567
  }else{ //center x position
568
  imageTop = 0;
569
  imageLeft = Math.round((imageWidth - maxWidth) / 2 * -1);
@@ -2095,14 +2099,26 @@ function UGFunctions(){
2095
  */
2096
  this.convertHexToRGB = function(hexInput, opacity){
2097
 
2098
- var hex = hexInput.replace('#','');
2099
- if(hex === hexInput)
2100
- return(hexInput);
2101
-
2102
- r = parseInt(hex.substring(0,2), 16);
2103
- g = parseInt(hex.substring(2,4), 16);
2104
- b = parseInt(hex.substring(4,6), 16);
2105
- result = 'rgba('+r+','+g+','+b+','+opacity+')';
 
 
 
 
 
 
 
 
 
 
 
 
2106
  return result;
2107
  }
2108
 
@@ -2377,8 +2393,8 @@ function UGFunctions(){
2377
 
2378
  objButton.on("click touchstart", function(event){
2379
 
2380
- objThis = jQuery(this);
2381
-
2382
  event.stopPropagation();
2383
  event.stopImmediatePropagation();
2384
 
@@ -3362,8 +3378,8 @@ function UGThumbsGeneral(){
3362
 
3363
  if(objThumb.parent().length == 0) //don't treat detached thumbs
3364
  return(false);
3365
-
3366
- objItem = t.getItemByThumb(objThumb);
3367
 
3368
  if(objItem.isLoaded == true && isForce === false)
3369
  return(false);
@@ -3388,7 +3404,7 @@ function UGThumbsGeneral(){
3388
  */
3389
  function onThumbImageLoaded(data, objThumb, objImage){
3390
 
3391
- objItem = t.getItemByThumb(objThumb);
3392
 
3393
  objItem.isLoaded = true;
3394
  objItem.isThumbImageLoaded = true;
@@ -3435,7 +3451,7 @@ function UGThumbsGeneral(){
3435
  if(g_temp.isEffectOverlay){
3436
 
3437
  if(g_options.thumb_overlay_color){
3438
-
3439
  var objCss = {};
3440
  if(g_functions.isRgbaSupported()){
3441
  var colorRGB = g_functions.convertHexToRGB(g_options.thumb_overlay_color, g_options.thumb_overlay_opacity);
@@ -4005,7 +4021,7 @@ function UGThumbsStrip(){
4005
  if(g_isVertical == false)
4006
  posy = g_options.strip_padding_top;
4007
 
4008
- for (i = 0; i < arrThumbs.length; i++) {
4009
 
4010
  var objThumb = jQuery(arrThumbs[i]);
4011
 
@@ -4823,6 +4839,7 @@ function UGThumbsStrip(){
4823
  }
4824
  //------ ug-touchthumbs.js------
4825
 
 
4826
  /**
4827
  * touch thumbs control class
4828
  * addon to strip gallery
@@ -5315,6 +5332,7 @@ function UGTouchThumbsControl(){
5315
  }
5316
 
5317
  //------ ug-panelsbase.js------
 
5318
  /** -------------- Panel Base Functions ---------------------*/
5319
 
5320
  function UGPanelsBase(){
@@ -5350,6 +5368,9 @@ function UGPanelsBase(){
5350
  else
5351
  var enable_handle = g_options.gridpanel_enable_handle;
5352
 
 
 
 
5353
  // add handle
5354
  if (enable_handle == true) {
5355
  g_objHandle = new UGPanelHandle();
@@ -5672,25 +5693,31 @@ function UGPanelHandle(){
5672
  this.setHtml = function(){
5673
 
5674
  var orientation = g_panel.getOrientation();
5675
-
5676
  var classTip = "ug-panel-handle-tip";
5677
 
 
 
5678
  switch(orientation){
5679
  case "right":
5680
- classTip += " ug-handle-tip-left";
5681
- break;
5682
- case "left":
 
5683
  classTip += " ug-handle-tip-right";
 
5684
  break;
5685
  case "bottom":
5686
- classTip += " ug-handle-tip-top";
5687
- break;
5688
- case "top":
 
5689
  classTip += " ug-handle-tip-bottom";
 
5690
  break;
5691
  }
5692
 
5693
- g_objPanel.append("<div class='"+classTip+" ug-skin-" + g_options.panel_handle_skin + "'></div>");
5694
  g_objHandleTip = g_objPanel.children(".ug-panel-handle-tip");
5695
  }
5696
 
@@ -5845,7 +5872,9 @@ function UGPanelHandle(){
5845
 
5846
  }
5847
  //------ ug-strippanel.js------
 
5848
  /**
 
5849
  * grid panel class addon to grid gallery
5850
  */
5851
  function UGStripPanel() {
@@ -6030,6 +6059,9 @@ function UGStripPanel() {
6030
 
6031
  var arrowPrevClass = "ug-strip-arrow-left";
6032
  var arrowNextClass = "ug-strip-arrow-right";
 
 
 
6033
  if (g_options.strippanel_vertical_type == true) {
6034
  arrowPrevClass = "ug-strip-arrow-up";
6035
  arrowNextClass = "ug-strip-arrow-down";
@@ -6037,10 +6069,10 @@ function UGStripPanel() {
6037
 
6038
  g_objPanel.append("<div class='ug-strip-arrow " + arrowPrevClass
6039
  + " ug-skin-" + g_options.strippanel_buttons_skin
6040
- + "'><div class='ug-strip-arrow-tip'></div></div>");
6041
  g_objPanel.append("<div class='ug-strip-arrow " + arrowNextClass
6042
  + " ug-skin-" + g_options.strippanel_buttons_skin
6043
- + "'><div class='ug-strip-arrow-tip'></div></div>");
6044
 
6045
  }
6046
 
@@ -6066,6 +6098,15 @@ function UGStripPanel() {
6066
  g_objPanel.css("background-color",
6067
  g_options.strippanel_background_color);
6068
 
 
 
 
 
 
 
 
 
 
6069
  }
6070
 
6071
  /**
@@ -6527,7 +6568,9 @@ function UGStripPanel() {
6527
  }
6528
 
6529
  //------ ug-gridpanel.js------
 
6530
  /**
 
6531
  * grid panel class
6532
  * addon to grid gallery
6533
  */
@@ -7438,7 +7481,9 @@ function UGGridPanel(){
7438
 
7439
  }
7440
  //------ ug-thumbsgrid.js------
 
7441
  /**
 
7442
  * thumbs class
7443
  * addon to strip gallery
7444
  */
@@ -7902,6 +7947,7 @@ function UGThumbsGrid(){
7902
  * position the thumbs and init panes vertically
7903
  */
7904
  function positionThumb_vert(){
 
7905
  var arrThumbs = g_objInner.children(".ug-thumb-wrapper");
7906
 
7907
  var posx = 0;
@@ -7920,8 +7966,8 @@ function UGThumbsGrid(){
7920
  g_temp.arrPanes.push(baseX);
7921
 
7922
  var numThumbs = arrThumbs.length;
7923
-
7924
- for(i=0;i < numThumbs; i++){
7925
  var objThumb = jQuery(arrThumbs[i]);
7926
  g_functions.placeElement(objThumb, posx, posy);
7927
 
@@ -8015,7 +8061,7 @@ function UGThumbsGrid(){
8015
 
8016
  var numThumbs = arrThumbs.length;
8017
 
8018
- for(i=0;i < numThumbs; i++){
8019
  var objThumb = jQuery(arrThumbs[i]);
8020
 
8021
  var thumbWidth = objThumb.outerWidth();
@@ -8356,8 +8402,8 @@ function UGThumbsGrid(){
8356
 
8357
  //check position, if more then half, move
8358
  var currentInnerPos = getInnerPos();
8359
- diffPos = Math.abs(objData.startInnerPos - currentInnerPos);
8360
-
8361
  var paneSize = getPaneSize();
8362
  var breakSize = Math.round(paneSize * 3 / 8);
8363
 
@@ -8983,7 +9029,9 @@ function UGThumbsGrid(){
8983
 
8984
 
8985
  //------ ug-tiledesign.js------
 
8986
  /**
 
8987
  * tiles design class
8988
  */
8989
  function UGTileDesign(){
@@ -10629,7 +10677,9 @@ function UGTileDesign(){
10629
 
10630
 
10631
  }//------ ug-tiles.js------
 
10632
  /**
 
10633
  * tiles class
10634
  */
10635
  function UGTiles(){
@@ -10638,11 +10688,11 @@ function UGTiles(){
10638
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper, g_objParent;
10639
  var g_functions = new UGFunctions(), g_arrItems, g_objTileDesign = new UGTileDesign();
10640
  var g_thumbs = new UGThumbsGeneral(), g_vars = {};
10641
- var g_arrNestedGridRow, g_arrNestedItems;
10642
 
10643
 
10644
  var g_options = {
10645
- tiles_type: "columns", //columns / justified - tiles layout type
10646
  tiles_col_width: 250, //column width - exact or base according the settings
10647
  tiles_align:"center", //align of the tiles in the space
10648
  tiles_exact_width: false, //exact width of column - disables the min and max columns
@@ -10958,7 +11008,7 @@ function UGTiles(){
10958
 
10959
  //get posx array (constact to all columns)
10960
  g_vars.arrPosx = [];
10961
- for(col = 0; col < g_vars.numCols; col++){
10962
  var colX = g_functions.getColX(col, g_vars.colWidth, g_vars.colGap);
10963
  g_vars.arrPosx[col] = colX + g_vars.addX;
10964
  }
@@ -10988,7 +11038,7 @@ function UGTiles(){
10988
 
10989
  var minHeight = 999999999;
10990
 
10991
- for(col = 0; col < g_vars.numCols; col++){
10992
 
10993
  if(g_vars.colHeights[col] == undefined || g_vars.colHeights[col] == 0)
10994
  return col;
@@ -12068,7 +12118,8 @@ function UGTiles(){
12068
  * resize to new Dim width
12069
  */
12070
  function resizeToNewWidth(tileID, newDimWidth, toReturn) {
12071
- if(!toReturn){
 
12072
  toReturn = false;
12073
  }
12074
 
@@ -12078,8 +12129,8 @@ function UGTiles(){
12078
  var imgWidth = currentTile.imgWidth;
12079
  var imgHeight = currentTile.imgHeight;
12080
  var ratio = imgWidth / imgHeight;
12081
- dimWidth = newDimWidth;
12082
- dimHeight = Math.round(dimWidth / ratio);
12083
  if(toReturn == true){
12084
  var sizes = jQuery.extend(true, {}, currentTile);
12085
  sizes.dimWidth = dimWidth;
@@ -12122,18 +12173,20 @@ function UGTiles(){
12122
  currentTile.width = dimWidth * colWidth + gapWidth * (dimWidth - 1);
12123
  currentTile.height = newDimHeight * colWidth + gapWidth * (newDimHeight - 1);
12124
  }
12125
-
 
12126
  /**
12127
  * calc resize koef
12128
  */
12129
  function calcResizeRatio(objTilesAndSizes){
 
12130
  var tempResizes = 0;
12131
  var tempNum = 0;
12132
 
12133
  for(var i = 0; i<objTilesAndSizes.length; i++){
12134
  var sizes = g_arrNestedItems[objTilesAndSizes[i].tileID];
12135
  if((sizes.dimHeight != 0) && (sizes.height != 0)){
12136
- resizeVal = (sizes.dimWidth/sizes.dimHeight)/(sizes.imgWidth/sizes.imgHeight);
12137
  } else {
12138
  return;
12139
  }
@@ -12146,6 +12199,7 @@ function UGTiles(){
12146
  return tempResizes/tempNum;
12147
  }
12148
 
 
12149
  /**
12150
  * check for column break
12151
  */
@@ -12442,353 +12496,344 @@ function UGTiles(){
12442
 
12443
 
12444
  //------ ug-avia.js------
12445
-
12446
  /**
12447
- * avia control class
12448
- * addon to strip gallery
12449
- */
12450
- function UGAviaControl(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12451
 
12452
- var g_parent, g_gallery, g_objects, g_objStrip, g_objStripInner, g_options;
12453
- var g_isVertical;
12454
-
12455
- var g_temp = {
12456
- touchEnabled:false, //variable that tells if touch event was before move event
12457
- isMouseInsideStrip: false,
12458
- strip_finalPos:0,
12459
- handle_timeout:"",
12460
- isStripMoving:false,
12461
- isControlEnabled: true,
12462
- maxDpos:1000 //max speed, lower - slower
12463
- };
12464
-
12465
-
12466
- /**
12467
- * enable the control
12468
- */
12469
- this.enable = function(){
12470
- g_temp.isControlEnabled = true;
12471
- }
12472
-
12473
- /**
12474
- * disable the control
12475
- */
12476
- this.disable = function(){
12477
- g_temp.isControlEnabled = false;
12478
- }
12479
-
12480
- /**
12481
- * set scroll avia type - sides only, full data determine on size
12482
- */
12483
- function setScrollType(){
12484
-
12485
- //trace("set scroll type");
12486
-
12487
- }
12488
-
12489
- /**
12490
- * on resize function
12491
- */
12492
- this.onResize = function(){
12493
-
12494
- setScrollType();
12495
- }
12496
-
12497
-
12498
- /**
12499
- * init function for avia controls
12500
- */
12501
- this.init = function(objParent){
12502
-
12503
- g_parent = objParent;
12504
-
12505
- g_objects = objParent.getObjects();
12506
-
12507
- g_gallery = g_objects.g_gallery;
12508
-
12509
- g_objStrip = g_objects.g_objStrip;
12510
- g_objStripInner = g_objects.g_objStripInner;
12511
- g_options = g_objects.g_options;
12512
- g_isVertical = g_objects.isVertical;
12513
-
12514
- initEvents();
12515
-
12516
- setScrollType();
12517
- }
12518
-
12519
- /**
12520
- * check if sides only scroll to position mode
12521
- */
12522
- function isInsideSlideArea(){
12523
-
12524
- var objSizes = g_parent.getSizes();
12525
-
12526
- trace(objSizes);
12527
-
12528
- }
12529
-
12530
- /**
12531
- * get mouse position from event according the orientation
12532
- */
12533
- function getMousePos(event){
12534
-
12535
- if(g_isVertical == false)
12536
- return(event.pageX);
12537
-
12538
- return(event.pageY);
12539
- }
12540
-
12541
- /**
12542
- * on mouse move
12543
- */
12544
- function onMouseMove(event){
12545
-
12546
- if(g_temp.isControlEnabled == false)
12547
- return(true);
12548
-
12549
- //protection for touch devices, disable the avia events
12550
- if(g_temp.touchEnabled == true){
12551
- jQuery("body").off("mousemove");
12552
- return(true);
12553
- }
12554
-
12555
- g_temp.isMouseInsideStrip = g_objStrip.ismouseover();
12556
-
12557
- var strip_touch_active = g_parent.isTouchMotionActive();
12558
-
12559
- if(g_temp.isMouseInsideStrip == true && strip_touch_active == false){
12560
-
12561
- var mousePos = getMousePos(event);
12562
-
12563
- moveStripToMousePosition(mousePos);
12564
- }else{
12565
- stopStripMovingLoop();
12566
- }
12567
-
12568
- }
12569
-
12570
- /**
12571
- * handle avia strip control event on body mouse move
12572
- */
12573
- function initEvents(event){
12574
-
12575
- //make sure that the avia control will not work on touch devices
12576
- jQuery("body").on("touchstart", function(event){
12577
-
12578
- if(g_temp.isControlEnabled == false)
12579
- return(true);
12580
-
12581
- g_temp.touchEnabled = true;
12582
-
12583
- });
12584
-
12585
- //on body move
12586
- jQuery("body").mousemove(onMouseMove);
12587
-
12588
- }
12589
-
12590
-
12591
- /**
12592
- * destroy the avia control events
12593
- */
12594
- this.destroy = function(){
12595
-
12596
- jQuery("body").off("touchstart");
12597
- jQuery("body").off("mousemove");
12598
 
12599
- }
12600
-
12601
-
12602
- /**
12603
- * get inner y position according mouse y position on the strip
12604
- */
12605
- function getInnerPosY(mouseY){
12606
 
12607
- var innerOffsetTop = g_options.strip_padding_top;
12608
- var innerOffsetBottom = g_options.strip_padding_bottom;
 
 
 
12609
 
12610
- var stripHeight = g_objStrip.height();
12611
- var innerHeight = g_objStripInner.height();
12612
-
12613
- //if all thumbs visible, no need to move
12614
- if(stripHeight > innerHeight)
12615
- return(null);
12616
-
12617
- //find y position inside the strip
12618
- var stripOffset = g_objStrip.offset();
12619
- var offsetY = stripOffset.top;
12620
- var posy = mouseY - offsetY - innerOffsetTop;
12621
- if(posy < 0)
12622
- return(null);
12623
-
12624
- //set measure line parameters
12625
- var mlineStart = g_options.thumb_height;
12626
- var mlineEnd = stripHeight - g_options.thumb_height;
12627
- var mLineSize = mlineEnd - mlineStart;
12628
-
12629
- //fix position borders on the measure line
12630
- if(posy < mlineStart)
12631
- posy = mlineStart;
12632
-
12633
- if(posy > mlineEnd)
12634
- posy = mlineEnd;
12635
-
12636
- //count the ratio of the position on the measure line
12637
- var ratio = (posy - mlineStart) / mLineSize;
12638
- var innerPosY = (innerHeight - stripHeight) * ratio;
12639
- innerPosY = Math.round(innerPosY) * -1 + innerOffsetTop;
12640
-
12641
- return(innerPosY);
12642
- }
12643
 
12644
-
12645
- /**
12646
- * get inner x position according mouse x position on the strip
12647
- */
12648
- function getInnerPosX(mouseX){
12649
-
12650
- var innerOffsetLeft = g_options.strip_padding_left;
12651
- var innerOffsetRight = g_options.strip_padding_right;
12652
-
12653
- var stripWidth = g_objStrip.width() - innerOffsetLeft - innerOffsetRight;
12654
- var innerWidth = g_objStripInner.width();
12655
-
12656
- //if all thumbs visible, no need to move
12657
- if(stripWidth > innerWidth)
12658
- return(null);
12659
-
12660
- var stripOffset = g_objStrip.offset();
12661
- var offsetX = stripOffset.left;
12662
- var posx = mouseX - offsetX - innerOffsetLeft;
12663
-
12664
- //set measure line parameters
12665
- var mlineStart = g_options.thumb_width;
12666
- var mlineEnd = stripWidth - g_options.thumb_width;
12667
- var mLineSize = mlineEnd - mlineStart;
12668
-
12669
- //fix position borders on the measure line
12670
- if(posx < mlineStart)
12671
- posx = mlineStart;
12672
-
12673
- if(posx > mlineEnd)
12674
- posx = mlineEnd;
12675
-
12676
- //count the ratio of the position on the measure line
12677
- var ratio = (posx - mlineStart) / mLineSize;
12678
- var innerPosX = (innerWidth - stripWidth) * ratio;
12679
- innerPosX = Math.round(innerPosX) * -1 + innerOffsetLeft;
12680
-
12681
-
12682
- return(innerPosX);
12683
- }
12684
-
12685
-
12686
- /**
12687
- * move strip stap to final position
12688
- */
12689
- function moveStripStep(){
12690
-
12691
- if(g_temp.is_strip_moving == false){
12692
- return(false);
12693
- }
12694
-
12695
- var maxDpos = g_temp.maxDpos;
12696
-
12697
- var innerPos = g_parent.getInnerStripPos();
12698
-
12699
- if(Math.floor(innerPos) == Math.floor(g_temp.strip_finalPos)){
12700
- stopStripMovingLoop();
12701
- }
12702
-
12703
- //calc step
12704
- var diff = Math.abs(g_temp.strip_finalPos - innerPos);
12705
-
12706
- var dpos;
12707
- if(diff < 1){
12708
- dpos = diff;
12709
- }
12710
- else{
12711
-
12712
- dpos = diff / 4;
12713
- if(dpos > 0 && dpos < 1)
12714
- dpos = 1;
12715
- }
12716
-
12717
- if(g_temp.strip_finalPos < innerPos)
12718
- dpos = dpos * -1;
12719
-
12720
- if(dpos > maxDpos)
12721
- dpos = maxDpos;
12722
-
12723
- if(dpos < -maxDpos)
12724
- dpos = -maxDpos;
12725
-
12726
- var newPos = innerPos + dpos;
12727
-
12728
- g_parent.positionInnerStrip(newPos);
12729
-
12730
- }
12731
-
12732
-
12733
- /**
12734
- * start loop of strip moving
12735
- */
12736
- function startStripMovingLoop(){
12737
-
12738
- if(g_temp.isStripMoving == true)
12739
- return(false);
12740
-
12741
- g_temp.isStripMoving = true;
12742
- g_temp.handle_timeout = setInterval(moveStripStep, 10);
12743
- }
12744
-
12745
- /**
12746
- * stop loop of strip moving
12747
- */
12748
- function stopStripMovingLoop(){
12749
-
12750
- if(g_temp.isStripMoving == false)
12751
- return(false);
12752
-
12753
- g_temp.isStripMoving = false;
12754
- g_temp.handle_timeout = clearInterval(g_temp.handle_timeout);
12755
- }
12756
 
12757
- /**
12758
- * get inner position according the orientation
12759
- * taken by the mouse position
12760
- */
12761
- function getInnerPos(mousePos){
12762
-
12763
- if(g_isVertical == false)
12764
- return getInnerPosX(mousePos);
12765
- else
12766
- return getInnerPosY(mousePos);
12767
-
12768
- }
12769
-
12770
-
12771
- /**
12772
- * move the strip to mouse position on it
12773
- * mousex - mouse position relative to the document
12774
- */
12775
- function moveStripToMousePosition(mousePos){
12776
-
12777
- var innerPos = getInnerPos(mousePos);
12778
-
12779
- if(innerPos === null)
12780
- return(false);
12781
-
12782
- g_temp.is_strip_moving = true;
12783
- g_temp.strip_finalPos = innerPos;
12784
-
12785
- startStripMovingLoop();
12786
- }
12787
-
12788
-
12789
- }
12790
- //------ ug-slider.js------
12791
  /**
 
12792
  * slider class
12793
  * addon to strip gallery
12794
  */
@@ -12830,9 +12875,10 @@ function UGSlider(){
12830
  slider_scale_mode: "fill", //fit: scale down and up the image to always fit the slider
12831
  //down: scale down only, smaller images will be shown, don't enlarge images (scale up)
12832
  //fill: fill the entire slider space by scaling, cropping and centering the image
 
12833
  //fitvert: make the image always fill the vertical slider area
12834
- slider_scale_mode_media: "fill", //fill, fit, down, fitvert - scale mode on media items
12835
- slider_scale_mode_fullscreen: "down", //fill, fit, down, fitvert - scale mode on fullscreen.
12836
 
12837
  slider_item_padding_top: 0, //padding top of the slider item
12838
  slider_item_padding_bottom: 0, //padding bottom of the slider item
@@ -12880,7 +12926,9 @@ function UGSlider(){
12880
  slider_links_newpage: false, //open the slide link in new page
12881
 
12882
  slider_enable_bullets: false, //enable the bullets onslider element
12883
- slider_bullets_skin: "", //skin of the bullets, if empty inherit from gallery skin
 
 
12884
  slider_bullets_space_between: -1, //set the space between bullets. If -1 then will be set default space from the skins
12885
  slider_bullets_align_hor:"center", //left, center, right - bullets horizontal align
12886
  slider_bullets_align_vert:"bottom", //top, middle, bottom - bullets vertical algin
@@ -12998,7 +13046,9 @@ function UGSlider(){
12998
  if(g_options.slider_enable_bullets == true){
12999
  g_objBullets = new UGBullets();
13000
  var bulletsOptions = {
13001
- bullets_skin: g_options.slider_bullets_skin,
 
 
13002
  bullets_space_between: g_options.slider_bullets_space_between
13003
  }
13004
  g_objBullets.init(g_gallery, bulletsOptions);
@@ -13077,9 +13127,6 @@ function UGSlider(){
13077
  //set skins:
13078
  var globalSkin = galleryOptions.gallery_skin;
13079
 
13080
- if(g_options.slider_bullets_skin == "")
13081
- g_options.slider_bullets_skin = globalSkin;
13082
-
13083
  if(g_options.slider_arrows_skin == "")
13084
  g_options.slider_arrows_skin = globalSkin;
13085
 
@@ -13108,6 +13155,7 @@ function UGSlider(){
13108
  function getHtmlSlide(loaderClass, numSlide){
13109
 
13110
  var classVideoplay = "ug-type-square";
 
13111
  if(g_options.slider_videoplay_button_type == "round")
13112
  classVideoplay = "ug-type-round";
13113
 
@@ -13115,7 +13163,7 @@ function UGSlider(){
13115
  html += "<div class='ug-slide-wrapper ug-slide"+numSlide+"'>";
13116
  html += "<div class='ug-item-wrapper'></div>";
13117
  html += "<div class='ug-slider-preloader "+loaderClass+"'></div>";
13118
- html += "<div class='ug-button-videoplay "+classVideoplay+"' style='display:none'></div>";
13119
  html += "</div>";
13120
 
13121
  return(html);
@@ -13158,12 +13206,18 @@ function UGSlider(){
13158
 
13159
  //add play button
13160
  if(g_options.slider_enable_play_button == true){
13161
- html += "<div class='ug-slider-control ug-button-play ug-skin-"+g_options.slider_play_button_skin+"'></div>";
 
 
 
13162
  }
13163
 
13164
  //add fullscreen button
13165
  if(g_options.slider_enable_fullscreen_button == true){
13166
- html += "<div class='ug-slider-control ug-button-fullscreen ug-skin-"+g_options.slider_fullscreen_button_skin+"'></div>";
 
 
 
13167
  }
13168
 
13169
 
@@ -13284,7 +13338,7 @@ function UGSlider(){
13284
 
13285
  //place bullets
13286
  if(g_objBullets){
13287
- objBullets = g_objBullets.getElement();
13288
 
13289
  //strange bug fix (bullets width: 20) by double placing
13290
  g_functions.placeElement(objBullets, g_options.slider_bullets_align_hor, g_options.slider_bullets_align_vert, g_options.slider_bullets_offset_hor, g_options.slider_bullets_offset_vert);
@@ -13552,7 +13606,7 @@ function UGSlider(){
13552
 
13553
  var slideType = t.getSlideType(objSlide);
13554
 
13555
- objPadding = t.getObjImagePadding();
13556
 
13557
  var imageAlt = "";
13558
  if(typeof objItem.description == "string")
@@ -14907,7 +14961,7 @@ function UGSlider(){
14907
 
14908
  var pointImg = g_functions.getMouseElementPoint(point, objImage);
14909
  var objSize = g_functions.getElementSize(objImage);
14910
- isMouseInside = g_functions.isPointInsideElement(pointImg, objSize);
14911
 
14912
  return(isMouseInside);
14913
  }
@@ -15386,6 +15440,7 @@ function UGSlider(){
15386
 
15387
  }
15388
  //------ ug-sliderassets.js------
 
15389
  /** -------------- TextPanel class ---------------------*/
15390
 
15391
  function UGTextPanel(){
@@ -16274,9 +16329,11 @@ function UGBullets(){
16274
  };
16275
 
16276
  var g_options = {
16277
- bullets_skin: "", //bullets_skin: "" //skin of the bullets, if empty inherit from gallery skin
 
 
16278
  bullets_addclass: "", //bullets object class addition
16279
- bullets_space_between:-1 //set the space between bullets. If -1 then will be set default space from the skins
16280
  }
16281
 
16282
 
@@ -16301,9 +16358,70 @@ function UGBullets(){
16301
  g_temp.isInited = true;
16302
  g_options = jQuery.extend(g_options, customOptions);
16303
 
16304
- if(g_options.bullets_skin == "")
16305
- g_options.bullets_skin = g_options.gallery_skin;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16306
 
 
 
16307
  }
16308
 
16309
  /**
@@ -16331,6 +16449,9 @@ function UGBullets(){
16331
  if(objBullet.length)
16332
  g_bulletWidth = objBullet.width();
16333
  }
 
 
 
16334
  }
16335
 
16336
  /**
@@ -16359,7 +16480,7 @@ function UGBullets(){
16359
  if(g_options.bullets_addclass != "")
16360
  addClass = " " + g_options.bullets_addclass;
16361
 
16362
- var html = "<div class='ug-slider-control ug-bullets ug-skin-"+g_options.bullets_skin + addClass+"'>";
16363
 
16364
  html += "</div>";
16365
 
@@ -16370,6 +16491,7 @@ function UGBullets(){
16370
  setHtmlBullets();
16371
 
16372
  initEvents();
 
16373
  }
16374
 
16375
 
@@ -16397,6 +16519,7 @@ function UGBullets(){
16397
  var index = objBullet.index();
16398
 
16399
  jQuery(t).trigger(t.events.BULLET_CLICK, index);
 
16400
  }
16401
 
16402
 
@@ -16440,6 +16563,12 @@ function UGBullets(){
16440
  bullet.addClass("ug-bullet-active");
16441
 
16442
  g_activeIndex = index;
 
 
 
 
 
 
16443
  }
16444
 
16445
 
@@ -16776,14 +16905,15 @@ function UGProgressPie(){
16776
 
16777
  }
16778
  //------ ug-touchslider.js------
16779
- /**f
 
16780
  * touch thumbs control class
16781
  * addon to strip gallery
16782
  */
16783
  function UGTouchSliderControl(){
16784
 
16785
  var g_objSlider, g_objInner, g_parent = new UGSlider();
16786
- var g_objParent, g_options, t=this;
16787
 
16788
  var g_functions = new UGFunctions();
16789
 
@@ -17340,13 +17470,15 @@ function UGTouchSliderControl(){
17340
 
17341
 
17342
  }//------ ug-zoomslider.js------
 
17343
  /**
 
17344
  * touch thumbs control class
17345
  * addon to strip gallery
17346
  */
17347
  function UGZoomSliderControl(){
17348
 
17349
- var g_objSlider, g_objInner, g_parent = new UGSlider(), g_objParent;
17350
 
17351
  var g_functions = new UGFunctions();
17352
 
@@ -17442,7 +17574,7 @@ function UGZoomSliderControl(){
17442
 
17443
  var scaleMode = getFitScaleMode();
17444
 
17445
- objPadding = g_parent.getObjImagePadding();
17446
 
17447
  g_temp.objFitImageSize = g_functions.getImageInsideParentDataByImage(g_temp.objImage, scaleMode, objPadding);
17448
 
@@ -18167,6 +18299,7 @@ function UGZoomSliderControl(){
18167
  zoomCurrentImage("back");
18168
  }
18169
  }//------ ug-video.js------
 
18170
  /** -------------- Wistia API ---------------------*/
18171
 
18172
  function UGWistiaAPI(){
@@ -18344,7 +18477,7 @@ function UGSoundCloudAPI(){
18344
 
18345
  this.isAPILoaded = false;
18346
  var t = this, g_objThis = jQuery(this), g_intHandle;
18347
- var g_player, g_lastContainerID;
18348
 
18349
  this.events = {
18350
  START_PLAYING: "start_playing",
@@ -18527,7 +18660,7 @@ function UGHtml5MediaAPI(){
18527
 
18528
  this.isAPILoaded = false;
18529
  var t = this, g_objThis = jQuery(this), g_intHandle;
18530
- var g_player;
18531
 
18532
  this.events = {
18533
  START_PLAYING: "start_playing",
@@ -18741,16 +18874,17 @@ function UGVimeoAPI(){
18741
  */
18742
  this.loadAPI = function(isExternalLoad){
18743
 
 
18744
  if(g_ugVimeoAPI.isAPILoaded == true)
18745
  return(true);
18746
 
18747
- if(isFroogaloopActive()){
18748
- g_ugVimeoAPI.isAPILoaded = true;
18749
- return(true);
 
 
 
18750
  }
18751
-
18752
- if(isExternalLoad !== true)
18753
- g_ugFunctions.loadJs("f.vimeocdn.com/js/froogaloop2.min.js", true);
18754
 
18755
  g_ugVimeoAPI.isAPILoaded = true;
18756
  }
@@ -18760,9 +18894,12 @@ function UGVimeoAPI(){
18760
  /**
18761
  * tells if the froogaloop library active
18762
  */
18763
- function isFroogaloopActive(){
18764
 
18765
- return(typeof Froogaloop != "undefined");
 
 
 
18766
  }
18767
 
18768
 
@@ -18773,7 +18910,7 @@ function UGVimeoAPI(){
18773
 
18774
  g_player = null;
18775
  g_isPlayerReady = false;
18776
-
18777
  var url = location.protocol+"//player.vimeo.com/video/"+videoID+"?api=1";
18778
 
18779
  if(isAutoplay === true)
@@ -18786,16 +18923,10 @@ function UGVimeoAPI(){
18786
  //get the player object
18787
  var iframe = jQuery("#"+divID + " iframe")[0];
18788
 
18789
- g_player = Froogaloop(iframe);
18790
 
18791
- g_player.addEvent('ready', function(){
18792
-
18793
- if(g_player){
18794
- g_isPlayerReady = true;
18795
- initEvents();
18796
- }
18797
-
18798
- });
18799
 
18800
  g_lastCotnainerID = divID;
18801
  }
@@ -18807,9 +18938,9 @@ function UGVimeoAPI(){
18807
 
18808
  if(!g_player)
18809
  return(false);
18810
-
18811
  //set "cuechange" event
18812
- g_player.addEvent('cuechange', function(){
18813
 
18814
  if(g_cueChangeAutoplay == true)
18815
  t.play();
@@ -18817,16 +18948,19 @@ function UGVimeoAPI(){
18817
  });
18818
 
18819
  //set "play" event
18820
- g_player.addEvent('play', function(){
 
18821
  g_objThis.trigger(t.events.START_PLAYING);
18822
  });
18823
 
18824
  //set "pause event"
18825
- g_player.addEvent('pause', function(){
 
18826
  g_objThis.trigger(t.events.STOP_PLAYING);
18827
  });
18828
 
18829
- g_player.addEvent('finish', function(){
 
18830
  g_objThis.trigger(t.events.STOP_PLAYING);
18831
  g_objThis.trigger(t.events.VIDEO_ENDED);
18832
  });
@@ -18846,8 +18980,18 @@ function UGVimeoAPI(){
18846
  return(false);
18847
 
18848
  switch(command){
 
 
 
 
 
 
 
 
 
 
18849
  default:
18850
- g_player.api(command);
18851
  break;
18852
  }
18853
 
@@ -18873,7 +19017,7 @@ function UGVimeoAPI(){
18873
  this.destroy = function(){
18874
 
18875
  if(g_player){
18876
- g_player.api("unload");
18877
  g_player = null;
18878
  g_isPlayerReady = false;
18879
  }
@@ -18889,7 +19033,7 @@ function UGVimeoAPI(){
18889
  */
18890
  this.putVideo = function(divID, videoID, width, height, isAutoplay){
18891
 
18892
- if(isFroogaloopActive()){
18893
  putVideoActually(divID, videoID, width, height, isAutoplay);
18894
  return(true);
18895
  }
@@ -18899,7 +19043,7 @@ function UGVimeoAPI(){
18899
  this.loadAPI();
18900
  g_intHandle = setInterval(function(){
18901
 
18902
- if(isFroogaloopActive()){
18903
  putVideoActually(divID, videoID, width, height, isAutoplay);
18904
  clearInterval(g_intHandle);
18905
  }
@@ -18930,7 +19074,7 @@ function UGVimeoAPI(){
18930
 
18931
  g_cueChangeAutoplay = isAutoplay;
18932
 
18933
- g_player.api("loadVideo", videoID);
18934
  }
18935
 
18936
 
@@ -18976,7 +19120,7 @@ function UGYoutubeAPI(){
18976
  * actually put the video
18977
  */
18978
  function putVideoActually(divID, videoID, width, height, isAutoplay, addOptions){
18979
-
18980
  if(g_player && g_isPlayerReady){
18981
  g_player.destroy();
18982
  }
@@ -19210,10 +19354,19 @@ function UGYoutubeAPI(){
19210
  if(t.isPlayerReady() == false)
19211
  return(false);
19212
 
 
 
 
19213
  if(isAutoplay && isAutoplay == true)
19214
  g_player.loadVideoById(videoID, 0, "large");
19215
- else
 
 
 
 
19216
  g_player.cueVideoById(videoID, 0, "large");
 
 
19217
  }
19218
 
19219
 
@@ -20368,7 +20521,7 @@ function UniteGalleryMain(){
20368
 
20369
  if(tagname == "noscript")
20370
  return(null);
20371
-
20372
  if(tagname == "picture"){
20373
  var objImage = objChild.find("img");
20374
  if(objImage.length == 0)
@@ -20377,7 +20530,7 @@ function UniteGalleryMain(){
20377
  objChild = objImage;
20378
  tagname = "img";
20379
  }
20380
-
20381
  var srcLazy = objChild.data("lazy-src");
20382
  if(srcLazy)
20383
  objChild.attr("src", srcLazy);
@@ -20403,24 +20556,33 @@ function UniteGalleryMain(){
20403
  var objItem = {};
20404
  objItem.type = itemType;
20405
 
20406
-
20407
  if(tagname == "img"){
20408
-
20409
- //protection agains lasy load
20410
- var lasyLoadSrc = objChild.data("lazyload-src");
20411
- if(!lasyLoadSrc)
20412
- var lasyLoadSrc = objChild.data("lazy-src");
20413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20414
  if(lasyLoadSrc && lasyLoadSrc != ""){
20415
  objChild.attr("src", lasyLoadSrc);
20416
- jQuery.removeData(objChild, "lazyload-src");
20417
  }
20418
 
20419
  //src is thumb
20420
  var urlImage = objChild.data("image");
20421
  var urlThumb = objChild.data("thumb");
20422
  var titleFromData = objChild.data("title");
20423
-
20424
  if(typeof(urlImage) == "undefined")
20425
  urlImage = null;
20426
 
@@ -20633,7 +20795,7 @@ function UniteGalleryMain(){
20633
  continue;
20634
  }
20635
 
20636
- numIndex = g_arrItems.length;
20637
  objItem.index = numIndex;
20638
 
20639
  if(isAppend === true){
@@ -21101,8 +21263,15 @@ function UniteGalleryMain(){
21101
  }
21102
  }
21103
 
21104
- if(heightWasSet == false && g_options.gallery_preserve_ratio == true && g_temp.isFreestyleMode == false)
21105
- setHeightByOriginalRatio();
 
 
 
 
 
 
 
21106
 
21107
  storeLastSize();
21108
  g_objGallery.trigger(t.events.SIZE_CHANGE);
@@ -21131,10 +21300,9 @@ function UniteGalleryMain(){
21131
  */
21132
  function onFullScreenChange(){
21133
 
21134
-
21135
  var isFullscreen = g_functions.isFullScreen();
21136
  var event = isFullscreen ? t.events.ENTER_FULLSCREEN:t.events.EXIT_FULLSCREEN;
21137
-
21138
  var fullscreenID = g_functions.getGlobalData("fullscreenID");
21139
 
21140
  //check if this gallery was affected
@@ -21149,7 +21317,7 @@ function UniteGalleryMain(){
21149
  }
21150
 
21151
  g_objGallery.trigger(event);
21152
-
21153
  onGalleryResized();
21154
  }
21155
 
@@ -21561,14 +21729,27 @@ function UniteGalleryMain(){
21561
  //register button as a unite gallery belong
21562
  objButton.data("ug-button", true);
21563
 
 
 
 
21564
  g_functions.setButtonOnTap(objButton, t.toggleFullscreen);
21565
 
21566
  g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){
 
21567
  objButton.addClass("ug-fullscreenmode");
 
 
 
 
 
21568
  });
21569
 
21570
  g_objGallery.on(t.events.EXIT_FULLSCREEN,function(){
 
21571
  objButton.removeClass("ug-fullscreenmode");
 
 
 
21572
  });
21573
 
21574
  }
@@ -21593,15 +21774,28 @@ function UniteGalleryMain(){
21593
 
21594
  //register button as a unite gallery belong
21595
  objButton.data("ug-button", true);
 
 
 
21596
 
21597
  g_functions.setButtonOnClick(objButton, t.togglePlayMode);
21598
 
21599
  g_objGallery.on(t.events.START_PLAY,function(){
 
21600
  objButton.addClass("ug-stop-mode");
 
 
 
 
 
21601
  });
21602
 
21603
  g_objGallery.on(t.events.STOP_PLAY, function(){
 
21604
  objButton.removeClass("ug-stop-mode");
 
 
 
21605
  });
21606
 
21607
  }
@@ -21981,7 +22175,7 @@ function UniteGalleryMain(){
21981
  * expand gallery to body size
21982
  */
21983
  function toFakeFullScreen(){
21984
-
21985
  jQuery("body").addClass("ug-body-fullscreen");
21986
  g_objWrapper.addClass("ug-fake-fullscreen");
21987
 
@@ -22014,7 +22208,7 @@ function UniteGalleryMain(){
22014
 
22015
  if(g_temp.isFakeFullscreen == true)
22016
  return(true);
22017
-
22018
  if(g_functions.isFullScreen() == true)
22019
  return(true);
22020
 
@@ -22064,7 +22258,7 @@ function UniteGalleryMain(){
22064
  * toggle fullscreen
22065
  */
22066
  this.toggleFullscreen = function(){
22067
-
22068
  if(t.isFullScreen() == false){
22069
  t.toFullScreen();
22070
  }else{
@@ -22463,7 +22657,10 @@ function UniteGalleryMain(){
22463
  } //unitegallery object end
22464
 
22465
  //------ ug-lightbox.js------
 
 
22466
  /**
 
22467
  * tiles class
22468
  */
22469
  function UGLightbox(){
@@ -22472,7 +22669,7 @@ function UGLightbox(){
22472
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper;
22473
  var g_objSlider = new UGSlider(), g_objOverlay, g_objArrowLeft, g_objArrowRight, g_objButtonClose;
22474
  var g_functions = new UGFunctions(), g_objTextPanel = new UGTextPanel(), g_objNumbers;
22475
- var g_objTopPanel;
22476
 
22477
  var g_options = {
22478
  lightbox_type: "wide", //compact / wide - lightbox type
@@ -24091,6 +24288,8 @@ function UGLightbox(){
24091
 
24092
 
24093
  //------ ug-carousel.js------
 
 
24094
  /**
24095
  * carousel class
24096
  */
@@ -24099,7 +24298,7 @@ function UGCarousel(){
24099
  var t = this, g_objThis = jQuery(this);
24100
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper;
24101
  var g_functions = new UGFunctions(), g_arrItems, g_objTileDesign = new UGTileDesign();
24102
- var g_thumbs = new UGThumbsGeneral(), g_objCarouselWrapper, g_objInner, arrOrigTiles = [];
24103
 
24104
  var g_options = {
24105
  carousel_padding: 8, //padding at the sides of the carousel
@@ -25148,7 +25347,10 @@ function UGCarousel(){
25148
 
25149
 
25150
  //------ ug-loadmore.js------
 
 
25151
  /**
 
25152
  loadmore panel class addon to unite gallery
25153
  */
25154
  function UGLoadMore(){
@@ -25286,7 +25488,9 @@ function UGLoadMore(){
25286
 
25287
 
25288
  }//------ ug-tabs.js------
 
25289
  /**
 
25290
  tabs panel class addon to unite gallery
25291
  */
25292
  function UGTabs(){
1
+ //Unite Gallery, Version: 1.7.69, released 20 September 2022
2
 
3
  //------ ug-common-libraries.js------
4
 
5
+
6
  /** -------------- MouseWheel ---------------------*/
7
 
8
  !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=h.call(arguments,1),u=0,r=0,d=0,f=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(r=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(r=-1*d,d=0),u=0===d?r:d,"deltaY"in s&&(d=-1*s.deltaY,u=d),"deltaX"in s&&(r=s.deltaX,0===d&&(u=-1*r)),0!==d||0!==r){if(1===s.deltaMode){var c=e.data(this,"mousewheel-line-height");u*=c,d*=c,r*=c}else if(2===s.deltaMode){var m=e.data(this,"mousewheel-page-height");u*=m,d*=m,r*=m}return f=Math.max(Math.abs(d),Math.abs(r)),(!l||l>f)&&(l=f,i(s,f)&&(l/=40)),i(s,f)&&(u/=40,r/=40,d/=40),u=Math[u>=1?"floor":"ceil"](u/l),r=Math[r>=1?"floor":"ceil"](r/l),d=Math[d>=1?"floor":"ceil"](d/l),t.deltaX=r,t.deltaY=d,t.deltaFactor=l,t.deltaMode=0,a.unshift(t,u,r,d),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){l=null}function i(e,t){return r.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,l,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice;if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var r=e.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",r.getLineHeight(this)),e.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=a.length;e;)this.removeEventListener(a[--e],t,!1);else this.onmousewheel=null},getLineHeight:function(t){return parseInt(e(t)["offsetParent"in e.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
412
  */
413
  this.addFullScreenChangeEvent = function(func){
414
 
415
+ if(document["msExitFullscreen"])
 
 
416
  addEvent("MSFullscreenChange",document,func);
417
  else if(document["mozCancelFullScreen"])
418
  addEvent("mozfullscreenchange",document,func);
550
  imageLeft = (maxWidth - imageWidth) / 2;
551
  imageTop = (maxHeight - imageHeight) / 2;
552
 
553
+ }else if(scaleMode == "fill" || scaleMode == "filltop"){
554
+
555
  var ratio = originalWidth / originalHeight;
556
 
557
  imageHeight = maxHeight;
558
  imageWidth = imageHeight * ratio;
559
+
560
  if(imageWidth < maxWidth){
561
  imageWidth = maxWidth;
562
  imageHeight = imageWidth / ratio;
564
  //center y position
565
  imageLeft = 0;
566
  imageTop = Math.round((imageHeight - maxHeight) / 2 * -1);
567
+
568
+ if(scaleMode == "filltop")
569
+ imageTop = 0;
570
+
571
  }else{ //center x position
572
  imageTop = 0;
573
  imageLeft = Math.round((imageWidth - maxWidth) / 2 * -1);
2099
  */
2100
  this.convertHexToRGB = function(hexInput, opacity){
2101
 
2102
+ try{
2103
+ var hex = hexInput.replace('#','');
2104
+ if(hex === hexInput)
2105
+ return(hexInput);
2106
+
2107
+ var r = parseInt(hex.substring(0,2), 16);
2108
+ var g = parseInt(hex.substring(2,4), 16);
2109
+ var b = parseInt(hex.substring(4,6), 16);
2110
+ var result = 'rgba('+r+','+g+','+b+','+opacity+')';
2111
+
2112
+ }catch(error){
2113
+
2114
+ var result = 'rgba(0,0,0,1)';
2115
+
2116
+ trace("error in convertHexToRGB function");
2117
+ trace(error);
2118
+ trace("hex: "+hex);
2119
+
2120
+ }
2121
+
2122
  return result;
2123
  }
2124
 
2393
 
2394
  objButton.on("click touchstart", function(event){
2395
 
2396
+ var objThis = jQuery(this);
2397
+
2398
  event.stopPropagation();
2399
  event.stopImmediatePropagation();
2400
 
3378
 
3379
  if(objThumb.parent().length == 0) //don't treat detached thumbs
3380
  return(false);
3381
+
3382
+ var objItem = t.getItemByThumb(objThumb);
3383
 
3384
  if(objItem.isLoaded == true && isForce === false)
3385
  return(false);
3404
  */
3405
  function onThumbImageLoaded(data, objThumb, objImage){
3406
 
3407
+ var objItem = t.getItemByThumb(objThumb);
3408
 
3409
  objItem.isLoaded = true;
3410
  objItem.isThumbImageLoaded = true;
3451
  if(g_temp.isEffectOverlay){
3452
 
3453
  if(g_options.thumb_overlay_color){
3454
+
3455
  var objCss = {};
3456
  if(g_functions.isRgbaSupported()){
3457
  var colorRGB = g_functions.convertHexToRGB(g_options.thumb_overlay_color, g_options.thumb_overlay_opacity);
4021
  if(g_isVertical == false)
4022
  posy = g_options.strip_padding_top;
4023
 
4024
+ for (var i = 0; i < arrThumbs.length; i++) {
4025
 
4026
  var objThumb = jQuery(arrThumbs[i]);
4027
 
4839
  }
4840
  //------ ug-touchthumbs.js------
4841
 
4842
+
4843
  /**
4844
  * touch thumbs control class
4845
  * addon to strip gallery
5332
  }
5333
 
5334
  //------ ug-panelsbase.js------
5335
+
5336
  /** -------------- Panel Base Functions ---------------------*/
5337
 
5338
  function UGPanelsBase(){
5368
  else
5369
  var enable_handle = g_options.gridpanel_enable_handle;
5370
 
5371
+ if(g_options.gallery_theme == "default")
5372
+ enable_handle = false;
5373
+
5374
  // add handle
5375
  if (enable_handle == true) {
5376
  g_objHandle = new UGPanelHandle();
5693
  this.setHtml = function(){
5694
 
5695
  var orientation = g_panel.getOrientation();
5696
+
5697
  var classTip = "ug-panel-handle-tip";
5698
 
5699
+ var svgArrow;
5700
+
5701
  switch(orientation){
5702
  case "right":
5703
+ classTip += " ug-handle-tip-left";
5704
+ svgArrow = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="3.5 0.5 9.5 6 3.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
5705
+ break;
5706
+ case "left":
5707
  classTip += " ug-handle-tip-right";
5708
+ svgArrow = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="7.5 0.5 3.5 6 7.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
5709
  break;
5710
  case "bottom":
5711
+ classTip += " ug-handle-tip-top";
5712
+ svgArrow = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="0.5 3.5 6 9.5 11.5 3.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
5713
+ break;
5714
+ case "top":
5715
  classTip += " ug-handle-tip-bottom";
5716
+ svgArrow = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="0.5 8.5 6 2.5 11.5 8.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
5717
  break;
5718
  }
5719
 
5720
+ g_objPanel.append("<div class='"+classTip+" ug-skin-" + g_options.panel_handle_skin + "'>" + svgArrow + "</div>");
5721
  g_objHandleTip = g_objPanel.children(".ug-panel-handle-tip");
5722
  }
5723
 
5872
 
5873
  }
5874
  //------ ug-strippanel.js------
5875
+
5876
  /**
5877
+
5878
  * grid panel class addon to grid gallery
5879
  */
5880
  function UGStripPanel() {
6059
 
6060
  var arrowPrevClass = "ug-strip-arrow-left";
6061
  var arrowNextClass = "ug-strip-arrow-right";
6062
+ var svgArrowPrev = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="7.5 0.5 3.5 6 7.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
6063
+ var svgArrowNext = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="4.5 0.5 8.5 6 4.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';
6064
+
6065
  if (g_options.strippanel_vertical_type == true) {
6066
  arrowPrevClass = "ug-strip-arrow-up";
6067
  arrowNextClass = "ug-strip-arrow-down";
6069
 
6070
  g_objPanel.append("<div class='ug-strip-arrow " + arrowPrevClass
6071
  + " ug-skin-" + g_options.strippanel_buttons_skin
6072
+ + "'><div class='ug-strip-arrow-tip'>" + svgArrowPrev + "</div></div>");
6073
  g_objPanel.append("<div class='ug-strip-arrow " + arrowNextClass
6074
  + " ug-skin-" + g_options.strippanel_buttons_skin
6075
+ + "'><div class='ug-strip-arrow-tip'>" + svgArrowNext + "</div></div>");
6076
 
6077
  }
6078
 
6098
  g_objPanel.css("background-color",
6099
  g_options.strippanel_background_color);
6100
 
6101
+ if(g_options.strippanel_enable_handle == false)
6102
+ return(false);
6103
+
6104
+ var g_objHandle = g_objPanel.find('.ug-panel-handle-tip');
6105
+
6106
+ // set panel background color
6107
+ if (g_options.strippanel_background_color != "")
6108
+ g_objHandle.css("background-color",
6109
+ g_options.strippanel_background_color);
6110
  }
6111
 
6112
  /**
6568
  }
6569
 
6570
  //------ ug-gridpanel.js------
6571
+
6572
  /**
6573
+
6574
  * grid panel class
6575
  * addon to grid gallery
6576
  */
7481
 
7482
  }
7483
  //------ ug-thumbsgrid.js------
7484
+
7485
  /**
7486
+
7487
  * thumbs class
7488
  * addon to strip gallery
7489
  */
7947
  * position the thumbs and init panes vertically
7948
  */
7949
  function positionThumb_vert(){
7950
+
7951
  var arrThumbs = g_objInner.children(".ug-thumb-wrapper");
7952
 
7953
  var posx = 0;
7966
  g_temp.arrPanes.push(baseX);
7967
 
7968
  var numThumbs = arrThumbs.length;
7969
+
7970
+ for(var i=0;i < numThumbs; i++){
7971
  var objThumb = jQuery(arrThumbs[i]);
7972
  g_functions.placeElement(objThumb, posx, posy);
7973
 
8061
 
8062
  var numThumbs = arrThumbs.length;
8063
 
8064
+ for(var i=0;i < numThumbs; i++){
8065
  var objThumb = jQuery(arrThumbs[i]);
8066
 
8067
  var thumbWidth = objThumb.outerWidth();
8402
 
8403
  //check position, if more then half, move
8404
  var currentInnerPos = getInnerPos();
8405
+ var diffPos = Math.abs(objData.startInnerPos - currentInnerPos);
8406
+
8407
  var paneSize = getPaneSize();
8408
  var breakSize = Math.round(paneSize * 3 / 8);
8409
 
9029
 
9030
 
9031
  //------ ug-tiledesign.js------
9032
+
9033
  /**
9034
+
9035
  * tiles design class
9036
  */
9037
  function UGTileDesign(){
10677
 
10678
 
10679
  }//------ ug-tiles.js------
10680
+
10681
  /**
10682
+
10683
  * tiles class
10684
  */
10685
  function UGTiles(){
10688
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper, g_objParent;
10689
  var g_functions = new UGFunctions(), g_arrItems, g_objTileDesign = new UGTileDesign();
10690
  var g_thumbs = new UGThumbsGeneral(), g_vars = {};
10691
+ var g_arrNestedGridRow, g_arrNestedItems, g_objects;
10692
 
10693
 
10694
  var g_options = {
10695
+ tiles_type: "columns", //columns / justified / nested - tiles layout type
10696
  tiles_col_width: 250, //column width - exact or base according the settings
10697
  tiles_align:"center", //align of the tiles in the space
10698
  tiles_exact_width: false, //exact width of column - disables the min and max columns
11008
 
11009
  //get posx array (constact to all columns)
11010
  g_vars.arrPosx = [];
11011
+ for(var col = 0; col < g_vars.numCols; col++){
11012
  var colX = g_functions.getColX(col, g_vars.colWidth, g_vars.colGap);
11013
  g_vars.arrPosx[col] = colX + g_vars.addX;
11014
  }
11038
 
11039
  var minHeight = 999999999;
11040
 
11041
+ for(var col = 0; col < g_vars.numCols; col++){
11042
 
11043
  if(g_vars.colHeights[col] == undefined || g_vars.colHeights[col] == 0)
11044
  return col;
12118
  * resize to new Dim width
12119
  */
12120
  function resizeToNewWidth(tileID, newDimWidth, toReturn) {
12121
+
12122
+ if(!toReturn){
12123
  toReturn = false;
12124
  }
12125
 
12129
  var imgWidth = currentTile.imgWidth;
12130
  var imgHeight = currentTile.imgHeight;
12131
  var ratio = imgWidth / imgHeight;
12132
+ var dimWidth = newDimWidth;
12133
+ var dimHeight = Math.round(dimWidth / ratio);
12134
  if(toReturn == true){
12135
  var sizes = jQuery.extend(true, {}, currentTile);
12136
  sizes.dimWidth = dimWidth;
12173
  currentTile.width = dimWidth * colWidth + gapWidth * (dimWidth - 1);
12174
  currentTile.height = newDimHeight * colWidth + gapWidth * (newDimHeight - 1);
12175
  }
12176
+
12177
+
12178
  /**
12179
  * calc resize koef
12180
  */
12181
  function calcResizeRatio(objTilesAndSizes){
12182
+
12183
  var tempResizes = 0;
12184
  var tempNum = 0;
12185
 
12186
  for(var i = 0; i<objTilesAndSizes.length; i++){
12187
  var sizes = g_arrNestedItems[objTilesAndSizes[i].tileID];
12188
  if((sizes.dimHeight != 0) && (sizes.height != 0)){
12189
+ var resizeVal = (sizes.dimWidth/sizes.dimHeight)/(sizes.imgWidth/sizes.imgHeight);
12190
  } else {
12191
  return;
12192
  }
12199
  return tempResizes/tempNum;
12200
  }
12201
 
12202
+
12203
  /**
12204
  * check for column break
12205
  */
12496
 
12497
 
12498
  //------ ug-avia.js------
 
12499
  /**
12500
+ * avia control class
12501
+ * addon to strip gallery
12502
+ */
12503
+ function UGAviaControl(){
12504
+
12505
+ var g_parent, g_gallery, g_objects, g_objStrip, g_objStripInner, g_options;
12506
+ var g_isVertical;
12507
+
12508
+ var g_temp = {
12509
+ touchEnabled:false, //variable that tells if touch event was before move event
12510
+ isMouseInsideStrip: false,
12511
+ strip_finalPos:0,
12512
+ handle_timeout:"",
12513
+ handle_request_frame:0,
12514
+ isStripMoving:false,
12515
+ isControlEnabled: true,
12516
+ strip_speed: 10, //strip transition speed, less is slower, more is faster
12517
+ area_thumb_sizes: 1 //how much thumb sizes the scroll mouse area will take
12518
+ };
12519
+
12520
+
12521
+ /**
12522
+ * enable the control
12523
+ */
12524
+ this.enable = function(){
12525
+ g_temp.isControlEnabled = true;
12526
+ }
12527
+
12528
+ /**
12529
+ * disable the control
12530
+ */
12531
+ this.disable = function(){
12532
+ g_temp.isControlEnabled = false;
12533
+ }
12534
+
12535
+ /**
12536
+ * set scroll avia type - sides only, full data determine on size
12537
+ */
12538
+ function setScrollType(){
12539
+
12540
+ //trace("set scroll type");
12541
+
12542
+ }
12543
+
12544
+ /**
12545
+ * on resize function
12546
+ */
12547
+ this.onResize = function(){
12548
+
12549
+ setScrollType();
12550
+ }
12551
+
12552
+
12553
+ /**
12554
+ * init function for avia controls
12555
+ */
12556
+ this.init = function(objParent){
12557
+
12558
+ g_parent = objParent;
12559
+
12560
+ g_objects = objParent.getObjects();
12561
+
12562
+ g_gallery = g_objects.g_gallery;
12563
+
12564
+ g_objStrip = g_objects.g_objStrip;
12565
+ g_objStripInner = g_objects.g_objStripInner;
12566
+ g_options = g_objects.g_options;
12567
+ g_isVertical = g_objects.isVertical;
12568
+
12569
+ initEvents();
12570
+
12571
+ setScrollType();
12572
+ }
12573
+
12574
+ /**
12575
+ * check if sides only scroll to position mode
12576
+ */
12577
+ function isInsideSlideArea(){
12578
+
12579
+ var objSizes = g_parent.getSizes();
12580
+
12581
+ trace(objSizes);
12582
+
12583
+ }
12584
+
12585
+ /**
12586
+ * get mouse position from event according the orientation
12587
+ */
12588
+ function getMousePos(event){
12589
+
12590
+ if(g_isVertical == false)
12591
+ return(event.pageX);
12592
+
12593
+ return(event.pageY);
12594
+ }
12595
+
12596
+
12597
+ /**
12598
+ * get area type - start / stop / null
12599
+ */
12600
+ function getStripAreaType(mousePos){
12601
+
12602
+ //get height of the thumb
12603
+ var thumbSize = g_parent.getSizes().thumbSize;
12604
+
12605
+ var areaSize = g_temp.area_thumb_sizes * thumbSize;
12606
+
12607
+ //for horizontal
12608
+ if(g_isVertical == false){
12609
+
12610
+ //get left / right position of the strap
12611
+ var stripLeftPos = g_objStrip.offset().left;
12612
+ var stripRightPos = stripLeftPos + g_objStrip.width();
12613
+
12614
+ //define scroll areas sizes
12615
+ var scrollAreaStart = stripLeftPos + areaSize;
12616
+ var scrollAreaEnd = stripRightPos - areaSize;
12617
+
12618
+ //return scroll area type
12619
+ if(mousePos > stripLeftPos && mousePos < scrollAreaStart)
12620
+ return('start');
12621
+
12622
+ if(mousePos < stripRightPos && mousePos > scrollAreaEnd)
12623
+ return('stop');
12624
+
12625
+ return(null);
12626
+ }
12627
+
12628
+ //--- for vertical
12629
+
12630
+ //get top / bottom position of the strap
12631
+ var stripTopPos = g_objStrip.offset().top;
12632
+ var stripBotPos = stripTopPos + g_objStrip.height();
12633
+
12634
+ //define scroll areas sizes
12635
+ var scrollAreaStart = stripTopPos + areaSize;
12636
+ var scrollAreaEnd = stripBotPos - areaSize;
12637
+
12638
+ //return scroll area type
12639
+ if(mousePos > stripTopPos && mousePos < scrollAreaStart)
12640
+ return('start');
12641
+
12642
+ if(mousePos < stripBotPos && mousePos > scrollAreaEnd)
12643
+ return('stop');
12644
+
12645
+
12646
+ //return null if no scroll area found
12647
+ return(null);
12648
+
12649
+ }
12650
+
12651
+
12652
+ /**
12653
+ * on mouse move
12654
+ */
12655
+ function onMouseMove(event){
12656
+
12657
+ if(g_temp.isControlEnabled == false)
12658
+ return(true);
12659
+
12660
+ //protection for touch devices, disable the avia events
12661
+ if(g_temp.touchEnabled == true){
12662
+ jQuery("body").off("mousemove");
12663
+ return(true);
12664
+ }
12665
+
12666
+ g_temp.isMouseInsideStrip = g_objStrip.ismouseover();
12667
+
12668
+ var strip_touch_active = g_parent.isTouchMotionActive();
12669
+
12670
+ if(g_temp.isMouseInsideStrip == true && strip_touch_active == false){
12671
+
12672
+ var mousePos = getMousePos(event);
12673
+
12674
+ //get the area type - start / end / null
12675
+ var areaType = getStripAreaType(mousePos);
12676
+
12677
+ if(!areaType){
12678
+ stopStripMovingLoop();
12679
+ return(false);
12680
+ }
12681
+
12682
+ moveStripToMousePosition(areaType);
12683
+
12684
+ }else{
12685
+ stopStripMovingLoop();
12686
+ }
12687
+
12688
+ }
12689
+
12690
+ /**
12691
+ * handle avia strip control event on body mouse move
12692
+ */
12693
+ function initEvents(event){
12694
+
12695
+ //make sure that the avia control will not work on touch devices
12696
+ jQuery("body").on("touchstart", function(event){
12697
+
12698
+ if(g_temp.isControlEnabled == false)
12699
+ return(true);
12700
+
12701
+ g_temp.touchEnabled = true;
12702
+
12703
+ });
12704
+
12705
+ //on body move
12706
+ jQuery("body").mousemove(onMouseMove);
12707
+
12708
+ }
12709
+
12710
+
12711
+ /**
12712
+ * destroy the avia control events
12713
+ */
12714
+ this.destroy = function(){
12715
+
12716
+ jQuery("body").off("touchstart");
12717
+ jQuery("body").off("mousemove");
12718
+
12719
+ }
12720
+
12721
+
12722
+
12723
+ /**
12724
+ * move strip stap to final position
12725
+ */
12726
+ function moveStripStep(){
12727
+
12728
+ if(g_temp.is_strip_moving == false)
12729
+ return(false);
12730
+
12731
+ var innerPos = g_parent.getInnerStripPos();
12732
+
12733
+ if(Math.floor(innerPos) == Math.floor(g_temp.strip_finalPos))
12734
+ stopStripMovingLoop();
12735
+
12736
+ //calc step
12737
+ var diff = Math.abs(g_temp.strip_finalPos - innerPos);
12738
+
12739
+ //get speed
12740
+ var dpos = g_temp.strip_speed;
12741
+
12742
+ if(g_temp.strip_finalPos < innerPos)
12743
+ dpos = dpos * -1;
12744
+
12745
+ var newPos = innerPos + dpos;
12746
+
12747
+ if(g_temp.strip_finalPos > newPos && dpos < 0)
12748
+ newPos = g_temp.strip_finalPos;
12749
+
12750
+ if(diff == 0){
12751
+ stopStripMovingLoop();
12752
+ return(false);
12753
+ }
12754
 
12755
+ g_parent.positionInnerStrip(newPos);
12756
+
12757
+ g_temp.handle_request_frame = requestAnimationFrame(moveStripStep);
12758
+
12759
+ }
12760
+
12761
+
12762
+ /**
12763
+ * start loop of strip moving
12764
+ */
12765
+ function startStripMovingLoop(){
12766
+
12767
+ if(g_temp.isStripMoving == true)
12768
+ return(false);
12769
+
12770
+ g_temp.isStripMoving = true;
12771
+ g_temp.handle_request_frame = requestAnimationFrame(moveStripStep);
12772
+ }
12773
+
12774
+
12775
+ /**
12776
+ * stop loop of strip moving
12777
+ */
12778
+ function stopStripMovingLoop(){
12779
+
12780
+ if(g_temp.isStripMoving == false)
12781
+ return(false);
12782
+
12783
+ g_temp.isStripMoving = false;
12784
+ cancelAnimationFrame(g_temp.handle_request_frame);
12785
+ }
12786
+
12787
+
12788
+ /**
12789
+ * move the strip to mouse position on it
12790
+ * mousex - mouse position relative to the document
12791
+ */
12792
+ function moveStripToMousePosition(areaType){
12793
+
12794
+ var finalPos;
12795
+
12796
+ //--for horizontal mode
12797
+ if(g_isVertical == false){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12798
 
12799
+ var stripInnerWidth = g_objStripInner.width();
12800
+ var stripOuterWidth = g_objStrip.width();
 
 
 
 
 
12801
 
12802
+ if(areaType == 'start')
12803
+ finalPos = 0;
12804
+
12805
+ if(areaType == 'stop')
12806
+ finalPos = -(stripInnerWidth - stripOuterWidth);
12807
 
12808
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12809
 
12810
+ //--for vertical mode
12811
+ if(g_isVertical == true){
12812
+
12813
+ var stripInnerHeight = g_objStripInner.height();
12814
+ var stripOuterHeight = g_objStrip.height();
12815
+
12816
+ if(areaType == 'start')
12817
+ finalPos = 0;
12818
+
12819
+ if(areaType == 'stop')
12820
+ finalPos = -(stripInnerHeight - stripOuterHeight);
12821
+
12822
+ }
12823
+
12824
+ finalPos = Math.floor(finalPos);
12825
+
12826
+ g_temp.is_strip_moving = true;
12827
+ g_temp.strip_finalPos = finalPos;
12828
+
12829
+ startStripMovingLoop(finalPos);
12830
+ }
12831
+
12832
+
12833
+ }//------ ug-slider.js------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12835
  /**
12836
+
12837
  * slider class
12838
  * addon to strip gallery
12839
  */
12875
  slider_scale_mode: "fill", //fit: scale down and up the image to always fit the slider
12876
  //down: scale down only, smaller images will be shown, don't enlarge images (scale up)
12877
  //fill: fill the entire slider space by scaling, cropping and centering the image
12878
+ //filltop: like fill but image always top:0
12879
  //fitvert: make the image always fill the vertical slider area
12880
+ slider_scale_mode_media: "fill", //fill, fit, down, fitvert, filltop - scale mode on media items
12881
+ slider_scale_mode_fullscreen: "down", //fill, fit, down, fitvert, - scale mode on fullscreen.
12882
 
12883
  slider_item_padding_top: 0, //padding top of the slider item
12884
  slider_item_padding_bottom: 0, //padding bottom of the slider item
12926
  slider_links_newpage: false, //open the slide link in new page
12927
 
12928
  slider_enable_bullets: false, //enable the bullets onslider element
12929
+ slider_bullets_size: "", //size of the bullets, if empty inherit from css
12930
+ slider_bullets_color: "", //color of the bullets, if empty inherit from css
12931
+ slider_bullets_color_reverse: false, //bullets_color_reverse: false //color of the bullets, reverse mode: active is transparent, others are filled
12932
  slider_bullets_space_between: -1, //set the space between bullets. If -1 then will be set default space from the skins
12933
  slider_bullets_align_hor:"center", //left, center, right - bullets horizontal align
12934
  slider_bullets_align_vert:"bottom", //top, middle, bottom - bullets vertical algin
13046
  if(g_options.slider_enable_bullets == true){
13047
  g_objBullets = new UGBullets();
13048
  var bulletsOptions = {
13049
+ bullets_size: g_options.slider_bullets_size,
13050
+ bullets_color: g_options.slider_bullets_color,
13051
+ bullets_color_reverse: g_options.slider_bullets_color_reverse,
13052
  bullets_space_between: g_options.slider_bullets_space_between
13053
  }
13054
  g_objBullets.init(g_gallery, bulletsOptions);
13127
  //set skins:
13128
  var globalSkin = galleryOptions.gallery_skin;
13129
 
 
 
 
13130
  if(g_options.slider_arrows_skin == "")
13131
  g_options.slider_arrows_skin = globalSkin;
13132
 
13155
  function getHtmlSlide(loaderClass, numSlide){
13156
 
13157
  var classVideoplay = "ug-type-square";
13158
+ var svgVideoplay = '<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19_2)"><path d="M28 15.998C28 15.346 27.682 14.734 27.146 14.36L7.146 0.360047C6.538 -0.0679528 5.738 -0.115953 5.076 0.224047C4.414 0.570047 4 1.25205 4 1.99805V30C4 30.746 4.414 31.43 5.076 31.774C5.738 32.114 6.536 32.066 7.146 31.638L27.146 17.638C27.682 17.266 28 16.654 28 16.002C28 16 28 16 28 15.998C28 16 28 16 28 15.998Z" fill="white"/></g><defs><clipPath id="clip0_19_2"><rect width="32" height="32" fill="white"/></clipPath></defs></svg>';
13159
  if(g_options.slider_videoplay_button_type == "round")
13160
  classVideoplay = "ug-type-round";
13161
 
13163
  html += "<div class='ug-slide-wrapper ug-slide"+numSlide+"'>";
13164
  html += "<div class='ug-item-wrapper'></div>";
13165
  html += "<div class='ug-slider-preloader "+loaderClass+"'></div>";
13166
+ html += "<div class='ug-button-videoplay "+classVideoplay+"' style='display:none'>" + svgVideoplay + "</div>";
13167
  html += "</div>";
13168
 
13169
  return(html);
13206
 
13207
  //add play button
13208
  if(g_options.slider_enable_play_button == true){
13209
+
13210
+ var svgPlayButton = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><path fill="#ffffff" d="M14,7.999c0-0.326-0.159-0.632-0.427-0.819l-10-7C3.269-0.034,2.869-0.058,2.538,0.112C2.207,0.285,2,0.626,2,0.999v14.001c0,0.373,0.207,0.715,0.538,0.887c0.331,0.17,0.73,0.146,1.035-0.068l10-7C13.841,8.633,14,8.327,14,8.001C14,8,14,8,14,7.999C14,8,14,8,14,7.999z"></path></g></svg>';
13211
+
13212
+ html += "<div class='ug-slider-control ug-button-play ug-skin-"+g_options.slider_play_button_skin+"'>" + svgPlayButton + "</div>";
13213
  }
13214
 
13215
  //add fullscreen button
13216
  if(g_options.slider_enable_fullscreen_button == true){
13217
+
13218
+ var svgFullscreenButton = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="10.5,0.5 15.5,0.5 15.5,5.5 "></polyline><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="0.5,10.5 0.5,15.5 5.5,15.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="15.5" y1="0.5" x2="11.5" y2="4.5"></line><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="4.5" y1="11.5" x2="0.5" y2="15.5"></line><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="5.5,0.5 0.5,0.5 0.5,5.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="0.5" y1="0.5" x2="4.5" y2="4.5"></line><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="15.5,10.5 15.5,15.5 10.5,15.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11.5" y1="11.5" x2="15.5" y2="15.5"></line><circle fill="#ffffff" cx="8" cy="8" r="2" data-cap="butt" data-color="color-2" data-stroke="none"></circle></g></svg>';
13219
+
13220
+ html += "<div class='ug-slider-control ug-button-fullscreen ug-skin-"+g_options.slider_fullscreen_button_skin+"'>" + svgFullscreenButton + "</div>";
13221
  }
13222
 
13223
 
13338
 
13339
  //place bullets
13340
  if(g_objBullets){
13341
+ var objBullets = g_objBullets.getElement();
13342
 
13343
  //strange bug fix (bullets width: 20) by double placing
13344
  g_functions.placeElement(objBullets, g_options.slider_bullets_align_hor, g_options.slider_bullets_align_vert, g_options.slider_bullets_offset_hor, g_options.slider_bullets_offset_vert);
13606
 
13607
  var slideType = t.getSlideType(objSlide);
13608
 
13609
+ var objPadding = t.getObjImagePadding();
13610
 
13611
  var imageAlt = "";
13612
  if(typeof objItem.description == "string")
14961
 
14962
  var pointImg = g_functions.getMouseElementPoint(point, objImage);
14963
  var objSize = g_functions.getElementSize(objImage);
14964
+ var isMouseInside = g_functions.isPointInsideElement(pointImg, objSize);
14965
 
14966
  return(isMouseInside);
14967
  }
15440
 
15441
  }
15442
  //------ ug-sliderassets.js------
15443
+
15444
  /** -------------- TextPanel class ---------------------*/
15445
 
15446
  function UGTextPanel(){
16329
  };
16330
 
16331
  var g_options = {
16332
+ bullets_size: "", //default: 15 - size of the bullets, if empty inherit from css
16333
+ bullets_color: "", //defualt: #ffffff - color of the bullets, if empty inherit from css
16334
+ bullets_color_reverse: false, //bullets_color_reverse: false //color of the bullets, reverse mode: active is transparent, others are filled
16335
  bullets_addclass: "", //bullets object class addition
16336
+ bullets_space_between:-1 //set the space between bullets. If -1 then will be set default space from the css
16337
  }
16338
 
16339
 
16358
  g_temp.isInited = true;
16359
  g_options = jQuery.extend(g_options, customOptions);
16360
 
16361
+ }
16362
+
16363
+ /**
16364
+ * set width of the bullet
16365
+ */
16366
+ function setBulletSize(){
16367
+
16368
+ if (g_options.bullets_size != ""){
16369
+ g_objBullets.children(".ug-bullet").css({
16370
+ "width" : g_options.bullets_size + 'px',
16371
+ "height" : g_options.bullets_size + 'px',
16372
+ });
16373
+ }
16374
+
16375
+ }
16376
+
16377
+ /**
16378
+ * set bg color of the bullet
16379
+ */
16380
+ function setBulletBgColor(bullet){
16381
+
16382
+ var isReverseModeActive = g_options.bullets_color_reverse;
16383
+
16384
+ //check if revercs color mode is active
16385
+ if(isReverseModeActive == true){
16386
+
16387
+ if(g_options.bullets_color == ""){
16388
+
16389
+ var defaultBulletColor = bullet.css("background-color");
16390
+
16391
+ g_objBullets.children(".ug-bullet").css({
16392
+ "background-color" : defaultBulletColor,
16393
+ "border-color" : defaultBulletColor
16394
+ });
16395
+
16396
+ bullet.css({"background-color" : 'transparent'});
16397
+
16398
+ //exit function
16399
+ return(false);
16400
+
16401
+ }
16402
+
16403
+ g_objBullets.children(".ug-bullet").css({
16404
+ "background-color" : g_options.bullets_color,
16405
+ "border-color" : g_options.bullets_color
16406
+ });
16407
+
16408
+ bullet.css({"background-color" : 'transparent'});
16409
+
16410
+ //exit function
16411
+ return(false);
16412
+ }
16413
+
16414
+ //if reverse color mode is disactive
16415
+ if(g_options.bullets_color == "")
16416
+ return(false);
16417
+
16418
+ g_objBullets.children(".ug-bullet").css({
16419
+ "background-color" : '',
16420
+ "border-color" : g_options.bullets_color
16421
+ });
16422
 
16423
+ bullet.css({"background-color" : g_options.bullets_color});
16424
+
16425
  }
16426
 
16427
  /**
16449
  if(objBullet.length)
16450
  g_bulletWidth = objBullet.width();
16451
  }
16452
+
16453
+ setBulletSize();
16454
+
16455
  }
16456
 
16457
  /**
16480
  if(g_options.bullets_addclass != "")
16481
  addClass = " " + g_options.bullets_addclass;
16482
 
16483
+ var html = "<div class='ug-slider-control ug-bullets ug-skin-"+ addClass+"'>";
16484
 
16485
  html += "</div>";
16486
 
16491
  setHtmlBullets();
16492
 
16493
  initEvents();
16494
+
16495
  }
16496
 
16497
 
16519
  var index = objBullet.index();
16520
 
16521
  jQuery(t).trigger(t.events.BULLET_CLICK, index);
16522
+
16523
  }
16524
 
16525
 
16563
  bullet.addClass("ug-bullet-active");
16564
 
16565
  g_activeIndex = index;
16566
+
16567
+ if(!bullet.hasClass("ug-bullet-active"))
16568
+ return(false)
16569
+
16570
+ setBulletBgColor(bullet);
16571
+
16572
  }
16573
 
16574
 
16905
 
16906
  }
16907
  //------ ug-touchslider.js------
16908
+
16909
+ /**
16910
  * touch thumbs control class
16911
  * addon to strip gallery
16912
  */
16913
  function UGTouchSliderControl(){
16914
 
16915
  var g_objSlider, g_objInner, g_parent = new UGSlider();
16916
+ var g_objParent, g_options, t=this, g_objects;
16917
 
16918
  var g_functions = new UGFunctions();
16919
 
17470
 
17471
 
17472
  }//------ ug-zoomslider.js------
17473
+
17474
  /**
17475
+
17476
  * touch thumbs control class
17477
  * addon to strip gallery
17478
  */
17479
  function UGZoomSliderControl(){
17480
 
17481
+ var g_objSlider, g_objInner, g_parent = new UGSlider(), g_objParent, g_objects;
17482
 
17483
  var g_functions = new UGFunctions();
17484
 
17574
 
17575
  var scaleMode = getFitScaleMode();
17576
 
17577
+ var objPadding = g_parent.getObjImagePadding();
17578
 
17579
  g_temp.objFitImageSize = g_functions.getImageInsideParentDataByImage(g_temp.objImage, scaleMode, objPadding);
17580
 
18299
  zoomCurrentImage("back");
18300
  }
18301
  }//------ ug-video.js------
18302
+
18303
  /** -------------- Wistia API ---------------------*/
18304
 
18305
  function UGWistiaAPI(){
18477
 
18478
  this.isAPILoaded = false;
18479
  var t = this, g_objThis = jQuery(this), g_intHandle;
18480
+ var g_player, g_lastContainerID, g_isPlayerReady;
18481
 
18482
  this.events = {
18483
  START_PLAYING: "start_playing",
18660
 
18661
  this.isAPILoaded = false;
18662
  var t = this, g_objThis = jQuery(this), g_intHandle;
18663
+ var g_player, g_isPlayerReady;
18664
 
18665
  this.events = {
18666
  START_PLAYING: "start_playing",
18874
  */
18875
  this.loadAPI = function(isExternalLoad){
18876
 
18877
+
18878
  if(g_ugVimeoAPI.isAPILoaded == true)
18879
  return(true);
18880
 
18881
+ if(isVimeoLoaded() == true)
18882
+ return(false);
18883
+
18884
+ if(isExternalLoad !== true){
18885
+
18886
+ g_ugFunctions.loadJs("player.vimeo.com/api/player.js", true);
18887
  }
 
 
 
18888
 
18889
  g_ugVimeoAPI.isAPILoaded = true;
18890
  }
18894
  /**
18895
  * tells if the froogaloop library active
18896
  */
18897
+ function isVimeoLoaded(){
18898
 
18899
+ if(typeof Vimeo == "object")
18900
+ return(true);
18901
+
18902
+ return(false);
18903
  }
18904
 
18905
 
18910
 
18911
  g_player = null;
18912
  g_isPlayerReady = false;
18913
+
18914
  var url = location.protocol+"//player.vimeo.com/video/"+videoID+"?api=1";
18915
 
18916
  if(isAutoplay === true)
18923
  //get the player object
18924
  var iframe = jQuery("#"+divID + " iframe")[0];
18925
 
18926
+ g_player = new Vimeo.Player(divID);
18927
 
18928
+ g_isPlayerReady = true;
18929
+ initEvents();
 
 
 
 
 
 
18930
 
18931
  g_lastCotnainerID = divID;
18932
  }
18938
 
18939
  if(!g_player)
18940
  return(false);
18941
+
18942
  //set "cuechange" event
18943
+ g_player.on('cuechange', function(){
18944
 
18945
  if(g_cueChangeAutoplay == true)
18946
  t.play();
18948
  });
18949
 
18950
  //set "play" event
18951
+ g_player.on('play', function(){
18952
+
18953
  g_objThis.trigger(t.events.START_PLAYING);
18954
  });
18955
 
18956
  //set "pause event"
18957
+ g_player.on('pause', function(){
18958
+
18959
  g_objThis.trigger(t.events.STOP_PLAYING);
18960
  });
18961
 
18962
+ g_player.on('ended', function(){
18963
+
18964
  g_objThis.trigger(t.events.STOP_PLAYING);
18965
  g_objThis.trigger(t.events.VIDEO_ENDED);
18966
  });
18980
  return(false);
18981
 
18982
  switch(command){
18983
+ case "pause":
18984
+
18985
+ g_player.pause();
18986
+
18987
+ break;
18988
+ case "play":
18989
+
18990
+ g_player.play();
18991
+
18992
+ break;
18993
  default:
18994
+ throw new Error("wrong command: " + command);
18995
  break;
18996
  }
18997
 
19017
  this.destroy = function(){
19018
 
19019
  if(g_player){
19020
+ g_player.unload();
19021
  g_player = null;
19022
  g_isPlayerReady = false;
19023
  }
19033
  */
19034
  this.putVideo = function(divID, videoID, width, height, isAutoplay){
19035
 
19036
+ if(isVimeoLoaded()){
19037
  putVideoActually(divID, videoID, width, height, isAutoplay);
19038
  return(true);
19039
  }
19043
  this.loadAPI();
19044
  g_intHandle = setInterval(function(){
19045
 
19046
+ if(isVimeoLoaded()){
19047
  putVideoActually(divID, videoID, width, height, isAutoplay);
19048
  clearInterval(g_intHandle);
19049
  }
19074
 
19075
  g_cueChangeAutoplay = isAutoplay;
19076
 
19077
+ g_player.loadVideo(videoID);
19078
  }
19079
 
19080
 
19120
  * actually put the video
19121
  */
19122
  function putVideoActually(divID, videoID, width, height, isAutoplay, addOptions){
19123
+
19124
  if(g_player && g_isPlayerReady){
19125
  g_player.destroy();
19126
  }
19354
  if(t.isPlayerReady() == false)
19355
  return(false);
19356
 
19357
+ if(!g_player)
19358
+ return(false);
19359
+
19360
  if(isAutoplay && isAutoplay == true)
19361
  g_player.loadVideoById(videoID, 0, "large");
19362
+ else{
19363
+
19364
+ if(typeof g_player.cueVideoById == "undefined")
19365
+ return(false);
19366
+
19367
  g_player.cueVideoById(videoID, 0, "large");
19368
+ }
19369
+
19370
  }
19371
 
19372
 
20521
 
20522
  if(tagname == "noscript")
20523
  return(null);
20524
+
20525
  if(tagname == "picture"){
20526
  var objImage = objChild.find("img");
20527
  if(objImage.length == 0)
20530
  objChild = objImage;
20531
  tagname = "img";
20532
  }
20533
+
20534
  var srcLazy = objChild.data("lazy-src");
20535
  if(srcLazy)
20536
  objChild.attr("src", srcLazy);
20556
  var objItem = {};
20557
  objItem.type = itemType;
20558
 
 
20559
  if(tagname == "img"){
 
 
 
 
 
20560
 
20561
+ //protection agains lasy load
20562
+
20563
+ var keyLazy = "lazyload-src";
20564
+
20565
+ var lasyLoadSrc = objChild.data(keyLazy);
20566
+ if(!lasyLoadSrc){
20567
+ keyLazy = "lazy-src";
20568
+ var lasyLoadSrc = objChild.data(keyLazy);
20569
+ }
20570
+
20571
+ if(!lasyLoadSrc){
20572
+ keyLazy = "src";
20573
+ var lasyLoadSrc = objChild.data(keyLazy);
20574
+ }
20575
+
20576
  if(lasyLoadSrc && lasyLoadSrc != ""){
20577
  objChild.attr("src", lasyLoadSrc);
20578
+ jQuery.removeData(objChild, keyLazy);
20579
  }
20580
 
20581
  //src is thumb
20582
  var urlImage = objChild.data("image");
20583
  var urlThumb = objChild.data("thumb");
20584
  var titleFromData = objChild.data("title");
20585
+
20586
  if(typeof(urlImage) == "undefined")
20587
  urlImage = null;
20588
 
20795
  continue;
20796
  }
20797
 
20798
+ var numIndex = g_arrItems.length;
20799
  objItem.index = numIndex;
20800
 
20801
  if(isAppend === true){
21263
  }
21264
  }
21265
 
21266
+ if(heightWasSet == false && g_temp.isFreestyleMode == false){
21267
+
21268
+ if(g_options.gallery_preserve_ratio == true)
21269
+ setHeightByOriginalRatio();
21270
+ else{
21271
+ if(g_options.gallery_height_mobile)
21272
+ setHtmlObjectsProperties();
21273
+ }
21274
+ }
21275
 
21276
  storeLastSize();
21277
  g_objGallery.trigger(t.events.SIZE_CHANGE);
21300
  */
21301
  function onFullScreenChange(){
21302
 
 
21303
  var isFullscreen = g_functions.isFullScreen();
21304
  var event = isFullscreen ? t.events.ENTER_FULLSCREEN:t.events.EXIT_FULLSCREEN;
21305
+
21306
  var fullscreenID = g_functions.getGlobalData("fullscreenID");
21307
 
21308
  //check if this gallery was affected
21317
  }
21318
 
21319
  g_objGallery.trigger(event);
21320
+
21321
  onGalleryResized();
21322
  }
21323
 
21729
  //register button as a unite gallery belong
21730
  objButton.data("ug-button", true);
21731
 
21732
+ //get svg of a not fullscreen icon
21733
+ var svgSmallscreenButton = objButton.html();
21734
+
21735
  g_functions.setButtonOnTap(objButton, t.toggleFullscreen);
21736
 
21737
  g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){
21738
+
21739
  objButton.addClass("ug-fullscreenmode");
21740
+
21741
+ //set svg icon for fullscreen mode
21742
+ var svgFullscreenButton = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_23_15)"><path d="M15.7799 4.88073L13.945 3.08257L15.7799 1.24771C16.0734 0.954129 16.0734 0.513762 15.7799 0.220184C15.4863 -0.0733945 15.0459 -0.0733945 14.7523 0.220184L12.9542 2.01835L11.156 0.220184C11.0092 0.0733945 10.789 0.0733945 10.6422 0.220184C10.5689 0.293578 10.5322 0.366973 10.5322 0.440367L9.72482 5.87156C9.68812 6.09174 9.8716 6.27523 10.0551 6.27523C10.0918 6.27523 10.0918 6.27523 10.1285 6.27523L15.5597 5.50459C15.7432 5.46789 15.89 5.2844 15.8533 5.10092C15.8533 5.02752 15.8166 4.95413 15.7799 4.88073Z" fill="white"/><path d="M10.4955 15.5596C10.5321 15.7431 10.7156 15.8899 10.8991 15.8532C10.9725 15.8532 11.0459 15.8165 11.1193 15.7431L12.9175 13.945L14.7156 15.7431C15.0092 16.0367 15.4496 16.0367 15.7432 15.7431C16.0367 15.4495 16.0367 15.0092 15.7432 14.7156L13.945 12.9174L15.7432 11.1193C15.8899 10.9725 15.8899 10.7523 15.7432 10.6055C15.6698 10.5321 15.5964 10.4954 15.523 10.4954L10.0918 9.72478C9.90829 9.68808 9.68811 9.83487 9.68811 10.0184C9.68811 10.0551 9.68811 10.0917 9.68811 10.1284L10.4955 15.5596Z" fill="white"/><path d="M0.220184 11.1192L2.01835 12.9174L0.220184 14.7156C-0.0733945 15.0091 -0.0733945 15.4495 0.220184 15.7431C0.513762 16.0367 0.954129 16.0367 1.24771 15.7431L3.04587 13.9449L4.84404 15.7431C4.99083 15.8899 5.21101 15.8899 5.3578 15.7431C5.43119 15.6697 5.46789 15.5963 5.46789 15.5229L6.23853 10.0917C6.27523 9.90823 6.12844 9.68805 5.94495 9.68805C5.90826 9.68805 5.87156 9.68805 5.83486 9.68805L0.440367 10.4954C0.256881 10.5321 0.110092 10.7156 0.146789 10.8991C0.110092 10.9725 0.146789 11.0458 0.220184 11.1192Z" fill="white"/><path d="M1.24771 0.220184C0.954129 -0.0733945 0.513762 -0.0733945 0.220184 0.220184C-0.0733945 0.513762 -0.0733945 0.954129 0.220184 1.24771L2.01835 3.04587L0.220184 4.84404C0.0733945 4.99083 0.0733945 5.21101 0.220184 5.3578C0.256881 5.46789 0.330275 5.50459 0.440367 5.50459L5.87156 6.27523C6.05505 6.31193 6.27523 6.16514 6.27523 5.98165C6.27523 5.94495 6.27523 5.90826 6.27523 5.87156L5.50459 0.440367C5.46789 0.256881 5.2844 0.110092 5.10092 0.146789C5.02752 0.146789 4.95413 0.183486 4.88073 0.256881L3.08257 2.01835L1.24771 0.220184Z" fill="white"/></g><defs><clipPath id="clip0_23_15"><rect width="16" height="16" fill="white"/></clipPath></defs></svg>';
21743
+
21744
+ objButton.html(svgFullscreenButton);
21745
  });
21746
 
21747
  g_objGallery.on(t.events.EXIT_FULLSCREEN,function(){
21748
+
21749
  objButton.removeClass("ug-fullscreenmode");
21750
+
21751
+ //return regular mode svg icon
21752
+ objButton.html(svgSmallscreenButton);
21753
  });
21754
 
21755
  }
21774
 
21775
  //register button as a unite gallery belong
21776
  objButton.data("ug-button", true);
21777
+
21778
+ //get svgPlayBtn
21779
+ var svgPlayButton = objButton.html();
21780
 
21781
  g_functions.setButtonOnClick(objButton, t.togglePlayMode);
21782
 
21783
  g_objGallery.on(t.events.START_PLAY,function(){
21784
+
21785
  objButton.addClass("ug-stop-mode");
21786
+
21787
+ //add pause svg button
21788
+ var svgPauseButton = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><path fill="#ffffff" d="M5,1H2C1.4,1,1,1.4,1,2v12c0,0.6,0.4,1,1,1h3c0.6,0,1-0.4,1-1V2C6,1.4,5.6,1,5,1z"></path><path fill="#ffffff" d="M14,1h-3c-0.6,0-1,0.4-1,1v12c0,0.6,0.4,1,1,1h3c0.6,0,1-0.4,1-1V2C15,1.4,14.6,1,14,1z"></path></g></svg>';
21789
+
21790
+ objButton.html(svgPauseButton);
21791
  });
21792
 
21793
  g_objGallery.on(t.events.STOP_PLAY, function(){
21794
+
21795
  objButton.removeClass("ug-stop-mode");
21796
+
21797
+ //replace pause button with play button
21798
+ objButton.html(svgPlayButton);
21799
  });
21800
 
21801
  }
22175
  * expand gallery to body size
22176
  */
22177
  function toFakeFullScreen(){
22178
+
22179
  jQuery("body").addClass("ug-body-fullscreen");
22180
  g_objWrapper.addClass("ug-fake-fullscreen");
22181
 
22208
 
22209
  if(g_temp.isFakeFullscreen == true)
22210
  return(true);
22211
+
22212
  if(g_functions.isFullScreen() == true)
22213
  return(true);
22214
 
22258
  * toggle fullscreen
22259
  */
22260
  this.toggleFullscreen = function(){
22261
+
22262
  if(t.isFullScreen() == false){
22263
  t.toFullScreen();
22264
  }else{
22657
  } //unitegallery object end
22658
 
22659
  //------ ug-lightbox.js------
22660
+
22661
+
22662
  /**
22663
+
22664
  * tiles class
22665
  */
22666
  function UGLightbox(){
22669
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper;
22670
  var g_objSlider = new UGSlider(), g_objOverlay, g_objArrowLeft, g_objArrowRight, g_objButtonClose;
22671
  var g_functions = new UGFunctions(), g_objTextPanel = new UGTextPanel(), g_objNumbers;
22672
+ var g_objTopPanel, g_objects;
22673
 
22674
  var g_options = {
22675
  lightbox_type: "wide", //compact / wide - lightbox type
24288
 
24289
 
24290
  //------ ug-carousel.js------
24291
+ "use strict";
24292
+
24293
  /**
24294
  * carousel class
24295
  */
24298
  var t = this, g_objThis = jQuery(this);
24299
  var g_gallery = new UniteGalleryMain(), g_objGallery, g_objWrapper;
24300
  var g_functions = new UGFunctions(), g_arrItems, g_objTileDesign = new UGTileDesign();
24301
+ var g_thumbs = new UGThumbsGeneral(), g_objCarouselWrapper, g_objInner, arrOrigTiles = [], g_objects;
24302
 
24303
  var g_options = {
24304
  carousel_padding: 8, //padding at the sides of the carousel
25347
 
25348
 
25349
  //------ ug-loadmore.js------
25350
+
25351
+
25352
  /**
25353
+
25354
  loadmore panel class addon to unite gallery
25355
  */
25356
  function UGLoadMore(){
25488
 
25489
 
25490
  }//------ ug-tabs.js------
25491
+
25492
  /**
25493
+
25494
  tabs panel class addon to unite gallery
25495
  */
25496
  function UGTabs(){
assets_libraries/unitegallery/js/unitegallery.min.js CHANGED
@@ -1,3 +1,3 @@
1
- //Unite Gallery, Version: 1.7.61, released 26 July 2022
2
 
3
- function debugLine(html,addRandom,addHtml){!0===html&&(html="true"),!1===html&&(html="false");var output=html;if("object"==typeof html)for(name in output="",html){var value=html[name];output+=" "+name+": "+value}if(!0!=addRandom||addHtml||(output+=" "+Math.random()),!0==addHtml){var objLine=jQuery("#debug_line");objLine.width(200),objLine.height()>=500&&objLine.html(""),output=objLine.html()+"<br> -------------- <br>"+output}jQuery("#debug_line").show().html(output)}function debugSide(obj){var html="";for(name in obj){var value=obj[name];html+=name+" : "+value+"<br>"}jQuery("#debug_side").show().html(html)}function trace(str){"undefined"!=typeof console&&console.log(str)}function UGFunctions(){var g_browserPrefix=null,t=this,g_temp={starTime:0,arrThemes:[],isTouchDevice:-1,isRgbaSupported:-1,timeCache:{},dataCache:{},lastEventType:"",lastEventTime:0,lastTouchStartElement:null,touchThreshold:700,handle:null};function addEvent(evnt,elem,func){elem.addEventListener?elem.addEventListener(evnt,func,!1):elem.attachEvent?elem.attachEvent("on"+evnt,func):elem[evnt]=func}this.debugVar="",this.getvalopt={FORCE_BOOLEAN:"force_boolean",FORCE_NUMERIC:"force_numeric",TRIM:"trim"},this.z__________GENERAL___________=function(){},this.getVal=function(b,d,c,e){if(!c)var c="";var a="";switch(a=b&&"object"==typeof b?!1==b.hasOwnProperty(d)?c:b[d]:c,e){case t.getvalopt.FORCE_BOOLEAN:a=t.strToBool(a);break;case t.getvalopt.TRIM:a=String(a),a=jQuery.trim(a);break;case t.getvalopt.FORCE_NUMERIC:"string"==typeof(a=jQuery.trim(a))&&(a.replace("px",""),a=Number(a))}return a},this.z__________FULL_SCREEN___________=function(){},this.toFullscreen=function(a,b){if(a.requestFullscreen)a.requestFullscreen();else if(a.mozRequestFullScreen)a.mozRequestFullScreen();else if(a.webkitRequestFullscreen)a.webkitRequestFullscreen();else{if(!a.msRequestFullscreen)return!1;a.msRequestFullscreen()}return!0},this.exitFullscreen=function(){if(!1==t.isFullScreen())return!1;if(document.exitFullscreen)document.exitFullscreen();else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},this.addFullScreenChangeEvent=function(a){document.webkitCancelFullScreen?addEvent("webkitfullscreenchange",document,a):document.msExitFullscreen?addEvent("MSFullscreenChange",document,a):document.mozCancelFullScreen?addEvent("mozfullscreenchange",document,a):addEvent("fullscreenchange",document,a)},this.destroyFullScreenChangeEvent=function(){jQuery(document).unbind("fullscreenChange"),jQuery(document).unbind("mozfullscreenchange"),jQuery(document).unbind("webkitfullscreenchange"),jQuery(document).unbind("MSFullscreenChange")},this.getFullScreenElement=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},this.isFullScreen=function(){var a;return!!(document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement)},this.z__________GET_PROPS___________=function(){},this.getBrowserPrefix=function(){if(null!==g_browserPrefix)return g_browserPrefix;var b=["webkit","Moz","ms","O"],c=document.createElement("div");for(var d in b){var a=b[d];if(a+"Transform" in c.style)return g_browserPrefix=a=a.toLowerCase(),a}return g_browserPrefix="",""},this.getImageInsideParentDataByImage=function(a,c,d){var e=a.parent(),b=t.getImageOriginalSize(a);return t.getImageInsideParentData(e,b.width,b.height,c,d)},this.getImageInsideParentData=function(m,i,j,l,a,c,f){if(!a)var a={};var h={};if(void 0===c)var c=m.width();if(void 0===f)var f=m.height();a.padding_left&&(c-=a.padding_left),a.padding_right&&(c-=a.padding_right),a.padding_top&&(f-=a.padding_top),a.padding_bottom&&(f-=a.padding_bottom);var d=null,b="100%",e=null,g=null,n="display:block;margin:0px auto;";if(i>0&&j>0){if("down"==l&&i<c&&j<f)b=j,g=(c-(d=i))/2,e=(f-b)/2;else if("fill"==l){var k=i/j;(d=(b=f)*k)<c?(b=(d=c)/k,g=0,e=Math.round(-((b-f)/2*1))):(e=0,g=Math.round(-((d-c)/2*1)))}else{var k=i/j;d=(b=f)*k,e=0,g=(c-d)/2,"fitvert"!=l&&d>c&&(b=(d=c)/k,g=0,e=(f-b)/2)}d=Math.floor(d),b=Math.floor(b),e=Math.floor(e),g=Math.floor(g),n="position:absolute;"}return a.padding_top&&(e+=a.padding_top),a.padding_left&&(g+=a.padding_left),h.imageWidth=d,h.imageHeight=b,h.imageTop=e,h.imageLeft=g,h.imageRight=g+d,0==e||"100%"==b?h.imageBottom=null:h.imageBottom=e+b,h.style=n,h},this.getElementCenterPosition=function(e,a){var h=e.parent(),f=t.getElementSize(e),g=t.getElementSize(h),c=g.width,d=g.height;a&& void 0!==a.padding_top&&(d-=a.padding_top),a&& void 0!==a.padding_bottom&&(d-=a.padding_bottom),a&& void 0!==a.padding_left&&(c-=a.padding_left),a&& void 0!==a.padding_right&&(c-=a.padding_right);var b={};return b.left=Math.round((c-f.width)/2),b.top=Math.round((d-f.height)/2),a&& void 0!==a.padding_top&&(b.top+=a.padding_top),a&& void 0!==a.padding_left&&(b.left+=a.padding_left),b},this.getElementCenterPoint=function(d,c){if(!c)var c=!1;var b=t.getElementSize(d),a={};return a.x=b.width/2,a.y=b.height/2,!0==c&&(a.x+=b.left,a.y+=b.top),a.x=Math.round(a.x),a.y=Math.round(a.y),a},this.getMousePosition=function(a,c){var b={pageX:a.pageX,pageY:a.pageY,clientX:a.clientX,clientY:a.clientY};if(a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches.length>0&&(b.pageX=a.originalEvent.touches[0].pageX,b.pageY=a.originalEvent.touches[0].pageY,b.clientX=a.originalEvent.touches[0].clientX,b.clientY=a.originalEvent.touches[0].clientY),c){var d=c.offset();b.mouseX=b.pageX-d.left,b.mouseY=b.pageY-d.top}return b},this.getMouseElementPoint=function(a,b){var c={x:a.pageX,y:a.pageY};return t.getElementLocalPoint(c,b)},this.getElementLocalPoint=function(b,d){var a={},c=d.offset();return a.x=Math.round(b.x-c.left),a.y=Math.round(b.y-c.top),a},this.getImageOriginalSize=function(b,e,f){if(void 0!==e&& void 0!==f)return{width:e,height:f};var c=b[0];if(void 0===c)throw new Error("getImageOriginalSize error - Image not found");var a={};if(void 0!==c.naturalWidth)return a.width=c.naturalWidth,a.height=c.naturalHeight,a;if("number"==typeof b.data("naturalWidth")){var a={};return a.width=b.data("naturalWidth"),a.height=b.data("naturalHeight"),a}var d=new Image;return(d.src=c.src,d.complete)?(a.width=d.width,a.height=d.height,b.data("naturalWidth",a.width),b.data("naturalHeight",a.height),a):{width:0,height:0}},this.getimageRatio=function(a){var b=t.getImageOriginalSize(a),c=t.getElementSize(a),d=c.width/b.width;return d},this.isImageFitParent=function(a){var d=a.parent(),b=t.getElementSize(a),c=t.getElementSize(d);return b.width<=c.width&&b.height<=c.height},this.getElementSize=function(b){if(void 0===b)throw new Error("Can't get size, empty element");var a=b.position();return a.height=b.outerHeight(),a.width=b.outerWidth(),a.left=Math.round(a.left),a.top=Math.round(a.top),a.right=a.left+a.width,a.bottom=a.top+a.height,a},this.isElementBiggerThenParent=function(a){var d=a.parent(),b=t.getElementSize(a),c=t.getElementSize(d);return b.width>c.width||b.height>c.height},this.isPointInsideElement=function(a,b){return!1!=(a.x>=0&&a.x<b.width)&& !1!=(a.y>=0&&a.y<b.height)},this.getElementRelativePos=function(c,a,b,f){if(!f)var f=c.parent();if("number"==typeof c)var d={width:c,height:c};else var d=t.getElementSize(c);var e=t.getElementSize(f);switch(a){case"top":case"left":a=0,b&&(a+=b);break;case"center":a=Math.round((e.width-d.width)/2),b&&(a+=b);break;case"right":a=e.width-d.width,b&&(a-=b);break;case"middle":a=Math.round((e.height-d.height)/2),b&&(a+=b);break;case"bottom":a=e.height-d.height,b&&(a-=b)}return a},this.getScreenVisibleSize=function(){document.body.clientWidth,document.body.clientHeight,jQuery(document).scrollTop();var c=jQuery(document),a=c.scrollLeft(),b=c.scrollTop();a=Math.round(a),b=Math.round(b);var f=window.innerHeight,g=window.innerWidth,d=b+f,e=a+g,h={top:b,left:a,height:d-b,width:e-a,right:e,bottom:d};return h},this.isElementsIntersect=function(a,b){return!(a.right<b.left)&&!(a.left>b.right)&&!(a.bottom<b.top)&&!(a.top>b.bottom)},this.isElementInsideScreen=function(a){var b=t.getElementSize(a),c=t.getScreenVisibleSize(),d=t.isElementsIntersect(c,b);return d},this.z_________SET_ELEMENT_PROPS_______=function(){},this.zoomImageInsideParent=function(a,q,j,r,i,s,t){if(!j)var j=1.2;if(!i)var i="fit";var k,g,l,m,b=j,x=a.parent(),e=t.getElementSize(a),f=t.getImageOriginalSize(a),h=!1,n=0,o=0,c=0,d=0;if(r){var p=t.getMouseElementPoint(r,a);h=t.isPointInsideElement(p,e),c=p.x,d=p.y}else h=!1;if(!1==h){var u=t.getElementCenterPoint(a);c=u.x,d=u.y}if(!0==q)k=e.height*b,g=e.width*b,0!=c&&(n=-(c*b-c)),0!=d&&(o=-(d*b-d));else{k=e.height/b,g=e.width/b;var y=t.getImageInsideParentData(x,f.width,f.height,i,t);if(g<y.imageWidth)return t.scaleImageFitParent(a,f.width,f.height,i,t),!0;!0==h&&(0!=c&&(n=-(c/b-c)),0!=d&&(o=-(d/b-d)))}if(s){var v=1;if(0!=f.width&&(v=g/f.width),v>s)return!1}if(t.setElementSize(a,g,k),!1==q&& !1==h){var w=t.getElementCenterPosition(a);l=w.left,m=w.top}else l=e.left+n,m=e.top+o;return t.placeElement(a,l,m),!0},this.placeElement=function(g,a,b,c,d,h){if(!1==jQuery.isNumeric(a)|| !1==jQuery.isNumeric(b)){if(!h)var h=g.parent();var e=t.getElementSize(g),f=t.getElementSize(h)}if(!1==jQuery.isNumeric(a))switch(a){case"left":a=0,c&&(a+=c);break;case"center":a=Math.round((f.width-e.width)/2),c&&(a+=c);break;case"right":a=f.width-e.width,c&&(a-=c)}if(!1==jQuery.isNumeric(b))switch(b){case"top":b=0,d&&(b+=d);break;case"middle":case"center":b=Math.round((f.height-e.height)/2),d&&(b+=d);break;case"bottom":b=f.height-e.height,d&&(b-=d)}var i={position:"absolute",margin:"0px"};null!==a&&(i.left=a),null!==b&&(i.top=b),g.css(i)},this.placeElementInParentCenter=function(a){t.placeElement(a,"center","middle")},this.setElementSizeAndPosition=function(a,b,c,d,e){var f={width:d+"px",height:e+"px",left:b+"px",top:c+"px",position:"absolute",margin:"0px"};a.css(f)},this.setElementSize=function(c,d,a){var b={width:d+"px"};null!=a&&(b.height=a+"px"),c.css(b)},this.cloneElementSizeAndPos=function(b,e,f,c,d){var a=b.position();if(void 0==a)throw new Error("Can't get size, empty element");!0===f?(a.height=b.outerHeight(),a.width=b.outerWidth()):(a.height=b.height(),a.width=b.width()),a.left=Math.round(a.left),a.top=Math.round(a.top),c&&(a.left+=c),d&&(a.top+=d),t.setElementSizeAndPosition(e,a.left,a.top,a.width,a.height)},this.placeImageInsideParent=function(c,d,e,f,g,h){var a=t.getImageInsideParentData(d,e,f,g,h),b="<img";return null!==a.imageWidth&&(b+=" width = '"+a.imageWidth+"'",a.style+="width:"+a.imageWidth+";"),null!=a.imageHeight&&("100%"==a.imageHeight?(b+=" height = '"+a.imageHeight+"'",a.style+="height:"+a.imageHeight+";"):(b+=" height = '"+a.imageHeight+"'",a.style+="height:"+a.imageHeight+"px;")),null!==a.imageTop&&(a.style+="top:"+a.imageTop+"px;"),null!==a.imageLeft&&(a.style+="left:"+a.imageLeft+"px;"),c=t.escapeDoubleSlash(c),b+=" style='"+a.style+"'",b+=' src="'+c+'"',b+=">",d.html(b),d.children("img")},this.scaleImageCoverParent=function(h,c,k){if("number"==typeof c)var d=c,e=k;else var d=c.outerWidth(),e=c.outerHeight();var i=t.getImageOriginalSize(h),l=i.width,m=i.height,j=l/m,a=e,b=a*j,f=0,g=0;b<d?(a=(b=d)/j,g=0,f=Math.round(-((a-e)/2*1))):(f=0,g=Math.round(-((b-d)/2*1))),b=Math.round(b),a=Math.round(a),h.css({width:b+"px",height:a+"px",left:g+"px",top:f+"px"})},this.scaleImageFitParent=function(d,e,f,g,h){var i=d.parent(),a=t.getImageInsideParentData(i,e,f,g,h),c=!1,b={};return null!==a.imageWidth&&(c=!0,d.removeAttr("width"),b.width=a.imageWidth+"px"),null!=a.imageHeight&&(c=!0,d.removeAttr("height"),b.height=a.imageHeight+"px"),null!==a.imageTop&&(c=!0,b.top=a.imageTop+"px"),null!==a.imageLeft&&(c=!0,b.left=a.imageLeft+"px"),!0==c&&(b.position="absolute",b.margin="0px 0px",d.css(b)),a},this.scaleImageByHeight=function(b,a,d,e){var c=t.getImageOriginalSize(b,d,e),f=Math.round(a*(c.width/c.height));a=Math.round(a),t.setElementSize(b,f,a)},this.scaleImageByWidth=function(b,a,d,e){var c=t.getImageOriginalSize(b,d,e),f=Math.round(a/(c.width/c.height));a=Math.round(a),t.setElementSize(b,a,f)},this.scaleImageExactSizeInParent=function(g,o,p,b,c,q){var r=g.parent(),d=t.getElementSize(r);d.width<b&&(b=d.width),d.height<c&&(c=d.height);var e=t.getImageInsideParentData(null,o,p,q,null,b,c),k=b,l=c,m=e.imageLeft,h=e.imageLeft,n=e.imageTop,i=e.imageTop,s=Math.round((d.width-b)/2),t=Math.round((d.height-c)/2),u=e.imageWidth+m+h,f=b-u;0!=f&&(h+=f);var v=e.imageHeight+n+i,f=c-v;0!=f&&(i+=f),g.removeAttr("width"),g.removeAttr("height");var a={position:"absolute",margin:"0px 0px"};a.width=k+"px",a.height=l+"px",a.left=s+"px",a.top=t+"px",a["padding-left"]=m+"px",a["padding-top"]=n+"px",a["padding-right"]=h+"px",a["padding-bottom"]=i+"px",g.css(a);var j={};return j.imageWidth=k,j.imageHeight=l,j},this.showElement=function(c,a,b){c.show().fadeTo(0,1),a&&a.show().fadeTo(0,1),b&&b.show().fadeTo(0,1)},this.z_________GALLERY_RELATED_FUNCTIONS_______=function(){},this.disableButton=function(b,a){if(!a)var a="ug-button-disabled";!1==t.isButtonDisabled(b,a)&&b.addClass(a)},this.convertCustomPrefixOptions=function(a,b,d){if(!b)return a;var c={};return jQuery.each(a,function(a,e){0===a.indexOf(b+"_"+d+"_")?c[a.replace(b+"_"+d+"_",d+"_")]=e:c[a]=e}),c},this.enableButton=function(b,a){if(!a)var a="ug-button-disabled";!0==t.isButtonDisabled(b,a)&&b.removeClass(a)},this.isButtonDisabled=function(b,a){if(!a)var a="ug-button-disabled";return!!b.hasClass(a)},this.z_________MATH_FUNCTIONS_______=function(){},this.normalizeSetting=function(b,c,e,f,a,d){if(!d)var d=!1;return a=b+(c-b)*((a-e)/(f-e)),!0==d&&(a<b&&(a=b),a>c&&(a=c)),a},this.getNormalizedValue=function(a,c,d,e,b){var f=(b-a)/(c-a);return b=a+(e-d)*f},this.getDistance=function(a,b,c,d){return Math.round(Math.sqrt(Math.abs((c-a)*(c-a)+(d-b)*(d-b))))},this.getMiddlePoint=function(b,c,d,e){var a={};return a.x=b+Math.round((d-b)/2),a.y=c+Math.round((e-c)/2),a},this.getNumItemsInSpace=function(b,c,a){return Math.floor((b+a)/(c+a))},this.getNumItemsInSpaceRound=function(b,c,a){return Math.round((b+a)/(c+a))},this.getSpaceByNumItems=function(a,b,c){return a*b+(a-1)*c},this.getItemSizeInSpace=function(b,a,c){return Math.floor((b-(a-1)*c)/a)},this.getColX=function(a,b,c){return a*(b+c)},this.getColByIndex=function(a,b){return b%a},this.getColRowByIndex=function(a,b){var c=Math.floor(a/b),d=Math.floor(a%b);return{col:d,row:c}},this.getIndexByRowCol=function(a,b,c){return a<0||b<0?-1:a*c+b},this.getPrevRowSameColIndex=function(c,a){var b=t.getColRowByIndex(c,a);return t.getIndexByRowCol(b.row-1,b.col,a)},this.getNextRowSameColIndex=function(c,a){var b=t.getColRowByIndex(c,a);return t.getIndexByRowCol(b.row+1,b.col,a)},this.z_________DATA_FUNCTIONS_______=function(){},this.setGlobalData=function(a,b){jQuery.data(document.body,a,b)},this.getGlobalData=function(a){return jQuery.data(document.body,a)},this.z_________EVENT_DATA_FUNCTIONS_______=function(){},this.handleScrollTop=function(b){if(!1==t.isTouchDevice())return null;var a=t.getStoredEventData(b),d=15,e=15;if(null===a.scrollDir&&(Math.abs(a.diffMouseX)>d?a.scrollDir="hor":Math.abs(a.diffMouseY)>e&&Math.abs(a.diffMouseY)>Math.abs(a.diffMouseX)&&(a.scrollDir="vert",a.scrollStartY=a.lastMouseClientY,a.scrollOrigin=jQuery(document).scrollTop(),g_temp.dataCache[b].scrollStartY=a.lastMouseClientY,g_temp.dataCache[b].scrollOrigin=a.scrollOrigin),g_temp.dataCache[b].scrollDir=a.scrollDir),"vert"!==a.scrollDir)return a.scrollDir;jQuery(document).scrollTop();var c=a.scrollOrigin-(a.lastMouseClientY-a.scrollStartY);return c>=0&&jQuery(document).scrollTop(c),a.scrollDir},this.wasVerticalScroll=function(a){return"vert"===t.getStoredEventData(a).scrollDir},this.storeEventData=function(e,f,c){var a=t.getMousePosition(e),d=jQuery.now(),b={startTime:d,lastTime:d,startMouseX:a.pageX,startMouseY:a.pageY,lastMouseX:a.pageX,lastMouseY:a.pageY,startMouseClientY:a.clientY,lastMouseClientY:a.clientY,scrollTop:jQuery(document).scrollTop(),scrollDir:null};c&&(b=jQuery.extend(b,c)),g_temp.dataCache[f]=b},this.updateStoredEventData=function(e,c,d){if(!g_temp.dataCache[c])throw new Error("updateEventData error: must have stored cache object");var a=g_temp.dataCache[c],b=t.getMousePosition(e);a.lastTime=jQuery.now(),void 0!==b.pageX&&(a.lastMouseX=b.pageX,a.lastMouseY=b.pageY,a.lastMouseClientY=b.clientY),d&&(a=jQuery.extend(a,d)),g_temp.dataCache[c]=a},this.getStoredEventData=function(b,c){if(!g_temp.dataCache[b])throw new Error("updateEventData error: must have stored cache object");var a=g_temp.dataCache[b];return a.diffMouseX=a.lastMouseX-a.startMouseX,a.diffMouseY=a.lastMouseY-a.startMouseY,a.diffMouseClientY=a.lastMouseClientY-a.startMouseClientY,a.diffTime=a.lastTime-a.startTime,!0===c?(a.startMousePos=a.lastMouseY,a.lastMousePos=a.lastMouseY,a.diffMousePos=a.diffMouseY):(a.startMousePos=a.lastMouseX,a.lastMousePos=a.lastMouseX,a.diffMousePos=a.diffMouseX),a},this.isApproveStoredEventClick=function(a,c){if(!g_temp.dataCache[a])return!0;var b=t.getStoredEventData(a,c),d=Math.abs(b.diffMousePos);return!(b.diffTime>400)&&!(d>30)},this.clearStoredEventData=function(a){g_temp.dataCache[a]=null},this.z_________CHECK_SUPPORT_FUNCTIONS_______=function(){},this.isCanvasExists=function(){return"function"==typeof jQuery('<canvas width="500" height="500" > </canvas>')[0].getContext},this.isScrollbarExists=function(){return window.innerWidth>document.documentElement.clientWidth},this.isTouchDevice=function(){if(-1!==g_temp.isTouchDevice)return g_temp.isTouchDevice;try{document.createEvent("TouchEvent"),g_temp.isTouchDevice=!0}catch(a){g_temp.isTouchDevice=!1}return g_temp.isTouchDevice},this.isRgbaSupported=function(){if(-1!==g_temp.isRgbaSupported)return g_temp.isRgbaSupported;var a=document.getElementsByTagName("script")[0],b=a.style.color;try{a.style.color="rgba(1,5,13,0.44)"}catch(d){}var c=a.style.color!=b;return a.style.color=b,g_temp.isRgbaSupported=c,c},this.z_________GENERAL_FUNCTIONS_______=function(){},this.checkMinJqueryVersion=function(f){for(var b=jQuery.fn.jquery.split("."),c=f.split("."),a=0,g=b.length;a<g;a++){var d=parseInt(b[a]),e=parseInt(c[a]);if(void 0===c[a])break;if(e>d)return!1;if(d>e)break}return!0},this.getCssSizeParam=function(a){return jQuery.isNumeric(a)?a+"px":a},this.convertHexToRGB=function(b,c){var a=b.replace("#","");return a===b?b:(r=parseInt(a.substring(0,2),16),g=parseInt(a.substring(2,4),16),b=parseInt(a.substring(4,6),16),result="rgba("+r+","+g+","+b+","+c+")")},this.timestampToString=function(b){var c,a=new Date(b);return a.getDate()+"/"+a.getMonth()+(" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()+":"+a.getMilliseconds())},this.getArrTouches=function(a){var b=[];return a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches.length>0&&(b=a.originalEvent.touches),b},this.getArrTouchPositions=function(b){for(var c=[],a=0;a<b.length;a++){var d={pageX:b[a].pageX,pageY:b[a].pageY};c.push(d)}return c},this.startTimeDebug=function(){g_temp.starTime=jQuery.now()},this.showTimeDebug=function(){debugLine({"Time Passed":jQuery.now()-g_temp.starTime},!0)},this.initProgressIndicator=function(c,b,d){switch("bar"!=c&& !1==t.isCanvasExists()&&(c="bar"),c){case"bar":var a=new UGProgressBar;a.putHidden(d,b);break;default:case"pie":var a=new UGProgressPie;a.putHidden(d,b);break;case"pie2":b.type_fill=!0;var a=new UGProgressPie;a.putHidden(d,b)}return a},this.setButtonMobileReady=function(a){a.on("touchstart",function(a){jQuery(this).addClass("ug-nohover")}),a.on("mousedown touchend",function(a){return a.stopPropagation(),a.stopImmediatePropagation(),!1})},this.registerTheme=function(a){g_temp.arrThemes.push(a)},this.getArrThemes=function(){return g_temp.arrThemes},this.isThemeRegistered=function(a){return -1!==jQuery.inArray(a,g_temp.arrThemes)},this.getFirstRegisteredTheme=function(){return 0==g_temp.arrThemes.length?"":g_temp.arrThemes[0]},this.isTimePassed=function(a,b){if(!b)var b=100;var c=jQuery.now(),d=c-(lastTime=!1==g_temp.timeCache.hasOwnProperty(a)?0:g_temp.timeCache[a]);return g_temp.timeCache[a]=c,!(d<=b)},this.whenContiniousEventOver=function(a,c,b){if(!b)var b=300;!0==g_temp.timeCache.hasOwnProperty(a)&&null!=g_temp.timeCache[a]&&(clearTimeout(g_temp.timeCache[a]),g_temp.timeCache[a]=null),g_temp.timeCache[a]=setTimeout(c,b)},this.validateClickTouchstartEvent=function(a){var b=!0,c=jQuery.now()-g_temp.lastEventTime;return"click"==a&&"touchstart"==g_temp.lastEventType&&c<1e3&&(b=!1),g_temp.lastEventTime=jQuery.now(),g_temp.lastEventType=a,b},this.addClassOnHover=function(b,a){if(!a)var a="ug-button-hover";b.hover(function(){jQuery(this).addClass(a)},function(){jQuery(this).removeClass(a)})},this.destroyButton=function(a){a.off("mouseenter"),a.off("mouseleave"),a.off("click"),a.off("touchstart"),a.off("touchend"),a.off("mousedown"),a.off("tap")},this.setButtonOnClick=function(a,b){t.setButtonMobileReady(a),a.on("click touchstart",function(a){if(objThis=jQuery(this),a.stopPropagation(),a.stopImmediatePropagation(),!1==t.validateClickTouchstartEvent(a.type))return!0;b(objThis,a)})},this.setButtonOnTap=function(a,b){a.on("tap",b),!1==t.isTouchDevice()?a.on("click",function(a){var b=jQuery(this);if(!1==t.validateClickTouchstartEvent(a.type))return!0;b.trigger("tap")}):(a.on("touchstart",function(a){jQuery(this).addClass("ug-nohover"),g_temp.lastTouchStartElement=jQuery(this),g_temp.lastEventTime=jQuery.now()}),a.on("touchend",function(b){var a=jQuery(this);if(!1==a.is(g_temp.lastTouchStartElement)||!g_temp.lastEventTime||jQuery.now()-g_temp.lastEventTime>g_temp.touchThreshold)return!0;a.trigger("tap")}))},this.loadJs=function(a,d){!0===d&&(a=location.protocol+"//"+a);var b=document.createElement("script");b.src=a;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)},this.loadCss=function(b,c){!0===c&&(b=location.protocol+"//"+b);var a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("href",b),document.getElementsByTagName("head")[0].appendChild(a)},this.addEvent=function(a,b,c){void 0!==a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},this.checkImagesLoaded=function(b,a,d){var e=0,c=b.length;if(0==c&&a)return a(),!1;function f(b,f){e++,"function"==typeof d&&setTimeout(function(){d(b,f)}),e==c&&"function"==typeof a&&setTimeout(function(){a()})}setTimeout(function(){for(var a=0;a<c;a++){var e=b[a];if(void 0!==e.naturalWidth&&0!==e.naturalWidth)f(b[a],!1);else{var d=jQuery("<img/>");d.data("index",a),d.on("load",function(){var a=jQuery(this).data("index");f(b[a],!1)}),d.on("error",function(){var a=jQuery(this).data("index");f(b[a],!0)}),d.attr("src",e.src)}}})},this.waitForWidth=function(a,b){var c=a.width();if(0!=c)return b(),!1;g_temp.handle=setInterval(function(){0!=(c=a.width())&&(clearInterval(g_temp.handle),b())},300)},this.arrayShuffle=function(a){if("object"!=typeof a)return a;for(var c,d,b=a.length;b;c=parseInt(Math.random()*b),d=a[--b],a[b]=a[c],a[c]=d);return a},this.getObjectLength=function(b){var a=0;for(var c in b)a++;return a},this.normalizePercent=function(a){return a<0&&(a=0),a>1&&(a=1),a},this.stripTags=function(a){return"string"!=typeof a?a:a.replace(/(<([^>]+)>)/ig,"")},this.escapeDoubleSlash=function(a){return a.replace('"','"')},this.htmlentitles=function(a){return jQuery("<div/>").text(a).html()},this.z_________END_GENERAL_FUNCTIONS_______=function(){}}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function d(k){var b=k||window.event,o=j.call(arguments,1),i=0,d=0,c=0,l=0;if((k=a.event.fix(b)).type="mousewheel","detail"in b&&(c=-1*b.detail),"wheelDelta"in b&&(c=b.wheelDelta),"wheelDeltaY"in b&&(c=b.wheelDeltaY),"wheelDeltaX"in b&&(d=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(d=-1*c,c=0),i=0===c?d:c,"deltaY"in b&&(i=c=-1*b.deltaY),"deltaX"in b&&(d=b.deltaX,0===c&&(i=-1*d)),0!==c||0!==d){if(1===b.deltaMode){var m=a.data(this,"mousewheel-line-height");i*=m,c*=m,d*=m}else if(2===b.deltaMode){var n=a.data(this,"mousewheel-page-height");i*=n,c*=n,d*=n}return l=Math.max(Math.abs(c),Math.abs(d)),(!h||h>l)&&(h=l,f(b,l)&&(h/=40)),f(b,l)&&(i/=40,d/=40,c/=40),i=Math[i>=1?"floor":"ceil"](i/h),d=Math[d>=1?"floor":"ceil"](d/h),c=Math[c>=1?"floor":"ceil"](c/h),k.deltaX=d,k.deltaY=c,k.deltaFactor=h,k.deltaMode=0,o.unshift(k,i,d,c),g&&clearTimeout(g),g=setTimeout(e,200),(a.event.dispatch||a.event.handle).apply(this,o)}}function e(){h=null}function f(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var g,h,b=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],j=Array.prototype.slice;if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var b=i.length;b;)this.addEventListener(i[--b],d,!1);else this.onmousewheel=d;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var a=i.length;a;)this.removeEventListener(i[--a],d,!1);else this.onmousewheel=null},getLineHeight:function(b){return parseInt(a(b)["offsetParent"in a.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a){"function"==typeof define&&define.amd?define(["jquery"],function($){return a($)}):"object"==typeof module&&"object"==typeof module.exports?exports=a(require("jquery")):a(jQuery)}(function($){$.easing.jswing=$.easing.swing;var d=Math.pow,e=Math.sqrt,f=Math.sin,g=Math.cos,a=Math.PI,b=1.70158,h=1.525*b,i=b+1,j=2*a/3,k=2*a/4.5;function c(a){var c=7.5625,b=2.75;return a<1/b?c*a*a:a<2/b?c*(a-=1.5/b)*a+.75:a<2.5/b?c*(a-=2.25/b)*a+.9375:c*(a-=2.625/b)*a+.984375}$.extend($.easing,{def:"easeOutQuad",swing:function(a){return $.easing[$.easing.def](a)},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return 1-(1-a)*(1-a)},easeInOutQuad:function(a){return a<.5?2*a*a:1-d(-2*a+2,2)/2},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1-d(1-a,3)},easeInOutCubic:function(a){return a<.5?4*a*a*a:1-d(-2*a+2,3)/2},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return 1-d(1-a,4)},easeInOutQuart:function(a){return a<.5?8*a*a*a*a:1-d(-2*a+2,4)/2},easeInQuint:function(a){return a*a*a*a*a},easeOutQuint:function(a){return 1-d(1-a,5)},easeInOutQuint:function(a){return a<.5?16*a*a*a*a*a:1-d(-2*a+2,5)/2},easeInSine:function(b){return 1-g(b*a/2)},easeOutSine:function(b){return f(b*a/2)},easeInOutSine:function(b){return-(g(a*b)-1)/2},easeInExpo:function(a){return 0===a?0:d(2,10*a-10)},easeOutExpo:function(a){return 1===a?1:1-d(2,-10*a)},easeInOutExpo:function(a){return 0===a?0:1===a?1:a<.5?d(2,20*a-10)/2:(2-d(2,-20*a+10))/2},easeInCirc:function(a){return 1-e(1-d(a,2))},easeOutCirc:function(a){return e(1-d(a-1,2))},easeInOutCirc:function(a){return a<.5?(1-e(1-d(2*a,2)))/2:(e(1-d(-2*a+2,2))+1)/2},easeInElastic:function(a){return 0===a?0:1===a?1:-d(2,10*a-10)*f((10*a-10.75)*j)},easeOutElastic:function(a){return 0===a?0:1===a?1:d(2,-10*a)*f((10*a-.75)*j)+1},easeInOutElastic:function(a){return 0===a?0:1===a?1:a<.5?-(d(2,20*a-10)*f((20*a-11.125)*k))/2:d(2,-20*a+10)*f((20*a-11.125)*k)/2+1},easeInBack:function(a){return i*a*a*a-b*a*a},easeOutBack:function(a){return 1+i*d(a-1,3)+b*d(a-1,2)},easeInOutBack:function(a){return a<.5?d(2*a,2)*((h+1)*2*a-h)/2:(d(2*a-2,2)*((h+1)*(2*a-2)+h)+2)/2},easeInBounce:function(a){return 1-c(1-a)},easeOutBounce:c,easeInOutBounce:function(a){return a<.5?(1-c(1-2*a))/2:(1+c(2*a-1))/2}})}),function(a,i){if(void 0===a.cssHooks)return!1;function j(a,c,d){var b=o[c.type]||{};return null==a?d||!c.def?null:c.def:isNaN(a=b.floor?~~a:parseFloat(a))?c.def:b.mod?(a+b.mod)%b.mod:0>a?0:b.max<a?b.max:a}function k(d){var h=b(),g=h._rgba=[];return d=d.toLowerCase(),e(n,function(j,a){var b,f=a.re.exec(d),i=f&&a.parse(f),e=a.space||"rgba";return i?(b=h[e](i),h[c[e].cache]=b[c[e].cache],g=h._rgba=b._rgba,!1):void 0}),g.length?("0,0,0,0"===g.join()&&a.extend(g,f.transparent),h):f[d]}function l(b,c,a){return 1>6*(a=(a+1)%1)?b+(c-b)*a*6:1>2*a?c:2>3*a?b+(c-b)*(2/3-a)*6:b}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",m=/^([\-+])=\s*(\d+\.?\d*)/,n=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],b=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},o={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=b.support={},d=a("<p>")[0],e=a.each;d.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=d.style.backgroundColor.indexOf("rgba")> -1,e(c,function(b,a){a.cache="_"+b,a.props.alpha={idx:3,type:"percent",def:1}}),b.fn=a.extend(b.prototype,{parse:function(d,g,l,m){if(d===i)return this._rgba=[null,null,null,null],this;(d.jquery||d.nodeType)&&(d=a(d).css(g),g=i);var n=this,h=a.type(d),o=this._rgba=[];return g!==i&&(d=[d,g,l,m],h="array"),"string"===h?this.parse(k(d)||f._default):"array"===h?(e(c.rgba.props,function(b,a){o[a.idx]=j(d[a.idx],a)}),this):"object"===h?(d instanceof b?e(c,function(b,a){d[a.cache]&&(n[a.cache]=d[a.cache].slice())}):e(c,function(f,b){var c=b.cache;e(b.props,function(a,e){if(!n[c]&&b.to){if("alpha"===a||null==d[a])return;n[c]=b.to(n._rgba)}n[c][e.idx]=j(d[a],e,!0)}),n[c]&&0>a.inArray(null,n[c].slice(0,3))&&(n[c][3]=1,b.from&&(n._rgba=b.from(n[c])))}),this):void 0},is:function(a){var f=b(a),d=!0,g=this;return e(c,function(h,a){var b,c=f[a.cache];return c&&(b=g[a.cache]||a.to&&a.to(g._rgba)||[],e(a.props,function(e,a){return null!=c[a.idx]?d=c[a.idx]===b[a.idx]:void 0})),d}),d},_space:function(){var a=[],b=this;return e(c,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(h,l){var d=b(h),f=d._space(),a=c[f],g=0===this.alpha()?b("transparent"):this,i=g[a.cache]||a.to(g._rgba),k=i.slice();return d=d[a.cache],e(a.props,function(g,f){var e=f.idx,a=i[e],b=d[e],c=o[f.type]||{};null!==b&&(null===a?k[e]=b:(c.mod&&(b-a>c.mod/2?a+=c.mod:a-b>c.mod/2&&(a-=c.mod)),k[e]=j((b-a)*l+a,f)))}),this[f](k)},blend:function(d){if(1===this._rgba[3])return this;var c=this._rgba.slice(),e=c.pop(),f=b(d)._rgba;return b(a.map(c,function(a,b){return(1-e)*f[b]+e*a}))},toRgbaString:function(){var c="rgba(",b=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===b[3]&&(b.pop(),c="rgb("),c+b.join()+")"},toHslaString:function(){var c="hsla(",b=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&3>b&&(a=Math.round(100*a)+"%"),a});return 1===b[3]&&(b.pop(),c="hsl("),c+b.join()+")"},toHexString:function(c){var b=this._rgba.slice(),d=b.pop();return c&&b.push(~~(255*d)),"#"+a.map(b,function(a){return 1===(a=(a||0).toString(16)).length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),b.fn.parse.prototype=b.fn,c.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var i,j,c=a[0]/255,d=a[1]/255,f=a[2]/255,k=a[3],e=Math.max(c,d,f),g=Math.min(c,d,f),b=e-g,h=e+g,l=.5*h;return i=g===e?0:c===e?60*(d-f)/b+360:d===e?60*(f-c)/b+120:60*(c-d)/b+240,j=0===b?0:.5>=l?b/h:b/(2-h),[Math.round(i)%360,j,l,null==k?1:k]},c.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var d=a[0]/360,e=a[1],b=a[2],g=a[3],c=.5>=b?b*(1+e):b+e-b*e,f=2*b-c;return[Math.round(255*l(f,c,d+1/3)),Math.round(255*l(f,c,d)),Math.round(255*l(f,c,d-1/3)),g]},e(c,function(d,c){var f=c.props,g=c.cache,h=c.to,k=c.from;b.fn[d]=function(c){if(h&&!this[g]&&(this[g]=h(this._rgba)),c===i)return this[g].slice();var l,m=a.type(c),n="array"===m||"object"===m?c:arguments,d=this[g].slice();return e(f,function(c,a){var b=n["object"===m?c:a.idx];null==b&&(b=d[a.idx]),d[a.idx]=j(b,a)}),k?((l=b(k(d)))[g]=d,l):b(d)},e(f,function(c,e){b.fn[c]||(b.fn[c]=function(b){var g,f=a.type(b),j="alpha"===c?this._hsla?"hsla":"rgba":d,h=this[j](),i=h[e.idx];return"undefined"===f?i:("function"===f&&(b=b.call(this,i),f=a.type(b)),null==b&&e.empty?this:("string"===f&&(g=m.exec(b))&&(b=i+parseFloat(g[2])*("+"===g[1]?1:-1)),h[e.idx]=b,this[j](h)))})})}),b.hook=function(c){e(c.split(" "),function(d,c){a.cssHooks[c]={set:function(g,d){var i,e,f="";if("transparent"!==d&&("string"!==a.type(d)||(i=k(d)))){if(d=b(i||d),!h.rgba&&1!==d._rgba[3]){for(e="backgroundColor"===c?g.parentNode:g;(""===f||"transparent"===f)&&e&&e.style;)try{f=a.css(e,"backgroundColor"),e=e.parentNode}catch(j){}d=d.blend(f&&"transparent"!==f?f:"_default")}d=d.toRgbaString()}try{g.style[c]=d}catch(l){}}},a.fx.step[c]=function(d){d.colorInit||(d.start=b(d.elem,c),d.end=b(d.end),d.colorInit=!0),a.cssHooks[c].set(d.elem,d.start.transition(d.end,d.pos))}})},b.hook(g),a.cssHooks.borderColor={expand:function(b){var a={};return e(["Top","Right","Bottom","Left"],function(d,c){a["border"+c+"Color"]=b}),a}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(a){function b(){try{var c=this===document?a(this):a(this).contents()}catch(d){return!1}c.mousemove(function(b){a.mlp={x:b.pageX,y:b.pageY}}),c.find("iframe").on("load",b)}a.mlp={x:0,y:0},a(b),a.fn.ismouseover=function(){var b=!1;return this.eq(0).each(function(){var d=a(this).is("iframe")?a(this).contents().find("body"):a(this),c=d.offset();b=c.left<=a.mlp.x&&c.left+d.outerWidth()>a.mlp.x&&c.top<=a.mlp.y&&c.top+d.outerHeight()>a.mlp.y}),b}}(jQuery);var g_ugFunctions=new UGFunctions;function UGThumbsGeneral(){var g_arrItems,g_objParent,g_objGallery,g_objects,g_objWrapper,t=this,g_objThis=jQuery(t),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions;this.type={GET_THUMBS_ALL:"all",GET_THUMBS_RATIO:"ratio",GET_THUMBS_NO_RATIO:"no_ratio",GET_THUMBS_NEW:"new"},this.events={SETOVERSTYLE:"thumbmouseover",SETNORMALSTYLE:"thumbmouseout",SETSELECTEDSTYLE:"thumbsetselected",PLACEIMAGE:"thumbplaceimage",AFTERPLACEIMAGE:"thumb_after_place_image",IMAGELOADERROR:"thumbimageloaderror",THUMB_IMAGE_LOADED:"thumb_image_loaded"};var g_options={thumb_width:88,thumb_height:50,thumb_fixed_size:!0,thumb_resize_by:"height",thumb_border_effect:!0,thumb_border_width:0,thumb_border_color:"#000000",thumb_over_border_width:0,thumb_over_border_color:"#d9d9d9",thumb_selected_border_width:1,thumb_selected_border_color:"#d9d9d9",thumb_round_corners_radius:0,thumb_color_overlay_effect:!0,thumb_overlay_color:"#000000",thumb_overlay_opacity:.4,thumb_overlay_reverse:!1,thumb_image_overlay_effect:!1,thumb_image_overlay_type:"bw",thumb_transition_duration:200,thumb_transition_easing:"easeOutQuad",thumb_show_loader:!0,thumb_loader_type:"dark",thumb_wrapper_as_link:!1,thumb_link_newpage:!1},g_temp={touchEnabled:!1,num_thumbs_checking:0,customThumbs:!1,funcSetCustomThumbHtml:null,isEffectBorder:!1,isEffectOverlay:!1,isEffectImage:!1,colorOverlayOpacity:1,thumbInnerReduce:0,allowOnResize:!0,classNewThumb:"ug-new-thumb"},g_serviceParams={timeout_thumb_check:100,thumb_max_check_times:600,eventSizeChange:"thumb_size_change"};function appendHtmlThumbFromItem(itemIndex,imageEffectClass){var objItem=g_arrItems[itemIndex],classAddition="";!1==g_temp.customThumbs&&(classAddition=" ug-thumb-generated");var htmlThumb="<div class='ug-thumb-wrapper"+classAddition+"' "+("style='z-index:"+(objItem.index+1)+";'")+"></div>";if(!0==g_options.thumb_wrapper_as_link){var urlLink=objItem.link;""==objItem.link&&(urlLink="javascript:void(0)");var linkTarget="";!0==g_options.thumb_link_newpage&&objItem.link&&(linkTarget=" target='_blank'");var htmlThumb="<a href='"+urlLink+"'"+linkTarget+" class='ug-thumb-wrapper"+classAddition+"'></a>"}var objThumbWrapper=jQuery(htmlThumb),objImage=objItem.objThumbImage;if(!1==g_temp.customThumbs){if(!0==g_options.thumb_show_loader&&objImage){var loaderClass="ug-thumb-loader-dark";"bright"==g_options.thumb_loader_type&&(loaderClass="ug-thumb-loader-bright"),objThumbWrapper.append("<div class='ug-thumb-loader "+loaderClass+"'></div>"),objThumbWrapper.append("<div class='ug-thumb-error' style='display:none'></div>")}if(objImage){if(objImage.addClass("ug-thumb-image"),!0==g_options.thumb_image_overlay_effect){var objImageOverlay=objImage.clone().appendTo(objThumbWrapper);objImageOverlay.addClass("ug-thumb-image-overlay "+imageEffectClass).removeClass("ug-thumb-image"),objImageOverlay.fadeTo(0,0),objItem.objImageOverlay=objImageOverlay}objThumbWrapper.append(objImage)}}return g_temp.isEffectBorder&&objThumbWrapper.append("<div class='ug-thumb-border-overlay'></div>"),g_temp.isEffectOverlay&&objThumbWrapper.append("<div class='ug-thumb-overlay'></div>"),g_objParent.append(objThumbWrapper),g_temp.customThumbs&&g_temp.funcSetCustomThumbHtml(objThumbWrapper,objItem),g_arrItems[itemIndex].objThumbWrapper=objThumbWrapper,objThumbWrapper}function setThumbSize(width,height,objThumb,innerOnly){var objCss={width:width+"px",height:height+"px"},objCssInner={width:width-g_temp.thumbInnerReduce+"px",height:height-g_temp.thumbInnerReduce+"px"},selectorsString=".ug-thumb-loader, .ug-thumb-error, .ug-thumb-border-overlay, .ug-thumb-overlay";objThumb?(!0!==innerOnly&&objThumb.css(objCss),objThumb.find(selectorsString).css(objCssInner)):(g_objParent.children(".ug-thumb-wrapper").css(objCss),g_objParent.find(selectorsString).css(objCssInner))}function setThumbBorderEffect(objThumb,borderWidth,borderColor,noAnimation){if(!noAnimation)var noAnimation=!1;g_gallery.isFakeFullscreen()&&(noAnimation=!0);var objBorderOverlay=objThumb.children(".ug-thumb-border-overlay"),objCss={};objCss["border-width"]=borderWidth+"px",0!=borderWidth&&(objCss["border-color"]=borderColor),noAnimation&& !0===noAnimation?(objBorderOverlay.css(objCss),0==borderWidth?objBorderOverlay.hide():objBorderOverlay.show()):(0==borderWidth?objBorderOverlay.stop().fadeOut(g_options.thumb_transition_duration):objBorderOverlay.show().stop().fadeIn(g_options.thumb_transition_duration),animateThumb(objBorderOverlay,objCss))}function setThumbColorOverlayEffect(objThumb,isActive,noAnimation){var objOverlay=objThumb.children(".ug-thumb-overlay"),animationDuration=g_options.thumb_transition_duration;noAnimation&& !0===noAnimation&&(animationDuration=0),isActive?objOverlay.stop(!0).fadeTo(animationDuration,g_temp.colorOverlayOpacity):objOverlay.stop(!0).fadeTo(animationDuration,0)}function setThumbImageOverlayEffect(objThumb,isActive,noAnimation){var objImage=objThumb.children("img.ug-thumb-image"),objImageOverlay=objThumb.children("img.ug-thumb-image-overlay"),animationDuration=g_options.thumb_transition_duration;noAnimation&& !0===noAnimation&&(animationDuration=0),isActive?objImageOverlay.stop(!0).fadeTo(animationDuration,1):(objImage.fadeTo(0,1),objImageOverlay.stop(!0).fadeTo(animationDuration,0))}function setThumbSelectedStyle(objThumb,noAnimation){g_temp.isEffectBorder&&setThumbBorderEffect(objThumb,g_options.thumb_selected_border_width,g_options.thumb_selected_border_color,noAnimation),g_temp.isEffectOverlay&&setThumbColorOverlayEffect(objThumb,!0==g_options.thumb_overlay_reverse,noAnimation),g_temp.isEffectImage&&setThumbImageOverlayEffect(objThumb,!1,noAnimation),g_objThis.trigger(t.events.SETSELECTEDSTYLE,objThumb)}function setItemThumbLoadedError(objThumb){var objItem=t.getItemByThumb(objThumb);if(objItem.isLoaded=!0,objItem.isThumbImageLoaded=!1,!0==g_temp.customThumbs)return g_objThis.trigger(t.events.IMAGELOADERROR,objThumb),!0;objThumb.children(".ug-thumb-loader").hide(),objThumb.children(".ug-thumb-error").show()}function setThumbsBorderRadius(objThumbs){if(g_options.thumb_round_corners_radius<=0)return!1;var objCss={"border-radius":g_options.thumb_round_corners_radius+"px"};objThumbs?(objThumbs.css(objCss),objThumbs.find(".ug-thumb-border-overlay").css(objCss)):g_objParent.find(".ug-thumb-wrapper, .ug-thumb-wrapper .ug-thumb-border-overlay").css(objCss)}function animateThumb(objThumb,objThumbCss){objThumb.stop(!0).animate(objThumbCss,{duration:g_options.thumb_transition_duration,easing:g_options.thumb_transition_easing,queue:!1})}function redrawThumbStyle(objThumb){!0==isThumbSelected(objThumb)?setThumbSelectedStyle(objThumb,!0,"redraw"):t.setThumbNormalStyle(objThumb,!0,"redraw")}function placeThumbImage(objThumb,objImage,objItem){if(!0==g_options.thumb_fixed_size)g_functions.scaleImageCoverParent(objImage,objThumb);else{"height"==g_options.thumb_resize_by?g_functions.scaleImageByHeight(objImage,g_options.thumb_height):g_functions.scaleImageByWidth(objImage,g_options.thumb_width);var imageSize=g_functions.getElementSize(objImage);g_functions.placeElement(objImage,0,0),setThumbSize(imageSize.width,imageSize.height,objThumb)}objThumb.children(".ug-thumb-loader").hide(),objImage.show(),!1==g_options.thumb_image_overlay_effect?objImage.fadeTo(0,1):(!0==g_options.thumb_image_overlay_effect&&copyPositionToThumbOverlayImage(objImage),objImage.fadeTo(0,0),redrawThumbStyle(objThumb)),g_objThis.trigger(t.events.AFTERPLACEIMAGE,objThumb)}function copyPositionToThumbOverlayImage(objImage){var objImageBW=objImage.siblings(".ug-thumb-image-overlay");if(0==objImageBW.length)return!1;var objSize=g_functions.getElementSize(objImage),objCss={width:objSize.width+"px",height:objSize.height+"px",left:objSize.left+"px",top:objSize.top+"px"};objImageBW.css(objCss),!1==g_temp.customThumbs&&objImageBW.fadeTo(0,1)}function getImageEffectsClass(){var imageEffectClass="",arrEffects=g_options.thumb_image_overlay_type.split(",");for(var index in arrEffects){var effect=arrEffects[index];switch(effect){case"bw":imageEffectClass+=" ug-bw-effect";break;case"blur":imageEffectClass+=" ug-blur-effect";break;case"sepia":imageEffectClass+=" ug-sepia-effect"}}return imageEffectClass}function isThumbSelected(objThumbWrapper){return!!objThumbWrapper.hasClass("ug-thumb-selected")}function onThumbSizeChange(temp,objThumb){objThumb=jQuery(objThumb),t.getItemByThumb(objThumb);var objSize=g_functions.getElementSize(objThumb);setThumbSize(objSize.width,objSize.height,objThumb,!0),redrawThumbStyle(objThumb)}function onMouseOver(objThumb){if(!0==g_temp.touchEnabled)return objThumbs.off("mouseenter").off("mouseleave"),!0;!1==isThumbSelected(objThumb)&&t.setThumbOverStyle(objThumb)}function onMouseOut(objThumb){if(!0==g_temp.touchEnabled)return!0;!1==isThumbSelected(objThumb)&&t.setThumbNormalStyle(objThumb,!1)}function onImageLoaded(image,isForce){if(!isForce)var isForce=!1;var objImage=jQuery(image),objThumb=objImage.parents(".ug-thumb-wrapper");if(0==objThumb.parent().length|| !0==(objItem=t.getItemByThumb(objThumb)).isLoaded&& !1===isForce)return!1;t.triggerImageLoadedEvent(objThumb,objImage),!0==g_temp.customThumbs?g_objThis.trigger(t.events.PLACEIMAGE,[objThumb,objImage]):placeThumbImage(objThumb,objImage,objItem)}function onThumbImageLoaded(data,objThumb,objImage){(objItem=t.getItemByThumb(objThumb)).isLoaded=!0,objItem.isThumbImageLoaded=!0;var objSize=g_functions.getImageOriginalSize(objImage);objItem.thumbWidth=objSize.width,objItem.thumbHeight=objSize.height,objItem.thumbRatioByWidth=objSize.width/objSize.height,objItem.thumbRatioByHeight=objSize.height/objSize.width,objThumb.addClass("ug-thumb-ratio-set")}this.init=function(a,b){g_objects=a.getObjects(),g_gallery=a,g_objGallery=jQuery(a),g_objWrapper=g_objects.g_objWrapper,g_arrItems=g_objects.g_arrItems,g_options=jQuery.extend(g_options,b),g_temp.isEffectBorder=g_options.thumb_border_effect,g_temp.isEffectOverlay=g_options.thumb_color_overlay_effect,g_temp.isEffectImage=g_options.thumb_image_overlay_effect},this._____________EXTERNAL_SETTERS__________=function(){},this.setHtmlThumbs=function(b,c){if(g_objParent=b,!0==g_temp.isEffectImage)var d=getImageEffectsClass();if(!0!==c)for(var e=g_gallery.getNumItems(),a=0;a<e;a++)appendHtmlThumbFromItem(a,d);else{t.getThumbs().removeClass(g_temp.classNewThumb);var f=g_gallery.getNewAddedItemsIndexes();jQuery.each(f,function(b,a){appendHtmlThumbFromItem(a,d).addClass(g_temp.classNewThumb)})}},this.setThumbNormalStyle=function(a,b,c){!0==g_temp.customThumbs&&a.removeClass("ug-thumb-over"),g_temp.isEffectBorder&&setThumbBorderEffect(a,g_options.thumb_border_width,g_options.thumb_border_color,b),g_temp.isEffectOverlay&&setThumbColorOverlayEffect(a,!0!=g_options.thumb_overlay_reverse,b),g_temp.isEffectImage&&setThumbImageOverlayEffect(a,!0,b),g_objThis.trigger(t.events.SETNORMALSTYLE,a)},this.setThumbOverStyle=function(a){!0==g_temp.customThumbs&&a.addClass("ug-thumb-over"),g_temp.isEffectBorder&&setThumbBorderEffect(a,g_options.thumb_over_border_width,g_options.thumb_over_border_color),g_temp.isEffectOverlay&&setThumbColorOverlayEffect(a,!0==g_options.thumb_overlay_reverse),!0==g_temp.isEffectImage&&setThumbImageOverlayEffect(a,!1),g_objThis.trigger(t.events.SETOVERSTYLE,a)},this.setHtmlProperties=function(a){if(!a)var a=t.getThumbs();if(!1==g_temp.customThumbs&&(!0==g_options.thumb_fixed_size&&setThumbSize(g_options.thumb_width,g_options.thumb_height,a),setThumbsBorderRadius(a)),a.each(function(){var a=jQuery(this);redrawThumbStyle(a)}),g_temp.isEffectOverlay&&g_options.thumb_overlay_color){var b={};if(g_functions.isRgbaSupported()){var c=g_functions.convertHexToRGB(g_options.thumb_overlay_color,g_options.thumb_overlay_opacity);b["background-color"]=c}else b["background-color"]=g_options.thumb_overlay_color,g_temp.colorOverlayOpacity=g_options.thumb_overlay_opacity;a.find(".ug-thumb-overlay").css(b)}},this.setThumbSelected=function(a){if(!0==g_temp.customThumbs&&a.removeClass("ug-thumb-over"),!0==isThumbSelected(a))return!0;a.addClass("ug-thumb-selected"),setThumbSelectedStyle(a)},this.setThumbUnselected=function(a){a.removeClass("ug-thumb-selected"),t.setThumbNormalStyle(a,!1,"set unselected")},this.setOptions=function(a){g_options=jQuery.extend(g_options,a)},this.setThumbInnerReduce=function(a){g_temp.thumbInnerReduce=a},this.setCustomThumbs=function(a,b,c){if(g_temp.customThumbs=!0,"function"!=typeof a)throw new Error("The argument should be function");g_temp.funcSetCustomThumbHtml=a,-1==jQuery.inArray("overlay",b)&&(g_temp.isEffectOverlay=!1),-1==jQuery.inArray("border",b)&&(g_temp.isEffectBorder=!1),g_temp.isEffectImage=!1,c&& !1===c.allow_onresize&&(g_temp.allowOnResize=!1)},this._____________EXTERNAL_GETTERS__________=function(){},this.getOptions=function(){return g_options},this.getNumThumbs=function(){return g_arrItems.length},this.getThumbImage=function(a){return a.find(".ug-thumb-image")},this.getThumbByIndex=function(a){var b=t.getThumbs();if(a>=b.length||a<0)throw new Error("Wrong thumb index");return jQuery(b[a])},this.getThumbs=function(d){var b=".ug-thumb-wrapper",c=".ug-thumb-ratio-set";switch(d){default:case t.type.GET_THUMBS_ALL:var a=g_objParent.children(b);break;case t.type.GET_THUMBS_NO_RATIO:var a=g_objParent.children(b).not(c);break;case t.type.GET_THUMBS_RATIO:var a=g_objParent.children(b+c);break;case t.type.GET_THUMBS_NEW:var a=g_objParent.children("."+g_temp.classNewThumb)}return a},this.getItemByThumb=function(b){var a=b.data("index");return void 0===a&&(a=b.index()),g_arrItems[a]},this.isThumbLoaded=function(a){return t.getItemByThumb(a).isLoaded},this.getGlobalThumbSize=function(){return{width:g_options.thumb_width,height:g_options.thumb_height}},this._____________EXTERNAL_OTHERS__________=function(){},this.initEvents=function(){var a=".ug-thumb-wrapper";!0==g_temp.allowOnResize&&g_objWrapper.on(g_serviceParams.eventSizeChange,onThumbSizeChange),g_objThis.on(t.events.THUMB_IMAGE_LOADED,onThumbImageLoaded),g_objParent.on("touchstart",a,function(){g_temp.touchEnabled=!0,g_objParent.off("mouseenter").off("mouseleave")}),g_objParent.on("mouseenter",a,function(b){var a=jQuery(this);onMouseOver(a)}),g_objParent.on("mouseleave",a,function(b){var a=jQuery(this);onMouseOut(a)})},this.destroy=function(){var a=".ug-thumb-wrapper";g_objParent.off("touchstart",a),g_objWrapper.off(g_serviceParams.eventSizeChange),g_objParent.off("mouseenter",a),g_objParent.off("mouseleave",a),g_objThis.off(t.events.THUMB_IMAGE_LOADED)},this.loadThumbsImages=function(){var a=g_objParent.find(".ug-thumb-image");g_functions.checkImagesLoaded(a,null,function(a,b){if(!1==b)onImageLoaded(a,!0);else{var c=jQuery(a).parent();setItemThumbLoadedError(c)}})},this.triggerImageLoadedEvent=function(a,b){g_objThis.trigger(t.events.THUMB_IMAGE_LOADED,[a,b])},this.hideThumbs=function(){g_objParent.find(".ug-thumb-wrapper").hide()}}function UGThumbsStrip(){var g_objGallery,g_objects,g_objWrapper,g_arrItems,g_objStrip,g_objStripInner,g_aviaControl,g_touchThumbsControl,t=this,g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_isVertical=!1,g_thumbs=new UGThumbsGeneral,g_functions=new UGFunctions,g_options={strip_vertical_type:!1,strip_thumbs_align:"left",strip_space_between_thumbs:6,strip_thumb_touch_sensetivity:15,strip_scroll_to_thumb_duration:500,strip_scroll_to_thumb_easing:"easeOutCubic",strip_control_avia:!0,strip_control_touch:!0,strip_padding_top:0,strip_padding_bottom:0,strip_padding_left:0,strip_padding_right:0},g_temp={isRunOnce:!1,is_placed:!1,isNotFixedThumbs:!1,handle:null},g_sizes={stripSize:0,stripActiveSize:0,stripInnerSize:0,thumbSize:0,thumbSecondSize:0};this.events={STRIP_MOVE:"stripmove",INNER_SIZE_CHANGE:"size_change"};var g_defaultsVertical={strip_thumbs_align:"top",thumb_resize_by:"width"};function initStrip(gallery,customOptions){g_objects=gallery.getObjects(),g_gallery=gallery,g_gallery.attachThumbsPanel("strip",t),g_objGallery=jQuery(gallery),g_objWrapper=g_objects.g_objWrapper,g_arrItems=g_objects.g_arrItems,g_options=jQuery.extend(g_options,customOptions),g_isVertical=g_options.strip_vertical_type,!0==g_isVertical&&(g_options=jQuery.extend(g_options,g_defaultsVertical),g_options=jQuery.extend(g_options,customOptions),customOptions.thumb_resize_by="width"),g_thumbs.init(gallery,customOptions),onAfterSetOptions()}function onAfterSetOptions(){var thumbsOptions=g_thumbs.getOptions();g_temp.isNotFixedThumbs=!1===thumbsOptions.thumb_fixed_size,g_isVertical=g_options.strip_vertical_type}function runStrip(){g_thumbs.setHtmlProperties(),initSizeParams(),fixSize(),positionThumbs(),!1==g_temp.isRunOnce&&(!0==g_options.strip_control_touch&&(g_touchThumbsControl=new UGTouchThumbsControl).init(t),!0==g_options.strip_control_avia&&(g_aviaControl=new UGAviaControl).init(t),checkControlsEnableDisable(),g_thumbs.loadThumbsImages(),initEvents()),g_temp.isRunOnce=!0}function storeStripSize(size){g_sizes.stripSize=size,!1==g_isVertical?g_sizes.stripActiveSize=g_sizes.stripSize-g_options.strip_padding_left-g_options.strip_padding_right:g_sizes.stripActiveSize=g_sizes.stripSize-g_options.strip_padding_top-g_options.strip_padding_bottom,g_sizes.stripActiveSize<0&&(g_sizes.stripActiveSize=0)}function initSizeParams(){var firstThumb=jQuery(g_objStripInner.children(".ug-thumb-wrapper")[0]),thumbsRealWidth=firstThumb.outerWidth(),thumbsRealHeight=firstThumb.outerHeight(),thumbs_options=g_thumbs.getOptions();!1==g_isVertical?(g_sizes.thumbSize=thumbsRealWidth,!0==thumbs_options.thumb_fixed_size?g_sizes.thumbSecondSize=thumbsRealHeight:g_sizes.thumbSecondSize=thumbs_options.thumb_height,storeStripSize(g_objStrip.width()),g_sizes.stripInnerSize=g_objStripInner.width()):(g_sizes.thumbSize=thumbsRealHeight,!0==thumbs_options.thumb_fixed_size?g_sizes.thumbSecondSize=thumbsRealWidth:g_sizes.thumbSecondSize=thumbs_options.thumb_width,storeStripSize(g_objStrip.height()),g_sizes.stripInnerSize=g_objStripInner.height())}function setInnerStripSize(innerSize){!1==g_isVertical?g_objStripInner.width(innerSize):g_objStripInner.height(innerSize),g_sizes.stripInnerSize=innerSize,checkControlsEnableDisable(),jQuery(t).trigger(t.events.INNER_SIZE_CHANGE)}function positionThumbs(){var arrThumbs=g_objStripInner.children(".ug-thumb-wrapper"),posx=0,posy=0;for(!1==g_isVertical&&(posy=g_options.strip_padding_top),i=0;i<arrThumbs.length;i++){var objThumb=jQuery(arrThumbs[i]);if(!0==g_temp.isNotFixedThumbs){if(!1==(objItem=g_thumbs.getItemByThumb(objThumb)).isLoaded)continue;objThumb.show()}g_functions.placeElement(objThumb,posx,posy),!1==g_isVertical?posx+=objThumb.outerWidth()+g_options.strip_space_between_thumbs:posy+=objThumb.outerHeight()+g_options.strip_space_between_thumbs}if(!1==g_isVertical)var innerStripSize=posx-g_options.strip_space_between_thumbs;else var innerStripSize=posy-g_options.strip_space_between_thumbs;setInnerStripSize(innerStripSize)}function fixSize(){if(!1==g_isVertical){var height=g_sizes.thumbSecondSize,objCssStrip={};objCssStrip.height=height+"px";var objCssInner={};objCssInner.height=height+"px"}else{var width=g_sizes.thumbSecondSize,objCssStrip={};objCssStrip.width=width+"px";var objCssInner={};objCssInner.width=width+"px"}g_objStrip.css(objCssStrip),g_objStripInner.css(objCssInner)}function scrollBy(scrollStep){var finalPos=t.getInnerStripPos()+scrollStep;finalPos=t.fixInnerStripLimits(finalPos),t.positionInnerStrip(finalPos,!0)}function scrollToThumbMin(objThumb){var scrollPos=-1*getThumbPos(objThumb).min;scrollPos=t.fixInnerStripLimits(scrollPos),t.positionInnerStrip(scrollPos,!0)}function scrollToThumbMax(objThumb){var scrollPos=-1*getThumbPos(objThumb).max+g_sizes.stripSize;scrollPos=t.fixInnerStripLimits(scrollPos),t.positionInnerStrip(scrollPos,!0)}function scrollToThumb(objThumb){if(!1==isStripMovingEnabled())return!1;var objBounds=getThumbsInsideBounds(),objThumbPos=getThumbPos(objThumb);if(objThumbPos.min<objBounds.minPosThumbs){var prevThumb=objThumb.prev();prevThumb.length?scrollToThumbMin(prevThumb):scrollToThumbMin(objThumb)}else if(objThumbPos.max>objBounds.maxPosThumbs){var nextThumb=objThumb.next();nextThumb.length?scrollToThumbMax(nextThumb):scrollToThumbMax(objThumb)}}function scrollToSelectedThumb(){var selectedItem=g_gallery.getSelectedItem();if(null==selectedItem)return!0;var objThumb=selectedItem.objThumbWrapper;objThumb&&scrollToThumb(objThumb)}function checkAndRepositionInnerStrip(){if(!1==isStripMovingEnabled())return!1;var pos=t.getInnerStripPos(),posFixed=t.fixInnerStripLimits(pos);pos!=posFixed&&t.positionInnerStrip(posFixed,!0)}function checkControlsEnableDisable(){!0==isStripMovingEnabled()?(g_aviaControl&&g_aviaControl.enable(),g_touchThumbsControl&&g_touchThumbsControl.enable()):(g_aviaControl&&g_aviaControl.disable(),g_touchThumbsControl&&g_touchThumbsControl.disable())}function alignInnerStrip(){if(isStripMovingEnabled())return!1;!1==g_isVertical?g_functions.placeElement(g_objStripInner,g_options.strip_thumbs_align,0):g_functions.placeElement(g_objStripInner,0,g_options.strip_thumbs_align)}function onThumbClick(objThumb){if(t.isTouchMotionActive()&& !0==g_touchThumbsControl.isSignificantPassed())return!0;var objItem=g_thumbs.getItemByThumb(objThumb);g_gallery.selectItem(objItem)}function onThumbPlaced(){clearTimeout(g_temp.handle),g_temp.handle=setTimeout(function(){positionThumbs()},50)}function onItemChange(){var objItem=g_gallery.getSelectedItem();g_thumbs.setThumbSelected(objItem.objThumbWrapper),scrollToThumb(objItem.objThumbWrapper)}function initEvents(){g_thumbs.initEvents(),g_objStrip.find(".ug-thumb-wrapper").on("click touchend",function(b){var a=jQuery(this);onThumbClick(a)}),g_objGallery.on(g_gallery.events.ITEM_CHANGE,onItemChange),g_temp.isNotFixedThumbs&&jQuery(g_thumbs).on(g_thumbs.events.AFTERPLACEIMAGE,onThumbPlaced)}function isStripMovingEnabled(){return g_sizes.stripInnerSize>g_sizes.stripActiveSize}function getThumbsInsideBounds(){var obj={},innerPos=t.getInnerStripPos();return obj.minPosThumbs=-1*innerPos+1,obj.maxPosThumbs=-1*innerPos+g_sizes.stripSize-1,obj}function getThumbPos(objThumb){var objReturn={},objPos=objThumb.position();return!1==g_isVertical?(objReturn.min=objPos.left,objReturn.max=objPos.left+g_sizes.thumbSize):(objReturn.min=objPos.top,objReturn.max=objPos.top+g_sizes.thumbSize),objReturn}this.setHtml=function(a){if(!a){var a=g_objWrapper;null!=g_options.parent_container&&(a=g_options.parent_container)}a.append("<div class='ug-thumbs-strip'><div class='ug-thumbs-strip-inner'></div></div>"),g_objStripInner=(g_objStrip=a.children(".ug-thumbs-strip")).children(".ug-thumbs-strip-inner"),g_thumbs.setHtmlThumbs(g_objStripInner),!0==g_temp.isNotFixedThumbs&&g_thumbs.hideThumbs()},this.destroy=function(){var a=g_objStrip.find(".ug-thumb-wrapper");a.off("click"),a.off("touchend"),g_objGallery.off(g_gallery.events.ITEM_CHANGE),jQuery(g_thumbs).off(g_thumbs.events.AFTERPLACEIMAGE),g_touchThumbsControl&&g_touchThumbsControl.destroy(),g_aviaControl&&g_aviaControl.destroy(),g_thumbs.destroy()},this.________EXTERNAL_GENERAL___________=function(){},this.init=function(a,b){initStrip(a,b)},this.run=function(){runStrip()},this.positionInnerStrip=function(c,a){if(void 0===a)var a=!1;if(!1==g_isVertical)var b={left:c+"px"};else var b={top:c+"px"};!1==a?(g_objStripInner.css(b),t.triggerStripMoveEvent()):(t.triggerStripMoveEvent(),g_objStripInner.stop(!0).animate(b,{duration:g_options.strip_scroll_to_thumb_duration,easing:g_options.strip_scroll_to_thumb_easing,queue:!1,progress:function(){t.triggerStripMoveEvent()},always:function(){t.triggerStripMoveEvent()}}))},this.triggerStripMoveEvent=function(){jQuery(t).trigger(t.events.STRIP_MOVE)},this.isTouchMotionActive=function(){return!!g_touchThumbsControl&&g_touchThumbsControl.isTouchActive()},this.isItemThumbVisible=function(h){var b=h.objThumbWrapper,a=b.position(),c=-1*t.getInnerStripPos();if(!1==g_isVertical)var d=c+g_sizes.stripSize,e=a.left,f=a.left+b.width();else var d=c+g_sizes.stripSize,e=a.top,f=a.top+b.height();var g=!1;return f>=c&&e<=d&&(g=!0),g},this.getInnerStripPos=function(){return!1==g_isVertical?g_objStripInner.position().left:g_objStripInner.position().top},this.getInnerStripLimits=function(){var a={};return!1==g_isVertical?a.maxPos=g_options.strip_padding_left:a.maxPos=g_options.strip_padding_top,a.minPos=-(g_sizes.stripInnerSize-g_sizes.stripActiveSize),a},this.fixInnerStripLimits=function(a){var b=t.getInnerStripLimits();return a>b.maxPos&&(a=b.maxPos),a<b.minPos&&(a=b.minPos),a},this.scrollForeward=function(){scrollBy(-g_sizes.stripSize)},this.scrollBack=function(){scrollBy(g_sizes.stripSize)},this.________EXTERNAL_SETTERS___________=function(){},this.setOptions=function(a){g_options=jQuery.extend(g_options,a),g_thumbs.setOptions(a),onAfterSetOptions()},this.setSizeVertical=function(c){if(!1==g_isVertical)throw new Error("setSizeVertical error, the strip size is not vertical");var d=g_sizes.thumbSecondSize,b={};b.width=d+"px",b.height=c+"px",g_objStrip.css(b),storeStripSize(c);var a={};a.width=d+"px",a.left="0px",a.top="0px",g_objStripInner.css(a),g_temp.is_placed=!0,checkControlsEnableDisable()},this.setSizeHorizontal=function(c){if(!0==g_isVertical)throw new Error("setSizeHorizontal error, the strip size is not horizontal");var d=g_sizes.thumbSecondSize+g_options.strip_padding_top+g_options.strip_padding_bottom,b={};b.width=c+"px",b.height=d+"px",g_objStrip.css(b),storeStripSize(c);var e=g_options.strip_padding_left,a={};a.height=d+"px",a.left=e+"px",a.top="0px",g_objStripInner.css(a),g_temp.is_placed=!0,checkControlsEnableDisable()},this.setPosition=function(a,b,c,d){g_functions.placeElement(g_objStrip,a,b,c,d)},this.resize=function(a){!1==g_isVertical?(g_objStrip.width(a),g_sizes.stripActiveSize=a-g_options.strip_padding_left-g_options.strip_padding_right):(g_objStrip.height(a),g_sizes.stripActiveSize=a-g_options.strip_padding_top-g_options.strip_padding_bottom),storeStripSize(a),checkControlsEnableDisable(),checkAndRepositionInnerStrip(),alignInnerStrip(),scrollToSelectedThumb(),g_aviaControl&&g_aviaControl.onResize()},this.setThumbUnselected=function(a){g_thumbs.setThumbUnselected(a)},this.setCustomThumbs=function(a){g_thumbs.setCustomThumbs(a)},this.________EXTERNAL_GETTERS___________=function(){},this.getObjects=function(){var a=g_thumbs.getOptions(),b=jQuery.extend(g_options,a);return{g_gallery:g_gallery,g_objGallery:g_objGallery,g_objWrapper:g_objWrapper,g_arrItems:g_arrItems,g_objStrip:g_objStrip,g_objStripInner:g_objStripInner,g_aviaControl:g_aviaControl,g_touchThumbsControl:g_touchThumbsControl,isVertical:g_isVertical,g_options:b,g_thumbs:g_thumbs}},this.getObjThumbs=function(){return g_thumbs},this.getSelectedThumb=function(){var a=g_gallery.getSelectedItemIndex();return -1==a?null:g_thumbs.getThumbByIndex(a)},this.getSizeAndPosition=function(){return g_functions.getElementSize(g_objStrip)},this.getHeight=function(){return g_objStrip.outerHeight()},this.getWidth=function(){return g_objStrip.outerWidth()},this.getSizes=function(){return g_sizes},this.isVertical=function(){return g_isVertical},this.isPlaced=function(){return g_temp.is_placed},this.isMoveEnabled=function(){return isStripMovingEnabled()}}function UGTouchThumbsControl(){var g_parent,g_gallery,g_objGallery,g_objects,g_objStrip,g_objStripInner,g_options,g_isVertical,g_functions=new UGFunctions,g_serviceParams={touch_portion_time:200,thumb_touch_slowFactor:0,minDeltaTime:70,minPath:10,limitsBreakAddition:30,returnAnimateSpeed:500,animationEasing:"easeOutCubic",returnAnimationEasing:"easeOutCubic"},g_temp={touch_active:!1,loop_active:!1,mousePos:0,innerPos:0,startPos:0,startTime:0,lastTime:0,buttonReleaseTime:0,lastPos:0,lastPortionPos:0,lastDeltaTime:0,lastDeltaPos:0,speed:0,handle:"",touchEnabled:!1,isControlEnabled:!0};function getActionVars(){var currentTime=jQuery.now(),obj={};return obj.passedTime=g_temp.lastTime-g_temp.startTime,obj.lastActiveTime=currentTime-g_temp.buttonReleaseTime,obj.passedDistance=g_temp.lastPos-g_temp.startPos,obj.passedDistanceAbs=Math.abs(obj.passedDistance),obj}function setServiceParams(){g_serviceParams.thumb_touch_slowFactor=g_functions.normalizeSetting(5e-5,.01,1,100,g_options.strip_thumb_touch_sensetivity,!0)}function getMouseOrientPosition(event){return!1==g_isVertical?g_functions.getMousePosition(event).pageX:g_functions.getMousePosition(event).pageY}function handleStripDrag(mousePos){var diff=g_temp.mousePos-mousePos,distPos=g_temp.innerPos-diff,objLimits=g_parent.getInnerStripLimits();if(distPos>objLimits.maxPos){var path=distPos-objLimits.maxPos;distPos=objLimits.maxPos+path/3}if(distPos<objLimits.minPos){var path=objLimits.minPos-distPos;distPos=objLimits.minPos-path/3}g_parent.positionInnerStrip(distPos)}function storeInitTouchValues(pagePos){var currentInnerPos=g_parent.getInnerStripPos();g_temp.mousePos=pagePos,g_temp.innerPos=currentInnerPos,g_temp.lastPortionPos=currentInnerPos,g_temp.lastDeltaTime=0,g_temp.lastDeltaPos=0,g_temp.startTime=jQuery.now(),g_temp.startPos=g_temp.innerPos,g_temp.lastTime=g_temp.startTime,g_temp.lastPos=g_temp.startPos,g_temp.speed=0}function storeTouchPortionData(){var currentTime=jQuery.now();currentTime-g_temp.lastTime>=g_serviceParams.touch_portion_time&&(g_temp.lastDeltaTime=currentTime-g_temp.lastTime,g_temp.lastDeltaTime>g_serviceParams.touch_portion_time&&(g_temp.lastDeltaTime=g_serviceParams.touch_portion_time),g_temp.lastDeltaPos=g_temp.lastPos-g_temp.lastPortionPos,g_temp.lastPortionPos=g_temp.lastPos,g_temp.lastTime=currentTime)}function continueTouchMotion(){var slowFactor=g_serviceParams.thumb_touch_slowFactor,minDeltaTime=g_serviceParams.minDeltaTime,minPath=g_serviceParams.minPath,currentInnerPos=g_parent.getInnerStripPos(),deltaTime=jQuery.now()-g_temp.lastTime,deltaPos=currentInnerPos-g_temp.lastPortionPos;deltaTime<minDeltaTime&&g_temp.lastDeltaTime>0&&(deltaTime=g_temp.lastDeltaTime,deltaPos=g_temp.lastDeltaPos+deltaPos),deltaTime<minDeltaTime&&(deltaTime=minDeltaTime);var dir=deltaPos>0?1:-1,speed=0;deltaTime>0&&(speed=deltaPos/deltaTime);var path=speed*speed/(2*slowFactor)*dir;Math.abs(path)<=minPath&&(path=0);var innerStripPos=g_parent.getInnerStripPos(),newPos=innerStripPos+path,correctPos=g_parent.fixInnerStripLimits(newPos),objLimits=g_parent.getInnerStripLimits(),limitsBreakAddition=g_serviceParams.limitsBreakAddition,doQueue=!1,returnPos=correctPos;if(newPos>objLimits.maxPos&&(doQueue=!0,correctPos=limitsBreakAddition,newPos<limitsBreakAddition&&(correctPos=newPos)),newPos<objLimits.minPos){doQueue=!0;var maxStopPos=objLimits.minPos-limitsBreakAddition;correctPos=maxStopPos,newPos>maxStopPos&&(correctPos=newPos)}var correctPath=correctPos-innerStripPos,animateSpeed=Math.abs(Math.round(speed/slowFactor));if(0!=path&&(animateSpeed=animateSpeed*correctPath/path),innerStripPos!=correctPos){var animateProps={left:correctPos+"px"};!0==g_isVertical&&(animateProps={top:correctPos+"px"}),g_objStripInner.animate(animateProps,{duration:animateSpeed,easing:g_serviceParams.animationEasing,queue:!0,progress:onAnimateProgress})}if(!0==doQueue){var returnAnimateSpeed=g_serviceParams.returnAnimateSpeed,returnAnimateProps={left:returnPos+"px"};!0==g_isVertical&&(returnAnimateProps={top:returnPos+"px"}),g_objStripInner.animate(returnAnimateProps,{duration:returnAnimateSpeed,easing:g_serviceParams.returnAnimationEasing,queue:!0,progress:onAnimateProgress})}}function onAnimateProgress(){g_temp.lastPos=g_parent.getInnerStripPos(),g_parent.triggerStripMoveEvent()}function startStripTouchLoop(){if(!0==g_temp.loop_active)return!0;g_temp.loop_active=!0,g_temp.handle=setInterval(storeTouchPortionData,10)}function endStripTouchLoop(event){if(!1==g_temp.loop_active)return!0;if(event){var pagePos=getMouseOrientPosition(event);continueTouchMotion(pagePos)}g_temp.loop_active=!1,g_temp.handle=clearInterval(g_temp.handle)}function onTouchEnd(event){return!1==g_temp.isControlEnabled||((g_temp.buttonReleaseTime=jQuery.now(),!1==g_temp.touch_active)?(endStripTouchLoop(event),!0):void(event.preventDefault(),g_temp.touch_active=!1,endStripTouchLoop(event),g_objStrip.removeClass("ug-dragging")))}function onTouchStart(event){if(!1==g_temp.isControlEnabled)return!0;event.preventDefault(),g_temp.touch_active=!0;var pagePos=getMouseOrientPosition(event);g_objStripInner.stop(!0),storeInitTouchValues(pagePos),startStripTouchLoop(),g_objStrip.addClass("ug-dragging")}function onTouchMove(event){if(!1==g_temp.isControlEnabled|| !1==g_temp.touch_active)return!0;if(event.preventDefault(),0==event.buttons)return g_temp.touch_active=!1,endStripTouchLoop(event),!0;var pagePos=getMouseOrientPosition(event);g_temp.lastPos=g_parent.getInnerStripPos(),handleStripDrag(pagePos),storeTouchPortionData()}function initEvents(){g_objStrip.bind("mousedown touchstart",onTouchStart),jQuery(window).add("body").bind("mouseup touchend",onTouchEnd),jQuery("body").bind("mousemove touchmove",onTouchMove)}this.enable=function(){g_temp.isControlEnabled=!0},this.disable=function(){g_temp.isControlEnabled=!1},this.init=function(a){g_parent=a,g_objects=a.getObjects(),g_gallery=g_objects.g_gallery,g_objGallery=g_objects.g_objGallery,g_objStrip=g_objects.g_objStrip,g_objStripInner=g_objects.g_objStripInner,g_options=g_objects.g_options,g_isVertical=g_objects.isVertical,setServiceParams(),initEvents()},this.isSignificantPassed=function(){var a=getActionVars();return a.passedTime>300||a.passedDistanceAbs>30},this.isTouchActive=function(){return!0==g_temp.touch_active|| !0==g_objStripInner.is(":animated")||getActionVars().lastActiveTime<50},this.destroy=function(){g_objStrip.unbind("mousedown"),g_objStrip.unbind("touchstart"),jQuery(window).add("body").unbind("mouseup").unbind("touchend"),jQuery("body").unbind("mousemove").unbind("touchmove")}}function UGPanelsBase(){var g_temp,g_panel,g_objPanel,g_options,g_objThis,g_objHandle,g_objGallery,g_gallery=new UniteGalleryMain,t=this,g_functions=new UGFunctions;function placePanelAnimation(panelDest,functionOnComplete){switch(g_temp.orientation){case"right":case"left":var objCss={left:panelDest+"px"};break;case"top":case"bottom":var objCss={top:panelDest+"px"}}g_objPanel.stop(!0).animate(objCss,{duration:300,easing:"easeInOutQuad",queue:!1,complete:function(){functionOnComplete&&functionOnComplete()}})}function placePanelNoAnimation(panelDest){switch(g_temp.orientation){case"right":case"left":g_functions.placeElement(g_objPanel,panelDest,null);break;case"top":case"bottom":g_functions.placeElement(g_objPanel,null,panelDest)}}function onPanelSlideFinish(){g_objThis.trigger(g_panel.events.FINISH_MOVE)}this.init=function(a,b,c,d,e){g_temp=b,g_panel=c,g_gallery=a,g_options=d,g_objThis=e,g_objGallery=jQuery(g_gallery)},this.setHtml=function(b){if(g_objPanel=b,"strip"==g_temp.panelType)var a=g_options.strippanel_enable_handle;else var a=g_options.gridpanel_enable_handle;if(!0==a&&((g_objHandle=new UGPanelHandle).init(g_panel,g_objPanel,g_options,g_temp.panelType,g_gallery),g_objHandle.setHtml()),!0===g_temp.isDisabledAtStart){var c="<div class='ug-overlay-disabled'></div>";g_objPanel.append(c),setTimeout(function(){g_objPanel.children(".ug-overlay-disabled").hide()},g_temp.disabledAtStartTimeout)}},this.placeElements=function(){g_objHandle&&g_objHandle.placeHandle()},this.initEvents=function(){g_objHandle&&(g_objHandle.initEvents(),g_objGallery.on(g_gallery.events.SLIDER_ACTION_START,function(){g_objHandle.hideHandle()}),g_objGallery.on(g_gallery.events.SLIDER_ACTION_END,function(){g_objHandle.showHandle()}))},this.destroy=function(){g_objHandle&&(g_objHandle.destroy(),g_objGallery.off(g_gallery.events.SLIDER_ACTION_START),g_objGallery.off(g_gallery.events.SLIDER_ACTION_END))},this.openPanel=function(a){if(!a)var a=!1;if(g_objPanel.is(":animated")|| !1==g_temp.isClosed)return!1;g_temp.isClosed=!1,g_objThis.trigger(g_panel.events.OPEN_PANEL),!1===a?placePanelAnimation(g_temp.originalPos,onPanelSlideFinish):(placePanelNoAnimation(g_temp.originalPos),onPanelSlideFinish())},this.closePanel=function(a){if(!a)var a=!1;if(g_objPanel.is(":animated")|| !0==g_temp.isClosed)return!1;var b=t.getClosedPanelDest();g_temp.isClosed=!0,g_objThis.trigger(g_panel.events.CLOSE_PANEL),!1===a?placePanelAnimation(b,onPanelSlideFinish):(placePanelNoAnimation(b),onPanelSlideFinish())},this.setClosedState=function(a){g_temp.originalPos=a,g_objThis.trigger(g_panel.events.CLOSE_PANEL),g_temp.isClosed=!0},this.setOpenedState=function(a){g_objThis.trigger(g_panel.events.OPEN_PANEL),g_temp.isClosed=!1},this.getClosedPanelDest=function(){var a,b=g_functions.getElementSize(g_objPanel);switch(g_temp.orientation){case"left":g_temp.originalPos=b.left,a=-g_temp.panelWidth;break;case"right":g_temp.originalPos=b.left;var c=g_gallery.getSize();a=c.width;break;case"top":g_temp.originalPos=b.top,a=-g_temp.panelHeight;break;case"bottom":g_temp.originalPos=b.top;var c=g_gallery.getSize();a=c.height}return a},this.isPanelClosed=function(){return g_temp.isClosed},this.setDisabledAtStart=function(a){if(a<=0)return!1;g_temp.isDisabledAtStart=!0,g_temp.disabledAtStartTimeout=a}}function UGPanelHandle(){var g_objPanel,g_panel,g_objHandleTip,g_functions=new UGFunctions,g_options={panel_handle_align:"top",panel_handle_offset:0,panel_handle_skin:0};function removeHoverState(){g_objHandleTip.removeClass("ug-button-hover")}function setClosedState(){g_objHandleTip.addClass("ug-button-closed")}function removeClosedState(){g_objHandleTip.removeClass("ug-button-closed")}function onHandleClick(event){if(event.stopPropagation(),event.stopImmediatePropagation(),!1==g_functions.validateClickTouchstartEvent(event.type))return!0;g_panel.isPanelClosed()?g_panel.openPanel():g_panel.closePanel()}function checkAndFixAlign(){var orientation=g_panel.getOrientation();switch(orientation){case"right":case"left":"top"!=g_options.panel_handle_align&&"bottom"!=g_options.panel_handle_align&&(g_options.panel_handle_align="top");break;case"bottom":"left"!=g_options.panel_handle_align&&"right"!=g_options.panel_handle_align&&(g_options.panel_handle_align="left");break;case"top":"left"!=g_options.panel_handle_align&&"right"!=g_options.panel_handle_align&&(g_options.panel_handle_align="right")}}this.init=function(c,d,a,b,e){switch(g_panel=c,g_objPanel=d,b){case"grid":g_options.panel_handle_align=a.gridpanel_handle_align,g_options.panel_handle_offset=a.gridpanel_handle_offset,g_options.panel_handle_skin=a.gridpanel_handle_skin;break;case"strip":g_options.panel_handle_align=a.strippanel_handle_align,g_options.panel_handle_offset=a.strippanel_handle_offset,g_options.panel_handle_skin=a.strippanel_handle_skin;break;default:throw new Error("Panel handle error: wrong panel type: "+b)}var f=e.getOptions().gallery_skin;""==g_options.panel_handle_skin&&(g_options.panel_handle_skin=f)},this.setHtml=function(){var b=g_panel.getOrientation(),a="ug-panel-handle-tip";switch(b){case"right":a+=" ug-handle-tip-left";break;case"left":a+=" ug-handle-tip-right";break;case"bottom":a+=" ug-handle-tip-top";break;case"top":a+=" ug-handle-tip-bottom"}g_objPanel.append("<div class='"+a+" ug-skin-"+g_options.panel_handle_skin+"'></div>"),g_objHandleTip=g_objPanel.children(".ug-panel-handle-tip")},this.initEvents=function(){g_functions.addClassOnHover(g_objHandleTip),g_objHandleTip.bind("click touchstart",onHandleClick),jQuery(g_panel).on(g_panel.events.OPEN_PANEL,function(){removeHoverState(),removeClosedState()}),jQuery(g_panel).on(g_panel.events.CLOSE_PANEL,function(){removeHoverState(),setClosedState()})},this.destroy=function(){g_functions.destroyButton(g_objHandleTip),jQuery(g_panel).off(g_panel.events.OPEN_PANEL),jQuery(g_panel).off(g_panel.events.CLOSE_PANEL)},this.placeHandle=function(){var a=g_functions.getElementSize(g_objHandleTip);checkAndFixAlign();var b=g_panel.getOrientation();switch(b){case"left":g_functions.placeElement(g_objHandleTip,"right",g_options.panel_handle_align,-a.width);break;case"right":g_functions.placeElement(g_objHandleTip,-a.width,g_options.panel_handle_align,0,g_options.panel_handle_offset);break;case"top":g_functions.placeElement(g_objHandleTip,g_options.panel_handle_align,"bottom",g_options.panel_handle_offset,-a.height);break;case"bottom":g_functions.placeElement(g_objHandleTip,g_options.panel_handle_align,"top",g_options.panel_handle_offset,-a.height);break;default:throw new Error("Wrong panel orientation: "+b)}},this.hideHandle=function(){!0==g_objHandleTip.is(":visible")&&g_objHandleTip.hide()},this.showHandle=function(){!1==g_objHandleTip.is(":visible")&&g_objHandleTip.show()}}function UGStripPanel(){var g_objButtonNext,g_objButtonPrev,g_objGallery,g_objWrapper,g_objPanel,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_objStrip=new UGThumbsStrip,g_panelBase=new UGPanelsBase;this.events={FINISH_MOVE:"gridpanel_move_finish",OPEN_PANEL:"open_panel",CLOSE_PANEL:"close_panel"};var g_options={strippanel_vertical_type:!1,strippanel_padding_top:8,strippanel_padding_bottom:8,strippanel_padding_left:0,strippanel_padding_right:0,strippanel_enable_buttons:!0,strippanel_buttons_skin:"",strippanel_padding_buttons:2,strippanel_buttons_role:"scroll_strip",strippanel_enable_handle:!0,strippanel_handle_align:"top",strippanel_handle_offset:0,strippanel_handle_skin:"",strippanel_background_color:""},g_defaults_vertical={strip_vertical_type:!0,strippanel_padding_left:8,strippanel_padding_right:8,strippanel_padding_top:0,strippanel_padding_bottom:0},g_defaults_no_buttons={strippanel_padding_left:8,strippanel_padding_right:8,strippanel_padding_top:8,strippanel_padding_bottom:8},g_temp={panelType:"strip",panelWidth:0,panelHeight:0,isEventsInited:!1,isClosed:!1,orientation:null,originalPos:null,isFirstRun:!0};function initPanel(gallery,customOptions){g_objGallery=jQuery(g_gallery=gallery);var repeatCustomOptions=!1;!0==(g_options=jQuery.extend(g_options,customOptions)).strippanel_vertical_type&&(g_options=jQuery.extend(g_options,g_defaults_vertical),repeatCustomOptions=!0),!1==g_options.strippanel_enable_buttons&&(g_options=jQuery.extend(g_options,g_defaults_no_buttons),repeatCustomOptions=!0),!0==repeatCustomOptions&&(g_options=jQuery.extend(g_options,customOptions));var globalSkin=g_gallery.getOptions().gallery_skin;""==g_options.strippanel_buttons_skin&&(g_options.strippanel_buttons_skin=globalSkin),g_objWrapper=g_gallery.getElement(),g_panelBase.init(g_gallery,g_temp,t,g_options,g_objThis),(g_objStrip=new UGThumbsStrip).init(g_gallery,g_options)}function validatePanelBeforeRun(){if(!1==g_options.strippanel_vertical_type){if(0==g_temp.panelWidth)throw new Error("Strip panel error: The width not set, please set width")}else if(0==g_temp.panelHeight)throw new Error("Strip panel error: The height not set, please set height");if(null==g_temp.orientation)throw new Error("Wrong orientation, please set panel orientation before run");return!0}function runPanel(){if(!0==g_temp.isFirstRun&& !1==validatePanelBeforeRun())return!1;g_objStrip.run(),setElementsSize(),placeElements(),initEvents(),g_temp.isFirstRun=!1,checkSideButtons()}function setPanelHtml(parentContainer){if(!parentContainer)var parentContainer=g_objWrapper;if(parentContainer.append("<div class='ug-strip-panel'></div>"),g_objPanel=parentContainer.children(".ug-strip-panel"),!0==g_options.strippanel_enable_buttons){var arrowPrevClass="ug-strip-arrow-left",arrowNextClass="ug-strip-arrow-right";!0==g_options.strippanel_vertical_type&&(arrowPrevClass="ug-strip-arrow-up",arrowNextClass="ug-strip-arrow-down"),g_objPanel.append("<div class='ug-strip-arrow "+arrowPrevClass+" ug-skin-"+g_options.strippanel_buttons_skin+"'><div class='ug-strip-arrow-tip'></div></div>"),g_objPanel.append("<div class='ug-strip-arrow "+arrowNextClass+" ug-skin-"+g_options.strippanel_buttons_skin+"'><div class='ug-strip-arrow-tip'></div></div>")}g_panelBase.setHtml(g_objPanel),g_objStrip.setHtml(g_objPanel),!0==g_options.strippanel_enable_buttons&&(g_objButtonPrev=g_objPanel.children("."+arrowPrevClass),g_objButtonNext=g_objPanel.children("."+arrowNextClass)),setHtmlProperties()}function setHtmlProperties(){""!=g_options.strippanel_background_color&&g_objPanel.css("background-color",g_options.strippanel_background_color)}function setElementsSize_hor(){var stripHeight=g_objStrip.getHeight(),panelWidth=g_temp.panelWidth;if(g_objButtonNext){g_objButtonPrev.height(stripHeight),g_objButtonNext.height(stripHeight);var prevTip=g_objButtonPrev.children(".ug-strip-arrow-tip");g_functions.placeElement(prevTip,"center","middle");var nextTip=g_objButtonNext.children(".ug-strip-arrow-tip");g_functions.placeElement(nextTip,"center","middle")}var panelHeight=stripHeight+g_options.strippanel_padding_top+g_options.strippanel_padding_bottom;g_objPanel.width(panelWidth),g_objPanel.height(panelHeight),g_temp.panelHeight=panelHeight;var stripWidth=panelWidth-g_options.strippanel_padding_left-g_options.strippanel_padding_right;g_objButtonNext&&(stripWidth=stripWidth-2*g_objButtonNext.outerWidth()-2*g_options.strippanel_padding_buttons),g_objStrip.resize(stripWidth)}function setElementsSize_vert(){var stripWidth=g_objStrip.getWidth(),panelHeight=g_temp.panelHeight;if(g_objButtonNext){g_objButtonPrev.width(stripWidth),g_objButtonNext.width(stripWidth);var prevTip=g_objButtonPrev.children(".ug-strip-arrow-tip");g_functions.placeElement(prevTip,"center","middle");var nextTip=g_objButtonNext.children(".ug-strip-arrow-tip");g_functions.placeElement(nextTip,"center","middle")}var panelWidth=stripWidth+g_options.strippanel_padding_left+g_options.strippanel_padding_right;g_objPanel.width(panelWidth),g_objPanel.height(panelHeight),g_temp.panelWidth=panelWidth;var stripHeight=panelHeight-g_options.strippanel_padding_top-g_options.strippanel_padding_bottom;g_objButtonNext&&(stripHeight=stripHeight-2*g_objButtonNext.outerHeight()-2*g_options.strippanel_padding_buttons),g_objStrip.resize(stripHeight)}function setElementsSize(){!1==g_options.strippanel_vertical_type?setElementsSize_hor():setElementsSize_vert()}function placeElements_hor(){g_objButtonNext&&(g_functions.placeElement(g_objButtonPrev,"left","top",g_options.strippanel_padding_left,g_options.strippanel_padding_top),g_functions.placeElement(g_objButtonNext,"right","top",g_options.strippanel_padding_right,g_options.strippanel_padding_top));var stripX=g_options.strippanel_padding_left;g_objButtonNext&&(stripX+=g_objButtonNext.outerWidth()+g_options.strippanel_padding_buttons),g_objStrip.setPosition(stripX,g_options.strippanel_padding_top)}function placeElements_vert(){g_objButtonNext&&(g_functions.placeElement(g_objButtonPrev,"left","top",g_options.strippanel_padding_left,g_options.strippanel_padding_top),g_functions.placeElement(g_objButtonNext,"left","bottom",g_options.strippanel_padding_left,g_options.strippanel_padding_bottom));var stripY=g_options.strippanel_padding_top;g_objButtonNext&&(stripY+=g_objButtonNext.outerHeight()+g_options.strippanel_padding_buttons),g_objStrip.setPosition(g_options.strippanel_padding_left,stripY)}function placeElements(){!1==g_options.strippanel_vertical_type?placeElements_hor():placeElements_vert(),g_panelBase.placeElements()}function onNextButtonClick(objButton){if(g_functions.isButtonDisabled(objButton))return!0;"advance_item"==g_options.strippanel_buttons_role?g_gallery.nextItem():g_objStrip.scrollForeward()}function onPrevButtonClick(objButton){if(g_functions.isButtonDisabled(objButton))return!0;"advance_item"==g_options.strippanel_buttons_role?g_gallery.prevItem():g_objStrip.scrollBack()}function checkSideButtons(){if(!g_objButtonNext)return!0;if(!1==g_objStrip.isMoveEnabled())return g_functions.disableButton(g_objButtonPrev),g_functions.disableButton(g_objButtonNext),!0;var limits=g_objStrip.getInnerStripLimits(),pos=g_objStrip.getInnerStripPos();pos>=limits.maxPos?g_functions.disableButton(g_objButtonPrev):g_functions.enableButton(g_objButtonPrev),pos<=limits.minPos?g_functions.disableButton(g_objButtonNext):g_functions.enableButton(g_objButtonNext)}function onStripMove(){checkSideButtons()}function onItemChange(){g_gallery.isLastItem()?g_functions.disableButton(g_objButtonNext):g_functions.enableButton(g_objButtonNext),g_gallery.isFirstItem()?g_functions.disableButton(g_objButtonPrev):g_functions.enableButton(g_objButtonPrev)}function initEvents(){if(!0==g_temp.isEventsInited)return!1;g_temp.isEventsInited=!0,g_objButtonNext&&((g_functions.addClassOnHover(g_objButtonNext,"ug-button-hover"),g_functions.addClassOnHover(g_objButtonPrev,"ug-button-hover"),g_functions.setButtonOnClick(g_objButtonPrev,onPrevButtonClick),g_functions.setButtonOnClick(g_objButtonNext,onNextButtonClick),"advance_item"!=g_options.strippanel_buttons_role)?(jQuery(g_objStrip).on(g_objStrip.events.STRIP_MOVE,onStripMove),jQuery(g_objStrip).on(g_objStrip.events.INNER_SIZE_CHANGE,checkSideButtons),g_objGallery.on(g_gallery.events.SIZE_CHANGE,checkSideButtons)):!1==g_gallery.getOptions().gallery_carousel&&jQuery(g_gallery).on(g_gallery.events.ITEM_CHANGE,onItemChange)),g_panelBase.initEvents()}this.destroy=function(){g_objButtonNext&&(g_functions.destroyButton(g_objButtonNext),g_functions.destroyButton(g_objButtonPrev),jQuery(g_objStrip).off(g_objStrip.events.STRIP_MOVE),jQuery(g_gallery).off(g_gallery.events.ITEM_CHANGE),jQuery(g_gallery).off(g_gallery.events.SIZE_CHANGE)),g_panelBase.destroy(),g_objStrip.destroy()},this.getOrientation=function(){return g_temp.orientation},this.setOrientation=function(a){g_temp.orientation=a},this.init=function(a,b){initPanel(a,b)},this.run=function(){runPanel()},this.setHtml=function(a){setPanelHtml(a)},this.getElement=function(){return g_objPanel},this.getSize=function(){return g_functions.getElementSize(g_objPanel)},this.setWidth=function(a){g_temp.panelWidth=a},this.setHeight=function(a){g_temp.panelHeight=a},this.resize=function(a){t.setWidth(a),setElementsSize(),placeElements()},this.__________Functions_From_Base_____=function(){},this.isPanelClosed=function(){return g_panelBase.isPanelClosed()},this.getClosedPanelDest=function(){return g_panelBase.getClosedPanelDest()},this.openPanel=function(a){g_panelBase.openPanel(a)},this.closePanel=function(a){g_panelBase.closePanel(a)},this.setOpenedState=function(a){g_panelBase.setOpenedState(a)},this.setClosedState=function(a){g_panelBase.setClosedState(a)},this.setCustomThumbs=function(a){g_objStrip.setCustomThumbs(a)},this.setDisabledAtStart=function(a){g_panelBase.setDisabledAtStart(a)}}function UGGridPanel(){var g_objArrowNext,g_objArrowPrev,g_objWrapper,g_objPanel,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_objGrid=new UGThumbsGrid,g_panelBase=new UGPanelsBase;this.events={FINISH_MOVE:"gridpanel_move_finish",OPEN_PANEL:"open_panel",CLOSE_PANEL:"close_panel"};var g_options={gridpanel_vertical_scroll:!0,gridpanel_grid_align:"middle",gridpanel_padding_border_top:10,gridpanel_padding_border_bottom:4,gridpanel_padding_border_left:10,gridpanel_padding_border_right:10,gridpanel_arrows_skin:"",gridpanel_arrows_align_vert:"middle",gridpanel_arrows_padding_vert:4,gridpanel_arrows_align_hor:"center",gridpanel_arrows_padding_hor:10,gridpanel_space_between_arrows:20,gridpanel_arrows_always_on:!1,gridpanel_enable_handle:!0,gridpanel_handle_align:"top",gridpanel_handle_offset:0,gridpanel_handle_skin:"",gridpanel_background_color:""},g_defaultsVertical={gridpanel_grid_align:"middle",gridpanel_padding_border_top:2,gridpanel_padding_border_bottom:2},g_defaultsHorType={gridpanel_grid_align:"center"},g_temp={panelType:"grid",isHorType:!1,arrowsVisible:!1,panelHeight:0,panelWidth:0,originalPosX:null,isEventsInited:!1,isClosed:!1,orientation:null};function initGridPanel(gallery,customOptions){g_gallery=gallery,validateOrientation(),customOptions&&customOptions.vertical_scroll&&(g_options.gridpanel_vertical_scroll=customOptions.vertical_scroll),g_options=jQuery.extend(g_options,customOptions),!0==g_temp.isHorType?(g_options=jQuery.extend(g_options,g_defaultsHorType),g_options=jQuery.extend(g_options,customOptions)):!0==g_options.gridpanel_vertical_scroll&&(g_options=jQuery.extend(g_options,g_defaultsVertical),g_options=jQuery.extend(g_options,customOptions),g_options.grid_panes_direction="bottom");var globalSkin=g_gallery.getOptions().gallery_skin;""==g_options.gridpanel_arrows_skin&&(g_options.gridpanel_arrows_skin=globalSkin),g_objWrapper=gallery.getObjects().g_objWrapper,g_panelBase.init(g_gallery,g_temp,t,g_options,g_objThis),(g_objGrid=new UGThumbsGrid).init(g_gallery,g_options)}function validateOrientation(){if(null==g_temp.orientation)throw new Error("Wrong orientation, please set panel orientation before run")}function runPanel(){validateOrientation(),processOptions(),g_objGrid.run(),setArrows(),setPanelSize(),placeElements(),initEvents()}function setHtmlPanel(){g_objWrapper.append("<div class='ug-grid-panel'></div>"),g_objPanel=g_objWrapper.children(".ug-grid-panel"),g_temp.isHorType?(g_objPanel.append("<div class='grid-arrow grid-arrow-left-hortype ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objPanel.append("<div class='grid-arrow grid-arrow-right-hortype ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objArrowPrev=g_objPanel.children(".grid-arrow-left-hortype"),g_objArrowNext=g_objPanel.children(".grid-arrow-right-hortype")):!1==g_options.gridpanel_vertical_scroll?(g_objPanel.append("<div class='grid-arrow grid-arrow-left ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objPanel.append("<div class='grid-arrow grid-arrow-right ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objArrowPrev=g_objPanel.children(".grid-arrow-left"),g_objArrowNext=g_objPanel.children(".grid-arrow-right")):(g_objPanel.append("<div class='grid-arrow grid-arrow-up ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objPanel.append("<div class='grid-arrow grid-arrow-down ug-skin-"+g_options.gridpanel_arrows_skin+"'></div>"),g_objArrowPrev=g_objPanel.children(".grid-arrow-up"),g_objArrowNext=g_objPanel.children(".grid-arrow-down")),g_panelBase.setHtml(g_objPanel),g_objArrowPrev.fadeTo(0,0),g_objArrowNext.fadeTo(0,0),g_objGrid.setHtml(g_objPanel),setHtmlProperties()}function setHtmlProperties(){""!=g_options.gridpanel_background_color&&g_objPanel.css("background-color",g_options.gridpanel_background_color)}function processOptions(){"center"==g_options.gridpanel_grid_align&&(g_options.gridpanel_grid_align="middle")}function getGridMaxHeight(){var spaceTaken=g_options.gridpanel_padding_border_top+g_options.gridpanel_padding_border_bottom,maxGridHeight=g_temp.panelHeight-spaceTaken;if(!1==g_options.gridpanel_arrows_always_on&&1==g_objGrid.getNumPanesEstimationByHeight(maxGridHeight))return maxGridHeight;var spaceTaken=g_functions.getElementSize(g_objArrowNext).height+g_options.gridpanel_arrows_padding_vert;return!0==g_options.gridpanel_vertical_scroll&&(spaceTaken*=2),spaceTaken+=g_options.gridpanel_padding_border_top+g_options.gridpanel_padding_border_bottom,maxGridHeight=g_temp.panelHeight-spaceTaken}function getGridMaxWidth(){var spaceTaken=g_options.gridpanel_padding_border_left+g_options.gridpanel_padding_border_right,maxGridWidth=g_temp.panelWidth-spaceTaken;if(!1==g_options.gridpanel_arrows_always_on&&1==g_objGrid.getNumPanesEstimationByWidth(maxGridWidth))return maxGridWidth;var arrowsWidth=g_functions.getElementSize(g_objArrowNext).width;return spaceTaken+=(arrowsWidth+g_options.gridpanel_arrows_padding_hor)*2,maxGridWidth=g_temp.panelWidth-spaceTaken}function setArrows(){var showArrows=!1;!0==g_options.gridpanel_arrows_always_on?showArrows=!0:g_objGrid.getNumPanes()>1&&(showArrows=!0),!0==showArrows?(g_objArrowNext.show().fadeTo(0,1),g_objArrowPrev.show().fadeTo(0,1),g_temp.arrowsVisible=!0):(g_objArrowNext.hide(),g_objArrowPrev.hide(),g_temp.arrowsVisible=!1)}function setPanelSize(){var gridSize=g_objGrid.getSize();!0==g_temp.isHorType?g_temp.panelHeight=gridSize.height+g_options.gridpanel_padding_border_top+g_options.gridpanel_padding_border_bottom:g_temp.panelWidth=gridSize.width+g_options.gridpanel_padding_border_left+g_options.gridpanel_padding_border_right,g_functions.setElementSize(g_objPanel,g_temp.panelWidth,g_temp.panelHeight)}function initEvents(){if(!0==g_temp.isEventsInited)return!1;g_temp.isEventsInited=!0,g_objArrowPrev&&(g_functions.addClassOnHover(g_objArrowPrev),g_objGrid.attachPrevPaneButton(g_objArrowPrev)),g_objArrowNext&&(g_functions.addClassOnHover(g_objArrowNext),g_objGrid.attachNextPaneButton(g_objArrowNext)),g_panelBase.initEvents()}function getGridPaddingLeft(){return g_options.gridpanel_padding_border_left}function placeElements_noarrows(){var gridY=g_options.gridpanel_grid_align,gridPaddingY=0;switch(gridY){case"top":gridPaddingY=g_options.gridpanel_padding_border_top;break;case"bottom":gridPaddingY=g_options.gridpanel_padding_border_bottom}var gridPanelLeft=getGridPaddingLeft(),gridElement=g_objGrid.getElement();g_functions.placeElement(gridElement,gridPanelLeft,gridY,0,gridPaddingY)}function placeElementsVert_arrows(){var gridY,prevArrowY,nextArrowY,nextArrowPaddingY,objArrowSize=g_functions.getElementSize(g_objArrowPrev),objGridSize=g_objGrid.getSize();switch(g_options.gridpanel_grid_align){default:case"top":gridY=g_options.gridpanel_padding_border_top+objArrowSize.height+g_options.gridpanel_arrows_padding_vert;break;case"middle":gridY="middle";break;case"bottom":gridY=g_temp.panelHeight-objGridSize.height-objArrowSize.height-g_options.gridpanel_padding_border_bottom-g_options.gridpanel_arrows_padding_vert}var gridPanelLeft=getGridPaddingLeft(),gridElement=g_objGrid.getElement();g_functions.placeElement(gridElement,gridPanelLeft,gridY);var objGridSize=g_objGrid.getSize();switch(g_options.gridpanel_arrows_align_vert){default:case"center":case"middle":prevArrowY=(objGridSize.top-objArrowSize.height)/2,nextArrowY=objGridSize.bottom+(g_temp.panelHeight-objGridSize.bottom-objArrowSize.height)/2,nextArrowPaddingY=0;break;case"grid":prevArrowY=objGridSize.top-objArrowSize.height-g_options.gridpanel_arrows_padding_vert_vert,nextArrowY=objGridSize.bottom+g_options.gridpanel_arrows_padding_vert,nextArrowPaddingY=0;break;case"border":case"borders":prevArrowY=g_options.gridpanel_padding_border_top,nextArrowY="bottom",nextArrowPaddingY=g_options.gridpanel_padding_border_bottom}g_functions.placeElement(g_objArrowPrev,"center",prevArrowY),g_functions.placeElement(g_objArrowNext,"center",nextArrowY,0,nextArrowPaddingY)}function placeElementsVert(){!0==g_temp.arrowsVisible?placeElementsVert_arrows():placeElements_noarrows()}function placeElementsHor_arrows(){var arrowsY,prevArrowPadding,arrowsPaddingY,nextArrowPadding,objArrowSize=g_functions.getElementSize(g_objArrowPrev),objGridSize=g_objGrid.getSize(),gridY=g_options.gridpanel_padding_border_top;switch(g_options.gridpanel_grid_align){case"middle":switch(g_options.gridpanel_arrows_align_vert){default:var elementsHeight=objGridSize.height+g_options.gridpanel_arrows_padding_vert+objArrowSize.height;gridY=(g_temp.panelHeight-elementsHeight)/2;break;case"border":case"borders":gridY=(g_temp.panelHeight-objArrowSize.height-g_options.gridpanel_padding_border_bottom-objGridSize.height)/2}break;case"bottom":var elementsHeight=objGridSize.height+objArrowSize.height+g_options.gridpanel_arrows_padding_vert;gridY=g_temp.panelHeight-elementsHeight-g_options.gridpanel_padding_border_bottom}var gridElement=g_objGrid.getElement(),gridPanelLeft=getGridPaddingLeft();g_functions.placeElement(gridElement,gridPanelLeft,gridY);var objGridSize=g_objGrid.getSize();switch(g_options.gridpanel_arrows_align_vert){default:case"center":case"middle":arrowsY=objGridSize.bottom+(g_temp.panelHeight-objGridSize.bottom-objArrowSize.height)/2,arrowsPaddingY=0;break;case"grid":arrowsY=objGridSize.bottom+g_options.gridpanel_arrows_padding_vert,arrowsPaddingY=0;break;case"border":case"borders":arrowsY="bottom",arrowsPaddingY=g_options.gridpanel_padding_border_bottom}prevArrowPadding=-objArrowSize.width/2-g_options.gridpanel_space_between_arrows/2,g_functions.placeElement(g_objArrowPrev,"center",arrowsY,prevArrowPadding,arrowsPaddingY);var nextArrowPadding=Math.abs(prevArrowPadding);g_functions.placeElement(g_objArrowNext,"center",arrowsY,nextArrowPadding,arrowsPaddingY)}function placeElementsHor(){!0==g_temp.arrowsVisible?placeElementsHor_arrows():placeElements_noarrows()}function placeElementsHorType_arrows(){var gridX,prevArrowX,nextArrowX,arrowsY,objArrowSize=g_functions.getElementSize(g_objArrowPrev),objGridSize=g_objGrid.getSize();switch(g_options.gridpanel_grid_align){default:case"left":gridX=g_options.gridpanel_padding_border_left+g_options.gridpanel_arrows_padding_hor+objArrowSize.width;break;case"middle":case"center":gridX="center";break;case"right":gridX=g_temp.panelWidth-objGridSize.width-objArrowSize.width-g_options.gridpanel_padding_border_right-g_options.gridpanel_arrows_padding_hor}var gridElement=g_objGrid.getElement();switch(g_functions.placeElement(gridElement,gridX,g_options.gridpanel_padding_border_top),objGridSize=g_objGrid.getSize(),g_options.gridpanel_arrows_align_vert){default:case"center":case"middle":arrowsY=(objGridSize.height-objArrowSize.height)/2+objGridSize.top;break;case"top":arrowsY=g_options.gridpanel_padding_border_top+g_options.gridpanel_arrows_padding_vert;break;case"bottom":arrowsY=g_temp.panelHeight-g_options.gridpanel_padding_border_bottom-g_options.gridpanel_arrows_padding_vert-objArrowSize.height}switch(g_options.gridpanel_arrows_align_hor){default:case"borders":prevArrowX=g_options.gridpanel_padding_border_left,nextArrowX=g_temp.panelWidth-g_options.gridpanel_padding_border_right-objArrowSize.width;break;case"grid":prevArrowX=objGridSize.left-g_options.gridpanel_arrows_padding_hor-objArrowSize.width,nextArrowX=objGridSize.right+g_options.gridpanel_arrows_padding_hor;break;case"center":prevArrowX=(objGridSize.left-objArrowSize.width)/2,nextArrowX=objGridSize.right+(g_temp.panelWidth-objGridSize.right-objArrowSize.width)/2}g_functions.placeElement(g_objArrowPrev,prevArrowX,arrowsY),g_functions.placeElement(g_objArrowNext,nextArrowX,arrowsY)}function placeElementHorType_noarrows(){var gridX,objGridSize=g_objGrid.getSize();switch(g_options.gridpanel_grid_align){default:case"left":gridX=g_options.gridpanel_padding_border_left;break;case"middle":case"center":gridX="center";break;case"right":gridX=g_temp.panelWidth-objGridSize.width-g_options.gridpanel_padding_border_right}var gridElement=g_objGrid.getElement();g_functions.placeElement(gridElement,gridX,g_options.gridpanel_padding_border_top)}function placeElementsHorType(){!0==g_temp.arrowsVisible?placeElementsHorType_arrows():placeElementHorType_noarrows()}function placeElements(){!1==g_temp.isHorType?!0==g_options.gridpanel_vertical_scroll?placeElementsVert():placeElementsHor():placeElementsHorType(),g_panelBase.placeElements()}this.destroy=function(){g_objArrowPrev&&g_functions.destroyButton(g_objArrowPrev),g_objArrowNext&&g_functions.destroyButton(g_objArrowNext),g_panelBase.destroy(),g_objGrid.destroy()},this.getOrientation=function(){return g_temp.orientation},this.setOrientation=function(a){switch(g_temp.orientation=a,a){case"right":case"left":g_temp.isHorType=!1;break;case"top":case"bottom":g_temp.isHorType=!0;break;default:throw new Error("Wrong grid panel orientation: "+a)}},this.setHeight=function(a){if(!0==g_temp.isHorType)throw new Error("setHeight is not appliable to this orientatio ("+g_temp.orientation+"). Please use setWidth");g_temp.panelHeight=a;var b=getGridMaxHeight();g_objGrid.setMaxHeight(b)},this.setWidth=function(a){if(!1==g_temp.isHorType)throw new Error("setWidth is not appliable to this orientatio ("+g_temp.orientation+"). Please use setHeight");g_temp.panelWidth=a;var b=getGridMaxWidth();g_objGrid.setMaxWidth(b)},this.init=function(a,b){initGridPanel(a,b)},this.setHtml=function(){setHtmlPanel()},this.run=function(){runPanel()},this.getElement=function(){return g_objPanel},this.getSize=function(){return g_functions.getElementSize(g_objPanel)},this.__________Functions_From_Base_____=function(){},this.isPanelClosed=function(){return g_panelBase.isPanelClosed()},this.getClosedPanelDest=function(){return g_panelBase.getClosedPanelDest()},this.openPanel=function(a){g_panelBase.openPanel(a)},this.closePanel=function(a){g_panelBase.closePanel(a)},this.setOpenedState=function(a){g_panelBase.setOpenedState(a)},this.setClosedState=function(a){g_panelBase.setClosedState(a)},this.setDisabledAtStart=function(a){g_panelBase.setDisabledAtStart(a)}}function UGThumbsGrid(){var g_objGallery,g_objects,g_objWrapper,g_arrItems,g_objGrid,g_objInner,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_thumbs=new UGThumbsGeneral,g_tilesDesign=new UGTileDesign,g_options={grid_panes_direction:"left",grid_num_cols:2,grid_min_cols:2,grid_num_rows:2,grid_space_between_cols:10,grid_space_between_rows:10,grid_space_between_mobile:10,grid_transition_duration:300,grid_transition_easing:"easeInOutQuad",grid_carousel:!1,grid_padding:0,grid_vertical_scroll_ondrag:!1};this.events={PANE_CHANGE:"pane_change"};var g_temp={eventSizeChange:"thumb_size_change",isHorizontal:!1,isMaxHeight:!1,isMaxWidth:!1,gridHeight:0,gridWidth:0,innerWidth:0,innerHeight:0,numPanes:0,arrPanes:0,numThumbs:0,currentPane:0,numThumbsInPane:0,isNavigationVertical:!1,touchActive:!1,startScrollPos:0,isFirstTimeRun:!0,isTilesMode:!1,storedEventID:"thumbsgrid",tileMaxWidth:null,tileMaxHeight:null,spaceBetweenCols:null,spaceBetweenRows:null};function init(gallery,customOptions,isTilesMode){if(g_objects=gallery.getObjects(),g_gallery=gallery,g_gallery.attachThumbsPanel("grid",t),g_objGallery=jQuery(gallery),g_objWrapper=g_objects.g_objWrapper,g_arrItems=g_objects.g_arrItems,!0===isTilesMode&&(g_temp.isTilesMode=!0),g_temp.numThumbs=g_arrItems.length,setOptions(customOptions),!0==g_temp.isTilesMode){g_tilesDesign.setFixedMode(),g_tilesDesign.setApproveClickFunction(isApproveTileClick),g_tilesDesign.init(gallery,g_options);var options_td=g_tilesDesign.getOptions();g_temp.tileMaxHeight=options_td.tile_height,g_temp.tileMaxWidth=options_td.tile_width,g_thumbs=g_tilesDesign.getObjThumbs()}else customOptions.thumb_fixed_size=!0,g_thumbs.init(gallery,customOptions)}function setHtml(parentContainer){var objParent=g_objWrapper;parentContainer&&(objParent=parentContainer),objParent.append("<div class='ug-thumbs-grid'><div class='ug-thumbs-grid-inner'></div></div>"),g_objInner=(g_objGrid=objParent.children(".ug-thumbs-grid")).children(".ug-thumbs-grid-inner"),!0==g_temp.isTilesMode?g_tilesDesign.setHtml(g_objInner):g_thumbs.setHtmlThumbs(g_objInner)}function validateBeforeRun(){if(!1==g_temp.isHorizontal){if(0==g_temp.gridHeight)throw new Error("You must set height before run.")}else if(0==g_temp.gridWidth)throw new Error("You must set width before run.")}function run(){var selectedItem=g_gallery.getSelectedItem();if((validateBeforeRun(),!0==g_temp.isFirstTimeRun)?(initEvents(),!0==g_temp.isTilesMode?(initGridDynamicSize(),initSizeParams(),g_tilesDesign.run()):(g_thumbs.setHtmlProperties(),initSizeParams(),g_thumbs.loadThumbsImages())):!0==g_temp.isTilesMode&& !0==initGridDynamicSize()&&(initSizeParams(),g_tilesDesign.run()),positionThumbs(),!0==g_temp.isFirstTimeRun&&g_temp.isTilesMode){var objTiles=g_thumbs.getThumbs();objTiles.each(function(b,a){g_objWrapper.trigger(g_temp.eventSizeChange,jQuery(a))}),objTiles.fadeTo(0,1)}null!=selectedItem&&scrollToThumb(selectedItem.index),g_objThis.trigger(t.events.PANE_CHANGE,g_temp.currentPane),g_temp.isFirstTimeRun=!1}function getThumbsSize(){if(!0==g_temp.isTilesMode)var objThumbSize=g_tilesDesign.getGlobalTileSize();else var objThumbSize=g_thumbs.getGlobalThumbSize();return objThumbSize}function initGridDynamicSize(){if(!1==g_temp.isTilesMode)throw new Error("Dynamic size can be set only in tiles mode");var isChanged=!1,isMobile=g_gallery.isMobileMode(),spaceOld=g_temp.spaceBetweenCols;!0==isMobile?(g_temp.spaceBetweenCols=g_options.grid_space_between_mobile,g_temp.spaceBetweenRows=g_options.grid_space_between_mobile):(g_temp.spaceBetweenCols=g_options.grid_space_between_cols,g_temp.spaceBetweenRows=g_options.grid_space_between_rows),g_temp.spaceBetweenCols!=spaceOld&&(isChanged=!0);var lastThumbWidth=getThumbsSize().width,tileWidth=g_temp.tileMaxWidth;return g_functions.getNumItemsInSpace(g_temp.gridWidth,g_temp.tileMaxWidth,g_temp.spaceBetweenCols)<g_options.grid_min_cols&&(tileWidth=g_functions.getItemSizeInSpace(g_temp.gridWidth,g_options.grid_min_cols,g_temp.spaceBetweenCols)),g_tilesDesign.setTileSizeOptions(tileWidth),tileWidth!=lastThumbWidth&&(isChanged=!0),isChanged}function initSizeParamsHor(){var thumbsHeight=getThumbsSize().height,gridWidth=g_temp.gridWidth,gridHeight=g_options.grid_num_rows*thumbsHeight+(g_options.grid_num_rows-1)*g_temp.spaceBetweenRows+2*g_options.grid_padding;g_temp.gridHeight=gridHeight,g_functions.setElementSize(g_objGrid,gridWidth,gridHeight),g_functions.setElementSize(g_objInner,gridWidth,gridHeight),g_temp.innerWidth=gridWidth,g_temp.innerHeight=gridHeight}function initSizeParamsVert(){var thumbsWidth=getThumbsSize().width,gridWidth=g_options.grid_num_cols*thumbsWidth+(g_options.grid_num_cols-1)*g_temp.spaceBetweenCols+2*g_options.grid_padding,gridHeight=g_temp.gridHeight;g_temp.gridWidth=gridWidth,g_functions.setElementSize(g_objGrid,gridWidth,gridHeight),g_functions.setElementSize(g_objInner,gridWidth,gridHeight),g_temp.innerWidth=gridWidth,g_temp.innerHeight=gridHeight}function initSizeParams(){!1==g_temp.isHorizontal?initSizeParamsVert():initSizeParamsHor()}function scrollToThumb(thumbIndex){var paneIndex=getPaneIndexByThumbIndex(thumbIndex);if(-1==paneIndex)return!1;t.gotoPane(paneIndex,"scroll")}function setOptions(objOptions){g_options=jQuery.extend(g_options,objOptions),g_thumbs.setOptions(objOptions),g_temp.isNavigationVertical="top"==g_options.grid_panes_direction||"bottom"==g_options.grid_panes_direction,g_temp.spaceBetweenCols=g_options.grid_space_between_cols,g_temp.spaceBetweenRows=g_options.grid_space_between_rows}function positionThumb_hor(){var arrThumbs=g_objInner.children(".ug-thumb-wrapper"),posx=0,posy=0,counter=0,baseX=0,maxx=0,maxy=0;g_temp.innerWidth=0,g_temp.numPanes=1,g_temp.arrPanes=[],g_temp.numThumbsInPane=0,g_temp.arrPanes.push(baseX);var numThumbs=arrThumbs.length;for(i=0;i<numThumbs;i++){var objThumb=jQuery(arrThumbs[i]);g_functions.placeElement(objThumb,posx,posy);var thumbWidth=objThumb.outerWidth(),thumbHeight=objThumb.outerHeight();posx>maxx&&(maxx=posx);var endY=posy+thumbHeight;endY>maxy&&(maxy=endY);var endX=maxx+thumbWidth;endX>g_temp.innerWidth&&(g_temp.innerWidth=endX),posx+=thumbWidth+g_temp.spaceBetweenCols,++counter>=g_options.grid_num_cols&&(posy+=thumbHeight+g_temp.spaceBetweenRows,posx=baseX,counter=0),1==g_temp.numPanes&&g_temp.numThumbsInPane++,posy+thumbHeight>g_temp.gridHeight&&(posy=0,posx=baseX=g_temp.innerWidth+g_temp.spaceBetweenCols,counter=0,!0==g_temp.isMaxHeight&&1==g_temp.numPanes&&(g_temp.gridHeight=maxy,g_objGrid.height(g_temp.gridHeight)),i<numThumbs-1&&(g_temp.numPanes++,g_temp.arrPanes.push(baseX)))}g_objInner.width(g_temp.innerWidth),!0==g_temp.isMaxHeight&&1==g_temp.numPanes&&(g_temp.gridHeight=maxy,g_objGrid.height(maxy))}function positionThumb_vert(){var arrThumbs=g_objInner.children(".ug-thumb-wrapper"),posx=0,posy=0,maxy=0,counter=0,baseX=0,paneStartY=0;g_temp.innerWidth=0,g_temp.numPanes=1,g_temp.arrPanes=[],g_temp.numThumbsInPane=0,g_temp.arrPanes.push(baseX);var numThumbs=arrThumbs.length;for(i=0;i<numThumbs;i++){var objThumb=jQuery(arrThumbs[i]);g_functions.placeElement(objThumb,posx,posy);var thumbWidth=objThumb.outerWidth(),thumbHeight=objThumb.outerHeight();posx+=thumbWidth+g_temp.spaceBetweenCols;var endy=posy+thumbHeight;endy>maxy&&(maxy=endy),++counter>=g_options.grid_num_cols&&(posy+=thumbHeight+g_temp.spaceBetweenRows,posx=baseX,counter=0),1==g_temp.numPanes&&g_temp.numThumbsInPane++,endy=posy+thumbHeight;var paneMaxY=paneStartY+g_temp.gridHeight;endy>paneMaxY&&(!0==g_temp.isMaxHeight&&1==g_temp.numPanes&&(g_temp.gridHeight=maxy,g_objGrid.height(g_temp.gridHeight),paneMaxY=g_temp.gridHeight),paneStartY=posy=paneMaxY+g_temp.spaceBetweenRows,posx=baseX=0,counter=0,i<numThumbs-1&&(g_temp.numPanes++,g_temp.arrPanes.push(posy)))}g_objInner.height(maxy),g_temp.innerHeight=maxy,!0==g_temp.isMaxHeight&&1==g_temp.numPanes&&(g_temp.gridHeight=maxy,g_objGrid.height(maxy))}function positionThumb_hortype(){var arrThumbs=g_objInner.children(".ug-thumb-wrapper"),baseX=g_options.grid_padding,baseY=g_options.grid_padding,posy=baseY,posx=baseX,maxx=0,maxy=0,paneMaxY=0,gridMaxY=0,rowsCounter=0;g_temp.innerWidth=0,g_temp.numPanes=1,g_temp.arrPanes=[],g_temp.numThumbsInPane=0,g_temp.arrPanes.push(baseX-g_options.grid_padding);var numThumbs=arrThumbs.length;for(i=0;i<numThumbs;i++){var objThumb=jQuery(arrThumbs[i]),thumbWidth=objThumb.outerWidth(),thumbHeight=objThumb.outerHeight();posx-baseX+thumbWidth>g_temp.gridWidth&&(posy=0,++rowsCounter>=g_options.grid_num_rows?(rowsCounter=0,baseX=posx,posy=baseY,paneMaxY=0,1==g_temp.numPanes&&(g_temp.gridWidth=maxx+g_options.grid_padding,g_objGrid.width(g_temp.gridWidth),g_temp.gridHeight=gridMaxY+g_options.grid_padding,g_objGrid.height(g_temp.gridHeight)),g_temp.numPanes++,g_temp.arrPanes.push(baseX-g_options.grid_padding)):(posx=baseX,posy=paneMaxY+g_temp.spaceBetweenRows)),g_functions.placeElement(objThumb,posx,posy);var endX=posx+thumbWidth;endX>maxx&&(maxx=endX);var endY=posy+thumbHeight;endY>paneMaxY&&(paneMaxY=endY),endY>gridMaxY&&(gridMaxY=endY),endY>maxy&&(maxy=endY);var endX=maxx+thumbWidth;endX>g_temp.innerWidth&&(g_temp.innerWidth=endX),posx+=thumbWidth+g_temp.spaceBetweenCols,1==g_temp.numPanes&&g_temp.numThumbsInPane++}g_temp.innerWidth=maxx+g_options.grid_padding,g_temp.innerHeight=gridMaxY+g_options.grid_padding,g_objInner.width(g_temp.innerWidth),g_objInner.height(g_temp.innerHeight),1==g_temp.numPanes&&(g_temp.gridWidth=maxx+g_options.grid_padding,g_temp.gridHeight=gridMaxY+g_options.grid_padding,g_objGrid.width(g_temp.gridWidth),g_objGrid.height(g_temp.gridHeight))}function positionThumbs(){!1==g_temp.isHorizontal?g_temp.isNavigationVertical?positionThumb_vert():positionThumb_hor():positionThumb_hortype()}function validateThumbIndex(thumbIndex){if(thumbIndex<0||thumbIndex>=g_temp.numThumbs)throw new Error("Thumb not exists: "+thumbIndex);return!0}function validatePaneIndex(paneIndex){if(paneIndex>=g_temp.numPanes||paneIndex<0)throw new Error("Pane "+index+" doesn't exists.");return!0}function setInnerPos(pos){var objCss=getInnerPosObj(pos);if(!1==objCss)return!1;g_objInner.css(objCss)}function animateInnerTo(pos){var objCss=getInnerPosObj(pos);if(!1==objCss)return!1;g_objInner.stop(!0).animate(objCss,{duration:g_options.grid_transition_duration,easing:g_options.grid_transition_easing,queue:!1})}function animateToCurrentPane(){animateInnerTo(-g_temp.arrPanes[g_temp.currentPane])}function getPaneSize(){return!0==g_temp.isNavigationVertical?g_temp.gridHeight:g_temp.gridWidth}function getInnerPosObj(pos){var obj={};return!0==g_temp.isNavigationVertical?obj.top=pos+"px":obj.left=pos+"px",obj}function getInnerPos(){var objSize=g_functions.getElementSize(g_objInner);return!0==g_temp.isNavigationVertical?objSize.top:objSize.left}function getPaneIndexByThumbIndex(thumbIndex){return!1==validateThumbIndex(thumbIndex)?-1:Math.floor(thumbIndex/g_temp.numThumbsInPane)}function isSignificantPassed(){if(1==g_temp.numPanes)return!1;var objData=g_functions.getStoredEventData(g_temp.storedEventID),passedTime=objData.diffTime,passedDistanceAbs=Math.abs(getInnerPos()-objData.startInnerPos);return passedDistanceAbs>30||passedDistanceAbs>5&&passedTime>300}function isMovementValidForChange(){var objData=g_functions.getStoredEventData(g_temp.storedEventID),currentInnerPos=getInnerPos();diffPos=Math.abs(objData.startInnerPos-currentInnerPos);var breakSize=Math.round(3*getPaneSize()/8);return!!(diffPos>=breakSize||objData.diffTime<300&&diffPos>25)}function isApproveTileClick(){return 1==g_temp.numPanes||g_functions.isApproveStoredEventClick(g_temp.storedEventID,g_temp.isNavigationVertical)}function onThumbClick(event){if(!0==isSignificantPassed())return!0;var objThumb=jQuery(this),objItem=g_thumbs.getItemByThumb(objThumb);g_gallery.selectItem(objItem)}function onTouchStart(event){if(1==g_temp.numPanes|| !0==g_temp.touchActive)return!0;!1==g_temp.isTilesMode&&event.preventDefault(),g_temp.touchActive=!0;var addData={startInnerPos:getInnerPos()};g_functions.storeEventData(event,g_temp.storedEventID,addData)}function handleScrollTop(){return!1!=g_options.grid_vertical_scroll_ondrag&& !0!=g_temp.isNavigationVertical&&"vert"===g_functions.handleScrollTop(g_temp.storedEventID)}function onTouchMove(event){if(!1==g_temp.touchActive)return!0;event.preventDefault(),g_functions.updateStoredEventData(event,g_temp.storedEventID);var objData=g_functions.getStoredEventData(g_temp.storedEventID,g_temp.isNavigationVertical);if(handleScrollTop())return!0;var diff=objData.diffMousePos,innerPos=objData.startInnerPos+diff,direction=diff>0?"prev":"next",lastPaneSize=g_temp.arrPanes[g_temp.numPanes-1];!1==g_options.grid_carousel&&innerPos>0&&"prev"==direction&&(innerPos/=3),!1==g_options.grid_carousel&&innerPos< -lastPaneSize&&"next"==direction&&(innerPos=objData.startInnerPos+diff/3),setInnerPos(innerPos)}function onTouchEnd(event){if(!1==g_temp.touchActive)return!0;g_functions.updateStoredEventData(event,g_temp.storedEventID);var objData=g_functions.getStoredEventData(g_temp.storedEventID,g_temp.isNavigationVertical);if(g_temp.touchActive=!1,!1==isMovementValidForChange())return animateToCurrentPane(),!0;"next"==(getInnerPos()-objData.startInnerPos>0?"prev":"next")?!1==g_options.grid_carousel&&t.isLastPane()?animateToCurrentPane():t.nextPane():!1==g_options.grid_carousel&&t.isFirstPane()?animateToCurrentPane():t.prevPane()}function onItemChange(){var objItem=g_gallery.getSelectedItem();g_thumbs.setThumbSelected(objItem.objThumbWrapper),scrollToThumb(objItem.index)}function initEvents(){!1==g_temp.isTilesMode?(g_thumbs.initEvents(),g_objGrid.find(".ug-thumb-wrapper").on("click touchend",onThumbClick),g_objGallery.on(g_gallery.events.ITEM_CHANGE,onItemChange)):g_tilesDesign.initEvents(),g_objGrid.bind("mousedown touchstart",onTouchStart),jQuery("body").bind("mousemove touchmove",onTouchMove),jQuery(window).add("body").bind("mouseup touchend",onTouchEnd)}this.destroy=function(){if(!1==g_temp.isTilesMode){var a=g_objGrid.find(".ug-thumb-wrapper");a.off("click"),a.off("touchend"),g_objGallery.on(g_gallery.events.ITEM_CHANGE),g_thumbs.destroy()}else g_tilesDesign.destroy();g_objGrid.unbind("mousedown"),g_objGrid.unbind("touchstart"),jQuery("body").unbind("mousemove"),jQuery("body").unbind("touchmove"),jQuery(window).add("body").unbind("touchend"),jQuery(window).add("body").unbind("mouseup"),g_objThis.off(t.events.PANE_CHANGE)},this.__________EXTERNAL_GENERAL_________=function(){},this.setThumbUnselected=function(a){g_thumbs.setThumbUnselected(a)},this.isItemThumbVisible=function(a){return getPaneIndexByThumbIndex(a.index)==g_temp.currentPane},this.__________EXTERNAL_API_________=function(){},this.getNumPanesEstimationByHeight=function(c){if(!0==g_temp.isTilesMode)var a=g_options.tile_height;else var a=g_thumbs.getOptions().thumb_height;var b=Math.ceil(g_thumbs.getNumThumbs()/g_options.grid_num_cols);return Math.ceil((b*a+(b-1)*g_temp.spaceBetweenRows)/c)},this.getNumPanesEstimationByWidth=function(c){if(g_temp.isTilesMode)var a=g_options.tile_width;else var a=g_thumbs.getOptions().thumb_width;var b=Math.ceil(g_thumbs.getNumThumbs()/g_options.grid_num_rows);return Math.ceil((b*a+(b-1)*g_temp.spaceBetweenCols)/c)},this.getHeightEstimationByWidth=function(b){if(!1==g_temp.isTilesMode)throw new Error("This function works only with tiles mode");var e,c=g_thumbs.getNumThumbs(),d=g_functions.getNumItemsInSpace(b,g_options.tile_width,g_temp.spaceBetweenCols),a=Math.ceil(c/d);return a>g_options.grid_num_rows&&(a=g_options.grid_num_rows),g_functions.getSpaceByNumItems(a,g_options.tile_height,g_temp.spaceBetweenRows)+2*g_options.grid_padding},this.getElement=function(){return g_objGrid},this.getSize=function(){return g_functions.getElementSize(g_objGrid)},this.getNumPanes=function(){return g_temp.numPanes},this.isFirstPane=function(){return 0==g_temp.currentPane},this.isLastPane=function(){return g_temp.currentPane==g_temp.numPanes-1},this.getPaneInfo=function(){return{pane:g_temp.currentPane,total:g_temp.numPanes}},this.getPane=function(){return g_temp.currentPane},this.setWidth=function(a){g_temp.gridWidth=a,g_temp.isHorizontal=!0},this.setMaxWidth=function(a){g_temp.gridWidth=a,g_temp.isMaxWidth=!0,g_temp.isHorizontal=!0},this.setHeight=function(a){g_temp.gridHeight=a,g_temp.isHorizontal=!1},this.setMaxHeight=function(a){g_temp.gridHeight=a,g_temp.isMaxHeight=!0,g_temp.isHorizontal=!1},this.gotoPane=function(a,c){if(!1==validatePaneIndex(a)||a==g_temp.currentPane)return!1;var b=-g_temp.arrPanes[a];g_temp.currentPane=a,animateInnerTo(b),g_objThis.trigger(t.events.PANE_CHANGE,a)},this.nextPane=function(){var a=g_temp.currentPane+1;if(a>=g_temp.numPanes){if(!1==g_options.grid_carousel)return!0;a=0}t.gotoPane(a,"next")},this.prevPane=function(){var a=g_temp.currentPane-1;if(a<0&&(a=g_temp.numPanes-1,!1==g_options.grid_carousel))return!1;t.gotoPane(a,"prev")},this.attachNextPaneButton=function(a){if(g_functions.setButtonOnClick(a,t.nextPane),!0==g_options.grid_carousel)return!0;t.isLastPane()&&a.addClass("ug-button-disabled"),g_objThis.on(t.events.PANE_CHANGE,function(){t.isLastPane()?a.addClass("ug-button-disabled"):a.removeClass("ug-button-disabled")})},this.attachPrevPaneButton=function(a){if(g_functions.setButtonOnClick(a,t.prevPane),!0==g_options.grid_carousel)return!0;t.isFirstPane()&&a.addClass("ug-button-disabled"),g_objThis.on(t.events.PANE_CHANGE,function(){t.isFirstPane()?a.addClass("ug-button-disabled"):a.removeClass("ug-button-disabled")})},this.attachBullets=function(a){a.setActive(g_temp.currentPane),jQuery(a).on(a.events.BULLET_CLICK,function(c,b){t.gotoPane(b,"theme"),a.setActive(b)}),jQuery(t).on(t.events.PANE_CHANGE,function(c,b){a.setActive(b)})},this.getObjTileDesign=function(){return g_tilesDesign},this.init=function(a,b,c){init(a,b,c)},this.run=function(){run()},this.setHtml=function(a){setHtml(a)}}function UGTileDesign(){var g_objGallery,g_objParentWrapper,g_objWrapper,g_items,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_thumbs=new UGThumbsGeneral;this.resizemode={FULL:"full",WRAPPER_ONLY:"wrapper_only",VISIBLE_ELEMENTS:"visible_elements"},this.sizeby={GLOBAL_RATIO:"global_ratio",TILE_RATIO:"tile_ratio",IMAGE_RATIO:"image_ratio",CUSTOM:"custom"},this.events={TILE_CLICK:"tile_click"};var g_options={tile_width:250,tile_height:200,tile_size_by:t.sizeby.IMAGE_RATIO,tile_visible_before_image:!1,tile_enable_background:!0,tile_background_color:"#F0F0F0",tile_enable_border:!1,tile_border_width:3,tile_border_color:"#F0F0F0",tile_border_radius:0,tile_enable_outline:!1,tile_outline_color:"#8B8B8B",tile_enable_shadow:!1,tile_shadow_h:1,tile_shadow_v:1,tile_shadow_blur:3,tile_shadow_spread:2,tile_shadow_color:"#8B8B8B",tile_enable_action:!0,tile_as_link:!1,tile_link_newpage:!0,tile_enable_overlay:!0,tile_overlay_opacity:.4,tile_overlay_color:"#000000",tile_enable_icons:!0,tile_show_link_icon:!1,tile_videoplay_icon_always_on:"never",tile_space_between_icons:26,tile_enable_image_effect:!1,tile_image_effect_type:"bw",tile_image_effect_reverse:!1,tile_enable_textpanel:!1,tile_textpanel_source:"title",tile_textpanel_always_on:!1,tile_textpanel_appear_type:"slide",tile_textpanel_position:"inside_bottom",tile_textpanel_offset:0},g_defaults={thumb_color_overlay_effect:!0,thumb_overlay_reverse:!0,thumb_image_overlay_effect:!1,tile_textpanel_enable_description:!1,tile_textpanel_bg_opacity:.6,tile_textpanel_padding_top:8,tile_textpanel_padding_bottom:8},g_temp={ratioByHeight:0,ratioByWidth:0,eventSizeChange:"thumb_size_change",funcCustomTileHtml:null,funcCustomPositionElements:null,funcParentApproveClick:null,isSaparateIcons:!1,tileInnerReduce:0,isTextpanelOutside:!1,hasImageContainer:!1,isVideoplayIconAlwaysOn:!1,isTextPanelHidden:!1};function init(gallery,customOptions){g_gallery=gallery,g_objGallery=jQuery(gallery),g_objWrapper=g_gallery.getObjects().g_objWrapper,g_items=g_gallery.getArrItems(),g_options=jQuery.extend(g_options,g_defaults),g_options=jQuery.extend(g_options,customOptions),modifyOptions(),g_thumbs.init(gallery,g_options);var objCustomOptions={allow_onresize:!1},customThumbsAdd=["overlay"];g_temp.funcCustomTileHtml&&(customThumbsAdd=[]),g_thumbs.setCustomThumbs(setHtmlThumb,customThumbsAdd,objCustomOptions);var thumbOptions=g_thumbs.getOptions();g_options=jQuery.extend(g_options,thumbOptions),g_temp.ratioByWidth=g_options.tile_width/g_options.tile_height,g_temp.ratioByHeight=g_options.tile_height/g_options.tile_width,g_options.tile_size_by==t.sizeby.GLOBAL_RATIO&&g_temp.isTextpanelOutside&&(g_temp.hasImageContainer=!0)}function modifyOptions(){if(!0==g_options.tile_enable_overlay?(g_options.thumb_overlay_opacity=g_options.tile_overlay_opacity,g_options.thumb_overlay_color=g_options.tile_overlay_color):!1==g_options.tile_enable_icons?g_options.thumb_color_overlay_effect=!1:g_options.thumb_overlay_opacity=0,g_options.tile_as_link&&(g_options.thumb_wrapper_as_link=!0,g_options.thumb_link_newpage=g_options.tile_link_newpage),!0==g_options.tile_enable_outline&& !1==g_options.tile_enable_border&&(g_options.tile_enable_outline=!1),g_temp.tileInnerReduce=0,g_options.tile_enable_border&&(g_temp.tileInnerReduce=2*g_options.tile_border_width,g_thumbs.setThumbInnerReduce(g_temp.tileInnerReduce)),g_temp.isSaparateIcons=!g_functions.isRgbaSupported(),!0==g_options.tile_enable_textpanel){switch(g_options.tile_textpanel_position){case"top":g_options.tile_textpanel_align="top";case"bottom":g_temp.isTextpanelOutside=!0,g_options.tile_textpanel_always_on=!0,g_options.tile_textpanel_offset=0;break;case"inside_top":g_options.tile_textpanel_align="top";break;case"middle":g_options.tile_textpanel_align="middle",g_options.tile_textpanel_appear_type="fade"}!1==g_options.tile_textpanel_always_on&&(g_temp.isSaparateIcons=!0)}0!=g_options.tile_textpanel_offset&&(g_options.tile_textpanel_appear_type="fade",g_options.tile_textpanel_margin=g_options.tile_textpanel_offset),"title_and_desc"==g_options.tile_textpanel_source&&(g_options.tile_textpanel_enable_description=!0,g_options.tile_textpanel_desc_style_as_title=!0)}function modifyOptionsBeforeRender(){var isMobile=g_gallery.isMobileMode();switch(g_temp.isTextPanelHidden=!1,!0==isMobile&& !1==g_options.tile_textpanel_always_on&&(g_temp.isTextPanelHidden=!0),g_temp.isVideoplayIconAlwaysOn=g_options.tile_videoplay_icon_always_on,g_options.tile_videoplay_icon_always_on){case"always":g_temp.isVideoplayIconAlwaysOn=!0;break;case"never":g_temp.isVideoplayIconAlwaysOn=!1;break;case"mobile_only":g_temp.isVideoplayIconAlwaysOn=!0==isMobile;break;case"desktop_only":g_temp.isVideoplayIconAlwaysOn=!1==isMobile}}function setHtmlThumb(objThumbWrapper,objItem){if(objThumbWrapper.addClass("ug-tile"),g_temp.funcCustomTileHtml)return g_temp.funcCustomTileHtml(objThumbWrapper,objItem),!1;var html="";!0==g_temp.hasImageContainer&&(html+="<div class='ug-image-container ug-trans-enabled'>");var classImage="ug-thumb-image";(!1==g_options.tile_enable_image_effect|| !0==g_options.tile_image_effect_reverse)&&(classImage+=" ug-trans-enabled");var imageAlt=g_functions.stripTags(objItem.title);imageAlt=g_functions.htmlentitles(imageAlt),html+='<img src="'+g_functions.escapeDoubleSlash(objItem.urlThumb)+"\" alt='"+imageAlt+"' class='"+classImage+"'>",!0==g_temp.hasImageContainer&&(html+="</div>"),objThumbWrapper.append(html),g_options.tile_size_by==t.sizeby.GLOBAL_RATIO&&objThumbWrapper.fadeTo(0,0);var objCss={};if(!0==g_options.tile_enable_background&&(objCss["background-color"]=g_options.tile_background_color),!0==g_options.tile_enable_border&&(objCss["border-width"]=g_options.tile_border_width+"px",objCss["border-style"]="solid",objCss["border-color"]=g_options.tile_border_color,g_options.tile_border_radius&&(objCss["border-radius"]=g_options.tile_border_radius+"px")),!0==g_options.tile_enable_outline&&(objCss.outline="1px solid "+g_options.tile_outline_color),!0==g_options.tile_enable_shadow){var htmlShadow=g_options.tile_shadow_h+"px ";htmlShadow+=g_options.tile_shadow_v+"px ",htmlShadow+=g_options.tile_shadow_blur+"px ",htmlShadow+=g_options.tile_shadow_spread+"px ",htmlShadow+=g_options.tile_shadow_color,objCss["box-shadow"]=htmlShadow}objThumbWrapper.css(objCss);var htmlAdd="";if(g_options.tile_enable_icons){if(!1==g_options.tile_as_link&& !0==g_options.tile_enable_action){var iconPlayClass="ug-button-play ug-icon-zoom";"image"!=objItem.type&&(iconPlayClass="ug-button-play ug-icon-play"),htmlAdd+="<div class='ug-tile-icon "+iconPlayClass+"' style='display:none'></div>"}if(objItem.link&& !0==g_options.tile_show_link_icon|| !0==g_options.tile_as_link){if(!1==g_options.tile_as_link){var linkTarget="";!0==g_options.tile_link_newpage&&(linkTarget=" target='_blank'"),htmlAdd+="<a href='"+objItem.link+"'"+linkTarget+" class='ug-tile-icon ug-icon-link'></a>"}else htmlAdd+="<div class='ug-tile-icon ug-icon-link' style='display:none'></div>"}var toSaparateIcon=g_temp.isSaparateIcons;if(!1==toSaparateIcon&&"image"!=objItem.type&& !0==g_temp.isVideoplayIconAlwaysOn&&(toSaparateIcon=!0),toSaparateIcon)var objOverlay=objThumbWrapper;else var objOverlay=objThumbWrapper.children(".ug-thumb-overlay");objOverlay.append(htmlAdd);var objButtonZoom=objOverlay.children("."+iconPlayClass);0==objButtonZoom.length?objButtonZoom=null:objButtonZoom.hide();var objButtonLink=objOverlay.children(".ug-icon-link");0==objButtonLink.length?objButtonLink=null:objButtonLink.hide(),objButtonLink|| !0!=g_options.tile_enable_action||objThumbWrapper.addClass("ug-tile-clickable")}else!0==g_options.tile_enable_action&&objThumbWrapper.addClass("ug-tile-clickable");if(!0==g_options.tile_enable_image_effect){var imageEffectClassAdd="";!1==g_options.tile_image_effect_reverse&&(imageEffectClassAdd=" ug-trans-enabled");var imageOverlayHtml="<div class='ug-tile-image-overlay"+imageEffectClassAdd+"' >",imageEffectClass=" ug-"+g_options.tile_image_effect_type+"-effect";imageOverlayHtml+='<img src="'+g_functions.escapeDoubleSlash(objItem.urlThumb)+"\" alt='"+objItem.title+"' class='"+imageEffectClass+imageEffectClassAdd+"'>",imageOverlayHtml+="</div>",objThumbWrapper.append(imageOverlayHtml),!0==g_options.tile_image_effect_reverse&&objThumbWrapper.children(".ug-tile-image-overlay").fadeTo(0,0)}if(!0==g_options.tile_enable_textpanel){var objTextPanel=new UGTextPanel;objTextPanel.init(g_gallery,g_options,"tile");var textpanelAddClass="";(!0==g_options.tile_textpanel_always_on|| !0==g_temp.isTextpanelOutside)&&(textpanelAddClass="ug-trans-enabled"),objTextPanel.appendHTML(objThumbWrapper,textpanelAddClass);var panelTitle=objItem.title,panelDesc="";switch(g_options.tile_textpanel_source){case"desc":case"description":panelTitle=objItem.description;break;case"desc_title":""!=objItem.description&&(panelTitle=objItem.description);break;case"title_and_desc":panelTitle=objItem.title,panelDesc=objItem.description}if(objTextPanel.setTextPlain(panelTitle,panelDesc),!1==g_options.tile_textpanel_always_on&&objTextPanel.getElement().fadeTo(0,0),objThumbWrapper.data("objTextPanel",objTextPanel),!0==g_options.tile_textpanel_always_on&&getTextPanelElement(objThumbWrapper).css("z-index",2),!0==g_temp.isTextpanelOutside){var htmlClone="<div class='ug-tile-cloneswrapper'></div>";objThumbWrapper.append(htmlClone);var objCloneWrapper=objThumbWrapper.children(".ug-tile-cloneswrapper"),objTextPanelClone=new UGTextPanel;objTextPanelClone.init(g_gallery,g_options,"tile"),objTextPanelClone.appendHTML(objCloneWrapper),objTextPanelClone.setTextPlain(panelTitle,panelDesc),objThumbWrapper.data("objTextPanelClone",objTextPanelClone)}}null!==objItem.addHtml&&objThumbWrapper.append(objItem.addHtml)}function getTileOverlayImage(objTile){return objTile.children(".ug-tile-image-overlay")}function getTileOverlay(objTile){return objTile.children(".ug-thumb-overlay")}function getTileImageContainer(objTile){return!1==g_temp.hasImageContainer?null:objTile.children(".ug-image-container")}function getTileImageEffect(objTile){return objTile.find(".ug-tile-image-overlay img")}function getTextPanel(objTile){return objTile.data("objTextPanel")}function getTextPanelClone(objTile){return objTile.data("objTextPanelClone")}function getTextPanelElement(objTile){return objTile.children(".ug-textpanel")}function getTextPanelCloneElement(objTile){var objTextPanel=objTile.find(".ug-tile-cloneswrapper .ug-textpanel");if(0==objTextPanel.length)throw new Error("text panel cloned element not found");return objTextPanel}function getTextPanelHeight(objTile){if(!0==g_temp.isTextpanelOutside)var objTextPanel=getTextPanelCloneElement(objTile);else var objTextPanel=getTextPanelElement(objTile);return objTextPanel?g_functions.getElementSize(objTextPanel).height:0}function getButtonLink(objTile){var objButton=objTile.find(".ug-icon-link");return 0==objButton.length?null:objButton}function getTileRatio(objTile){var ratio=g_temp.ratioByHeight;switch(g_options.tile_size_by){default:ratio=g_temp.ratioByHeight;break;case t.sizeby.IMAGE_RATIO:if(!objTile)throw new Error("tile should be given for tile ratio");var item=t.getItemByTile(objTile);if(void 0!==item.thumbRatioByHeight){if(0==item.thumbRatioByHeight)throw trace(item),new Error("the item ratio not inited yet");ratio=item.thumbRatioByHeight}break;case t.sizeby.CUSTOM:return null}return ratio}function getButtonZoom(objTile){var objButton=objTile.find(".ug-button-play");return 0==objButton.length?null:objButton}function isOverStyle(objTile){return!!objTile.hasClass("ug-thumb-over")}function isTileClickable(objTile){return objTile.hasClass("ug-tile-clickable")}function isItemIconAlwaysOn(objItem){return!0==g_options.tile_enable_icons&& !0==g_temp.isVideoplayIconAlwaysOn&&"image"!=objItem.type}function positionElements_images(objTile,width,height,visibleOnly){var objImageOverlay=getTileOverlayImage(objTile),objThumbImage=t.getTileImage(objTile),objImageEffect=getTileImageEffect(objTile);width-=g_temp.tileInnerReduce,height-=g_temp.tileInnerReduce;var imagePosy=null;if(!0==g_temp.isTextpanelOutside){var textHeight=getTextPanelHeight(objTile);if(height-=textHeight,"top"==g_options.tile_textpanel_position&&(imagePosy=textHeight),!0==g_temp.hasImageContainer){var objImageContainer=getTileImageContainer(objTile);g_functions.setElementSize(objImageContainer,width,height),null!==imagePosy&&g_functions.placeElement(objImageContainer,0,imagePosy)}}if(!1==g_options.tile_enable_image_effect)g_functions.scaleImageCoverParent(objThumbImage,width,height),!1==g_temp.hasImageContainer&&null!==imagePosy&&g_functions.placeElement(objThumbImage,0,imagePosy);else{var dontResize="nothing";!0===visibleOnly&& !1==g_temp.isTextpanelOutside&&(dontResize=!0==g_options.tile_image_effect_reverse?"effect":"image"),"effect"!=dontResize&&(g_functions.setElementSize(objImageOverlay,width,height),null!==imagePosy&&g_functions.placeElement(objImageOverlay,0,imagePosy),g_functions.scaleImageCoverParent(objImageEffect,width,height)),"image"!=dontResize&&(!0==g_temp.hasImageContainer?g_functions.scaleImageCoverParent(objThumbImage,width,height):"effect"==dontResize?(g_functions.scaleImageCoverParent(objThumbImage,width,height),null!==imagePosy&&g_functions.placeElement(objThumbImage,0,imagePosy)):g_functions.cloneElementSizeAndPos(objImageEffect,objThumbImage,!1,null,imagePosy))}}function positionElements_textpanel(objTile,panelType,tileWidth,tileHeight){var panelWidth=null;if(tileWidth&&(panelWidth=tileWidth-g_temp.tileInnerReduce),tileHeight&&(tileHeight-=g_temp.tileInnerReduce),"clone"==panelType)return getTextPanelClone(objTile).refresh(!0,!0,panelWidth),t.getItemByTile(objTile).textPanelCloneSizeSet=!0,!1;var objTextPanel=getTextPanel(objTile);if(!objTextPanel)return!1;var panelHeight=null;if(!0==g_temp.isTextpanelOutside&&(panelHeight=getTextPanelHeight(objTile)),objTextPanel.refresh(!1,!0,panelWidth,panelHeight),!0==g_options.tile_textpanel_always_on||"fade"==g_options.tile_textpanel_appear_type){if(!0==g_temp.isTextpanelOutside&&tileHeight&&"bottom"==g_options.tile_textpanel_position){var posy=tileHeight-panelHeight;objTextPanel.positionPanel(posy)}else objTextPanel.positionPanel()}}function positionElements(objTile){t.getItemByTile(objTile);var objButtonZoom=getButtonZoom(objTile),objButtonLink=getButtonLink(objTile),sizeTile=g_functions.getElementSize(objTile);positionElements_images(objTile,sizeTile.width,sizeTile.height),!0==g_options.tile_enable_textpanel&&positionElements_textpanel(objTile,"regular",sizeTile.width,sizeTile.height);var overlayWidth=sizeTile.width-g_temp.tileInnerReduce,overlayHeight=sizeTile.height-g_temp.tileInnerReduce,overlayY=0;if(!0==g_temp.isTextpanelOutside){var textHeight=getTextPanelHeight(objTile);overlayHeight-=textHeight,"top"==g_options.tile_textpanel_position&&(overlayY=textHeight)}var objOverlay=getTileOverlay(objTile);if(g_functions.setElementSizeAndPosition(objOverlay,0,overlayY,overlayWidth,overlayHeight),objButtonZoom||objButtonLink){var gapVert=0;if(!0==g_options.tile_enable_textpanel&& !1==g_temp.isTextPanelHidden&& !1==g_temp.isTextpanelOutside){var objTextPanelElement=getTextPanelElement(objTile),texPanelSize=g_functions.getElementSize(objTextPanelElement);texPanelSize.height>0&&(gapVert=Math.floor(-(texPanelSize.height/2*1)))}}if(objButtonZoom&&objButtonLink){var sizeZoom=g_functions.getElementSize(objButtonZoom),sizeLink=g_functions.getElementSize(objButtonLink),spaceBetween=g_options.tile_space_between_icons,buttonsWidth=sizeZoom.width+spaceBetween+sizeLink.width,buttonsX=Math.floor((sizeTile.width-buttonsWidth)/2);buttonsX<spaceBetween&&(spaceBetween=Math.floor((sizeTile.width-sizeZoom.width-sizeLink.width)/3),buttonsWidth=sizeZoom.width+spaceBetween+sizeLink.width,buttonsX=Math.floor((sizeTile.width-buttonsWidth)/2)),g_functions.placeElement(objButtonZoom,buttonsX,"middle",0,gapVert),g_functions.placeElement(objButtonLink,buttonsX+sizeZoom.width+spaceBetween,"middle",0,gapVert)}else objButtonZoom&&g_functions.placeElement(objButtonZoom,"center","middle",0,gapVert),objButtonLink&&g_functions.placeElement(objButtonLink,"center","middle",0,gapVert);objButtonZoom&&objButtonZoom.show(),objButtonLink&&objButtonLink.show()}function setImageOverlayEffect(objTile,isActive){t.getItemByTile(objTile);var objOverlayImage=getTileOverlayImage(objTile),animationDuration=g_options.thumb_transition_duration;if(!1==g_options.tile_image_effect_reverse){var objThumbImage=t.getTileImage(objTile);isActive?(objThumbImage.fadeTo(0,1),objOverlayImage.stop(!0).fadeTo(animationDuration,0)):objOverlayImage.stop(!0).fadeTo(animationDuration,1)}else isActive?objOverlayImage.stop(!0).fadeTo(animationDuration,1):objOverlayImage.stop(!0).fadeTo(animationDuration,0)}function setTextpanelEffect(objTile,isActive){var animationDuration=g_options.thumb_transition_duration,objTextPanel=getTextPanelElement(objTile);if(!objTextPanel)return!0;if("slide"==g_options.tile_textpanel_appear_type){var panelSize=g_functions.getElementSize(objTextPanel);if(0==panelSize.width)return!1;var startPos=-panelSize.height,endPos=0,startClass={},endClass={},posName="bottom";"inside_top"==g_options.tile_textpanel_position&&(posName="top"),startClass[posName]=startPos+"px",endClass[posName]=endPos+"px",!0==isActive?(objTextPanel.fadeTo(0,1),!1==objTextPanel.is(":animated")&&objTextPanel.css(startClass),endClass.opacity=1,objTextPanel.stop(!0).animate(endClass,animationDuration)):objTextPanel.stop(!0).animate(startClass,animationDuration)}else!0==isActive?objTextPanel.stop(!0).fadeTo(animationDuration,1):objTextPanel.stop(!0).fadeTo(animationDuration,0)}function setIconsEffect(objTile,isActive,noAnimation){var animationDuration=g_options.thumb_transition_duration;noAnimation&& !0===noAnimation&&(animationDuration=0);var g_objIconZoom=getButtonZoom(objTile),g_objIconLink=getButtonLink(objTile),opacity=isActive?1:0;g_objIconZoom&&g_objIconZoom.stop(!0).fadeTo(animationDuration,opacity),g_objIconLink&&g_objIconLink.stop(!0).fadeTo(animationDuration,opacity)}function setOverStyle(data,objTile){if(objTile=jQuery(objTile),g_options.tile_enable_image_effect&&setImageOverlayEffect(objTile,!0),!0==g_options.tile_enable_textpanel&& !1==g_options.tile_textpanel_always_on&& !1==g_temp.isTextPanelHidden&&setTextpanelEffect(objTile,!0),g_temp.isSaparateIcons&& !0==g_options.tile_enable_icons){var isSet=!0==g_options.thumb_overlay_reverse,objItem=t.getItemByTile(objTile);!1==isItemIconAlwaysOn(objItem)&&setIconsEffect(objTile,isSet,!1)}}function setNormalStyle(data,objTile){if(objTile=jQuery(objTile),g_options.tile_enable_image_effect&&setImageOverlayEffect(objTile,!1),!0==g_options.tile_enable_textpanel&& !1==g_options.tile_textpanel_always_on&&setTextpanelEffect(objTile,!1),!0==g_temp.isSaparateIcons&& !0==g_options.tile_enable_icons){var isSet=!0!=g_options.thumb_overlay_reverse,objItem=t.getItemByTile(objTile);!1==isItemIconAlwaysOn(objItem)?setIconsEffect(objTile,isSet,!1):setIconsEffect(objTile,!0,!0)}}function setAllTilesNormalStyle(objTileExcept){g_thumbs.getThumbs().not(objTileExcept).each(function(b,a){g_thumbs.setThumbNormalStyle(jQuery(a))})}function onSizeChange(data,objTile,forcePosition){if(objTile=jQuery(objTile),!0==g_options.tile_visible_before_image&& !0!==objTile.data("image_placed")&& !0!==forcePosition)return!0;positionElements(objTile),g_thumbs.setThumbNormalStyle(objTile)}function onPlaceImage(data,objTile,objImage){positionElements(objTile),objImage.fadeTo(0,1),objTile.data("image_placed",!0)}function onMobileClick(objTile){if(!0==isTileClickable(objTile))return g_objThis.trigger(t.events.TILE_CLICK,objTile),!0;!1==isOverStyle(objTile)&&(setAllTilesNormalStyle(objTile),g_thumbs.setThumbOverStyle(objTile))}function onTileClick(event){var objTile=jQuery(this),tagname=objTile.prop("tagName").toLowerCase(),isApproved=!0;if(g_temp.funcParentApproveClick&& !1==g_temp.funcParentApproveClick()&&(isApproved=!1),"a"==tagname)!1==isApproved&&event.preventDefault();else if(!1==isOverStyle(objTile))!0==isApproved&&onMobileClick(objTile);else{if(!1==isTileClickable(objTile))return!0;!0==isApproved&&g_objThis.trigger(t.events.TILE_CLICK,objTile)}}function onZoomButtonClick(event){event.stopPropagation();var objTile=jQuery(this).parents(".ug-tile"),isApproved=!0;return(g_temp.funcParentApproveClick&& !1==g_temp.funcParentApproveClick()&&(isApproved=!1),!1==isOverStyle(objTile))?(onMobileClick(objTile),!0):!0==isApproved?(g_objThis.trigger(t.events.TILE_CLICK,objTile),!1):void 0}function onLinkButtonClick(event){var objTile=jQuery(this).parents(".ug-tile");g_temp.funcParentApproveClick&& !1==g_temp.funcParentApproveClick()&&event.preventDefault(),!1==isOverStyle(objTile)&& !1==g_options.tile_as_link&&(event.preventDefault(),onMobileClick(objTile))}this.loadTileImage=function(a){var b=t.getTileImage(a);g_functions.checkImagesLoaded(b,null,function(b,c){onPlaceImage(null,a,jQuery(b))})},this.setHtml=function(a,b){g_objParentWrapper=a,!0!==b&&modifyOptionsBeforeRender(),g_thumbs.setHtmlThumbs(a,b)},this.initEvents=function(){g_thumbs.initEvents(),jQuery(g_thumbs).on(g_thumbs.events.SETOVERSTYLE,setOverStyle),jQuery(g_thumbs).on(g_thumbs.events.SETNORMALSTYLE,setNormalStyle),jQuery(g_thumbs).on(g_thumbs.events.PLACEIMAGE,onPlaceImage),g_objWrapper.on(g_temp.eventSizeChange,onSizeChange),g_objParentWrapper.on("click",".ug-tile",onTileClick),g_objParentWrapper.on("click",".ug-tile .ug-button-play",onZoomButtonClick),g_objParentWrapper.on("click",".ug-tile .ug-icon-link",onLinkButtonClick)},this.destroy=function(){if(g_objParentWrapper.off("click",".ug-tile"),g_objParentWrapper.off("click",".ug-tile .ug-button-play"),g_objParentWrapper.off("click",".ug-tile .ug-icon-link"),jQuery(g_thumbs).off(g_thumbs.events.SETOVERSTYLE),jQuery(g_thumbs).off(g_thumbs.events.SETNORMALSTYLE),jQuery(g_thumbs).off(g_thumbs.events.PLACEIMAGE),g_objWrapper.off(g_temp.eventSizeChange),!0==g_options.tile_enable_textpanel){var a=g_thumbs.getThumbs();jQuery.each(a,function(c,b){var a=getTextPanel(jQuery(b));a&&a.destroy()})}g_thumbs.destroy()},this.init=function(a,b,c){init(a,b,c)},this.setFixedMode=function(){g_options.tile_size_by=t.sizeby.GLOBAL_RATIO,g_options.tile_visible_before_image=!0},this.setApproveClickFunction=function(a){g_temp.funcParentApproveClick=a},this.resizeTile=function(b,a,c,d){if(!0==g_temp.isTextpanelOutside&&positionElements_textpanel(b,"clone",a),a){if(!c)var c=t.getTileHeightByWidth(a,b)}else var a=g_options.tile_width,c=g_options.tile_height;switch(g_functions.setElementSize(b,a,c),d){default:case t.resizemode.FULL:t.triggerSizeChangeEvent(b,!0);break;case t.resizemode.WRAPPER_ONLY:return!0;case t.resizemode.VISIBLE_ELEMENTS:if(g_temp.funcCustomTileHtml)return t.triggerSizeChangeEvent(b,!0),!0;positionElements_images(b,a,c,!0),!0==g_options.tile_enable_textpanel&& !0==g_options.tile_textpanel_always_on&&a&&positionElements_textpanel(b,"regular",a,c)}},this.resizeAllTiles=function(b,d,a){modifyOptionsBeforeRender();var c=null;if(g_options.tile_size_by==t.sizeby.GLOBAL_RATIO&&(c=t.getTileHeightByWidth(b)),!a)var a=g_thumbs.getThumbs();a.each(function(e,a){t.resizeTile(jQuery(a),b,c,d)})},this.triggerSizeChangeEvent=function(b,a){if(!b)return!1;if(!a)var a=!1;g_objWrapper.trigger(g_temp.eventSizeChange,[b,a])},this.triggerSizeChangeEventAllTiles=function(a){g_thumbs.getThumbs().each(function(){var b=jQuery(this);t.triggerSizeChangeEvent(b,a)})},this.disableEvents=function(){g_thumbs.getThumbs().css("pointer-events","none")},this.enableEvents=function(){g_thumbs.getThumbs().css("pointer-events","auto")},this.setOptions=function(a){g_options=jQuery.extend(g_options,a),g_thumbs.setOptions(a)},this.setTileSizeOptions=function(a){if(g_options.tile_size_by!==t.sizeby.GLOBAL_RATIO)throw new Error("setNewTileOptions works with global ration only");g_options.tile_width=a,g_options.tile_height=Math.floor(a*g_temp.ratioByHeight)},this.setCustomFunctions=function(a,b){g_temp.funcCustomTileHtml=a,g_temp.funcCustomPositionElements=b},this.run=function(c){var b=g_thumbs.type.GET_THUMBS_ALL;!0===c&&(b=g_thumbs.type.GET_THUMBS_NEW);var a=g_thumbs.getThumbs(b);g_options.tile_size_by==t.sizeby.GLOBAL_RATIO&&t.resizeAllTiles(g_options.tile_width,t.resizemode.WRAPPER_ONLY,a),!0==g_options.tile_enable_image_effect&& !1==g_options.tile_image_effect_reverse&&a.children(".ug-thumb-image").fadeTo(0,0),g_thumbs.setHtmlProperties(a),!0==g_options.tile_visible_before_image&&(a.children(".ug-thumb-image").fadeTo(0,0),g_thumbs.loadThumbsImages())},this._____________EXTERNAL_GETTERS____________=function(){},this.getObjThumbs=function(){return g_thumbs},this.getOptions=function(){return g_options},this.getTileImage=function(a){return a.find("img.ug-thumb-image")},this.getItemByTile=function(a){return g_thumbs.getItemByThumb(a)},this.getTileHeightByWidth=function(d,a){var b=getTileRatio(a);if(null===b)return null;var c=Math.floor((d-g_temp.tileInnerReduce)*b)+g_temp.tileInnerReduce;return a&& !0==g_temp.isTextpanelOutside&&g_options.tile_size_by==t.sizeby.IMAGE_RATIO&&(c+=getTextPanelHeight(a)),c},this.getTileImageSize=function(b){var a=t.getItemByTile(b);if(!a.thumbWidth||!a.thumbHeight)throw new Error("Can't get image size - image not inited.");return{width:a.thumbWidth,height:a.thumbHeight}},this.getGlobalTileSize=function(){if(g_options.tile_size_by!=t.sizeby.GLOBAL_RATIO)throw new Error("The size has to be global ratio");return{width:g_options.tile_width,height:g_options.tile_height}}}function UGTiles(){var g_arrNestedGridRow,g_arrNestedItems,g_objGallery,g_objWrapper,g_objParent,g_arrItems,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_objTileDesign=new UGTileDesign,g_thumbs=new UGThumbsGeneral,g_vars={},g_options={tiles_type:"columns",tiles_col_width:250,tiles_align:"center",tiles_exact_width:!1,tiles_space_between_cols:3,tiles_space_between_cols_mobile:3,tiles_include_padding:!0,tiles_min_columns:2,tiles_max_columns:0,tiles_keep_order:!1,tiles_set_initial_height:!0,tiles_justified_row_height:150,tiles_justified_space_between:3,tiles_nested_optimal_tile_width:250,tiles_nested_col_width:null,tiles_nested_debug:!1,tiles_enable_transition:!0};this.events={THUMB_SIZE_CHANGE:"thumb_size_change",TILES_FIRST_PLACED:"tiles_first_placed",ALL_TILES_LOADED:"all_tiles_loaded"};var g_temp={isFirstTimeRun:!0,handle:null,isTransActive:!1,isTransInited:!1,isFirstPlaced:!0,isAllLoaded:!1},g_nestedWork={colWidth:null,nestedOptimalCols:5,gridY:0,maxColumns:0,columnsValueToEnableHeightResize:3,resizeLeftRightToColumn:!0,currentItem:0,currentGap:null,optimalTileWidth:null,maxGridY:0};function init(gallery,customOptions){g_objects=gallery.getObjects(),g_gallery=gallery,g_objGallery=jQuery(gallery),g_objWrapper=g_objects.g_objWrapper,g_arrItems=g_objects.g_arrItems,g_options=jQuery.extend(g_options,customOptions),modifyOptions(),g_objTileDesign.init(gallery,g_options),g_thumbs=g_objTileDesign.getObjThumbs()}function modifyOptions(){g_options.tiles_min_columns<1&&(g_options.tiles_min_columns=1),0!=g_options.tiles_max_columns&&g_options.tiles_max_columns<g_options.tiles_min_columns&&(g_options.tiles_max_columns=g_options.tiles_min_columns)}function setHtml(objParent){if(!objParent){if(g_objParent)objParent=g_objParent;else var objParent=g_objWrapper}g_objParent=objParent;var tilesType=g_options.tiles_type;objParent.addClass("ug-tiletype-"+tilesType),g_objTileDesign.setHtml(objParent),objParent.children(".ug-thumb-wrapper").hide()}function setTransition(){if(g_objParent.addClass("ug-tiles-rest-mode"),g_temp.isTransInited=!0,!0==g_options.tiles_enable_transition){g_objParent.addClass("ug-tiles-transit");var optionsTile=g_objTileDesign.getOptions();!0==optionsTile.tile_enable_image_effect&& !1==optionsTile.tile_image_effect_reverse&&g_objParent.addClass("ug-tiles-transit-overlays"),g_temp.isTransActive=!0}}function getParentWidth(){return g_functions.getElementSize(g_objParent).width}function doBeforeTransition(){return!1!=g_temp.isTransInited&&(g_objParent.addClass("ug-tiles-transition-active"),g_objParent.removeClass("ug-tiles-rest-mode"),!1!=g_temp.isTransActive&&void g_objTileDesign.disableEvents())}function doAfterTransition_setClasses(){if(!1==g_temp.isTransInited)return!1;g_objParent.removeClass("ug-tiles-transition-active"),g_objParent.addClass("ug-tiles-rest-mode")}function doAfterTransition(){!0==g_temp.isTransActive?(setTimeout(function(){g_objTileDesign.enableEvents(),g_objTileDesign.triggerSizeChangeEventAllTiles(),doAfterTransition_setClasses()},800),g_temp.handle&&clearTimeout(g_temp.handle),g_temp.handle=setTimeout(function(){doAfterTransition_setClasses(),g_objTileDesign.triggerSizeChangeEventAllTiles(),g_temp.handle=null},2e3)):(g_objTileDesign.triggerSizeChangeEventAllTiles(),doAfterTransition_setClasses())}function fillTilesVars_countWidthByCols(){g_vars.colWidth=(g_vars.availWidth-g_vars.colGap*(g_vars.numCols-1))/g_vars.numCols,g_vars.colWidth=Math.floor(g_vars.colWidth),g_vars.totalWidth=g_functions.getSpaceByNumItems(g_vars.numCols,g_vars.colWidth,g_vars.colGap)}function fillTilesVars(){if(g_vars.colWidth=g_options.tiles_col_width,g_vars.minCols=g_options.tiles_min_columns,g_vars.maxCols=g_options.tiles_max_columns,!1==g_gallery.isMobileMode()?g_vars.colGap=g_options.tiles_space_between_cols:g_vars.colGap=g_options.tiles_space_between_cols_mobile,g_vars.galleryWidth=getParentWidth(),g_vars.availWidth=g_vars.galleryWidth,!0==g_options.tiles_include_padding&&(g_vars.availWidth=g_vars.galleryWidth-2*g_vars.colGap),!0==g_options.tiles_exact_width)g_vars.numCols=g_functions.getNumItemsInSpace(g_vars.availWidth,g_vars.colWidth,g_vars.colGap),g_vars.maxCols>0&&g_vars.numCols>g_vars.maxCols&&(g_vars.numCols=g_vars.maxCols),g_vars.numCols<g_vars.minCols?(g_vars.numCols=g_vars.minCols,fillTilesVars_countWidthByCols()):g_vars.totalWidth=g_vars.numCols*(g_vars.colWidth+g_vars.colGap)-g_vars.colGap;else{var numCols=g_functions.getNumItemsInSpaceRound(g_vars.availWidth,g_vars.colWidth,g_vars.colGap);numCols<g_vars.minCols?numCols=g_vars.minCols:0!=g_vars.maxCols&&numCols>g_vars.maxCols&&(numCols=g_vars.maxCols),g_vars.numCols=numCols,fillTilesVars_countWidthByCols()}switch(g_options.tiles_align){case"center":default:g_vars.addX=Math.round((g_vars.galleryWidth-g_vars.totalWidth)/2);break;case"left":g_vars.addX=0;break;case"right":g_vars.addX=g_vars.galleryWidth-g_vars.totalWidth}for(col=0,g_vars.arrPosx=[];col<g_vars.numCols;col++){var colX=g_functions.getColX(col,g_vars.colWidth,g_vars.colGap);g_vars.arrPosx[col]=colX+g_vars.addX}}function initColHeights(){g_vars.maxColHeight=0,g_vars.colHeights=[0]}function getTilesMinCol(){var numCol=0,minHeight=999999999;for(col=0;col<g_vars.numCols;col++){if(void 0==g_vars.colHeights[col]||0==g_vars.colHeights[col])return col;g_vars.colHeights[col]<minHeight&&(numCol=col,minHeight=g_vars.colHeights[col])}return numCol}function placeTile(objTile,toShow,setGalleryHeight,numCol){if(null==numCol)var numCol=getTilesMinCol();var posy=0;void 0!==g_vars.colHeights[numCol]&&(posy=g_vars.colHeights[numCol]);var itemHeight=g_objTileDesign.getTileHeightByWidth(g_vars.colWidth,objTile);if(null===itemHeight){if(!0==g_options.tiles_enable_transition)throw new Error("Can't know tile height, please turn off transition");itemHeight=g_functions.getElementSize(objTile).height}var posx=g_vars.arrPosx[numCol];g_functions.placeElement(objTile,posx,posy);var realHeight=posy+itemHeight;g_vars.colHeights[numCol]=realHeight+g_vars.colGap,g_vars.maxColHeight<realHeight&&(g_vars.maxColHeight=realHeight),!0==toShow&&objTile.show().fadeTo(0,1),!0==setGalleryHeight&&g_objParent.height(g_vars.maxColHeight)}function placeTiles(toShow){toShow||(toShow=!1),fillTilesVars(),initColHeights();var objThumbs=g_thumbs.getThumbs(g_thumbs.type.GET_THUMBS_RATIO);doBeforeTransition(),g_objTileDesign.resizeAllTiles(g_vars.colWidth,g_objTileDesign.resizemode.VISIBLE_ELEMENTS,objThumbs);for(var index=0;index<objThumbs.length;index++){var objTile=jQuery(objThumbs[index]),col=void 0;!0==g_options.tiles_keep_order&&(col=g_functions.getColByIndex(g_vars.numCols,index)),placeTile(objTile,toShow,!1,col)}doAfterTransition();var galleryHeight=g_objParent.height();!0==g_temp.isTransActive&&galleryHeight>g_vars.maxColHeight?setTimeout(function(){g_objParent.height(g_vars.maxColHeight)},700):g_objParent.height(g_vars.maxColHeight)}function isOrderedTilePlaceAlowed(objTile){var index=objTile.index();if(!0===g_gallery.getItem(index).ordered_placed)return!1;var prevIndex=g_functions.getPrevRowSameColIndex(index,g_vars.numCols);return prevIndex<0|| !0===g_gallery.getItem(prevIndex).ordered_placed}function placeOrderedTile(objTile,isForce){if(!0!==isForce&& !1==isOrderedTilePlaceAlowed(objTile))return!1;var index=objTile.index(),col=g_functions.getColByIndex(g_vars.numCols,index),objItem=g_gallery.getItem(index);g_objTileDesign.resizeTile(objTile,g_vars.colWidth),placeTile(objTile,!0,!0,col),objItem.ordered_placed=!0;var numItems=g_gallery.getNumItems(),nextIndex=g_functions.getNextRowSameColIndex(index,g_vars.numCols);if(nextIndex>=numItems)return!1;var nextTile=g_thumbs.getThumbByIndex(nextIndex),nextItem=g_gallery.getItem(nextIndex);g_thumbs.isThumbLoaded(nextTile),g_thumbs.isThumbLoaded(nextTile)&&!nextItem.ordered_placed&&placeOrderedTile(nextTile,!0)}function onSingleImageLoad(objImage,isError){if(!0==isError)return!1;objImage=jQuery(objImage);var objTile=jQuery(objImage).parent();g_thumbs.triggerImageLoadedEvent(objTile,objImage),!0==g_options.tiles_keep_order?placeOrderedTile(objTile):(g_objTileDesign.resizeTile(objTile,g_vars.colWidth),placeTile(objTile,!0,!0))}function runColumnsType(){var objThumbs=g_thumbs.getThumbs(g_thumbs.type.GET_THUMBS_NO_RATIO);if(!objThumbs||0==objThumbs.length)return!1;if(g_temp.isAllLoaded=!1,!0==g_temp.isFirstPlaced){fillTilesVars(),initColHeights();var diffWidth=Math.abs(g_vars.galleryWidth-g_vars.totalWidth);if(!0==g_options.tiles_set_initial_height&& !1==g_functions.isScrollbarExists()&&diffWidth<25){objThumbs.length;var estimateHeight=Math.ceil(objThumbs.length/g_vars.numCols)*g_options.tiles_col_width*.75;g_objParent.height(estimateHeight),fillTilesVars()}}objThumbs.fadeTo(0,0);var objImages=objThumbs.find("img.ug-thumb-image"),initNumCols=g_vars.numCols,initWidth=g_vars.galleryWidth;g_functions.checkImagesLoaded(objImages,function(){fillTilesVars(),(initNumCols!=g_vars.numCols||initWidth!=g_vars.galleryWidth)&&placeTiles(!1),setTransition(),g_objThis.trigger(t.events.ALL_TILES_LOADED)},function(a,b){!0==g_temp.isFirstPlaced&&g_gallery.triggerEvent(t.events.TILES_FIRST_PLACED),onSingleImageLoad(a,b)})}function getJustifiedData(){var galleryWidth=getParentWidth(),objTiles=g_thumbs.getThumbs(!0),rowHeightOpt=g_options.tiles_justified_row_height,arrWidths=[],totalWidth=0,gap=g_options.tiles_justified_space_between,numTiles=objTiles.length;jQuery.each(objTiles,function(d,a){a=jQuery(a);var b=g_thumbs.getItemByThumb(a),c=b.thumbWidth;b.thumbHeight!==rowHeightOpt&&(c=Math.floor(b.thumbRatioByWidth*rowHeightOpt)),arrWidths[d]=c,totalWidth+=c});var numRows=Math.ceil(totalWidth/galleryWidth);numRows>numTiles&&(numRows=numTiles);var finalRowWidth=totalWidth/numRows,arrRows=[],eachRowWidth=0,rowsWidths=[],row=[],progressWidth=0,numRow=0;jQuery.each(objTiles,function(b,c){var a=arrWidths[b];progressWidth+a/2>(numRow+1)*finalRowWidth&&(rowsWidths[arrRows.length]=eachRowWidth,arrRows.push(row),row=[],eachRowWidth=0,numRow++),progressWidth+=a,eachRowWidth+=a,row.push(c)}),rowsWidths[arrRows.length]=eachRowWidth,arrRows.push(row);var arrRowWidths=[],arrRowHeights=[],totalHeight=0;return jQuery.each(arrRows,function(a,b){b.length;var f=rowsWidths[a],d=(b.length-1)*gap,c=Math.round(rowHeightOpt*((galleryWidth-d)/f));totalHeight+=c,a>0&&(totalHeight+=gap),arrRowHeights.push(c);var h=c/rowHeightOpt,e=[],g=d;jQuery.each(b,function(b,c){var a=Math.round(arrWidths[jQuery(c).index()]*h);e[b]=a,g+=a});var i=g-galleryWidth;jQuery.each(e,function(a,b){if(0==i)return!1;i<0?(e[a]=b+1,i++):(e[a]=b-1,i--),a==e.length-1&&0!=i&&(e[a]-=i)}),arrRowWidths[a]=e}),{arrRows:arrRows,arrRowWidths:arrRowWidths,arrRowHeights:arrRowHeights,gap:gap,totalHeight:totalHeight}}function placeJustified(toShow){if(!toShow)var toShow=!1;var parentWidth=getParentWidth(),objData=getJustifiedData();g_objParent.height(objData.totalHeight),getParentWidth()!=parentWidth&&(objData=getJustifiedData()),doBeforeTransition();var posy=0,totalWidth=0;jQuery.each(objData.arrRows,function(a,b){var d=objData.arrRowWidths[a],c=objData.arrRowHeights[a],e=0;jQuery.each(b,function(g,a){var b=jQuery(a),h=c,f=d[g];g_objTileDesign.resizeTile(b,f,h,g_objTileDesign.resizemode.VISIBLE_ELEMENTS),g_functions.placeElement(b,e,posy),(e+=f)>totalWidth&&(totalWidth=e),e+=objData.gap,!0==toShow&&jQuery(a).show()}),posy+=c+objData.gap}),doAfterTransition()}function runJustifiedType(){var objImages=jQuery(g_objWrapper).find("img.ug-thumb-image"),objTiles=g_thumbs.getThumbs();g_temp.isAllLoaded=!1,objTiles.fadeTo(0,0),g_functions.checkImagesLoaded(objImages,function(){setTimeout(function(){placeJustified(!0),objTiles.fadeTo(0,1),g_gallery.triggerEvent(t.events.TILES_FIRST_PLACED),setTransition(),g_objThis.trigger(t.events.ALL_TILES_LOADED)})},function(a,c){a=jQuery(a);var b=jQuery(a).parent();g_thumbs.triggerImageLoadedEvent(b,a)})}function runNestedType(){var objImages=jQuery(g_objWrapper).find("img.ug-thumb-image"),objTiles=g_thumbs.getThumbs();g_temp.isAllLoaded=!1,objTiles.fadeTo(0,0),g_functions.checkImagesLoaded(objImages,function(){!0==g_gallery.isMobileMode()?placeTiles(!0):placeNestedImages(!0),g_gallery.triggerEvent(t.events.TILES_FIRST_PLACED),setTransition(),g_objThis.trigger(t.events.ALL_TILES_LOADED)},function(a,c){a=jQuery(a);var b=jQuery(a).parent();g_thumbs.triggerImageLoadedEvent(b,a)})}function fillNestedVars(){var galleryWidth=getParentWidth();switch(g_nestedWork.galleryWidth=galleryWidth,g_arrNestedGridRow={},g_nestedWork.colWidth=g_options.tiles_nested_col_width,g_nestedWork.optimalTileWidth=g_options.tiles_nested_optimal_tile_width,g_nestedWork.currentGap=g_options.tiles_space_between_cols,!0==g_gallery.isMobileMode()&&(g_nestedWork.currentGap=g_options.tiles_space_between_cols_mobile),null==g_nestedWork.colWidth?g_nestedWork.colWidth=Math.floor(g_nestedWork.optimalTileWidth/g_nestedWork.nestedOptimalCols):g_nestedWork.optimalTileWidth>g_nestedWork.colWidth?g_nestedWork.nestedOptimalCols=Math.ceil(g_nestedWork.optimalTileWidth/g_nestedWork.colWidth):g_nestedWork.nestedOptimalCols=1,g_nestedWork.maxColumns=g_functions.getNumItemsInSpace(galleryWidth,g_nestedWork.colWidth,g_nestedWork.currentGap),g_nestedWork.colWidth=g_functions.getItemSizeInSpace(galleryWidth,g_nestedWork.maxColumns,g_nestedWork.currentGap),g_nestedWork.gridY=0,g_arrNestedItems=[],g_thumbs.getThumbs(!0).each(function(){var a=jQuery(this),b=setNestedSize(a);g_arrNestedItems.push(b)}),g_nestedWork.optimalTileWidth>g_nestedWork.colWidth?g_nestedWork.nestedOptimalCols=Math.ceil(g_nestedWork.optimalTileWidth/g_nestedWork.colWidth):g_nestedWork.nestedOptimalCols=1,g_nestedWork.totalWidth=g_nestedWork.maxColumns*(g_nestedWork.colWidth+g_nestedWork.currentGap)-g_nestedWork.currentGap,g_options.tiles_align){case"center":default:g_nestedWork.addX=Math.round((g_nestedWork.galleryWidth-g_nestedWork.totalWidth)/2);break;case"left":g_nestedWork.addX=0;break;case"right":g_nestedWork.addX=g_nestedWork.galleryWidth-g_nestedWork.totalWidth}g_nestedWork.maxGridY=0}function placeNestedImages(toShow){var parentWidth=getParentWidth();fillNestedVars(),placeNestedImagesCycle();var totalHeight=g_nestedWork.maxGridY*(g_nestedWork.colWidth+g_nestedWork.currentGap)-g_nestedWork.currentGap;g_objParent.height(totalHeight),getParentWidth()!=parentWidth&&(fillNestedVars(),placeNestedImagesCycle()),!1==g_options.tiles_nested_debug&&drawNestedImages(toShow)}function setNestedSize(objTile){var dimWidth,dimHeight,output={},colWidth=g_nestedWork.colWidth,gapWidth=g_nestedWork.currentGap,objImageSize=g_objTileDesign.getTileImageSize(objTile),maxDim=Math.ceil(getPresettedRandomByWidth(objTile.index())*(1*g_nestedWork.nestedOptimalCols/3)+2*g_nestedWork.nestedOptimalCols/3),imgWidth=objImageSize.width,imgHeight=objImageSize.height,ratio=imgWidth/imgHeight;return imgWidth>imgHeight?0==(dimHeight=Math.round((dimWidth=maxDim)/ratio))&&(dimHeight=1):0==(dimWidth=Math.round((dimHeight=maxDim)*ratio))&&(dimWidth=1),output.dimWidth=dimWidth,output.dimHeight=dimHeight,output.width=dimWidth*colWidth+gapWidth*(dimWidth-1),output.height=dimHeight*colWidth+gapWidth*(dimHeight-1),output.imgWidth=imgWidth,output.imgHeight=imgHeight,output.left=0,output.top=0,output}function getPresettedRandomByWidth(index){return Math.abs(Math.sin(Math.abs(1e3*Math.sin(index))))}function placeNestedImagesDebug(toShow,placeOne){if(!1==placeOne){for(var i=g_nestedWork.currentItem;i<g_arrNestedItems.length;i++)placeNestedImage(i,!0);g_nestedWork.currentItem=g_arrNestedItems.length-1}else placeNestedImage(g_nestedWork.currentItem,!0);for(var i=0;i<=g_nestedWork.currentItem;i++)drawNestedImage(i,!0);g_nestedWork.currentItem++}function placeNestedImagesCycle(placeOne){if(!0==g_options.tiles_nested_debug)return void 0===placeOne&&(placeOne=!0),placeNestedImagesDebug(!0,placeOne),!1;for(var i=0;i<g_arrNestedItems.length;i++)placeNestedImage(i,!0)}function placeNestedImage(tileID,toShow){if(!toShow)var toShow=!1;g_nestedWork.maxColHeight=0;for(var rowsValue=g_functions.getObjectLength(g_arrNestedGridRow),row=g_nestedWork.gridY;row<=rowsValue+1;row++){for(var column=0;column<g_nestedWork.maxColumns;column++)if(!1==isGridRowExists(g_nestedWork.gridY)|| !1==isGridCellTaken(g_nestedWork.gridY,column)){var totalFree=getTotalFreeFromPosition(column);calculateOptimalStretchAndPosition(tileID,totalFree,column);return}g_nestedWork.gridY++}}function calculateOptimalStretchAndPosition(tileID,totalFree,column){var sizes=jQuery.extend(!0,{},g_arrNestedItems[tileID]),currentWidth=sizes.dimWidth,placeForNextImage=totalFree-sizes.dimWidth,optimalWidth=g_nestedWork.nestedOptimalCols;if(totalFree<=sizes.dimWidth||placeForNextImage<=.33*optimalWidth||totalFree<=optimalWidth)resizeToNewWidth(tileID,totalFree);else if(placeForNextImage<=optimalWidth)optimalWidth>=4?!0==isGridImageAligned(Math.floor(totalFree/2),column)?resizeToNewWidth(tileID,Math.floor(totalFree/2)+1):resizeToNewWidth(tileID,Math.floor(totalFree/2)):resizeToNewWidth(objImage,totalFree);else if(!0==isGridImageAligned(currentWidth,column))switch(currentWidth>=optimalWidth){case!0:resizeToNewWidth(tileID,currentWidth-1);break;case!1:resizeToNewWidth(tileID,currentWidth+1)}sizes=jQuery.extend(!0,{},g_arrNestedItems[tileID]);var columnInfo=getGridColumnHeight(tileID,sizes.dimWidth,column);if(g_nestedWork.columnsValueToEnableHeightResize<=columnInfo[0]&&g_nestedWork.maxColumns>=2*g_nestedWork.nestedOptimalCols){var sideHelper=getGridImageVerticalDifference(column,sizes),columnSizes=resizeToNewHeight(tileID,sideHelper.newHeight,!0);g_arrNestedItems[tileID].dimHeight=columnSizes.dimHeight;var columnResizes=redistributeColumnItems(columnInfo,columnSizes.dimWidth,column),columnCrosshairs=getColumnCrosshairsCount(columnResizes),disableColumnResizes=!1;columnCrosshairs>=2&&(disableColumnResizes=!0),sideHelper.newHeight>=sizes.dimHeight&&(sizes=resizeToNewHeight(tileID,sideHelper.newHeight,!0));var sideResizes=getSideResizeInfo(sideHelper.idToResize,sideHelper.newHeight,sizes.dimHeight);sizes.top=g_nestedWork.gridY,sizes.left=column,sideResizes.push({tileID:tileID,sizes:sizes});var sideResizesVal=calcResizeRatio(sideResizes),columnResizesVal=calcResizeRatio(columnResizes);if(sideResizesVal<columnResizesVal|| !0==disableColumnResizes){applyResizes(sideResizes);return}applyResizes(columnResizes);return}sizes.left=column,sizes.top=g_nestedWork.gridY,g_arrNestedItems[tileID]=sizes,putImageToGridRow(tileID,sizes,column,g_nestedWork.gridY),g_nestedWork.maxGridY=sizes.top+sizes.dimHeight}function getColumnCrosshairsCount(tilesAndSizes){for(var crosshairsCountR=0,crosshairsCountL=0,i=0;i<tilesAndSizes.length-1;i++){var sizes=tilesAndSizes[i].sizes,topItem=-1,bottomItem=-1;isGridRowExists(sizes.top+sizes.dimHeight)&&g_nestedWork.maxColumns>sizes.left+sizes.dimWidth&&(topItem=g_arrNestedGridRow[sizes.top+sizes.dimHeight-1][sizes.left+sizes.dimWidth],bottomItem=g_arrNestedGridRow[sizes.top+sizes.dimHeight][sizes.left+sizes.dimWidth]),topItem!=bottomItem&&crosshairsCountR++}for(var i=0;i<tilesAndSizes.length-1;i++){var sizes=tilesAndSizes[i].sizes,topItem=-1,bottomItem=-1;isGridRowExists(sizes.top+sizes.dimHeight)&&sizes.left-1>=0&&(topItem=g_arrNestedGridRow[sizes.top+sizes.dimHeight-1][sizes.left-1],bottomItem=g_arrNestedGridRow[sizes.top+sizes.dimHeight][sizes.left-1]),topItem!=bottomItem&&crosshairsCountL++}return Math.max(crosshairsCountL,crosshairsCountR)}function getSideResizeInfo(idToResize,newHeight,dimHeight){var currentTile=g_arrNestedItems[idToResize],tileHeight=currentTile.dimHeight;currentTile.dimWidth;var tileLeft=currentTile.left,tileTop=currentTile.top;parseInt(tileTop/(g_nestedWork.colWidth+g_nestedWork.currentGap)),parseInt(tileLeft/(g_nestedWork.colWidth+g_nestedWork.currentGap));var newSideHeight=tileHeight-newHeight+dimHeight,sideSizes=resizeToNewHeight(idToResize,newSideHeight,!0),output=[];return output.push({tileID:idToResize,sizes:sideSizes}),output}function applyResizes(resizeTilesAndSizes){for(var i=0;i<resizeTilesAndSizes.length;i++){var sizes=resizeTilesAndSizes[i].sizes,tileID=resizeTilesAndSizes[i].tileID;g_arrNestedItems[tileID]=jQuery.extend(!0,{},sizes),putImageToGridRow(tileID,sizes,sizes.left,sizes.top)}}function redistributeColumnItems(columnInfo,columnWidth){for(var originalHeight=0,columnHeight=0,objTiles=[],cordX=0,cordY=0,i=0;i<columnInfo[1].length;i++){var tileID=columnInfo[1][i],currentTile=g_arrNestedItems[columnInfo[1][i]];if(columnHeight+=currentTile.dimHeight,0==i){var sizes=resizeToNewWidth(tileID,columnWidth,!0);originalHeight+=sizes.dimHeight,objTiles.push([columnInfo[1][i],sizes.dimHeight]);continue}originalHeight+=currentTile.dimHeight,objTiles.push([tileID,currentTile.dimHeight])}cordX=currentTile.left,cordY=currentTile.top;for(var tempHeight=columnHeight,output=[],i=objTiles.length-1;i>=0;i--){var newHeight,tileID=objTiles[i][0];0!=i?(tempHeight-=newHeight=Math.max(Math.round(1*columnHeight/3),Math.floor(objTiles[i][1]*(columnHeight/originalHeight))),sizes=resizeToNewHeight(tileID,newHeight,!0),sizes.left=cordX,sizes.top=cordY,output.push({tileID:tileID,sizes:sizes}),cordY+=sizes.dimHeight):((sizes=resizeToNewHeight(tileID,newHeight=tempHeight,!0)).left=cordX,sizes.top=cordY,output.push({tileID:tileID,sizes:sizes}))}return output}function getGridColumnHeight(tileID,dimWidth,column){var tempY=g_nestedWork.gridY-1,curImage=0,prevImage=0,columnHeight=1,imagesIDs=[],toReturn=[];if(imagesIDs.push(tileID),tempY>=0){for(prevImage=0;tempY>=0&&(curImage=g_arrNestedGridRow[tempY][column],(void 0===g_arrNestedGridRow[tempY][column-1]||g_arrNestedGridRow[tempY][column-1]!=g_arrNestedGridRow[tempY][column])&&(void 0===g_arrNestedGridRow[tempY][column+dimWidth]||g_arrNestedGridRow[tempY][column+dimWidth-1]!=g_arrNestedGridRow[tempY][column+dimWidth])&&g_arrNestedGridRow[tempY][column]==g_arrNestedGridRow[tempY][column+dimWidth-1]);)prevImage!=curImage&&(columnHeight++,imagesIDs.push(curImage)),tempY--,prevImage=curImage;return toReturn.push(columnHeight),toReturn.push(imagesIDs),toReturn}return[0,[]]}function getGridImageVerticalDifference(column,sizes){var newHeightR=0,newHeightL=0,dimWidth=sizes.dimWidth,dimHeight=sizes.dimHeight,leftID=0,rightID=0,array=jQuery.map(g_arrNestedGridRow,function(a,b){return[a]});if(void 0===array[g_nestedWork.gridY]|| void 0===array[g_nestedWork.gridY][column-1])newHeightL=0;else for(var tempY=0;;)if(void 0!==g_arrNestedGridRow[g_nestedWork.gridY+tempY]&& -1!=g_arrNestedGridRow[g_nestedWork.gridY+tempY][column-1])leftID=g_arrNestedGridRow[g_nestedWork.gridY+tempY][column-2],tempY++,newHeightL++;else break;if(void 0===array[g_nestedWork.gridY]|| void 0===array[g_nestedWork.gridY][column+dimWidth])newHeightR=0;else for(tempY=0;;)if(void 0!==g_arrNestedGridRow[g_nestedWork.gridY+tempY]&& -1!=g_arrNestedGridRow[g_nestedWork.gridY+tempY][column+dimWidth])rightID=g_arrNestedGridRow[g_nestedWork.gridY+tempY][column+dimWidth+1],tempY++,newHeightR++;else break;var newHeight=0,idToResize=0;return Math.abs(dimHeight-newHeightL)<Math.abs(dimHeight-newHeightR)&&0!=newHeightL?(newHeight=newHeightL,idToResize=leftID):0!=newHeightR?(newHeight=newHeightR,idToResize=rightID):newHeight=dimHeight,{newHeight:newHeight,idToResize:idToResize}}function resizeToNewWidth(tileID,newDimWidth,toReturn){toReturn||(toReturn=!1);var colWidth=g_nestedWork.colWidth,gapWidth=g_nestedWork.currentGap,currentTile=g_arrNestedItems[tileID],imgWidth=currentTile.imgWidth,imgHeight=currentTile.imgHeight,ratio=imgWidth/imgHeight;if(dimHeight=Math.round((dimWidth=newDimWidth)/ratio),!0==toReturn){var sizes=jQuery.extend(!0,{},currentTile);return sizes.dimWidth=dimWidth,sizes.dimHeight=dimHeight,sizes.width=dimWidth*colWidth+gapWidth*(dimWidth-1),sizes.height=dimHeight*colWidth+gapWidth*(dimHeight-1),sizes}currentTile.dimWidth=dimWidth,currentTile.dimHeight=dimHeight,currentTile.width=dimWidth*colWidth+gapWidth*(dimWidth-1),currentTile.height=dimHeight*colWidth+gapWidth*(dimHeight-1)}function resizeToNewHeight(tileID,newDimHeight,toReturn){toReturn||(toReturn=!1);var currentTile=g_arrNestedItems[tileID],dimWidth=currentTile.dimWidth,colWidth=g_nestedWork.colWidth,gapWidth=g_nestedWork.currentGap;if(!0==toReturn){var sizes=jQuery.extend(!0,{},currentTile);return sizes.dimHeight=newDimHeight,sizes.width=dimWidth*colWidth+gapWidth*(dimWidth-1),sizes.height=newDimHeight*colWidth+gapWidth*(newDimHeight-1),sizes}currentTile.dimHeight=newDimHeight,currentTile.width=dimWidth*colWidth+gapWidth*(dimWidth-1),currentTile.height=newDimHeight*colWidth+gapWidth*(newDimHeight-1)}function calcResizeRatio(objTilesAndSizes){for(var tempResizes=0,tempNum=0,i=0;i<objTilesAndSizes.length;i++){var sizes=g_arrNestedItems[objTilesAndSizes[i].tileID];if(0==sizes.dimHeight||0==sizes.height)return;(resizeVal=sizes.dimWidth/sizes.dimHeight/(sizes.imgWidth/sizes.imgHeight))<1&&(resizeVal=1/resizeVal),tempResizes+=resizeVal,tempNum++}return tempResizes/tempNum}function isGridImageAligned(dimWidth,column){var y=g_nestedWork.gridY-1;return!(y<=0)&& !1!=isGridRowExists(y)&&g_arrNestedGridRow[y][column+dimWidth-1]!=g_arrNestedGridRow[y][column+dimWidth]}function getTotalFreeFromPosition(column){var x=column,totalFree=0;if(!0==isGridRowExists(g_nestedWork.gridY))for(;!1==isGridCellTaken(g_nestedWork.gridY,x);)totalFree++,x++;else totalFree=g_nestedWork.maxColumns;return totalFree}function isGridRowExists(y){return void 0!==g_arrNestedGridRow[y]}function putImageToGridRow(id,sizes,gridX,gridY){for(var y=0;y<sizes.dimHeight;y++)for(var x=0;x<sizes.dimWidth;x++)0==isGridRowExists(gridY+y)&&addGridRow(gridY+y),setGridCellValue(gridY+y,gridX+x,id)}function addGridRow(y){g_arrNestedGridRow[y]=new Object;for(var t=0;t<g_nestedWork.maxColumns;t++)g_arrNestedGridRow[y][t]=-1}function isGridCellTaken(y,x){return -1!=g_arrNestedGridRow[y][x]}function setGridCellValue(y,x,value){g_arrNestedGridRow[y][x]=value}function drawNestedImages(toShow){if(!toShow)var toShow=!1;doBeforeTransition();for(var i=0;i<g_arrNestedItems.length;i++)drawNestedImage(i,toShow);g_objParent.height(g_nestedWork.maxColHeight),doAfterTransition()}function drawNestedImage(i,toShow){var objTile=g_thumbs.getThumbByIndex(i),sizes=g_arrNestedItems[i],newY=sizes.top*(g_nestedWork.colWidth+g_nestedWork.currentGap),newX=g_nestedWork.addX+sizes.left*(g_nestedWork.colWidth+g_nestedWork.currentGap);g_objTileDesign.resizeTile(objTile,sizes.width,sizes.height,g_objTileDesign.resizemode.VISIBLE_ELEMENTS),g_functions.placeElement(objTile,newX,newY),newY+sizes.height>g_nestedWork.maxColHeight&&(g_nestedWork.maxColHeight=newY+sizes.height),!0==toShow&&objTile.fadeTo(0,1)}function onResize(){if(!0==g_temp.isFirstTimeRun)return!0;if(!1==g_temp.isAllLoaded)return!1;switch(g_options.tiles_type){case"columns":placeTiles(!1);break;case"justified":placeJustified(!1);break;case"nested":!0==g_gallery.isMobileMode()?placeTiles(!1):placeNestedImages(!1)}}function initEvents(){g_objThis.on(t.events.ALL_TILES_LOADED,function(){g_temp.isAllLoaded=!0}),g_objGallery.on(g_gallery.events.SIZE_CHANGE,onResize),g_objGallery.on(t.events.TILES_FIRST_PLACED,function(){g_temp.isFirstPlaced=!1}),g_objTileDesign.initEvents()}function run(){switch(g_objWrapper.children(".ug-tile").show(),!0==g_temp.isFirstTimeRun&&initEvents(),g_objTileDesign.run(),g_options.tiles_type){default:case"columns":runColumnsType();break;case"justified":runJustifiedType();break;case"nested":runNestedType()}g_temp.isFirstTimeRun=!1}this.destroy=function(){g_objGallery.off(g_gallery.events.SIZE_CHANGE),g_objTileDesign.destroy(),g_objGallery.off(t.events.TILES_FIRST_PLACED)},this.init=function(a,b){init(a,b)},this.setHtml=function(a){setHtml(a)},this.getObjTileDesign=function(){return g_objTileDesign},this.run=function(){run()},this.runNewItems=function(){if(!g_objParent)throw new Error("Can't run new items - parent not set");if(g_objTileDesign.setHtml(g_objParent,!0),g_objTileDesign.run(!0),"columns"===g_options.tiles_type)runColumnsType();else throw new Error("Tiles type: "+g_options.tiles_type+" not support load more yet")}}function UGAviaControl(){var g_parent,g_gallery,g_objects,g_objStrip,g_objStripInner,g_options,g_isVertical,g_temp={touchEnabled:!1,isMouseInsideStrip:!1,strip_finalPos:0,handle_timeout:"",isStripMoving:!1,isControlEnabled:!0,maxDpos:1e3};function setScrollType(){}function getMousePos(event){return!1==g_isVertical?event.pageX:event.pageY}function onMouseMove(event){if(!1==g_temp.isControlEnabled)return!0;if(!0==g_temp.touchEnabled)return jQuery("body").off("mousemove"),!0;g_temp.isMouseInsideStrip=g_objStrip.ismouseover();var strip_touch_active=g_parent.isTouchMotionActive();!0==g_temp.isMouseInsideStrip&& !1==strip_touch_active?moveStripToMousePosition(getMousePos(event)):stopStripMovingLoop()}function initEvents(event){jQuery("body").on("touchstart",function(a){if(!1==g_temp.isControlEnabled)return!0;g_temp.touchEnabled=!0}),jQuery("body").mousemove(onMouseMove)}function getInnerPosY(mouseY){var innerOffsetTop=g_options.strip_padding_top;g_options.strip_padding_bottom;var stripHeight=g_objStrip.height(),innerHeight=g_objStripInner.height();if(stripHeight>innerHeight)return null;var posy=mouseY-g_objStrip.offset().top-innerOffsetTop;if(posy<0)return null;var mlineStart=g_options.thumb_height,mlineEnd=stripHeight-g_options.thumb_height,mLineSize=mlineEnd-mlineStart;posy<mlineStart&&(posy=mlineStart),posy>mlineEnd&&(posy=mlineEnd);var ratio=(posy-mlineStart)/mLineSize,innerPosY=(innerHeight-stripHeight)*ratio;return -1*Math.round(innerPosY)+innerOffsetTop}function getInnerPosX(mouseX){var innerOffsetLeft=g_options.strip_padding_left,innerOffsetRight=g_options.strip_padding_right,stripWidth=g_objStrip.width()-innerOffsetLeft-innerOffsetRight,innerWidth=g_objStripInner.width();if(stripWidth>innerWidth)return null;var posx=mouseX-g_objStrip.offset().left-innerOffsetLeft,mlineStart=g_options.thumb_width,mlineEnd=stripWidth-g_options.thumb_width,mLineSize=mlineEnd-mlineStart;posx<mlineStart&&(posx=mlineStart),posx>mlineEnd&&(posx=mlineEnd);var ratio=(posx-mlineStart)/mLineSize,innerPosX=(innerWidth-stripWidth)*ratio;return -1*Math.round(innerPosX)+innerOffsetLeft}function moveStripStep(){if(!1==g_temp.is_strip_moving)return!1;var dpos,maxDpos=g_temp.maxDpos,innerPos=g_parent.getInnerStripPos();Math.floor(innerPos)==Math.floor(g_temp.strip_finalPos)&&stopStripMovingLoop();var diff=Math.abs(g_temp.strip_finalPos-innerPos);diff<1?dpos=diff:(dpos=diff/4)>0&&dpos<1&&(dpos=1),g_temp.strip_finalPos<innerPos&&(dpos*=-1),dpos>maxDpos&&(dpos=maxDpos),dpos< -maxDpos&&(dpos=-maxDpos);var newPos=innerPos+dpos;g_parent.positionInnerStrip(newPos)}function startStripMovingLoop(){if(!0==g_temp.isStripMoving)return!1;g_temp.isStripMoving=!0,g_temp.handle_timeout=setInterval(moveStripStep,10)}function stopStripMovingLoop(){if(!1==g_temp.isStripMoving)return!1;g_temp.isStripMoving=!1,g_temp.handle_timeout=clearInterval(g_temp.handle_timeout)}function getInnerPos(mousePos){return!1==g_isVertical?getInnerPosX(mousePos):getInnerPosY(mousePos)}function moveStripToMousePosition(mousePos){var innerPos=getInnerPos(mousePos);if(null===innerPos)return!1;g_temp.is_strip_moving=!0,g_temp.strip_finalPos=innerPos,startStripMovingLoop()}this.enable=function(){g_temp.isControlEnabled=!0},this.disable=function(){g_temp.isControlEnabled=!1},this.onResize=function(){setScrollType()},this.init=function(a){g_parent=a,g_objects=a.getObjects(),g_gallery=g_objects.g_gallery,g_objStrip=g_objects.g_objStrip,g_objStripInner=g_objects.g_objStripInner,g_options=g_objects.g_options,g_isVertical=g_objects.isVertical,initEvents(),setScrollType()},this.destroy=function(){jQuery("body").off("touchstart"),jQuery("body").off("mousemove")}}function UGSlider(){var g_objGallery,g_objWrapper,g_objThumbs,g_objSlider,g_objInner,g_objSlide1,g_objSlide2,g_objSlide3,g_objArrowLeft,g_objArrowRight,g_objTouchSlider,g_objZoomSlider,g_objZoomPanel,g_optionsPrefix,t=this,g_objThis=jQuery(t),g_gallery=new UniteGalleryMain,g_objButtonPlay=null,g_objButtonFullscreen=null,g_objBullets=null,g_objVideoPlayer=new UGVideoPlayer,g_functions=new UGFunctions,g_objProgress=null,g_objTextPanel=null;this.events={ITEM_CHANGED:"item_changed",BEFORE_SWITCH_SLIDES:"before_switch",BEFORE_RETURN:"before_return",AFTER_RETURN:"after_return",ZOOM_START:"slider_zoom_start",ZOOM_END:"slider_zoom_end",ZOOMING:"slider_zooming",ZOOM_CHANGE:"slider_zoom_change",START_DRAG:"start_drag",AFTER_DRAG_CHANGE:"after_drag_change",ACTION_START:"action_start",ACTION_END:"action_end",CLICK:"slider_click",TRANSITION_START:"slider_transition_start",TRANSITION_END:"slider_transition_end",AFTER_PUT_IMAGE:"after_put_image",IMAGE_MOUSEENTER:"slider_image_mouseenter",IMAGE_MOUSELEAVE:"slider_image_mouseleave",CURRENTSLIDE_LOAD_START:"slider_current_loadstart",CURRENTSLIDE_LOAD_END:"slider_current_loadend"};var g_options={slider_scale_mode:"fill",slider_scale_mode_media:"fill",slider_scale_mode_fullscreen:"down",slider_item_padding_top:0,slider_item_padding_bottom:0,slider_item_padding_left:0,slider_item_padding_right:0,slider_background_color:"",slider_background_opacity:1,slider_image_padding_top:0,slider_image_padding_bottom:0,slider_image_padding_left:0,slider_image_padding_right:0,slider_image_border:!1,slider_image_border_width:10,slider_image_border_color:"#ffffff",slider_image_border_radius:0,slider_image_border_maxratio:.35,slider_image_shadow:!1,slider_video_constantsize:!1,slider_video_constantsize_scalemode:"fit",slider_video_constantsize_width:854,slider_video_constantsize_height:480,slider_video_padding_top:0,slider_video_padding_bottom:0,slider_video_padding_left:0,slider_video_padding_right:0,slider_video_enable_closebutton:!0,slider_transition:"slide",slider_transition_speed:300,slider_transition_easing:"easeInOutQuad",slider_control_swipe:!0,slider_control_zoom:!0,slider_zoom_mousewheel:!0,slider_vertical_scroll_ondrag:!1,slider_loader_type:1,slider_loader_color:"white",slider_enable_links:!0,slider_links_newpage:!1,slider_enable_bullets:!1,slider_bullets_skin:"",slider_bullets_space_between:-1,slider_bullets_align_hor:"center",slider_bullets_align_vert:"bottom",slider_bullets_offset_hor:0,slider_bullets_offset_vert:10,slider_enable_arrows:!0,slider_arrows_skin:"",slider_arrow_left_align_hor:"left",slider_arrow_left_align_vert:"middle",slider_arrow_left_offset_hor:10,slider_arrow_left_offset_vert:0,slider_arrow_right_align_hor:"right",slider_arrow_right_align_vert:"middle",slider_arrow_right_offset_hor:10,slider_arrow_right_offset_vert:0,slider_enable_progress_indicator:!0,slider_progress_indicator_type:"pie",slider_progress_indicator_align_hor:"right",slider_progress_indicator_align_vert:"top",slider_progress_indicator_offset_hor:10,slider_progress_indicator_offset_vert:10,slider_enable_play_button:!0,slider_play_button_skin:"",slider_play_button_align_hor:"left",slider_play_button_align_vert:"top",slider_play_button_offset_hor:40,slider_play_button_offset_vert:8,slider_play_button_mobilehide:!1,slider_enable_fullscreen_button:!0,slider_fullscreen_button_skin:"",slider_fullscreen_button_align_hor:"left",slider_fullscreen_button_align_vert:"top",slider_fullscreen_button_offset_hor:11,slider_fullscreen_button_offset_vert:9,slider_fullscreen_button_mobilehide:!1,slider_enable_zoom_panel:!0,slider_zoompanel_skin:"",slider_zoompanel_align_hor:"left",slider_zoompanel_align_vert:"top",slider_zoompanel_offset_hor:12,slider_zoompanel_offset_vert:92,slider_zoompanel_mobilehide:!1,slider_controls_always_on:!1,slider_controls_appear_ontap:!0,slider_controls_appear_duration:300,slider_enable_text_panel:!0,slider_textpanel_always_on:!0,slider_videoplay_button_type:"square"},g_defaultsProgressBar={slider_progress_indicator_align_hor:"left",slider_progress_indicator_align_vert:"bottom",slider_progress_indicator_offset_hor:0,slider_progress_indicator_offset_vert:0},g_temp={isRunOnce:!1,isTextPanelSaparateHover:!1,numPrev:1,numCurrent:2,numNext:3,isControlsVisible:!0,currentControlsMode:"image"};function initSlider(objGallery,objOptions,optionsPrefix){g_gallery=objGallery,optionsPrefix&&(g_optionsPrefix=optionsPrefix,objOptions=g_functions.convertCustomPrefixOptions(objOptions,g_optionsPrefix,"slider")),g_objGallery=jQuery(objGallery);var objects=g_gallery.getObjects();if(g_objWrapper=objects.g_objWrapper,g_objThumbs=objects.g_objThumbs,objOptions.hasOwnProperty("slider_progress_indicator_type")&&(g_options.slider_progress_indicator_type=objOptions.slider_progress_indicator_type),"bar"==g_options.slider_progress_indicator_type&&(g_options=jQuery.extend(g_options,g_defaultsProgressBar)),objOptions&&t.setOptions(objOptions),processOptions(),!0==g_options.slider_enable_bullets){g_objBullets=new UGBullets;var bulletsOptions={bullets_skin:g_options.slider_bullets_skin,bullets_space_between:g_options.slider_bullets_space_between};g_objBullets.init(g_gallery,bulletsOptions)}g_options.slider_enable_text_panel&&(g_objTextPanel=new UGTextPanel).init(g_gallery,g_options,"slider"),g_options.slider_enable_zoom_panel&&(g_objZoomPanel=new UGZoomButtonsPanel).init(t,g_options);var galleryID=g_gallery.getGalleryID();g_objVideoPlayer.init(g_options,!1,galleryID)}function runSlider(){if(!0==g_temp.isRunOnce)return!1;if(g_temp.isRunOnce=!0,g_options.slider_background_color){var bgColor=g_options.slider_background_color;1!=g_options.slider_background_opacity&&(bgColor=g_functions.convertHexToRGB(bgColor,g_options.slider_background_opacity)),g_objSlider.css("background-color",bgColor)}else 1!=g_options.slider_background_opacity&&(bgColor=g_functions.convertHexToRGB("#000000",g_options.slider_background_opacity),g_objSlider.css("background-color",bgColor));!0==g_options.slider_control_swipe&&(g_objTouchSlider=new UGTouchSliderControl).init(t,g_options),!0==g_options.slider_control_zoom&&(g_objZoomSlider=new UGZoomSliderControl).init(t,g_options),g_objTextPanel&&g_objTextPanel.run(),initEvents()}function processOptions(){var galleryOptions=g_gallery.getOptions(),globalSkin=galleryOptions.gallery_skin;""==g_options.slider_bullets_skin&&(g_options.slider_bullets_skin=globalSkin),""==g_options.slider_arrows_skin&&(g_options.slider_arrows_skin=globalSkin),""==g_options.slider_zoompanel_skin&&(g_options.slider_zoompanel_skin=globalSkin),""==g_options.slider_play_button_skin&&(g_options.slider_play_button_skin=globalSkin),""==g_options.slider_fullscreen_button_skin&&(g_options.slider_fullscreen_button_skin=globalSkin),g_options.video_enable_closebutton=g_options.slider_video_enable_closebutton,"zoom"!=galleryOptions.gallery_mousewheel_role&&(g_options.slider_zoom_mousewheel=!1)}function getHtmlSlide(loaderClass,numSlide){var classVideoplay="ug-type-square";"round"==g_options.slider_videoplay_button_type&&(classVideoplay="ug-type-round");var html="";return html+="<div class='ug-slide-wrapper ug-slide"+numSlide+"'>",html+="<div class='ug-item-wrapper'></div>",html+="<div class='ug-slider-preloader "+loaderClass+"'></div>",html+="<div class='ug-button-videoplay "+classVideoplay+"' style='display:none'></div>",html+="</div>"}function setHtmlSlider(objParent){objParent&&(g_objWrapper=objParent);var loaderClass=getLoaderClass();g_gallery.getOptions();var html="<div class='ug-slider-wrapper'>";if(html+="<div class='ug-slider-inner'>",html+=getHtmlSlide(loaderClass,1),html+=getHtmlSlide(loaderClass,2),html+=getHtmlSlide(loaderClass,3),html+="</div>",!0==g_options.slider_enable_arrows){var svgArrowLeft='<svg x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32"><g stroke-width="1" transform="translate(0.5, 0.5)"><polyline fill="none" stroke="#ffffff" stroke-width="1" stroke-linecap="square" stroke-miterlimit="10" points="21,2 11,16 21,30 " stroke-linejoin="miter"></polyline></g></svg>',svgArrowRight='<svg x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32"><g stroke-width="1" transform="translate(0.5, 0.5)"><polyline fill="none" stroke="#ffffff" stroke-width="1" stroke-linecap="square" stroke-miterlimit="10" points="11,2 21,16 11,30 " stroke-linejoin="miter"></polyline></g></svg>';html+="<div class='ug-slider-control ug-arrow-left ug-skin-"+g_options.slider_arrows_skin+"'>"+svgArrowLeft+"</div>",html+="<div class='ug-slider-control ug-arrow-right ug-skin-"+g_options.slider_arrows_skin+"'>"+svgArrowRight+"</div>"}!0==g_options.slider_enable_play_button&&(html+="<div class='ug-slider-control ug-button-play ug-skin-"+g_options.slider_play_button_skin+"'></div>"),!0==g_options.slider_enable_fullscreen_button&&(html+="<div class='ug-slider-control ug-button-fullscreen ug-skin-"+g_options.slider_fullscreen_button_skin+"'></div>"),html+="</div>",g_objWrapper.append(html),g_objSlide1=(g_objInner=(g_objSlider=g_objWrapper.children(".ug-slider-wrapper")).children(".ug-slider-inner")).children(".ug-slide1"),g_objSlide2=g_objInner.children(".ug-slide2"),g_objSlide3=g_objInner.children(".ug-slide3"),g_objSlide1.data("slidenum",1),g_objSlide2.data("slidenum",2),g_objSlide3.data("slidenum",3),g_objBullets&&g_objBullets.appendHTML(g_objSlider),!0==g_options.slider_enable_arrows&&(g_objArrowLeft=g_objSlider.children(".ug-arrow-left"),g_objArrowRight=g_objSlider.children(".ug-arrow-right")),!0==g_options.slider_enable_play_button&&(g_objButtonPlay=g_objSlider.children(".ug-button-play")),!0==g_options.slider_enable_fullscreen_button&&(g_objButtonFullscreen=g_objSlider.children(".ug-button-fullscreen")),!0==g_options.slider_enable_progress_indicator&&("bar"==(g_objProgress=g_functions.initProgressIndicator(g_options.slider_progress_indicator_type,g_options,g_objSlider)).getType()&&"pie"==g_options.slider_progress_indicator_type&&(g_options.slider_progress_indicator_type="bar",g_options=jQuery.extend(g_options,g_defaultsProgressBar)),g_gallery.setProgressIndicator(g_objProgress)),!0==g_options.slider_enable_text_panel&&(g_objTextPanel.appendHTML(g_objSlider),!1==g_options.slider_textpanel_always_on)&&(g_objTextPanel.getElement().hide().data("isHidden",!0),g_temp.isTextPanelSaparateHover=!0),!0==g_options.slider_enable_zoom_panel&&g_objZoomPanel.appendHTML(g_objSlider),g_objVideoPlayer.setHtml(g_objInner)}function positionSlideElements(objSlide){var objPreloader=getSlidePreloader(objSlide);g_functions.placeElementInParentCenter(objPreloader);var objVideoPlayButton=getSlideVideoPlayButton(objSlide);g_functions.placeElementInParentCenter(objVideoPlayButton)}function positionElements(){if(g_objBullets&&(objBullets=g_objBullets.getElement(),g_functions.placeElement(objBullets,g_options.slider_bullets_align_hor,g_options.slider_bullets_align_vert,g_options.slider_bullets_offset_hor,g_options.slider_bullets_offset_vert),g_functions.placeElement(objBullets,g_options.slider_bullets_align_hor,g_options.slider_bullets_align_vert,g_options.slider_bullets_offset_hor,g_options.slider_bullets_offset_vert)),!0==g_options.slider_enable_arrows&&(g_functions.placeElement(g_objArrowLeft,g_options.slider_arrow_left_align_hor,g_options.slider_arrow_left_align_vert,g_options.slider_arrow_left_offset_hor,g_options.slider_arrow_left_offset_vert),g_functions.placeElement(g_objArrowRight,g_options.slider_arrow_right_align_hor,g_options.slider_arrow_left_align_vert,g_options.slider_arrow_right_offset_hor,g_options.slider_arrow_right_offset_vert)),!1==g_options.slider_controls_always_on&&hideControls(!0),g_objProgress){var objProgressElement=g_objProgress.getElement();if("bar"==g_options.slider_progress_indicator_type){var sliderWidth=g_objSlider.width();g_objProgress.setSize(sliderWidth),g_functions.placeElement(objProgressElement,"left",g_options.slider_progress_indicator_align_vert,0,g_options.slider_progress_indicator_offset_vert)}else g_functions.placeElement(objProgressElement,g_options.slider_progress_indicator_align_hor,g_options.slider_progress_indicator_align_vert,g_options.slider_progress_indicator_offset_hor,g_options.slider_progress_indicator_offset_vert)}g_objTextPanel&&g_objTextPanel.positionPanel(),placeControlsElements(),positionSlideElements(g_objSlide1),positionSlideElements(g_objSlide2),positionSlideElements(g_objSlide3),checkMobileModify()}function placeControlsElements(){if(g_objButtonPlay&&g_functions.placeElement(g_objButtonPlay,g_options.slider_play_button_align_hor,g_options.slider_play_button_align_vert,g_options.slider_play_button_offset_hor,g_options.slider_play_button_offset_vert),g_objButtonFullscreen&&g_functions.placeElement(g_objButtonFullscreen,g_options.slider_fullscreen_button_align_hor,g_options.slider_fullscreen_button_align_vert,g_options.slider_fullscreen_button_offset_hor,g_options.slider_fullscreen_button_offset_vert),g_objZoomPanel){var zoomPanelElement=g_objZoomPanel.getElement();g_functions.placeElement(zoomPanelElement,g_options.slider_zoompanel_align_hor,g_options.slider_zoompanel_align_vert,g_options.slider_zoompanel_offset_hor,g_options.slider_zoompanel_offset_vert)}}function positionSlides(){var innerWidth,posXNext,nextHasItem,prevHasItem,slides=t.getSlidesReference(),posY=0,posXPrev=0,posXCurrent=0;nextHasItem=t.isSlideHasItem(slides.objNextSlide),prevHasItem=t.isSlideHasItem(slides.objPrevSlide),prevHasItem?(posXCurrent=slides.objPrevSlide.outerWidth(),slides.objPrevSlide.css("z-index",1)):slides.objPrevSlide.hide(),posXNext=posXCurrent+slides.objCurrentSlide.outerWidth(),innerWidth=posXNext,nextHasItem?(innerWidth=posXNext+slides.objNextSlide.outerWidth(),slides.objPrevSlide.css("z-index",2)):slides.objNextSlide.hide(),slides.objCurrentSlide.css("z-index",3),g_functions.placeElement(slides.objCurrentSlide,posXCurrent,posY),g_objInner.css({left:-posXCurrent+"px",width:innerWidth+"px"}),prevHasItem&&(g_functions.placeElement(slides.objPrevSlide,posXPrev,posY),g_functions.showElement(slides.objPrevSlide)),nextHasItem&&(g_functions.showElement(slides.objNextSlide),g_functions.placeElement(slides.objNextSlide,posXNext,posY))}function resizeSlideItem(objSlide){var index=objSlide.data("index");if(void 0===index||null==index)return!1;var objItem=g_gallery.getItem(index);if(!objItem)return!1;setItemToSlide(objSlide,objItem)}function showPreloader(objPreloader){objPreloader.stop(!0).show(100)}function hidePreloader(objPreloader){objPreloader.stop(!0).hide(100)}function getImageBorderWidth(objImage,imageData){var borderWidth=g_options.slider_image_border_width;if(borderWidth<=10)return borderWidth;var imageSize=g_functions.getElementSize(objImage),imageWidth=imageSize.width,imageHeight=imageSize.height;if(imageData&&(imageData.hasOwnProperty("imageWidth")&&(imageWidth=imageData.imageWidth),imageData.hasOwnProperty("imageHeight")&&(imageHeight=imageData.imageHeight)),imageWidth<=0)return borderWidth;var totalSize=imageWidth<imageHeight?imageWidth:imageHeight;if(2*borderWidth/totalSize<g_options.slider_image_border_maxratio)return borderWidth;var borderWidth=totalSize*g_options.slider_image_border_maxratio/2;return Math.round(borderWidth)}function setImageDesign(objImage,slideType,imageData){var css={};if(!0==g_options.slider_image_border){css["border-style"]="solid";var borderWidth=getImageBorderWidth(objImage,imageData);css["border-width"]=borderWidth+"px",css["border-color"]=g_options.slider_image_border_color,css["border-radius"]=g_options.slider_image_border_radius}"image"!=slideType&& !0==g_options.slider_video_constantsize&&(css["background-color"]="#000000"),!0==g_options.slider_image_shadow&&(css["box-shadow"]="3px 3px 10px 0px #353535"),objImage.css(css)}function scaleImageConstantSize(objImage,objItem){var constantWidth=g_options.slider_video_constantsize_width,constantHeight=g_options.slider_video_constantsize_height,scaleMode=g_options.slider_video_constantsize_scalemode,objSize=g_functions.scaleImageExactSizeInParent(objImage,objItem.imageWidth,objItem.imageHeight,constantWidth,constantHeight,scaleMode);return objSize}function setImageToSlide(objSlide,objItem,isForce){var objItemWrapper=objSlide.children(".ug-item-wrapper"),objPreloader=getSlidePreloader(objSlide);if(void 0===objItem.urlImage||""==objItem.urlImage)throw new Error("The slide don't have big image defined ( data-image='imageurl' ). Please check gallery items.","showbig");var urlImage=objItem.urlImage,currentImage=objSlide.data("urlImage");objSlide.data("urlImage",urlImage);var scaleMode=t.getScaleMode(objSlide),slideType=t.getSlideType(objSlide);objPadding=t.getObjImagePadding();var imageAlt="";if("string"==typeof objItem.description&&(imageAlt=objItem.description),currentImage==urlImage&& !0!==isForce){var objImage=objItemWrapper.children("img");objImage.attr("alt",imageAlt),(0==objItem.imageWidth||0==objItem.imageHeight)&&g_gallery.checkFillImageSize(objImage,objItem);var objImageData={};objImageData="image"!=slideType&& !0==g_options.slider_video_constantsize?scaleImageConstantSize(objImage,objItem):g_functions.scaleImageFitParent(objImage,objItem.imageWidth,objItem.imageHeight,scaleMode,objPadding),setImageDesign(objImage,slideType,objImageData),g_objThis.trigger(t.events.AFTER_PUT_IMAGE,objSlide)}else{var objImage=g_functions.placeImageInsideParent(urlImage,objItemWrapper,objItem.imageWidth,objItem.imageHeight,scaleMode,objPadding);if(objImage.attr("alt",imageAlt),!0==objItem.isBigImageLoaded){if(objImage.fadeTo(0,1),hidePreloader(objPreloader),"image"!=slideType&& !0==g_options.slider_video_constantsize)var objImageData=scaleImageConstantSize(objImage,objItem);else var objImageData=g_functions.getImageInsideParentData(objItemWrapper,objItem.imageWidth,objItem.imageHeight,scaleMode,objPadding);objImage.css("width",objImageData.imageWidth+"px"),setImageDesign(objImage,slideType,objImageData),g_objThis.trigger(t.events.AFTER_PUT_IMAGE,objSlide)}else objImage.fadeTo(0,0),showPreloader(objPreloader),objSlide.data("isLoading",!0),t.isSlideCurrent(objSlide)&&g_objThis.trigger(t.events.CURRENTSLIDE_LOAD_START),objImage.data("itemIndex",objItem.index),objImage.on("load",function(){var a=jQuery(this),f=a.data("itemIndex");a.fadeTo(0,1);var b=a.parent().parent(),d=t.getSlideType(b),g=getSlidePreloader(b),h=t.getObjImagePadding(),i=t.getScaleMode(b);hidePreloader(g),b.data("isLoading",!1),t.isSlideCurrent(b)&&g_objThis.trigger(t.events.CURRENTSLIDE_LOAD_END),g_gallery.onItemBigImageLoaded(null,a);var c=g_gallery.getItem(f),e={};"image"!=d&& !0==g_options.slider_video_constantsize?scaleImageConstantSize(a,c):e=g_functions.scaleImageFitParent(a,c.imageWidth,c.imageHeight,i,h),a.fadeTo(0,1),setImageDesign(a,d,e),g_objThis.trigger(t.events.AFTER_PUT_IMAGE,b)})}}function setItemToSlide(objSlide,objItem){try{var objItemWrapper=objSlide.children(".ug-item-wrapper");if(null==objItem)return objItemWrapper.html(""),objSlide.removeData("index"),objSlide.removeData("type"),objSlide.removeData("urlImage"),!1;objSlide.data("index"),objSlide.data("index",objItem.index),objSlide.data("type",objItem.type),!0==g_options.slider_enable_links&&"image"==objItem.type&&(objItem.link?objSlide.addClass("ug-slide-clickable"):objSlide.removeClass("ug-slide-clickable")),setImageToSlide(objSlide,objItem);var objVideoPlayButton=getSlideVideoPlayButton(objSlide);"image"===objItem.type?objVideoPlayButton.hide():objVideoPlayButton.show()}catch(error){throw void 0!==error.fileName&&"showbig"==error.fileName&&g_gallery.showErrorMessageReplaceGallery(error.message),objItemWrapper.html(""),new Error(error)}}function hideTextPanel(){if(!g_objTextPanel|| !0==isTextPanelHidden())return!1;var panelElement=g_objTextPanel.getElement(),animationTime=0;(!0==g_temp.isTextPanelSaparateHover|| !0==g_options.slider_textpanel_always_on)&&(animationTime=g_options.slider_controls_appear_duration),panelElement.stop().fadeTo(animationTime,0),panelElement.data("isHidden",!0)}function showTextPanel(){if(!g_objTextPanel|| !1==isTextPanelHidden())return!1;var panelElement=g_objTextPanel.getElement(),animationTime=0;(!0==g_temp.isTextPanelSaparateHover|| !0==g_options.slider_textpanel_always_on)&&(panelElement.show(),g_objTextPanel.positionElements(),animationTime=g_options.slider_controls_appear_duration),panelElement.stop().show().fadeTo(animationTime,1),panelElement.data("isHidden",!1)}function isTextPanelHidden(){return!1!==g_objTextPanel.getElement().data("isHidden")}function validateSlideType(type,objSlide){if(void 0==objSlide)var objSlide=t.getCurrentSlide();var slideType=t.getSlideType(objSlide);if(slideType!=type)throw new Error("Wrong slide type: "+slideType+", should be: "+type);return!0}function setVideoPlayerPosition(){var objCurrentSlide=t.getCurrentSlide(),objImage=t.getSlideImage(objCurrentSlide),slideSize=g_functions.getElementSize(objCurrentSlide),left=slideSize.left,top=slideSize.top;if(!0==g_options.slider_video_constantsize){var imageSize=g_functions.getElementSize(objImage);left+=imageSize.left,top+=imageSize.top}else left+=g_options.slider_video_padding_left,top+=g_options.slider_video_padding_top;g_objVideoPlayer.setPosition(left,top)}function setVideoPlayerConstantSize(){var videoWidth=g_options.slider_video_constantsize_width,videoHeight=g_options.slider_video_constantsize_height;g_objVideoPlayer.setSize(videoWidth,videoHeight);var videoElement=g_objVideoPlayer.getObject();setImageDesign(videoElement,"video")}function doTransition(direction,objItem,forceTransition){g_objThis.trigger(t.events.TRANSITION_START);var transition=g_options.slider_transition;switch(forceTransition&&(transition=forceTransition),t.stopSlideAction(null,!0),transition){default:case"fade":transitionFade(objItem);break;case"slide":transitionSlide(direction,objItem);break;case"lightbox_open":transitionFade(objItem,!1,!0)}}function transitionSlide(direction,objItem){if(!0==t.isAnimating())return g_temp.itemWaiting=objItem,!0;null!=g_temp.itemWaiting&&(g_temp.itemWaiting=null);var slides=t.getSlidesReference();switch(direction){case"right":setItemToSlide(slides.objPrevSlide,objItem),positionSlides();var destX=-g_functions.getElementSize(slides.objPrevSlide).left;t.switchSlideNums("right");break;case"left":setItemToSlide(slides.objNextSlide,objItem),positionSlides();var destX=-g_functions.getElementSize(slides.objNextSlide).left;t.switchSlideNums("left");break;default:throw new Error("wrong direction: "+direction)}var transSpeed=g_options.slider_transition_speed,transEasing=g_options.slider_transition_easing,animateParams={duration:transSpeed,easing:transEasing,queue:!1,always:function(){if(t.stopSlideAction(),g_objVideoPlayer.hide(),null!=g_temp.itemWaiting){var a=getSlideDirection(g_temp.itemWaiting);transitionSlide(a,g_temp.itemWaiting)}else t.placeNabourItems(),g_objThis.trigger(t.events.TRANSITION_END)}};g_objInner.animate({left:destX+"px"},animateParams)}function animateOpacity(objItem,opacity,completeFunction){completeFunction?objItem.fadeTo(g_options.slider_transition_speed,opacity,completeFunction):objItem.fadeTo(g_options.slider_transition_speed,opacity)}function transitionFade(objItem,noAnimation,noHidePlayer){if(!noAnimation)var noAnimation=!1;var slides=t.getSlidesReference();setItemToSlide(slides.objNextSlide,objItem);var objCurrentPos=g_functions.getElementSize(slides.objCurrentSlide);g_functions.placeElement(slides.objNextSlide,objCurrentPos.left,objCurrentPos.top);var currentNum=g_temp.numCurrent;(g_temp.numCurrent=g_temp.numNext,g_temp.numNext=currentNum,g_objThis.trigger(t.events.ITEM_CHANGED),slides.objNextSlide.stop(!0),slides.objCurrentSlide.stop(!0),!0==noAnimation)?(slides.objCurrentSlide.fadeTo(0,0),slides.objNextSlide.fadeTo(0,1),t.placeNabourItems(),g_objThis.trigger(t.events.TRANSITION_END),!0!==noHidePlayer&&g_objVideoPlayer.hide()):(slides.objNextSlide.fadeTo(0,0),animateOpacity(slides.objCurrentSlide,0,function(){t.placeNabourItems(),g_objThis.trigger(t.events.TRANSITION_END),!0!==noHidePlayer&&g_objVideoPlayer.hide()}),!0==g_objVideoPlayer.isVisible()&&animateOpacity(g_objVideoPlayer.getObject(),0),animateOpacity(slides.objNextSlide,1))}function modifyForMobile(){!0==g_options.slider_fullscreen_button_mobilehide&&g_objButtonFullscreen&&g_objButtonFullscreen.hide(),!0==g_options.slider_play_button_mobilehide&&g_objButtonPlay&&g_objButtonPlay.hide(),!0==g_options.slider_zoompanel_mobilehide&&g_objZoomPanel&&g_objZoomPanel.getElement().hide()}function modifyForDesctop(){!0==g_options.slider_fullscreen_button_mobilehide&&g_objButtonFullscreen&&g_objButtonFullscreen.show(),!0==g_options.slider_play_button_mobilehide&&g_objButtonPlay&&g_objButtonPlay.show(),!0==g_options.slider_zoompanel_mobilehide&&g_objZoomPanel&&g_objZoomPanel.getElement().show()}function checkMobileModify(){g_gallery.isMobileMode()?modifyForMobile():modifyForDesctop()}function getControlsObjects(){return g_objSlider.children(".ug-slider-control")}function hideControls(noAnimation){if(!1==g_functions.isTimePassed("sliderControlsToggle")|| !1==g_temp.isControlsVisible)return!1;if(!noAnimation)var noAnimation=!1;var objControls=getControlsObjects();!0===noAnimation?objControls.stop().fadeTo(0,0).hide():objControls.stop().fadeTo(g_options.slider_controls_appear_duration,0,function(){objControls.hide()}),g_temp.isControlsVisible=!1}function showControls(noAnimation){if(!1==g_functions.isTimePassed("sliderControlsToggle"))return!1;if(!0==g_temp.isControlsVisible)return!0;if(!noAnimation)var noAnimation=!1;var objControls=getControlsObjects();!0===noAnimation?objControls.stop().show():(objControls.stop().show().fadeTo(0,0),objControls.fadeTo(g_options.slider_controls_appear_duration,1)),g_temp.isControlsVisible=!0}function toggleControls(){!1==g_temp.isControlsVisible?showControls():hideControls()}function setControlsMode(mode){if(mode==g_temp.currentControlsMode)return!1;switch(mode){case"image":g_objZoomPanel&&g_objZoomPanel.getElement().show();break;case"video":g_objZoomPanel&&g_objZoomPanel.getElement().hide();break;default:throw new Error("wrong controld mode: "+mode)}g_temp.currentControlsMode=mode}function onItemChange(data,arg_objItem,role){var objItem=g_gallery.getSelectedItem();t.setItem(objItem,!1,role);var itemIndex=objItem.index;g_objBullets&&g_objBullets.setActive(itemIndex),g_objTextPanel&& !1==g_temp.isTextPanelSaparateHover&&showTextPanel(),"image"==objItem.type?setControlsMode("image"):setControlsMode("video")}function onBulletClick(event,bulletIndex){g_gallery.selectItem(bulletIndex)}function onClick(event){if(g_objTouchSlider&& !1==g_objTouchSlider.isTapEventOccured(event))return!0;g_objThis.trigger(t.events.CLICK,event)}function onActualClick(){var isClickable=t.getCurrentSlide().hasClass("ug-slide-clickable"),objItem=t.getCurrentItem();if(isClickable)return!1==g_options.slider_links_newpage?location.href=objItem.link:window.open(objItem.link,"_blank"),!0;!1==g_options.slider_controls_always_on&& !0==g_options.slider_controls_appear_ontap&& !0==t.isCurrentSlideType("image")&&(toggleControls(),g_objTextPanel&& !0==g_options.slider_textpanel_always_on&&t.isCurrentSlideType("image")&&t.isCurrentSlideImageFit()&&showTextPanel())}function onZoomChange(event){g_objTextPanel&&t.isCurrentSlideType("image")&& !1==t.isCurrentSlideImageFit()&&hideTextPanel()}function onMouseEnter(){showControls()}function onMouseLeave(){hideControls()}function objVideoPlayClick(objButton){var objSlide=objButton.parent();t.startSlideAction(objSlide)}function onVideoPlayerShow(){g_gallery.isPlayMode()&&g_gallery.pausePlaying(),g_objThis.trigger(t.events.ACTION_START)}function onVideoPlayerHide(){g_gallery.isPlayMode()&&g_gallery.continuePlaying(),g_objThis.trigger(t.events.ACTION_END)}function onItemImageUpdate(event,index,urlImage){g_objSlide1.data("index")==index&&setImageToSlide(g_objSlide1,objItem=g_gallery.getItem(index),!0),g_objSlide2.data("index")==index&&setImageToSlide(g_objSlide2,objItem=g_gallery.getItem(index),!0),g_objSlide3.data("index")==index&&setImageToSlide(g_objSlide3,objItem=g_gallery.getItem(index),!0)}function onSlideImageLoaded(data,objSlide){objSlide=jQuery(objSlide);var objImage=t.getSlideImage(objSlide),objButtonVideoPlay=getSlideVideoPlayButton(objSlide),objSize=g_functions.getElementSize(objImage);g_functions.placeElement(objButtonVideoPlay,"center","middle",objSize.left,objSize.top,objImage)}function initSlideEvents(objSlide){var objVideoPlayButton=getSlideVideoPlayButton(objSlide);g_functions.addClassOnHover(objVideoPlayButton),g_functions.setButtonOnClick(objVideoPlayButton,objVideoPlayClick)}function initEvents(){g_objGallery.on(g_gallery.events.ITEM_IMAGE_UPDATED,onItemImageUpdate),g_objGallery.on(g_gallery.events.ITEM_CHANGE,onItemChange),g_objBullets&&jQuery(g_objBullets).on(g_objBullets.events.BULLET_CLICK,onBulletClick),!0==g_options.slider_enable_arrows&&(g_functions.addClassOnHover(g_objArrowRight,"ug-arrow-hover"),g_functions.addClassOnHover(g_objArrowLeft,"ug-arrow-hover"),g_gallery.setNextButton(g_objArrowRight),g_gallery.setPrevButton(g_objArrowLeft)),!1==g_options.slider_controls_always_on&&g_objSlider.hover(onMouseEnter,onMouseLeave),g_objSlider.on("touchend click",onClick),g_objThis.on(t.events.CLICK,onActualClick),g_objTextPanel&& !0==g_temp.isTextPanelSaparateHover&&g_objSlider.hover(showTextPanel,hideTextPanel),g_objButtonPlay&&(g_functions.addClassOnHover(g_objButtonPlay,"ug-button-hover"),g_gallery.setPlayButton(g_objButtonPlay)),g_objButtonFullscreen&&(g_functions.addClassOnHover(g_objButtonFullscreen,"ug-button-hover"),g_gallery.setFullScreenToggleButton(g_objButtonFullscreen)),g_objZoomSlider&&g_objThis.on(t.events.ZOOM_CHANGE,onZoomChange),g_objZoomPanel&&g_objZoomPanel.initEvents(),g_objVideoPlayer.initEvents(),jQuery(g_objVideoPlayer).on(g_objVideoPlayer.events.SHOW,onVideoPlayerShow),jQuery(g_objVideoPlayer).on(g_objVideoPlayer.events.HIDE,onVideoPlayerHide),initSlideEvents(g_objSlide1),initSlideEvents(g_objSlide2),initSlideEvents(g_objSlide3),g_objThis.on(t.events.AFTER_PUT_IMAGE,onSlideImageLoaded),g_objSlider.on("mouseenter",".ug-item-wrapper img",function(a){g_objThis.trigger(t.events.IMAGE_MOUSEENTER)}),g_objSlider.on("mouseleave",".ug-item-wrapper img",function(a){!1==t.isMouseInsideSlideImage(a)&&g_objThis.trigger(t.events.IMAGE_MOUSELEAVE)})}function getLoaderClass(){var loaderClass;switch(g_options.slider_loader_type){default:case 1:loaderClass="ug-loader1";break;case 2:loaderClass="ug-loader2";break;case 3:loaderClass="ug-loader3";break;case 4:loaderClass="ug-loader4";break;case 5:loaderClass="ug-loader5";break;case 6:loaderClass="ug-loader6";break;case 7:loaderClass="ug-loader7";break;case 8:loaderClass="ug-loader8";break;case 9:loaderClass="ug-loader9"}return"black"==g_options.slider_loader_color&&(loaderClass+=" ug-loader-black"),loaderClass}function getSlideByNum(num){switch(num){case 1:return g_objSlide1;case 2:return g_objSlide2;case 3:return g_objSlide3;default:throw new Error("wrong num: "+num)}}function getSlideDirection(objItem){var currentIndex=t.getSlidesReference().objCurrentSlide.data("index"),nextIndex=objItem.index,direction="left";return currentIndex>nextIndex&&(direction="right"),direction}function getSlidePreloader(objSlide){if(!objSlide)var objSlide=t.getCurrentSlide();return objSlide.children(".ug-slider-preloader")}function getSlideVideoPlayButton(objSlide){return objSlide.children(".ug-button-videoplay")}function getSlideItem(objSlide){if(!objSlide)var objSlide=t.getCurrentSlide();var index=objSlide.data("index");return void 0==index?null:g_gallery.getItem(index)}this.switchSlideNums=function(b){switch(g_objThis.trigger(t.events.BEFORE_SWITCH_SLIDES),b){case"left":var a=g_temp.numCurrent;g_temp.numCurrent=g_temp.numNext,g_temp.numNext=g_temp.numPrev,g_temp.numPrev=a;break;case"right":var a=g_temp.numCurrent;g_temp.numCurrent=g_temp.numPrev,g_temp.numPrev=g_temp.numNext,g_temp.numNext=a;break;default:throw new Error("wrong direction: "+b)}g_objThis.trigger(t.events.ITEM_CHANGED)},this.destroy=function(){g_objThis.off(t.events.AFTER_PUT_IMAGE),g_objGallery.off(g_gallery.events.ITEM_IMAGE_UPDATED),g_objGallery.off(g_gallery.events.ITEM_CHANGE),g_objBullets&&jQuery(g_objBullets).on(g_objBullets.events.BULLET_CLICK),g_objSlider.off("mouseenter"),g_objSlider.off("mouseleave"),g_objSlider.off("touchend"),g_objSlider.off("click"),g_objThis.off(t.events.CLICK),g_objZoomSlider&&g_objThis.off(t.events.ZOOM_CHANGE),g_objThis.off(t.events.BEFORE_SWITCH_SLIDES),jQuery(g_objVideoPlayer).off(g_objVideoPlayer.events.SHOW),jQuery(g_objVideoPlayer).off(g_objVideoPlayer.events.HIDE),g_objVideoPlayer.destroy(),g_objSlider.off("mouseenter",".ug-item-wrapper img"),g_objSlider.off("mouseleave",".ug-item-wrapper img")},this.________EXTERNAL_GENERAL___________=function(){},this.init=function(a,b,c){initSlider(a,b,c)},this.getSlideImage=function(a){if(!a)var a=t.getCurrentSlide();return a.find(".ug-item-wrapper img")},this.setHtml=function(a){setHtmlSlider(a)},this.run=function(){runSlider()},this.isInnerInPlace=function(){var a=t.getSlidesReference(),b=-g_functions.getElementSize(a.objCurrentSlide).left,c=g_functions.getElementSize(g_objInner);return b==c.left},this.isAnimating=function(){return g_objInner.is(":animated")},this.isSlideCurrent=function(a){var b=a.data("slidenum");return g_temp.numCurrent==b},this.isSlideHasItem=function(a){var b;return null!=a.data("index")},this.getObjImagePadding=function(){return{padding_top:g_options.slider_image_padding_top,padding_bottom:g_options.slider_image_padding_bottom,padding_left:g_options.slider_image_padding_left,padding_right:g_options.slider_image_padding_right}},this.getSlidesReference=function(){return{objPrevSlide:getSlideByNum(g_temp.numPrev),objNextSlide:getSlideByNum(g_temp.numNext),objCurrentSlide:getSlideByNum(g_temp.numCurrent)}},this.getCurrentSlide=function(){return t.getSlidesReference().objCurrentSlide},this.getCurrentItemIndex=function(){var a=t.getSlidesReference().objCurrentSlide.data("index");return null==a&&(a=-1),a},this.getCurrentItem=function(){var a=t.getCurrentItemIndex();return -1==a?null:g_gallery.getItem(a)},this.getSlideType=function(a){return void 0==a&&(a=t.getCurrentSlide()),a.data("type")},this.isMouseInsideSlideImage=function(c){var b=t.getSlideImage(),a=g_functions.getMousePosition(c);void 0===a.pageX&&(a=g_objTouchSlider.getLastMousePos());var d=g_functions.getMouseElementPoint(a,b),e=g_functions.getElementSize(b);return g_functions.isPointInsideElement(d,e)},this.isCurrentSlideType=function(a){return t.getSlideType()==a},this.isCurrentSlideLoadingImage=function(){return!0===t.getCurrentSlide().data("isLoading")},this.setItem=function(c,g,e){var f=t.getSlidesReference(),a=f.objCurrentSlide.data("index"),d=c.index;if(d==a)return!0;if(void 0==a)setItemToSlide(f.objCurrentSlide,c),t.placeNabourItems();else{var b="left";g_gallery.getNumItems(),"next"==e?b="left":"prev"==e||a>d?b="right":a>d&&(b="right"),doTransition(b,c,g)}},this.placeNabourItems=function(){var a=t.getSlidesReference(),b=a.objCurrentSlide.data("index"),c=g_gallery.getPrevItem(b),d=g_gallery.getNextItem(b);setItemToSlide(a.objNextSlide,d),setItemToSlide(a.objPrevSlide,c),positionSlides()},this.________EXTERNAL_API___________=function(){},this.stopSlideAction=function(a,b){a||(a=t.getCurrentSlide()),!0===b?g_objVideoPlayer.pause():g_objVideoPlayer.hide()},this.startSlideAction=function(b){b||(b=t.getCurrentSlide());var a=getSlideItem(b);if("image"==a.type)return!0;switch(!0==g_options.slider_video_constantsize&&setVideoPlayerConstantSize(),setVideoPlayerPosition(),g_objVideoPlayer.show(),a.type){case"youtube":g_objVideoPlayer.playYoutube(a.videoid,!0,a.video_start);break;case"vimeo":g_objVideoPlayer.playVimeo(a.videoid);break;case"html5video":g_objVideoPlayer.playHtml5Video(a.videoogv,a.videowebm,a.videomp4,a.urlImage);break;case"soundcloud":g_objVideoPlayer.playSoundCloud(a.trackid);break;case"wistia":g_objVideoPlayer.playWistia(a.videoid)}},this.getScaleMode=function(a){if(!a)var a=t.getCurrentSlide();return"image"!=t.getSlideType(a)?g_options.slider_scale_mode_media:g_options.slider_scale_mode==g_options.slider_scale_mode_fullscreen?g_options.slider_scale_mode:!0==g_gallery.isFullScreen()?g_options.slider_scale_mode_fullscreen:g_options.slider_scale_mode},this.getObjects=function(){return{g_objSlider:g_objSlider,g_objInner:g_objInner,g_options:g_options,g_objZoomSlider:g_objZoomSlider}},this.getObjZoom=function(){return g_objZoomSlider},this.getOptions=function(){return g_options},this.getElement=function(){return g_objSlider},this.getVideoObject=function(){return g_objVideoPlayer},this.isCurrentSlideImageFit=function(){var a=t.getCurrentSlide();t.getSlideType(a),validateSlideType("image",a);var b=t.getSlideImage(a);return 0!=b.length&&g_functions.isImageFitParent(b)},this.isCurrentImageInPlace=function(){var a=t.getSlideImage();if(0==a.length)return!1;var d=t.getScaleMode(),e=t.getObjImagePadding(),b=getSlideItem(),f=a.parent(),g=g_functions.getImageInsideParentData(f,b.imageWidth,b.imageHeight,d,e),h=g_functions.getElementSize(a),c=!1;return g.imageWidth==h.width&&(c=!0),c},this.isSlideActionActive=function(){return g_objVideoPlayer.isVisible()},this.isSwiping=function(){return!!g_objTouchSlider&&g_objTouchSlider.isTouchActive()},this.isPreloading=function(){return!!getSlidePreloader().is(":visible")},this.setOptions=function(a){g_optionsPrefix&&(a=g_functions.convertCustomPrefixOptions(a,g_optionsPrefix,"slider")),g_options=jQuery.extend(g_options,a)},this.setSize=function(b,a){if(b<0||a<0)return!0;var f={};f.width=b+"px",f.height=a+"px",g_objSlider.css(f);var e={};e.height=a+"px",e.top="0px",e.left="0px",g_objInner.css(e);var c={};c.height=a+"px",c.width=b+"px",g_objSlide1.css(c),g_objSlide2.css(c),g_objSlide3.css(c);var g=b-g_options.slider_item_padding_left-g_options.slider_item_padding_right,h=a-g_options.slider_item_padding_top-g_options.slider_item_padding_bottom,d={};d.width=g+"px",d.height=h+"px",d.top=g_options.slider_item_padding_top+"px",d.left=g_options.slider_item_padding_left+"px",g_objSlider.find(".ug-item-wrapper").css(d),g_objTextPanel&&g_objTextPanel.setSizeByParent(),positionElements(),resizeSlideItem(g_objSlide1),resizeSlideItem(g_objSlide2),resizeSlideItem(g_objSlide3),positionSlides();var i=t.getSlideType();if("image"!=i&& !0==g_options.slider_video_constantsize)setVideoPlayerConstantSize();else{var j=b-g_options.slider_video_padding_left-g_options.slider_video_padding_right,k=a-g_options.slider_video_padding_top-g_options.slider_video_padding_bottom;g_objVideoPlayer.setSize(j,k)}setVideoPlayerPosition()},this.refreshSlideItems=function(){if(!0==t.isAnimating())return!0;resizeSlideItem(g_objSlide1),resizeSlideItem(g_objSlide2),resizeSlideItem(g_objSlide3),positionSlides()},this.isMouseOver=function(){return g_objSlider.ismouseover()},this.setPosition=function(a,b){g_functions.placeElement(g_objSlider,a,b)},this.zoomIn=function(){if(!g_objZoomSlider)return!0;g_objZoomSlider.zoomIn()},this.zoomOut=function(){if(!g_objZoomSlider)return!0;g_objZoomSlider.zoomOut()},this.zoomBack=function(){if(!g_objZoomSlider)return!0;g_objZoomSlider.zoomBack()}}function UGTextPanel(){var g_objPanel,g_objParent,g_objTitle,g_objDesc,g_objBG,g_objTextWrapper,g_gallery,t=this,g_functions=new UGFunctions,g_optionsPrefix="",g_options={textpanel_align:"bottom",textpanel_margin:0,textpanel_text_valign:"middle",textpanel_padding_top:10,textpanel_padding_bottom:10,textpanel_height:null,textpanel_padding_title_description:5,textpanel_padding_right:11,textpanel_padding_left:11,textpanel_fade_duration:200,textpanel_enable_title:!0,textpanel_enable_description:!0,textpanel_title_as_link:!1,textpanel_title_link_newtab:!0,textpanel_enable_bg:!0,textpanel_bg_color:"#000000",textpanel_bg_opacity:.4,textpanel_title_color:null,textpanel_title_font_family:null,textpanel_title_text_align:null,textpanel_title_font_size:null,textpanel_title_bold:null,textpanel_css_title:{},textpanel_desc_color:null,textpanel_desc_font_family:null,textpanel_desc_text_align:null,textpanel_desc_font_size:null,textpanel_desc_bold:null,textpanel_css_description:{},textpanel_desc_style_as_title:!1,textpanel_bg_css:{}},g_temp={isFirstTime:!0,setInternalHeight:!0,lastTitleBottom:0,lastDescHeight:0};function positionElementsTop(animateHeight,startY){if(!startY)var startY=g_options.textpanel_padding_top;var maxy=startY;if(g_objTitle){var titleY=maxy;if(g_functions.placeElement(g_objTitle,0,titleY),!0==g_objTitle.is(":visible")){var maxy=g_functions.getElementSize(g_objTitle).bottom;maxy>0&&(g_temp.lastTitleBottom=maxy)}else{var maxy=20;g_temp.lastTitleBottom>0&&(maxy=g_temp.lastTitleBottom)}}var textDesc="";if(g_objDesc&&(textDesc=jQuery.trim(g_objDesc.text())),""!=textDesc){var descY=maxy;if(g_objTitle&&(descY+=g_options.textpanel_padding_title_description),g_functions.placeElement(g_objDesc,0,descY),!0==jQuery(g_objDesc).is(":visible")){var objDescSize=g_functions.getElementSize(g_objDesc);maxy=objDescSize.bottom,objDescSize.height>0&&(g_temp.lastDescHeight=objDescSize.height)}else{var descHeight=16;g_temp.lastDescHeight>0&&(descHeight=g_temp.lastDescHeight),maxy=descY+descHeight}}g_options.textpanel_height|| !0!=g_temp.setInternalHeight||setHeight(maxy+g_options.textpanel_padding_bottom,animateHeight)}function getTotalTextHeight(){var totalHeight=0;if(g_objTitle&&(totalHeight+=g_objTitle.outerHeight()),g_objDesc){var textDesc="";g_objDesc&&(textDesc=jQuery.trim(g_objDesc.text())),""!=textDesc&&(g_objTitle&&(totalHeight+=g_options.textpanel_padding_title_description),totalHeight+=g_objDesc.outerHeight())}return totalHeight}function positionElementsMiddle(){var totalTextHeight=getTotalTextHeight();positionElementsTop(!1,(g_objTextWrapper.height()-totalTextHeight)/2)}function positionElementBottom(){var totalTextHeight=getTotalTextHeight();positionElementsTop(!1,g_objTextWrapper.height()-totalTextHeight-g_options.textpanel_padding_bottom)}function setHeight(height,animateHeight){if(!animateHeight)var animateHeight=!1;if(!0==animateHeight){g_objBG&&height>g_objBG.height()&&g_objBG.height(height);var objCss={height:height+"px"};g_objPanel.add(g_objTextWrapper).animate(objCss,g_options.textpanel_fade_duration)}else g_objBG&&g_objBG.height(height),g_objPanel.add(g_objTextWrapper).height(height)}function setCss(){if(!0==g_options.textpanel_enable_bg){(g_objBG=g_objPanel.children(".ug-textpanel-bg")).fadeTo(0,g_options.textpanel_bg_opacity);var objCssBG={"background-color":g_options.textpanel_bg_color};objCssBG=jQuery.extend(objCssBG,g_options.textpanel_bg_css),g_objBG.css(objCssBG)}if(!0==g_options.textpanel_enable_title){g_objTitle=g_objTextWrapper.children(".ug-textpanel-title");var objCssTitle={};null!==g_options.textpanel_title_color&&(objCssTitle.color=g_options.textpanel_title_color),null!==g_options.textpanel_title_font_family&&(objCssTitle["font-family"]=g_options.textpanel_title_font_family),null!==g_options.textpanel_title_text_align&&(objCssTitle["text-align"]=g_options.textpanel_title_text_align),null!==g_options.textpanel_title_font_size&&(objCssTitle["font-size"]=g_options.textpanel_title_font_size+"px"),null!==g_options.textpanel_title_bold&&(!0===g_options.textpanel_title_bold?objCssTitle["font-weight"]="bold":objCssTitle["font-weight"]="normal"),g_options.textpanel_css_title&&(objCssTitle=jQuery.extend(objCssTitle,g_options.textpanel_css_title)),g_objTitle.css(objCssTitle)}if(!0==g_options.textpanel_enable_description){g_objDesc=g_objTextWrapper.children(".ug-textpanel-description");var objCssDesc={};null!==g_options.textpanel_desc_color&&(objCssDesc.color=g_options.textpanel_desc_color),null!==g_options.textpanel_desc_font_family&&(objCssDesc["font-family"]=g_options.textpanel_desc_font_family),null!==g_options.textpanel_desc_text_align&&(objCssDesc["text-align"]=g_options.textpanel_desc_text_align),null!==g_options.textpanel_desc_font_size&&(objCssDesc["font-size"]=g_options.textpanel_desc_font_size+"px"),null!==g_options.textpanel_desc_bold&&(!0===g_options.textpanel_desc_bold?objCssDesc["font-weight"]="bold":objCssDesc["font-weight"]="normal"),g_options.textpanel_css_title&&(objCssDesc=jQuery.extend(objCssDesc,g_options.textpanel_css_description)),g_objDesc.css(objCssDesc)}}function onItemChange(){var objItem=g_gallery.getSelectedItem();t.setText(objItem.title,objItem.description,objItem.link)}function initEvents(){jQuery(g_gallery).on(g_gallery.events.ITEM_CHANGE,onItemChange)}this.positionElements=function(a){if(!g_options.textpanel_height||"top"==g_options.textpanel_text_valign)return positionElementsTop(a),!1;switch(g_options.textpanel_text_valign){default:case"top":positionElementsTop(!1);break;case"bottom":positionElementBottom();break;case"center":case"middle":positionElementsMiddle()}},this.init=function(c,a,b){if(g_gallery=c,b&&(g_optionsPrefix=b,a=g_functions.convertCustomPrefixOptions(a,g_optionsPrefix,"textpanel")),a&&(g_options=jQuery.extend(g_options,a)),!1==g_options.textpanel_enable_title&& !1==g_options.textpanel_enable_description)throw new Error("Textpanel Error: The title or description must be enabled");g_options.textpanel_height&&g_options.textpanel_height<0&&(g_options.textpanel_height=null),!0!=g_options.textpanel_desc_style_as_title||(g_options.textpanel_desc_color||(g_options.textpanel_desc_color=g_options.textpanel_title_color),g_options.textpanel_desc_bold||(g_options.textpanel_desc_bold=g_options.textpanel_title_bold),g_options.textpanel_desc_font_family||(g_options.textpanel_desc_font_family=g_options.textpanel_title_font_family),g_options.textpanel_desc_font_size||(g_options.textpanel_desc_font_size=g_options.textpanel_title_font_size),g_options.textpanel_desc_text_align||(g_options.textpanel_desc_text_align=g_options.textpanel_title_text_align))},this.appendHTML=function(c,a){g_objParent=c;var b="<div class='ug-textpanel"+(a=a?" "+a:"")+"'>";!0==g_options.textpanel_enable_bg&&(b+="<div class='ug-textpanel-bg"+a+"'></div>"),b+="<div class='ug-textpanel-textwrapper"+a+"'>",!0==g_options.textpanel_enable_title&&(b+="<div class='ug-textpanel-title"+a+"'></div>"),!0==g_options.textpanel_enable_description&&(b+="<div class='ug-textpanel-description"+a+"'></div>"),b+="</div></div>",c.append(b),g_objTextWrapper=(g_objPanel=c.children(".ug-textpanel")).children(".ug-textpanel-textwrapper"),setCss()},this.destroy=function(){jQuery(g_gallery).off(g_gallery.events.ITEM_CHANGE)},this.run=function(){t.setSizeByParent(),initEvents()},this.setPanelSize=function(b,a){if(g_temp.setInternalHeight=!0,a)g_temp.setInternalHeight=!1;else var a=80;g_options.textpanel_height&&(a=g_options.textpanel_height),g_objPanel.width(b),g_objPanel.height(a),g_objBG&&(g_objBG.width(b),g_objBG.height(a));var c=b-g_options.textpanel_padding_left-g_options.textpanel_padding_right,d=g_options.textpanel_padding_left;g_functions.setElementSizeAndPosition(g_objTextWrapper,d,0,c,a),g_objTitle&&g_objTitle.width(c),g_objDesc&&g_objDesc.width(c),!1==g_temp.isFirstTime&&t.positionElements(!1)},this.setSizeByParent=function(){var a=g_functions.getElementSize(g_objParent);t.setPanelSize(a.width)},this.setTextPlain=function(a,d,b){if(!0==g_options.textpanel_title_as_link&&a&&b){var c="";!0==g_options.textpanel_title_link_newtab&&(c+=' target="blank"'),a='<a class="ug-textpanel-link" href="'+b+'" '+c+">"+a+"</a>"}g_objTitle&&g_objTitle.html(a),g_objDesc&&g_objDesc.html(d)},this.setText=function(a,b,c){!0==g_temp.isFirstTime?(t.setTextPlain(a,b,c),g_temp.isFirstTime=!1,t.positionElements(!1)):g_objTextWrapper.stop().fadeTo(g_options.textpanel_fade_duration,0,function(){t.setTextPlain(a,b,c),t.positionElements(!0),jQuery(this).fadeTo(g_options.textpanel_fade_duration,1)})},this.positionPanel=function(b,c){var a={};if(null!=b)a.top=b,a.bottom="auto";else switch(g_options.textpanel_align){case"top":a.top=g_options.textpanel_margin+"px";break;case"bottom":a.top="auto",a.bottom=g_options.textpanel_margin+"px";break;case"middle":a.top=g_functions.getElementRelativePos(g_objPanel,"middle",g_options.textpanel_margin)}null!=c&&(a.left=c),g_objPanel.css(a)},this.setOptions=function(a){g_optionsPrefix&&(a=g_functions.convertCustomPrefixOptions(a,g_optionsPrefix,"textpanel")),g_options=jQuery.extend(g_options,a)},this.getElement=function(){return g_objPanel},this.getSize=function(){return g_functions.getElementSize(g_objPanel)},this.refresh=function(b,c,a,d){setCss(),a?t.setPanelSize(a,d):t.setSizeByParent(),t.positionElements(!1),!0!==c&&t.positionPanel(),!0===b&&t.show()},this.hide=function(){g_objPanel.hide()},this.show=function(){g_objPanel.show()},this.getOptions=function(){return g_options},this.getOption=function(a){return!1==g_options.hasOwnProperty(a)?null:g_options[a]}}function UGZoomButtonsPanel(){var g_objPanel,g_objParent,g_objButtonPlus,g_objButtonMinus,g_objButtonReturn,t=this,g_slider=new UGSlider,g_functions=new UGFunctions,g_options={slider_zoompanel_skin:""};function isButtonDisabled(objButton){return!!(!objButton||objButton.hasClass("ug-zoompanel-button-disabled"))}function disableButton(objButton){objButton&&objButton.addClass("ug-zoompanel-button-disabled")}function enableButton(objButton){objButton&&objButton.removeClass("ug-zoompanel-button-disabled")}function onZoomChange(){if(!1==g_slider.isCurrentSlideType("image"))return!0;!0==g_slider.isCurrentSlideImageFit()?!1==isButtonDisabled(g_objButtonMinus)&&(disableButton(g_objButtonMinus),disableButton(g_objButtonReturn)):!0==isButtonDisabled(g_objButtonMinus)&&(enableButton(g_objButtonMinus),enableButton(g_objButtonReturn))}this.init=function(b,a){g_slider=b,a&&(g_options=jQuery.extend(g_options,a))},this.appendHTML=function(b){g_objParent=b;var a="<div class='ug-slider-control ug-zoompanel ug-skin-"+g_options.slider_zoompanel_skin+"'>";a+="<div class='ug-zoompanel-button ug-zoompanel-plus'></div>",a+="<div class='ug-zoompanel-button ug-zoompanel-minus ug-zoompanel-button-disabled'></div>",a+="<div class='ug-zoompanel-button ug-zoompanel-return ug-zoompanel-button-disabled'></div>",a+="</div>",b.append(a),g_objButtonPlus=(g_objPanel=b.children(".ug-zoompanel")).children(".ug-zoompanel-plus"),g_objButtonMinus=g_objPanel.children(".ug-zoompanel-minus"),g_objButtonReturn=g_objPanel.children(".ug-zoompanel-return")},this.setObjects=function(a,b,c){g_objButtonPlus=a,g_objButtonMinus=b,g_objButtonReturn=c,g_objButtonMinus&&g_objButtonMinus.addClass("ug-zoompanel-button-disabled"),g_objButtonReturn&&g_objButtonReturn.addClass("ug-zoompanel-button-disabled")},this.getElement=function(){return g_objPanel},t.initEvents=function(){g_functions.addClassOnHover(g_objButtonPlus,"ug-button-hover"),g_functions.addClassOnHover(g_objButtonMinus,"ug-button-hover"),g_functions.addClassOnHover(g_objButtonReturn,"ug-button-hover"),g_functions.setButtonOnClick(g_objButtonPlus,function(){if(!0==isButtonDisabled(g_objButtonPlus))return!0;g_slider.zoomIn()}),g_functions.setButtonOnClick(g_objButtonMinus,function(){if(!0==isButtonDisabled(g_objButtonMinus))return!0;g_slider.zoomOut()}),g_functions.setButtonOnClick(g_objButtonReturn,function(){if(!0==isButtonDisabled(g_objButtonReturn))return!0;g_slider.zoomBack()}),jQuery(g_slider).on(g_slider.events.ZOOM_CHANGE,onZoomChange),jQuery(g_slider).on(g_slider.events.ITEM_CHANGED,onZoomChange)}}function UGBullets(){var g_objBullets,g_objParent,g_bulletWidth,t=this,g_numBullets=0,g_gallery=new UniteGalleryMain,g_activeIndex=-1,g_functions=new UGFunctions,g_temp={isInited:!1},g_options={bullets_skin:"",bullets_addclass:"",bullets_space_between:-1};function setHtmlBullets(){var html="",addHtml="";-1!=g_options.bullets_space_between&&(addHtml=" style='margin-left:"+g_options.bullets_space_between+"px'");for(var i=0;i<g_numBullets;i++)0==i?html+="<div class='ug-bullet'></div>":html+="<div class='ug-bullet'"+addHtml+"></div>";if(g_objBullets.html(html),!g_bulletWidth){var objBullet=g_objBullets.find(".ug-bullet:first-child");objBullet.length&&(g_bulletWidth=objBullet.width())}}function onBulletClick(objBullet){if(!0==t.isActive(objBullet))return!0;var index=objBullet.index();jQuery(t).trigger(t.events.BULLET_CLICK,index)}function initEvents(){var objBullets=g_objBullets.children(".ug-bullet");g_functions.setButtonOnClick(objBullets,onBulletClick),objBullets.on("mousedown mouseup",function(a){return!1})}function validateIndex(index){if(index<0||index>=g_numBullets)throw new Error("wrong bullet index: "+index)}function validateInited(){if(!0==g_temp.isInited)return!0;throw new Error("The bullets are not inited!")}this.events={BULLET_CLICK:"bullet_click"},this.init=function(a,b,c){g_gallery=a,g_numBullets=c||g_gallery.getNumItems(),g_temp.isInited=!0,""==(g_options=jQuery.extend(g_options,b)).bullets_skin&&(g_options.bullets_skin=g_options.gallery_skin)},this.getBulletsWidth=function(){return 0!=g_numBullets&&g_bulletWidth?g_numBullets*g_bulletWidth+(g_numBullets-1)*g_options.bullets_space_between:0},this.appendHTML=function(a){g_objParent=a,validateInited();var b="";""!=g_options.bullets_addclass&&(b=" "+g_options.bullets_addclass);var c="<div class='ug-slider-control ug-bullets ug-skin-"+g_options.bullets_skin+b+"'>";c+="</div>",g_objBullets=jQuery(c),a.append(g_objBullets),setHtmlBullets(),initEvents()},this.updateNumBullets=function(a){g_numBullets=a,setHtmlBullets(),initEvents()},this.getElement=function(){return g_objBullets},this.setActive=function(a){validateInited(),validateIndex(a);var b=g_objBullets.children(".ug-bullet");b.removeClass("ug-bullet-active"),jQuery(b[a]).addClass("ug-bullet-active"),g_activeIndex=a},this.isActive=function(a){if(validateIndex(a),"number"!=typeof a)var b=a;else var b=g_objBullets.children(".ug-bullet")[a];return!!b.hasClass("ug-bullet-active")},this.getNumBullets=function(){return g_numBullets}}function UGProgressBar(){var g_objBar,g_objInner,t=this,g_percent=0,g_functions=new UGFunctions,g_options={slider_progressbar_color:"#ffffff",slider_progressbar_opacity:.6,slider_progressbar_line_width:5};this.put=function(a,b){b&&(g_options=jQuery.extend(g_options,b)),a.append("<div class='ug-progress-bar'><div class='ug-progress-bar-inner'></div></div>"),(g_objInner=(g_objBar=a.children(".ug-progress-bar")).children(".ug-progress-bar-inner")).css("background-color",g_options.slider_progressbar_color),g_objBar.height(g_options.slider_progressbar_line_width),g_objInner.height(g_options.slider_progressbar_line_width),g_objInner.width("0%");var c=g_options.slider_progressbar_opacity,d=g_objInner[0];d.style.opacity=c,d.style.filter="alpha(opacity="+100*c+")"},this.putHidden=function(a,b){t.put(a,b),g_objBar.hide()},this.getElement=function(){return g_objBar},this.setSize=function(a){g_objBar.width(a),g_objInner.width(a),t.draw()},this.setPosition=function(a,b,c,d){g_functions.placeElement(g_objBar,a,b,c,d)},this.draw=function(){var a=100*g_percent;g_objInner.width(a+"%")},this.setProgress=function(a){g_percent=g_functions.normalizePercent(a),t.draw()},this.getType=function(){return"bar"}}function UGProgressPie(){var g_percent,g_objPie,t=this,g_isInited=!1,g_functions=new UGFunctions,g_options={slider_progresspie_type_fill:!1,slider_progresspie_color1:"#B5B5B5",slider_progresspie_color2:"#E5E5E5",slider_progresspie_stroke_width:6,slider_progresspie_width:30,slider_progresspie_height:30};function draw(percent){if(!percent)var percent=0;var radius=Math.min(g_options.slider_progresspie_width,g_options.slider_progresspie_height)/2,ctx=g_objPie[0].getContext("2d");!1==g_isInited&&(g_isInited=!0,ctx.rotate(1.5*Math.PI),ctx.translate(-2*radius,0)),ctx.clearRect(0,0,g_options.slider_progresspie_width,g_options.slider_progresspie_height);var centerX=g_options.slider_progresspie_width/2,centerY=g_options.slider_progresspie_height/2,startPoint=0,endPoint=percent*Math.PI*2;if(!0==g_options.slider_progresspie_type_fill)ctx.beginPath(),ctx.moveTo(centerX,centerY),ctx.arc(centerX,centerY,radius,startPoint,endPoint),ctx.lineTo(centerX,centerY),ctx.fillStyle=g_options.slider_progresspie_color1,ctx.fill(),ctx.closePath();else{ctx.globalCompositeOperation="source-over",ctx.beginPath(),ctx.moveTo(centerX,centerY),ctx.arc(centerX,centerY,radius,startPoint,endPoint),ctx.lineTo(centerX,centerY),ctx.fillStyle=g_options.slider_progresspie_color1,ctx.fill(),ctx.closePath(),ctx.globalCompositeOperation="destination-out";var radius2=radius-g_options.slider_progresspie_stroke_width;ctx.beginPath(),ctx.moveTo(centerX,centerY),ctx.arc(centerX,centerY,radius2,startPoint,endPoint),ctx.lineTo(centerX,centerY),ctx.fillStyle=g_options.slider_progresspie_color1,ctx.fill(),ctx.closePath()}!0==g_options.slider_progresspie_type_fill&&(startPoint=endPoint,endPoint=2*Math.PI,ctx.beginPath(),ctx.arc(centerX,centerY,radius,startPoint,endPoint),ctx.lineTo(centerX,centerY),ctx.fillStyle=g_options.slider_progresspie_color2,ctx.fill(),ctx.closePath())}this.put=function(a,b){b&&(g_options=jQuery.extend(g_options,b)),a.append("<canvas class='ug-canvas-pie' width='"+g_options.slider_progresspie_width+"' height='"+g_options.slider_progresspie_height+"'></canvas>"),g_objPie=a.children(".ug-canvas-pie")},this.putHidden=function(a,b){t.put(a,b),draw(.1),g_objPie.hide()},this.getElement=function(){return g_objPie},this.setPosition=function(a,b){g_functions.placeElement(g_objPie,a,b)},this.getSize=function(){return{width:g_options.slider_progresspie_width,height:g_options.slider_progresspie_height}},this.setProgress=function(a){g_percent=a=g_functions.normalizePercent(a),draw(a)},this.getType=function(){return"pie"}}function UGTouchSliderControl(){var g_objSlider,g_objInner,g_objParent,g_options,g_parent=new UGSlider,g_functions=new UGFunctions,g_options={slider_transition_continuedrag_speed:250,slider_transition_continuedrag_easing:"linear",slider_transition_return_speed:300,slider_transition_return_easing:"easeInOutQuad"},g_temp={touch_active:!1,startMouseX:0,startMouseY:0,lastMouseX:0,lastMouseY:0,startPosx:0,startTime:0,isInitDataValid:!1,slides:null,lastNumTouches:0,isDragging:!1,storedEventID:"touchSlider",videoStartX:0,isDragVideo:!1,videoObject:null};function getDiffPosFromCurrentItem(slides){if(!slides)var slides=g_parent.getSlidesReference();var inPlaceX=-g_functions.getElementSize(slides.objCurrentSlide).left,objInnerSize=g_functions.getElementSize(g_objInner),diffPos=inPlaceX-objInnerSize.left;return diffPos}function isMovementValidForChange(){var slides=g_parent.getSlidesReference(),diffPos=getDiffPosFromCurrentItem(slides),breakSize=Math.round(3*slides.objCurrentSlide.width()/8);if(Math.abs(diffPos)>=breakSize)return!0;var diffX=Math.abs(g_temp.lastMouseX-g_temp.startMouseX);return g_temp.lastMouseY,g_temp.startMouseY,!(diffX<20)&&jQuery.now()-g_temp.startTime<500}function returnToPlace(slides){if(!0==g_parent.isInnerInPlace())return!1;if(g_objParent.trigger(g_parent.events.BEFORE_RETURN),!slides)var slides=g_parent.getSlidesReference();var destX=-g_functions.getElementSize(slides.objCurrentSlide).left;g_objInner.animate({left:destX+"px"},{duration:g_options.slider_transition_return_speed,easing:g_options.slider_transition_continuedrag_easing,queue:!1,progress:function(c,d,e){if(!0==g_temp.isDragVideo){var a=g_functions.getElementSize(g_objInner).left-destX,b=g_temp.videoStartX+a;g_temp.videoObject.css("left",b)}},complete:function(){g_objParent.trigger(g_parent.events.AFTER_RETURN)}})}function changeItem(direction){g_parent.getVideoObject().hide(),g_parent.switchSlideNums(direction),g_parent.placeNabourItems()}function continueSlideDragChange(){var slides=g_parent.getSlidesReference(),diffPos=getDiffPosFromCurrentItem(slides);if(0==diffPos)return!1;var direction=diffPos>0?"left":"right",isReturn=!1;switch(direction){case"right":if(g_parent.isSlideHasItem(slides.objPrevSlide))var destX=-g_functions.getElementSize(slides.objPrevSlide).left;else isReturn=!0;break;case"left":if(g_parent.isSlideHasItem(slides.objNextSlide))var destX=-g_functions.getElementSize(slides.objNextSlide).left;else isReturn=!0}!0==isReturn?returnToPlace(slides):g_objInner.stop().animate({left:destX+"px"},{duration:g_options.slider_transition_continuedrag_speed,easing:g_options.slider_transition_continuedrag_easing,queue:!1,progress:function(){if(!0==g_temp.isDragVideo){var a=g_functions.getElementSize(g_objInner).left-g_temp.startPosx,b=g_temp.videoStartX+a;g_temp.videoObject.css("left",b)}},always:function(){changeItem(direction),g_objParent.trigger(g_parent.events.AFTER_DRAG_CHANGE)}})}function handleSliderDrag(event){var diff=g_temp.lastMouseX-g_temp.startMouseX;if(0==diff)return!0;var direction=diff<0?"left":"right",objZoomSlider=g_parent.getObjZoom();if(objZoomSlider){if(!0==objZoomSlider.isPanEnabled(event,direction))return g_temp.isInitDataValid=!1,!0;if(!1==g_temp.isInitDataValid)return storeInitTouchData(event),!0}var currentPosx=g_temp.startPosx+diff;if(diff>0&&currentPosx>0?currentPosx/=3:diff<0&&currentPosx+g_objInner.width()<g_objSlider.width()&&(currentPosx=g_temp.startPosx+diff/3),!1==g_temp.isDragging&&(g_temp.isDragging=!0,g_objParent.trigger(g_parent.events.START_DRAG)),g_objInner.css("left",currentPosx+"px"),!0==g_temp.isDragVideo){var posDiff=currentPosx-g_temp.startPosx,videoPosX=g_temp.videoStartX+posDiff;g_temp.videoObject.css("left",videoPosX)}}function storeInitTouchData(event){var mousePos=g_functions.getMousePosition(event);g_temp.startMouseX=mousePos.pageX,g_temp.startMouseY=mousePos.pageY,g_temp.lastMouseX=g_temp.startMouseX,g_temp.lastMouseY=g_temp.startMouseY,g_temp.startTime=jQuery.now();var arrTouches=g_functions.getArrTouches(event);g_temp.startArrTouches=g_functions.getArrTouchPositions(arrTouches);var objPos=g_functions.getElementSize(g_objInner);g_temp.startPosx=objPos.left,g_temp.isInitDataValid=!0,g_temp.isDragVideo=!1,g_functions.storeEventData(event,g_temp.storedEventID)}function disableTouchActive(who){g_temp.touch_active=!1}function enableTouchActive(who,event){g_temp.touch_active=!0,storeInitTouchData(event)}function onTouchStart(event){return(event.preventDefault(),g_temp.isDragging=!1,!0==g_parent.isAnimating()&&g_objInner.stop(!0,!0),g_functions.getArrTouches(event).length>1)?(!0==g_temp.touch_active&&disableTouchActive("1"),!0):!0==g_temp.touch_active||void enableTouchActive("1",event)}function onTouchMove(event){if(!1==g_temp.touch_active)return!0;if(0==event.buttons)return disableTouchActive("2"),continueSlideDragChange(),!0;g_functions.updateStoredEventData(event,g_temp.storedEventID),event.preventDefault();var mousePos=g_functions.getMousePosition(event);g_temp.lastMouseX=mousePos.pageX,g_temp.lastMouseY=mousePos.pageY;var scrollDir=null;!0==g_options.slider_vertical_scroll_ondrag&&(scrollDir=g_functions.handleScrollTop(g_temp.storedEventID)),"vert"!==scrollDir&&handleSliderDrag(event)}function onTouchEnd(event){var numTouches=g_functions.getArrTouches(event).length;if(!0==g_parent.isInnerInPlace()&& !1==g_temp.touch_active&&0==numTouches)return!0;if(0==numTouches&& !0==g_temp.touch_active){disableTouchActive("3");var isValid=!1;!1==g_functions.wasVerticalScroll(g_temp.storedEventID)&&(isValid=isMovementValidForChange()),!0==isValid?continueSlideDragChange():returnToPlace()}else 1==numTouches&& !1==g_temp.touch_active&&enableTouchActive("2",event)}function initEvents(){g_objSlider.bind("mousedown touchstart",onTouchStart),jQuery("body").bind("mousemove touchmove",onTouchMove),jQuery(window).add("body").bind("mouseup touchend",onTouchEnd)}this.isTapEventOccured=function(b){var a=g_functions.getArrTouches(b).length;if(0!=a||0!=g_temp.lastNumTouches)return g_temp.lastNumTouches=a,!1;g_temp.lastNumTouches=a,getDiffPosFromCurrentItem(g_parent.getSlidesReference());var c=Math.abs(g_temp.lastMouseX-g_temp.startMouseX),d=Math.abs(g_temp.lastMouseY-g_temp.startMouseY),e=jQuery.now(),f=e-g_temp.startTime;return c<20&&d<50&&f<500},this.init=function(a,b){g_objParent=jQuery(g_parent=a),g_objects=a.getObjects(),g_objSlider=g_objects.g_objSlider,g_objInner=g_objects.g_objInner,g_options=jQuery.extend(g_options,b),initEvents()},this.getLastMousePos=function(){return{pageX:g_temp.lastMouseX,pageY:g_temp.lastMouseY}},this.isTouchActive=function(){return g_temp.touch_active}}function UGZoomSliderControl(){var g_objSlider,g_objInner,g_objParent,g_parent=new UGSlider,g_functions=new UGFunctions,g_options={slider_zoom_step:1.2,slider_zoom_max_ratio:6,slider_zoom_return_pan_duration:400,slider_zoom_return_pan_easing:"easeOutCubic"},g_temp={isPanActive:!1,startMouseX:0,startMouseY:0,lastMouseX:0,lastMouseY:0,startImageX:0,startImageY:0,panXActive:!1,panYActive:!1,objImage:null,objImageSize:null,objParent:null,objParentSize:null,objSlide:null,storeImageLastTime:0,isZoomActive:!1,startDistance:0,startMiddlePoint:null,imageOrientPoint:null,objFitImageSize:null,isZoomedOnce:!1};function initObject(objSlider,customOptions){g_objParent=jQuery(g_parent=objSlider),g_objects=objSlider.getObjects(),g_objSlider=g_objects.g_objSlider,g_objInner=g_objects.g_objInner,g_options=jQuery.extend(g_options,customOptions),initEvents()}function getFitScaleMode(){var scaleMode=g_parent.getScaleMode();return"down"!=scaleMode&&(scaleMode="fit"),scaleMode}function storeCurrentImage(){var currentTime=jQuery.now();if(currentTime-g_temp.storeImageLastTime<20)return!1;var slides=g_parent.getSlidesReference();if(g_temp.objSlide=slides.objCurrentSlide,g_temp.objImage=slides.objCurrentSlide.find("img"),0==g_temp.objImage.length)return!1;g_temp.objImageSize=g_functions.getElementSize(g_temp.objImage),g_temp.objParent=g_temp.objImage.parent(),g_temp.objParentSize=g_functions.getElementSize(g_temp.objParent);var scaleMode=getFitScaleMode();objPadding=g_parent.getObjImagePadding(),g_temp.objFitImageSize=g_functions.getImageInsideParentDataByImage(g_temp.objImage,scaleMode,objPadding);var currentTime=jQuery.now();return g_temp.storeImageLastTime=currentTime,!0}function zoomCurrentImage(mode,mousePos){var objImage=g_parent.getSlidesReference().objCurrentSlide.find("img"),scaleMode=getFitScaleMode();g_objParent.trigger(g_parent.events.ZOOM_START);var isZoomed=!0,objPadding=g_parent.getObjImagePadding();if("back"==mode){var objOriginalSize=g_functions.getImageOriginalSize(objImage);g_functions.scaleImageFitParent(objImage,objOriginalSize.width,objOriginalSize.height,scaleMode,objPadding)}else{var zoomIn="in"==mode;isZoomed=g_functions.zoomImageInsideParent(objImage,zoomIn,g_options.slider_zoom_step,mousePos,scaleMode,g_options.slider_zoom_max_ratio,objPadding)}!0==isZoomed&&(g_objParent.trigger(g_parent.events.ZOOMING),g_objParent.trigger(g_parent.events.ZOOM_CHANGE),g_objParent.trigger(g_parent.events.ZOOM_END))}function isPanPosible(objImage,event,stictTouchesCheck){var arrTouches=g_functions.getArrTouches(event);if(!0===stictTouchesCheck){if(1!=arrTouches.length)return!1}else if(arrTouches.length>1)return!1;return!!g_functions.isElementBiggerThenParent(objImage)}function storePanInitValues(event){var mousePos=g_functions.getMousePosition(event);g_temp.startMouseX=mousePos.pageX,g_temp.startMouseY=mousePos.pageY,g_temp.lastMouseX=g_temp.startMouseX,g_temp.lastMouseY=g_temp.startMouseY,g_temp.startImageX=g_temp.objImageSize.left,g_temp.startImageY=g_temp.objImageSize.top,g_temp.panXActive=g_temp.objImageSize.width>g_temp.objParentSize.width,g_temp.panYActive=g_temp.objImageSize.height>g_temp.objParentSize.height}function startPan(event){g_temp.isPanActive=!0,storePanInitValues(event)}function panImage(event){if(void 0==g_temp.objImage||0==g_temp.objImage.length)return!0;var mousePos=g_functions.getMousePosition(event);mousePos.pageX,g_temp.startMouseX,mousePos.pageY,g_temp.startMouseY;var diffLastX=mousePos.pageX-g_temp.lastMouseX,diffLastY=mousePos.pageY-g_temp.lastMouseY,directionX=diffLastX<0?"left":"right",directionY=diffLastY<0?"up":"down";g_temp.lastMouseX=mousePos.pageX,g_temp.lastMouseY=mousePos.pageY;var posImage=g_functions.getElementSize(g_temp.objImage);!1==g_temp.panYActive?diffLastY=0:"down"==directionY&&posImage.top>0?diffLastY/=3:"up"==directionY&&posImage.bottom<g_temp.objParentSize.height&&(diffLastY/=3),!1==g_temp.panXActive|| !1==g_parent.isInnerInPlace()?diffLastX=0:"right"==directionX&&posImage.left>0?diffLastX/=3:"left"==directionX&&posImage.right<g_temp.objParentSize.width&&(diffLastX/=3);var imageX=posImage.left+diffLastX,imageY=posImage.top+diffLastY;g_functions.placeElement(g_temp.objImage,imageX,imageY)}function checkReturnAfterPan(){var isReturnX=!1,isReturnY=!1,newX=0,newY=0,objSize=g_functions.getElementSize(g_temp.objImage),objImagePadding=g_parent.getObjImagePadding(),objCenterPos=g_functions.getElementCenterPosition(g_temp.objImage,objImagePadding);g_temp.panXActive=g_temp.objImageSize.width>g_temp.objParentSize.width,g_temp.panYActive=g_temp.objImageSize.height>g_temp.objParentSize.height,!0==g_temp.panYActive?objSize.top>0?(newY=0,isReturnY=!0):objSize.bottom<g_temp.objParentSize.height&&(newY=g_temp.objParentSize.height-objSize.height,isReturnY=!0):objSize.top!=objCenterPos.top&&(isReturnY=!0,newY=objCenterPos.top),!0==g_temp.panXActive?objSize.left>0?(newX=0,isReturnX=!0):objSize.right<g_temp.objParentSize.width&&(newX=g_temp.objParentSize.width-objSize.width,isReturnX=!0):objSize.left!=objCenterPos.left&&(isReturnX=!0,newX=objCenterPos.left);var objCss={};!0==isReturnY&&(objCss.top=newY+"px"),!0==isReturnX&&(objCss.left=newX+"px"),(!0==isReturnY|| !0==isReturnX)&&g_temp.objImage.animate(objCss,{duration:g_options.slider_zoom_return_pan_duration,easing:g_options.slider_zoom_return_pan_easing,queue:!1})}function isImageAnimating(){return!!(g_temp.objImage&&g_temp.objImage.is(":animated"))}function startTouchZoom(arrTouches){g_temp.isZoomActive=!0,g_temp.startDistance=g_functions.getDistance(arrTouches[0].pageX,arrTouches[0].pageY,arrTouches[1].pageX,arrTouches[1].pageY),0==g_temp.startDistance&&(g_temp.startDistance=1),g_temp.startMiddlePoint=g_functions.getMiddlePoint(arrTouches[0].pageX,arrTouches[0].pageY,arrTouches[1].pageX,arrTouches[1].pageY),g_temp.objImageSize=g_functions.getElementSize(g_temp.objImage),g_temp.startImageX=g_temp.objImageSize.left,g_temp.startImageY=g_temp.objImageSize.top,g_temp.imageOrientPoint=g_functions.getElementLocalPoint(g_temp.startMiddlePoint,g_temp.objImage),!1==g_functions.isPointInsideElement(g_temp.imageOrientPoint,g_temp.objImageSize)&&(g_temp.imageOrientPoint=g_functions.getElementCenterPoint(g_temp.objImage)),g_objParent.trigger(g_parent.events.ZOOM_START)}function checkTouchZoomEnd(event){if(!1==g_temp.isZoomActive)return!1;2!=g_functions.getArrTouches(event).length&&(g_temp.isZoomActive=!1,g_objParent.trigger(g_parent.events.ZOOM_END))}function checkTouchZoomStart(event){if(!0==g_temp.isZoomActive)return!0;var arrTouches=g_functions.getArrTouches(event);if(2!=arrTouches.length)return!0;startTouchZoom(arrTouches)}function doTouchZoom(event){var arrTouches=g_functions.getArrTouches(event),zoomRatio=g_functions.getDistance(arrTouches[0].pageX,arrTouches[0].pageY,arrTouches[1].pageX,arrTouches[1].pageY)/g_temp.startDistance,middlePoint=g_functions.getMiddlePoint(arrTouches[0].pageX,arrTouches[0].pageY,arrTouches[1].pageX,arrTouches[1].pageY),newWidth=g_temp.objImageSize.width*zoomRatio,newHeight=g_temp.objImageSize.height*zoomRatio,objOriginalSize=g_functions.getImageOriginalSize(g_temp.objImage),expectedZoomRatio=1;if(objOriginalSize.width>0&&(expectedZoomRatio=newWidth/objOriginalSize.width),expectedZoomRatio>g_options.slider_zoom_max_ratio)return!0;panX=-(g_temp.imageOrientPoint.x*zoomRatio-g_temp.imageOrientPoint.x),panY=-(g_temp.imageOrientPoint.y*zoomRatio-g_temp.imageOrientPoint.y);var diffMiddleX=middlePoint.x-g_temp.startMiddlePoint.x,diffMiddleY=middlePoint.y-g_temp.startMiddlePoint.y,posx=g_temp.startImageX+panX+diffMiddleX,posy=g_temp.startImageY+panY+diffMiddleY;g_functions.setElementSizeAndPosition(g_temp.objImage,posx,posy,newWidth,newHeight),g_objParent.trigger(g_parent.events.ZOOMING),g_objParent.trigger(g_parent.events.ZOOM_CHANGE)}function checkReturnFromZoom(){if(void 0==g_temp.objImage||0==g_temp.objImage.length)return!0;if(g_functions.getElementSize(g_temp.objImage).width<g_temp.objFitImageSize.imageWidth){g_temp.objImage.css({position:"absolute",margin:"none"});var objCss={top:g_temp.objFitImageSize.imageTop+"px",left:g_temp.objFitImageSize.imageLeft+"px",width:g_temp.objFitImageSize.imageWidth+"px",height:g_temp.objFitImageSize.imageHeight+"px"};g_temp.objImage.animate(objCss,{duration:g_options.slider_zoom_return_pan_duration,easing:g_options.slider_zoom_return_pan_easing,queue:!1})}else checkReturnAfterPan()}function onTouchStart(event){return!1==g_parent.isCurrentSlideType("image")||(storeCurrentImage(),void 0==g_temp.objImage||0==g_temp.objImage.length||void(event.preventDefault(),!0==isImageAnimating()&&g_temp.objImage.stop(!0),!0==g_temp.isZoomActive?checkTouchZoomEnd(event):checkTouchZoomStart(event),!0==g_temp.isZoomActive?g_temp.isPanActive=!1:!0==isPanPosible(g_temp.objImage,event)&& !0==g_temp.isZoomedOnce&&startPan(event)))}function onTouchEnd(event){if(!1==g_parent.isCurrentSlideType("image"))return!0;if(!0==jQuery(event.target).data("ug-button"))return!1;if(storeCurrentImage(),void 0==g_temp.objImage||0==g_temp.objImage.length)return!0;var panWasActive=g_temp.isPanActive,zoomWasActive=g_temp.isZoomActive;if(!1==g_parent.isInnerInPlace())return g_temp.isZoomActive=!1,g_temp.isPanActive=!1,!0;if(!0==g_temp.isZoomActive?checkTouchZoomEnd(event):checkTouchZoomStart(event),!0==g_temp.isZoomActive)g_temp.isPanActive=!1;else{var panPosible=isPanPosible(g_temp.objImage,event,!0);!0==g_temp.isPanActive?g_temp.isPanActive=!1:!0==panPosible&&startPan(event)}(panWasActive||zoomWasActive)&& !1==g_temp.isZoomActive&& !1==g_temp.isPanActive&&checkReturnFromZoom()}function onTouchMove(event){if(!1==g_parent.isCurrentSlideType("image"))return!0;!0==g_temp.isZoomActive?doTouchZoom(event):!0==g_temp.isPanActive&&panImage(event)}function onSliderMouseWheel(event,delta,deltaX,deltaY){if(!1==g_options.slider_zoom_mousewheel|| !1==g_parent.isCurrentSlideType("image"))return!0;event.preventDefault();var zoomIn=delta>0,mousePos=g_functions.getMousePosition(event);zoomCurrentImage(!0==zoomIn?"in":"out",mousePos)}function initEvents(){g_objSlider.on("mousewheel",onSliderMouseWheel),g_objSlider.bind("mousedown touchstart",onTouchStart),jQuery("body").bind("mousemove touchmove",onTouchMove),jQuery(window).add("body").bind("mouseup touchend",onTouchEnd),g_objParent.bind(g_parent.events.BEFORE_RETURN,function(){checkReturnFromZoom()}),g_objParent.bind(g_parent.events.ITEM_CHANGED,function(){g_temp.isZoomedOnce=!1}),g_objParent.bind(g_parent.events.ZOOM_CHANGE,function(){g_temp.isZoomedOnce=!0})}this.________EXTERNAL_____________=function(){},this.isPanEnabled=function(a,b){if(storeCurrentImage(),void 0==g_temp.objImage||0==g_temp.objImage.length|| !1==g_temp.isZoomedOnce|| !1==isPanPosible(g_temp.objImage,a)|| !1==g_parent.isInnerInPlace())return!1;if("left"==b){if(g_temp.objImageSize.right<=g_temp.objParentSize.width)return!1}else if(g_temp.objImageSize.left>=0)return!1;return!0},this.init=function(a,b){initObject(a,b)},this.zoomIn=function(){zoomCurrentImage("in")},this.zoomOut=function(){zoomCurrentImage("out")},this.zoomBack=function(){zoomCurrentImage("back")}}function UGWistiaAPI(){this.isAPILoaded=!1;var g_intHandle,g_player,t=this,g_objThis=jQuery(this),g_isPlayerReady=!1;function isWistiaActive(){return"undefined"!=typeof Wistia}function putVideoActually(divID,videoID,width,height,isAutoplay){g_player=null,g_isPlayerReady=!1;var htmlID=divID+"_video",html="<div id='"+htmlID+"' class='wistia_embed' style='width:"+width+";height:"+height+";' data-video-width='"+width+"' data-video-height='"+height+"'>&nbsp;</div>";jQuery("#"+divID).html(html),g_player=Wistia.embed(videoID,{version:"v1",videoWidth:width,videoHeight:height,container:htmlID,autoPlay:isAutoplay}),g_isPlayerReady=!0,initEvents()}function initEvents(){g_player.bind("play",function(){g_objThis.trigger(t.events.START_PLAYING)}),g_player.bind("pause",function(){g_objThis.trigger(t.events.STOP_PLAYING)}),g_player.bind("end",function(){g_objThis.trigger(t.events.STOP_PLAYING),g_objThis.trigger(t.events.VIDEO_ENDED)})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(a){return!0==g_ugWistiaAPI.isAPILoaded||(isWistiaActive()?(g_ugWistiaAPI.isAPILoaded=!0,!0):void(!0!==a&&g_ugFunctions.loadJs("fast.wistia.com/assets/external/E-v1.js",!0),g_ugWistiaAPI.isAPILoaded=!0))},this.doCommand=function(a){if(null==g_player|| !1==g_isPlayerReady)return!1;switch(a){case"play":g_player.play();break;case"pause":g_player.pause()}},this.pause=function(){t.doCommand("pause")},this.play=function(){t.doCommand("play")},this.putVideo=function(a,b,c,d,e,f){if(isWistiaActive())return putVideoActually(a,b,c,d,e,f),!0;this.loadAPI(),g_intHandle=setInterval(function(){isWistiaActive()&&(putVideoActually(a,b,c,d,e,f),clearInterval(g_intHandle))},500)},this.isPlayerReady=function(){return!!g_isPlayerReady&&!!g_player}}function UGSoundCloudAPI(){this.isAPILoaded=!1;var g_player,g_lastContainerID,g_intHandle,t=this,g_objThis=jQuery(this);function isSCActive(){return"undefined"!=typeof SC}function putSoundActually(divID,trackID,width,height,isAutoplay){g_player=null,g_isPlayerReady=!1;var iframeID=divID+"_iframe",url=location.protocol+"//w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/"+trackID;url+="&amp;buying=false&amp;liking=false&amp;download=false&amp;sharing=false&amp;show_artwork=true&show_comments=false&amp;show_playcount=true&amp;show_user=false&amp;hide_related=true&amp;visual=true&amp;start_track=0&amp;callback=true",!0===isAutoplay?url+="&amp;auto_play=true":url+="&amp;auto_play=false";var html="<iframe id='"+iframeID+"' src="+url+" width='"+width+"' height='"+height+"' frameborder='0' scrolling='no' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";jQuery("#"+divID).html(html),(g_player=SC.Widget(iframeID)).bind(SC.Widget.Events.READY,function(){g_player&&(g_isPlayerReady=!0,initEvents())}),g_lastContainerID=divID}function initEvents(){g_player.bind(SC.Widget.Events.PLAY,function(){g_objThis.trigger(t.events.START_PLAYING)}),g_player.bind(SC.Widget.Events.PAUSE,function(){g_objThis.trigger(t.events.STOP_PLAYING)}),g_player.bind(SC.Widget.Events.FINISH,function(){g_objThis.trigger(t.events.STOP_PLAYING),g_objThis.trigger(t.events.VIDEO_ENDED)})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(a){return!0==g_ugSoundCloudAPI.isAPILoaded||(isSCActive()?(g_ugSoundCloudAPI.isAPILoaded=!0,!0):void(!0!==a&&g_ugFunctions.loadJs("w.soundcloud.com/player/api.js",!0),g_ugSoundCloudAPI.isAPILoaded=!0))},this.putSound=function(a,b,c,d,e){if(isSCActive())return putSoundActually(a,b,c,d,e),!0;this.loadAPI(),g_intHandle=setInterval(function(){isSCActive()&&(putSoundActually(a,b,c,d,e),clearInterval(g_intHandle))},500)},this.doCommand=function(a){if(null==g_player|| !1==g_isPlayerReady)return!1;switch(a){case"play":g_player.play();break;case"pause":g_player.pause()}},this.pause=function(){t.doCommand("pause")},this.play=function(){t.doCommand("play")},this.destroy=function(){g_isPlayerReady=!1,g_player=null,g_lastContainerID&&(jQuery("#"+g_lastContainerID).html(""),g_lastContainerID=null)}}function UGHtml5MediaAPI(){this.isAPILoaded=!1;var g_player,g_intHandle,t=this,g_objThis=jQuery(this);function isMediaElementActive(){return"undefined"!=typeof mejs}function putVideoActually(divID,data,width,height,isAutoplay){g_player=null,g_isPlayerReady=!1;var urlFlash=location.protocol+"//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/flashmediaelement-cdn.swf",urlSilverlight=location.protocol+"//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/silverlightmediaelement.xap",htmlID=divID+"_video",htmlAutoplay="";isAutoplay&& !0===isAutoplay&&(htmlAutoplay="autoplay='autoplay'");var htmlPoster="";data.posterImage&&(htmlPoster="poster='"+data.posterImage+"'");var html="<video id='"+htmlID+"' width='"+width+"' height='"+height+"' controls='controls' controlsList='nodownload' preload='none' "+htmlAutoplay+" "+htmlPoster+">";""!=data.mp4&&(html+="<source type='video/mp4' src='"+data.mp4+"' />"),""!=data.webm&&(html+="<source type='video/webm' src='"+data.webm+"' />"),""!=data.ogv&&(html+="<source type='video/ogg' src='"+data.ogv+"' />"),html+="<object width='"+width+"' height='"+height+"' type='application/x-shockwave-flash' data='"+urlFlash+"'>",html+="<param name='movie' value='"+urlFlash+"' />",html+="<param name='flashvars' value='controls=true&file="+data.mp4+"' />",html+="</object>",html+="</video>",jQuery("#"+divID).html(html),jQuery("#"+htmlID).on("contextmenu",function(){return!1}),new MediaElement(htmlID,{enablePluginDebug:!1,flashName:urlFlash,silverlightName:urlSilverlight,success:function(a,b){g_isPlayerReady=!0,g_player=a,!1==isAutoplay&&g_player.pause(),initEvents()},error:function(a){trace(a)}})}function initEvents(){g_ugFunctions.addEvent(g_player,"play",function(){g_objThis.trigger(t.events.START_PLAYING)}),g_ugFunctions.addEvent(g_player,"pause",function(){g_objThis.trigger(t.events.STOP_PLAYING)}),g_ugFunctions.addEvent(g_player,"ended",function(){g_objThis.trigger(t.events.STOP_PLAYING),g_objThis.trigger(t.events.VIDEO_ENDED)})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(a){return!0==g_ugHtml5MediaAPI.isAPILoaded||(isMediaElementActive()?(g_ugHtml5MediaAPI.isAPILoaded=!0,!0):void(!0!==a&&(g_ugFunctions.loadJs("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelement.min.js",!0),g_ugFunctions.loadCss("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelementplayer.min.css",!0)),g_ugHtml5MediaAPI.isAPILoaded=!0))},this.putVideo=function(a,b,c,d,e){if(isMediaElementActive())return putVideoActually(a,b,c,d,e),!0;this.loadAPI(),g_intHandle=setInterval(function(){isMediaElementActive()&&(putVideoActually(a,b,c,d,e),clearInterval(g_intHandle))},500)},this.doCommand=function(a){if(null==g_player|| !1==g_isPlayerReady)return!1;switch(a){case"play":g_player.play();break;case"pause":g_player.pause()}},this.pause=function(){t.doCommand("pause")},this.play=function(){t.doCommand("play")}}function UGVimeoAPI(){this.isAPILoaded=!1;var g_intHandle,g_lastCotnainerID,t=this,g_objThis=jQuery(this),g_player=null,g_isPlayerReady=!1,g_cueChangeAutoplay=!1;function isFroogaloopActive(){return"undefined"!=typeof Froogaloop}function putVideoActually(divID,videoID,width,height,isAutoplay){g_player=null,g_isPlayerReady=!1;var url=location.protocol+"//player.vimeo.com/video/"+videoID+"?api=1";!0===isAutoplay&&(url+="&amp;byline=0&amp;autoplay=1&amp;title=0&amp;portrait=0");var html="<iframe src="+url+" width='"+width+"' height='"+height+"' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";jQuery("#"+divID).html(html);var iframe=jQuery("#"+divID+" iframe")[0];(g_player=Froogaloop(iframe)).addEvent("ready",function(){g_player&&(g_isPlayerReady=!0,initEvents())}),g_lastCotnainerID=divID}function initEvents(){if(!g_player)return!1;g_player.addEvent("cuechange",function(){!0==g_cueChangeAutoplay&&t.play()}),g_player.addEvent("play",function(){g_objThis.trigger(t.events.START_PLAYING)}),g_player.addEvent("pause",function(){g_objThis.trigger(t.events.STOP_PLAYING)}),g_player.addEvent("finish",function(){g_objThis.trigger(t.events.STOP_PLAYING),g_objThis.trigger(t.events.VIDEO_ENDED)})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(a){return!0==g_ugVimeoAPI.isAPILoaded||(isFroogaloopActive()?(g_ugVimeoAPI.isAPILoaded=!0,!0):void(!0!==a&&g_ugFunctions.loadJs("f.vimeocdn.com/js/froogaloop2.min.js",!0),g_ugVimeoAPI.isAPILoaded=!0))},this.doCommand=function(a){if(null==g_player|| !1==g_isPlayerReady)return!1;g_player.api(a)},this.pause=function(){t.doCommand("pause")},this.play=function(){t.doCommand("play")},this.destroy=function(){g_player&&(g_player.api("unload"),g_player=null,g_isPlayerReady=!1),g_lastCotnainerID&&jQuery("#"+g_lastCotnainerID).html("")},this.putVideo=function(a,b,c,d,e){if(isFroogaloopActive())return putVideoActually(a,b,c,d,e),!0;this.loadAPI(),g_intHandle=setInterval(function(){isFroogaloopActive()&&(putVideoActually(a,b,c,d,e),clearInterval(g_intHandle))},500)},this.isPlayerReady=function(){return!!g_isPlayerReady&&!!g_player},this.changeVideo=function(a,b){if(!1==t.isPlayerReady())return!1;g_cueChangeAutoplay=b,g_player.api("loadVideo",a)},this.getVideoImages=function(a,c,d){var b=location.protocol+"//vimeo.com/api/v2/video/"+a+".json";jQuery.get(b,{},function(b){var a={};a.preview=b[0].thumbnail_large,a.thumb=b[0].thumbnail_medium,d(c,a)})}}function UGYoutubeAPI(){this.isAPILoaded=!1;var g_intHandle,g_lastContainerID,t=this,g_player=null,g_isPlayerReady=!1,g_objThis=jQuery(this),g_prevState=-1,g_functions=new UGFunctions,g_options={video_youtube_showinfo:!0};function putVideoActually(divID,videoID,width,height,isAutoplay,addOptions){g_player&&g_isPlayerReady&&g_player.destroy();var playerVars={controls:1,showinfo:g_options.video_youtube_showinfo,start:0,rel:0};!0===isAutoplay&&(playerVars.autoplay=1);var start=g_functions.getVal(addOptions,"start");start&&jQuery.isNumeric(start)&&(playerVars.start=start),g_isPlayerReady=!1,g_player=new YT.Player(divID,{height:height,width:width,videoId:videoID,playerVars:playerVars,events:{onReady:onPlayerReady,onStateChange:onPlayerStateChange}}),g_lastContainerID=divID}function isYTActive(){return"undefined"!=typeof YT&& void 0!==YT.Player}function onPlayerReady(){g_isPlayerReady=!0}function onPlayerStateChange(){if("function"!=typeof g_player.getPlayerState)return trace("Youtube API error: can't get player state"),!1;var state=g_player.getPlayerState();switch(state){case YT.PlayerState.PLAYING:g_objThis.trigger(t.events.START_PLAYING);break;case YT.PlayerState.ENDED:g_objThis.trigger(t.events.STOP_PLAYING),g_objThis.trigger(t.events.VIDEO_ENDED);break;default:g_prevState==YT.PlayerState.PLAYING&&g_objThis.trigger(t.events.STOP_PLAYING)}g_prevState=state}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.setOptions=function(a){g_options=jQuery.extend(g_options,a)},this.putVideo=function(a,b,c,d,e,f){if(isYTActive())return putVideoActually(a,b,c,d,e,f),!0;this.loadAPI(),g_intHandle=setInterval(function(){isYTActive()&&(putVideoActually(a,b,c,d,e,f),clearInterval(g_intHandle))},500)},this.loadAPI=function(a){return!0==g_ugYoutubeAPI.isAPILoaded||("undefined"!=typeof YT?(g_ugYoutubeAPI.isAPILoaded=!0,!0):void(!0!==a&&g_ugFunctions.loadJs("https://www.youtube.com/player_api",!1),g_ugYoutubeAPI.isAPILoaded=!0))},this.doCommand=function(a,b){if(!g_player)return!0;if(!1==g_isPlayerReady)return!1;switch(a){case"play":if("function"!=typeof g_player.playVideo)return!1;g_player.playVideo();break;case"pause":if("function"!=typeof g_player.pauseVideo)return!1;g_player.pauseVideo();break;case"seek":if("function"!=typeof g_player.seekTo)return!1;g_player.seekTo(b);break;case"stopToBeginning":var c=g_player.getPlayerState();switch(g_player.pauseVideo(),c){case YT.PlayerState.PLAYING:case YT.PlayerState.ENDED:case YT.PlayerState.PAUSED:g_player.seekTo(0)}}},this.play=function(){t.doCommand("play")},this.pause=function(){t.doCommand("pause")},this.destroy=function(){try{g_player&&(g_isPlayerReady=!1,g_player.clearVideo(),g_player.destroy())}catch(a){jQuery("#"+g_lastContainerID).html("")}},this.stopToBeginning=function(){t.doCommand("stopToBeginning")},this.changeVideo=function(a,b){if(!1==t.isPlayerReady())return!1;b&& !0==b?g_player.loadVideoById(a,0,"large"):g_player.cueVideoById(a,0,"large")},this.isPlayerReady=function(){return!!g_isPlayerReady&&!!g_player},this.getVideoImages=function(b){var a={};return a.preview="https://i.ytimg.com/vi/"+b+"/sddefault.jpg",a.thumb="https://i.ytimg.com/vi/"+b+"/default.jpg",a}}function UGVideoPlayer(){var g_objPlayer,g_objYoutube,g_objVimeo,g_objHtml5,g_objButtonClose,g_objSoundCloud,g_objWistia,g_galleryID,t=this,g_objThis=jQuery(this),g_functions=new UGFunctions,g_youtubeAPI=new UGYoutubeAPI,g_vimeoAPI=new UGVimeoAPI,g_html5API=new UGHtml5MediaAPI,g_soundCloudAPI=new UGSoundCloudAPI,g_wistiaAPI=new UGWistiaAPI,g_activePlayerType=null,g_options={video_enable_closebutton:!0};this.events={SHOW:"video_show",HIDE:"video_hide",PLAY_START:"video_play_start",PLAY_STOP:"video_play_stop",VIDEO_ENDED:"video_ended"};var g_temp={standAloneMode:!1,youtubeInnerID:"",vimeoPlayerID:"",html5PlayerID:"",wistiaPlayerID:"",soundCloudPlayerID:""};function onCloseButtonClick(){t.hide()}function onPlayStart(){g_objThis.trigger(t.events.PLAY_START),g_objButtonClose&&g_objButtonClose.hide()}function onPlayStop(){g_objThis.trigger(t.events.PLAY_STOP),g_objButtonClose&&g_objButtonClose.show()}function onVideoEnded(){g_objThis.trigger(t.events.VIDEO_ENDED)}function initEvents(){g_objButtonClose&&(g_functions.setButtonMobileReady(g_objButtonClose),g_functions.setButtonOnClick(g_objButtonClose,onCloseButtonClick)),jQuery(g_youtubeAPI).on(g_youtubeAPI.events.START_PLAYING,onPlayStart),jQuery(g_youtubeAPI).on(g_youtubeAPI.events.STOP_PLAYING,onPlayStop),jQuery(g_youtubeAPI).on(g_youtubeAPI.events.VIDEO_ENDED,onVideoEnded),jQuery(g_vimeoAPI).on(g_vimeoAPI.events.START_PLAYING,onPlayStart),jQuery(g_vimeoAPI).on(g_vimeoAPI.events.STOP_PLAYING,onPlayStop),jQuery(g_vimeoAPI).on(g_vimeoAPI.events.VIDEO_ENDED,onVideoEnded),jQuery(g_html5API).on(g_html5API.events.START_PLAYING,onPlayStart),jQuery(g_html5API).on(g_html5API.events.STOP_PLAYING,onPlayStop),jQuery(g_html5API).on(g_html5API.events.VIDEO_ENDED,onVideoEnded),jQuery(g_soundCloudAPI).on(g_soundCloudAPI.events.START_PLAYING,onPlayStart),jQuery(g_soundCloudAPI).on(g_soundCloudAPI.events.STOP_PLAYING,onPlayStop),jQuery(g_soundCloudAPI).on(g_soundCloudAPI.events.VIDEO_ENDED,onVideoEnded),jQuery(g_wistiaAPI).on(g_wistiaAPI.events.START_PLAYING,onPlayStart),jQuery(g_wistiaAPI).on(g_wistiaAPI.events.STOP_PLAYING,onPlayStop),jQuery(g_wistiaAPI).on(g_wistiaAPI.events.VIDEO_ENDED,onVideoEnded)}function stopAndHidePlayers(except){var arrPlayers=["youtube","vimeo","html5","soundcloud","wistia"];for(var index in arrPlayers){var player=arrPlayers[index];if(player!=except)switch(player){case"youtube":g_youtubeAPI.pause(),g_youtubeAPI.destroy(),g_objYoutube.hide();break;case"vimeo":g_vimeoAPI.pause(),g_vimeoAPI.destroy(),g_objVimeo.hide();break;case"html5":g_html5API.pause(),g_objHtml5.hide();break;case"soundcloud":g_soundCloudAPI.pause(),g_soundCloudAPI.destroy(),g_objSoundCloud.hide();break;case"wistia":g_wistiaAPI.pause(),g_objWistia.hide()}}}this.init=function(b,a,c){if(!(g_galleryID=c))throw new Error("missing gallery ID for video player, it's a must!");g_options=jQuery.extend(g_options,b),g_youtubeAPI.setOptions(g_options),a&& !0==a&&(g_temp.standAloneMode=!0)},this.setHtml=function(b){g_temp.youtubeInnerID=g_galleryID+"_youtube_inner",g_temp.vimeoPlayerID=g_galleryID+"_videoplayer_vimeo",g_temp.html5PlayerID=g_galleryID+"_videoplayer_html5",g_temp.wistiaPlayerID=g_galleryID+"_videoplayer_wistia",g_temp.soundCloudPlayerID=g_galleryID+"_videoplayer_soundcloud";var a="<div class='ug-videoplayer' style='display:none'>";a+="<div class='ug-videoplayer-wrapper ug-videoplayer-youtube' style='display:none'><div id='"+g_temp.youtubeInnerID+"'></div></div>",a+="<div id='"+g_temp.vimeoPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-vimeo' style='display:none'></div>",a+="<div id='"+g_temp.html5PlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-html5'></div>",a+="<div id='"+g_temp.soundCloudPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-soundcloud'></div>",a+="<div id='"+g_temp.wistiaPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-wistia'></div>",!1==g_temp.standAloneMode&& !0==g_options.video_enable_closebutton&&(a+="<div class='ug-videoplayer-button-close'></div>"),a+="</div>",b.append(a),g_objPlayer=b.children(".ug-videoplayer"),g_objYoutube=g_objPlayer.children(".ug-videoplayer-youtube"),g_objVimeo=g_objPlayer.children(".ug-videoplayer-vimeo"),g_objHtml5=g_objPlayer.children(".ug-videoplayer-html5"),g_objSoundCloud=g_objPlayer.children(".ug-videoplayer-soundcloud"),g_objWistia=g_objPlayer.children(".ug-videoplayer-wistia"),!1==g_temp.standAloneMode&& !0==g_options.video_enable_closebutton&&(g_objButtonClose=g_objPlayer.children(".ug-videoplayer-button-close"))},this.destroy=function(){g_objButtonClose&&(g_objButtonClose.off("click"),g_objButtonClose.off("touchend")),jQuery(g_youtubeAPI).off(g_youtubeAPI.events.START_PLAYING),jQuery(g_youtubeAPI).off(g_youtubeAPI.events.STOP_PLAYING),jQuery(g_vimeoAPI).off(g_vimeoAPI.events.START_PLAYING),jQuery(g_vimeoAPI).off(g_vimeoAPI.events.STOP_PLAYING),jQuery(g_html5API).off(g_html5API.events.START_PLAYING),jQuery(g_html5API).off(g_html5API.events.STOP_PLAYING),jQuery(g_soundCloudAPI).off(g_soundCloudAPI.events.START_PLAYING,onPlayStart),jQuery(g_soundCloudAPI).off(g_soundCloudAPI.events.STOP_PLAYING,onPlayStop),jQuery(g_wistiaAPI).off(g_wistiaAPI.events.START_PLAYING,onPlayStart),jQuery(g_wistiaAPI).off(g_wistiaAPI.events.STOP_PLAYING,onPlayStop),g_activePlayerType=null},this.initEvents=function(){initEvents()},this.setSize=function(a,b){g_functions.setElementSize(g_objPlayer,a,b),g_objButtonClose&&g_functions.placeElement(g_objButtonClose,"right","top")},this.setPosition=function(a,b){g_functions.placeElement(g_objPlayer,a,b)},this.getObject=function(){return g_objPlayer},this.show=function(){if(!0==t.isVisible())return!0;g_objPlayer.show(),g_objPlayer.fadeTo(0,1),g_objButtonClose&&g_objButtonClose.show(),g_objThis.trigger(t.events.SHOW)},this.hide=function(){if(!1==t.isVisible())return!0;stopAndHidePlayers(),g_activePlayerType=null,g_objPlayer.hide(),g_objThis.trigger(t.events.HIDE)},this.getActiveAPI=function(){switch(g_activePlayerType){case"youtube":return g_youtubeAPI;case"vimeo":return g_vimeoAPI;case"wistia":return g_wistiaAPI;case"soundcloud":return g_soundCloudAPI;case"html5":return g_html5API;default:return null}},this.pause=function(){var a=t.getActiveAPI();if(null==a)return!1;"function"==typeof a.pause&&a.pause()},this.isVisible=function(){return g_objPlayer.is(":visible")},this.playYoutube=function(c,a,b){if(void 0===a)var a=!0;if(!b)var b=null;stopAndHidePlayers("youtube"),g_objYoutube.show(),0==g_objYoutube.children("#"+g_temp.youtubeInnerID).length&&g_objYoutube.append("<div id='"+g_temp.youtubeInnerID+"'></div>");var d={};b&&(d.start=b),!0==g_youtubeAPI.isPlayerReady()&& !0==g_temp.standAloneMode?g_youtubeAPI.changeVideo(c,a):g_youtubeAPI.putVideo(g_temp.youtubeInnerID,c,"100%","100%",a,d),g_activePlayerType="youtube"},this.playVimeo=function(b,a){if(void 0===a)var a=!0;stopAndHidePlayers("vimeo"),g_objVimeo.show(),g_vimeoAPI.putVideo(g_temp.vimeoPlayerID,b,"100%","100%",a),g_activePlayerType="vimeo"},this.playHtml5Video=function(b,c,d,e,a){if(void 0===a)var a=!0;stopAndHidePlayers("html5"),g_objHtml5.show();var f={ogv:b,webm:c,mp4:d,posterImage:e};g_html5API.putVideo(g_temp.html5PlayerID,f,"100%","100%",a),g_activePlayerType="html5"},this.playSoundCloud=function(b,a){if(void 0===a)var a=!0;stopAndHidePlayers("soundcloud"),g_objSoundCloud.show(),g_soundCloudAPI.putSound(g_temp.soundCloudPlayerID,b,"100%","100%",a),g_activePlayerType="soundcloud"},this.playWistia=function(b,a){if(void 0===a)var a=!0;stopAndHidePlayers("wistia"),g_objWistia.show(),g_wistiaAPI.putVideo(g_temp.wistiaPlayerID,b,"100%","100%",a),g_activePlayerType="wistia"}}var g_ugYoutubeAPI=new UGYoutubeAPI,g_ugVimeoAPI=new UGVimeoAPI,g_ugHtml5MediaAPI=new UGHtml5MediaAPI,g_ugSoundCloudAPI=new UGSoundCloudAPI,g_ugWistiaAPI=new UGWistiaAPI;function ugCheckForMinJQueryVersion(){if(!1==g_ugFunctions.checkMinJqueryVersion("1.8.0"))throw new Error("The gallery can run from jquery 1.8 You have jQuery "+jQuery.fn.jquery+" Please update your jQuery library.")}function ugCheckForErrors(galleryID,type){function checkForJqueryPresents(){if("undefined"==typeof jQuery)throw new Error("jQuery library not included")}function checkForDoubleJQuery(){if("function"==typeof jQuery.fn.unitegallery)return!0;var errorMessage="You have some jquery.js library include that comes after the gallery files js include.";throw errorMessage+="<br> This include eliminates the gallery libraries, and make it not work.","cms"==type?(errorMessage+="<br><br> To fix it you can:<br>&nbsp;&nbsp;&nbsp; 1. In the Gallery Settings -> Troubleshooting set option: <strong><b>Put JS Includes To Body</b></strong> option to true.",errorMessage+="<br>&nbsp;&nbsp;&nbsp; 2. Find the double jquery.js include and remove it."):errorMessage+="<br><br> Please find and remove this jquery.js include and the gallery will work. <br> * There should be only one jquery.js include before all other js includes in the page.",new Error(errorMessage)}try{"jquery"==type?(checkForJqueryPresents(),ugCheckForMinJQueryVersion()):(ugCheckForMinJQueryVersion(),checkForDoubleJQuery())}catch(objError){var message=objError.message;if(message="<div style='font-size:16px;color:#BC0C06;max-width:900px;border:1px solid red;padding:10px;'>"+(message="Unite Gallery Error: "+message)+"</div>","jquery"==type){var objGallery=document.getElementById(galleryID);objGallery.innerHTML=message,objGallery.style.display="block"}else jQuery(galleryID).show().html(message);return!1}return!0}function UniteGalleryMain(){var g_galleryID,g_objWrapper,g_objParent,g_objThumbs,g_objSlider,g_objLightbox,g_objTabs,g_objLoadMore,g_numItems,g_objTheme,t=this,g_objGallery=jQuery(t),g_functions=new UGFunctions,g_arrItems=[],g_selectedItem=null,g_selectedItemIndex=-1,g_objCache={};this.events={ITEM_CHANGE:"item_change",SIZE_CHANGE:"size_change",ENTER_FULLSCREEN:"enter_fullscreen",EXIT_FULLSCREEN:"exit_fullscreen",START_PLAY:"start_play",STOP_PLAY:"stop_play",PAUSE_PLAYING:"pause_playing",CONTINUE_PLAYING:"continue_playing",SLIDER_ACTION_START:"slider_action_start",SLIDER_ACTION_END:"slider_action_end",ITEM_IMAGE_UPDATED:"item_image_updated",GALLERY_KEYPRESS:"gallery_keypress",GALLERY_BEFORE_REQUEST_ITEMS:"gallery_before_request_items",OPEN_LIGHTBOX:"open_lightbox",CLOSE_LIGHTBOX:"close_lightbox"};var g_options={gallery_width:900,gallery_height:500,gallery_height_mobile:null,gallery_min_width:150,gallery_min_height:100,gallery_theme:"default",gallery_skin:"default",gallery_images_preload_type:"minimal",gallery_autoplay:!1,gallery_play_interval:3e3,gallery_pause_on_mouseover:!0,gallery_mousewheel_role:"zoom",gallery_control_keyboard:!0,gallery_carousel:!0,gallery_preserve_ratio:!0,gallery_background_color:"",gallery_debug_errors:!1,gallery_shuffle:!1,gallery_urlajax:null,gallery_enable_tabs:!1,gallery_enable_loadmore:!1,gallery_enable_cache:!0,gallery_initial_catid:"",load_api_externally:!1},g_temp={objCustomOptions:{},isAllItemsPreloaded:!1,isFreestyleMode:!1,lastWidth:0,lastHeigh:0,handleResize:null,isInited:!1,isPlayMode:!1,isPlayModePaused:!1,playTimePassed:0,playTimeLastStep:0,playHandle:"",playStepInterval:33,objProgress:null,isFakeFullscreen:!1,thumbsType:null,isYoutubePresent:!1,isVimeoPresent:!1,isHtml5VideoPresent:!1,isSoundCloudPresent:!1,isWistiaPresent:!1,resizeDelay:100,isRunFirstTime:!0,originalOptions:{},funcCustomHeight:null};function __________INIT_GALLERY_______(){}function getThemeFunction(themeName){var themeFunction=themeName;return -1==themeFunction.indexOf("UGTheme_")&&(themeFunction="UGTheme_"+themeFunction),themeFunction}function initTheme(objCustomOptions){if(objCustomOptions.hasOwnProperty("gallery_theme"))g_options.gallery_theme=objCustomOptions.gallery_theme;else{var defaultTheme=g_options.gallery_theme;!1==g_ugFunctions.isThemeRegistered(defaultTheme)&&(g_options.gallery_theme=g_ugFunctions.getFirstRegisteredTheme())}var themeFunction=getThemeFunction(g_options.gallery_theme);try{g_options.gallery_theme=eval(themeFunction)}catch(e){}g_options.gallery_theme=eval(themeFunction),(g_objTheme=new g_options.gallery_theme).init(t,objCustomOptions)}function resetOptions(){g_options=jQuery.extend({},g_temp.originalOptions),g_selectedItemIndex=-1,g_selectedItem=null,g_objSlider=void 0,g_objThumbs=void 0,g_objLightbox=void 0}function checkForStartupErrors(){try{ugCheckForMinJQueryVersion()}catch(e){throwErrorShowMessage(e.message)}"object"==typeof g_objWrapper.outerWidth()&&throwErrorShowMessage("You have some buggy script. most chances jquery-ui.js that destroy jquery outerWidth, outerHeight functions. The gallery can't run. Please update jquery-ui.js to latest version."),setTimeout(function(){ugCheckForErrors(g_galleryID,"cms")},5e3)}function runGallery(galleryID,objCustomOptions,htmlItems,cacheID){var isCustomOptions="object"==typeof objCustomOptions;if(isCustomOptions&&(g_temp.objCustomOptions=objCustomOptions),!0==g_temp.isRunFirstTime){if(0==(g_objWrapper=jQuery(g_galleryID=galleryID)).length)return trace("div with id: "+g_galleryID+" not found"),!1;g_objParent=g_objWrapper.parent(),checkForStartupErrors(),g_temp.originalOptions=jQuery.extend({},g_options),isCustomOptions&&(g_options=jQuery.extend(g_options,objCustomOptions)),!0==g_options.gallery_enable_cache&&g_options.gallery_initial_catid&&cacheItems(g_options.gallery_initial_catid),t.setSizeClass();var objItems=g_objWrapper.children();fillItemsArray(objItems),loadAPIs(),g_objWrapper.find("img").fadeTo(0,0).hide(),g_objWrapper.show(),clearInitData()}else if(t.destroy(),resetOptions(),g_options=jQuery.extend(g_options,g_temp.objCustomOptions),htmlItems){if(cacheID&& !0==g_options.gallery_enable_cache&&cacheItems(cacheID,htmlItems),"noitems"==htmlItems)return showErrorMessage("No items in this category",""),!1;g_objWrapper.html(htmlItems);var objItems=g_objWrapper.children();fillItemsArray(objItems),loadAPIs(),g_objWrapper.children().fadeTo(0,0).hide(),g_objWrapper.show(),clearInitData()}!0==g_temp.isRunFirstTime&& !0==g_options.gallery_enable_tabs&&(g_objTabs=new UGTabs).init(t,g_options),!0==g_temp.isRunFirstTime&& !0==g_options.gallery_enable_loadmore&&(g_objLoadMore=new UGLoadMore).init(t,g_options),isCustomOptions&&modifyInitParams(g_temp.objCustomOptions),validateParams(),!0==g_options.gallery_shuffle&&t.shuffleItems(),initTheme(g_temp.objCustomOptions),setGalleryHtml(),setHtmlObjectsProperties(),0==g_objWrapper.width()?g_functions.waitForWidth(g_objWrapper,runGalleryActually):runGalleryActually()}function runGalleryActually(){t.setSizeClass(),!1==g_temp.isFreestyleMode&& !0==g_options.gallery_preserve_ratio&&setHeightByOriginalRatio(),g_objTheme.run(),g_objTabs&&g_temp.isRunFirstTime&&g_objTabs.run(),preloadBigImages(),initEvents(),g_numItems>0&&t.selectItem(0),!0==g_options.gallery_autoplay&&t.startPlayMode(),g_temp.isRunFirstTime=!1}function showErrorMessage(message,prefix){if(void 0===prefix)var prefix="<b>Unite Gallery Error: </b>";else prefix="<b>"+prefix+": </b>";var html="<div class='ug-error-message-wrapper'><div class='ug-error-message'>"+(message=prefix+message)+"</div></div>";g_objWrapper.children().remove(),g_objWrapper.html(html),g_objWrapper.show()}function throwErrorShowMessage(message){throw showErrorMessage(message),new Error(message)}function modifyInitParams(){g_options.gallery_images_preload_type||(g_options.gallery_images_preload_type="minimal"),(void 0==g_options.gallery_min_height||g_options.gallery_height<g_options.gallery_min_height)&&(g_options.gallery_min_height=0),(void 0==g_options.gallery_min_width||g_options.gallery_width<g_options.gallery_min_width)&&(g_options.gallery_min_width=0)}function validateParams(){if(!g_options.gallery_theme)throw new Error("The gallery can't run without theme");if(jQuery.isNumeric(g_options.gallery_height)&&g_options.gallery_height<g_options.gallery_min_height)throw new Error("The <b>gallery_height</b> option must be bigger then <b>gallery_min_height option</b>");if(g_options.gallery_width<g_options.gallery_min_width)throw new Error("The <b>gallery_width</b> option must be bigger then <b>gallery_min_width option</b>")}function setGalleryHtml(){g_objWrapper.addClass("ug-gallery-wrapper"),g_objWrapper.append("<div class='ug-overlay-disabled' style='display:none'></div>"),t.setSizeClass()}function clearInitData(){g_objWrapper.children().remove()}function storeLastSize(){var objSize=t.getSize();g_temp.lastWidth=objSize.width,g_temp.lastHeight=objSize.height}function setHeightByOriginalRatio(){var objSize=t.getSize();if(objSize.width/objSize.height!=objSize.orig_ratio){var newHeight=objSize.width/objSize.orig_ratio;(newHeight=Math.round(newHeight))<g_options.gallery_min_height&&(newHeight=g_options.gallery_min_height),g_objWrapper.height(newHeight)}}function setHtmlObjectsProperties(){var objCss={"max-width":g_functions.getCssSizeParam(g_options.gallery_width),"min-width":g_functions.getCssSizeParam(g_options.gallery_min_width)};if(!1==g_temp.isFreestyleMode){var galleryHeight=g_functions.getCssSizeParam(g_options.gallery_height);!0==t.isMobileMode()&&g_options.gallery_height_mobile&&(galleryHeight=g_functions.getCssSizeParam(g_options.gallery_height_mobile)),objCss.height=galleryHeight}else objCss.overflow="visible";g_options.gallery_background_color&&(objCss["background-color"]=g_options.gallery_background_color),g_objWrapper.css(objCss)}function fillItemByChild(objChild){var isMobile=t.isMobileMode(),tagname=objChild.prop("tagName").toLowerCase();if("noscript"==tagname)return null;if("picture"==tagname){var objImage=objChild.find("img");if(0==objImage.length)return null;objChild=objImage,tagname="img"}var srcLazy=objChild.data("lazy-src");srcLazy&&objChild.attr("src",srcLazy);var itemLink="";if("a"==tagname){itemLink=objChild.attr("href");var objChildren=objChild.children();if(0==(objChild=objChild.find("img")).length)return null;tagname="img"}var itemType=objChild.data("type");void 0==itemType&&(itemType="image");var objItem={};if(objItem.type=itemType,"img"==tagname){var lasyLoadSrc=objChild.data("lazyload-src");if(!lasyLoadSrc)var lasyLoadSrc=objChild.data("lazy-src");lasyLoadSrc&&""!=lasyLoadSrc&&(objChild.attr("src",lasyLoadSrc),jQuery.removeData(objChild,"lazyload-src"));var urlImage=objChild.data("image"),urlThumb=objChild.data("thumb"),titleFromData=objChild.data("title");void 0===urlImage&&(urlImage=null),void 0===urlThumb&&(urlThumb=null);var imageSrc=objChild.attr("src");urlImage||(urlImage=imageSrc),urlThumb||(urlThumb=imageSrc),urlThumb||(urlThumb=urlImage),urlImage||(urlImage=urlThumb),objItem.urlThumb=urlThumb,objItem.urlImage=urlImage,objItem.title=objChild.attr("alt"),titleFromData&&(objItem.title=titleFromData),objItem.objThumbImage=objChild,objItem.objThumbImage.attr("src",objItem.urlThumb)}else{if("image"==itemType)throw trace("Problematic gallery item found:"),trace(objChild),trace("Please look for some third party js script that could add this item to the gallery"),new Error("The item should not be image type");objItem.urlThumb=objChild.data("thumb"),objItem.title=objChild.data("title"),objItem.objThumbImage=null,objItem.urlImage=objChild.data("image")}if(!0==isMobile){var urlThumbMobile=objChild.data("thumb-mobile");void 0!==urlThumbMobile&&""!=urlThumbMobile&&(objItem.urlThumb=urlThumbMobile,"img"==tagname&&objChild.attr("src",objItem.urlThumb));var urlImageMobile=objChild.data("image-mobile");void 0!==urlImageMobile&&""!=urlImageMobile&&(objItem.urlImage=urlImageMobile)}objItem.link=itemLink,objItem.description=objChild.attr("title"),objItem.description||(objItem.description=objChild.data("description")),objItem.description||(objItem.description=""),objItem.isNewAdded=!1,objItem.isLoaded=!1,objItem.isThumbImageLoaded=!1,objItem.objPreloadImage=null,objItem.isBigImageLoadStarted=!1,objItem.isBigImageLoaded=!1,objItem.isBigImageLoadError=!1,objItem.imageWidth=0,objItem.imageHeight=0,objItem.thumbWidth=0,objItem.thumbHeight=0,objItem.thumbRatioByWidth=0,objItem.thumbRatioByHeight=0;var dataWidth=objChild.data("width"),dataHeight=objChild.data("height");dataWidth&&"number"==typeof dataWidth&&dataHeight&&"number"==typeof dataHeight&&(objItem.thumbWidth=dataWidth,objItem.thumbHeight=dataHeight,objItem.thumbRatioByWidth=dataWidth/dataHeight,objItem.thumbRatioByHeight=dataHeight/dataWidth),objItem.addHtml=null;var isImageMissing=void 0==objItem.urlImage||""==objItem.urlImage,isThumbMissing=void 0==objItem.urlThumb||""==objItem.urlThumb;switch(objItem.type){case"youtube":if(objItem.videoid=objChild.data("videoid"),objItem.video_start=objChild.data("start"),isImageMissing||isThumbMissing){var objImages=g_ugYoutubeAPI.getVideoImages(objItem.videoid);isImageMissing&&(objItem.urlImage=objImages.preview),isThumbMissing&&(objItem.urlThumb=objImages.thumb,"img"==tagname&&objChild.attr("src",objItem.urlThumb))}g_temp.isYoutubePresent=!0;break;case"vimeo":objItem.videoid=objChild.data("videoid"),g_temp.isVimeoPresent=!0;break;case"html5video":objItem.videoogv=objChild.data("videoogv"),objItem.videowebm=objChild.data("videowebm"),objItem.videomp4=objChild.data("videomp4"),g_temp.isHtml5VideoPresent=!0;break;case"soundcloud":objItem.trackid=objChild.data("trackid"),g_temp.isSoundCloudPresent=!0;break;case"wistia":objItem.videoid=objChild.data("videoid"),g_temp.isWistiaPresent=!0;break;case"custom":var objChildImage=objChild.children("img");objChildImage.length&&(objChildImage=jQuery(objChildImage[0]),objItem.urlThumb=objChildImage.attr("src"),objItem.title=objChildImage.attr("alt"),objItem.objThumbImage=objChildImage);var objChildren=objChild.children().not("img:first-child");objChildren.length&&(objItem.addHtml=objChildren.clone())}return objItem.objThumbImage&&(objItem.objThumbImage.removeAttr("data-description",""),objItem.objThumbImage.removeAttr("data-image",""),objItem.objThumbImage.removeAttr("data-thumb",""),objItem.objThumbImage.removeAttr("title","")),objItem}function fillItemsArray(arrChildren,isAppend){if(!0!==isAppend)g_arrItems=[];else for(var i=0;i<g_numItems;i++)g_arrItems[i].isNewAdded=!1;for(var i=0;i<arrChildren.length;i++){var objChild=jQuery(arrChildren[i]),objItem=fillItemByChild(objChild);if(null===objItem){objChild.remove();continue}numIndex=g_arrItems.length,objItem.index=numIndex,!0===isAppend&&(objItem.isNewAdded=!0),g_arrItems.push(objItem)}g_numItems=g_arrItems.length}function loadAPIs(){var isLoadExternally=g_options.load_api_externally;g_temp.isYoutubePresent&&g_ugYoutubeAPI.loadAPI(isLoadExternally),g_temp.isVimeoPresent&&g_ugVimeoAPI.loadAPI(isLoadExternally),g_temp.isHtml5VideoPresent&&g_ugHtml5MediaAPI.loadAPI(isLoadExternally),g_temp.isSoundCloudPresent&&g_ugSoundCloudAPI.loadAPI(isLoadExternally),g_temp.isWistiaPresent&&g_ugWistiaAPI.loadAPI(isLoadExternally)}function preloadBigImages(){if("visible"!=g_options.gallery_images_preload_type||g_objThumbs||(g_options.gallery_images_preload_type="minimal"),!0==g_temp.isAllItemsPreloaded)return!0;switch(g_options.gallery_images_preload_type){default:case"minimal":break;case"all":jQuery(g_arrItems).each(function(){preloadItemImage(this)});break;case"visible":jQuery(g_arrItems).each(function(){var a=this;!0==g_objThumbs.isItemThumbVisible(a)&&preloadItemImage(a)})}}function checkPreloadItemImage(objItem){if(!0==objItem.isBigImageLoadStarted|| !0==objItem.isBigImageLoaded|| !0==objItem.isBigImageLoadError)return!1;switch(g_options.gallery_images_preload_type){default:case"minimal":break;case"all":preloadItemImage(objItem);break;case"visible":!0==g_objThumbs.isItemThumbVisible(objItem)&&preloadItemImage(objItem)}}function preloadItemImage(objItem){if(!0==objItem.isBigImageLoadStarted|| !0==objItem.isBigImageLoaded|| !0==objItem.isBigImageLoadError)return!0;var imageUrl=objItem.urlImage;if(""==imageUrl|| void 0==imageUrl)return objItem.isBigImageLoadError=!0,!1;objItem.isBigImageLoadStarted=!0,objItem.objPreloadImage=jQuery("<img/>").attr("src",imageUrl),objItem.objPreloadImage.data("itemIndex",objItem.index),objItem.objPreloadImage.on("load",t.onItemBigImageLoaded),objItem.objPreloadImage.on("error",function(){var b=jQuery(this).data("itemIndex"),a=g_arrItems[b];a.isBigImageLoadError=!0,a.isBigImageLoaded=!1;var c=jQuery(this).attr("src");console.log("Can't load image: "+c),g_objGallery.trigger(t.events.ITEM_IMAGE_UPDATED,[b,a.urlImage]),a.objThumbImage.attr("src",a.urlThumb)}),checkAllItemsStartedPreloading()}function preloadNearBigImages(objItem){if(!0==g_temp.isAllItemsPreloaded)return!1;if(!objItem)var objItem=g_selectedItem;if(!objItem)return!0;var currentIndex=objItem.index,lastItemIndex=currentIndex-1,nextItemIndex=currentIndex+1;lastItemIndex>0&&preloadItemImage(g_arrItems[lastItemIndex]),nextItemIndex<g_numItems&&preloadItemImage(g_arrItems[nextItemIndex])}function checkAllItemsStartedPreloading(){if(!0==g_temp.isAllItemsPreloaded)return!1;for(var index in g_arrItems)if(!1==g_arrItems[index].isBigImageLoadStarted)return!1;g_temp.isAllItemsPreloaded=!0}function __________END_INIT_GALLERY_______(){}function __________EVENTS_____________(){}function onSliderMouseEnter(event){!0==g_options.gallery_pause_on_mouseover&& !1==t.isFullScreen()&& !0==g_temp.isPlayMode&&g_objSlider&& !1==g_objSlider.isSlideActionActive()&&t.pausePlaying()}function onSliderMouseLeave(event){!0==g_options.gallery_pause_on_mouseover&& !0==g_temp.isPlayMode&&g_objSlider&& !1==g_objSlider.isSlideActionActive()&& !1==g_objSlider.isCurrentSlideLoadingImage()&&t.continuePlaying()}function isThisGalleryForKeyAction(){if(!window.ugArrGalleriesObjects||(window.ugArrGalleriesObjects.length,1==window.ugArrGalleriesObjects.length))return!0;var currentScore,maxScore=0,currentGalleryID=t.getGalleryID();return jQuery.each(window.ugArrGalleriesObjects,function(d,b){var c=b.getGalleryID(),a=b.getKeyPressScore();a>maxScore&&(maxScore=a),c==currentGalleryID&&(currentScore=a)}),currentScore==maxScore}function onKeyPress(event){var obj=jQuery(event.target);if(obj.is("textarea")||obj.is("select")||obj.is("input"))return!0;var keyCode=event.charCode?event.charCode:event.keyCode?event.keyCode:event.which?event.which:0,wasAction=!1;switch(keyCode){case 39:var isGalleryForKeyAction=isThisGalleryForKeyAction();!0==isGalleryForKeyAction&&(t.nextItem(),wasAction=!0);break;case 37:var isGalleryForKeyAction=isThisGalleryForKeyAction();!0==isGalleryForKeyAction&&(t.prevItem(),wasAction=!0);break;default:wasAction=!1}!0==wasAction&&(event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation()),g_objGallery.trigger(t.events.GALLERY_KEYPRESS,[keyCode,event])}function onGalleryResized(){var objSize=t.getSize();if(0==objSize.width)return!0;t.setSizeClass();var objSize=t.getSize();if(objSize.width!=g_temp.lastWidth|| !1==g_temp.isFreestyleMode&&objSize.height!=g_temp.lastHeight){var heightWasSet=!1;if(g_temp.funcCustomHeight){var newHeight=g_temp.funcCustomHeight(objSize);newHeight&&(g_objWrapper.height(newHeight),heightWasSet=!0)}!1==heightWasSet&& !0==g_options.gallery_preserve_ratio&& !1==g_temp.isFreestyleMode&&setHeightByOriginalRatio(),storeLastSize(),g_objGallery.trigger(t.events.SIZE_CHANGE)}}function onThumbsChange(event){"visible"==g_options.gallery_images_preload_type&& !1==g_temp.isAllItemsPreloaded&&preloadBigImages()}function onFullScreenChange(){var isFullscreen=g_functions.isFullScreen(),event=isFullscreen?t.events.ENTER_FULLSCREEN:t.events.EXIT_FULLSCREEN;if(g_galleryID!==g_functions.getGlobalData("fullscreenID"))return!0;isFullscreen?g_objWrapper.addClass("ug-fullscreen"):g_objWrapper.removeClass("ug-fullscreen"),g_objGallery.trigger(event),onGalleryResized()}function onItemImageUpdated(event,index){var objItem=t.getItem(index);checkPreloadItemImage(objItem)}function onCurrentSlideImageLoadEnd(){!0==t.isPlayMode()&&t.continuePlaying()}function initEvents(){if(g_objWrapper.on("dragstart",function(a){a.preventDefault()}),g_objGallery.on(t.events.ITEM_IMAGE_UPDATED,onItemImageUpdated),g_objThumbs)switch(g_temp.thumbsType){case"strip":jQuery(g_objThumbs).on(g_objThumbs.events.STRIP_MOVE,onThumbsChange);break;case"grid":jQuery(g_objThumbs).on(g_objThumbs.events.PANE_CHANGE,onThumbsChange)}"advance"==g_options.gallery_mousewheel_role&& !1==g_temp.isFreestyleMode&&g_objWrapper.on("mousewheel",t.onGalleryMouseWheel),storeLastSize(),jQuery(window).resize(function(){g_objWrapper.css("width","auto"),g_functions.whenContiniousEventOver("gallery_resize",onGalleryResized,g_temp.resizeDelay)}),setTimeout(function(){setInterval(onGalleryResized,2e3)},1e4),g_functions.addFullScreenChangeEvent(onFullScreenChange),g_objSlider&&(jQuery(g_objSlider).on(g_objSlider.events.ITEM_CHANGED,function(){var a=g_objSlider.getCurrentItemIndex();-1!=a&&t.selectItem(a)}),!0==g_options.gallery_pause_on_mouseover&&(g_objSlider.getElement().hover(onSliderMouseEnter,onSliderMouseLeave),g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){onSliderMouseLeave()})),retriggerEvent(g_objSlider,g_objSlider.events.ACTION_START,t.events.SLIDER_ACTION_START),retriggerEvent(g_objSlider,g_objSlider.events.ACTION_END,t.events.SLIDER_ACTION_END),jQuery(g_objSlider).on(g_objSlider.events.CURRENTSLIDE_LOAD_END,onCurrentSlideImageLoadEnd)),!0==g_options.gallery_control_keyboard&&jQuery(document).keydown(onKeyPress)}function __________GENERAL_______(){}function cacheItems(cacheID,htmlItemsArg){if(htmlItemsArg){var htmlItems=htmlItemsArg;"noitems"!=htmlItems&&(htmlItems=jQuery(htmlItemsArg).clone())}else var htmlItems=g_objWrapper.children().clone();g_objCache[cacheID]=htmlItems}function removeAllSizeClasses(objWrapper){objWrapper||(objWrapper=g_objWrapper),objWrapper.removeClass("ug-under-480"),objWrapper.removeClass("ug-under-780"),objWrapper.removeClass("ug-under-960")}function retriggerEvent(object,originalEvent,newEvent){jQuery(object).on(originalEvent,function(a){g_objGallery.trigger(newEvent,[this])})}function advanceNextStep(){var timeNow=jQuery.now(),timeDiff=timeNow-g_temp.playTimeLastStep;g_temp.playTimeLastStep=timeNow;var isVisible=t.isGalleryVisible();if(!1==isVisible)return!1;if(g_temp.playTimePassed+=timeDiff,g_temp.objProgress){var percent=g_temp.playTimePassed/g_options.gallery_play_interval;g_temp.objProgress.setProgress(percent)}g_temp.playTimePassed>=g_options.gallery_play_interval&&(t.nextItem(),g_temp.playTimePassed=0)}function unselectSeletedItem(){if(null==g_selectedItem)return!0;g_objThumbs&&g_objThumbs.setThumbUnselected(g_selectedItem.objThumbWrapper),g_selectedItem=null,g_selectedItemIndex=-1}function toFakeFullScreen(){jQuery("body").addClass("ug-body-fullscreen"),g_objWrapper.addClass("ug-fake-fullscreen"),g_temp.isFakeFullscreen=!0,g_objGallery.trigger(t.events.ENTER_FULLSCREEN),g_objGallery.trigger(t.events.SIZE_CHANGE)}function exitFakeFullscreen(){jQuery("body").removeClass("ug-body-fullscreen"),g_objWrapper.removeClass("ug-fake-fullscreen"),g_temp.isFakeFullscreen=!1,g_objGallery.trigger(t.events.EXIT_FULLSCREEN),g_objGallery.trigger(t.events.SIZE_CHANGE)}this.onItemBigImageLoaded=function(d,a){if(!a)var a=jQuery(this);var b=g_arrItems[a.data("itemIndex")];b.isBigImageLoaded=!0;var c=g_functions.getImageOriginalSize(a);b.imageWidth=c.width,b.imageHeight=c.height},this.checkFillImageSize=function(b,a){if(!a){var c=b.data("itemIndex");if(void 0===c)throw new Error("Wrong image given to gallery.checkFillImageSize");var a=g_arrItems[c]}var d=g_functions.getImageOriginalSize(b);a.imageWidth=d.width,a.imageHeight=d.height},this.setFreestyleMode=function(){g_temp.isFreestyleMode=!0},this.attachThumbsPanel=function(a,b){g_temp.thumbsType=a,g_objThumbs=b},this.initSlider=function(a,b){if(!a)var a={};a=jQuery.extend(g_temp.objCustomOptions,a),(g_objSlider=new UGSlider).init(t,a,b)},this.onGalleryMouseWheel=function(a,b,c,d){a.preventDefault(),b>0?t.prevItem():t.nextItem()},this.getKeyPressScore=function(){return t.isGalleryInsideScreen()?1:g_objLightbox&& !0==g_objLightbox.isOpened()?2:0},this.getGalleryID=function(){return g_galleryID},this.destroy=function(){if(g_objWrapper.off("dragstart"),g_objGallery.off(t.events.ITEM_IMAGE_UPDATED),g_objThumbs)switch(g_temp.thumbsType){case"strip":jQuery(g_objThumbs).off(g_objThumbs.events.STRIP_MOVE);break;case"grid":jQuery(g_objThumbs).off(g_objThumbs.events.PANE_CHANGE)}if(g_objWrapper.off("mousewheel"),jQuery(window).off("resize"),g_functions.destroyFullScreenChangeEvent(),g_objSlider){jQuery(g_objSlider).off(g_objSlider.events.ITEM_CHANGED);var a=g_objSlider.getElement();a.off("mouseenter"),a.off("mouseleave"),g_objGallery.off(t.events.ENTER_FULLSCREEN),jQuery(g_objSlider).off(g_objSlider.events.ACTION_START),jQuery(g_objSlider).off(g_objSlider.events.ACTION_END),jQuery(g_objSlider).off(g_objSlider.events.CURRENTSLIDE_LOAD_END)}!0==g_options.gallery_control_keyboard&&jQuery(document).off("keydown"),g_objTheme&&"function"==typeof g_objTheme.destroy&&g_objTheme.destroy(),g_objWrapper.html("")},this.getArrItems=function(){return g_arrItems},this.getObjects=function(){return{g_galleryID:g_galleryID,g_objWrapper:g_objWrapper,g_objThumbs:g_objThumbs,g_objSlider:g_objSlider,g_options:g_options,g_arrItems:g_arrItems,g_numItems:g_numItems}},this.getObjSlider=function(){return g_objSlider},this.getItem=function(a){if(a<0||a>=g_numItems)throw new Error("item with index: "+a+" not found");return g_arrItems[a]},this.getWidth=function(){return t.getSize().width},this.getHeight=function(){return t.getSize().height},this.getSize=function(){var a=g_functions.getElementSize(g_objWrapper);return a.orig_width=g_options.gallery_width,a.orig_height=g_options.gallery_height,a.orig_ratio=a.orig_width/a.orig_height,a},this.getGalleryID=function(){return g_galleryID.replace("#","")},this.getNextItem=function(a,c){"object"==typeof a&&(a=a.index);var b=a+1;if(!0!==c&&1==g_numItems)return null;if(b>=g_numItems){if(!0!=g_options.gallery_carousel&& !0!==c)return null;b=0}return g_arrItems[b]},this.getPrevItem=function(a){"object"==typeof a&&(a=a.index);var b=a-1;if(b<0){if(!0!=g_options.gallery_carousel&& !0!==forceCarousel)return null;b=g_numItems-1}return g_arrItems[b]},this.getSelectedItem=function(){return g_selectedItem},this.getSelectedItemIndex=function(){return g_selectedItemIndex},this.getNumItems=function(){return g_numItems},this.isLastItem=function(){return g_selectedItemIndex==g_numItems-1},this.isFirstItem=function(){return 0==g_selectedItemIndex},this.getOptions=function(){return g_options},this.getElement=function(){return g_objWrapper},this.___________SET_CONTROLS___________=function(){},this.setNextButton=function(a){a.data("ug-button",!0),g_functions.setButtonOnClick(a,t.nextItem)},this.setPrevButton=function(a){a.data("ug-button",!0),g_functions.setButtonOnClick(a,t.prevItem)},this.setFullScreenToggleButton=function(a){a.data("ug-button",!0),g_functions.setButtonOnTap(a,t.toggleFullscreen),g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){a.addClass("ug-fullscreenmode")}),g_objGallery.on(t.events.EXIT_FULLSCREEN,function(){a.removeClass("ug-fullscreenmode")})},this.destroyFullscreenButton=function(a){g_functions.destroyButton(a),g_objGallery.off(t.events.ENTER_FULLSCREEN),g_objGallery.off(t.events.EXIT_FULLSCREEN)},this.setPlayButton=function(a){a.data("ug-button",!0),g_functions.setButtonOnClick(a,t.togglePlayMode),g_objGallery.on(t.events.START_PLAY,function(){a.addClass("ug-stop-mode")}),g_objGallery.on(t.events.STOP_PLAY,function(){a.removeClass("ug-stop-mode")})},this.destroyPlayButton=function(a){g_functions.destroyButton(a),g_objGallery.off(t.events.START_PLAY),g_objGallery.off(t.events.STOP_PLAY)},this.setProgressIndicator=function(a){g_temp.objProgress=a},this.setTextContainers=function(a,b){g_objGallery.on(t.events.ITEM_CHANGE,function(){var c=t.getSelectedItem();a.html(c.title),b.html(c.description)})},this.showDisabledOverlay=function(){g_objWrapper.children(".ug-overlay-disabled").show()},this.hideDisabledOverlay=function(){g_objWrapper.children(".ug-overlay-disabled").hide()},this.___________END_SET_CONTROLS___________=function(){},this.___________PLAY_MODE___________=function(){},this.startPlayMode=function(){if(g_temp.isPlayMode=!0,g_temp.isPlayModePaused=!1,g_temp.playTimePassed=0,g_temp.playTimeLastStep=jQuery.now(),g_temp.playHandle=setInterval(advanceNextStep,g_temp.playStepInterval),g_temp.objProgress){var a=g_temp.objProgress.getElement();g_temp.objProgress.setProgress(0),a.show()}g_objGallery.trigger(t.events.START_PLAY),g_objSlider&& !0==g_objSlider.isCurrentSlideLoadingImage()&&t.pausePlaying()},this.resetPlaying=function(){if(!1==g_temp.isPlayMode)return!0;g_temp.playTimePassed=0,g_temp.playTimeLastStep=jQuery.now()},this.pausePlaying=function(){if(!0==g_temp.isPlayModePaused)return!0;g_temp.isPlayModePaused=!0,clearInterval(g_temp.playHandle),g_objGallery.trigger(t.events.PAUSE_PLAYING)},this.continuePlaying=function(){if(!1==g_temp.isPlayModePaused)return!0;g_temp.isPlayModePaused=!1,g_temp.playTimeLastStep=jQuery.now(),g_temp.playHandle=setInterval(advanceNextStep,g_temp.playStepInterval)},this.stopPlayMode=function(){g_temp.isPlayMode=!1,clearInterval(g_temp.playHandle),g_temp.playTimePassed=0,g_temp.objProgress&&g_temp.objProgress.getElement().hide(),g_objGallery.trigger(t.events.STOP_PLAY)},this.isPlayMode=function(){return g_temp.isPlayMode},this.togglePlayMode=function(){!1==t.isPlayMode()?t.startPlayMode():t.stopPlayMode()},this.___________GENERAL_EXTERNAL___________=function(){},this.getCurrentNumItem=function(){return g_selectedItemIndex},this.shuffleItems=function(){for(var a in g_arrItems=g_functions.arrayShuffle(g_arrItems))g_arrItems[a].index=parseInt(a)},this.setOptions=function(a){g_options=jQuery.extend(g_options,a)},this.selectItem=function(a,c){"number"==typeof a&&(a=t.getItem(a));var b=a.index;if(b==g_selectedItemIndex)return!0;unselectSeletedItem(),g_selectedItem=a,g_selectedItemIndex=b,g_objGallery.trigger(t.events.ITEM_CHANGE,[a,c]),!0==g_temp.isPlayMode&&(t.resetPlaying(),!0==g_objSlider.isCurrentSlideLoadingImage()&&t.pausePlaying())},this.nextItem=function(){var a=g_selectedItemIndex+1;if(0==g_numItems|| !1==g_options.gallery_carousel&&a>=g_numItems)return!0;a>=g_numItems&&(a=0),t.selectItem(a,"next")},this.prevItem=function(){var a=g_selectedItemIndex-1;if(-1==g_selectedItemIndex&&(a=0),0==g_numItems|| !1==g_options.gallery_carousel&&a<0)return!0;a<0&&(a=g_numItems-1),t.selectItem(a,"prev")},this.isFullScreen=function(){return!0==g_temp.isFakeFullscreen|| !0==g_functions.isFullScreen()},this.isFakeFullscreen=function(){return g_temp.isFakeFullscreen},this.toFullScreen=function(){g_functions.setGlobalData("fullscreenID",g_galleryID);var a=g_objWrapper.get(0);!1==g_functions.toFullscreen(a)&&toFakeFullScreen()},this.exitFullScreen=function(){!0==g_temp.isFakeFullscreen?exitFakeFullscreen():g_functions.exitFullscreen()},this.toggleFullscreen=function(){!1==t.isFullScreen()?t.toFullScreen():t.exitFullScreen()},this.resize=function(c,a,b){g_objWrapper.css("width","auto"),g_objWrapper.css("max-width",c+"px"),a&&g_objWrapper.height(a),b|| !0===b||onGalleryResized()},this.setSizeClass=function(c,a){if(!c)var c=g_objWrapper;if(!a)var a=t.getSize().width;if(0==a)var a=jQuery(window).width();var b="";if(a<=480?b="ug-under-480":a<=780?b="ug-under-780":a<960&&(b="ug-under-960"),!0==c.hasClass(b))return!0;removeAllSizeClasses(c),""!=b&&c.addClass(b)},this.isMobileMode=function(){return!!(g_objWrapper.hasClass("ug-under-780")||g_objWrapper.hasClass("ug-under-480"))},this.isSmallWindow=function(){var a=jQuery(window).width();return!a||a<=480},this.isGalleryVisible=function(){return g_objWrapper.is(":visible")},this.isGalleryInsideScreen=function(){return!0!=g_temp.isFreestyleMode&&!!g_objSlider&&g_functions.isElementInsideScreen(g_objWrapper)},this.changeItems=function(a,b){if(!a)var a="noitems";runGallery(g_galleryID,"nochange",a,b)},this.addItems=function(b){if(!b||0==b.length)return!1;var a=g_objWrapper.children(".ug-newitems-wrapper");0==a.length&&g_objWrapper.append("<div class='ug-newitems-wrapper' style='display:none'></div>"),(a=g_objWrapper.children(".ug-newitems-wrapper")).append(b);var c=jQuery(a.children());if(fillItemsArray(c,!0),loadAPIs(),!g_objTheme||"function"!=typeof g_objTheme.addItems)throw new Error("addItems function not found in the theme");a.remove(),g_objTheme.addItems()},this.getNewAddedItemsIndexes=function(){var a=[];return jQuery.each(g_arrItems,function(b,c){!0==c.isNewAdded&&a.push(b)}),a},this.showErrorMessageReplaceGallery=function(a){showErrorMessage(a)},this.setFuncCustomHeight=function(a){g_temp.funcCustomHeight=a},this.setObjLightbox=function(a){g_objLightbox=a},this.__________EXTERNAL_EVENTS_______=function(){},this.triggerEvent=function(b,a){a?("array"!=jQuery.type(a)&&(a=[a]),g_objGallery.trigger(b,a)):g_objGallery.trigger(b)},this.onEvent=function(a,b){g_objGallery.on(a,b)},this.destroyEvent=function(a){g_objGallery.off(a)},this.__________AJAX_REQUEST_______=function(){},this.ajaxRequest=function(d,a,b,f){if(!b||"function"!=typeof b)throw new Error("ajaxRequest error: success function should be passed");var c=g_options.gallery_urlajax;if(!c||""==c)throw new Error("ajaxRequest error: Ajax url don't passed");if(void 0===a)var a={};var e={action:"unitegallery_ajax_action",client_action:d,galleryID:g_galleryID,data:a};jQuery.ajax({type:"post",url:g_options.gallery_urlajax,dataType:"json",data:e,success:function(a){if(!a)throw new Error("Empty ajax response!");if(-1==a||0===a|| void 0===a.success)throw new Error("ajax error!!!");if(!1==a.success)return showErrorMessage(a.message,"ajax error"),!1;b(a)},error:function(a,b,c){console.log("Ajax Error!!! "+b),responseText=a.responseText,f&&"function"==typeof f?f(responseText):trace(responseText)}})},this.requestNewItems=function(b,d,a){var c=g_options.gallery_enable_cache;if(a||(a=b),!0==d&&(c=!1),!0==c&&g_objCache.hasOwnProperty(a)){var e=g_objCache[a];t.changeItems(e,a)}else g_objGallery.trigger(t.events.GALLERY_BEFORE_REQUEST_ITEMS),t.ajaxRequest("front_get_cat_items",{catid:b},function(b){var c=b.html;t.changeItems(c,a)})},this.run=function(d,b){if(b&&b.hasOwnProperty("gallery_debug_errors")&&(g_options.gallery_debug_errors=b.gallery_debug_errors),!0==g_options.gallery_debug_errors)try{runGallery(d,b)}catch(a){if("object"==typeof a){var c=a.message,e=a.lineNumber,f=a.fileName,g=a.stack;c+=" <br><br> in file: "+f,c+=" <b> line "+e+"</b>",trace(a)}else var c=a;showErrorMessage(c=c.replace("Error:",""))}else runGallery(d,b)}}function UGLightbox(){var g_objTopPanel,g_objGallery,g_objWrapper,g_objOverlay,g_objArrowLeft,g_objArrowRight,g_objButtonClose,g_objNumbers,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_objSlider=new UGSlider,g_functions=new UGFunctions,g_objTextPanel=new UGTextPanel,g_options={lightbox_type:"wide",lightbox_show_textpanel:!0,lightbox_textpanel_width:550,lightbox_hide_arrows_onvideoplay:!0,lightbox_arrows_position:"sides",lightbox_arrows_offset:10,lightbox_arrows_inside_offset:10,lightbox_arrows_inside_alwayson:!1,lightbox_overlay_color:null,lightbox_overlay_opacity:1,lightbox_top_panel_opacity:null,lightbox_show_numbers:!0,lightbox_numbers_size:null,lightbox_numbers_color:null,lightbox_numbers_padding_top:null,lightbox_numbers_padding_right:null,lightbox_compact_closebutton_offsetx:1,lightbox_compact_closebutton_offsety:1,lightbox_close_on_emptyspace:!0};this.events={LIGHTBOX_INIT:"lightbox_init"};var g_temp={topPanelHeight:44,initTextPanelHeight:26,isOpened:!1,isRightNowOpened:!1,putSlider:!0,isCompact:!1,fadeDuration:300,positionFrom:null,textPanelTop:null,textPanelLeft:null,isArrowsInside:!1,isArrowsOnHoverMode:!1,lastMouseX:null,lastMouseY:null,originalOptions:null,isSliderChangedOnce:!1,isTopPanelEnabled:!0},g_defaults={lightbox_slider_controls_always_on:!0,lightbox_slider_enable_bullets:!1,lightbox_slider_enable_arrows:!1,lightbox_slider_enable_progress_indicator:!1,lightbox_slider_enable_play_button:!1,lightbox_slider_enable_fullscreen_button:!1,lightbox_slider_enable_zoom_panel:!1,lightbox_slider_enable_text_panel:!1,lightbox_slider_scale_mode_media:"down",lightbox_slider_scale_mode:"down",lightbox_slider_loader_type:3,lightbox_slider_loader_color:"black",lightbox_slider_transition:"fade",lightbox_slider_image_padding_top:g_temp.topPanelHeight,lightbox_slider_image_padding_bottom:0,lightbox_slider_video_padding_top:38,lightbox_slider_video_padding_bottom:0,lightbox_textpanel_align:"middle",lightbox_textpanel_padding_top:5,lightbox_textpanel_padding_bottom:5,slider_video_constantsize:!1,lightbox_slider_image_border:!1,lightbox_textpanel_enable_title:!0,lightbox_textpanel_enable_description:!1,lightbox_textpanel_desc_style_as_title:!0,lightbox_textpanel_enable_bg:!1,video_enable_closebutton:!1,lightbox_slider_video_enable_closebutton:!1,video_youtube_showinfo:!1,lightbox_slider_enable_links:!1},g_defaultsCompact={lightbox_overlay_opacity:.6,lightbox_slider_image_border:!0,lightbox_slider_image_shadow:!0,lightbox_slider_image_padding_top:30,lightbox_slider_image_padding_bottom:30,slider_video_constantsize:!0,lightbox_textpanel_align:"bottom",lightbox_textpanel_title_text_align:"left",lightbox_textpanel_desc_text_align:"left",lightbox_textpanel_padding_left:10,lightbox_textpanel_padding_right:10};function initLightbox(gallery,customOptions){g_gallery=gallery,g_objGallery=jQuery(gallery),g_gallery.setObjLightbox(t),g_options=jQuery.extend(g_options,g_defaults),g_options=jQuery.extend(g_options,customOptions),g_temp.originalOptions=jQuery.extend({},g_options),"compact"==g_options.lightbox_type&&(g_temp.isCompact=!0,g_options=jQuery.extend(g_options,g_defaultsCompact),g_options=jQuery.extend(g_options,customOptions)),modifyOptions(),!0==g_temp.putSlider?(g_gallery.initSlider(g_options,"lightbox"),g_objSlider=(g_objects=gallery.getObjects()).g_objSlider):g_objSlider=null,!0==g_options.lightbox_show_textpanel?g_objTextPanel.init(g_gallery,g_options,"lightbox"):g_objTextPanel=null}function modifyOptions(){!0==g_temp.isCompact&& !0==g_options.lightbox_show_textpanel&&(g_options.lightbox_slider_image_padding_bottom=g_temp.initTextPanelHeight),!0==g_temp.isCompact&&"inside"==g_options.lightbox_arrows_position&&(g_temp.isArrowsInside=!0),!0==g_temp.isArrowsInside&& !1==g_options.lightbox_arrows_inside_alwayson&&(g_temp.isArrowsOnHoverMode=!0),!1==g_options.lightbox_show_textpanel&&(g_temp.isTopPanelEnabled=!1,g_temp.topPanelHeight=0,g_options.lightbox_slider_image_padding_top=0)}function putLightboxHtml(){var html="",classAddition="";!0==g_temp.isCompact&&(classAddition=" ug-lightbox-compact"),html+="<div class='ug-gallery-wrapper ug-lightbox"+classAddition+"' >",html+="<div class='ug-lightbox-overlay'></div>",!1==g_temp.isCompact&&g_temp.isTopPanelEnabled?(html+="<div class='ug-lightbox-top-panel'>",html+="<div class='ug-lightbox-top-panel-overlay'></div>",g_options.lightbox_show_numbers&&(html+="<div class='ug-lightbox-numbers'></div>"),html+="</div>"):g_options.lightbox_show_numbers&&(html+="<div class='ug-lightbox-numbers'></div>"),html+="<div href=\"javascript:void(0)\" class='ug-lightbox-button-close'></div>",html+="<div class='ug-lightbox-arrow-left'></div>",html+="<div class='ug-lightbox-arrow-right'></div>",html+="</div>",g_objWrapper=jQuery(html),jQuery("body").append(g_objWrapper),g_objSlider&&g_objSlider.setHtml(g_objWrapper),g_objOverlay=g_objWrapper.children(".ug-lightbox-overlay"),!1==g_temp.isCompact&& !0==g_temp.isTopPanelEnabled&&0==(g_objTopPanel=g_objWrapper.children(".ug-lightbox-top-panel")).length&&(g_objTopPanel=null),g_objButtonClose=g_objWrapper.find(".ug-lightbox-button-close"),g_options.lightbox_show_numbers&&(g_objNumbers=g_objWrapper.find(".ug-lightbox-numbers")),g_objArrowLeft=g_objWrapper.children(".ug-lightbox-arrow-left"),g_objArrowRight=g_objWrapper.children(".ug-lightbox-arrow-right"),g_objTextPanel&&(g_objTopPanel?g_objTextPanel.appendHTML(g_objTopPanel):g_objTextPanel.appendHTML(g_objWrapper))}function setProperties(){if(null!==g_options.lightbox_overlay_color&&g_objOverlay.css("background-color",g_options.lightbox_overlay_color),null!==g_options.lightbox_overlay_opacity&&g_objOverlay.fadeTo(0,g_options.lightbox_overlay_opacity),g_objTopPanel&&null!==g_options.lightbox_top_panel_opacity&&g_objTopPanel.children(".ug-lightbox-top-panel-overlay").fadeTo(0,g_options.lightbox_top_panel_opacity),g_objNumbers){var cssNumbers={};null!==g_options.lightbox_numbers_size&&(cssNumbers["font-size"]=g_options.lightbox_numbers_size+"px"),g_options.lightbox_numbers_color&&(cssNumbers.color=g_options.lightbox_numbers_color),null!==g_options.lightbox_numbers_padding_right&&(cssNumbers["padding-right"]=g_options.lightbox_numbers_padding_right+"px"),null!==g_options.lightbox_numbers_padding_top&&(cssNumbers["padding-top"]=g_options.lightbox_numbers_padding_top+"px"),g_objNumbers.css(cssNumbers)}}function refreshSliderItem(newHeight){if(!g_objSlider)return!0;var objOptions={slider_image_padding_top:newHeight};g_objSlider.setOptions(objOptions),g_objSlider.refreshSlideItems()}function handlePanelHeight(fromWhere){if(!g_objTopPanel||!g_objTextPanel)return!1;var panelHeight=g_objTopPanel.height();if(0==panelHeight|| !1==g_objTopPanel.is(":visible"))return!1;var newPanelHeight=panelHeight,textPanelHeight=g_objTextPanel.getSize().height;panelHeight!=g_temp.topPanelHeight&&(newPanelHeight=g_temp.topPanelHeight),textPanelHeight>newPanelHeight&&(newPanelHeight=textPanelHeight),panelHeight!=newPanelHeight&&(g_objTopPanel.height(newPanelHeight),g_objSlider&& !1==g_objSlider.isAnimating()&&refreshSliderItem(newPanelHeight))}function positionTextPanelWide(size){var objOptions={},textWidth=g_options.lightbox_textpanel_width,minPaddingLeft=47,minPaddingRight=40;textWidth>size.width-minPaddingLeft-minPaddingRight?(objOptions.textpanel_padding_left=minPaddingLeft,objOptions.textpanel_padding_right=minPaddingRight,objOptions.textpanel_title_text_align="center",objOptions.textpanel_desc_text_align="center"):(objOptions.textpanel_padding_left=Math.floor((size.width-textWidth)/2),objOptions.textpanel_padding_right=objOptions.textpanel_padding_left,objOptions.textpanel_title_text_align="left",objOptions.textpanel_desc_text_align="left",g_options.lightbox_textpanel_title_text_align&&(objOptions.textpanel_title_text_align=g_options.lightbox_textpanel_desc_text_align),g_options.lightbox_textpanel_desc_text_align&&(objOptions.textpanel_desc_text_align=g_options.lightbox_textpanel_desc_text_align)),g_objTextPanel.setOptions(objOptions),g_objTextPanel.refresh(!0,!0),handlePanelHeight("positionTextPanelWide"),g_objTextPanel.positionPanel()}function hideTopPanel(){if(!g_objTopPanel)return!1;g_objTopPanel.hide()}function showTopPanel(){if(!g_objTopPanel)return!1;g_objTopPanel.show()}function handleCompactHeight(objImageSize){if(!1==g_temp.isOpened||!g_objTextPanel||!g_objSlider)return!1;var wrapperSize=g_functions.getElementSize(g_objWrapper),textPanelSize=g_objTextPanel.getSize();if(0==textPanelSize.width||textPanelSize.height>120)return!1;if(!objImageSize)var objImage=g_objSlider.getSlideImage(),objImageSize=g_functions.getElementSize(objImage);if(0==objImageSize.height||0==objImageSize.width||objImageSize.bottom+textPanelSize.height<wrapperSize.height)return!1;var sliderOptions=g_objSlider.getOptions(),imagePaddingBottom=textPanelSize.height;if(imagePaddingBottom!=sliderOptions.slider_image_padding_bottom){var objOptions={slider_image_padding_bottom:imagePaddingBottom};if(!1==g_objSlider.isAnimating())return g_objSlider.setOptions(objOptions),g_objSlider.refreshSlideItems(),!0}return!1}function setCompactTextpanelTop(objImageSize,positionPanel){if(!objImageSize)var objImage=g_objSlider.getSlideImage(),objImageSize=g_functions.getElementSize(objImage);g_temp.textPanelTop=objImageSize.bottom,!0===positionPanel&&g_objTextPanel.positionPanel(g_temp.textPanelTop,g_temp.textPanelLeft)}function handleCompactTextpanelSizes(showTextpanel){g_functions.getElementSize(g_objWrapper);var objImage=g_objSlider.getSlideImage(),objImageSize=g_functions.getElementSize(objImage);if(0==objImageSize.width)return!1;g_temp.textPanelLeft=objImageSize.left,g_temp.textPanelTop=objImageSize.bottom;var textPanelWidth=objImageSize.width;if(g_objNumbers){var objNumbersSize=g_functions.getElementSize(g_objNumbers);textPanelWidth-=objNumbersSize.width;var numbersLeft=objImageSize.right-objNumbersSize.width;g_functions.placeElement(g_objNumbers,numbersLeft,g_temp.textPanelTop)}g_objTextPanel&&(g_objTextPanel.show(),g_objTextPanel.refresh(!0,!0,textPanelWidth),setCompactTextpanelTop(objImageSize)),!1==handleCompactHeight(objImageSize)&&(g_temp.positionFrom="handleCompactTextpanelSizes",g_objTextPanel&&(g_objTextPanel.positionPanel(g_temp.textPanelTop,g_temp.textPanelLeft),!0===showTextpanel&&(showTextpanel(),showNumbers())))}function isSliderImageInPlace(){return!1==g_objSlider.isCurrentSlideType("image")|| !0==g_objSlider.isCurrentImageInPlace()}function positionArrowsInside(toShow,isAnimation){if(!1==g_temp.isArrowsInside||!g_objArrowLeft)return!1;var isImageInPlace=isSliderImageInPlace();if(g_objArrowLeft.show(),g_objArrowRight.show(),g_temp.positionFrom="positionArrowsInside",!0==g_temp.isArrowsOnHoverMode&& !0==isImageInPlace&& !1==isMouseInsideImage()&&hideArrows(!0),!1==isImageInPlace)var leftArrowLeft=g_functions.getElementRelativePos(g_objArrowLeft,"left",g_options.lightbox_arrows_offset),leftArrowTop=g_functions.getElementRelativePos(g_objArrowLeft,"middle"),rightArrowLeft=g_functions.getElementRelativePos(g_objArrowRight,"right",g_options.lightbox_arrows_offset),rightArrowTop=leftArrowTop;else{var objImage=g_objSlider.getSlideImage(),objImageSize=g_functions.getElementSize(objImage);g_functions.getElementSize(g_objSlider.getElement());var leftArrowLeft=g_functions.getElementRelativePos(g_objArrowLeft,"left",0,objImage)+objImageSize.left+g_options.lightbox_arrows_inside_offset,leftArrowTop=g_functions.getElementRelativePos(g_objArrowLeft,"middle",0,objImage)+objImageSize.top,rightArrowLeft=g_functions.getElementRelativePos(g_objArrowLeft,"right",0,objImage)+objImageSize.left-g_options.lightbox_arrows_inside_offset,rightArrowTop=leftArrowTop}if(!0===isAnimation){var objCssLeft={left:leftArrowLeft,top:leftArrowTop},objCssRight={left:rightArrowLeft,top:rightArrowTop};g_objArrowLeft.stop().animate(objCssLeft,{duration:g_temp.fadeDuration}),g_objArrowRight.stop().animate(objCssRight,{duration:g_temp.fadeDuration})}else g_objArrowLeft.stop(),g_objArrowRight.stop(),g_functions.placeElement(g_objArrowLeft,leftArrowLeft,leftArrowTop),g_functions.placeElement(g_objArrowRight,rightArrowLeft,rightArrowTop);!0==toShow&&showArrows(isAnimation)}function positionCloseButton(toShow,isAnimation){g_temp.positionFrom=null;var isImageInPlace=isSliderImageInPlace(),minButtonTop=2,maxButtonLeft=g_functions.getElementRelativePos(g_objButtonClose,"right",2,g_objWrapper);if(!1==isImageInPlace)var closeButtonTop=minButtonTop,closeButtonLeft=maxButtonLeft;else{var objImage=g_objSlider.getSlideImage(),objImageSize=g_functions.getElementSize(objImage),objSliderSize=g_functions.getElementSize(g_objSlider.getElement()),objButtonSize=g_functions.getElementSize(g_objButtonClose);objSliderSize.top==objSliderSize.height&&(objSliderSize.top=0);var closeButtonLeft=objSliderSize.left+objImageSize.right-objButtonSize.width/2+g_options.lightbox_compact_closebutton_offsetx,closeButtonTop=objSliderSize.top+objImageSize.top-objButtonSize.height/2-g_options.lightbox_compact_closebutton_offsety;closeButtonTop<minButtonTop&&(closeButtonTop=minButtonTop),closeButtonLeft>maxButtonLeft&&(closeButtonLeft=maxButtonLeft)}if(!0===isAnimation){var objCss={left:closeButtonLeft,top:closeButtonTop};g_objButtonClose.stop().animate(objCss,{duration:g_temp.fadeDuration})}else g_objButtonClose.stop(),g_functions.placeElement(g_objButtonClose,closeButtonLeft,closeButtonTop);!0===toShow&&showCloseButton(isAnimation)}function hideCompactElements(){g_objButtonClose&&g_objButtonClose.stop().fadeTo(g_temp.fadeDuration,0),hideTextPanel(),hideNumbers(),g_temp.positionFrom="hideCompactElements",!0==g_temp.isArrowsInside&&hideArrows()}function actualHideCompactElements(){g_objButtonClose&&g_objButtonClose.hide(),g_objArrowLeft&& !0==g_temp.isArrowsInside&&(g_objArrowLeft.hide(),g_objArrowRight.hide()),g_objNumbers&&g_objNumbers.hide(),g_objTextPanel&&g_objTextPanel.hide()}function positionElements(){var size=g_functions.getElementSize(g_objWrapper);g_objTopPanel&&g_functions.setElementSizeAndPosition(g_objTopPanel,0,0,size.width,g_temp.topPanelHeight),g_objArrowLeft&& !1==g_temp.isArrowsInside&&(!0==g_options.lightbox_hide_arrows_onvideoplay&&(g_objArrowLeft.show(),g_objArrowRight.show()),g_functions.placeElement(g_objArrowLeft,"left","middle",g_options.lightbox_arrows_offset),g_functions.placeElement(g_objArrowRight,"right","middle",g_options.lightbox_arrows_offset)),!1==g_temp.isCompact&&g_functions.placeElement(g_objButtonClose,"right","top",2,2),g_objTextPanel&&(g_temp.positionFrom="positionElements",!1==g_temp.isCompact?positionTextPanelWide(size):(showTextPanel(),showNumbers()));var sliderWidth=size.width,sliderHeight=size.height,sliderTop=0,sliderLeft=0;if(g_objSlider){if(g_objTopPanel){var objOptions={slider_image_padding_top:g_objTopPanel.height()};g_objSlider.setOptions(objOptions)}g_objSlider.setSize(sliderWidth,sliderHeight),g_objSlider.setPosition(sliderLeft,sliderTop)}}function hideTextPanel(){g_objTextPanel&&g_objTextPanel.getElement().stop().fadeTo(g_temp.fadeDuration,0)}function hideNumbers(){g_objNumbers&&g_objNumbers.stop().fadeTo(g_temp.fadeDuration,0)}function isMouseInsideImage(){if(!g_temp.lastMouseX)return!0;var obj={pageX:g_temp.lastMouseX,pageY:g_temp.lastMouseY};return g_objSlider.isMouseInsideSlideImage(obj)}function hideArrows(noAnimation,isForce){return!!g_objArrowLeft&&(!0==g_temp.isArrowsOnHoverMode&& !1===isForce?(isMouseInsideImage(),!0):void(!0===noAnimation?(g_objArrowLeft.stop().fadeTo(0,0),g_objArrowRight.stop().fadeTo(0,0)):(g_objArrowLeft.stop().fadeTo(g_temp.fadeDuration,0),g_objArrowRight.stop().fadeTo(g_temp.fadeDuration,0))))}function isArrowsHidden(){return!g_objArrowLeft|| !1==g_objArrowLeft.is(":visible")||1!=g_objArrowLeft.css("opacity")}function showArrows(noStop,fromHover){return!!g_objArrowLeft&&(!0==g_temp.isArrowsOnHoverMode&& !0!==fromHover&& !0==isSliderImageInPlace()|| !0==g_objSlider.isSwiping()||void(!0!==noStop&&(g_objArrowLeft.stop(),g_objArrowRight.stop()),g_objArrowLeft.fadeTo(g_temp.fadeDuration,1),g_objArrowRight.fadeTo(g_temp.fadeDuration,1)))}function showCloseButton(noStop){!0!==noStop&&g_objButtonClose.stop(),g_objButtonClose.fadeTo(g_temp.fadeDuration,1)}function updateTextPanelText(currentItem){if(!g_objTextPanel)return!1;if(!currentItem)var currentItem=g_objSlider.getCurrentItem();g_objTextPanel.setTextPlain(currentItem.title,currentItem.description)}function updateNumbersText(currentItem){if(!g_objNumbers)return!1;if(!currentItem)var currentItem=g_objSlider.getCurrentItem();var numItems=g_gallery.getNumItems(),numCurrentItem=currentItem.index+1;g_objNumbers.html(numCurrentItem+" / "+numItems)}function showTextPanel(){if(!g_objTextPanel)return!1;g_objTextPanel.getElement().show().stop().fadeTo(g_temp.fadeDuration,1)}function showNumbers(){g_objNumbers&&g_objNumbers.stop().fadeTo(g_temp.fadeDuration,1)}function onSliderDragStart(){if(!1==g_temp.isCompact)return!0;hideCompactElements()}function onZoomChange(){if(!1==g_temp.isCompact)return!0;g_temp.positionFrom="onZoomChange",positionCloseButton(!1,!0),positionArrowsInside(!1,!0),!0==g_temp.isCompact&&(!1==(g_objSlider.isCurrentSlideType("image")&& !0==g_objSlider.isCurrentImageInPlace())?(hideTextPanel(),hideNumbers()):(g_temp.positionFrom="onZoomChange",showTextPanel(),showNumbers()))}function onSliderAfterReturn(){if(!1==g_temp.isCompact)return!0;g_temp.positionFrom="onSliderAfterReturn",positionCloseButton(!0),positionArrowsInside(!0),!1==handleCompactHeight()&&handleCompactTextpanelSizes(),showTextPanel(),showNumbers()}function onSliderAfterPutImage(data,objSlide){if(objSlide=jQuery(objSlide),!1==g_temp.isCompact|| !1==g_objSlider.isSlideCurrent(objSlide))return!0;g_temp.positionFrom="onSliderAfterPutImage",positionCloseButton(!0),positionArrowsInside(!0),handleCompactTextpanelSizes()}function onSliderTransitionEnd(){var imagePaddingTop=g_objSlider.getOptions().slider_image_padding_top;if(g_objTopPanel){var panelHeight=g_objTopPanel.height();panelHeight!=imagePaddingTop&&refreshSliderItem(panelHeight)}!0==g_temp.isCompact&&(updateTextPanelText(),updateNumbersText(),g_temp.positionFrom="onSliderTransitionEnd",positionCloseButton(!0),positionArrowsInside(!0),!1==g_objSlider.isSlideActionActive()&& !1==handleCompactHeight()&&handleCompactTextpanelSizes(),showTextPanel(),showNumbers())}function onItemChange(data,currentItem){!1==g_temp.isCompact?(g_objNumbers&&updateNumbersText(currentItem),g_objTextPanel&&(updateTextPanelText(currentItem),!1==g_temp.isRightNowOpened&&(g_objTextPanel.positionElements(!1),handlePanelHeight("onchange"),g_objTextPanel.positionPanel()))):!1==g_objSlider.isAnimating()&&(g_objTextPanel&&updateTextPanelText(currentItem),g_objNumbers&&updateNumbersText(currentItem)),!1==g_temp.isSliderChangedOnce&&(g_temp.isSliderChangedOnce=!0,g_objThis.trigger(t.events.LIGHTBOX_INIT))}function onSliderClick(data,event){return!!("image"!=g_objSlider.getSlideType()&& !1==g_temp.isCompact&&g_objSlider.isSlideActionActive())||(!0==g_objSlider.isPreloading()?(t.close("slider"),!0):void(!0==g_options.lightbox_close_on_emptyspace&& !1==g_objSlider.isMouseInsideSlideImage(event)&&t.close("slider_inside")))}function onResize(){positionElements()}function onPlayVideo(){g_objTopPanel?hideTopPanel():g_objNumbers&&g_objNumbers.hide(),g_objArrowLeft&& !0==g_options.lightbox_hide_arrows_onvideoplay&&(g_objArrowLeft.hide(),g_objArrowRight.hide())}function onStopVideo(){g_objTopPanel?(showTopPanel(),handlePanelHeight("onStopVideo")):g_objNumbers&&g_objNumbers.show(),g_objArrowLeft&& !0==g_options.lightbox_hide_arrows_onvideoplay&&(g_objArrowLeft.show(),g_objArrowRight.show())}function onKeyPress(data,key,event){var isScrollKey=!1;switch(key){case 27:!0==g_temp.isOpened&&t.close("keypress");break;case 38:case 40:case 33:case 34:isScrollKey=!0}!0==g_temp.isOpened&& !0==isScrollKey&&event.preventDefault()}function onImageMouseEnter(){!0==g_temp.isArrowsOnHoverMode&&showArrows(!1,!0)}function onImageMouseLeave(event){g_temp.positionFrom="hideCompactElements",!0==g_temp.isArrowsOnHoverMode&& !0==isSliderImageInPlace()&&hideArrows(!1,!0)}function onMouseMove(event){g_temp.lastMouseX=event.pageX,g_temp.lastMouseY=event.pageY,!0==isArrowsHidden()&&isMouseInsideImage()&& !1==g_objSlider.isAnimating()&&(g_temp.positionFrom="onMouseMove",g_objArrowLeft&& !1==g_objArrowLeft.is(":animated")&&showArrows(!1,!0))}function onMouseWheel(event,delta,deltaX,deltaY){if(!1==g_temp.isOpened)return!0;switch(g_options.gallery_mousewheel_role){default:case"zoom":"image"!=g_objSlider.getSlideType()&&event.preventDefault();break;case"none":event.preventDefault();break;case"advance":g_gallery.onGalleryMouseWheel(event,delta,deltaX,deltaY)}}function initEvents(){if(g_objOverlay.on("touchstart",function(a){a.preventDefault()}),g_objOverlay.on("touchend",function(a){t.close("overlay")}),g_functions.addClassOnHover(g_objArrowRight,"ug-arrow-hover"),g_functions.addClassOnHover(g_objArrowLeft,"ug-arrow-hover"),g_functions.addClassOnHover(g_objButtonClose),g_gallery.setNextButton(g_objArrowRight),g_gallery.setPrevButton(g_objArrowLeft),g_objButtonClose.on("click",function(){t.close("button")}),g_objGallery.on(g_gallery.events.ITEM_CHANGE,onItemChange),g_objSlider){jQuery(g_objSlider).on(g_objSlider.events.TRANSITION_END,onSliderTransitionEnd),jQuery(g_objSlider).on(g_objSlider.events.CLICK,onSliderClick);var objVideo=g_objSlider.getVideoObject();jQuery(objVideo).on(objVideo.events.PLAY_START,onPlayVideo),jQuery(objVideo).on(objVideo.events.PLAY_STOP,onStopVideo),jQuery(g_objSlider).on(g_objSlider.events.START_DRAG,onSliderDragStart),jQuery(g_objSlider).on(g_objSlider.events.TRANSITION_START,onSliderDragStart),jQuery(g_objSlider).on(g_objSlider.events.AFTER_DRAG_CHANGE,onSliderAfterReturn),jQuery(g_objSlider).on(g_objSlider.events.AFTER_RETURN,onSliderAfterReturn),jQuery(g_objSlider).on(g_objSlider.events.AFTER_PUT_IMAGE,onSliderAfterPutImage),jQuery(g_objSlider).on(g_objSlider.events.ZOOM_CHANGE,onZoomChange),jQuery(g_objSlider).on(g_objSlider.events.IMAGE_MOUSEENTER,onImageMouseEnter),jQuery(g_objSlider).on(g_objSlider.events.IMAGE_MOUSELEAVE,onImageMouseLeave)}jQuery(window).resize(function(){if(!1==g_temp.isOpened)return!0;g_functions.whenContiniousEventOver("lightbox_resize",onResize,100)}),g_objGallery.on(g_gallery.events.GALLERY_KEYPRESS,onKeyPress),!0==g_temp.isArrowsOnHoverMode&&jQuery(document).bind("mousemove",onMouseMove),g_objWrapper.on("mousewheel",onMouseWheel)}function switchToWide(){g_temp.isCompact=!1,modifyOptions(),g_temp.isArrowsInside=!1,g_temp.isArrowsOnHoverMode=!1,(g_options=jQuery.extend({},g_temp.originalOptions)).lightbox_arrows_position="sides",g_objSlider.setOptions(g_options)}this.destroy=function(){if(jQuery(document).unbind("mousemove"),g_objOverlay.off("touchstart"),g_objOverlay.off("touchend"),g_objButtonClose.off("click"),g_objGallery.off(g_gallery.events.ITEM_CHANGE),g_objSlider){jQuery(g_objSlider).off(g_objSlider.events.TRANSITION_END),jQuery(g_objSlider).off(g_objSlider.events.CLICK),jQuery(g_objSlider).off(g_objSlider.events.START_DRAG),jQuery(g_objSlider).off(g_objSlider.events.TRANSITION_START),jQuery(g_objSlider).off(g_objSlider.events.AFTER_DRAG_CHANGE),jQuery(g_objSlider).off(g_objSlider.events.AFTER_RETURN);var a=g_objSlider.getVideoObject();jQuery(a).off(a.events.PLAY_START),jQuery(a).off(a.events.PLAY_STOP),jQuery(g_objSlider).on(g_objSlider.events.IMAGE_MOUSEENTER,onImageMouseEnter),jQuery(g_objSlider).on(g_objSlider.events.IMAGE_MOUSELEAVE,onImageMouseLeave),g_objSlider.destroy()}jQuery(window).unbind("resize"),g_objGallery.off(g_gallery.events.GALLERY_KEYPRESS,onKeyPress),g_objWrapper.off("mousewheel"),g_objWrapper.remove()},this.isOpened=function(){return g_temp.isOpened},this.open=function(b){var a=g_gallery.getItem(b);g_temp.isOpened=!0,g_temp.isRightNowOpened=!0,setTimeout(function(){g_temp.isRightNowOpened=!1},100),g_objSlider&&g_objSlider.setItem(a,"lightbox_open"),g_objTextPanel&&g_objTextPanel.setTextPlain(a.title,a.description),g_objOverlay.stop().fadeTo(0,0),g_objWrapper.show(),g_objWrapper.fadeTo(0,1),g_objOverlay.stop().fadeTo(g_temp.fadeDuration,g_options.lightbox_overlay_opacity),positionElements(),!0==g_temp.isCompact&&(!0==g_objSlider.isPreloading()?actualHideCompactElements():!0==g_temp.isArrowsInside&&(g_objArrowLeft.hide(),g_objArrowRight.hide())),g_objSlider&&g_objSlider.startSlideAction(),g_objGallery.trigger(g_gallery.events.OPEN_LIGHTBOX,a)},this.close=function(a){g_temp.isOpened=!1,!0==g_temp.isCompact&&hideCompactElements(),g_objSlider&&g_objSlider.stopSlideAction(),"image"!=g_objSlider.getSlideType()?g_objWrapper.hide():g_objWrapper.fadeTo(g_temp.fadeDuration,0,function(){g_objWrapper.hide()}),g_objGallery.trigger(g_gallery.events.CLOSE_LIGHTBOX)},this.init=function(a,b){initLightbox(a,b)},this.putHtml=function(){g_gallery.isSmallWindow()&& !0==g_temp.isCompact&&switchToWide(),putLightboxHtml()},this.run=function(){setProperties(),g_objSlider&&g_objSlider.run(),initEvents()}}function UGCarousel(){var g_objGallery,g_objWrapper,g_arrItems,g_objCarouselWrapper,g_objInner,t=this,g_objThis=jQuery(this),g_gallery=new UniteGalleryMain,g_functions=new UGFunctions,g_objTileDesign=new UGTileDesign,g_thumbs=new UGThumbsGeneral,g_options={carousel_padding:8,carousel_space_between_tiles:20,carousel_navigation_numtiles:3,carousel_scroll_duration:500,carousel_scroll_easing:"easeOutCubic",carousel_autoplay:!0,carousel_autoplay_timeout:3e3,carousel_autoplay_direction:"right",carousel_autoplay_pause_onhover:!0,carousel_vertical_scroll_ondrag:!1};this.events={START_PLAY:"carousel_start_play",PAUSE_PLAY:"carousel_pause_play",STOP_PLAY:"carousel_stop_play"};var g_temp={eventSizeChange:"thumb_size_change",isFirstTimeRun:!0,carouselMaxWidth:null,tileWidth:0,initTileWidth:0,initTileHeight:0,sideSpace:1500,spaceActionSize:500,numCurrent:0,touchActive:!1,startInnerPos:0,lastTime:0,startTime:0,startMousePos:0,lastMousePos:0,scrollShortDuration:200,scrollShortEasing:"easeOutQuad",handle:null,isPlayMode:!1,isPaused:!1,storedEventID:"carousel"};function init(gallery,customOptions){g_objects=gallery.getObjects(),g_gallery=gallery,g_objGallery=jQuery(gallery),g_objWrapper=g_objects.g_objWrapper,g_arrItems=g_objects.g_arrItems,g_options=jQuery.extend(g_options,customOptions),g_objTileDesign.setFixedMode(),g_objTileDesign.setApproveClickFunction(isApproveTileClick),g_objTileDesign.init(gallery,g_options),g_thumbs=g_objTileDesign.getObjThumbs(),g_options=g_objTileDesign.getOptions(),g_temp.initTileWidth=g_options.tile_width,g_temp.initTileHeight=g_options.tile_height,g_temp.tileWidth=g_options.tile_width}function setHtml(objParent){if(!objParent)var objParent=g_objWrapper;var html="<div class='ug-carousel-wrapper'><div class='ug-carousel-inner'></div></div>";g_objWrapper.append(html),g_objInner=(g_objCarouselWrapper=g_objWrapper.children(".ug-carousel-wrapper")).children(".ug-carousel-inner"),g_objTileDesign.setHtml(g_objInner),g_thumbs.getThumbs().fadeTo(0,1)}function resizeTiles(newTileWidth,newTileHeight){if(!newTileHeight)var newTileHeight=g_temp.initTileHeight/g_temp.initTileWidth*newTileWidth;g_temp.tileWidth=newTileWidth;var optUpdate={tile_width:newTileWidth,tile_height:newTileHeight};g_objTileDesign.setOptions(optUpdate),g_options.tile_width=newTileWidth,g_options.tile_height=newTileHeight,g_objTileDesign.resizeAllTiles(newTileWidth),positionTiles(!0)}function run(){if(null===g_temp.carouselMaxWidth)throw new Error("The carousel width not set");if(g_temp.tileWidth<g_temp.initTileWidth){var newTileWidth=g_temp.carouselMaxWidth-2*g_options.carousel_padding;newTileWidth>g_temp.initTileWidth&&(newTileWidth=g_temp.initTileWidth),resizeTiles(newTileWidth);var numTiles=g_functions.getNumItemsInSpace(g_temp.carouselMaxWidth,newTileWidth,g_options.carousel_space_between_tiles)}else{var numTiles=g_functions.getNumItemsInSpace(g_temp.carouselMaxWidth,g_temp.tileWidth,g_options.carousel_space_between_tiles);if(numTiles<=0){numTiles=1;var newTileWidth=g_temp.carouselMaxWidth-2*g_options.carousel_padding;resizeTiles(newTileWidth)}}var realWidth=g_functions.getSpaceByNumItems(numTiles,g_temp.tileWidth,g_options.carousel_space_between_tiles);realWidth+=2*g_options.carousel_padding,g_objCarouselWrapper.width(realWidth),!0==g_temp.isFirstTimeRun?(initEvents(),g_objTileDesign.run(),jQuery.each(g_arrItems,function(b,a){a.objThumbWrapper.data("index",b),g_objWrapper.trigger(g_temp.eventSizeChange,[a.objThumbWrapper,!0]),a.objTileOriginal=a.objThumbWrapper.clone(!0,!0)}),positionTiles(!0),!0==g_options.carousel_autoplay&&t.startAutoplay()):(!0==g_options.carousel_autoplay&&t.pauseAutoplay(),scrollToTile(0,!1),!0==g_options.carousel_autoplay&&t.startAutoplay()),positionElements(),g_temp.isFirstTimeRun=!1}function getInnerPos(){return g_functions.getElementSize(g_objInner).left}function getMousePos(event){return g_functions.getMousePosition(event).pageX}function getTiles(){return g_objInner.children(".ug-thumb-wrapper")}function getNumTilesInSpace(space){return g_functions.getNumItemsInSpace(space,g_temp.tileWidth,g_options.carousel_space_between_tiles)}function getNumTiles(){return getTiles().length}function getTile(numTile){validateTileNum(numTile);var objTiles=getTiles();return jQuery(objTiles[numTile])}function getFirstTile(){return g_objInner.children(".ug-thumb-wrapper").first()}function getLastTile(){return g_objInner.children(".ug-thumb-wrapper").last()}function getTileClones(objTile,numClones,dir){var index=objTile.data("index");if(void 0==index)throw new Error("every tile should have index!");for(var arrClonedItems=[],i=0;i<numClones;i++){if("prev"==dir)var itemToAdd=g_gallery.getPrevItem(index,!0);else var itemToAdd=g_gallery.getNextItem(index,!0);if(!itemToAdd)throw new Error("the item to add is empty");var clonedTile=itemToAdd.objTileOriginal.clone(!0,!0);index=itemToAdd.index,clonedTile.addClass("cloned"),arrClonedItems.push(clonedTile)}return arrClonedItems}function getRemainSpaceRight(){var wrapperSize=g_functions.getElementSize(g_objCarouselWrapper),innerSize=g_functions.getElementSize(g_objInner),spaceTaken=innerSize.width-wrapperSize.width+innerSize.left,spaceRemain=g_temp.sideSpace-spaceTaken;return spaceRemain}function getRemainSpaceLeft(){var spaceTaken=-getInnerPos();return g_temp.sideSpace-spaceTaken}function getCarouselWidth(){return g_functions.getElementSize(g_objCarouselWrapper).width}function getNumTilesInCarousel(){var width=getCarouselWidth();return getNumTilesInSpace(width)}function positionTiles(setHeight){if(!setHeight)var setHeight=!1;var totalWidth,objTiles=getTiles(),posx=0,maxHeight=0;return jQuery.each(objTiles,function(c,a){a=jQuery(a),g_functions.placeElement(a,posx,0);var b=g_functions.getElementSize(a);posx+=b.width+g_options.carousel_space_between_tiles,maxHeight=Math.max(maxHeight,b.height),c==objTiles.length-1&&(totalWidth=b.right)}),g_objInner.width(totalWidth),maxHeight+=2*g_options.carousel_padding,!0===setHeight&&(g_objInner.height(maxHeight),g_objCarouselWrapper.height(maxHeight)),scrollToTile(g_temp.numCurrent,!1),totalWidth}function validateTileNum(numTile){if(numTile>getTiles().length-1)throw new Error("Wrogn tile number: "+numTile)}function addTiles(numTiles,dir){if("left"==dir)var anchorTile=getFirstTile();else var anchorTile=getLastTile();var arrNewTiles=getTileClones(anchorTile,numTiles,"left"==dir?"prev":"next");jQuery.each(arrNewTiles,function(b,a){"left"==dir?g_objInner.prepend(a):g_objInner.append(a),g_objWrapper.trigger(g_temp.eventSizeChange,a),g_objTileDesign.loadTileImage(a)})}function removeTiles(numTilesToRemove,direction){validateTileNum(numTiles);for(var arrTiles=getTiles(),numTiles=arrTiles.length,i=0;i<numTilesToRemove;i++)"left"==direction?jQuery(arrTiles[i]).remove():jQuery(arrTiles[numTiles-1-i]).remove()}function setInnerPos(pos){var objCss={left:pos+"px"};g_objInner.css(objCss)}function scrollToTile(numTile,isAnimation,isShort){if(void 0===isAnimation){var isAnimation=!0;if(g_objInner.is(":animated"))return!0}var objTile=getTile(numTile),objCss={left:-g_functions.getElementSize(objTile).left+g_options.carousel_padding+"px"};if(!0===isAnimation){var duration=g_options.carousel_scroll_duration,easing=g_options.carousel_scroll_easing;!0===isShort&&(duration=g_temp.scrollShortDuration,easing=g_temp.scrollShortEasing),g_objInner.stop(!0).animate(objCss,{duration:duration,easing:easing,queue:!1,complete:function(){g_temp.numCurrent=numTile,fillSidesWithTiles(!0)}})}else g_temp.numCurrent=numTile,g_objInner.css(objCss)}function getNeerestTileNum(){var innerPos=-getInnerPos(),numTiles=getNumTilesInSpace(innerPos),tile1Pos=g_functions.getElementSize(getTile(numTiles)).left,tile2Pos=g_functions.getElementSize(getTile(numTiles+1)).left;return Math.abs(tile1Pos-innerPos)<Math.abs(tile2Pos-innerPos)?numTiles:numTiles+1}function scrollToNeerestTile(){var tileNum=getNeerestTileNum();scrollToTile(tileNum,!0,!0)}function fillSidesWithTiles(){var spaceLeft=getRemainSpaceLeft(),spaceRight=getRemainSpaceRight(),numItemsLeft=0,numItemsRight=0,numItemsRemoveLeft=0,numItemsRemoveRight=0,numTiles=getNumTiles();if(spaceLeft>g_temp.spaceActionSize)numItemsLeft=getNumTilesInSpace(spaceLeft),addTiles(numItemsLeft,"left"),g_temp.numCurrent+=numItemsLeft;else if(spaceLeft< -g_temp.spaceActionSize){var numItemsRemoveLeft=getNumTilesInSpace(Math.abs(spaceLeft));removeTiles(numItemsRemoveLeft,"left"),g_temp.numCurrent-=numItemsRemoveLeft}if(spaceRight>g_temp.spaceActionSize?(numItemsRight=getNumTilesInSpace(spaceRight),addTiles(numItemsRight,"right")):spaceRight< -g_temp.spaceActionSize&&(numItemsRemoveRight=getNumTilesInSpace(Math.abs(spaceRight)),removeTiles(numItemsRemoveRight,"right")),numItemsRemoveRight>numTiles)throw new Error("Can't remove more then num tiles");var isPositioned=!1;return(numItemsLeft||numItemsRight||numItemsRemoveLeft||numItemsRemoveRight)&&(positionTiles(),isPositioned=!0),isPositioned}function positionElements(isFirstTime){g_functions.placeElement(g_objInner,0,g_options.carousel_padding),fillSidesWithTiles()}function autoplayStep(){"left"==g_options.carousel_autoplay_direction?t.scrollRight(1):t.scrollLeft(1)}function onTouchStart(event){if(!0==g_temp.touchActive)return!0;g_temp.touchActive=!0,t.pauseAutoplay(),g_temp.startTime=jQuery.now(),g_temp.startMousePos=getMousePos(event),g_temp.startInnerPos=getInnerPos(),g_temp.lastTime=g_temp.startTime,g_temp.lastMousePos=g_temp.startMousePos,g_functions.storeEventData(event,g_temp.storedEventID)}function onTouchMove(event){if(!1==g_temp.touchActive)return!0;g_functions.updateStoredEventData(event,g_temp.storedEventID),event.preventDefault();var scrollDir=null;if(!0==g_options.carousel_vertical_scroll_ondrag&&(scrollDir=g_functions.handleScrollTop(g_temp.storedEventID)),"vert"===scrollDir)return!0;g_temp.lastMousePos=getMousePos(event);var diff=g_temp.lastMousePos-g_temp.startMousePos,innerPos=g_temp.startInnerPos+diff,direction=diff>0?"prev":"next",innerSize=g_functions.getElementSize(g_objInner).width;innerPos>0&&"prev"==direction&&(innerPos/=3),innerPos< -innerSize&&"next"==direction&&(innerPos=g_temp.startInnerPos+diff/3),setInnerPos(innerPos)}function onTouchEnd(event){if(!1==g_temp.touchActive)return!0;g_temp.touchActive=!1,scrollToNeerestTile(),t.unpauseAutoplay()}function onMouseEnter(event){if(!1==g_options.carousel_autoplay_pause_onhover)return!0;!0==g_temp.isPlayMode&& !1==g_temp.isPaused&&t.pauseAutoplay()}function onMouseLeave(event){if(!1==g_options.carousel_autoplay_pause_onhover)return!0;t.unpauseAutoplay()}function initEvents(){g_objTileDesign.initEvents(),g_objCarouselWrapper.bind("mousedown touchstart",onTouchStart),jQuery("body").bind("mousemove touchmove",onTouchMove),jQuery(window).add("body").bind("mouseup touchend",onTouchEnd),g_objCarouselWrapper.hover(onMouseEnter,onMouseLeave)}function isApproveTileClick(){var passedTime=g_temp.lastTime-g_temp.startTime,passedDistanceAbs=Math.abs(g_temp.lastMousePos-g_temp.startMousePos);return!(passedTime>300)&&!(passedDistanceAbs>30)}this.startAutoplay=function(){g_temp.isPlayMode=!0,g_temp.isPaused=!1,g_objThis.trigger(t.events.START_PLAY),g_temp.handle&&clearInterval(g_temp.handle),g_temp.handle=setInterval(autoplayStep,g_options.carousel_autoplay_timeout)},this.unpauseAutoplay=function(){if(!1==g_temp.isPlayMode|| !1==g_temp.isPaused)return!0;t.startAutoplay()},this.pauseAutoplay=function(){if(!1==g_temp.isPlayMode)return!0;g_temp.isPaused=!0,g_temp.handle&&clearInterval(g_temp.handle),g_objThis.trigger(t.events.PAUSE_PLAY)},this.stopAutoplay=function(){if(!1==g_temp.isPlayMode)return!0;g_temp.isPaused=!1,g_temp.isPlayMode=!1,g_temp.handle&&clearInterval(g_temp.handle),g_objThis.trigger(t.events.STOP_PLAY)},this.destroy=function(){g_temp.handle&&clearInterval(g_temp.handle),g_objThis.off(t.events.START_PLAY),g_objThis.off(t.events.STOP_PLAY),g_objCarouselWrapper.unbind("mousedown"),g_objCarouselWrapper.unbind("touchstart"),jQuery("body").unbind("mousemove"),jQuery("body").unbind("touchmove"),jQuery(window).add("body").unbind("mouseup").unbind("touchend"),g_objCarouselWrapper.off("mouseenter").off("mouseleave"),g_objTileDesign.destroy()},this.init=function(b,c,a){a&&this.setMaxWidth(a),init(b,c)},this.setMaxWidth=function(a){g_temp.carouselMaxWidth=a},this.setHtml=function(a){setHtml(a)},this.getElement=function(){return g_objCarouselWrapper},this.getObjTileDesign=function(){return g_objTileDesign},this.getEstimatedHeight=function(){return g_options.tile_height+2*g_options.carousel_padding},this.run=function(){run()},this.scrollRight=function(a){if(!a||"object"==typeof a)var a=g_options.carousel_navigation_numtiles;var c=getNumTilesInCarousel();a>c&&(a=c);var b=g_temp.numCurrent-a;b<=0&&(b=0),scrollToTile(b)},this.scrollLeft=function(a){if(!a||"object"==typeof a)var a=g_options.carousel_navigation_numtiles;var c=getNumTilesInCarousel();a>c&&(a=c);var d=getNumTiles(),b=g_temp.numCurrent+a;b>=d&&(b=d-1),scrollToTile(b)},this.setScrollLeftButton=function(a){g_functions.setButtonMobileReady(a),g_functions.setButtonOnClick(a,t.scrollLeft)},this.setScrollRightButton=function(a){g_functions.setButtonMobileReady(a),g_functions.setButtonOnClick(a,t.scrollRight)},this.setPlayPauseButton=function(a){g_functions.setButtonMobileReady(a),!0==g_temp.isPlayMode&& !1==g_temp.isPaused&&a.addClass("ug-pause-icon"),g_objThis.on(t.events.START_PLAY,function(){a.addClass("ug-pause-icon")}),g_objThis.on(t.events.STOP_PLAY,function(){a.removeClass("ug-pause-icon")}),g_functions.setButtonOnClick(a,function(){!1==g_temp.isPlayMode|| !0==g_temp.isPaused?t.startAutoplay():t.stopAutoplay()})}}function UGLoadMore(){jQuery(this);var g_objWrapper,g_objButton,g_objLoader,g_objError,g_objGallery,g_gallery=new UniteGalleryMain;new UGFunctions;var g_temp={isInited:!1},g_options={loadmore_container:"ug_loadmore_wrapper"};function initObjects(){if(0==(g_objWrapper=jQuery("#"+g_options.loadmore_container)).length||0==(g_objButton=g_objWrapper.find(".ug-loadmore-button")).length||0==(g_objLoader=g_objWrapper.find(".ug-loadmore-loader")).length||0==(g_objError=g_objWrapper.find(".ug-loadmore-error")).length)return!1;g_temp.isInited=!0}function showLoadmore(){g_objWrapper.show()}function onLoadmoreClick(){g_objButton.hide(),g_objLoader.show();var data={numitems:g_gallery.getNumItems()};g_gallery.ajaxRequest("front_loadmore",data,function(a){g_objLoader.hide();var b=a.html_items,c=a.show_loadmore;!0==c?(g_objButton.blur().show(),g_objLoader.hide()):g_objWrapper.hide(),g_gallery.addItems(b)},function(a){a="Ajax Error!"+a,g_objLoader.hide(),g_objError.show(),g_objError.html(a)})}function initEvents(){g_gallery.onEvent("tiles_first_placed",showLoadmore),g_objButton.click(onLoadmoreClick)}this.events={},this.destroy=function(){if(!1==g_temp.isInited)return!1},this.init=function(a,b){if(g_objGallery=jQuery(g_gallery=a),g_options=jQuery.extend(g_options,b),initObjects(),!1==g_temp.isInited)return trace("load more not inited, something is wrong"),!1;initEvents()}}function UGTabs(){jQuery(this);var g_objTabs,g_objSelect,g_objGallery,g_gallery=new UniteGalleryMain;new UGFunctions;var g_options={tabs_type:"tabs",tabs_container:"#ug_tabs",tabs_class_selected:"ug-tab-selected"};function initTabs(gallery,customOptions){g_objGallery=jQuery(g_gallery=gallery),g_options=jQuery.extend(g_options,customOptions),"select"==g_options.tabs_type?g_objSelect=jQuery(g_options.tabs_container):g_objTabs=jQuery(g_options.tabs_container+" .ug-tab")}function runTabs(){initEvents()}function requestGalleryItems(catid){g_gallery.requestNewItems(catid)}function onTabClick(){var classSelected=g_options.tabs_class_selected,objTab=jQuery(this);if(objTab.hasClass(classSelected))return!0;g_objTabs.not(objTab).removeClass(classSelected),objTab.addClass(classSelected);var catID=objTab.data("catid");if(!catID)return!0;requestGalleryItems(catID)}function onSelectChange(){var catID=jQuery(this).val();if(!catID)return!0;requestGalleryItems(catID)}function initEvents(){"select"==g_options.tabs_type?g_objSelect.change(onSelectChange):g_objTabs.click(onTabClick)}this.events={},this.destroy=function(){g_objSelect&&g_objSelect.off("change"),g_objTabs&&g_objTabs.off("click")},this.init=function(a,b){initTabs(a,b)},this.run=function(){runTabs()}}function UG_API(gallery){var t=this;jQuery(t);var g_objGallery,g_gallery=new UniteGalleryMain,g_arrEvents=[];function convertItemDataForOutput(item){var output={index:item.index,title:item.title,description:item.description,urlImage:item.urlImage,urlThumb:item.urlThumb},addData=item.objThumbImage.data();for(var key in addData){switch(key){case"image":case"description":continue}output[key]=addData[key]}return output}g_gallery=gallery,g_objGallery=jQuery(gallery),this.events={API_INIT_FUNCTIONS:"api_init",API_ON_EVENT:"api_on_event"},this.on=function(b,a,c){switch(!0!==c&&g_arrEvents.push({event:b,func:a}),b){case"item_change":g_objGallery.on(g_gallery.events.ITEM_CHANGE,function(){var b=convertItemDataForOutput(g_gallery.getSelectedItem());a(b.index,b)});break;case"resize":g_objGallery.on(g_gallery.events.SIZE_CHANGE,a);break;case"enter_fullscreen":g_objGallery.on(g_gallery.events.ENTER_FULLSCREEN,a);break;case"exit_fullscreen":g_objGallery.on(g_gallery.events.EXIT_FULLSCREEN,a);break;case"play":g_objGallery.on(g_gallery.events.START_PLAY,a);break;case"stop":g_objGallery.on(g_gallery.events.STOP_PLAY,a);break;case"pause":g_objGallery.on(g_gallery.events.PAUSE_PLAYING,a);break;case"continue":g_objGallery.on(g_gallery.events.CONTINUE_PLAYING,a);break;case"open_lightbox":g_objGallery.on(g_gallery.events.OPEN_LIGHTBOX,a);break;case"close_lightbox":g_objGallery.on(g_gallery.events.CLOSE_LIGHTBOX,a);break;default:console&&console.log("wrong api event: "+b)}g_objGallery.trigger(t.events.API_ON_EVENT,[b,a])},this.play=function(){g_gallery.startPlayMode()},this.stop=function(){g_gallery.stopPlayMode()},this.togglePlay=function(){g_gallery.togglePlayMode()},this.enterFullscreen=function(){g_gallery.toFullScreen()},this.exitFullscreen=function(){g_gallery.exitFullScreen()},this.toggleFullscreen=function(){g_gallery.toggleFullscreen()},this.resetZoom=function(){var a=g_gallery.getObjSlider();if(!a)return!1;a.zoomBack()},this.zoomIn=function(){var a=g_gallery.getObjSlider();if(!a)return!1;a.zoomIn()},this.zoomOut=function(){var a=g_gallery.getObjSlider();if(!a)return!1;a.zoomOut()},this.nextItem=function(){g_gallery.nextItem()},this.prevItem=function(){g_gallery.prevItem()},this.selectItem=function(a){g_gallery.selectItem(a)},this.resize=function(a,b){b?g_gallery.resize(a,b):g_gallery.resize(a)},this.getItem=function(a){var b=g_gallery.getItem(a);return convertItemDataForOutput(b)},this.getNumItems=function(){return g_gallery.getNumItems()},this.getNumCurrent=function(){return g_gallery.getCurrentNumItem()},this.reloadGallery=function(a){if(!a)var a={};g_gallery.run(null,a),g_arrEvents.map(function(a){t.on(a.event,a.func,!0)})},this.changeItems=function(a){g_gallery.changeItems(a)},this.addItems=function(a){g_gallery.addItems(a)},this.destroy=function(){g_gallery.destroy()},g_objGallery.trigger(t.events.API_INIT_FUNCTIONS,t)}jQuery.fn.unitegallery=function(a){var c="#"+jQuery(this).attr("id");if(!a)var a={};var b=new UniteGalleryMain;return b.run(c,a),void 0===window.ugArrGalleriesObjects&&(window.ugArrGalleriesObjects=[]),window.ugArrGalleriesObjects.push(b),new UG_API(b)}
1
+ //Unite Gallery, Version: 1.7.69, released 20 September 2022
2
 
3
+ function debugLine(e,t,i){!0===e&&(e="true"),!1===e&&(e="false");var n=e;if("object"==typeof e)for(name in n="",e){var r=e[name];n+=" "+name+": "+r}1!=t||i||(n+=" "+Math.random()),1==i&&((i=jQuery("#debug_line")).width(200),500<=i.height()&&i.html(""),n=i.html()+"<br> -------------- <br>"+n),jQuery("#debug_line").show().html(n)}function debugSide(e){var t="";for(name in e){var i=e[name];t+=name+" : "+i+"<br>"}jQuery("#debug_side").show().html(t)}function trace(e){"undefined"!=typeof console&&console.log(e)}function UGFunctions(){var r=null,v=this,o={starTime:0,arrThemes:[],isTouchDevice:-1,isRgbaSupported:-1,timeCache:{},dataCache:{},lastEventType:"",lastEventTime:0,lastTouchStartElement:null,touchThreshold:700,handle:null};function t(e,t,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent?t.attachEvent("on"+e,i):t[e]=i}this.debugVar="",this.getvalopt={FORCE_BOOLEAN:"force_boolean",FORCE_NUMERIC:"force_numeric",TRIM:"trim"},this.z__________GENERAL___________=function(){},this.getVal=function(e,t,i,n){i=i||"";var r="",r=!e||"object"!=typeof e||0==e.hasOwnProperty(t)?i:e[t];switch(n){case v.getvalopt.FORCE_BOOLEAN:r=v.strToBool(r);break;case v.getvalopt.TRIM:r=String(r),r=jQuery.trim(r);break;case v.getvalopt.FORCE_NUMERIC:"string"==typeof(r=jQuery.trim(r))&&(r.replace("px",""),r=Number(r))}return r},this.z__________FULL_SCREEN___________=function(){},this.toFullscreen=function(e,t){if(e.requestFullscreen)e.requestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0},this.exitFullscreen=function(){if(0==v.isFullScreen())return!1;if(document.exitFullscreen)document.exitFullscreen();else if(document.cancelFullScreen)document.cancelFullScreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},this.addFullScreenChangeEvent=function(e){document.msExitFullscreen?t("MSFullscreenChange",document,e):document.mozCancelFullScreen?t("mozfullscreenchange",document,e):t("fullscreenchange",document,e)},this.destroyFullScreenChangeEvent=function(){jQuery(document).unbind("fullscreenChange"),jQuery(document).unbind("mozfullscreenchange"),jQuery(document).unbind("webkitfullscreenchange"),jQuery(document).unbind("MSFullscreenChange")},this.getFullScreenElement=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},this.isFullScreen=function(){var e=document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;return e=!!e},this.z__________GET_PROPS___________=function(){},this.getBrowserPrefix=function(){if(null!==r)return r;var e,t=["webkit","Moz","ms","O"],i=document.createElement("div");for(e in t){var n=t[e];if(n+"Transform"in i.style)return n=n.toLowerCase(),r=n}return r=""},this.getImageInsideParentDataByImage=function(e,t,i){var n=e.parent(),e=v.getImageOriginalSize(e);return v.getImageInsideParentData(n,e.width,e.height,t,i)},this.getImageInsideParentData=function(e,t,i,n,r,o,a){r=r||{};var s={};void 0===o&&(o=e.width()),void 0===a&&(a=e.height()),r.padding_left&&(o-=r.padding_left),r.padding_right&&(o-=r.padding_right),r.padding_top&&(a-=r.padding_top),r.padding_bottom&&(a-=r.padding_bottom);var l,u=null,d="100%",_=null,g=null,e="display:block;margin:0px auto;";return 0<t&&0<i&&("down"==n&&t<o&&i<a?(g=(o-(u=t))/2,_=(a-(d=i))/2):"fill"==n||"filltop"==n?(u=(d=a)*(l=t/i))<o?(d=(u=o)/l,g=0,_=Math.round((d-a)/2*-1),"filltop"==n&&(_=0)):(_=0,g=Math.round((u-o)/2*-1)):(_=0,g=(o-(u=(d=a)*(l=t/i)))/2,"fitvert"!=n&&o<u&&(g=0,_=(a-(d=(u=o)/l))/2)),u=Math.floor(u),d=Math.floor(d),_=Math.floor(_),g=Math.floor(g),e="position:absolute;"),r.padding_top&&(_+=r.padding_top),r.padding_left&&(g+=r.padding_left),s.imageWidth=u,s.imageHeight=d,s.imageTop=_,s.imageLeft=g,s.imageRight=g+u,s.imageBottom=0==_||"100%"==d?null:_+d,s.style=e,s},this.getElementCenterPosition=function(e,t){var i=e.parent(),n=v.getElementSize(e),r=v.getElementSize(i),e=r.width,i=r.height;t&&void 0!==t.padding_top&&(i-=t.padding_top),t&&void 0!==t.padding_bottom&&(i-=t.padding_bottom),t&&void 0!==t.padding_left&&(e-=t.padding_left),t&&void 0!==t.padding_right&&(e-=t.padding_right);r={};return r.left=Math.round((e-n.width)/2),r.top=Math.round((i-n.height)/2),t&&void 0!==t.padding_top&&(r.top+=t.padding_top),t&&void 0!==t.padding_left&&(r.left+=t.padding_left),r},this.getElementCenterPoint=function(e,t){t=t||!1;var i=v.getElementSize(e),e={};return e.x=i.width/2,e.y=i.height/2,1==t&&(e.x+=i.left,e.y+=i.top),e.x=Math.round(e.x),e.y=Math.round(e.y),e},this.getMousePosition=function(e,t){var i={pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY};return e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(i.pageX=e.originalEvent.touches[0].pageX,i.pageY=e.originalEvent.touches[0].pageY,i.clientX=e.originalEvent.touches[0].clientX,i.clientY=e.originalEvent.touches[0].clientY),t&&(t=t.offset(),i.mouseX=i.pageX-t.left,i.mouseY=i.pageY-t.top),i},this.getMouseElementPoint=function(e,t){e={x:e.pageX,y:e.pageY};return v.getElementLocalPoint(e,t)},this.getElementLocalPoint=function(e,t){var i={},t=t.offset();return i.x=Math.round(e.x-t.left),i.y=Math.round(e.y-t.top),i},this.getImageOriginalSize=function(e,t,i){if(void 0!==t&&void 0!==i)return{width:t,height:i};var n=e[0];if(void 0===n)throw new Error("getImageOriginalSize error - Image not found");t={};if(void 0!==n.naturalWidth)return t.width=n.naturalWidth,t.height=n.naturalHeight,t;if("number"==typeof e.data("naturalWidth"))return(t={}).width=e.data("naturalWidth"),t.height=e.data("naturalHeight"),t;i=new Image;return i.src=n.src,i.complete?(t.width=i.width,t.height=i.height,e.data("naturalWidth",t.width),e.data("naturalHeight",t.height),t):{width:0,height:0}},this.getimageRatio=function(e){var t=v.getImageOriginalSize(e);return v.getElementSize(e).width/t.width},this.isImageFitParent=function(e){var t=e.parent(),e=v.getElementSize(e),t=v.getElementSize(t);return e.width<=t.width&&e.height<=t.height},this.getElementSize=function(e){if(void 0===e)throw new Error("Can't get size, empty element");var t=e.position();return t.height=e.outerHeight(),t.width=e.outerWidth(),t.left=Math.round(t.left),t.top=Math.round(t.top),t.right=t.left+t.width,t.bottom=t.top+t.height,t},this.isElementBiggerThenParent=function(e){var t=e.parent(),e=v.getElementSize(e),t=v.getElementSize(t);return e.width>t.width||e.height>t.height},this.isPointInsideElement=function(e,t){return 0!=(0<=e.x&&e.x<t.width)&&0!=(0<=e.y&&e.y<t.height)},this.getElementRelativePos=function(e,t,i,n){var r;n=n||e.parent(),r="number"==typeof e?{width:e,height:e}:v.getElementSize(e);var o=v.getElementSize(n);switch(t){case"top":case"left":t=0,i&&(t+=i);break;case"center":t=Math.round((o.width-r.width)/2),i&&(t+=i);break;case"right":t=o.width-r.width,i&&(t-=i);break;case"middle":t=Math.round((o.height-r.height)/2),i&&(t+=i);break;case"bottom":t=o.height-r.height,i&&(t-=i)}return t},this.getScreenVisibleSize=function(){document.body.clientWidth,document.body.clientHeight,jQuery(document).scrollTop();var e=jQuery(document),t=e.scrollLeft(),i=e.scrollTop(),t=Math.round(t),n=(i=Math.round(i))+window.innerHeight,e=t+window.innerWidth;return{top:i,left:t,height:n-i,width:e-t,right:e,bottom:n}},this.isElementsIntersect=function(e,t){return!(e.right<t.left)&&(!(e.left>t.right)&&(!(e.bottom<t.top)&&!(e.top>t.bottom)))},this.isElementInsideScreen=function(e){var t=v.getElementSize(e),e=v.getScreenVisibleSize();return v.isElementsIntersect(e,t)},this.z_________SET_ELEMENT_PROPS_______=function(){},this.zoomImageInsideParent=function(e,t,i,n,r,o,a){r=r||"fit";var s,l,u,d=i=i||1.2,_=e.parent(),g=v.getElementSize(e),c=v.getImageOriginalSize(e),h=!1,p=0,m=0,f=0,i=0;if(n?(l=v.getMouseElementPoint(n,e),h=v.isPointInsideElement(l,g),f=l.x,i=l.y):h=!1,0==h&&(f=(l=v.getElementCenterPoint(e)).x,i=l.y),1==t)b=g.height*d,s=g.width*d,0!=f&&(p=-(f*d-f)),0!=i&&(m=-(i*d-i));else{var b=g.height/d;if((s=g.width/d)<v.getImageInsideParentData(_,c.width,c.height,r,a).imageWidth)return v.scaleImageFitParent(e,c.width,c.height,r,a),!0;1==h&&(0!=f&&(p=-(f/d-f)),0!=i&&(m=-(i/d-i)))}if(o){i=1;if(0!=c.width&&(i=s/c.width),o<i)return!1}return v.setElementSize(e,s,b),m=0==t&&0==h?(u=(h=v.getElementCenterPosition(e)).left,h.top):(u=g.left+p,g.top+m),v.placeElement(e,u,m),!0},this.placeElement=function(e,t,i,n,r,o){var a,s;if(0!=jQuery.isNumeric(t)&&0!=jQuery.isNumeric(i)||(o=o||e.parent(),a=v.getElementSize(e),s=v.getElementSize(o)),0==jQuery.isNumeric(t))switch(t){case"left":t=0,n&&(t+=n);break;case"center":t=Math.round((s.width-a.width)/2),n&&(t+=n);break;case"right":t=s.width-a.width,n&&(t-=n)}if(0==jQuery.isNumeric(i))switch(i){case"top":i=0,r&&(i+=r);break;case"middle":case"center":i=Math.round((s.height-a.height)/2),r&&(i+=r);break;case"bottom":i=s.height-a.height,r&&(i-=r)}o={position:"absolute",margin:"0px"};null!==t&&(o.left=t),null!==i&&(o.top=i),e.css(o)},this.placeElementInParentCenter=function(e){v.placeElement(e,"center","middle")},this.setElementSizeAndPosition=function(e,t,i,n,r){i={width:n+"px",height:r+"px",left:t+"px",top:i+"px",position:"absolute",margin:"0px"};e.css(i)},this.setElementSize=function(e,t,i){t={width:t+"px"};null!=i&&(t.height=i+"px"),e.css(t)},this.cloneElementSizeAndPos=function(e,t,i,n,r){var o=e.position();if(null==o)throw new Error("Can't get size, empty element");!0===i?(o.height=e.outerHeight(),o.width=e.outerWidth()):(o.height=e.height(),o.width=e.width()),o.left=Math.round(o.left),o.top=Math.round(o.top),n&&(o.left+=n),r&&(o.top+=r),v.setElementSizeAndPosition(t,o.left,o.top,o.width,o.height)},this.placeImageInsideParent=function(e,t,i,n,r,o){r=v.getImageInsideParentData(t,i,n,r,o),o="<img";return null!==r.imageWidth&&(o+=" width = '"+r.imageWidth+"'",r.style+="width:"+r.imageWidth+";"),null!=r.imageHeight&&("100%"==r.imageHeight?(o+=" height = '"+r.imageHeight+"'",r.style+="height:"+r.imageHeight+";"):(o+=" height = '"+r.imageHeight+"'",r.style+="height:"+r.imageHeight+"px;")),null!==r.imageTop&&(r.style+="top:"+r.imageTop+"px;"),null!==r.imageLeft&&(r.style+="left:"+r.imageLeft+"px;"),e=v.escapeDoubleSlash(e),o+=" style='"+r.style+"'",o+=' src="'+e+'"',o+=">",t.html(o),t.children("img")},this.scaleImageCoverParent=function(e,t,i){var n,r;r="number"==typeof t?(n=t,i):(n=t.outerWidth(),t.outerHeight());var o=v.getImageOriginalSize(e),a=o.width/o.height,s=r,i=s*a,t=0,o=0;i<n?(s=(i=n)/a,o=0,t=Math.round((s-r)/2*-1)):(t=0,o=Math.round((i-n)/2*-1)),i=Math.round(i),s=Math.round(s),e.css({width:i+"px",height:s+"px",left:o+"px",top:t+"px"})},this.scaleImageFitParent=function(e,t,i,n,r){var o=e.parent(),i=v.getImageInsideParentData(o,t,i,n,r),n=!1,r={};return null!==i.imageWidth&&(n=!0,e.removeAttr("width"),r.width=i.imageWidth+"px"),null!=i.imageHeight&&(n=!0,e.removeAttr("height"),r.height=i.imageHeight+"px"),null!==i.imageTop&&(n=!0,r.top=i.imageTop+"px"),null!==i.imageLeft&&(n=!0,r.left=i.imageLeft+"px"),1==n&&(r.position="absolute",r.margin="0px 0px",e.css(r)),i},this.scaleImageByHeight=function(e,t,i,n){n=v.getImageOriginalSize(e,i,n),n=n.width/n.height,n=Math.round(t*n);t=Math.round(t),v.setElementSize(e,n,t)},this.scaleImageByWidth=function(e,t,i,n){n=v.getImageOriginalSize(e,i,n),n=n.width/n.height,n=Math.round(t/n);t=Math.round(t),v.setElementSize(e,t,n)},this.scaleImageExactSizeInParent=function(e,t,i,n,r,o){var a=e.parent(),s=v.getElementSize(a);s.width<n&&(n=s.width),s.height<r&&(r=s.height);var l=v.getImageInsideParentData(null,t,i,o,null,n,r),u=n,d=r,_=l.imageLeft,a=l.imageLeft,t=l.imageTop,i=l.imageTop,o=Math.round((s.width-n)/2),s=Math.round((s.height-r)/2),n=n-(l.imageWidth+_+a);0!=n&&(a+=n),0!=(n=r-(l.imageHeight+t+i))&&(i+=n),e.removeAttr("width"),e.removeAttr("height");n={position:"absolute",margin:"0px 0px"};n.width=u+"px",n.height=d+"px",n.left=o+"px",n.top=s+"px",n["padding-left"]=_+"px",n["padding-top"]=t+"px",n["padding-right"]=a+"px",n["padding-bottom"]=i+"px",e.css(n);n={};return n.imageWidth=u,n.imageHeight=d,n},this.showElement=function(e,t,i){e.show().fadeTo(0,1),t&&t.show().fadeTo(0,1),i&&i.show().fadeTo(0,1)},this.z_________GALLERY_RELATED_FUNCTIONS_______=function(){},this.disableButton=function(e,t){t=t||"ug-button-disabled",0==v.isButtonDisabled(e,t)&&e.addClass(t)},this.convertCustomPrefixOptions=function(e,n,r){if(!n)return e;var o={};return jQuery.each(e,function(e,t){var i;0===e.indexOf(n+"_"+r+"_")?(i=e.replace(n+"_"+r+"_",r+"_"),o[i]=t):o[e]=t}),o},this.enableButton=function(e,t){t=t||"ug-button-disabled",1==v.isButtonDisabled(e,t)&&e.removeClass(t)},this.isButtonDisabled=function(e,t){return t=t||"ug-button-disabled",!!e.hasClass(t)},this.z_________MATH_FUNCTIONS_______=function(){},this.normalizeSetting=function(e,t,i,n,r,o){return r=e+(t-e)*((r-i)/(n-i)),1==(o=o||!1)&&(r<e&&(r=e),t<r&&(r=t)),r},this.getNormalizedValue=function(e,t,i,n,r){return r=e+(n-i)*((r-e)/(t-e))},this.getDistance=function(e,t,i,n){return Math.round(Math.sqrt(Math.abs((i-e)*(i-e)+(n-t)*(n-t))))},this.getMiddlePoint=function(e,t,i,n){var r={};return r.x=e+Math.round((i-e)/2),r.y=t+Math.round((n-t)/2),r},this.getNumItemsInSpace=function(e,t,i){return Math.floor((e+i)/(t+i))},this.getNumItemsInSpaceRound=function(e,t,i){return Math.round((e+i)/(t+i))},this.getSpaceByNumItems=function(e,t,i){return e*t+(e-1)*i},this.getItemSizeInSpace=function(e,t,i){return Math.floor((e-(t-1)*i)/t)},this.getColX=function(e,t,i){return e*(t+i)},this.getColByIndex=function(e,t){return t%e},this.getColRowByIndex=function(e,t){var i=Math.floor(e/t);return{col:Math.floor(e%t),row:i}},this.getIndexByRowCol=function(e,t,i){return e<0||t<0?-1:e*i+t},this.getPrevRowSameColIndex=function(e,t){e=v.getColRowByIndex(e,t);return v.getIndexByRowCol(e.row-1,e.col,t)},this.getNextRowSameColIndex=function(e,t){e=v.getColRowByIndex(e,t);return v.getIndexByRowCol(e.row+1,e.col,t)},this.z_________DATA_FUNCTIONS_______=function(){},this.setGlobalData=function(e,t){jQuery.data(document.body,e,t)},this.getGlobalData=function(e){return jQuery.data(document.body,e)},this.z_________EVENT_DATA_FUNCTIONS_______=function(){},this.handleScrollTop=function(e){if(0==v.isTouchDevice())return null;var t=v.getStoredEventData(e);if(null===t.scrollDir&&(15<Math.abs(t.diffMouseX)?t.scrollDir="hor":15<Math.abs(t.diffMouseY)&&Math.abs(t.diffMouseY)>Math.abs(t.diffMouseX)&&(t.scrollDir="vert",t.scrollStartY=t.lastMouseClientY,t.scrollOrigin=jQuery(document).scrollTop(),o.dataCache[e].scrollStartY=t.lastMouseClientY,o.dataCache[e].scrollOrigin=t.scrollOrigin),o.dataCache[e].scrollDir=t.scrollDir),"vert"!==t.scrollDir)return t.scrollDir;jQuery(document).scrollTop();e=t.scrollOrigin-(t.lastMouseClientY-t.scrollStartY);return 0<=e&&jQuery(document).scrollTop(e),t.scrollDir},this.wasVerticalScroll=function(e){return"vert"===v.getStoredEventData(e).scrollDir},this.storeEventData=function(e,t,i){var n=v.getMousePosition(e),e=jQuery.now(),n={startTime:e,lastTime:e,startMouseX:n.pageX,startMouseY:n.pageY,lastMouseX:n.pageX,lastMouseY:n.pageY,startMouseClientY:n.clientY,lastMouseClientY:n.clientY,scrollTop:jQuery(document).scrollTop(),scrollDir:null};i&&(n=jQuery.extend(n,i)),o.dataCache[t]=n},this.updateStoredEventData=function(e,t,i){if(!o.dataCache[t])throw new Error("updateEventData error: must have stored cache object");var n=o.dataCache[t],e=v.getMousePosition(e);n.lastTime=jQuery.now(),void 0!==e.pageX&&(n.lastMouseX=e.pageX,n.lastMouseY=e.pageY,n.lastMouseClientY=e.clientY),i&&(n=jQuery.extend(n,i)),o.dataCache[t]=n},this.getStoredEventData=function(e,t){if(!o.dataCache[e])throw new Error("updateEventData error: must have stored cache object");e=o.dataCache[e];return e.diffMouseX=e.lastMouseX-e.startMouseX,e.diffMouseY=e.lastMouseY-e.startMouseY,e.diffMouseClientY=e.lastMouseClientY-e.startMouseClientY,e.diffTime=e.lastTime-e.startTime,!0===t?(e.startMousePos=e.lastMouseY,e.lastMousePos=e.lastMouseY,e.diffMousePos=e.diffMouseY):(e.startMousePos=e.lastMouseX,e.lastMousePos=e.lastMouseX,e.diffMousePos=e.diffMouseX),e},this.isApproveStoredEventClick=function(e,t){if(!o.dataCache[e])return!0;e=v.getStoredEventData(e,t),t=Math.abs(e.diffMousePos);return!(400<e.diffTime)&&!(30<t)},this.clearStoredEventData=function(e){o.dataCache[e]=null},this.z_________CHECK_SUPPORT_FUNCTIONS_______=function(){},this.isCanvasExists=function(){return"function"==typeof jQuery('<canvas width="500" height="500" > </canvas>')[0].getContext},this.isScrollbarExists=function(){return window.innerWidth>document.documentElement.clientWidth},this.isTouchDevice=function(){if(-1!==o.isTouchDevice)return o.isTouchDevice;try{document.createEvent("TouchEvent"),o.isTouchDevice=!0}catch(e){o.isTouchDevice=!1}return o.isTouchDevice},this.isRgbaSupported=function(){if(-1!==o.isRgbaSupported)return o.isRgbaSupported;var e=document.getElementsByTagName("script")[0],t=e.style.color;try{e.style.color="rgba(1,5,13,0.44)"}catch(e){}var i=e.style.color!=t;return e.style.color=t,o.isRgbaSupported=i},this.z_________GENERAL_FUNCTIONS_______=function(){},this.checkMinJqueryVersion=function(e){for(var t=jQuery.fn.jquery.split("."),i=e.split("."),n=0,r=t.length;n<r;n++){var o=parseInt(t[n]),a=parseInt(i[n]);if(void 0===i[n])return!0;if(o<a)return!1;if(a<o)return!0}return!0},this.getCssSizeParam=function(e){return jQuery.isNumeric(e)?e+"px":e},this.convertHexToRGB=function(e,t){try{var i=e.replace("#","");if(i===e)return e;var n="rgba("+parseInt(i.substring(0,2),16)+","+parseInt(i.substring(2,4),16)+","+parseInt(i.substring(4,6),16)+","+t+")"}catch(e){n="rgba(0,0,0,1)";trace("error in convertHexToRGB function"),trace(e),trace("hex: "+i)}return n},this.timestampToString=function(e){var t=new Date(e),e=t.getDate()+"/"+t.getMonth();return e+=" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+":"+t.getMilliseconds()},this.getArrTouches=function(e){var t=[];return e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(t=e.originalEvent.touches),t},this.getArrTouchPositions=function(e){for(var t=[],i=0;i<e.length;i++){var n={pageX:e[i].pageX,pageY:e[i].pageY};t.push(n)}return t},this.startTimeDebug=function(){o.starTime=jQuery.now()},this.showTimeDebug=function(){debugLine({"Time Passed":jQuery.now()-o.starTime},!0)},this.initProgressIndicator=function(e,t,i){switch("bar"!=e&&0==v.isCanvasExists()&&(e="bar"),e){case"bar":(n=new UGProgressBar).putHidden(i,t);break;default:case"pie":(n=new UGProgressPie).putHidden(i,t);break;case"pie2":var n;t.type_fill=!0,(n=new UGProgressPie).putHidden(i,t)}return n},this.setButtonMobileReady=function(e){e.on("touchstart",function(e){jQuery(this).addClass("ug-nohover")}),e.on("mousedown touchend",function(e){return e.stopPropagation(),e.stopImmediatePropagation(),!1})},this.registerTheme=function(e){o.arrThemes.push(e)},this.getArrThemes=function(){return o.arrThemes},this.isThemeRegistered=function(e){return-1!==jQuery.inArray(e,o.arrThemes)},this.getFirstRegisteredTheme=function(){return 0==o.arrThemes.length?"":o.arrThemes[0]},this.isTimePassed=function(e,t){t=t||100;var i=jQuery.now();lastTime=0==o.timeCache.hasOwnProperty(e)?0:o.timeCache[e];var n=i-lastTime;return o.timeCache[e]=i,!(n<=t)},this.whenContiniousEventOver=function(e,t,i){i=i||300,1==o.timeCache.hasOwnProperty(e)&&null!=o.timeCache[e]&&(clearTimeout(o.timeCache[e]),o.timeCache[e]=null),o.timeCache[e]=setTimeout(t,i)},this.validateClickTouchstartEvent=function(e){var t=!0,i=jQuery.now()-o.lastEventTime;return"click"==e&&"touchstart"==o.lastEventType&&i<1e3&&(t=!1),o.lastEventTime=jQuery.now(),o.lastEventType=e,t},this.addClassOnHover=function(e,t){t=t||"ug-button-hover",e.hover(function(){jQuery(this).addClass(t)},function(){jQuery(this).removeClass(t)})},this.destroyButton=function(e){e.off("mouseenter"),e.off("mouseleave"),e.off("click"),e.off("touchstart"),e.off("touchend"),e.off("mousedown"),e.off("tap")},this.setButtonOnClick=function(e,i){v.setButtonMobileReady(e),e.on("click touchstart",function(e){var t=jQuery(this);if(e.stopPropagation(),e.stopImmediatePropagation(),0==v.validateClickTouchstartEvent(e.type))return!0;i(t,e)})},this.setButtonOnTap=function(e,t){e.on("tap",t),0==v.isTouchDevice()?e.on("click",function(e){var t=jQuery(this);if(0==v.validateClickTouchstartEvent(e.type))return!0;t.trigger("tap")}):(e.on("touchstart",function(e){jQuery(this).addClass("ug-nohover"),o.lastTouchStartElement=jQuery(this),o.lastEventTime=jQuery.now()}),e.on("touchend",function(e){var t=jQuery(this);return 0==t.is(o.lastTouchStartElement)||(!o.lastEventTime||(jQuery.now()-o.lastEventTime>o.touchThreshold||void t.trigger("tap")))}))},this.loadJs=function(e,t){!0===t&&(e=location.protocol+"//"+e);t=document.createElement("script");t.src=e;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)},this.loadCss=function(e,t){!0===t&&(e=location.protocol+"//"+e);t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(t)},this.addEvent=function(e,t,i){void 0!==e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i)},this.checkImagesLoaded=function(n,i,r){var o=0,a=n.length;if(0==a&&i)return i(),!1;function s(e,t){o++,"function"==typeof r&&setTimeout(function(){r(e,t)}),o==a&&"function"==typeof i&&setTimeout(function(){i()})}setTimeout(function(){for(var e=0;e<a;e++){var t,i=n[e];void 0!==i.naturalWidth&&0!==i.naturalWidth?s(n[e],!1):((t=jQuery("<img/>")).data("index",e),t.on("load",function(){var e=jQuery(this).data("index");s(n[e],!1)}),t.on("error",function(){var e=jQuery(this).data("index");s(n[e],!0)}),t.attr("src",i.src))}})},this.waitForWidth=function(e,t){var i=e.width();if(0!=i)return t(),!1;o.handle=setInterval(function(){0!=e.width()&&(clearInterval(o.handle),t())},300)},this.arrayShuffle=function(e){if("object"!=typeof e)return e;for(var t,i,n=e.length;n;t=parseInt(Math.random()*n),i=e[--n],e[n]=e[t],e[t]=i);return e},this.getObjectLength=function(e){var t,i=0;for(t in e)i++;return i},this.normalizePercent=function(e){return e<0&&(e=0),1<e&&(e=1),e},this.stripTags=function(e){return"string"!=typeof e?e:e.replace(/(<([^>]+)>)/gi,"")},this.escapeDoubleSlash=function(e){return e.replace('"','"')},this.htmlentitles=function(e){return jQuery("<div/>").text(e).html()},this.z_________END_GENERAL_FUNCTIONS_______=function(){}}!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(l){function t(e){var t,i,n=e||window.event,r=c.call(arguments,1),o=0,a=0,s=0;if(e=l.event.fix(n),e.type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(a=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(a=-1*s,s=0),o=0===s?a:s,"deltaY"in n&&(s=-1*n.deltaY,o=s),"deltaX"in n&&(a=n.deltaX,0===s&&(o=-1*a)),0!==s||0!==a)return 1===n.deltaMode?(o*=i=l.data(this,"mousewheel-line-height"),s*=i,a*=i):2===n.deltaMode&&(o*=i=l.data(this,"mousewheel-page-height"),s*=i,a*=i),t=Math.max(Math.abs(s),Math.abs(a)),(!g||t<g)&&(d(n,g=t)&&(g/=40)),d(n,t)&&(o/=40,a/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/g),a=Math[1<=a?"floor":"ceil"](a/g),s=Math[1<=s?"floor":"ceil"](s/g),e.deltaX=a,e.deltaY=s,e.deltaFactor=g,e.deltaMode=0,r.unshift(e,o,a,s),_&&clearTimeout(_),_=setTimeout(u,200),(l.event.dispatch||l.event.handle).apply(this,r)}function u(){g=null}function d(e,t){return r.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var _,g,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],c=Array.prototype.slice;if(l.event.fixHooks)for(var n=e.length;n;)l.event.fixHooks[e[--n]]=l.event.mouseHooks;var r=l.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],t,!1);else this.onmousewheel=t;l.data(this,"mousewheel-line-height",r.getLineHeight(this)),l.data(this,"mousewheel-page-height",r.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],t,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(l(e)["offsetParent"in l.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(e){return l(e).height()},settings:{adjustOldDeltas:!0}};l.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?exports=e(require("jquery")):e(jQuery)}(function(t){t.easing.jswing=t.easing.swing;var i=Math.pow,n=Math.sqrt,r=Math.sin,o=Math.cos,a=Math.PI,s=1.70158,l=1.525*s,u=1+s,d=2*a/3,_=2*a/4.5;function g(e){var t=7.5625,i=2.75;return e<1/i?t*e*e:e<2/i?t*(e-=1.5/i)*e+.75:e<2.5/i?t*(e-=2.25/i)*e+.9375:t*(e-=2.625/i)*e+.984375}t.extend(t.easing,{def:"easeOutQuad",swing:function(e){return t.easing[t.easing.def](e)},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return 1-(1-e)*(1-e)},easeInOutQuad:function(e){return e<.5?2*e*e:1-i(-2*e+2,2)/2},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1-i(1-e,3)},easeInOutCubic:function(e){return e<.5?4*e*e*e:1-i(-2*e+2,3)/2},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1-i(1-e,4)},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-i(-2*e+2,4)/2},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1-i(1-e,5)},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1-i(-2*e+2,5)/2},easeInSine:function(e){return 1-o(e*a/2)},easeOutSine:function(e){return r(e*a/2)},easeInOutSine:function(e){return-(o(a*e)-1)/2},easeInExpo:function(e){return 0===e?0:i(2,10*e-10)},easeOutExpo:function(e){return 1===e?1:1-i(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:e<.5?i(2,20*e-10)/2:(2-i(2,-20*e+10))/2},easeInCirc:function(e){return 1-n(1-i(e,2))},easeOutCirc:function(e){return n(1-i(e-1,2))},easeInOutCirc:function(e){return e<.5?(1-n(1-i(2*e,2)))/2:(n(1-i(-2*e+2,2))+1)/2},easeInElastic:function(e){return 0===e?0:1===e?1:-i(2,10*e-10)*r((10*e-10.75)*d)},easeOutElastic:function(e){return 0===e?0:1===e?1:i(2,-10*e)*r((10*e-.75)*d)+1},easeInOutElastic:function(e){return 0===e?0:1===e?1:e<.5?-(i(2,20*e-10)*r((20*e-11.125)*_))/2:i(2,-20*e+10)*r((20*e-11.125)*_)/2+1},easeInBack:function(e){return u*e*e*e-s*e*e},easeOutBack:function(e){return 1+u*i(e-1,3)+s*i(e-1,2)},easeInOutBack:function(e){return e<.5?i(2*e,2)*(2*(1+l)*e-l)/2:(i(2*e-2,2)*((1+l)*(2*e-2)+l)+2)/2},easeInBounce:function(e){return 1-g(1-e)},easeOutBounce:g,easeInOutBounce:function(e){return e<.5?(1-g(1-2*e))/2:(1+g(2*e-1))/2}})}),function(d,_){var s,g,e,c,h,p,a,t,m;function f(e,t,i){var n=p[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:e<0?0:n.max<e?n.max:e)}function l(n){var r=c(),o=r._rgba=[];return n=n.toLowerCase(),m(e,function(e,t){var i=t.re.exec(n),i=i&&t.parse(i),t=t.space||"rgba";return i?(i=r[t](i),r[h[t].cache]=i[h[t].cache],o=r._rgba=i._rgba,!1):void 0}),o.length?("0,0,0,0"===o.join()&&d.extend(o,s.transparent),r):s[n]}function r(e,t,i){return 6*(i=(i+1)%1)<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}void 0!==d.cssHooks&&(g=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],c=d.Color=function(e,t,i,n){return new d.Color.fn.parse(e,t,i,n)},h={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},a=c.support={},t=d("<p>")[0],m=d.each,t.style.cssText="background-color:rgba(1,1,1,.5)",a.rgba=-1<t.style.backgroundColor.indexOf("rgba"),m(h,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),c.fn=d.extend(c.prototype,{parse:function(r,e,t,i){if(r===_)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=d(r).css(e),e=_);var o=this,n=d.type(r),a=this._rgba=[];return e!==_&&(r=[r,e,t,i],n="array"),"string"===n?this.parse(l(r)||s._default):"array"===n?(m(h.rgba.props,function(e,t){a[t.idx]=f(r[t.idx],t)}),this):"object"===n?(m(h,r instanceof c?function(e,t){r[t.cache]&&(o[t.cache]=r[t.cache].slice())}:function(e,i){var n=i.cache;m(i.props,function(e,t){if(!o[n]&&i.to){if("alpha"===e||null==r[e])return;o[n]=i.to(o._rgba)}o[n][t.idx]=f(r[e],t,!0)}),o[n]&&d.inArray(null,o[n].slice(0,3))<0&&(o[n][3]=1,i.from&&(o._rgba=i.from(o[n])))}),this):void 0},is:function(e){var r=c(e),o=!0,a=this;return m(h,function(e,t){var i,n=r[t.cache];return n&&(i=a[t.cache]||t.to&&t.to(a._rgba)||[],m(t.props,function(e,t){return null!=n[t.idx]?o=n[t.idx]===i[t.idx]:void 0})),o}),o},_space:function(){var i=[],n=this;return m(h,function(e,t){n[t.cache]&&i.push(e)}),i.pop()},transition:function(e,a){var t=(u=c(e))._space(),i=h[t],e=0===this.alpha()?c("transparent"):this,s=e[i.cache]||i.to(e._rgba),l=s.slice(),u=u[i.cache];return m(i.props,function(e,t){var i=t.idx,n=s[i],r=u[i],o=p[t.type]||{};null!==r&&(null===n?l[i]=r:(o.mod&&(o.mod/2<r-n?n+=o.mod:o.mod/2<n-r&&(n-=o.mod)),l[i]=f((r-n)*a+n,t)))}),this[t](l)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),i=t.pop(),n=c(e)._rgba;return c(d.map(t,function(e,t){return(1-i)*n[t]+i*e}))},toRgbaString:function(){var e="rgba(",t=d.map(this._rgba,function(e,t){return null==e?2<t?1:0:e});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=d.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),i=t.pop();return e&&t.push(~~(255*i)),"#"+d.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,h.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/255,i=e[1]/255,n=e[2]/255,r=e[3],o=Math.max(t,i,n),a=Math.min(t,i,n),s=o-a,l=o+a,e=.5*l,i=a===o?0:t===o?60*(i-n)/s+360:i===o?60*(n-t)/s+120:60*(t-i)/s+240,l=0==s?0:e<=.5?s/l:s/(2-l);return[Math.round(i)%360,l,e,null==r?1:r]},h.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],e=e[3],i=n<=.5?n*(1+i):n+i-n*i,n=2*n-i;return[Math.round(255*r(n,i,t+1/3)),Math.round(255*r(n,i,t)),Math.round(255*r(n,i,t-1/3)),e]},m(h,function(s,e){var o=e.props,a=e.cache,l=e.to,u=e.from;c.fn[s]=function(e){if(l&&!this[a]&&(this[a]=l(this._rgba)),e===_)return this[a].slice();var t,i=d.type(e),n="array"===i||"object"===i?e:arguments,r=this[a].slice();return m(o,function(e,t){e=n["object"===i?e:t.idx];null==e&&(e=r[t.idx]),r[t.idx]=f(e,t)}),u?((t=c(u(r)))[a]=r,t):c(r)},m(o,function(o,a){c.fn[o]||(c.fn[o]=function(e){var t=d.type(e),i="alpha"===o?this._hsla?"hsla":"rgba":s,n=this[i](),r=n[a.idx];return"undefined"===t?r:("function"===t&&(e=e.call(this,r),t=d.type(e)),null==e&&a.empty?this:("string"===t&&((t=g.exec(e))&&(e=r+parseFloat(t[2])*("+"===t[1]?1:-1))),n[a.idx]=e,this[i](n)))})})}),c.hook=function(e){e=e.split(" ");m(e,function(e,o){d.cssHooks[o]={set:function(e,t){var i,n,r="";if("transparent"!==t&&("string"!==d.type(t)||(i=l(t)))){if(t=c(i||t),!a.rgba&&1!==t._rgba[3]){for(n="backgroundColor"===o?e.parentNode:e;(""===r||"transparent"===r)&&n&&n.style;)try{r=d.css(n,"backgroundColor"),n=n.parentNode}catch(e){}t=t.blend(r&&"transparent"!==r?r:"_default")}t=t.toRgbaString()}try{e.style[o]=t}catch(e){}}},d.fx.step[o]=function(e){e.colorInit||(e.start=c(e.elem,o),e.end=c(e.end),e.colorInit=!0),d.cssHooks[o].set(e.elem,e.start.transition(e.end,e.pos))}})},c.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var n={};return m(["Top","Right","Bottom","Left"],function(e,t){n["border"+t+"Color"]=i}),n}},s=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"})}(jQuery),function(n){n.mlp={x:0,y:0},n(function e(){try{var t=this===document?n(this):n(this).contents()}catch(e){return!1}t.mousemove(function(e){n.mlp={x:e.pageX,y:e.pageY}}),t.find("iframe").on("load",e)}),n.fn.ismouseover=function(){var i=!1;return this.eq(0).each(function(){var e=n(this).is("iframe")?n(this).contents().find("body"):n(this),t=e.offset();i=t.left<=n.mlp.x&&t.left+e.outerWidth()>n.mlp.x&&t.top<=n.mlp.y&&t.top+e.outerHeight()>n.mlp.y}),i}}(jQuery);var g_ugFunctions=new UGFunctions;function UGThumbsGeneral(){var i,n,l,u,o=this,r=jQuery(o),a=new UniteGalleryMain,s=new UGFunctions;this.type={GET_THUMBS_ALL:"all",GET_THUMBS_RATIO:"ratio",GET_THUMBS_NO_RATIO:"no_ratio",GET_THUMBS_NEW:"new"};var d={thumb_width:88,thumb_height:50,thumb_fixed_size:!0,thumb_resize_by:"height",thumb_border_effect:!0,thumb_border_width:0,thumb_border_color:"#000000",thumb_over_border_width:0,thumb_over_border_color:"#d9d9d9",thumb_selected_border_width:1,thumb_selected_border_color:"#d9d9d9",thumb_round_corners_radius:0,thumb_color_overlay_effect:!0,thumb_overlay_color:"#000000",thumb_overlay_opacity:.4,thumb_overlay_reverse:!(this.events={SETOVERSTYLE:"thumbmouseover",SETNORMALSTYLE:"thumbmouseout",SETSELECTEDSTYLE:"thumbsetselected",PLACEIMAGE:"thumbplaceimage",AFTERPLACEIMAGE:"thumb_after_place_image",IMAGELOADERROR:"thumbimageloaderror",THUMB_IMAGE_LOADED:"thumb_image_loaded"}),thumb_image_overlay_effect:!1,thumb_image_overlay_type:"bw",thumb_transition_duration:200,thumb_transition_easing:"easeOutQuad",thumb_show_loader:!0,thumb_loader_type:"dark",thumb_wrapper_as_link:!1,thumb_link_newpage:!1},_={touchEnabled:!1,num_thumbs_checking:0,customThumbs:!1,funcSetCustomThumbHtml:null,isEffectBorder:!1,isEffectOverlay:!1,isEffectImage:!1,colorOverlayOpacity:1,thumbInnerReduce:0,allowOnResize:!0,classNewThumb:"ug-new-thumb"},t="thumb_size_change";function g(e,t){var i=l[e],n="";0==_.customThumbs&&(n=" ug-thumb-generated");var r,o,a="<div class='ug-thumb-wrapper"+n+"' "+("style='z-index:"+(i.index+1)+";'")+"></div>";1==d.thumb_wrapper_as_link&&(r=i.link,""==i.link&&(r="javascript:void(0)"),o="",1==d.thumb_link_newpage&&i.link&&(o=" target='_blank'"),a="<a href='"+r+"'"+o+" class='ug-thumb-wrapper"+n+"'></a>");var s,n=jQuery(a),a=i.objThumbImage;return 0==_.customThumbs&&(1==d.thumb_show_loader&&a&&(s="ug-thumb-loader-dark","bright"==d.thumb_loader_type&&(s="ug-thumb-loader-bright"),n.append("<div class='ug-thumb-loader "+s+"'></div>"),n.append("<div class='ug-thumb-error' style='display:none'></div>")),a&&(a.addClass("ug-thumb-image"),1==d.thumb_image_overlay_effect&&((s=a.clone().appendTo(n)).addClass("ug-thumb-image-overlay "+t).removeClass("ug-thumb-image"),s.fadeTo(0,0),i.objImageOverlay=s),n.append(a))),_.isEffectBorder&&n.append("<div class='ug-thumb-border-overlay'></div>"),_.isEffectOverlay&&n.append("<div class='ug-thumb-overlay'></div>"),u.append(n),_.customThumbs&&_.funcSetCustomThumbHtml(n,i),l[e].objThumbWrapper=n}function c(e,t,i,n){var r={width:e+"px",height:t+"px"},e={width:e-_.thumbInnerReduce+"px",height:t-_.thumbInnerReduce+"px"},t=".ug-thumb-loader, .ug-thumb-error, .ug-thumb-border-overlay, .ug-thumb-overlay";i?(!0!==n&&i.css(r),i.find(t).css(e)):(u.children(".ug-thumb-wrapper").css(r),u.find(t).css(e))}function h(e,t,i,n){n=n||!1,a.isFakeFullscreen()&&(n=!0);var r=e.children(".ug-thumb-border-overlay"),e={};e["border-width"]=t+"px",0!=t&&(e["border-color"]=i),n&&!0===n?(r.css(e),0==t?r.hide():r.show()):(0==t?r.stop().fadeOut(d.thumb_transition_duration):r.show().stop().fadeIn(d.thumb_transition_duration),e=e,r.stop(!0).animate(e,{duration:d.thumb_transition_duration,easing:d.thumb_transition_easing,queue:!1}))}function p(e,t,i){var n=e.children(".ug-thumb-overlay"),e=d.thumb_transition_duration;i&&!0===i&&(e=0),t?n.stop(!0).fadeTo(e,_.colorOverlayOpacity):n.stop(!0).fadeTo(e,0)}function m(e,t,i){var n=e.children("img.ug-thumb-image"),r=e.children("img.ug-thumb-image-overlay"),e=d.thumb_transition_duration;i&&!0===i&&(e=0),t?r.stop(!0).fadeTo(e,1):(n.fadeTo(0,1),r.stop(!0).fadeTo(e,0))}function f(e,t){_.isEffectBorder&&h(e,d.thumb_selected_border_width,d.thumb_selected_border_color,t),_.isEffectOverlay&&p(e,1==d.thumb_overlay_reverse,t),_.isEffectImage&&m(e,!1,t),r.trigger(o.events.SETSELECTEDSTYLE,e)}function b(e){1==y(e)?f(e,!0):o.setThumbNormalStyle(e,!0,"redraw")}function v(e,t){var i,n;1==d.thumb_fixed_size?s.scaleImageCoverParent(t,e):("height"==d.thumb_resize_by?s.scaleImageByHeight(t,d.thumb_height):s.scaleImageByWidth(t,d.thumb_width),n=s.getElementSize(t),s.placeElement(t,0,0),c(n.width,n.height,e)),e.children(".ug-thumb-loader").hide(),t.show(),0==d.thumb_image_overlay_effect?t.fadeTo(0,1):(1!=d.thumb_image_overlay_effect||0!=(n=(i=t).siblings(".ug-thumb-image-overlay")).length&&(i={width:(i=s.getElementSize(i)).width+"px",height:i.height+"px",left:i.left+"px",top:i.top+"px"},n.css(i),0==_.customThumbs&&n.fadeTo(0,1)),t.fadeTo(0,0),b(e)),r.trigger(o.events.AFTERPLACEIMAGE,e)}function y(e){return!!e.hasClass("ug-thumb-selected")}function w(e,t){t=jQuery(t);o.getItemByThumb(t);var i=s.getElementSize(t);c(i.width,i.height,t,!0),b(t)}function I(e,t,i){var n=o.getItemByThumb(t);n.isLoaded=!0,n.isThumbImageLoaded=!0;i=s.getImageOriginalSize(i);n.thumbWidth=i.width,n.thumbHeight=i.height,n.thumbRatioByWidth=i.width/i.height,n.thumbRatioByHeight=i.height/i.width,t.addClass("ug-thumb-ratio-set")}this.init=function(e,t){i=e.getObjects(),a=e,jQuery(e),n=i.g_objWrapper,l=i.g_arrItems,d=jQuery.extend(d,t),_.isEffectBorder=d.thumb_border_effect,_.isEffectOverlay=d.thumb_color_overlay_effect,_.isEffectImage=d.thumb_image_overlay_effect},this._____________EXTERNAL_SETTERS__________=function(){},this.setHtmlThumbs=function(e,t){var i;if(u=e,1==_.isEffectImage&&(i=function(){var e,t="",i=d.thumb_image_overlay_type.split(",");for(e in i)switch(i[e]){case"bw":t+=" ug-bw-effect";break;case"blur":t+=" ug-blur-effect";break;case"sepia":t+=" ug-sepia-effect"}return t}()),!0!==t)for(var n=a.getNumItems(),r=0;r<n;r++)g(r,i);else{o.getThumbs().removeClass(_.classNewThumb);t=a.getNewAddedItemsIndexes();jQuery.each(t,function(e,t){g(t,i).addClass(_.classNewThumb)})}},this.setThumbNormalStyle=function(e,t,i){1==_.customThumbs&&e.removeClass("ug-thumb-over"),_.isEffectBorder&&h(e,d.thumb_border_width,d.thumb_border_color,t),_.isEffectOverlay&&p(e,1!=d.thumb_overlay_reverse,t),_.isEffectImage&&m(e,!0,t),r.trigger(o.events.SETNORMALSTYLE,e)},this.setThumbOverStyle=function(e){1==_.customThumbs&&e.addClass("ug-thumb-over"),_.isEffectBorder&&h(e,d.thumb_over_border_width,d.thumb_over_border_color),_.isEffectOverlay&&p(e,1==d.thumb_overlay_reverse),1==_.isEffectImage&&m(e,!1),r.trigger(o.events.SETOVERSTYLE,e)},this.setHtmlProperties=function(e){var t,i;e=e||o.getThumbs(),0==_.customThumbs&&(1==d.thumb_fixed_size&&c(d.thumb_width,d.thumb_height,e),t=e,d.thumb_round_corners_radius<=0||(i={"border-radius":d.thumb_round_corners_radius+"px"},t?(t.css(i),t.find(".ug-thumb-border-overlay").css(i)):u.find(".ug-thumb-wrapper, .ug-thumb-wrapper .ug-thumb-border-overlay").css(i))),e.each(function(){b(jQuery(this))}),_.isEffectOverlay&&d.thumb_overlay_color&&(t={},s.isRgbaSupported()?(i=s.convertHexToRGB(d.thumb_overlay_color,d.thumb_overlay_opacity),t["background-color"]=i):(t["background-color"]=d.thumb_overlay_color,_.colorOverlayOpacity=d.thumb_overlay_opacity),e.find(".ug-thumb-overlay").css(t))},this.setThumbSelected=function(e){if(1==_.customThumbs&&e.removeClass("ug-thumb-over"),1==y(e))return!0;e.addClass("ug-thumb-selected"),f(e)},this.setThumbUnselected=function(e){e.removeClass("ug-thumb-selected"),o.setThumbNormalStyle(e,!1,"set unselected")},this.setOptions=function(e){d=jQuery.extend(d,e)},this.setThumbInnerReduce=function(e){_.thumbInnerReduce=e},this.setCustomThumbs=function(e,t,i){if(_.customThumbs=!0,"function"!=typeof e)throw new Error("The argument should be function");_.funcSetCustomThumbHtml=e,-1==jQuery.inArray("overlay",t)&&(_.isEffectOverlay=!1),-1==jQuery.inArray("border",t)&&(_.isEffectBorder=!1),_.isEffectImage=!1,i&&!1===i.allow_onresize&&(_.allowOnResize=!1)},this._____________EXTERNAL_GETTERS__________=function(){},this.getOptions=function(){return d},this.getNumThumbs=function(){return l.length},this.getThumbImage=function(e){return e.find(".ug-thumb-image")},this.getThumbByIndex=function(e){var t=o.getThumbs();if(e>=t.length||e<0)throw new Error("Wrong thumb index");return jQuery(t[e])},this.getThumbs=function(e){var t=".ug-thumb-wrapper",i=".ug-thumb-ratio-set";switch(e){default:case o.type.GET_THUMBS_ALL:var n=u.children(t);break;case o.type.GET_THUMBS_NO_RATIO:n=u.children(t).not(i);break;case o.type.GET_THUMBS_RATIO:n=u.children(t+i);break;case o.type.GET_THUMBS_NEW:n=u.children("."+_.classNewThumb)}return n},this.getItemByThumb=function(e){var t=e.data("index");return void 0===t&&(t=e.index()),l[t]},this.isThumbLoaded=function(e){return o.getItemByThumb(e).isLoaded},this.getGlobalThumbSize=function(){return{width:d.thumb_width,height:d.thumb_height}},this._____________EXTERNAL_OTHERS__________=function(){},this.initEvents=function(){var e=".ug-thumb-wrapper";1==_.allowOnResize&&n.on(t,w),r.on(o.events.THUMB_IMAGE_LOADED,I),u.on("touchstart",e,function(){_.touchEnabled=!0,u.off("mouseenter").off("mouseleave")}),u.on("mouseenter",e,function(e){var t=jQuery(this);t=t,1==_.touchEnabled?objThumbs.off("mouseenter").off("mouseleave"):0==y(t)&&o.setThumbOverStyle(t)}),u.on("mouseleave",e,function(e){var t=jQuery(this);t=t,1!=_.touchEnabled&&0==y(t)&&o.setThumbNormalStyle(t,!1)})},this.destroy=function(){var e=".ug-thumb-wrapper";u.off("touchstart",e),n.off(t),u.off("mouseenter",e),u.off("mouseleave",e),r.off(o.events.THUMB_IMAGE_LOADED)},this.loadThumbsImages=function(){var e=u.find(".ug-thumb-image");s.checkImagesLoaded(e,null,function(e,t){0==t?function(e,t){t=t||!1;var i=jQuery(e);0!=(e=i.parents(".ug-thumb-wrapper")).parent().length&&(1==o.getItemByThumb(e).isLoaded&&!1===t||(o.triggerImageLoadedEvent(e,i),1==_.customThumbs?r.trigger(o.events.PLACEIMAGE,[e,i]):v(e,i)))}(e,!0):function(e){var t=o.getItemByThumb(e);if(t.isLoaded=!0,t.isThumbImageLoaded=!1,1==_.customThumbs)return r.trigger(o.events.IMAGELOADERROR,e);e.children(".ug-thumb-loader").hide(),e.children(".ug-thumb-error").show()}(jQuery(e).parent())})},this.triggerImageLoadedEvent=function(e,t){r.trigger(o.events.THUMB_IMAGE_LOADED,[e,t])},this.hideThumbs=function(){u.find(".ug-thumb-wrapper").hide()}}function UGThumbsStrip(){var a,i,n,r,s,l,u,d,_=this,g=new UniteGalleryMain,c=new UGFunctions,h=!1,p=new UGThumbsGeneral,c=new UGFunctions,m={strip_vertical_type:!1,strip_thumbs_align:"left",strip_space_between_thumbs:6,strip_thumb_touch_sensetivity:15,strip_scroll_to_thumb_duration:500,strip_scroll_to_thumb_easing:"easeOutCubic",strip_control_avia:!0,strip_control_touch:!0,strip_padding_top:0,strip_padding_bottom:0,strip_padding_left:0,strip_padding_right:0},f={isRunOnce:!1,is_placed:!1,isNotFixedThumbs:!1,handle:null},b={stripSize:0,stripActiveSize:0,stripInnerSize:0,thumbSize:0,thumbSecondSize:0};this.events={STRIP_MOVE:"stripmove",INNER_SIZE_CHANGE:"size_change"};var o={strip_thumbs_align:"top",thumb_resize_by:"width"};function v(){var e=p.getOptions();f.isNotFixedThumbs=!1===e.thumb_fixed_size,h=m.strip_vertical_type}function e(){var e,t,i,n,r,o;p.setHtmlProperties(),e=l.children(".ug-thumb-wrapper"),t=jQuery(e[0]),i=t.outerWidth(),e=t.outerHeight(),t=p.getOptions(),0==h?(b.thumbSize=i,1==t.thumb_fixed_size?b.thumbSecondSize=e:b.thumbSecondSize=t.thumb_height,y(s.width()),b.stripInnerSize=l.width()):(b.thumbSize=e,1==t.thumb_fixed_size?b.thumbSecondSize=i:b.thumbSecondSize=t.thumb_width,y(s.height()),b.stripInnerSize=l.height()),0==h?(n=b.thumbSecondSize,(r={}).height=n+"px",(o={}).height=n+"px"):(n=b.thumbSecondSize,(r={}).width=n+"px",(o={}).width=n+"px"),s.css(r),l.css(o),w(),0==f.isRunOnce&&(1==m.strip_control_touch&&(d=new UGTouchThumbsControl).init(_),1==m.strip_control_avia&&(u=new UGAviaControl).init(_),S(),p.loadThumbsImages(),p.initEvents(),s.find(".ug-thumb-wrapper").on("click touchend",function(e){!function(e){if(_.isTouchMotionActive())if(1==d.isSignificantPassed())return;e=p.getItemByThumb(e),g.selectItem(e)}(jQuery(this))}),a.on(g.events.ITEM_CHANGE,P),f.isNotFixedThumbs&&jQuery(p).on(p.events.AFTERPLACEIMAGE,x)),f.isRunOnce=!0}function y(e){b.stripSize=e,b.stripActiveSize=0==h?b.stripSize-m.strip_padding_left-m.strip_padding_right:b.stripSize-m.strip_padding_top-m.strip_padding_bottom,b.stripActiveSize<0&&(b.stripActiveSize=0)}function w(){var e=l.children(".ug-thumb-wrapper"),t=0,i=0;0==h&&(i=m.strip_padding_top);for(var n,r=0;r<e.length;r++){var o=jQuery(e[r]);if(1==f.isNotFixedThumbs){if(objItem=p.getItemByThumb(o),0==objItem.isLoaded)continue;o.show()}c.placeElement(o,t,i),0==h?t+=o.outerWidth()+m.strip_space_between_thumbs:i+=o.outerHeight()+m.strip_space_between_thumbs}n=0==h?t-m.strip_space_between_thumbs:i-m.strip_space_between_thumbs,n=n,0==h?l.width(n):l.height(n),b.stripInnerSize=n,S(),jQuery(_).trigger(_.events.INNER_SIZE_CHANGE)}function t(e){e=_.getInnerStripPos()+e,e=_.fixInnerStripLimits(e);_.positionInnerStrip(e,!0)}function I(e){e=-1*C(e).min,e=_.fixInnerStripLimits(e);_.positionInnerStrip(e,!0)}function E(e){e=-1*C(e).max+b.stripSize,e=_.fixInnerStripLimits(e);_.positionInnerStrip(e,!0)}function T(e){var t,i,n;0!=j()&&(i={},t=_.getInnerStripPos(),i.minPosThumbs=-1*t+1,i.maxPosThumbs=-1*t+b.stripSize-1,n=i,(t=C(e)).min<n.minPosThumbs?(i=e.prev()).length?I(i):I(e):t.max>n.maxPosThumbs&&((n=e.next()).length?E(n):E(e)))}function S(){1==j()?(u&&u.enable(),d&&d.enable()):(u&&u.disable(),d&&d.disable())}function x(){clearTimeout(f.handle),f.handle=setTimeout(function(){w()},50)}function P(){var e=g.getSelectedItem();p.setThumbSelected(e.objThumbWrapper),T(e.objThumbWrapper)}function j(){return b.stripInnerSize>b.stripActiveSize}function C(e){var t={},e=e.position();return 0==h?(t.min=e.left,t.max=e.left+b.thumbSize):(t.min=e.top,t.max=e.top+b.thumbSize),t}this.setHtml=function(e){e||(e=n,null!=m.parent_container&&(e=m.parent_container)),e.append("<div class='ug-thumbs-strip'><div class='ug-thumbs-strip-inner'></div></div>"),s=e.children(".ug-thumbs-strip"),l=s.children(".ug-thumbs-strip-inner"),p.setHtmlThumbs(l),1==f.isNotFixedThumbs&&p.hideThumbs()},this.destroy=function(){var e=s.find(".ug-thumb-wrapper");e.off("click"),e.off("touchend"),a.off(g.events.ITEM_CHANGE),jQuery(p).off(p.events.AFTERPLACEIMAGE),d&&d.destroy(),u&&u.destroy(),p.destroy()},this.________EXTERNAL_GENERAL___________=function(){},this.init=function(e,t){t=t,i=(e=e).getObjects(),(g=e).attachThumbsPanel("strip",_),a=jQuery(e),n=i.g_objWrapper,r=i.g_arrItems,m=jQuery.extend(m,t),1==(h=m.strip_vertical_type)&&(m=jQuery.extend(m,o),m=jQuery.extend(m,t),t.thumb_resize_by="width"),p.init(e,t),v()},this.run=function(){e()},this.positionInnerStrip=function(e,t){void 0===t&&(t=!1),e=0==h?{left:e+"px"}:{top:e+"px"},0==t?(l.css(e),_.triggerStripMoveEvent()):(_.triggerStripMoveEvent(),l.stop(!0).animate(e,{duration:m.strip_scroll_to_thumb_duration,easing:m.strip_scroll_to_thumb_easing,queue:!1,progress:function(){_.triggerStripMoveEvent()},always:function(){_.triggerStripMoveEvent()}}))},this.triggerStripMoveEvent=function(){jQuery(_).trigger(_.events.STRIP_MOVE)},this.isTouchMotionActive=function(){return!!d&&d.isTouchActive()},this.isItemThumbVisible=function(e){var t,i,n=e.objThumbWrapper,r=n.position(),e=-1*_.getInnerStripPos();return e<=(0==h?(t=e+b.stripSize,i=r.left,r.left+n.width()):(t=e+b.stripSize,i=r.top,r.top+n.height()))&&i<=t?!0:!1},this.getInnerStripPos=function(){return 0==h?l.position().left:l.position().top},this.getInnerStripLimits=function(){var e={};return e.maxPos=0==h?m.strip_padding_left:m.strip_padding_top,e.minPos=-(b.stripInnerSize-b.stripActiveSize),e},this.fixInnerStripLimits=function(e){var t=_.getInnerStripLimits();return e>t.maxPos&&(e=t.maxPos),e<t.minPos&&(e=t.minPos),e},this.scrollForeward=function(){t(-b.stripSize)},this.scrollBack=function(){t(b.stripSize)},this.________EXTERNAL_SETTERS___________=function(){},this.setOptions=function(e){m=jQuery.extend(m,e),p.setOptions(e),v()},this.setSizeVertical=function(e){if(0==h)throw new Error("setSizeVertical error, the strip size is not vertical");var t=b.thumbSecondSize,i={};i.width=t+"px",i.height=e+"px",s.css(i),y(e);e={};e.width=t+"px",e.left="0px",e.top="0px",l.css(e),f.is_placed=!0,S()},this.setSizeHorizontal=function(e){if(1==h)throw new Error("setSizeHorizontal error, the strip size is not horizontal");var t=b.thumbSecondSize+m.strip_padding_top+m.strip_padding_bottom,i={};i.width=e+"px",i.height=t+"px",s.css(i),y(e);i=m.strip_padding_left,e={};e.height=t+"px",e.left=i+"px",e.top="0px",l.css(e),f.is_placed=!0,S()},this.setPosition=function(e,t,i,n){c.placeElement(s,e,t,i,n)},this.resize=function(e){var t;0==h?(s.width(e),b.stripActiveSize=e-m.strip_padding_left-m.strip_padding_right):(s.height(e),b.stripActiveSize=e-m.strip_padding_top-m.strip_padding_bottom),y(e),S(),0==j()||(t=_.getInnerStripPos())!=(t=_.fixInnerStripLimits(t))&&_.positionInnerStrip(t,!0),j()||(0==h?c.placeElement(l,m.strip_thumbs_align,0):c.placeElement(l,0,m.strip_thumbs_align)),null!=(t=g.getSelectedItem())&&(t=t.objThumbWrapper)&&T(t),u&&u.onResize()},this.setThumbUnselected=function(e){p.setThumbUnselected(e)},this.setCustomThumbs=function(e){p.setCustomThumbs(e)},this.________EXTERNAL_GETTERS___________=function(){},this.getObjects=function(){var e=p.getOptions(),e=jQuery.extend(m,e);return{g_gallery:g,g_objGallery:a,g_objWrapper:n,g_arrItems:r,g_objStrip:s,g_objStripInner:l,g_aviaControl:u,g_touchThumbsControl:d,isVertical:h,g_options:e,g_thumbs:p}},this.getObjThumbs=function(){return p},this.getSelectedThumb=function(){var e=g.getSelectedItemIndex();return-1==e?null:p.getThumbByIndex(e)},this.getSizeAndPosition=function(){return c.getElementSize(s)},this.getHeight=function(){return s.outerHeight()},this.getWidth=function(){return s.outerWidth()},this.getSizes=function(){return b},this.isVertical=function(){return h},this.isPlaced=function(){return f.is_placed},this.isMoveEnabled=function(){return j()}}function UGTouchThumbsControl(){var _,t,i,g,n,c,r=new UGFunctions,h={touch_portion_time:200,thumb_touch_slowFactor:0,minDeltaTime:70,minPath:10,limitsBreakAddition:30,returnAnimateSpeed:500,animationEasing:"easeOutCubic",returnAnimationEasing:"easeOutCubic"},p={touch_active:!1,loop_active:!1,mousePos:0,innerPos:0,startPos:0,startTime:0,lastTime:0,buttonReleaseTime:0,lastPos:0,lastPortionPos:0,lastDeltaTime:0,lastDeltaPos:0,speed:0,handle:"",touchEnabled:!1,isControlEnabled:!0};function o(){var e=jQuery.now(),t={};return t.passedTime=p.lastTime-p.startTime,t.lastActiveTime=e-p.buttonReleaseTime,t.passedDistance=p.lastPos-p.startPos,t.passedDistanceAbs=Math.abs(t.passedDistance),t}function a(e){return 0==c?r.getMousePosition(e).pageX:r.getMousePosition(e).pageY}function s(){var e=jQuery.now();e-p.lastTime>=h.touch_portion_time&&(p.lastDeltaTime=e-p.lastTime,p.lastDeltaTime>h.touch_portion_time&&(p.lastDeltaTime=h.touch_portion_time),p.lastDeltaPos=p.lastPos-p.lastPortionPos,p.lastPortionPos=p.lastPos,p.lastTime=e)}function m(){p.lastPos=_.getInnerStripPos(),_.triggerStripMoveEvent()}function l(e){if(0==p.loop_active)return 1;e&&(a(e),function(){var e=h.thumb_touch_slowFactor,t=h.minDeltaTime,i=h.minPath,n=_.getInnerStripPos(),r=jQuery.now()-p.lastTime,o=n-p.lastPortionPos;r<t&&0<p.lastDeltaTime&&(r=p.lastDeltaTime,o=p.lastDeltaPos+o),r<t&&(r=t);var a=0;0<r&&(a=o/r);var s=a*a/(2*e)*(0<o?1:-1);Math.abs(s)<=i&&(s=0);var l=_.getInnerStripPos(),u=l+s,n=_.fixInnerStripLimits(u),t=_.getInnerStripLimits(),r=h.limitsBreakAddition,o=!1,i=n;u>t.maxPos&&(o=!0,u<(n=r)&&(n=u)),u<t.minPos&&(o=!0,n=(d=t.minPos-r)<u?u:d);var d=n-l,e=Math.abs(Math.round(a/e));0!=s&&(e=e*d/s),l!=n&&(n=1==c?{top:n+"px"}:{left:n+"px"},g.animate(n,{duration:e,easing:h.animationEasing,queue:!0,progress:m})),1==o&&(o=h.returnAnimateSpeed,i=1==c?{top:i+"px"}:{left:i+"px"},g.animate(i,{duration:o,easing:h.returnAnimationEasing,queue:!0,progress:m}))}()),p.loop_active=!1,p.handle=clearInterval(p.handle)}function u(e){return 0==p.isControlEnabled||(p.buttonReleaseTime=jQuery.now(),0==p.touch_active?(l(e),!0):(e.preventDefault(),p.touch_active=!1,l(e),void i.removeClass("ug-dragging")))}function d(e){if(0==p.isControlEnabled)return!0;e.preventDefault(),p.touch_active=!0;var t=a(e);g.stop(!0),e=t,t=_.getInnerStripPos(),p.mousePos=e,p.innerPos=t,p.lastPortionPos=t,p.lastDeltaTime=0,p.lastDeltaPos=0,p.startTime=jQuery.now(),p.startPos=p.innerPos,p.lastTime=p.startTime,p.lastPos=p.startPos,p.speed=0,1!=p.loop_active&&(p.loop_active=!0,p.handle=setInterval(s,10)),i.addClass("ug-dragging")}function f(e){if(0==p.isControlEnabled)return!0;if(0==p.touch_active)return!0;if(e.preventDefault(),0==e.buttons)return p.touch_active=!1,l(e),!0;var t,i=a(e);p.lastPos=_.getInnerStripPos(),e=i,i=p.mousePos-e,e=p.innerPos-i,i=_.getInnerStripLimits(),e>i.maxPos&&(t=e-i.maxPos,e=i.maxPos+t/3),e<i.minPos&&(t=i.minPos-e,e=i.minPos-t/3),_.positionInnerStrip(e),s()}this.enable=function(){p.isControlEnabled=!0},this.disable=function(){p.isControlEnabled=!1},this.init=function(e){t=(_=e).getObjects(),t.g_gallery,t.g_objGallery,i=t.g_objStrip,g=t.g_objStripInner,n=t.g_options,c=t.isVertical,h.thumb_touch_slowFactor=r.normalizeSetting(5e-5,.01,1,100,n.strip_thumb_touch_sensetivity,!0),i.bind("mousedown touchstart",d),jQuery(window).add("body").bind("mouseup touchend",u),jQuery("body").bind("mousemove touchmove",f)},this.isSignificantPassed=function(){var e=o();return 300<e.passedTime||30<e.passedDistanceAbs},this.isTouchActive=function(){return 1==p.touch_active||(1==g.is(":animated")||o().lastActiveTime<50)},this.destroy=function(){i.unbind("mousedown"),i.unbind("touchstart"),jQuery(window).add("body").unbind("mouseup").unbind("touchend"),jQuery("body").unbind("mousemove").unbind("touchmove")}}function UGPanelsBase(){var o,a,n,s,l,t,u,d=new UniteGalleryMain,i=this,r=new UGFunctions;function _(e,t){switch(o.orientation){case"right":case"left":var i={left:e+"px"};break;case"top":case"bottom":i={top:e+"px"}}n.stop(!0).animate(i,{duration:300,easing:"easeInOutQuad",queue:!1,complete:function(){t&&t()}})}function g(e){switch(o.orientation){case"right":case"left":r.placeElement(n,e,null);break;case"top":case"bottom":r.placeElement(n,null,e)}}function c(){l.trigger(a.events.FINISH_MOVE)}this.init=function(e,t,i,n,r){o=t,a=i,d=e,s=n,l=r,u=jQuery(d)},this.setHtml=function(e){n=e,e="strip"==o.panelType?s.strippanel_enable_handle:s.gridpanel_enable_handle,"default"==s.gallery_theme&&(e=!1),1==e&&((t=new UGPanelHandle).init(a,n,s,o.panelType,d),t.setHtml()),!0===o.isDisabledAtStart&&(n.append("<div class='ug-overlay-disabled'></div>"),setTimeout(function(){n.children(".ug-overlay-disabled").hide()},o.disabledAtStartTimeout))},this.placeElements=function(){t&&t.placeHandle()},this.initEvents=function(){t&&(t.initEvents(),u.on(d.events.SLIDER_ACTION_START,function(){t.hideHandle()}),u.on(d.events.SLIDER_ACTION_END,function(){t.showHandle()}))},this.destroy=function(){t&&(t.destroy(),u.off(d.events.SLIDER_ACTION_START),u.off(d.events.SLIDER_ACTION_END))},this.openPanel=function(e){return e=e||!1,!n.is(":animated")&&(0!=o.isClosed&&(o.isClosed=!1,l.trigger(a.events.OPEN_PANEL),void(!1===e?_(o.originalPos,c):(g(o.originalPos),c()))))},this.closePanel=function(e){if(e=e||!1,n.is(":animated"))return!1;if(1==o.isClosed)return!1;var t=i.getClosedPanelDest();o.isClosed=!0,l.trigger(a.events.CLOSE_PANEL),!1===e?_(t,c):(g(t),c())},this.setClosedState=function(e){o.originalPos=e,l.trigger(a.events.CLOSE_PANEL),o.isClosed=!0},this.setOpenedState=function(e){l.trigger(a.events.OPEN_PANEL),o.isClosed=!1},this.getClosedPanelDest=function(){var e=r.getElementSize(n);switch(o.orientation){case"left":o.originalPos=e.left,t=-o.panelWidth;break;case"right":o.originalPos=e.left;var t=d.getSize().width;break;case"top":o.originalPos=e.top,t=-o.panelHeight;break;case"bottom":o.originalPos=e.top,t=d.getSize().height}return t},this.isPanelClosed=function(){return o.isClosed},this.setDisabledAtStart=function(e){if(e<=0)return!1;o.isDisabledAtStart=!0,o.disabledAtStartTimeout=e}}function UGPanelHandle(){var o,a,i,n=new UGFunctions,s={panel_handle_align:"top",panel_handle_offset:0,panel_handle_skin:0};function e(){i.removeClass("ug-button-hover")}function t(e){if(e.stopPropagation(),e.stopImmediatePropagation(),0==n.validateClickTouchstartEvent(e.type))return!0;a.isPanelClosed()?a.openPanel():a.closePanel()}this.init=function(e,t,i,n,r){switch(a=e,o=t,n){case"grid":s.panel_handle_align=i.gridpanel_handle_align,s.panel_handle_offset=i.gridpanel_handle_offset,s.panel_handle_skin=i.gridpanel_handle_skin;break;case"strip":s.panel_handle_align=i.strippanel_handle_align,s.panel_handle_offset=i.strippanel_handle_offset,s.panel_handle_skin=i.strippanel_handle_skin;break;default:throw new Error("Panel handle error: wrong panel type: "+n)}r=r.getOptions().gallery_skin;""==s.panel_handle_skin&&(s.panel_handle_skin=r)},this.setHtml=function(){var e,t="ug-panel-handle-tip";switch(a.getOrientation()){case"right":t+=" ug-handle-tip-left",e='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="3.5 0.5 9.5 6 3.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';break;case"left":t+=" ug-handle-tip-right",e='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="7.5 0.5 3.5 6 7.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';break;case"bottom":t+=" ug-handle-tip-top",e='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="0.5 3.5 6 9.5 11.5 3.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>';break;case"top":t+=" ug-handle-tip-bottom",e='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="0.5 8.5 6 2.5 11.5 8.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg>'}o.append("<div class='"+t+" ug-skin-"+s.panel_handle_skin+"'>"+e+"</div>"),i=o.children(".ug-panel-handle-tip")},this.initEvents=function(){n.addClassOnHover(i),i.bind("click touchstart",t),jQuery(a).on(a.events.OPEN_PANEL,function(){e(),i.removeClass("ug-button-closed")}),jQuery(a).on(a.events.CLOSE_PANEL,function(){e(),i.addClass("ug-button-closed")})},this.destroy=function(){n.destroyButton(i),jQuery(a).off(a.events.OPEN_PANEL),jQuery(a).off(a.events.CLOSE_PANEL)},this.placeHandle=function(){var e=n.getElementSize(i);!function(){switch(a.getOrientation()){case"right":case"left":"top"!=s.panel_handle_align&&"bottom"!=s.panel_handle_align&&(s.panel_handle_align="top");break;case"bottom":"left"!=s.panel_handle_align&&"right"!=s.panel_handle_align&&(s.panel_handle_align="left");break;case"top":"left"!=s.panel_handle_align&&"right"!=s.panel_handle_align&&(s.panel_handle_align="right")}}();var t=a.getOrientation();switch(t){case"left":n.placeElement(i,"right",s.panel_handle_align,-e.width);break;case"right":n.placeElement(i,-e.width,s.panel_handle_align,0,s.panel_handle_offset);break;case"top":n.placeElement(i,s.panel_handle_align,"bottom",s.panel_handle_offset,-e.height);break;case"bottom":n.placeElement(i,s.panel_handle_align,"top",s.panel_handle_offset,-e.height);break;default:throw new Error("Wrong panel orientation: "+t)}},this.hideHandle=function(){1==i.is(":visible")&&i.hide()},this.showHandle=function(){0==i.is(":visible")&&i.show()}}function UGStripPanel(){var i,n,r,o,a,s=this,l=jQuery(this),u=new UniteGalleryMain,d=new UGFunctions,_=new UGThumbsStrip,g=new UGPanelsBase,c={strippanel_vertical_type:!(this.events={FINISH_MOVE:"gridpanel_move_finish",OPEN_PANEL:"open_panel",CLOSE_PANEL:"close_panel"}),strippanel_padding_top:8,strippanel_padding_bottom:8,strippanel_padding_left:0,strippanel_padding_right:0,strippanel_enable_buttons:!0,strippanel_buttons_skin:"",strippanel_padding_buttons:2,strippanel_buttons_role:"scroll_strip",strippanel_enable_handle:!0,strippanel_handle_align:"top",strippanel_handle_offset:0,strippanel_handle_skin:"",strippanel_background_color:""},h={strip_vertical_type:!0,strippanel_padding_left:8,strippanel_padding_right:8,strippanel_padding_top:0,strippanel_padding_bottom:0},p={strippanel_padding_left:8,strippanel_padding_right:8,strippanel_padding_top:8,strippanel_padding_bottom:8},m={panelType:"strip",panelWidth:0,panelHeight:0,isEventsInited:!1,isClosed:!1,orientation:null,originalPos:null,isFirstRun:!0};function e(){1==m.isFirstRun&&0==function(){if(0==c.strippanel_vertical_type){if(0==m.panelWidth)throw new Error("Strip panel error: The width not set, please set width")}else if(0==m.panelHeight)throw new Error("Strip panel error: The height not set, please set height");if(null==m.orientation)throw new Error("Wrong orientation, please set panel orientation before run");return!0}()||(_.run(),f(),b(),1!=m.isEventsInited&&(m.isEventsInited=!0,o&&(d.addClassOnHover(o,"ug-button-hover"),d.addClassOnHover(a,"ug-button-hover"),d.setButtonOnClick(a,y),d.setButtonOnClick(o,v),"advance_item"!=c.strippanel_buttons_role?(jQuery(_).on(_.events.STRIP_MOVE,I),jQuery(_).on(_.events.INNER_SIZE_CHANGE,w),i.on(u.events.SIZE_CHANGE,w)):0==u.getOptions().gallery_carousel&&jQuery(u).on(u.events.ITEM_CHANGE,E)),g.initEvents()),m.isFirstRun=!1,w())}function t(e){var t,i;(e=e||n).append("<div class='ug-strip-panel'></div>"),r=e.children(".ug-strip-panel"),1==c.strippanel_enable_buttons&&(t="ug-strip-arrow-left",i="ug-strip-arrow-right",1==c.strippanel_vertical_type&&(t="ug-strip-arrow-up",i="ug-strip-arrow-down"),r.append("<div class='ug-strip-arrow "+t+" ug-skin-"+c.strippanel_buttons_skin+'\'><div class=\'ug-strip-arrow-tip\'><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="7.5 0.5 3.5 6 7.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg></div></div>'),r.append("<div class='ug-strip-arrow "+i+" ug-skin-"+c.strippanel_buttons_skin+'\'><div class=\'ug-strip-arrow-tip\'><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12"><g stroke-width="1" transform="translate(0, 0)"><polyline points="4.5 0.5 8.5 6 4.5 11.5" fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"></polyline></g></svg></div></div>')),g.setHtml(r),_.setHtml(r),1==c.strippanel_enable_buttons&&(a=r.children("."+t),o=r.children("."+i)),""!=c.strippanel_background_color&&r.css("background-color",c.strippanel_background_color),0!=c.strippanel_enable_handle&&(i=r.find(".ug-panel-handle-tip"),""!=c.strippanel_background_color&&i.css("background-color",c.strippanel_background_color))}function f(){var e,t,i;0==c.strippanel_vertical_type?(t=_.getHeight(),i=m.panelWidth,o&&(a.height(t),o.height(t),e=a.children(".ug-strip-arrow-tip"),d.placeElement(e,"center","middle"),e=o.children(".ug-strip-arrow-tip"),d.placeElement(e,"center","middle")),t=t+c.strippanel_padding_top+c.strippanel_padding_bottom,r.width(i),r.height(t),m.panelHeight=t,i=i-c.strippanel_padding_left-c.strippanel_padding_right,o&&(i=i-2*o.outerWidth()-2*c.strippanel_padding_buttons),_.resize(i)):(e=_.getWidth(),t=m.panelHeight,o&&(a.width(e),o.width(e),i=a.children(".ug-strip-arrow-tip"),d.placeElement(i,"center","middle"),i=o.children(".ug-strip-arrow-tip"),d.placeElement(i,"center","middle")),e=e+c.strippanel_padding_left+c.strippanel_padding_right,r.width(e),r.height(t),m.panelWidth=e,t=t-c.strippanel_padding_top-c.strippanel_padding_bottom,o&&(t=t-2*o.outerHeight()-2*c.strippanel_padding_buttons),_.resize(t))}function b(){(0==c.strippanel_vertical_type?function(){o&&(d.placeElement(a,"left","top",c.strippanel_padding_left,c.strippanel_padding_top),d.placeElement(o,"right","top",c.strippanel_padding_right,c.strippanel_padding_top));var e=c.strippanel_padding_left;o&&(e+=o.outerWidth()+c.strippanel_padding_buttons),_.setPosition(e,c.strippanel_padding_top)}:function(){o&&(d.placeElement(a,"left","top",c.strippanel_padding_left,c.strippanel_padding_top),d.placeElement(o,"left","bottom",c.strippanel_padding_left,c.strippanel_padding_bottom));var e=c.strippanel_padding_top;o&&(e+=o.outerHeight()+c.strippanel_padding_buttons),_.setPosition(c.strippanel_padding_left,e)})(),g.placeElements()}function v(e){if(d.isButtonDisabled(e))return!0;"advance_item"==c.strippanel_buttons_role?u.nextItem():_.scrollForeward()}function y(e){if(d.isButtonDisabled(e))return!0;"advance_item"==c.strippanel_buttons_role?u.prevItem():_.scrollBack()}function w(){if(!o)return!0;if(0==_.isMoveEnabled())return d.disableButton(a),d.disableButton(o),!0;var e=_.getInnerStripLimits(),t=_.getInnerStripPos();t>=e.maxPos?d.disableButton(a):d.enableButton(a),t<=e.minPos?d.disableButton(o):d.enableButton(o)}function I(){w()}function E(){u.isLastItem()?d.disableButton(o):d.enableButton(o),u.isFirstItem()?d.disableButton(a):d.enableButton(a)}this.destroy=function(){o&&(d.destroyButton(o),d.destroyButton(a),jQuery(_).off(_.events.STRIP_MOVE),jQuery(u).off(u.events.ITEM_CHANGE),jQuery(u).off(u.events.SIZE_CHANGE)),g.destroy(),_.destroy()},this.getOrientation=function(){return m.orientation},this.setOrientation=function(e){m.orientation=e},this.init=function(e,t){t=t,u=e=e,i=jQuery(u),e=!1,1==(c=jQuery.extend(c,t)).strippanel_vertical_type&&(c=jQuery.extend(c,h),e=!0),0==c.strippanel_enable_buttons&&(c=jQuery.extend(c,p),e=!0),1==e&&(c=jQuery.extend(c,t)),t=u.getOptions().gallery_skin,""==c.strippanel_buttons_skin&&(c.strippanel_buttons_skin=t),n=u.getElement(),g.init(u,m,s,c,l),(_=new UGThumbsStrip).init(u,c)},this.run=function(){e()},this.setHtml=function(e){t(e)},this.getElement=function(){return r},this.getSize=function(){return d.getElementSize(r)},this.setWidth=function(e){m.panelWidth=e},this.setHeight=function(e){m.panelHeight=e},this.resize=function(e){s.setWidth(e),f(),b()},this.__________Functions_From_Base_____=function(){},this.isPanelClosed=function(){return g.isPanelClosed()},this.getClosedPanelDest=function(){return g.getClosedPanelDest()},this.openPanel=function(e){g.openPanel(e)},this.closePanel=function(e){g.closePanel(e)},this.setOpenedState=function(e){g.setOpenedState(e)},this.setClosedState=function(e){g.setClosedState(e)},this.setCustomThumbs=function(e){_.setCustomThumbs(e)},this.setDisabledAtStart=function(e){g.setDisabledAtStart(e)}}function UGGridPanel(){var i,t,u,d,n=this,r=jQuery(this),o=new UniteGalleryMain,_=new UGFunctions,g=new UGThumbsGrid,a=new UGPanelsBase,c={gridpanel_vertical_scroll:!0,gridpanel_grid_align:"middle",gridpanel_padding_border_top:10,gridpanel_padding_border_bottom:4,gridpanel_padding_border_left:10,gridpanel_padding_border_right:10,gridpanel_arrows_skin:"",gridpanel_arrows_align_vert:"middle",gridpanel_arrows_padding_vert:4,gridpanel_arrows_align_hor:"center",gridpanel_arrows_padding_hor:10,gridpanel_space_between_arrows:20,gridpanel_arrows_always_on:!(this.events={FINISH_MOVE:"gridpanel_move_finish",OPEN_PANEL:"open_panel",CLOSE_PANEL:"close_panel"}),gridpanel_enable_handle:!0,gridpanel_handle_align:"top",gridpanel_handle_offset:0,gridpanel_handle_skin:"",gridpanel_background_color:""},s={gridpanel_grid_align:"middle",gridpanel_padding_border_top:2,gridpanel_padding_border_bottom:2},l={gridpanel_grid_align:"center"},h={panelType:"grid",isHorType:!1,arrowsVisible:!1,panelHeight:0,panelWidth:0,originalPosX:null,isEventsInited:!1,isClosed:!1,orientation:null};function p(){if(null==h.orientation)throw new Error("Wrong orientation, please set panel orientation before run")}function e(){var e;p(),"center"==c.gridpanel_grid_align&&(c.gridpanel_grid_align="middle"),g.run(),e=!1,(1==c.gridpanel_arrows_always_on||1<g.getNumPanes())&&(e=!0),1==e?(u.show().fadeTo(0,1),d.show().fadeTo(0,1),h.arrowsVisible=!0):(u.hide(),d.hide(),h.arrowsVisible=!1),e=g.getSize(),1==h.isHorType?h.panelHeight=e.height+c.gridpanel_padding_border_top+c.gridpanel_padding_border_bottom:h.panelWidth=e.width+c.gridpanel_padding_border_left+c.gridpanel_padding_border_right,_.setElementSize(t,h.panelWidth,h.panelHeight),(0==h.isHorType?1==c.gridpanel_vertical_scroll?1==h.arrowsVisible?function(){var e,t,i,n,r=_.getElementSize(d),o=g.getSize();switch(c.gridpanel_grid_align){default:case"top":e=c.gridpanel_padding_border_top+r.height+c.gridpanel_arrows_padding_vert;break;case"middle":e="middle";break;case"bottom":e=h.panelHeight-o.height-r.height-c.gridpanel_padding_border_bottom-c.gridpanel_arrows_padding_vert}var a=f(),s=g.getElement();switch(_.placeElement(s,a,e),o=g.getSize(),c.gridpanel_arrows_align_vert){default:case"center":case"middle":t=(o.top-r.height)/2,i=o.bottom+(h.panelHeight-o.bottom-r.height)/2,n=0;break;case"grid":t=o.top-r.height-c.gridpanel_arrows_padding_vert_vert,i=o.bottom+c.gridpanel_arrows_padding_vert,n=0;break;case"border":case"borders":t=c.gridpanel_padding_border_top,i="bottom",n=c.gridpanel_padding_border_bottom}_.placeElement(d,"center",t),_.placeElement(u,"center",i,0,n)}:b:1==h.arrowsVisible?function(){var e,t,i=_.getElementSize(d),n=g.getSize(),r=c.gridpanel_padding_border_top;switch(c.gridpanel_grid_align){case"middle":switch(c.gridpanel_arrows_align_vert){default:var o=n.height+c.gridpanel_arrows_padding_vert+i.height;r=(h.panelHeight-o)/2;break;case"border":case"borders":var a=h.panelHeight-i.height-c.gridpanel_padding_border_bottom;r=(a-n.height)/2}break;case"bottom":o=n.height+i.height+c.gridpanel_arrows_padding_vert;r=h.panelHeight-o-c.gridpanel_padding_border_bottom}var s=g.getElement(),l=f();switch(_.placeElement(s,l,r),n=g.getSize(),c.gridpanel_arrows_align_vert){default:case"center":case"middle":e=n.bottom+(h.panelHeight-n.bottom-i.height)/2,t=0;break;case"grid":e=n.bottom+c.gridpanel_arrows_padding_vert,t=0;break;case"border":case"borders":e="bottom",t=c.gridpanel_padding_border_bottom}l=-i.width/2-c.gridpanel_space_between_arrows/2,_.placeElement(d,"center",e,l,t),l=Math.abs(l),_.placeElement(u,"center",e,l,t)}:b:1==h.arrowsVisible?function(){var e,t,i,n,r=_.getElementSize(d),o=g.getSize();switch(c.gridpanel_grid_align){default:case"left":e=c.gridpanel_padding_border_left+c.gridpanel_arrows_padding_hor+r.width;break;case"middle":case"center":e="center";break;case"right":e=h.panelWidth-o.width-r.width-c.gridpanel_padding_border_right-c.gridpanel_arrows_padding_hor}var a=g.getElement();switch(_.placeElement(a,e,c.gridpanel_padding_border_top),o=g.getSize(),c.gridpanel_arrows_align_vert){default:case"center":case"middle":n=(o.height-r.height)/2+o.top;break;case"top":n=c.gridpanel_padding_border_top+c.gridpanel_arrows_padding_vert;break;case"bottom":n=h.panelHeight-c.gridpanel_padding_border_bottom-c.gridpanel_arrows_padding_vert-r.height}switch(c.gridpanel_arrows_align_hor){default:case"borders":t=c.gridpanel_padding_border_left,i=h.panelWidth-c.gridpanel_padding_border_right-r.width;break;case"grid":t=o.left-c.gridpanel_arrows_padding_hor-r.width,i=o.right+c.gridpanel_arrows_padding_hor;break;case"center":t=(o.left-r.width)/2,i=o.right+(h.panelWidth-o.right-r.width)/2}_.placeElement(d,t,n),_.placeElement(u,i,n)}:function(){var e,t=g.getSize();switch(c.gridpanel_grid_align){default:case"left":e=c.gridpanel_padding_border_left;break;case"middle":case"center":e="center";break;case"right":e=h.panelWidth-t.width-c.gridpanel_padding_border_right}var i=g.getElement();_.placeElement(i,e,c.gridpanel_padding_border_top)})(),a.placeElements(),1!=h.isEventsInited&&(h.isEventsInited=!0,d&&(_.addClassOnHover(d),g.attachPrevPaneButton(d)),u&&(_.addClassOnHover(u),g.attachNextPaneButton(u)),a.initEvents())}function m(){i.append("<div class='ug-grid-panel'></div>"),t=i.children(".ug-grid-panel"),u=h.isHorType?(t.append("<div class='grid-arrow grid-arrow-left-hortype ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),t.append("<div class='grid-arrow grid-arrow-right-hortype ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),d=t.children(".grid-arrow-left-hortype"),t.children(".grid-arrow-right-hortype")):0==c.gridpanel_vertical_scroll?(t.append("<div class='grid-arrow grid-arrow-left ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),t.append("<div class='grid-arrow grid-arrow-right ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),d=t.children(".grid-arrow-left"),t.children(".grid-arrow-right")):(t.append("<div class='grid-arrow grid-arrow-up ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),t.append("<div class='grid-arrow grid-arrow-down ug-skin-"+c.gridpanel_arrows_skin+"'></div>"),d=t.children(".grid-arrow-up"),t.children(".grid-arrow-down")),a.setHtml(t),d.fadeTo(0,0),u.fadeTo(0,0),g.setHtml(t),""!=c.gridpanel_background_color&&t.css("background-color",c.gridpanel_background_color)}function f(){return c.gridpanel_padding_border_left}function b(){var e=c.gridpanel_grid_align,t=0;switch(e){case"top":t=c.gridpanel_padding_border_top;break;case"bottom":t=c.gridpanel_padding_border_bottom}var i=f(),n=g.getElement();_.placeElement(n,i,e,0,t)}this.destroy=function(){d&&_.destroyButton(d),u&&_.destroyButton(u),a.destroy(),g.destroy()},this.getOrientation=function(){return h.orientation},this.setOrientation=function(e){switch(h.orientation=e){case"right":case"left":h.isHorType=!1;break;case"top":case"bottom":h.isHorType=!0;break;default:throw new Error("Wrong grid panel orientation: "+e)}},this.setHeight=function(e){if(1==h.isHorType)throw new Error("setHeight is not appliable to this orientatio ("+h.orientation+"). Please use setWidth");h.panelHeight=e;var t,e=(t=c.gridpanel_padding_border_top+c.gridpanel_padding_border_bottom,e=h.panelHeight-t,0==c.gridpanel_arrows_always_on&&1==g.getNumPanesEstimationByHeight(e)?e:(t=_.getElementSize(u).height+c.gridpanel_arrows_padding_vert,1==c.gridpanel_vertical_scroll&&(t*=2),t+=c.gridpanel_padding_border_top+c.gridpanel_padding_border_bottom,e=h.panelHeight-t));g.setMaxHeight(e)},this.setWidth=function(e){if(0==h.isHorType)throw new Error("setWidth is not appliable to this orientatio ("+h.orientation+"). Please use setHeight");h.panelWidth=e;var t,e=(t=c.gridpanel_padding_border_left+c.gridpanel_padding_border_right,e=h.panelWidth-t,0==c.gridpanel_arrows_always_on&&1==g.getNumPanesEstimationByWidth(e)?e:(t+=2*(_.getElementSize(u).width+c.gridpanel_arrows_padding_hor),e=h.panelWidth-t));g.setMaxWidth(e)},this.init=function(e,t){t=t,o=e=e,p(),t&&t.vertical_scroll&&(c.gridpanel_vertical_scroll=t.vertical_scroll),c=jQuery.extend(c,t),1==h.isHorType?(c=jQuery.extend(c,l),c=jQuery.extend(c,t)):1==c.gridpanel_vertical_scroll&&(c=jQuery.extend(c,s),(c=jQuery.extend(c,t)).grid_panes_direction="bottom"),t=o.getOptions().gallery_skin,""==c.gridpanel_arrows_skin&&(c.gridpanel_arrows_skin=t),e=e.getObjects(),i=e.g_objWrapper,a.init(o,h,n,c,r),(g=new UGThumbsGrid).init(o,c)},this.setHtml=function(){m()},this.run=function(){e()},this.getElement=function(){return t},this.getSize=function(){return _.getElementSize(t)},this.__________Functions_From_Base_____=function(){},this.isPanelClosed=function(){return a.isPanelClosed()},this.getClosedPanelDest=function(){return a.getClosedPanelDest()},this.openPanel=function(e){a.openPanel(e)},this.closePanel=function(e){a.closePanel(e)},this.setOpenedState=function(e){a.setOpenedState(e)},this.setClosedState=function(e){a.setClosedState(e)},this.setDisabledAtStart=function(e){a.setDisabledAtStart(e)}}function UGThumbsGrid(){var n,r,o,p,m,a=this,s=jQuery(this),l=new UniteGalleryMain,f=new UGFunctions,u=new UGThumbsGeneral,d=new UGTileDesign,b={grid_panes_direction:"left",grid_num_cols:2,grid_min_cols:2,grid_num_rows:2,grid_space_between_cols:10,grid_space_between_rows:10,grid_space_between_mobile:10,grid_transition_duration:300,grid_transition_easing:"easeInOutQuad",grid_carousel:!1,grid_padding:0,grid_vertical_scroll_ondrag:!1},v={eventSizeChange:"thumb_size_change",isHorizontal:!(this.events={PANE_CHANGE:"pane_change"}),isMaxHeight:!1,isMaxWidth:!1,gridHeight:0,gridWidth:0,innerWidth:0,innerHeight:0,numPanes:0,arrPanes:0,numThumbs:0,currentPane:0,numThumbsInPane:0,isNavigationVertical:!1,touchActive:!1,startScrollPos:0,isFirstTimeRun:!0,isTilesMode:!1,storedEventID:"thumbsgrid",tileMaxWidth:null,tileMaxHeight:null,spaceBetweenCols:null,spaceBetweenRows:null};function _(e,t,i){o=e.getObjects(),(l=e).attachThumbsPanel("grid",a),n=jQuery(e),r=o.g_objWrapper,o=o.g_arrItems,!0===i&&(v.isTilesMode=!0),v.numThumbs=o.length,i=t,b=jQuery.extend(b,i),u.setOptions(i),v.isNavigationVertical="top"==b.grid_panes_direction||"bottom"==b.grid_panes_direction,v.spaceBetweenCols=b.grid_space_between_cols,v.spaceBetweenRows=b.grid_space_between_rows,1==v.isTilesMode?(d.setFixedMode(),d.setApproveClickFunction(x),d.init(e,b),i=d.getOptions(),v.tileMaxHeight=i.tile_height,v.tileMaxWidth=i.tile_width,u=d.getObjThumbs()):(t.thumb_fixed_size=!0,u.init(e,t))}function e(){var e,t=l.getSelectedItem();!function(){if(0==v.isHorizontal){if(0==v.gridHeight)throw new Error("You must set height before run.")}else if(0==v.gridWidth)throw new Error("You must set width before run.")}(),1==v.isFirstTimeRun?(0==v.isTilesMode?(u.initEvents(),p.find(".ug-thumb-wrapper").on("click touchend",P),n.on(l.events.ITEM_CHANGE,M)):d.initEvents(),p.bind("mousedown touchstart",j),jQuery("body").bind("mousemove touchmove",C),jQuery(window).add("body").bind("mouseup touchend",A),1==v.isTilesMode?(c(),h(),d.run()):(u.setHtmlProperties(),h(),u.loadThumbsImages())):1==v.isTilesMode&&1==c()&&(h(),d.run()),(0==v.isHorizontal?v.isNavigationVertical?function(){var e=m.children(".ug-thumb-wrapper"),t=0,i=0,n=0,r=0,o=0,a=0;v.innerWidth=0,v.numPanes=1,v.arrPanes=[],v.numThumbsInPane=0,v.arrPanes.push(o);for(var s=e.length,l=0;l<s;l++){var u=jQuery(e[l]);f.placeElement(u,t,i);var d=u.outerWidth(),u=u.outerHeight();t+=d+v.spaceBetweenCols;d=i+u;n<d&&(n=d),++r>=b.grid_num_cols&&(i+=u+v.spaceBetweenRows,t=o,r=0),1==v.numPanes&&v.numThumbsInPane++,d=i+u;u=a+v.gridHeight;u<d&&(1==v.isMaxHeight&&1==v.numPanes&&(v.gridHeight=n,p.height(v.gridHeight),u=v.gridHeight),i=u+v.spaceBetweenRows,a=i,t=o=0,r=0,l<s-1&&(v.numPanes++,v.arrPanes.push(i)))}m.height(n),v.innerHeight=n,1==v.isMaxHeight&&1==v.numPanes&&(v.gridHeight=n,p.height(n))}:function(){var e=m.children(".ug-thumb-wrapper"),t=0,n=0,r=0,o=0,a=0,s=0;v.innerWidth=0,v.numPanes=1,v.arrPanes=[],v.numThumbsInPane=0,v.arrPanes.push(o);var l=e.length;for(i=0;i<l;i++){var u=jQuery(e[i]);f.placeElement(u,t,n);var d=u.outerWidth(),_=u.outerHeight();a<t&&(a=t);u=n+_;s<u&&(s=u);u=a+d;u>v.innerWidth&&(v.innerWidth=u),t+=d+v.spaceBetweenCols,++r>=b.grid_num_cols&&(n+=_+v.spaceBetweenRows,t=o,r=0),1==v.numPanes&&v.numThumbsInPane++,n+_>v.gridHeight&&(n=0,o=v.innerWidth+v.spaceBetweenCols,t=o,r=0,1==v.isMaxHeight&&1==v.numPanes&&(v.gridHeight=s,p.height(v.gridHeight)),i<l-1&&(v.numPanes++,v.arrPanes.push(o)))}m.width(v.innerWidth),1==v.isMaxHeight&&1==v.numPanes&&(v.gridHeight=s,p.height(s))}:function(){var e=m.children(".ug-thumb-wrapper"),t=b.grid_padding,i=b.grid_padding,n=i,r=t,o=0,a=0,s=0,l=0,u=0;v.innerWidth=0,v.numPanes=1,v.arrPanes=[],v.numThumbsInPane=0,v.arrPanes.push(t-b.grid_padding);for(var d=e.length,_=0;_<d;_++){var g=jQuery(e[_]),c=g.outerWidth(),h=g.outerHeight();r-t+c>v.gridWidth&&(n=0,++u>=b.grid_num_rows?(t=r,n=i,s=u=0,1==v.numPanes&&(v.gridWidth=o+b.grid_padding,p.width(v.gridWidth),v.gridHeight=l+b.grid_padding,p.height(v.gridHeight)),v.numPanes++,v.arrPanes.push(t-b.grid_padding)):(r=t,n=s+v.spaceBetweenRows)),f.placeElement(g,r,n);g=r+c;o<g&&(o=g);h=n+h;s<h&&(s=h),l<h&&(l=h),a<h&&(a=h),(g=o+c)>v.innerWidth&&(v.innerWidth=g),r+=c+v.spaceBetweenCols,1==v.numPanes&&v.numThumbsInPane++}v.innerWidth=o+b.grid_padding,v.innerHeight=l+b.grid_padding,m.width(v.innerWidth),m.height(v.innerHeight),1==v.numPanes&&(v.gridWidth=o+b.grid_padding,v.gridHeight=l+b.grid_padding,p.width(v.gridWidth),p.height(v.gridHeight))})(),1==v.isFirstTimeRun&&v.isTilesMode&&((e=u.getThumbs()).each(function(e,t){r.trigger(v.eventSizeChange,jQuery(t))}),e.fadeTo(0,1)),null!=t&&y(t.index),s.trigger(a.events.PANE_CHANGE,v.currentPane),v.isFirstTimeRun=!1}function g(){return 1==v.isTilesMode?d.getGlobalTileSize():u.getGlobalThumbSize()}function c(){if(0==v.isTilesMode)throw new Error("Dynamic size can be set only in tiles mode");var e=!1,t=l.isMobileMode(),i=v.spaceBetweenCols;1==t?(v.spaceBetweenCols=b.grid_space_between_mobile,v.spaceBetweenRows=b.grid_space_between_mobile):(v.spaceBetweenCols=b.grid_space_between_cols,v.spaceBetweenRows=b.grid_space_between_rows),v.spaceBetweenCols!=i&&(e=!0);t=g().width,i=v.tileMaxWidth;return f.getNumItemsInSpace(v.gridWidth,v.tileMaxWidth,v.spaceBetweenCols)<b.grid_min_cols&&(i=f.getItemSizeInSpace(v.gridWidth,b.grid_min_cols,v.spaceBetweenCols)),d.setTileSizeOptions(i),i!=t&&(e=!0),e}function h(){var e,t;0==v.isHorizontal?(e=g().width,t=b.grid_num_cols*e+(b.grid_num_cols-1)*v.spaceBetweenCols+2*b.grid_padding,e=v.gridHeight,v.gridWidth=t,f.setElementSize(p,t,e),f.setElementSize(m,t,e),v.innerWidth=t,v.innerHeight=e):(t=g().height,e=v.gridWidth,t=b.grid_num_rows*t+(b.grid_num_rows-1)*v.spaceBetweenRows+2*b.grid_padding,v.gridHeight=t,f.setElementSize(p,e,t),f.setElementSize(m,e,t),v.innerWidth=e,v.innerHeight=t)}function y(e){e=T(e);-1!=e&&a.gotoPane(e,"scroll")}function w(e){e=I(e);0!=e&&m.stop(!0).animate(e,{duration:b.grid_transition_duration,easing:b.grid_transition_easing,queue:!1})}function t(){w(-v.arrPanes[v.currentPane])}function I(e){var t={};return 1==v.isNavigationVertical?t.top=e+"px":t.left=e+"px",t}function E(){var e=f.getElementSize(m);return 1==v.isNavigationVertical?e.top:e.left}function T(e){return 0==function(e){if(e<0||e>=v.numThumbs)throw new Error("Thumb not exists: "+e);return!0}(e)?-1:Math.floor(e/v.numThumbsInPane)}function S(){var e=f.getStoredEventData(v.storedEventID),t=E(),i=Math.abs(e.startInnerPos-t),t=1==v.isNavigationVertical?v.gridHeight:v.gridWidth;return Math.round(3*t/8)<=i||e.diffTime<300&&25<i}function x(){return 1==v.numPanes||f.isApproveStoredEventClick(v.storedEventID,v.isNavigationVertical)}function P(e){if(1==function(){if(1==v.numPanes)return!1;var e=f.getStoredEventData(v.storedEventID),t=e.diffTime,i=E();return 30<(e=Math.abs(i-e.startInnerPos))||5<e&&300<t}())return!0;var t=jQuery(this),t=u.getItemByThumb(t);l.selectItem(t)}function j(e){if(1==v.numPanes)return!0;if(1==v.touchActive)return!0;0==v.isTilesMode&&e.preventDefault(),v.touchActive=!0;var t={startInnerPos:E()};f.storeEventData(e,v.storedEventID,t)}function C(e){if(0==v.touchActive)return!0;e.preventDefault(),f.updateStoredEventData(e,v.storedEventID);var t=f.getStoredEventData(v.storedEventID,v.isNavigationVertical);if(0!=b.grid_vertical_scroll_ondrag&&(1!=v.isNavigationVertical&&"vert"===f.handleScrollTop(v.storedEventID)))return!0;var i=t.diffMousePos,n=t.startInnerPos+i,r=0<i?"prev":"next",e=v.arrPanes[v.numPanes-1];0==b.grid_carousel&&0<n&&"prev"==r&&(n/=3),0==b.grid_carousel&&n<-e&&"next"==r&&(n=t.startInnerPos+i/3),0!=(n=I(n=n))&&m.css(n)}function A(e){if(0==v.touchActive)return!0;f.updateStoredEventData(e,v.storedEventID);e=f.getStoredEventData(v.storedEventID,v.isNavigationVertical);if(v.touchActive=!1,0==S())return t(),!0;"next"==(0<E()-e.startInnerPos?"prev":"next")?0==b.grid_carousel&&a.isLastPane()?t():a.nextPane():0==b.grid_carousel&&a.isFirstPane()?t():a.prevPane()}function M(){var e=l.getSelectedItem();u.setThumbSelected(e.objThumbWrapper),y(e.index)}this.destroy=function(){var e;0==v.isTilesMode?((e=p.find(".ug-thumb-wrapper")).off("click"),e.off("touchend"),n.on(l.events.ITEM_CHANGE),u.destroy()):d.destroy(),p.unbind("mousedown"),p.unbind("touchstart"),jQuery("body").unbind("mousemove"),jQuery("body").unbind("touchmove"),jQuery(window).add("body").unbind("touchend"),jQuery(window).add("body").unbind("mouseup"),s.off(a.events.PANE_CHANGE)},this.__________EXTERNAL_GENERAL_________=function(){},this.setThumbUnselected=function(e){u.setThumbUnselected(e)},this.isItemThumbVisible=function(e){return T(e.index)==v.currentPane},this.__________EXTERNAL_API_________=function(){},this.getNumPanesEstimationByHeight=function(e){var t;t=1==v.isTilesMode?b.tile_height:u.getOptions().thumb_height;var i=u.getNumThumbs(),i=Math.ceil(i/b.grid_num_cols),i=i*t+(i-1)*v.spaceBetweenRows;return Math.ceil(i/e)},this.getNumPanesEstimationByWidth=function(e){var t;t=v.isTilesMode?b.tile_width:u.getOptions().thumb_width;var i=u.getNumThumbs(),i=Math.ceil(i/b.grid_num_rows),i=i*t+(i-1)*v.spaceBetweenCols;return Math.ceil(i/e)},this.getHeightEstimationByWidth=function(e){if(0==v.isTilesMode)throw new Error("This function works only with tiles mode");var t=u.getNumThumbs(),e=f.getNumItemsInSpace(e,b.tile_width,v.spaceBetweenCols),e=Math.ceil(t/e);e>b.grid_num_rows&&(e=b.grid_num_rows);e=f.getSpaceByNumItems(e,b.tile_height,v.spaceBetweenRows);return e+=2*b.grid_padding},this.getElement=function(){return p},this.getSize=function(){return f.getElementSize(p)},this.getNumPanes=function(){return v.numPanes},this.isFirstPane=function(){return 0==v.currentPane},this.isLastPane=function(){return v.currentPane==v.numPanes-1},this.getPaneInfo=function(){return{pane:v.currentPane,total:v.numPanes}},this.getPane=function(){return v.currentPane},this.setWidth=function(e){v.gridWidth=e,v.isHorizontal=!0},this.setMaxWidth=function(e){v.gridWidth=e,v.isMaxWidth=!0,v.isHorizontal=!0},this.setHeight=function(e){v.gridHeight=e,v.isHorizontal=!1},this.setMaxHeight=function(e){v.gridHeight=e,v.isMaxHeight=!0,v.isHorizontal=!1},this.gotoPane=function(e,t){if(0==function(e){if(e>=v.numPanes||e<0)throw new Error("Pane "+index+" doesn't exists.");return!0}(e))return!1;if(e==v.currentPane)return!1;var i=-v.arrPanes[e];v.currentPane=e,w(i),s.trigger(a.events.PANE_CHANGE,e)},this.nextPane=function(){var e=v.currentPane+1;if(e>=v.numPanes){if(0==b.grid_carousel)return!0;e=0}a.gotoPane(e,"next")},this.prevPane=function(){var e=v.currentPane-1;if(e<0&&(e=v.numPanes-1,0==b.grid_carousel))return!1;a.gotoPane(e,"prev")},this.attachNextPaneButton=function(e){if(f.setButtonOnClick(e,a.nextPane),1==b.grid_carousel)return!0;a.isLastPane()&&e.addClass("ug-button-disabled"),s.on(a.events.PANE_CHANGE,function(){a.isLastPane()?e.addClass("ug-button-disabled"):e.removeClass("ug-button-disabled")})},this.attachPrevPaneButton=function(e){if(f.setButtonOnClick(e,a.prevPane),1==b.grid_carousel)return!0;a.isFirstPane()&&e.addClass("ug-button-disabled"),s.on(a.events.PANE_CHANGE,function(){a.isFirstPane()?e.addClass("ug-button-disabled"):e.removeClass("ug-button-disabled")})},this.attachBullets=function(i){i.setActive(v.currentPane),jQuery(i).on(i.events.BULLET_CLICK,function(e,t){a.gotoPane(t,"theme"),i.setActive(t)}),jQuery(a).on(a.events.PANE_CHANGE,function(e,t){i.setActive(t)})},this.getObjTileDesign=function(){return d},this.init=function(e,t,i){_(e,t,i)},this.run=function(){e()},this.setHtml=function(e){(e=(e=e)||r).append("<div class='ug-thumbs-grid'><div class='ug-thumbs-grid-inner'></div></div>"),p=e.children(".ug-thumbs-grid"),m=p.children(".ug-thumbs-grid-inner"),1==v.isTilesMode?d.setHtml(m):u.setHtmlThumbs(m)}}function UGTileDesign(){var i,n,_=this,r=jQuery(this),g=new UniteGalleryMain,c=new UGFunctions,o=new UGThumbsGeneral;this.resizemode={FULL:"full",WRAPPER_ONLY:"wrapper_only",VISIBLE_ELEMENTS:"visible_elements"},this.sizeby={GLOBAL_RATIO:"global_ratio",TILE_RATIO:"tile_ratio",IMAGE_RATIO:"image_ratio",CUSTOM:"custom"},this.events={TILE_CLICK:"tile_click"};var h={tile_width:250,tile_height:200,tile_size_by:_.sizeby.IMAGE_RATIO,tile_visible_before_image:!1,tile_enable_background:!0,tile_background_color:"#F0F0F0",tile_enable_border:!1,tile_border_width:3,tile_border_color:"#F0F0F0",tile_border_radius:0,tile_enable_outline:!1,tile_outline_color:"#8B8B8B",tile_enable_shadow:!1,tile_shadow_h:1,tile_shadow_v:1,tile_shadow_blur:3,tile_shadow_spread:2,tile_shadow_color:"#8B8B8B",tile_enable_action:!0,tile_as_link:!1,tile_link_newpage:!0,tile_enable_overlay:!0,tile_overlay_opacity:.4,tile_overlay_color:"#000000",tile_enable_icons:!0,tile_show_link_icon:!1,tile_videoplay_icon_always_on:"never",tile_space_between_icons:26,tile_enable_image_effect:!1,tile_image_effect_type:"bw",tile_image_effect_reverse:!1,tile_enable_textpanel:!1,tile_textpanel_source:"title",tile_textpanel_always_on:!1,tile_textpanel_appear_type:"slide",tile_textpanel_position:"inside_bottom",tile_textpanel_offset:0},a={thumb_color_overlay_effect:!0,thumb_overlay_reverse:!0,thumb_image_overlay_effect:!1,tile_textpanel_enable_description:!1,tile_textpanel_bg_opacity:.6,tile_textpanel_padding_top:8,tile_textpanel_padding_bottom:8},p={ratioByHeight:0,ratioByWidth:0,eventSizeChange:"thumb_size_change",funcCustomTileHtml:null,funcCustomPositionElements:null,funcParentApproveClick:null,isSaparateIcons:!1,tileInnerReduce:0,isTextpanelOutside:!1,hasImageContainer:!1,isVideoplayIconAlwaysOn:!1,isTextPanelHidden:!1};function s(e,t){g=e,jQuery(e);var i=g.getObjects();n=i.g_objWrapper,g.getArrItems(),h=jQuery.extend(h,a),h=jQuery.extend(h,t),function(){if(1==h.tile_enable_overlay?(h.thumb_overlay_opacity=h.tile_overlay_opacity,h.thumb_overlay_color=h.tile_overlay_color):0==h.tile_enable_icons?h.thumb_color_overlay_effect=!1:h.thumb_overlay_opacity=0,h.tile_as_link&&(h.thumb_wrapper_as_link=!0,h.thumb_link_newpage=h.tile_link_newpage),1==h.tile_enable_outline&&0==h.tile_enable_border&&(h.tile_enable_outline=!1),p.tileInnerReduce=0,h.tile_enable_border&&(p.tileInnerReduce=2*h.tile_border_width,o.setThumbInnerReduce(p.tileInnerReduce)),p.isSaparateIcons=!c.isRgbaSupported(),1==h.tile_enable_textpanel){switch(h.tile_textpanel_position){case"top":h.tile_textpanel_align="top";case"bottom":p.isTextpanelOutside=!0,h.tile_textpanel_always_on=!0,h.tile_textpanel_offset=0;break;case"inside_top":h.tile_textpanel_align="top";break;case"middle":h.tile_textpanel_align="middle",h.tile_textpanel_appear_type="fade"}0==h.tile_textpanel_always_on&&(p.isSaparateIcons=!0)}0!=h.tile_textpanel_offset&&(h.tile_textpanel_appear_type="fade",h.tile_textpanel_margin=h.tile_textpanel_offset),"title_and_desc"==h.tile_textpanel_source&&(h.tile_textpanel_enable_description=!0,h.tile_textpanel_desc_style_as_title=!0)}(),o.init(e,h);e=["overlay"];p.funcCustomTileHtml&&(e=[]),o.setCustomThumbs(u,e,{allow_onresize:!1});e=o.getOptions();h=jQuery.extend(h,e),p.ratioByWidth=h.tile_width/h.tile_height,p.ratioByHeight=h.tile_height/h.tile_width,h.tile_size_by==_.sizeby.GLOBAL_RATIO&&p.isTextpanelOutside&&(p.hasImageContainer=!0)}function l(){var e=g.isMobileMode();switch(p.isTextPanelHidden=!1,1==e&&0==h.tile_textpanel_always_on&&(p.isTextPanelHidden=!0),p.isVideoplayIconAlwaysOn=h.tile_videoplay_icon_always_on,h.tile_videoplay_icon_always_on){case"always":p.isVideoplayIconAlwaysOn=!0;break;case"never":p.isVideoplayIconAlwaysOn=!1;break;case"mobile_only":p.isVideoplayIconAlwaysOn=1==e;break;case"desktop_only":p.isVideoplayIconAlwaysOn=0==e}}function u(e,t){if(e.addClass("ug-tile"),p.funcCustomTileHtml)return p.funcCustomTileHtml(e,t),!1;var i="";1==p.hasImageContainer&&(i+="<div class='ug-image-container ug-trans-enabled'>");var n="ug-thumb-image";0!=h.tile_enable_image_effect&&1!=h.tile_image_effect_reverse||(n+=" ug-trans-enabled");var r=c.stripTags(t.title),r=c.htmlentitles(r);i+='<img src="'+c.escapeDoubleSlash(t.urlThumb)+"\" alt='"+r+"' class='"+n+"'>",1==p.hasImageContainer&&(i+="</div>"),e.append(i),h.tile_size_by==_.sizeby.GLOBAL_RATIO&&e.fadeTo(0,0);n={};1==h.tile_enable_background&&(n["background-color"]=h.tile_background_color),1==h.tile_enable_border&&(n["border-width"]=h.tile_border_width+"px",n["border-style"]="solid",n["border-color"]=h.tile_border_color,h.tile_border_radius&&(n["border-radius"]=h.tile_border_radius+"px")),1==h.tile_enable_outline&&(n.outline="1px solid "+h.tile_outline_color),1==h.tile_enable_shadow&&(i=h.tile_shadow_h+"px ",i+=h.tile_shadow_v+"px ",i+=h.tile_shadow_blur+"px ",i+=h.tile_shadow_spread+"px ",i+=h.tile_shadow_color,n["box-shadow"]=i),e.css(n);var o,a,n="";if(h.tile_enable_icons?(0==h.tile_as_link&&1==h.tile_enable_action&&(o="ug-button-play ug-icon-zoom","image"!=t.type&&(o="ug-button-play ug-icon-play"),n+="<div class='ug-tile-icon "+o+"' style='display:none'></div>"),(t.link&&1==h.tile_show_link_icon||1==h.tile_as_link)&&(0==h.tile_as_link?(a="",1==h.tile_link_newpage&&(a=" target='_blank'"),n+="<a href='"+t.link+"'"+a+" class='ug-tile-icon ug-icon-link'></a>"):n+="<div class='ug-tile-icon ug-icon-link' style='display:none'></div>"),0==(a=p.isSaparateIcons)&&"image"!=t.type&&1==p.isVideoplayIconAlwaysOn&&(a=!0),(a=a?e:e.children(".ug-thumb-overlay")).append(n),0==(o=a.children("."+o)).length?o=null:o.hide(),0==(a=a.children(".ug-icon-link")).length?a=null:a.hide(),a||1!=h.tile_enable_action||e.addClass("ug-tile-clickable")):1==h.tile_enable_action&&e.addClass("ug-tile-clickable"),1==h.tile_enable_image_effect&&(s="",0==h.tile_image_effect_reverse&&(s=" ug-trans-enabled"),l="<div class='ug-tile-image-overlay"+s+"' >",a=" ug-"+h.tile_image_effect_type+"-effect",l+='<img src="'+c.escapeDoubleSlash(t.urlThumb)+"\" alt='"+t.title+"' class='"+a+s+"'>",l+="</div>",e.append(l),1==h.tile_image_effect_reverse&&e.children(".ug-tile-image-overlay").fadeTo(0,0)),1==h.tile_enable_textpanel){var s=new UGTextPanel;s.init(g,h,"tile");var l="";1!=h.tile_textpanel_always_on&&1!=p.isTextpanelOutside||(l="ug-trans-enabled"),s.appendHTML(e,l);var u=t.title,d="";switch(h.tile_textpanel_source){case"desc":case"description":u=t.description;break;case"desc_title":""!=t.description&&(u=t.description);break;case"title_and_desc":u=t.title,d=t.description}s.setTextPlain(u,d),0==h.tile_textpanel_always_on&&s.getElement().fadeTo(0,0),e.data("objTextPanel",s),1==h.tile_textpanel_always_on&&f(e).css("z-index",2),1==p.isTextpanelOutside&&(e.append("<div class='ug-tile-cloneswrapper'></div>"),l=e.children(".ug-tile-cloneswrapper"),(s=new UGTextPanel).init(g,h,"tile"),s.appendHTML(l),s.setTextPlain(u,d),e.data("objTextPanelClone",s))}null!==t.addHtml&&e.append(t.addHtml)}function d(e){return e.children(".ug-tile-image-overlay")}function m(e){return e.data("objTextPanel")}function f(e){return e.children(".ug-textpanel")}function b(e){return(e=(1==p.isTextpanelOutside?function(e){if(0==(e=e.find(".ug-tile-cloneswrapper .ug-textpanel")).length)throw new Error("text panel cloned element not found");return e}:f)(e))?c.getElementSize(e).height:0}function v(e){e=e.find(".ug-icon-link");return 0==e.length?null:e}function y(e){e=e.find(".ug-button-play");return 0==e.length?null:e}function w(e){return!!e.hasClass("ug-thumb-over")}function I(e){return e.hasClass("ug-tile-clickable")}function E(e){return 1==h.tile_enable_icons&&1==p.isVideoplayIconAlwaysOn&&"image"!=e.type}function T(e,t,i,n){var r=d(e),o=_.getTileImage(e),a=e.find(".ug-tile-image-overlay img");t-=p.tileInnerReduce,i-=p.tileInnerReduce;var s,l,u=null;1==p.isTextpanelOutside&&(i-=s=b(e),"top"==h.tile_textpanel_position&&(u=s),1==p.hasImageContainer&&(l=e,l=0==p.hasImageContainer?null:l.children(".ug-image-container"),c.setElementSize(l,t,i),null!==u&&c.placeElement(l,0,u))),0==h.tile_enable_image_effect?(c.scaleImageCoverParent(o,t,i),0==p.hasImageContainer&&null!==u&&c.placeElement(o,0,u)):(l="nothing",!0===n&&0==p.isTextpanelOutside&&(l=1==h.tile_image_effect_reverse?"effect":"image"),"effect"!=l&&(c.setElementSize(r,t,i),null!==u&&c.placeElement(r,0,u),c.scaleImageCoverParent(a,t,i)),"image"!=l&&(1==p.hasImageContainer?c.scaleImageCoverParent(o,t,i):"effect"==l?(c.scaleImageCoverParent(o,t,i),null!==u&&c.placeElement(o,0,u)):c.cloneElementSizeAndPos(a,o,!1,null,u)))}function S(e,t,i,n){var r=null;if(i&&(r=i-p.tileInnerReduce),n&&(n-=p.tileInnerReduce),"clone"==t)return e.data("objTextPanelClone").refresh(!0,!0,r),void(_.getItemByTile(e).textPanelCloneSizeSet=!0);i=m(e);i&&(t=null,1==p.isTextpanelOutside&&(t=b(e)),i.refresh(!1,!0,r,t),1!=h.tile_textpanel_always_on&&"fade"!=h.tile_textpanel_appear_type||(1==p.isTextpanelOutside&&n&&"bottom"==h.tile_textpanel_position?(t=n-t,i.positionPanel(t)):i.positionPanel()))}function x(e){_.getItemByTile(e);var t=y(e),i=v(e),n=c.getElementSize(e);T(e,n.width,n.height),1==h.tile_enable_textpanel&&S(e,"regular",n.width,n.height);var r=n.width-p.tileInnerReduce,o=n.height-p.tileInnerReduce,a=0;1==p.isTextpanelOutside&&(o-=d=b(e),"top"==h.tile_textpanel_position&&(a=d));var s,l,u,d=e.children(".ug-thumb-overlay");c.setElementSizeAndPosition(d,0,a,r,o),(t||i)&&(s=0,1==h.tile_enable_textpanel&&0==p.isTextPanelHidden&&0==p.isTextpanelOutside&&(l=f(e),0<(u=c.getElementSize(l)).height&&(s=Math.floor(u.height/2*-1)))),t&&i?(r=c.getElementSize(t),o=c.getElementSize(i),e=h.tile_space_between_icons,l=r.width+e+o.width,(u=Math.floor((n.width-l)/2))<e&&(e=Math.floor((n.width-r.width-o.width)/3),l=r.width+e+o.width,u=Math.floor((n.width-l)/2)),c.placeElement(t,u,"middle",0,s),c.placeElement(i,u+r.width+e,"middle",0,s)):(t&&c.placeElement(t,"center","middle",0,s),i&&c.placeElement(i,"center","middle",0,s)),t&&t.show(),i&&i.show()}function P(e,t){_.getItemByTile(e);var i=d(e),n=h.thumb_transition_duration;0==h.tile_image_effect_reverse?(e=_.getTileImage(e),t?(e.fadeTo(0,1),i.stop(!0).fadeTo(n,0)):i.stop(!0).fadeTo(n,1)):t?i.stop(!0).fadeTo(n,1):i.stop(!0).fadeTo(n,0)}function j(e,t){var i,n,r,o=h.thumb_transition_duration,a=f(e);if(!a)return 1;"slide"==h.tile_textpanel_appear_type?0!=(r=c.getElementSize(a)).width&&(i=-r.height,n={},e={},r="bottom","inside_top"==h.tile_textpanel_position&&(r="top"),n[r]=i+"px",e[r]="0px",1==t?(a.fadeTo(0,1),0==a.is(":animated")&&a.css(n),e.opacity=1,a.stop(!0).animate(e,o)):a.stop(!0).animate(n,o)):1==t?a.stop(!0).fadeTo(o,1):a.stop(!0).fadeTo(o,0)}function C(e,t,i){var n=h.thumb_transition_duration;i&&!0===i&&(n=0);i=y(e),e=v(e),t=t?1:0;i&&i.stop(!0).fadeTo(n,t),e&&e.stop(!0).fadeTo(n,t)}function e(e,t){var i;t=jQuery(t),h.tile_enable_image_effect&&P(t,!0),1==h.tile_enable_textpanel&&0==h.tile_textpanel_always_on&&0==p.isTextPanelHidden&&j(t,!0),p.isSaparateIcons&&1==h.tile_enable_icons&&(i=1==h.thumb_overlay_reverse,0==E(_.getItemByTile(t))&&C(t,i,!1))}function t(e,t){var i;t=jQuery(t),h.tile_enable_image_effect&&P(t,!1),1==h.tile_enable_textpanel&&0==h.tile_textpanel_always_on&&j(t,!1),1==p.isSaparateIcons&&1==h.tile_enable_icons&&(i=1!=h.thumb_overlay_reverse,0==E(_.getItemByTile(t))?C(t,i,!1):C(t,!0,!0))}function A(e,t,i){if(t=jQuery(t),1==h.tile_visible_before_image&&!0!==t.data("image_placed")&&!0!==i)return!0;x(t),o.setThumbNormalStyle(t)}function M(e,t,i){x(t),i.fadeTo(0,1),t.data("image_placed",!0)}function O(e){if(1==I(e))return r.trigger(_.events.TILE_CLICK,e),1;var t;0==w(e)&&(t=e,o.getThumbs().not(t).each(function(e,t){o.setThumbNormalStyle(jQuery(t))}),o.setThumbOverStyle(e))}function z(e){var t=jQuery(this),i=t.prop("tagName").toLowerCase(),n=!0;if(p.funcParentApproveClick&&0==p.funcParentApproveClick()&&(n=!1),"a"==i)0==n&&e.preventDefault();else if(0==w(t))1==n&&O(t);else{if(0==I(t))return!0;1==n&&r.trigger(_.events.TILE_CLICK,t)}}function k(e){e.stopPropagation();var t=jQuery(this).parents(".ug-tile"),e=!0;return p.funcParentApproveClick&&0==p.funcParentApproveClick()&&(e=!1),0==w(t)?(O(t),!0):1==e?(r.trigger(_.events.TILE_CLICK,t),!1):void 0}function L(e){var t=jQuery(this).parents(".ug-tile");p.funcParentApproveClick&&0==p.funcParentApproveClick()&&e.preventDefault(),0==w(t)&&0==h.tile_as_link&&(e.preventDefault(),O(t))}this.loadTileImage=function(i){var e=_.getTileImage(i);c.checkImagesLoaded(e,null,function(e,t){M(0,i,jQuery(e))})},this.setHtml=function(e,t){i=e,!0!==t&&l(),o.setHtmlThumbs(e,t)},this.initEvents=function(){o.initEvents(),jQuery(o).on(o.events.SETOVERSTYLE,e),jQuery(o).on(o.events.SETNORMALSTYLE,t),jQuery(o).on(o.events.PLACEIMAGE,M),n.on(p.eventSizeChange,A),i.on("click",".ug-tile",z),i.on("click",".ug-tile .ug-button-play",k),i.on("click",".ug-tile .ug-icon-link",L)},this.destroy=function(){var e;i.off("click",".ug-tile"),i.off("click",".ug-tile .ug-button-play"),i.off("click",".ug-tile .ug-icon-link"),jQuery(o).off(o.events.SETOVERSTYLE),jQuery(o).off(o.events.SETNORMALSTYLE),jQuery(o).off(o.events.PLACEIMAGE),n.off(p.eventSizeChange),1==h.tile_enable_textpanel&&(e=o.getThumbs(),jQuery.each(e,function(e,t){t=m(jQuery(t));t&&t.destroy()})),o.destroy()},this.init=function(e,t,i){s(e,t)},this.setFixedMode=function(){h.tile_size_by=_.sizeby.GLOBAL_RATIO,h.tile_visible_before_image=!0},this.setApproveClickFunction=function(e){p.funcParentApproveClick=e},this.resizeTile=function(e,t,i,n){switch(1==p.isTextpanelOutside&&S(e,"clone",t),i=t?i||_.getTileHeightByWidth(t,e):(t=h.tile_width,h.tile_height),c.setElementSize(e,t,i),n){default:case _.resizemode.FULL:_.triggerSizeChangeEvent(e,!0);break;case _.resizemode.WRAPPER_ONLY:return!0;case _.resizemode.VISIBLE_ELEMENTS:if(p.funcCustomTileHtml)return _.triggerSizeChangeEvent(e,!0),!0;T(e,t,i,!0),1==h.tile_enable_textpanel&&1==h.tile_textpanel_always_on&&t&&S(e,"regular",t,i)}},this.resizeAllTiles=function(i,n,e){l();var r=null;h.tile_size_by==_.sizeby.GLOBAL_RATIO&&(r=_.getTileHeightByWidth(i)),(e=e||o.getThumbs()).each(function(e,t){_.resizeTile(jQuery(t),i,r,n)})},this.triggerSizeChangeEvent=function(e,t){if(!e)return!1;t=t||!1,n.trigger(p.eventSizeChange,[e,t])},this.triggerSizeChangeEventAllTiles=function(t){o.getThumbs().each(function(){var e=jQuery(this);_.triggerSizeChangeEvent(e,t)})},this.disableEvents=function(){o.getThumbs().css("pointer-events","none")},this.enableEvents=function(){o.getThumbs().css("pointer-events","auto")},this.setOptions=function(e){h=jQuery.extend(h,e),o.setOptions(e)},this.setTileSizeOptions=function(e){if(h.tile_size_by!==_.sizeby.GLOBAL_RATIO)throw new Error("setNewTileOptions works with global ration only");h.tile_width=e,h.tile_height=Math.floor(e*p.ratioByHeight)},this.setCustomFunctions=function(e,t){p.funcCustomTileHtml=e,p.funcCustomPositionElements=t},this.run=function(e){var t=o.type.GET_THUMBS_ALL;!0===e&&(t=o.type.GET_THUMBS_NEW);t=o.getThumbs(t);h.tile_size_by==_.sizeby.GLOBAL_RATIO&&_.resizeAllTiles(h.tile_width,_.resizemode.WRAPPER_ONLY,t),1==h.tile_enable_image_effect&&0==h.tile_image_effect_reverse&&t.children(".ug-thumb-image").fadeTo(0,0),o.setHtmlProperties(t),1==h.tile_visible_before_image&&(t.children(".ug-thumb-image").fadeTo(0,0),o.loadThumbsImages())},this._____________EXTERNAL_GETTERS____________=function(){},this.getObjThumbs=function(){return o},this.getOptions=function(){return h},this.getTileImage=function(e){return e.find("img.ug-thumb-image")},this.getItemByTile=function(e){return o.getItemByThumb(e)},this.getTileHeightByWidth=function(e,t){var i=function(e){var t=p.ratioByHeight;switch(h.tile_size_by){default:t=p.ratioByHeight;break;case _.sizeby.IMAGE_RATIO:if(!e)throw new Error("tile should be given for tile ratio");var i=_.getItemByTile(e);if(void 0!==i.thumbRatioByHeight){if(0==i.thumbRatioByHeight)throw trace(i),new Error("the item ratio not inited yet");t=i.thumbRatioByHeight}break;case _.sizeby.CUSTOM:return null}return t}(t);if(null===i)return null;i=Math.floor((e-p.tileInnerReduce)*i)+p.tileInnerReduce;return t&&1==p.isTextpanelOutside&&h.tile_size_by==_.sizeby.IMAGE_RATIO&&(i+=b(t)),i},this.getTileImageSize=function(e){e=_.getItemByTile(e);if(!e.thumbWidth||!e.thumbHeight)throw new Error("Can't get image size - image not inited.");return{width:e.thumbWidth,height:e.thumbHeight}},this.getGlobalTileSize=function(){if(h.tile_size_by!=_.sizeby.GLOBAL_RATIO)throw new Error("The size has to be global ratio");return{width:h.tile_width,height:h.tile_height}}}function UGTiles(){var n,r,d,_,h,i,o=this,a=jQuery(this),s=new UniteGalleryMain,g=new UGFunctions,c=new UGTileDesign,b=new UGThumbsGeneral,l={},v={tiles_type:"columns",tiles_col_width:250,tiles_align:"center",tiles_exact_width:!1,tiles_space_between_cols:3,tiles_space_between_cols_mobile:3,tiles_include_padding:!0,tiles_min_columns:2,tiles_max_columns:0,tiles_keep_order:!1,tiles_set_initial_height:!0,tiles_justified_row_height:150,tiles_justified_space_between:3,tiles_nested_optimal_tile_width:250,tiles_nested_col_width:null,tiles_nested_debug:!1,tiles_enable_transition:!0},u={isFirstTimeRun:!0,handle:null,isTransActive:!(this.events={THUMB_SIZE_CHANGE:"thumb_size_change",TILES_FIRST_PLACED:"tiles_first_placed",ALL_TILES_LOADED:"all_tiles_loaded"}),isTransInited:!1,isFirstPlaced:!0,isAllLoaded:!1},p={colWidth:null,nestedOptimalCols:5,gridY:0,maxColumns:0,columnsValueToEnableHeightResize:3,resizeLeftRightToColumn:!0,currentItem:0,currentGap:null,optimalTileWidth:null,maxGridY:0};function m(e,t){i=e.getObjects(),s=e,n=jQuery(e),r=i.g_objWrapper,i.g_arrItems,(v=jQuery.extend(v,t)).tiles_min_columns<1&&(v.tiles_min_columns=1),0!=v.tiles_max_columns&&v.tiles_max_columns<v.tiles_min_columns&&(v.tiles_max_columns=v.tiles_min_columns),c.init(e,v),b=c.getObjThumbs()}function f(){var e;d.addClass("ug-tiles-rest-mode"),u.isTransInited=!0,1==v.tiles_enable_transition&&(d.addClass("ug-tiles-transit"),1==(e=c.getOptions()).tile_enable_image_effect&&0==e.tile_image_effect_reverse&&d.addClass("ug-tiles-transit-overlays"),u.isTransActive=!0)}function y(){return g.getElementSize(d).width}function w(){0!=u.isTransInited&&(d.addClass("ug-tiles-transition-active"),d.removeClass("ug-tiles-rest-mode"),0!=u.isTransActive&&c.disableEvents())}function e(){0!=u.isTransInited&&(d.removeClass("ug-tiles-transition-active"),d.addClass("ug-tiles-rest-mode"))}function I(){1==u.isTransActive?(setTimeout(function(){c.enableEvents(),c.triggerSizeChangeEventAllTiles(),e()},800),u.handle&&clearTimeout(u.handle),u.handle=setTimeout(function(){e(),c.triggerSizeChangeEventAllTiles(),u.handle=null},2e3)):(c.triggerSizeChangeEventAllTiles(),e())}function E(){l.colWidth=(l.availWidth-l.colGap*(l.numCols-1))/l.numCols,l.colWidth=Math.floor(l.colWidth),l.totalWidth=g.getSpaceByNumItems(l.numCols,l.colWidth,l.colGap)}function T(){var e;switch(l.colWidth=v.tiles_col_width,l.minCols=v.tiles_min_columns,l.maxCols=v.tiles_max_columns,0==s.isMobileMode()?l.colGap=v.tiles_space_between_cols:l.colGap=v.tiles_space_between_cols_mobile,l.galleryWidth=y(),l.availWidth=l.galleryWidth,1==v.tiles_include_padding&&(l.availWidth=l.galleryWidth-2*l.colGap),1==v.tiles_exact_width?(l.numCols=g.getNumItemsInSpace(l.availWidth,l.colWidth,l.colGap),0<l.maxCols&&l.numCols>l.maxCols&&(l.numCols=l.maxCols),l.numCols<l.minCols?(l.numCols=l.minCols,E()):l.totalWidth=l.numCols*(l.colWidth+l.colGap)-l.colGap):((e=g.getNumItemsInSpaceRound(l.availWidth,l.colWidth,l.colGap))<l.minCols?e=l.minCols:0!=l.maxCols&&e>l.maxCols&&(e=l.maxCols),l.numCols=e,E()),v.tiles_align){case"center":default:l.addX=Math.round((l.galleryWidth-l.totalWidth)/2);break;case"left":l.addX=0;break;case"right":l.addX=l.galleryWidth-l.totalWidth}l.arrPosx=[];for(var t=0;t<l.numCols;t++){var i=g.getColX(t,l.colWidth,l.colGap);l.arrPosx[t]=i+l.addX}}function S(){l.maxColHeight=0,l.colHeights=[0]}function x(e,t,i,n){null==n&&(n=function(){for(var e=0,t=999999999,i=0;i<l.numCols;i++){if(null==l.colHeights[i]||0==l.colHeights[i])return i;l.colHeights[i]<t&&(e=i,t=l.colHeights[i])}return e}());var r=0;if(void 0!==l.colHeights[n]&&(r=l.colHeights[n]),null===(o=c.getTileHeightByWidth(l.colWidth,e))){if(1==v.tiles_enable_transition)throw new Error("Can't know tile height, please turn off transition");var o=g.getElementSize(e).height}var a=l.arrPosx[n];g.placeElement(e,a,r);o=r+o;l.colHeights[n]=o+l.colGap,l.maxColHeight<o&&(l.maxColHeight=o),1==t&&e.show().fadeTo(0,1),1==i&&d.height(l.maxColHeight)}function P(e){e=e||!1,T(),S();var t=b.getThumbs(b.type.GET_THUMBS_RATIO);w(),c.resizeAllTiles(l.colWidth,c.resizemode.VISIBLE_ELEMENTS,t);for(var i=0;i<t.length;i++){var n=jQuery(t[i]),r=void 0;1==v.tiles_keep_order&&(r=g.getColByIndex(l.numCols,i)),x(n,e,!1,r)}I();var o=d.height();1==u.isTransActive&&o>l.maxColHeight?setTimeout(function(){d.height(l.maxColHeight)},700):d.height(l.maxColHeight)}function j(e,t){if(!0!==t&&0==(n=(n=e).index(),!0!==s.getItem(n).ordered_placed&&((n=g.getPrevRowSameColIndex(n,l.numCols))<0||!0===s.getItem(n).ordered_placed)))return;var i=e.index(),t=g.getColByIndex(l.numCols,i),n=s.getItem(i);c.resizeTile(e,l.colWidth),x(e,!0,!0,t),n.ordered_placed=!0;n=s.getNumItems(),i=g.getNextRowSameColIndex(i,l.numCols);n<=i||(n=b.getThumbByIndex(i),i=s.getItem(i),b.isThumbLoaded(n),b.isThumbLoaded(n)&&!i.ordered_placed&&j(n,!0))}function C(){var e,t,i,n=b.getThumbs(b.type.GET_THUMBS_NO_RATIO);n&&0!=n.length&&(u.isAllLoaded=!1,1==u.isFirstPlaced&&(T(),S(),e=Math.abs(l.galleryWidth-l.totalWidth),1==v.tiles_set_initial_height&&0==g.isScrollbarExists()&&e<25&&(n.length,e=Math.ceil(n.length/l.numCols)*v.tiles_col_width*.75,d.height(e),T())),n.fadeTo(0,0),n=n.find("img.ug-thumb-image"),t=l.numCols,i=l.galleryWidth,g.checkImagesLoaded(n,function(){T(),t==l.numCols&&i==l.galleryWidth||P(!1),f(),a.trigger(o.events.ALL_TILES_LOADED)},function(e,t){1==u.isFirstPlaced&&s.triggerEvent(o.events.TILES_FIRST_PLACED),e=e,1!=(t=t)&&(e=jQuery(e),t=jQuery(e).parent(),b.triggerImageLoadedEvent(t,e),1==v.tiles_keep_order?j(t):(c.resizeTile(t,l.colWidth),x(t,!0,!0)))}))}function t(){var l=y(),e=b.getThumbs(!0),u=v.tiles_justified_row_height,d=[],n=0,_=v.tiles_justified_space_between,t=e.length;jQuery.each(e,function(e,t){t=jQuery(t);var i=b.getItemByThumb(t),t=i.thumbWidth;i.thumbHeight!==u&&(t=Math.floor(i.thumbRatioByWidth*u)),d[e]=t,n+=t});var i=Math.ceil(n/l);t<i&&(i=t);var r=n/i,o=[],a=0,g=[],s=[],c=0,h=0;jQuery.each(e,function(e,t){e=d[e];(h+1)*r<c+e/2&&(g[o.length]=a,o.push(s),s=[],a=0,h++),c+=e,a+=e,s.push(t)}),g[o.length]=a,o.push(s);var p=[],m=[],f=0;return jQuery.each(o,function(e,t){t.length;var i=g[e],n=(t.length-1)*_,i=(l-n)/i,i=Math.round(u*i);f+=i,0<e&&(f+=_),m.push(i);var r=i/u,o=[],a=n;jQuery.each(t,function(e,t){t=jQuery(t).index(),t=d[t],t=Math.round(t*r);o[e]=t,a+=t});var s=a-l;jQuery.each(o,function(e,t){return 0!=s&&(s<0?(o[e]=t+1,s++):(o[e]=t-1,s--),void(e==o.length-1&&0!=s&&(o[e]-=s)))}),p[e]=o}),{arrRows:o,arrRowWidths:p,arrRowHeights:m,gap:_,totalHeight:f}}function A(a){a=a||!1;var e=y(),s=t();d.height(s.totalHeight),y()!=e&&(s=t()),w();var l=0,u=0;jQuery.each(s.arrRows,function(e,t){var n=s.arrRowWidths[e],r=s.arrRowHeights[e],o=0;jQuery.each(t,function(e,t){var i=jQuery(t),e=n[e];c.resizeTile(i,e,r,c.resizemode.VISIBLE_ELEMENTS),g.placeElement(i,o,l),u<(o+=e)&&(u=o),o+=s.gap,1==a&&jQuery(t).show()}),l+=r+s.gap}),I()}function M(){var e=y();switch(p.galleryWidth=e,_={},p.colWidth=v.tiles_nested_col_width,p.optimalTileWidth=v.tiles_nested_optimal_tile_width,p.currentGap=v.tiles_space_between_cols,1==s.isMobileMode()&&(p.currentGap=v.tiles_space_between_cols_mobile),null==p.colWidth?p.colWidth=Math.floor(p.optimalTileWidth/p.nestedOptimalCols):p.optimalTileWidth>p.colWidth?p.nestedOptimalCols=Math.ceil(p.optimalTileWidth/p.colWidth):p.nestedOptimalCols=1,p.maxColumns=g.getNumItemsInSpace(e,p.colWidth,p.currentGap),p.colWidth=g.getItemSizeInSpace(e,p.maxColumns,p.currentGap),p.gridY=0,h=[],b.getThumbs(!0).each(function(){var e=function(e){var t,i,n={},r=p.colWidth,o=p.currentGap,a=c.getTileImageSize(e),s=e.index(),l=Math.ceil(function(e){return Math.abs(Math.sin(Math.abs(1e3*Math.sin(e))))}(s)*(+p.nestedOptimalCols/3)+2*p.nestedOptimalCols/3),e=a.width,s=a.height,a=e/s;s<e?(t=l,0==(i=Math.round(t/a))&&(i=1)):(i=l,0==(t=Math.round(i*a))&&(t=1));return n.dimWidth=t,n.dimHeight=i,n.width=t*r+o*(t-1),n.height=i*r+o*(i-1),n.imgWidth=e,n.imgHeight=s,n.left=0,n.top=0,n}(jQuery(this));h.push(e)}),p.optimalTileWidth>p.colWidth?p.nestedOptimalCols=Math.ceil(p.optimalTileWidth/p.colWidth):p.nestedOptimalCols=1,p.totalWidth=p.maxColumns*(p.colWidth+p.currentGap)-p.currentGap,v.tiles_align){case"center":default:p.addX=Math.round((p.galleryWidth-p.totalWidth)/2);break;case"left":p.addX=0;break;case"right":p.addX=p.galleryWidth-p.totalWidth}p.maxGridY=0}function O(e){var t=y();M(),z();var i=p.maxGridY*(p.colWidth+p.currentGap)-p.currentGap;d.height(i),y()!=t&&(M(),z()),0==v.tiles_nested_debug&&function(e){e=e||!1,w();for(var t=0;t<h.length;t++)B(t,e);d.height(p.maxColHeight),I()}(e)}function z(t){if(1==v.tiles_nested_debug)return void 0===t&&(t=!0),void function(){if(0==t){for(var e=p.currentItem;e<h.length;e++)k(e);p.currentItem=h.length-1}else k(p.currentItem);for(e=0;e<=p.currentItem;e++)B(e,!0);p.currentItem++}();for(var e=0;e<h.length;e++)k(e)}function k(e){p.maxColHeight=0;for(var t=g.getObjectLength(_),i=p.gridY;i<=t+1;i++){for(var n=0;n<p.maxColumns;n++)if(0==D(p.gridY)||0==W(p.gridY,n))return void function(e,t,i){var n=jQuery.extend(!0,{},h[e]),r=n.dimWidth,o=t-n.dimWidth,a=p.nestedOptimalCols;if(t<=n.dimWidth||o<=.33*a||t<=a)N(e,t);else if(o<=a)4<=a?1==G(Math.floor(t/2),i)?N(e,Math.floor(t/2)+1):N(e,Math.floor(t/2)):N(objImage,t);else if(1==G(r,i))switch(a<=r){case!0:N(e,r-1);break;case!1:N(e,r+1)}n=jQuery.extend(!0,{},h[e]);var s=function(e,t,i){var n=p.gridY-1,r=0,o=0,a=1,s=[],l=[];if(s.push(e),0<=n){for(o=0;0<=n;){if(r=_[n][i],void 0!==_[n][i-1]&&_[n][i-1]==_[n][i]||void 0!==_[n][i+t]&&_[n][i+t-1]==_[n][i+t]||_[n][i]!=_[n][i+t-1])return l.push(a),l.push(s),l;o!=r&&(a++,s.push(r)),n--,o=r}return l.push(a),l.push(s),l}return[0,[]]}(e,n.dimWidth,i);if(p.columnsValueToEnableHeightResize<=s[0]&&p.maxColumns>=2*p.nestedOptimalCols){var l=function(e,t){var i=0,n=0,r=t.dimWidth,o=t.dimHeight,a=0,s=0,l=jQuery.map(_,function(e,t){return[e]});if(void 0===l[p.gridY]||void 0===l[p.gridY][e-1])n=0;else for(var u=0;void 0!==_[p.gridY+u]&&-1!=_[p.gridY+u][e-1];)a=_[p.gridY+u][e-2],u++,n++;if(void 0===l[p.gridY]||void 0===l[p.gridY][e+r])i=0;else for(u=0;void 0!==_[p.gridY+u]&&-1!=_[p.gridY+u][e+r];)s=_[p.gridY+u][e+r+1],u++,i++;t=0,l=0;Math.abs(o-n)<Math.abs(o-i)&&0!=n?(t=n,l=a):0!=i?(t=i,l=s):t=o;return{newHeight:t,idToResize:l}}(i,n),o=H(e,l.newHeight,!0);h[e].dimHeight=o.dimHeight;t=function(e,t){for(var i=0,n=0,r=[],o=0,a=0,s=0;s<e[1].length;s++){var l,u=e[1][s],d=h[e[1][s]];n+=d.dimHeight,0!=s?(i+=d.dimHeight,r.push([u,d.dimHeight])):(l=N(u,t,!0),i+=l.dimHeight,r.push([e[1][s],l.dimHeight]))}o=d.left,a=d.top;for(var _,g=n,c=[],s=r.length-1;0<=s;s--){u=r[s][0];0!=s?(_=Math.max(Math.round(+n/3),Math.floor(r[s][1]*(n/i))),g-=_,(l=H(u,_,!0)).left=o,l.top=a,c.push({tileID:u,sizes:l}),a+=l.dimHeight):((l=H(u,_=g,!0)).left=o,l.top=a,c.push({tileID:u,sizes:l}))}return c}(s,o.dimWidth),a=2<=function(e){for(var t=0,i=0,n=0;n<e.length-1;n++){var r=e[n].sizes,o=-1,a=-1;D(r.top+r.dimHeight)&&p.maxColumns>r.left+r.dimWidth&&(o=_[r.top+r.dimHeight-1][r.left+r.dimWidth],a=_[r.top+r.dimHeight][r.left+r.dimWidth]),o!=a&&t++}for(n=0;n<e.length-1;n++){r=e[n].sizes,o=-1,a=-1;D(r.top+r.dimHeight)&&0<=r.left-1&&(o=_[r.top+r.dimHeight-1][r.left-1],a=_[r.top+r.dimHeight][r.left-1]),o!=a&&i++}return Math.max(i,t)}(t)?!0:!1;l.newHeight>=n.dimHeight&&(n=H(e,l.newHeight,!0));s=function(e,t,i){var n=h[e],r=n.dimHeight,o=(n.dimWidth,n.left),n=n.top,t=(parseInt(n/(p.colWidth+p.currentGap)),parseInt(o/(p.colWidth+p.currentGap)),H(e,r-t+i,!0)),i=[];return i.push({tileID:e,sizes:t}),i}(l.idToResize,l.newHeight,n.dimHeight);n.top=p.gridY,n.left=i,s.push({tileID:e,sizes:n});o=R(s),l=R(t);return o<l||1==a?L(s):L(t)}n.left=i,n.top=p.gridY,h[e]=n,Q(e,n,i,p.gridY),p.maxGridY=n.top+n.dimHeight}(e,function(e){var t=e,i=0;if(1==D(p.gridY))for(;0==W(p.gridY,t);)i++,t++;else i=p.maxColumns;return i}(n),n);p.gridY++}}function L(e){for(var t=0;t<e.length;t++){var i=e[t].sizes,n=e[t].tileID;h[n]=jQuery.extend(!0,{},i),Q(n,i,i.left,i.top)}}function N(e,t,i){i=i||!1;var n=p.colWidth,r=p.currentGap,o=h[e],e=o.imgWidth/o.imgHeight,t=t,e=Math.round(t/e);if(1==i){i=jQuery.extend(!0,{},o);return i.dimWidth=t,i.dimHeight=e,i.width=t*n+r*(t-1),i.height=e*n+r*(e-1),i}o.dimWidth=t,o.dimHeight=e,o.width=t*n+r*(t-1),o.height=e*n+r*(e-1)}function H(e,t,i){i=i||!1;var n=h[e],r=n.dimWidth,o=p.colWidth,e=p.currentGap;if(1==i){i=jQuery.extend(!0,{},n);return i.dimHeight=t,i.width=r*o+e*(r-1),i.height=t*o+e*(t-1),i}n.dimHeight=t,n.width=r*o+e*(r-1),n.height=t*o+e*(t-1)}function R(e){for(var t=0,i=0,n=0;n<e.length;n++){var r=h[e[n].tileID];if(0==r.dimHeight||0==r.height)return;r=r.dimWidth/r.dimHeight/(r.imgWidth/r.imgHeight);r<1&&(r=1/r),t+=r,i++}return t/i}function G(e,t){var i=p.gridY-1;return!(i<=0||0==D(i))&&_[i][t+e-1]!=_[i][t+e]}function D(e){return void 0!==_[e]}function Q(e,t,i,n){for(var r,o,a=0;a<t.dimHeight;a++)for(var s=0;s<t.dimWidth;s++)0==D(n+a)&&function(e){_[e]=new Object;for(var t=0;t<p.maxColumns;t++)_[e][t]=-1}(n+a),r=i+s,o=e,_[n+a][r]=o}function W(e,t){return-1!=_[e][t]}function B(e,t){var i=b.getThumbByIndex(e),n=h[e],r=n.top*(p.colWidth+p.currentGap),e=p.addX+n.left*(p.colWidth+p.currentGap);c.resizeTile(i,n.width,n.height,c.resizemode.VISIBLE_ELEMENTS),g.placeElement(i,e,r),r+n.height>p.maxColHeight&&(p.maxColHeight=r+n.height),1==t&&i.fadeTo(0,1)}function F(){if(1==u.isFirstTimeRun)return!0;if(0==u.isAllLoaded)return!1;switch(v.tiles_type){case"columns":P(!1);break;case"justified":A(!1);break;case"nested":(1==s.isMobileMode()?P:O)(!1)}}function Y(){switch(r.children(".ug-tile").show(),1==u.isFirstTimeRun&&(a.on(o.events.ALL_TILES_LOADED,function(){u.isAllLoaded=!0}),n.on(s.events.SIZE_CHANGE,F),n.on(o.events.TILES_FIRST_PLACED,function(){u.isFirstPlaced=!1}),c.initEvents()),c.run(),v.tiles_type){default:case"columns":C();break;case"justified":t=jQuery(r).find("img.ug-thumb-image"),i=b.getThumbs(),u.isAllLoaded=!1,i.fadeTo(0,0),g.checkImagesLoaded(t,function(){setTimeout(function(){A(!0),i.fadeTo(0,1),s.triggerEvent(o.events.TILES_FIRST_PLACED),f(),a.trigger(o.events.ALL_TILES_LOADED)})},function(e,t){e=jQuery(e);var i=jQuery(e).parent();b.triggerImageLoadedEvent(i,e)});break;case"nested":e=jQuery(r).find("img.ug-thumb-image"),t=b.getThumbs(),u.isAllLoaded=!1,t.fadeTo(0,0),g.checkImagesLoaded(e,function(){(1==s.isMobileMode()?P:O)(!0),s.triggerEvent(o.events.TILES_FIRST_PLACED),f(),a.trigger(o.events.ALL_TILES_LOADED)},function(e,t){e=jQuery(e);var i=jQuery(e).parent();b.triggerImageLoadedEvent(i,e)})}var e,t,i;u.isFirstTimeRun=!1}this.destroy=function(){n.off(s.events.SIZE_CHANGE),c.destroy(),n.off(o.events.TILES_FIRST_PLACED)},this.init=function(e,t){m(e,t)},this.setHtml=function(e){!function(e){d=e=e||(d||r);var t=v.tiles_type;e.addClass("ug-tiletype-"+t),c.setHtml(e),e.children(".ug-thumb-wrapper").hide()}(e)},this.getObjTileDesign=function(){return c},this.run=function(){Y()},this.runNewItems=function(){if(!d)throw new Error("Can't run new items - parent not set");switch(c.setHtml(d,!0),c.run(!0),v.tiles_type){case"columns":C();break;default:case"justified":case"nested":throw new Error("Tiles type: "+v.tiles_type+" not support load more yet")}}}function UGAviaControl(){var a,t,s,o,l,u={touchEnabled:!1,isMouseInsideStrip:!1,strip_finalPos:0,handle_timeout:"",handle_request_frame:0,isStripMoving:!1,isControlEnabled:!0,strip_speed:10,area_thumb_sizes:1};function i(e){if(0==u.isControlEnabled)return!0;if(1==u.touchEnabled)return jQuery("body").off("mousemove"),!0;u.isMouseInsideStrip=s.ismouseover();var t,i,n,r=a.isTouchMotionActive();if(1==u.isMouseInsideStrip&&0==r){var e=function(e){var t=a.getSizes().thumbSize,t=u.area_thumb_sizes*t;if(0!=l)return i=s.offset().top,n=i+s.height(),r=i+t,o=n-t,i<e&&e<r?"start":e<n&&o<e?"stop":null;var i=s.offset().left,n=i+s.width(),r=i+t,o=n-t;return i<e&&e<r?"start":e<n&&o<e?"stop":null}((e=e,0==l?e.pageX:e.pageY));if(!e)return _(),!1;e=e,0==l&&(i=o.width(),n=s.width(),"start"==e&&(t=0),"stop"==e&&(t=-(i-n))),1==l&&(i=o.height(),n=s.height(),"start"==e&&(t=0),"stop"==e&&(t=-(i-n))),t=Math.floor(t),u.is_strip_moving=!0,u.strip_finalPos=t,!void(1!=u.isStripMoving&&(u.isStripMoving=!0,u.handle_request_frame=requestAnimationFrame(d)))}else _()}function d(){if(0==u.is_strip_moving)return!1;var e=a.getInnerStripPos();Math.floor(e)==Math.floor(u.strip_finalPos)&&_();var t=Math.abs(u.strip_finalPos-e),i=u.strip_speed;u.strip_finalPos<e&&(i*=-1);e+=i;if(u.strip_finalPos>e&&i<0&&(e=u.strip_finalPos),0==t)return _(),!1;a.positionInnerStrip(e),u.handle_request_frame=requestAnimationFrame(d)}function _(){0!=u.isStripMoving&&(u.isStripMoving=!1,cancelAnimationFrame(u.handle_request_frame))}this.enable=function(){u.isControlEnabled=!0},this.disable=function(){u.isControlEnabled=!1},this.onResize=function(){},this.init=function(e){t=(a=e).getObjects(),t.g_gallery,s=t.g_objStrip,o=t.g_objStripInner,t.g_options,l=t.isVertical,jQuery("body").on("touchstart",function(e){return 0==u.isControlEnabled||void(u.touchEnabled=!0)}),jQuery("body").mousemove(i)},this.destroy=function(){jQuery("body").off("touchstart"),jQuery("body").off("mousemove")}}function UGSlider(){var r,o,a,l,s,u,d,i,n,_,t,g,c,h=this,p=jQuery(h),m=new UniteGalleryMain,f=null,b=null,v=null,y=new UGVideoPlayer,w=new UGFunctions,I=null,E=null,T={slider_scale_mode:"fill",slider_scale_mode_media:"fill",slider_scale_mode_fullscreen:"down",slider_item_padding_top:0,slider_item_padding_bottom:0,slider_item_padding_left:0,slider_item_padding_right:0,slider_background_color:"",slider_background_opacity:1,slider_image_padding_top:0,slider_image_padding_bottom:0,slider_image_padding_left:0,slider_image_padding_right:0,slider_image_border:!(this.events={ITEM_CHANGED:"item_changed",BEFORE_SWITCH_SLIDES:"before_switch",BEFORE_RETURN:"before_return",AFTER_RETURN:"after_return",ZOOM_START:"slider_zoom_start",ZOOM_END:"slider_zoom_end",ZOOMING:"slider_zooming",ZOOM_CHANGE:"slider_zoom_change",START_DRAG:"start_drag",AFTER_DRAG_CHANGE:"after_drag_change",ACTION_START:"action_start",ACTION_END:"action_end",CLICK:"slider_click",TRANSITION_START:"slider_transition_start",TRANSITION_END:"slider_transition_end",AFTER_PUT_IMAGE:"after_put_image",IMAGE_MOUSEENTER:"slider_image_mouseenter",IMAGE_MOUSELEAVE:"slider_image_mouseleave",CURRENTSLIDE_LOAD_START:"slider_current_loadstart",CURRENTSLIDE_LOAD_END:"slider_current_loadend"}),slider_image_border_width:10,slider_image_border_color:"#ffffff",slider_image_border_radius:0,slider_image_border_maxratio:.35,slider_image_shadow:!1,slider_video_constantsize:!1,slider_video_constantsize_scalemode:"fit",slider_video_constantsize_width:854,slider_video_constantsize_height:480,slider_video_padding_top:0,slider_video_padding_bottom:0,slider_video_padding_left:0,slider_video_padding_right:0,slider_video_enable_closebutton:!0,slider_transition:"slide",slider_transition_speed:300,slider_transition_easing:"easeInOutQuad",slider_control_swipe:!0,slider_control_zoom:!0,slider_zoom_mousewheel:!0,slider_vertical_scroll_ondrag:!1,slider_loader_type:1,slider_loader_color:"white",slider_enable_links:!0,slider_links_newpage:!1,slider_enable_bullets:!1,slider_bullets_size:"",slider_bullets_color:"",slider_bullets_color_reverse:!1,slider_bullets_space_between:-1,slider_bullets_align_hor:"center",slider_bullets_align_vert:"bottom",slider_bullets_offset_hor:0,slider_bullets_offset_vert:10,slider_enable_arrows:!0,slider_arrows_skin:"",slider_arrow_left_align_hor:"left",slider_arrow_left_align_vert:"middle",slider_arrow_left_offset_hor:10,slider_arrow_left_offset_vert:0,slider_arrow_right_align_hor:"right",slider_arrow_right_align_vert:"middle",slider_arrow_right_offset_hor:10,slider_arrow_right_offset_vert:0,slider_enable_progress_indicator:!0,slider_progress_indicator_type:"pie",slider_progress_indicator_align_hor:"right",slider_progress_indicator_align_vert:"top",slider_progress_indicator_offset_hor:10,slider_progress_indicator_offset_vert:10,slider_enable_play_button:!0,slider_play_button_skin:"",slider_play_button_align_hor:"left",slider_play_button_align_vert:"top",slider_play_button_offset_hor:40,slider_play_button_offset_vert:8,slider_play_button_mobilehide:!1,slider_enable_fullscreen_button:!0,slider_fullscreen_button_skin:"",slider_fullscreen_button_align_hor:"left",slider_fullscreen_button_align_vert:"top",slider_fullscreen_button_offset_hor:11,slider_fullscreen_button_offset_vert:9,slider_fullscreen_button_mobilehide:!1,slider_enable_zoom_panel:!0,slider_zoompanel_skin:"",slider_zoompanel_align_hor:"left",slider_zoompanel_align_vert:"top",slider_zoompanel_offset_hor:12,slider_zoompanel_offset_vert:92,slider_zoompanel_mobilehide:!1,slider_controls_always_on:!1,slider_controls_appear_ontap:!0,slider_controls_appear_duration:300,slider_enable_text_panel:!0,slider_textpanel_always_on:!0,slider_videoplay_button_type:"square"},S={slider_progress_indicator_align_hor:"left",slider_progress_indicator_align_vert:"bottom",slider_progress_indicator_offset_hor:0,slider_progress_indicator_offset_vert:0},x={isRunOnce:!1,isTextPanelSaparateHover:!1,numPrev:1,numCurrent:2,numNext:3,isControlsVisible:!0,currentControlsMode:"image"};function P(e,t,i){m=e,i&&(c=i,t=w.convertCustomPrefixOptions(t,c,"slider")),r=jQuery(e);e=m.getObjects();o=e.g_objWrapper,e.g_objThumbs,t.hasOwnProperty("slider_progress_indicator_type")&&(T.slider_progress_indicator_type=t.slider_progress_indicator_type),"bar"==T.slider_progress_indicator_type&&(T=jQuery.extend(T,S)),t&&h.setOptions(t),e=m.getOptions(),t=e.gallery_skin,""==T.slider_arrows_skin&&(T.slider_arrows_skin=t),""==T.slider_zoompanel_skin&&(T.slider_zoompanel_skin=t),""==T.slider_play_button_skin&&(T.slider_play_button_skin=t),""==T.slider_fullscreen_button_skin&&(T.slider_fullscreen_button_skin=t),T.video_enable_closebutton=T.slider_video_enable_closebutton,"zoom"!=e.gallery_mousewheel_role&&(T.slider_zoom_mousewheel=!1),1==T.slider_enable_bullets&&(v=new UGBullets,n={bullets_size:T.slider_bullets_size,bullets_color:T.slider_bullets_color,bullets_color_reverse:T.slider_bullets_color_reverse,bullets_space_between:T.slider_bullets_space_between},v.init(m,n)),T.slider_enable_text_panel&&(E=new UGTextPanel).init(m,T,"slider"),T.slider_enable_zoom_panel&&(g=new UGZoomButtonsPanel).init(h,T);var n=m.getGalleryID();y.init(T,!1,n)}function e(){var e;1!=x.isRunOnce&&(x.isRunOnce=!0,T.slider_background_color?(e=T.slider_background_color,1!=T.slider_background_opacity&&(e=w.convertHexToRGB(e,T.slider_background_opacity)),a.css("background-color",e)):1!=T.slider_background_opacity&&(e=w.convertHexToRGB("#000000",T.slider_background_opacity),a.css("background-color",e)),1==T.slider_control_swipe&&(_=new UGTouchSliderControl).init(h,T),1==T.slider_control_zoom&&(t=new UGZoomSliderControl).init(h,T),E&&E.run(),r.on(m.events.ITEM_IMAGE_UPDATED,se),r.on(m.events.ITEM_CHANGE,K),v&&jQuery(v).on(v.events.BULLET_CLICK,J),1==T.slider_enable_arrows&&(w.addClassOnHover(n,"ug-arrow-hover"),w.addClassOnHover(i,"ug-arrow-hover"),m.setNextButton(n),m.setPrevButton(i)),0==T.slider_controls_always_on&&a.hover(ie,ne),a.on("touchend click",$),p.on(h.events.CLICK,ee),E&&1==x.isTextPanelSaparateHover&&a.hover(D,G),f&&(w.addClassOnHover(f,"ug-button-hover"),m.setPlayButton(f)),b&&(w.addClassOnHover(b,"ug-button-hover"),m.setFullScreenToggleButton(b)),t&&p.on(h.events.ZOOM_CHANGE,te),g&&g.initEvents(),y.initEvents(),jQuery(y).on(y.events.SHOW,oe),jQuery(y).on(y.events.HIDE,ae),ue(s),ue(u),ue(d),p.on(h.events.AFTER_PUT_IMAGE,le),a.on("mouseenter",".ug-item-wrapper img",function(e){p.trigger(h.events.IMAGE_MOUSEENTER)}),a.on("mouseleave",".ug-item-wrapper img",function(e){0==h.isMouseInsideSlideImage(e)&&p.trigger(h.events.IMAGE_MOUSELEAVE)}))}function j(e,t){var i="ug-type-square";"round"==T.slider_videoplay_button_type&&(i="ug-type-round");var n="";return n+="<div class='ug-slide-wrapper ug-slide"+t+"'>",n+="<div class='ug-item-wrapper'></div>",n+="<div class='ug-slider-preloader "+e+"'></div>",n+="<div class='ug-button-videoplay "+i+'\' style=\'display:none\'><svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_19_2)"><path d="M28 15.998C28 15.346 27.682 14.734 27.146 14.36L7.146 0.360047C6.538 -0.0679528 5.738 -0.115953 5.076 0.224047C4.414 0.570047 4 1.25205 4 1.99805V30C4 30.746 4.414 31.43 5.076 31.774C5.738 32.114 6.536 32.066 7.146 31.638L27.146 17.638C27.682 17.266 28 16.654 28 16.002C28 16 28 16 28 15.998C28 16 28 16 28 15.998Z" fill="white"/></g><defs><clipPath id="clip0_19_2"><rect width="32" height="32" fill="white"/></clipPath></defs></svg></div>',n+="</div>"}function C(e){e&&(o=e);var t=function(){var e;switch(T.slider_loader_type){default:case 1:e="ug-loader1";break;case 2:e="ug-loader2";break;case 3:e="ug-loader3";break;case 4:e="ug-loader4";break;case 5:e="ug-loader5";break;case 6:e="ug-loader6";break;case 7:e="ug-loader7";break;case 8:e="ug-loader8";break;case 9:e="ug-loader9"}"black"==T.slider_loader_color&&(e+=" ug-loader-black");return e}(),e=(m.getOptions(),"<div class='ug-slider-wrapper'>");e+="<div class='ug-slider-inner'>",e+=j(t,1),e+=j(t,2),e+=j(t,3),e+="</div>",1==T.slider_enable_arrows&&(e+="<div class='ug-slider-control ug-arrow-left ug-skin-"+T.slider_arrows_skin+'\'><svg x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32"><g stroke-width="1" transform="translate(0.5, 0.5)"><polyline fill="none" stroke="#ffffff" stroke-width="1" stroke-linecap="square" stroke-miterlimit="10" points="21,2 11,16 21,30 " stroke-linejoin="miter"></polyline></g></svg></div>',e+="<div class='ug-slider-control ug-arrow-right ug-skin-"+T.slider_arrows_skin+'\'><svg x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32"><g stroke-width="1" transform="translate(0.5, 0.5)"><polyline fill="none" stroke="#ffffff" stroke-width="1" stroke-linecap="square" stroke-miterlimit="10" points="11,2 21,16 11,30 " stroke-linejoin="miter"></polyline></g></svg></div>'),1==T.slider_enable_play_button&&(e+="<div class='ug-slider-control ug-button-play ug-skin-"+T.slider_play_button_skin+'\'><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><path fill="#ffffff" d="M14,7.999c0-0.326-0.159-0.632-0.427-0.819l-10-7C3.269-0.034,2.869-0.058,2.538,0.112C2.207,0.285,2,0.626,2,0.999v14.001c0,0.373,0.207,0.715,0.538,0.887c0.331,0.17,0.73,0.146,1.035-0.068l10-7C13.841,8.633,14,8.327,14,8.001C14,8,14,8,14,7.999C14,8,14,8,14,7.999z"></path></g></svg></div>'),1==T.slider_enable_fullscreen_button&&(e+="<div class='ug-slider-control ug-button-fullscreen ug-skin-"+T.slider_fullscreen_button_skin+'\'><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="10.5,0.5 15.5,0.5 15.5,5.5 "></polyline><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="0.5,10.5 0.5,15.5 5.5,15.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="15.5" y1="0.5" x2="11.5" y2="4.5"></line><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="4.5" y1="11.5" x2="0.5" y2="15.5"></line><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="5.5,0.5 0.5,0.5 0.5,5.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="0.5" y1="0.5" x2="4.5" y2="4.5"></line><polyline fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="15.5,10.5 15.5,15.5 10.5,15.5 "></polyline><line fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11.5" y1="11.5" x2="15.5" y2="15.5"></line><circle fill="#ffffff" cx="8" cy="8" r="2" data-cap="butt" data-color="color-2" data-stroke="none"></circle></g></svg></div>'),e+="</div>",o.append(e),a=o.children(".ug-slider-wrapper"),l=a.children(".ug-slider-inner"),s=l.children(".ug-slide1"),u=l.children(".ug-slide2"),d=l.children(".ug-slide3"),s.data("slidenum",1),u.data("slidenum",2),d.data("slidenum",3),v&&v.appendHTML(a),1==T.slider_enable_arrows&&(i=a.children(".ug-arrow-left"),n=a.children(".ug-arrow-right")),1==T.slider_enable_play_button&&(f=a.children(".ug-button-play")),1==T.slider_enable_fullscreen_button&&(b=a.children(".ug-button-fullscreen")),1==T.slider_enable_progress_indicator&&("bar"==(I=w.initProgressIndicator(T.slider_progress_indicator_type,T,a)).getType()&&"pie"==T.slider_progress_indicator_type&&(T.slider_progress_indicator_type="bar",T=jQuery.extend(T,S)),m.setProgressIndicator(I)),1==T.slider_enable_text_panel&&(E.appendHTML(a),0==T.slider_textpanel_always_on&&(E.getElement().hide().data("isHidden",!0),x.isTextPanelSaparateHover=!0)),1==T.slider_enable_zoom_panel&&g.appendHTML(a),y.setHtml(l)}function A(e){var t=ge(e);w.placeElementInParentCenter(t);e=ce(e);w.placeElementInParentCenter(e)}function M(){var e,t;v&&(e=v.getElement(),w.placeElement(e,T.slider_bullets_align_hor,T.slider_bullets_align_vert,T.slider_bullets_offset_hor,T.slider_bullets_offset_vert),w.placeElement(e,T.slider_bullets_align_hor,T.slider_bullets_align_vert,T.slider_bullets_offset_hor,T.slider_bullets_offset_vert)),1==T.slider_enable_arrows&&(w.placeElement(i,T.slider_arrow_left_align_hor,T.slider_arrow_left_align_vert,T.slider_arrow_left_offset_hor,T.slider_arrow_left_offset_vert),w.placeElement(n,T.slider_arrow_right_align_hor,T.slider_arrow_left_align_vert,T.slider_arrow_right_offset_hor,T.slider_arrow_right_offset_vert)),0==T.slider_controls_always_on&&X(!0),I&&(t=I.getElement(),"bar"==T.slider_progress_indicator_type?(e=a.width(),I.setSize(e),w.placeElement(t,"left",T.slider_progress_indicator_align_vert,0,T.slider_progress_indicator_offset_vert)):w.placeElement(t,T.slider_progress_indicator_align_hor,T.slider_progress_indicator_align_vert,T.slider_progress_indicator_offset_hor,T.slider_progress_indicator_offset_vert)),E&&E.positionPanel(),f&&w.placeElement(f,T.slider_play_button_align_hor,T.slider_play_button_align_vert,T.slider_play_button_offset_hor,T.slider_play_button_offset_vert),b&&w.placeElement(b,T.slider_fullscreen_button_align_hor,T.slider_fullscreen_button_align_vert,T.slider_fullscreen_button_offset_hor,T.slider_fullscreen_button_offset_vert),g&&(t=g.getElement(),w.placeElement(t,T.slider_zoompanel_align_hor,T.slider_zoompanel_align_vert,T.slider_zoompanel_offset_hor,T.slider_zoompanel_offset_vert)),A(s),A(u),A(d),m.isMobileMode()?(1==T.slider_fullscreen_button_mobilehide&&b&&b.hide(),1==T.slider_play_button_mobilehide&&f&&f.hide(),1==T.slider_zoompanel_mobilehide&&g&&g.getElement().hide()):(1==T.slider_fullscreen_button_mobilehide&&b&&b.show(),1==T.slider_play_button_mobilehide&&f&&f.show(),1==T.slider_zoompanel_mobilehide&&g&&g.getElement().show())}function O(){var e,t,i=h.getSlidesReference(),n=0,r=h.isSlideHasItem(i.objNextSlide),o=h.isSlideHasItem(i.objPrevSlide);o?(n=i.objPrevSlide.outerWidth(),i.objPrevSlide.css("z-index",1)):i.objPrevSlide.hide(),e=t=n+i.objCurrentSlide.outerWidth(),r?(e=t+i.objNextSlide.outerWidth(),i.objPrevSlide.css("z-index",2)):i.objNextSlide.hide(),i.objCurrentSlide.css("z-index",3),w.placeElement(i.objCurrentSlide,n,0),l.css({left:-n+"px",width:e+"px"}),o&&(w.placeElement(i.objPrevSlide,0,0),w.showElement(i.objPrevSlide)),r&&(w.showElement(i.objNextSlide),w.placeElement(i.objNextSlide,t,0))}function z(e){var t=e.data("index");void 0===t||null==t||(t=m.getItem(t))&&R(e,t)}function k(e){e.stop(!0).hide(100)}function L(e,t,i){var n={};1==T.slider_image_border&&(n["border-style"]="solid",i=function(e,t){if((n=T.slider_image_border_width)<=10)return n;var e=(i=w.getElementSize(e)).width,i=i.height;if(t&&(t.hasOwnProperty("imageWidth")&&(e=t.imageWidth),t.hasOwnProperty("imageHeight")&&(i=t.imageHeight)),e<=0)return n;if(2*n/(i=e<i?e:i)<T.slider_image_border_maxratio)return n;var n=i*T.slider_image_border_maxratio/2;return n=Math.round(n)}(e,i),n["border-width"]=i+"px",n["border-color"]=T.slider_image_border_color,n["border-radius"]=T.slider_image_border_radius),"image"!=t&&1==T.slider_video_constantsize&&(n["background-color"]="#000000"),1==T.slider_image_shadow&&(n["box-shadow"]="3px 3px 10px 0px #353535"),e.css(n)}function N(e,t){var i=T.slider_video_constantsize_width,n=T.slider_video_constantsize_height,r=T.slider_video_constantsize_scalemode;return w.scaleImageExactSizeInParent(e,t.imageWidth,t.imageHeight,i,n,r)}function H(e,t,i){var n=e.children(".ug-item-wrapper"),r=ge(e);if(void 0===t.urlImage||""==t.urlImage)throw new Error("The slide don't have big image defined ( data-image='imageurl' ). Please check gallery items.","showbig");var o=t.urlImage,a=e.data("urlImage");e.data("urlImage",o);var s,l,u=h.getScaleMode(e),d=h.getSlideType(e),_=h.getObjImagePadding(),g="";"string"==typeof t.description&&(g=t.description),a==o&&!0!==i?((s=n.children("img")).attr("alt",g),0!=t.imageWidth&&0!=t.imageHeight||m.checkFillImageSize(s,t),l={},L(s,d,l="image"!=d&&1==T.slider_video_constantsize?N(s,t):w.scaleImageFitParent(s,t.imageWidth,t.imageHeight,u,_)),p.trigger(h.events.AFTER_PUT_IMAGE,e)):((s=w.placeImageInsideParent(o,n,t.imageWidth,t.imageHeight,u,_)).attr("alt",g),1==t.isBigImageLoaded?(s.fadeTo(0,1),k(r),l="image"!=d&&1==T.slider_video_constantsize?N(s,t):w.getImageInsideParentData(n,t.imageWidth,t.imageHeight,u,_),s.css("width",l.imageWidth+"px"),L(s,d,l),p.trigger(h.events.AFTER_PUT_IMAGE,e)):(s.fadeTo(0,0),r.stop(!0).show(100),e.data("isLoading",!0),h.isSlideCurrent(e)&&p.trigger(h.events.CURRENTSLIDE_LOAD_START),s.data("itemIndex",t.index),s.on("load",function(){var e=jQuery(this),t=e.data("itemIndex");e.fadeTo(0,1);var i=e.parent().parent(),n=h.getSlideType(i),r=ge(i),o=h.getObjImagePadding(),a=h.getScaleMode(i);k(r),i.data("isLoading",!1),h.isSlideCurrent(i)&&p.trigger(h.events.CURRENTSLIDE_LOAD_END),m.onItemBigImageLoaded(null,e);r=m.getItem(t),t={};"image"!=n&&1==T.slider_video_constantsize?N(e,r):t=w.scaleImageFitParent(e,r.imageWidth,r.imageHeight,a,o),e.fadeTo(0,1),L(e,n,t),p.trigger(h.events.AFTER_PUT_IMAGE,i)})))}function R(e,t){try{var i=e.children(".ug-item-wrapper");if(null==t)return i.html(""),e.removeData("index"),e.removeData("type"),void e.removeData("urlImage");e.data("index");e.data("index",t.index),e.data("type",t.type),1==T.slider_enable_links&&"image"==t.type&&(t.link?e.addClass("ug-slide-clickable"):e.removeClass("ug-slide-clickable")),H(e,t);var n=ce(e);"image"===t.type?n.hide():n.show()}catch(e){throw void 0!==e.fileName&&"showbig"==e.fileName&&m.showErrorMessageReplaceGallery(e.message),i.html(""),new Error(e)}}function G(){if(!E)return!1;if(1==Q())return!1;var e=E.getElement(),t=0;1!=x.isTextPanelSaparateHover&&1!=T.slider_textpanel_always_on||(t=T.slider_controls_appear_duration),e.stop().fadeTo(t,0),e.data("isHidden",!0)}function D(){if(!E)return!1;if(0==Q())return!1;var e=E.getElement(),t=0;1!=x.isTextPanelSaparateHover&&1!=T.slider_textpanel_always_on||(e.show(),E.positionElements(),t=T.slider_controls_appear_duration),e.stop().show().fadeTo(t,1),e.data("isHidden",!1)}function Q(){return!1!==E.getElement().data("isHidden")}function W(){var e=h.getCurrentSlide(),t=h.getSlideImage(e),i=w.getElementSize(e),e=i.left,i=i.top;1==T.slider_video_constantsize?(e+=(t=w.getElementSize(t)).left,i+=t.top):(e+=T.slider_video_padding_left,i+=T.slider_video_padding_top),y.setPosition(e,i)}function B(){var e=T.slider_video_constantsize_width,t=T.slider_video_constantsize_height;y.setSize(e,t),L(y.getObject(),"video")}function F(e,t,i){p.trigger(h.events.TRANSITION_START);var n=T.slider_transition;switch(i&&(n=i),h.stopSlideAction(null,!0),n){default:case"fade":U(t);break;case"slide":!function t(e,i){var n=h.isAnimating();if(1==n)return x.itemWaiting=i,!0;null!=x.itemWaiting&&(x.itemWaiting=null);var r=h.getSlidesReference();switch(e){case"right":R(r.objPrevSlide,i),O();var o=w.getElementSize(r.objPrevSlide),a=-o.left;h.switchSlideNums("right");break;case"left":R(r.objNextSlide,i),O();var o=w.getElementSize(r.objNextSlide),a=-o.left;h.switchSlideNums("left");break;default:throw new Error("wrong direction: "+e)}var s=T.slider_transition_speed;n=T.slider_transition_easing;var n={duration:s,easing:n,queue:!1,always:function(){var e;h.stopSlideAction(),y.hide(),null!=x.itemWaiting?(e=_e(x.itemWaiting),t(e,x.itemWaiting)):(h.placeNabourItems(),p.trigger(h.events.TRANSITION_END))}};l.animate({left:a+"px"},n)}(e,t);break;case"lightbox_open":U(t,!1,!0)}}function Y(e,t,i){i?e.fadeTo(T.slider_transition_speed,t,i):e.fadeTo(T.slider_transition_speed,t)}function U(e,t,i){t=t||!1;var n=h.getSlidesReference();R(n.objNextSlide,e);e=w.getElementSize(n.objCurrentSlide);w.placeElement(n.objNextSlide,e.left,e.top);e=x.numCurrent;x.numCurrent=x.numNext,x.numNext=e,p.trigger(h.events.ITEM_CHANGED),n.objNextSlide.stop(!0),n.objCurrentSlide.stop(!0),1==t?(n.objCurrentSlide.fadeTo(0,0),n.objNextSlide.fadeTo(0,1),h.placeNabourItems(),p.trigger(h.events.TRANSITION_END),!0!==i&&y.hide()):(n.objNextSlide.fadeTo(0,0),Y(n.objCurrentSlide,0,function(){h.placeNabourItems(),p.trigger(h.events.TRANSITION_END),!0!==i&&y.hide()}),1==y.isVisible()&&Y(y.getObject(),0),Y(n.objNextSlide,1))}function V(){return a.children(".ug-slider-control")}function X(e){var t;0!=w.isTimePassed("sliderControlsToggle")&&0!=x.isControlsVisible&&(e=e||!1,t=V(),!0===e?t.stop().fadeTo(0,0).hide():t.stop().fadeTo(T.slider_controls_appear_duration,0,function(){t.hide()}),x.isControlsVisible=!1)}function Z(e){if(0!=w.isTimePassed("sliderControlsToggle")){if(1==x.isControlsVisible)return 1;e=e||!1;var t=V();!0===e?t.stop().show():(t.stop().show().fadeTo(0,0),t.fadeTo(T.slider_controls_appear_duration,1)),x.isControlsVisible=!0}}function q(e){if(e!=x.currentControlsMode){switch(e){case"image":g&&g.getElement().show();break;case"video":g&&g.getElement().hide();break;default:throw new Error("wrong controld mode: "+e)}x.currentControlsMode=e}}function K(e,t,i){var n=m.getSelectedItem();h.setItem(n,!1,i);i=n.index;v&&v.setActive(i),E&&0==x.isTextPanelSaparateHover&&D(),"image"==n.type?q("image"):q("video")}function J(e,t){m.selectItem(t)}function $(e){if(_&&0==_.isTapEventOccured(e))return!0;p.trigger(h.events.CLICK,e)}function ee(){var e=h.getCurrentSlide().hasClass("ug-slide-clickable"),t=h.getCurrentItem();if(e)return 0==T.slider_links_newpage?location.href=t.link:window.open(t.link,"_blank"),!0;0==T.slider_controls_always_on&&1==T.slider_controls_appear_ontap&&1==h.isCurrentSlideType("image")&&((0==x.isControlsVisible?Z:X)(),E&&1==T.slider_textpanel_always_on&&h.isCurrentSlideType("image")&&h.isCurrentSlideImageFit()&&D())}function te(e){E&&h.isCurrentSlideType("image")&&0==h.isCurrentSlideImageFit()&&G()}function ie(){Z()}function ne(){X()}function re(e){e=e.parent();h.startSlideAction(e)}function oe(){m.isPlayMode()&&m.pausePlaying(),p.trigger(h.events.ACTION_START)}function ae(){m.isPlayMode()&&m.continuePlaying(),p.trigger(h.events.ACTION_END)}function se(e,t,i){s.data("index")==t&&(objItem=m.getItem(t),H(s,objItem,!0)),u.data("index")==t&&(objItem=m.getItem(t),H(u,objItem,!0)),d.data("index")==t&&(objItem=m.getItem(t),H(d,objItem,!0))}function le(e,t){t=jQuery(t);var i=h.getSlideImage(t),n=ce(t),t=w.getElementSize(i);w.placeElement(n,"center","middle",t.left,t.top,i)}function ue(e){e=ce(e);w.addClassOnHover(e),w.setButtonOnClick(e,re)}function de(e){switch(e){case 1:return s;case 2:return u;case 3:return d;default:throw new Error("wrong num: "+e)}}function _e(e){var t=h.getSlidesReference().objCurrentSlide.data("index");return e.index<t?"right":"left"}function ge(e){return(e=e||h.getCurrentSlide()).children(".ug-slider-preloader")}function ce(e){return e.children(".ug-button-videoplay")}function he(e){e=(e=e||h.getCurrentSlide()).data("index");return null==e?null:m.getItem(e)}this.switchSlideNums=function(e){switch(p.trigger(h.events.BEFORE_SWITCH_SLIDES),e){case"left":var t=x.numCurrent;x.numCurrent=x.numNext,x.numNext=x.numPrev,x.numPrev=t;break;case"right":t=x.numCurrent;x.numCurrent=x.numPrev,x.numPrev=x.numNext,x.numNext=t;break;default:throw new Error("wrong direction: "+e)}p.trigger(h.events.ITEM_CHANGED)},this.destroy=function(){p.off(h.events.AFTER_PUT_IMAGE),r.off(m.events.ITEM_IMAGE_UPDATED),r.off(m.events.ITEM_CHANGE),v&&jQuery(v).on(v.events.BULLET_CLICK),a.off("mouseenter"),a.off("mouseleave"),a.off("touchend"),a.off("click"),p.off(h.events.CLICK),t&&p.off(h.events.ZOOM_CHANGE),p.off(h.events.BEFORE_SWITCH_SLIDES),jQuery(y).off(y.events.SHOW),jQuery(y).off(y.events.HIDE),y.destroy(),a.off("mouseenter",".ug-item-wrapper img"),a.off("mouseleave",".ug-item-wrapper img")},this.________EXTERNAL_GENERAL___________=function(){},this.init=function(e,t,i){P(e,t,i)},this.getSlideImage=function(e){return(e=e||h.getCurrentSlide()).find(".ug-item-wrapper img")},this.setHtml=function(e){C(e)},this.run=function(){e()},this.isInnerInPlace=function(){var e=h.getSlidesReference();return-w.getElementSize(e.objCurrentSlide).left==w.getElementSize(l).left},this.isAnimating=function(){return l.is(":animated")},this.isSlideCurrent=function(e){e=e.data("slidenum");return x.numCurrent==e},this.isSlideHasItem=function(e){e=e.data("index");return null!=e},this.getObjImagePadding=function(){return{padding_top:T.slider_image_padding_top,padding_bottom:T.slider_image_padding_bottom,padding_left:T.slider_image_padding_left,padding_right:T.slider_image_padding_right}},this.getSlidesReference=function(){return{objPrevSlide:de(x.numPrev),objNextSlide:de(x.numNext),objCurrentSlide:de(x.numCurrent)}},this.getCurrentSlide=function(){return h.getSlidesReference().objCurrentSlide},this.getCurrentItemIndex=function(){var e=h.getSlidesReference().objCurrentSlide.data("index");return null==e&&(e=-1),e},this.getCurrentItem=function(){var e=h.getCurrentItemIndex();return-1==e?null:m.getItem(e)},this.getSlideType=function(e){return null==e&&(e=h.getCurrentSlide()),e.data("type")},this.isMouseInsideSlideImage=function(e){var t=h.getSlideImage(),e=w.getMousePosition(e);void 0===e.pageX&&(e=_.getLastMousePos());e=w.getMouseElementPoint(e,t),t=w.getElementSize(t);return w.isPointInsideElement(e,t)},this.isCurrentSlideType=function(e){return h.getSlideType()==e},this.isCurrentSlideLoadingImage=function(){return!0===h.getCurrentSlide().data("isLoading")},this.setItem=function(e,t,i){var n=h.getSlidesReference(),r=n.objCurrentSlide.data("index"),o=e.index;if(o==r)return!0;null==r?(R(n.objCurrentSlide,e),h.placeNabourItems()):(n="left",m.getNumItems(),"next"==i?n="left":("prev"==i||o<r||o<r)&&(n="right"),F(n,e,t))},this.placeNabourItems=function(){var e=h.getSlidesReference(),t=e.objCurrentSlide.data("index"),i=m.getPrevItem(t),t=m.getNextItem(t);R(e.objNextSlide,t),R(e.objPrevSlide,i),O()},this.________EXTERNAL_API___________=function(){},this.stopSlideAction=function(e,t){e=e||h.getCurrentSlide(),!0===t?y.pause():y.hide()},this.startSlideAction=function(e){var t=he(e=e||h.getCurrentSlide());if("image"==t.type)return!0;switch(1==T.slider_video_constantsize&&B(),W(),y.show(),t.type){case"youtube":y.playYoutube(t.videoid,!0,t.video_start);break;case"vimeo":y.playVimeo(t.videoid);break;case"html5video":y.playHtml5Video(t.videoogv,t.videowebm,t.videomp4,t.urlImage);break;case"soundcloud":y.playSoundCloud(t.trackid);break;case"wistia":y.playWistia(t.videoid)}},this.getScaleMode=function(e){return e=e||h.getCurrentSlide(),"image"!=h.getSlideType(e)?T.slider_scale_mode_media:T.slider_scale_mode!=T.slider_scale_mode_fullscreen&&1==m.isFullScreen()?T.slider_scale_mode_fullscreen:T.slider_scale_mode},this.getObjects=function(){return{g_objSlider:a,g_objInner:l,g_options:T,g_objZoomSlider:t}},this.getObjZoom=function(){return t},this.getOptions=function(){return T},this.getElement=function(){return a},this.getVideoObject=function(){return y},this.isCurrentSlideImageFit=function(){var e=h.getCurrentSlide();h.getSlideType(e);!function(e,t){if(null==t&&(t=h.getCurrentSlide()),(t=h.getSlideType(t))!=e)throw new Error("Wrong slide type: "+t+", should be: "+e)}("image",e);e=h.getSlideImage(e);return 0!=e.length&&w.isImageFitParent(e)},this.isCurrentImageInPlace=function(){var e=h.getSlideImage();if(0==e.length)return!1;var t=h.getScaleMode(),i=h.getObjImagePadding(),n=he(),r=e.parent(),t=w.getImageInsideParentData(r,n.imageWidth,n.imageHeight,t,i),i=w.getElementSize(e),e=!1;return t.imageWidth==i.width&&(e=!0),e},this.isSlideActionActive=function(){return y.isVisible()},this.isSwiping=function(){return!!_&&_.isTouchActive()},this.isPreloading=function(){return!!ge().is(":visible")},this.setOptions=function(e){c&&(e=w.convertCustomPrefixOptions(e,c,"slider")),T=jQuery.extend(T,e)},this.setSize=function(e,t){if(e<0||t<0)return!0;var i={};i.width=e+"px",i.height=t+"px",a.css(i);var n={};n.height=t+"px",n.top="0px",n.left="0px",l.css(n);var r={};r.height=t+"px",r.width=e+"px",s.css(r),u.css(r),d.css(r);i=e-T.slider_item_padding_left-T.slider_item_padding_right,n=t-T.slider_item_padding_top-T.slider_item_padding_bottom,r={};r.width=i+"px",r.height=n+"px",r.top=T.slider_item_padding_top+"px",r.left=T.slider_item_padding_left+"px",a.find(".ug-item-wrapper").css(r),E&&E.setSizeByParent(),M(),z(s),z(u),z(d),O(),"image"!=h.getSlideType()&&1==T.slider_video_constantsize?B():(e=e-T.slider_video_padding_left-T.slider_video_padding_right,t=t-T.slider_video_padding_top-T.slider_video_padding_bottom,y.setSize(e,t)),W()},this.refreshSlideItems=function(){if(1==h.isAnimating())return!0;z(s),z(u),z(d),O()},this.isMouseOver=function(){return a.ismouseover()},this.setPosition=function(e,t){w.placeElement(a,e,t)},this.zoomIn=function(){if(!t)return!0;t.zoomIn()},this.zoomOut=function(){if(!t)return!0;t.zoomOut()},this.zoomBack=function(){if(!t)return!0;t.zoomBack()}}function UGTextPanel(){var r,n,o,a,s,l,u,d=this,_=new UGFunctions,g="",c={textpanel_align:"bottom",textpanel_margin:0,textpanel_text_valign:"middle",textpanel_padding_top:10,textpanel_padding_bottom:10,textpanel_height:null,textpanel_padding_title_description:5,textpanel_padding_right:11,textpanel_padding_left:11,textpanel_fade_duration:200,textpanel_enable_title:!0,textpanel_enable_description:!0,textpanel_title_as_link:!1,textpanel_title_link_newtab:!0,textpanel_enable_bg:!0,textpanel_bg_color:"#000000",textpanel_bg_opacity:.4,textpanel_title_color:null,textpanel_title_font_family:null,textpanel_title_text_align:null,textpanel_title_font_size:null,textpanel_title_bold:null,textpanel_css_title:{},textpanel_desc_color:null,textpanel_desc_font_family:null,textpanel_desc_text_align:null,textpanel_desc_font_size:null,textpanel_desc_bold:null,textpanel_css_description:{},textpanel_desc_style_as_title:!1,textpanel_bg_css:{}},h={isFirstTime:!0,setInternalHeight:!0,lastTitleBottom:0,lastDescHeight:0};function i(e,t){var i=t=t||c.textpanel_padding_top;o&&(_.placeElement(o,0,i),1==o.is(":visible")?0<(i=_.getElementSize(o).bottom)&&(h.lastTitleBottom=i):(i=20,0<h.lastTitleBottom&&(i=h.lastTitleBottom)));var n,t="";a&&(t=jQuery.trim(a.text())),""!=t&&(t=i,o&&(t+=c.textpanel_padding_title_description),_.placeElement(a,0,t),1==jQuery(a).is(":visible")?(i=(n=_.getElementSize(a)).bottom,0<n.height&&(h.lastDescHeight=n.height)):(n=16,0<h.lastDescHeight&&(n=h.lastDescHeight),i=t+n)),c.textpanel_height||1!=h.setInternalHeight||(i=i+c.textpanel_padding_bottom,i=i,1==(e=(e=e)||!1)?(s&&s.height()<i&&s.height(i),e={height:i+"px"},r.add(l).animate(e,c.textpanel_fade_duration)):(s&&s.height(i),r.add(l).height(i)))}function p(){var e,t=0;return o&&(t+=o.outerHeight()),a&&(e="",a&&(e=jQuery.trim(a.text())),""!=e&&(o&&(t+=c.textpanel_padding_title_description),t+=a.outerHeight())),t}function m(){var e,t;1==c.textpanel_enable_bg&&((s=r.children(".ug-textpanel-bg")).fadeTo(0,c.textpanel_bg_opacity),e={"background-color":c.textpanel_bg_color},e=jQuery.extend(e,c.textpanel_bg_css),s.css(e)),1==c.textpanel_enable_title&&(o=l.children(".ug-textpanel-title"),t={},null!==c.textpanel_title_color&&(t.color=c.textpanel_title_color),null!==c.textpanel_title_font_family&&(t["font-family"]=c.textpanel_title_font_family),null!==c.textpanel_title_text_align&&(t["text-align"]=c.textpanel_title_text_align),null!==c.textpanel_title_font_size&&(t["font-size"]=c.textpanel_title_font_size+"px"),null!==c.textpanel_title_bold&&(!0===c.textpanel_title_bold?t["font-weight"]="bold":t["font-weight"]="normal"),c.textpanel_css_title&&(t=jQuery.extend(t,c.textpanel_css_title)),o.css(t)),1==c.textpanel_enable_description&&(a=l.children(".ug-textpanel-description"),t={},null!==c.textpanel_desc_color&&(t.color=c.textpanel_desc_color),null!==c.textpanel_desc_font_family&&(t["font-family"]=c.textpanel_desc_font_family),null!==c.textpanel_desc_text_align&&(t["text-align"]=c.textpanel_desc_text_align),null!==c.textpanel_desc_font_size&&(t["font-size"]=c.textpanel_desc_font_size+"px"),null!==c.textpanel_desc_bold&&(!0===c.textpanel_desc_bold?t["font-weight"]="bold":t["font-weight"]="normal"),c.textpanel_css_title&&(t=jQuery.extend(t,c.textpanel_css_description)),a.css(t))}function e(){var e=u.getSelectedItem();d.setText(e.title,e.description,e.link)}this.positionElements=function(e){if(!c.textpanel_height||"top"==c.textpanel_text_valign)return i(e),!1;switch(c.textpanel_text_valign){default:case"top":i(!1);break;case"bottom":t=p(),i(!1,l.height()-t-c.textpanel_padding_bottom);break;case"center":case"middle":t=p(),i(!1,(l.height()-t)/2)}var t},this.init=function(e,t,i){if(u=e,i&&(g=i,t=_.convertCustomPrefixOptions(t,g,"textpanel")),t&&(c=jQuery.extend(c,t)),0==c.textpanel_enable_title&&0==c.textpanel_enable_description)throw new Error("Textpanel Error: The title or description must be enabled");c.textpanel_height&&c.textpanel_height<0&&(c.textpanel_height=null),1==c.textpanel_desc_style_as_title&&(c.textpanel_desc_color||(c.textpanel_desc_color=c.textpanel_title_color),c.textpanel_desc_bold||(c.textpanel_desc_bold=c.textpanel_title_bold),c.textpanel_desc_font_family||(c.textpanel_desc_font_family=c.textpanel_title_font_family),c.textpanel_desc_font_size||(c.textpanel_desc_font_size=c.textpanel_title_font_size),c.textpanel_desc_text_align||(c.textpanel_desc_text_align=c.textpanel_title_text_align))},this.appendHTML=function(e,t){n=e;var i="<div class='ug-textpanel"+(t=t?" "+t:"")+"'>";1==c.textpanel_enable_bg&&(i+="<div class='ug-textpanel-bg"+t+"'></div>"),i+="<div class='ug-textpanel-textwrapper"+t+"'>",1==c.textpanel_enable_title&&(i+="<div class='ug-textpanel-title"+t+"'></div>"),1==c.textpanel_enable_description&&(i+="<div class='ug-textpanel-description"+t+"'></div>"),i+="</div></div>",e.append(i),r=e.children(".ug-textpanel"),l=r.children(".ug-textpanel-textwrapper"),m()},this.destroy=function(){jQuery(u).off(u.events.ITEM_CHANGE)},this.run=function(){d.setSizeByParent(),jQuery(u).on(u.events.ITEM_CHANGE,e)},this.setPanelSize=function(e,t){h.setInternalHeight=!0,t?h.setInternalHeight=!1:t=80,c.textpanel_height&&(t=c.textpanel_height),r.width(e),r.height(t),s&&(s.width(e),s.height(t));var i=e-c.textpanel_padding_left-c.textpanel_padding_right,e=c.textpanel_padding_left;_.setElementSizeAndPosition(l,e,0,i,t),o&&o.width(i),a&&a.width(i),0==h.isFirstTime&&d.positionElements(!1)},this.setSizeByParent=function(){var e=_.getElementSize(n);d.setPanelSize(e.width)},this.setTextPlain=function(e,t,i){var n;1==c.textpanel_title_as_link&&e&&i&&(n="",1==c.textpanel_title_link_newtab&&(n+=' target="blank"'),e='<a class="ug-textpanel-link" href="'+i+'" '+n+">"+e+"</a>"),o&&o.html(e),a&&a.html(t)},this.setText=function(e,t,i){1==h.isFirstTime?(d.setTextPlain(e,t,i),h.isFirstTime=!1,d.positionElements(!1)):l.stop().fadeTo(c.textpanel_fade_duration,0,function(){d.setTextPlain(e,t,i),d.positionElements(!0),jQuery(this).fadeTo(c.textpanel_fade_duration,1)})},this.positionPanel=function(e,t){var i={};if(null!=e)i.top=e,i.bottom="auto";else switch(c.textpanel_align){case"top":i.top=c.textpanel_margin+"px";break;case"bottom":i.top="auto",i.bottom=c.textpanel_margin+"px";break;case"middle":i.top=_.getElementRelativePos(r,"middle",c.textpanel_margin)}null!=t&&(i.left=t),r.css(i)},this.setOptions=function(e){g&&(e=_.convertCustomPrefixOptions(e,g,"textpanel")),c=jQuery.extend(c,e)},this.getElement=function(){return r},this.getSize=function(){return _.getElementSize(r)},this.refresh=function(e,t,i,n){m(),i?d.setPanelSize(i,n):d.setSizeByParent(),d.positionElements(!1),!0!==t&&d.positionPanel(),!0===e&&d.show()},this.hide=function(){r.hide()},this.show=function(){r.show()},this.getOptions=function(){return c},this.getOption=function(e){return 0==c.hasOwnProperty(e)?null:c[e]}}function UGZoomButtonsPanel(){var i,n,r,o,a=new UGSlider,e=new UGFunctions,s={slider_zoompanel_skin:""};function t(e){return!e||!!e.hasClass("ug-zoompanel-button-disabled")}function l(e){e&&e.addClass("ug-zoompanel-button-disabled")}function u(e){e&&e.removeClass("ug-zoompanel-button-disabled")}function d(){if(0==a.isCurrentSlideType("image"))return!0;1==a.isCurrentSlideImageFit()?0==t(r)&&(l(r),l(o)):1==t(r)&&(u(r),u(o))}this.init=function(e,t){a=e,t&&(s=jQuery.extend(s,t))},this.appendHTML=function(e){0;var t="<div class='ug-slider-control ug-zoompanel ug-skin-"+s.slider_zoompanel_skin+"'>";t+="<div class='ug-zoompanel-button ug-zoompanel-plus'></div>",t+="<div class='ug-zoompanel-button ug-zoompanel-minus ug-zoompanel-button-disabled'></div>",t+="<div class='ug-zoompanel-button ug-zoompanel-return ug-zoompanel-button-disabled'></div>",t+="</div>",e.append(t),i=e.children(".ug-zoompanel"),n=i.children(".ug-zoompanel-plus"),r=i.children(".ug-zoompanel-minus"),o=i.children(".ug-zoompanel-return")},this.setObjects=function(e,t,i){n=e,o=i,(r=t)&&r.addClass("ug-zoompanel-button-disabled"),o&&o.addClass("ug-zoompanel-button-disabled")},this.getElement=function(){return i},this.initEvents=function(){e.addClassOnHover(n,"ug-button-hover"),e.addClassOnHover(r,"ug-button-hover"),e.addClassOnHover(o,"ug-button-hover"),e.setButtonOnClick(n,function(){return 1==t(n)||void a.zoomIn()}),e.setButtonOnClick(r,function(){return 1==t(r)||void a.zoomOut()}),e.setButtonOnClick(o,function(){return 1==t(o)||void a.zoomBack()}),jQuery(a).on(a.events.ZOOM_CHANGE,d),jQuery(a).on(a.events.ITEM_CHANGED,d)}}function UGBullets(){var r,o,t=this,a=0,n=new UniteGalleryMain,i=new UGFunctions,s={isInited:!1},l={bullets_size:"",bullets_color:"",bullets_color_reverse:!1,bullets_addclass:"",bullets_space_between:-1};function u(){var e="",t="";-1!=l.bullets_space_between&&(t=" style='margin-left:"+l.bullets_space_between+"px'");for(var i,n=0;n<a;n++)e+=0==n?"<div class='ug-bullet'></div>":"<div class='ug-bullet'"+t+"></div>";r.html(e),o||(i=r.find(".ug-bullet:first-child")).length&&(o=i.width()),""!=l.bullets_size&&r.children(".ug-bullet").css({width:l.bullets_size+"px",height:l.bullets_size+"px"})}function d(e){if(1==t.isActive(e))return!0;e=e.index();jQuery(t).trigger(t.events.BULLET_CLICK,e)}function _(){var e=r.children(".ug-bullet");i.setButtonOnClick(e,d),e.on("mousedown mouseup",function(e){return!1})}function g(e){if(e<0||a<=e)throw new Error("wrong bullet index: "+e)}function c(){if(1==s.isInited)return 1;throw new Error("The bullets are not inited!")}this.events={BULLET_CLICK:"bullet_click"},this.init=function(e,t,i){n=e,a=i||n.getNumItems(),s.isInited=!0,l=jQuery.extend(l,t)},this.getBulletsWidth=function(){return 0!=a&&o?a*o+(a-1)*l.bullets_space_between:0},this.appendHTML=function(e){c();var t="";""!=l.bullets_addclass&&(t=" "+l.bullets_addclass);t="<div class='ug-slider-control ug-bullets ug-skin-"+t+"'>";t+="</div>",r=jQuery(t),e.append(r),u(),_()},this.updateNumBullets=function(e){a=e,u(),_()},this.getElement=function(){return r},this.setActive=function(e){c(),g(e);var t=r.children(".ug-bullet");t.removeClass("ug-bullet-active");t=jQuery(t[e]);if(t.addClass("ug-bullet-active"),!t.hasClass("ug-bullet-active"))return!1;!function(e){if(1==l.bullets_color_reverse){if(""!=l.bullets_color)return r.children(".ug-bullet").css({"background-color":l.bullets_color,"border-color":l.bullets_color}),e.css({"background-color":"transparent"});var t=e.css("background-color");return r.children(".ug-bullet").css({"background-color":t,"border-color":t}),e.css({"background-color":"transparent"})}""!=l.bullets_color&&(r.children(".ug-bullet").css({"background-color":"","border-color":l.bullets_color}),e.css({"background-color":l.bullets_color}))}(t)},this.isActive=function(e){return g(e),!!("number"!=typeof e?e:r.children(".ug-bullet")[e]).hasClass("ug-bullet-active")},this.getNumBullets=function(){return a}}function UGProgressBar(){var r,i,n=this,t=0,o=new UGFunctions,a={slider_progressbar_color:"#ffffff",slider_progressbar_opacity:.6,slider_progressbar_line_width:5};this.put=function(e,t){t&&(a=jQuery.extend(a,t)),e.append("<div class='ug-progress-bar'><div class='ug-progress-bar-inner'></div></div>"),r=e.children(".ug-progress-bar"),(i=r.children(".ug-progress-bar-inner")).css("background-color",a.slider_progressbar_color),r.height(a.slider_progressbar_line_width),i.height(a.slider_progressbar_line_width),i.width("0%");t=a.slider_progressbar_opacity,e=i[0];e.style.opacity=t,e.style.filter="alpha(opacity="+100*t+")"},this.putHidden=function(e,t){n.put(e,t),r.hide()},this.getElement=function(){return r},this.setSize=function(e){r.width(e),i.width(e),n.draw()},this.setPosition=function(e,t,i,n){o.placeElement(r,e,t,i,n)},this.draw=function(){var e=100*t;i.width(e+"%")},this.setProgress=function(e){t=o.normalizePercent(e),n.draw()},this.getType=function(){return"bar"}}function UGProgressPie(){var s,i=this,l=!1,n=new UGFunctions,u={slider_progresspie_type_fill:!1,slider_progresspie_color1:"#B5B5B5",slider_progresspie_color2:"#E5E5E5",slider_progresspie_stroke_width:6,slider_progresspie_width:30,slider_progresspie_height:30};function r(e){e=e||0;var t=Math.min(u.slider_progresspie_width,u.slider_progresspie_height)/2,i=s[0].getContext("2d");0==l&&(l=!0,i.rotate(1.5*Math.PI),i.translate(-2*t,0)),i.clearRect(0,0,u.slider_progresspie_width,u.slider_progresspie_height);var n=u.slider_progresspie_width/2,r=u.slider_progresspie_height/2,o=0,a=e*Math.PI*2;1==u.slider_progresspie_type_fill?(i.beginPath(),i.moveTo(n,r),i.arc(n,r,t,o,a)):(i.globalCompositeOperation="source-over",i.beginPath(),i.moveTo(n,r),i.arc(n,r,t,o,a),i.lineTo(n,r),i.fillStyle=u.slider_progresspie_color1,i.fill(),i.closePath(),i.globalCompositeOperation="destination-out",e=t-u.slider_progresspie_stroke_width,i.beginPath(),i.moveTo(n,r),i.arc(n,r,e,o,a)),i.lineTo(n,r),i.fillStyle=u.slider_progresspie_color1,i.fill(),i.closePath(),1==u.slider_progresspie_type_fill&&(o=a,a=2*Math.PI,i.beginPath(),i.arc(n,r,t,o,a),i.lineTo(n,r),i.fillStyle=u.slider_progresspie_color2,i.fill(),i.closePath())}this.put=function(e,t){t&&(u=jQuery.extend(u,t)),e.append("<canvas class='ug-canvas-pie' width='"+u.slider_progresspie_width+"' height='"+u.slider_progresspie_height+"'></canvas>"),s=e.children(".ug-canvas-pie")},this.putHidden=function(e,t){i.put(e,t),r(.1),s.hide()},this.getElement=function(){return s},this.setPosition=function(e,t){n.placeElement(s,e,t)},this.getSize=function(){return{width:u.slider_progresspie_width,height:u.slider_progresspie_height}},this.setProgress=function(e){e=n.normalizePercent(e),r(e)},this.getType=function(){return"pie"}}function UGTouchSliderControl(){var r,o,a,i,s=new UGSlider,l=new UGFunctions,u={slider_transition_continuedrag_speed:250,slider_transition_continuedrag_easing:"linear",slider_transition_return_speed:300,slider_transition_return_easing:"easeInOutQuad"},d={touch_active:!1,startMouseX:0,startMouseY:0,lastMouseX:0,lastMouseY:0,startPosx:0,startTime:0,isInitDataValid:!1,slides:null,lastNumTouches:0,isDragging:!1,storedEventID:"touchSlider",videoStartX:0,isDragVideo:!1,videoObject:null};function _(e){return e=e||s.getSlidesReference(),-l.getElementSize(e.objCurrentSlide).left-l.getElementSize(o).left}function g(e){var r;1!=s.isInnerInPlace()&&(a.trigger(s.events.BEFORE_RETURN),e=e||s.getSlidesReference(),r=-l.getElementSize(e.objCurrentSlide).left,o.animate({left:r+"px"},{duration:u.slider_transition_return_speed,easing:u.slider_transition_continuedrag_easing,queue:!1,progress:function(e,t,i){var n;1==d.isDragVideo&&(n=l.getElementSize(o).left-r,n=d.videoStartX+n,d.videoObject.css("left",n))},complete:function(){a.trigger(s.events.AFTER_RETURN)}}))}function c(){var e=s.getSlidesReference(),t=_(e);if(0!=t){var i,n=0<t?"left":"right",r=!1;switch(n){case"right":s.isSlideHasItem(e.objPrevSlide)?i=-l.getElementSize(e.objPrevSlide).left:r=!0;break;case"left":s.isSlideHasItem(e.objNextSlide)?i=-l.getElementSize(e.objNextSlide).left:r=!0}1==r?g(e):o.stop().animate({left:i+"px"},{duration:u.slider_transition_continuedrag_speed,easing:u.slider_transition_continuedrag_easing,queue:!1,progress:function(){var e;1==d.isDragVideo&&(e=l.getElementSize(o).left-d.startPosx,e=d.videoStartX+e,d.videoObject.css("left",e))},always:function(){var e;e=n,s.getVideoObject().hide(),s.switchSlideNums(e),s.placeNabourItems(),a.trigger(s.events.AFTER_DRAG_CHANGE)}})}}function h(e){var t=l.getMousePosition(e);d.startMouseX=t.pageX,d.startMouseY=t.pageY,d.lastMouseX=d.startMouseX,d.lastMouseY=d.startMouseY,d.startTime=jQuery.now();t=l.getArrTouches(e);d.startArrTouches=l.getArrTouchPositions(t);t=l.getElementSize(o);d.startPosx=t.left,d.isInitDataValid=!0,d.isDragVideo=!1,l.storeEventData(e,d.storedEventID)}function p(){d.touch_active=!1}function m(e,t){d.touch_active=!0,h(t)}function n(e){return e.preventDefault(),d.isDragging=!1,1==s.isAnimating()&&o.stop(!0,!0),1<l.getArrTouches(e).length?(1==d.touch_active&&p(),!0):1==d.touch_active||void m(0,e)}function f(e){if(0==d.touch_active)return!0;if(0==e.buttons)return p(),c(),!0;l.updateStoredEventData(e,d.storedEventID),e.preventDefault();var t=l.getMousePosition(e);d.lastMouseX=t.pageX,d.lastMouseY=t.pageY;t=null;1==u.slider_vertical_scroll_ondrag&&(t=l.handleScrollTop(d.storedEventID)),"vert"!==t&&function(e){var t=d.lastMouseX-d.startMouseX;if(0!=t){var i=t<0?"left":"right",n=s.getObjZoom();if(n){if(1==n.isPanEnabled(e,i))return d.isInitDataValid=!1;if(0==d.isInitDataValid)return h(e)}e=d.startPosx+t,0<t&&0<e?e/=3:t<0&&e+o.width()<r.width()&&(e=d.startPosx+t/3),0==d.isDragging&&(d.isDragging=!0,a.trigger(s.events.START_DRAG)),o.css("left",e+"px"),1==d.isDragVideo&&(e=e-d.startPosx,e=d.videoStartX+e,d.videoObject.css("left",e))}}(e)}function b(e){var t,i,n,r=l.getArrTouches(e).length;if(1==s.isInnerInPlace()&&0==d.touch_active&&0==r)return!0;0==r&&1==d.touch_active?(p(),t=!1,0==l.wasVerticalScroll(d.storedEventID)&&(i=_(n=s.getSlidesReference()),n=Math.round(3*n.objCurrentSlide.width()/8),t=Math.abs(i)>=n||(n=Math.abs(d.lastMouseX-d.startMouseX),Math.abs(d.lastMouseY-d.startMouseY),!(n<20)&&jQuery.now()-d.startTime<500)),(1==t?c:g)()):1==r&&0==d.touch_active&&m(0,e)}this.isTapEventOccured=function(e){var t=l.getArrTouches(e).length;if(0!=t||0!=d.lastNumTouches)return d.lastNumTouches=t,!1;d.lastNumTouches=t;_(s.getSlidesReference());var i=Math.abs(d.lastMouseX-d.startMouseX),e=Math.abs(d.lastMouseY-d.startMouseY),t=jQuery.now()-d.startTime;return i<20&&e<50&&t<500},this.init=function(e,t){s=e,a=jQuery(s),i=e.getObjects(),r=i.g_objSlider,o=i.g_objInner,u=jQuery.extend(u,t),r.bind("mousedown touchstart",n),jQuery("body").bind("mousemove touchmove",f),jQuery(window).add("body").bind("mouseup touchend",b)},this.getLastMousePos=function(){return{pageX:d.lastMouseX,pageY:d.lastMouseY}},this.isTouchActive=function(){return d.touch_active}}function UGZoomSliderControl(){var i,s,n,l=new UGSlider,u=new UGFunctions,d={slider_zoom_step:1.2,slider_zoom_max_ratio:6,slider_zoom_return_pan_duration:400,slider_zoom_return_pan_easing:"easeOutCubic"},_={isPanActive:!1,startMouseX:0,startMouseY:0,lastMouseX:0,lastMouseY:0,startImageX:0,startImageY:0,panXActive:!1,panYActive:!1,objImage:null,objImageSize:null,objParent:null,objParentSize:null,objSlide:null,storeImageLastTime:0,isZoomActive:!1,startDistance:0,startMiddlePoint:null,imageOrientPoint:null,objFitImageSize:null,isZoomedOnce:!1};function r(e,t){l=e,s=jQuery(l),n=e.getObjects(),i=n.g_objSlider,n.g_objInner,d=jQuery.extend(d,t),i.on("mousewheel",w),i.bind("mousedown touchstart",b),jQuery("body").bind("mousemove touchmove",y),jQuery(window).add("body").bind("mouseup touchend",v),s.bind(l.events.BEFORE_RETURN,function(){f()}),s.bind(l.events.ITEM_CHANGED,function(){_.isZoomedOnce=!1}),s.bind(l.events.ZOOM_CHANGE,function(){_.isZoomedOnce=!0})}function g(){var e=l.getScaleMode();return"down"!=e&&(e="fit"),e}function o(){if((i=jQuery.now())-_.storeImageLastTime<20)return!1;var e=l.getSlidesReference();if(_.objSlide=e.objCurrentSlide,_.objImage=e.objCurrentSlide.find("img"),0==_.objImage.length)return!1;_.objImageSize=u.getElementSize(_.objImage),_.objParent=_.objImage.parent(),_.objParentSize=u.getElementSize(_.objParent);var t=g(),e=l.getObjImagePadding();_.objFitImageSize=u.getImageInsideParentDataByImage(_.objImage,t,e);var i=jQuery.now();return _.storeImageLastTime=i,!0}function a(e,t){var i=l.getSlidesReference().objCurrentSlide.find("img"),n=g();s.trigger(l.events.ZOOM_START);var r,o=!0,a=l.getObjImagePadding();"back"==e?(r=u.getImageOriginalSize(i),u.scaleImageFitParent(i,r.width,r.height,n,a)):(e="in"==e,o=u.zoomImageInsideParent(i,e,d.slider_zoom_step,t,n,d.slider_zoom_max_ratio,a)),1==o&&(s.trigger(l.events.ZOOMING),s.trigger(l.events.ZOOM_CHANGE),s.trigger(l.events.ZOOM_END))}function c(e,t,i){t=u.getArrTouches(t);if(!0===i){if(1!=t.length)return!1}else if(1<t.length)return!1;return!!u.isElementBiggerThenParent(e)}function h(e){_.isPanActive=!0,e=e,e=u.getMousePosition(e),_.startMouseX=e.pageX,_.startMouseY=e.pageY,_.lastMouseX=_.startMouseX,_.lastMouseY=_.startMouseY,_.startImageX=_.objImageSize.left,_.startImageY=_.objImageSize.top,_.panXActive=_.objImageSize.width>_.objParentSize.width,_.panYActive=_.objImageSize.height>_.objParentSize.height}function p(e){0!=_.isZoomActive&&2!=u.getArrTouches(e).length&&(_.isZoomActive=!1,s.trigger(l.events.ZOOM_END))}function m(e){if(1==_.isZoomActive)return 1;e=u.getArrTouches(e);if(2!=e.length)return 1;e=e,_.isZoomActive=!0,_.startDistance=u.getDistance(e[0].pageX,e[0].pageY,e[1].pageX,e[1].pageY),0==_.startDistance&&(_.startDistance=1),_.startMiddlePoint=u.getMiddlePoint(e[0].pageX,e[0].pageY,e[1].pageX,e[1].pageY),_.objImageSize=u.getElementSize(_.objImage),_.startImageX=_.objImageSize.left,_.startImageY=_.objImageSize.top,_.imageOrientPoint=u.getElementLocalPoint(_.startMiddlePoint,_.objImage),0==u.isPointInsideElement(_.imageOrientPoint,_.objImageSize)&&(_.imageOrientPoint=u.getElementCenterPoint(_.objImage)),s.trigger(l.events.ZOOM_START)}function f(){if(null==_.objImage||0==_.objImage.length)return 1;var e,t,i,n,r,o;u.getElementSize(_.objImage).width<_.objFitImageSize.imageWidth?(_.objImage.css({position:"absolute",margin:"none"}),o={top:_.objFitImageSize.imageTop+"px",left:_.objFitImageSize.imageLeft+"px",width:_.objFitImageSize.imageWidth+"px",height:_.objFitImageSize.imageHeight+"px"},_.objImage.animate(o,{duration:d.slider_zoom_return_pan_duration,easing:d.slider_zoom_return_pan_easing,queue:!1})):(t=e=!1,n=i=0,r=u.getElementSize(_.objImage),o=l.getObjImagePadding(),o=u.getElementCenterPosition(_.objImage,o),_.panXActive=_.objImageSize.width>_.objParentSize.width,_.panYActive=_.objImageSize.height>_.objParentSize.height,1==_.panYActive?0<r.top?t=!(n=0):r.bottom<_.objParentSize.height&&(n=_.objParentSize.height-r.height,t=!0):r.top!=o.top&&(t=!0,n=o.top),1==_.panXActive?0<r.left?e=!(i=0):r.right<_.objParentSize.width&&(i=_.objParentSize.width-r.width,e=!0):r.left!=o.left&&(e=!0,i=o.left),o={},1==t&&(o.top=n+"px"),1==e&&(o.left=i+"px"),1!=t&&1!=e||_.objImage.animate(o,{duration:d.slider_zoom_return_pan_duration,easing:d.slider_zoom_return_pan_easing,queue:!1}))}function b(e){if(0==l.isCurrentSlideType("image"))return!0;o();if(null==_.objImage||0==_.objImage.length)return!0;e.preventDefault(),1==!(!_.objImage||!_.objImage.is(":animated"))&&_.objImage.stop(!0),(1==_.isZoomActive?p:m)(e),1==_.isZoomActive?_.isPanActive=!1:1==c(_.objImage,e)&&1==_.isZoomedOnce&&h(e)}function v(e){if(0==l.isCurrentSlideType("image"))return!0;if(1==jQuery(e.target).data("ug-button"))return!1;o();if(null==_.objImage||0==_.objImage.length)return!0;var t,i=_.isPanActive,n=_.isZoomActive;if(0==l.isInnerInPlace())return _.isZoomActive=!1,!(_.isPanActive=!1);(1==_.isZoomActive?p:m)(e),1==_.isZoomActive?_.isPanActive=!1:(t=c(_.objImage,e,!0),1==_.isPanActive?_.isPanActive=!1:1==t&&h(e)),(i||n)&&0==_.isZoomActive&&0==_.isPanActive&&f()}function y(e){if(0==l.isCurrentSlideType("image"))return!0;var t,i,n,r,o,a;1==_.isZoomActive?(t=e,i=u.getArrTouches(t),n=u.getDistance(i[0].pageX,i[0].pageY,i[1].pageX,i[1].pageY)/_.startDistance,r=u.getMiddlePoint(i[0].pageX,i[0].pageY,i[1].pageX,i[1].pageY),o=_.objImageSize.width*n,a=_.objImageSize.height*n,t=u.getImageOriginalSize(_.objImage),i=1,0<t.width&&(i=o/t.width),i>d.slider_zoom_max_ratio||(panX=-(_.imageOrientPoint.x*n-_.imageOrientPoint.x),panY=-(_.imageOrientPoint.y*n-_.imageOrientPoint.y),n=r.x-_.startMiddlePoint.x,r=r.y-_.startMiddlePoint.y,n=_.startImageX+panX+n,r=_.startImageY+panY+r,u.setElementSizeAndPosition(_.objImage,n,r,o,a),s.trigger(l.events.ZOOMING),s.trigger(l.events.ZOOM_CHANGE))):1==_.isPanActive&&(n=e,null!=_.objImage&&0!=_.objImage.length&&((r=u.getMousePosition(n)).pageX,_.startMouseX,r.pageY,_.startMouseY,o=r.pageX-_.lastMouseX,a=r.pageY-_.lastMouseY,e=o<0?"left":"right",n=a<0?"up":"down",_.lastMouseX=r.pageX,_.lastMouseY=r.pageY,r=u.getElementSize(_.objImage),0==_.panYActive?a=0:("down"==n&&0<r.top||"up"==n&&r.bottom<_.objParentSize.height)&&(a/=3),0==_.panXActive||0==l.isInnerInPlace()?o=0:("right"==e&&0<r.left||"left"==e&&r.right<_.objParentSize.width)&&(o/=3),o=r.left+o,a=r.top+a,u.placeElement(_.objImage,o,a)))}function w(e,t,i,n){return 0==d.slider_zoom_mousewheel||(0==l.isCurrentSlideType("image")||(e.preventDefault(),void a(1==0<t?"in":"out",u.getMousePosition(e))))}this.________EXTERNAL_____________=function(){},this.isPanEnabled=function(e,t){if(o(),null==_.objImage||0==_.objImage.length)return!1;if(0==_.isZoomedOnce)return!1;if(0==c(_.objImage,e))return!1;if(0==l.isInnerInPlace())return!1;if("left"==t){if(_.objImageSize.right<=_.objParentSize.width)return!1}else if(0<=_.objImageSize.left)return!1;return!0},this.init=function(e,t){r(e,t)},this.zoomIn=function(){a("in")},this.zoomOut=function(){a("out")},this.zoomBack=function(){a("back")}}function UGWistiaAPI(){this.isAPILoaded=!1;var a,s,l=this,u=jQuery(this),d=!1;function _(){return"undefined"!=typeof Wistia}function g(e,t,i,n,r){s=null,d=!1;var o=e+"_video",a="<div id='"+o+"' class='wistia_embed' style='width:"+i+";height:"+n+";' data-video-width='"+i+"' data-video-height='"+n+"'>&nbsp;</div>";jQuery("#"+e).html(a),s=Wistia.embed(t,{version:"v1",videoWidth:i,videoHeight:n,container:o,autoPlay:r}),d=!0,s.bind("play",function(){u.trigger(l.events.START_PLAYING)}),s.bind("pause",function(){u.trigger(l.events.STOP_PLAYING)}),s.bind("end",function(){u.trigger(l.events.STOP_PLAYING),u.trigger(l.events.VIDEO_ENDED)})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(e){return 1==g_ugWistiaAPI.isAPILoaded||(_()?g_ugWistiaAPI.isAPILoaded=!0:(!0!==e&&g_ugFunctions.loadJs("fast.wistia.com/assets/external/E-v1.js",!0),void(g_ugWistiaAPI.isAPILoaded=!0)))},this.doCommand=function(e){if(null==s)return!1;if(0==d)return!1;switch(e){case"play":s.play();break;case"pause":s.pause()}},this.pause=function(){l.doCommand("pause")},this.play=function(){l.doCommand("play")},this.putVideo=function(e,t,i,n,r,o){if(_())return g(e,t,i,n,r),!0;this.loadAPI(),a=setInterval(function(){_()&&(g(e,t,i,n,r),clearInterval(a))},500)},this.isPlayerReady=function(){return!(!d||!s)}}function UGSoundCloudAPI(){this.isAPILoaded=!1;var o,a,s,l,u=this,d=jQuery(this);function _(){return"undefined"!=typeof SC}function g(e,t,i,n,r){a=null,l=!1;var o=e+"_iframe",t=location.protocol+"//w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/"+t;t+="&amp;buying=false&amp;liking=false&amp;download=false&amp;sharing=false&amp;show_artwork=true&show_comments=false&amp;show_playcount=true&amp;show_user=false&amp;hide_related=true&amp;visual=true&amp;start_track=0&amp;callback=true";n="<iframe id='"+o+"' src="+(t+=!0===r?"&amp;auto_play=true":"&amp;auto_play=false")+" width='"+i+"' height='"+n+"' frameborder='0' scrolling='no' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";jQuery("#"+e).html(n),(a=SC.Widget(o)).bind(SC.Widget.Events.READY,function(){a&&(l=!0,a.bind(SC.Widget.Events.PLAY,function(){d.trigger(u.events.START_PLAYING)}),a.bind(SC.Widget.Events.PAUSE,function(){d.trigger(u.events.STOP_PLAYING)}),a.bind(SC.Widget.Events.FINISH,function(){d.trigger(u.events.STOP_PLAYING),d.trigger(u.events.VIDEO_ENDED)}))}),s=e}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(e){return 1==g_ugSoundCloudAPI.isAPILoaded||(_()?g_ugSoundCloudAPI.isAPILoaded=!0:(!0!==e&&g_ugFunctions.loadJs("w.soundcloud.com/player/api.js",!0),void(g_ugSoundCloudAPI.isAPILoaded=!0)))},this.putSound=function(e,t,i,n,r){if(_())return g(e,t,i,n,r),!0;this.loadAPI(),o=setInterval(function(){_()&&(g(e,t,i,n,r),clearInterval(o))},500)},this.doCommand=function(e){if(null==a)return!1;if(0==l)return!1;switch(e){case"play":a.play();break;case"pause":a.pause()}},this.pause=function(){u.doCommand("pause")},this.play=function(){u.doCommand("play")},this.destroy=function(){l=!1,a=null,s&&(jQuery("#"+s).html(""),s=null)}}function UGHtml5MediaAPI(){this.isAPILoaded=!1;var o,d,_,g=this,c=jQuery(this);function a(){return"undefined"!=typeof mejs}function s(e,t,i,n,r){d=null,_=!1;var o=location.protocol+"//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/flashmediaelement-cdn.swf",a=location.protocol+"//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/silverlightmediaelement.xap",s=e+"_video",l="";r&&!0===r&&(l="autoplay='autoplay'");var u="";t.posterImage&&(u="poster='"+t.posterImage+"'");u="<video id='"+s+"' width='"+i+"' height='"+n+"' controls='controls' controlsList='nodownload' preload='none' "+l+" "+u+">";""!=t.mp4&&(u+="<source type='video/mp4' src='"+t.mp4+"' />"),""!=t.webm&&(u+="<source type='video/webm' src='"+t.webm+"' />"),""!=t.ogv&&(u+="<source type='video/ogg' src='"+t.ogv+"' />"),u+="<object width='"+i+"' height='"+n+"' type='application/x-shockwave-flash' data='"+o+"'>",u+="<param name='movie' value='"+o+"' />",u+="<param name='flashvars' value='controls=true&file="+t.mp4+"' />",u+="</object>",u+="</video>",jQuery("#"+e).html(u),jQuery("#"+s).on("contextmenu",function(){return!1}),new MediaElement(s,{enablePluginDebug:!1,flashName:o,silverlightName:a,success:function(e,t){_=!0,d=e,0==r&&d.pause(),g_ugFunctions.addEvent(d,"play",function(){c.trigger(g.events.START_PLAYING)}),g_ugFunctions.addEvent(d,"pause",function(){c.trigger(g.events.STOP_PLAYING)}),g_ugFunctions.addEvent(d,"ended",function(){c.trigger(g.events.STOP_PLAYING),c.trigger(g.events.VIDEO_ENDED)})},error:function(e){trace(e)}})}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(e){return 1==g_ugHtml5MediaAPI.isAPILoaded||(a()?g_ugHtml5MediaAPI.isAPILoaded=!0:(!0!==e&&(g_ugFunctions.loadJs("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelement.min.js",!0),g_ugFunctions.loadCss("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelementplayer.min.css",!0)),void(g_ugHtml5MediaAPI.isAPILoaded=!0)))},this.putVideo=function(e,t,i,n,r){if(a())return s(e,t,i,n,r),!0;this.loadAPI(),o=setInterval(function(){a()&&(s(e,t,i,n,r),clearInterval(o))},500)},this.doCommand=function(e){if(null==d)return!1;if(0==_)return!1;switch(e){case"play":d.play();break;case"pause":d.pause()}},this.pause=function(){g.doCommand("pause")},this.play=function(){g.doCommand("play")}}function UGVimeoAPI(){this.isAPILoaded=!1;var o,a,s=this,l=jQuery(this),u=null,d=!1,_=!1;function g(){return"object"==typeof Vimeo}function c(e,t,i,n,r){u=null,d=!1;t=location.protocol+"//player.vimeo.com/video/"+t+"?api=1";!0===r&&(t+="&amp;byline=0&amp;autoplay=1&amp;title=0&amp;portrait=0");n="<iframe src="+t+" width='"+i+"' height='"+n+"' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";jQuery("#"+e).html(n);jQuery("#"+e+" iframe")[0];u=new Vimeo.Player(e),d=!0,u&&(u.on("cuechange",function(){1==_&&s.play()}),u.on("play",function(){l.trigger(s.events.START_PLAYING)}),u.on("pause",function(){l.trigger(s.events.STOP_PLAYING)}),u.on("ended",function(){l.trigger(s.events.STOP_PLAYING),l.trigger(s.events.VIDEO_ENDED)})),a=e}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.loadAPI=function(e){return 1==g_ugVimeoAPI.isAPILoaded||1!=g()&&(!0!==e&&g_ugFunctions.loadJs("player.vimeo.com/api/player.js",!0),void(g_ugVimeoAPI.isAPILoaded=!0))},this.doCommand=function(e){if(null==u)return!1;if(0==d)return!1;switch(e){case"pause":u.pause();break;case"play":u.play();break;default:throw new Error("wrong command: "+e)}},this.pause=function(){s.doCommand("pause")},this.play=function(){s.doCommand("play")},this.destroy=function(){u&&(u.unload(),u=null,d=!1),a&&jQuery("#"+a).html("")},this.putVideo=function(e,t,i,n,r){if(g())return c(e,t,i,n,r),!0;this.loadAPI(),o=setInterval(function(){g()&&(c(e,t,i,n,r),clearInterval(o))},500)},this.isPlayerReady=function(){return!(!d||!u)},this.changeVideo=function(e,t){if(0==s.isPlayerReady())return!1;_=t,u.loadVideo(e)},this.getVideoImages=function(e,i,n){e=location.protocol+"//vimeo.com/api/v2/video/"+e+".json";jQuery.get(e,{},function(e){var t={};t.preview=e[0].thumbnail_large,t.thumb=e[0].thumbnail_medium,n(i,t)})}}function UGYoutubeAPI(){this.isAPILoaded=!1;var a,s,i=this,l=null,u=!1,t=jQuery(this),n=-1,d=new UGFunctions,_={video_youtube_showinfo:!0};function g(e,t,i,n,r,o){l&&u&&l.destroy();var a={controls:1,showinfo:_.video_youtube_showinfo,start:0,rel:0};!0===r&&(a.autoplay=1);o=d.getVal(o,"start");o&&jQuery.isNumeric(o)&&(a.start=o),u=!1,l=new YT.Player(e,{height:n,width:i,videoId:t,playerVars:a,events:{onReady:h,onStateChange:p}}),s=e}function c(){return"undefined"!=typeof YT&&void 0!==YT.Player}function h(){u=!0}function p(){if("function"!=typeof l.getPlayerState)return trace("Youtube API error: can't get player state"),!1;var e=l.getPlayerState();switch(e){case YT.PlayerState.PLAYING:t.trigger(i.events.START_PLAYING);break;case YT.PlayerState.ENDED:t.trigger(i.events.STOP_PLAYING),t.trigger(i.events.VIDEO_ENDED);break;default:n==YT.PlayerState.PLAYING&&t.trigger(i.events.STOP_PLAYING)}n=e}this.events={START_PLAYING:"start_playing",STOP_PLAYING:"stop_playing",VIDEO_ENDED:"video_ended"},this.setOptions=function(e){_=jQuery.extend(_,e)},this.putVideo=function(e,t,i,n,r,o){if(c())return g(e,t,i,n,r,o),!0;this.loadAPI(),a=setInterval(function(){c()&&(g(e,t,i,n,r,o),clearInterval(a))},500)},this.loadAPI=function(e){return 1==g_ugYoutubeAPI.isAPILoaded||("undefined"!=typeof YT?g_ugYoutubeAPI.isAPILoaded=!0:(!0!==e&&g_ugFunctions.loadJs("https://www.youtube.com/player_api",!1),void(g_ugYoutubeAPI.isAPILoaded=!0)))},this.doCommand=function(e,t){if(!l)return!0;if(0==u)return!1;switch(e){case"play":if("function"!=typeof l.playVideo)return!1;l.playVideo();break;case"pause":if("function"!=typeof l.pauseVideo)return!1;l.pauseVideo();break;case"seek":if("function"!=typeof l.seekTo)return!1;l.seekTo(t);break;case"stopToBeginning":var i=l.getPlayerState();switch(l.pauseVideo(),i){case YT.PlayerState.PLAYING:case YT.PlayerState.ENDED:case YT.PlayerState.PAUSED:l.seekTo(0)}}},this.play=function(){i.doCommand("play")},this.pause=function(){i.doCommand("pause")},this.destroy=function(){try{l&&(u=!1,l.clearVideo(),l.destroy())}catch(e){jQuery("#"+s).html("")}},this.stopToBeginning=function(){i.doCommand("stopToBeginning")},this.changeVideo=function(e,t){if(0==i.isPlayerReady())return!1;if(!l)return!1;if(t&&1==t)l.loadVideoById(e,0,"large");else{if(void 0===l.cueVideoById)return!1;l.cueVideoById(e,0,"large")}},this.isPlayerReady=function(){return!(!u||!l)},this.getVideoImages=function(e){var t={};return t.preview="https://i.ytimg.com/vi/"+e+"/sddefault.jpg",t.thumb="https://i.ytimg.com/vi/"+e+"/default.jpg",t}}function UGVideoPlayer(){var n,i,r,o,a,s,l,u,t=this,e=jQuery(this),d=new UGFunctions,_=new UGYoutubeAPI,g=new UGVimeoAPI,c=new UGHtml5MediaAPI,h=new UGSoundCloudAPI,p=new UGWistiaAPI,m=null,f={video_enable_closebutton:!0},b={standAloneMode:!(this.events={SHOW:"video_show",HIDE:"video_hide",PLAY_START:"video_play_start",PLAY_STOP:"video_play_stop",VIDEO_ENDED:"video_ended"}),youtubeInnerID:"",vimeoPlayerID:"",html5PlayerID:"",wistiaPlayerID:"",soundCloudPlayerID:""};function v(){t.hide()}function y(){e.trigger(t.events.PLAY_START),s&&s.hide()}function w(){e.trigger(t.events.PLAY_STOP),s&&s.show()}function I(){e.trigger(t.events.VIDEO_ENDED)}function E(e){var t,i=["youtube","vimeo","html5","soundcloud","wistia"];for(t in i){var n=i[t];if(n!=e)switch(n){case"youtube":_.pause(),_.destroy(),r.hide();break;case"vimeo":g.pause(),g.destroy(),o.hide();break;case"html5":c.pause(),a.hide();break;case"soundcloud":h.pause(),h.destroy(),l.hide();break;case"wistia":p.pause(),u.hide()}}}this.init=function(e,t,i){if(!(n=i))throw new Error("missing gallery ID for video player, it's a must!");f=jQuery.extend(f,e),_.setOptions(f),t&&1==t&&(b.standAloneMode=!0)},this.setHtml=function(e){b.youtubeInnerID=n+"_youtube_inner",b.vimeoPlayerID=n+"_videoplayer_vimeo",b.html5PlayerID=n+"_videoplayer_html5",b.wistiaPlayerID=n+"_videoplayer_wistia",b.soundCloudPlayerID=n+"_videoplayer_soundcloud";var t="<div class='ug-videoplayer' style='display:none'>";t+="<div class='ug-videoplayer-wrapper ug-videoplayer-youtube' style='display:none'><div id='"+b.youtubeInnerID+"'></div></div>",t+="<div id='"+b.vimeoPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-vimeo' style='display:none'></div>",t+="<div id='"+b.html5PlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-html5'></div>",t+="<div id='"+b.soundCloudPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-soundcloud'></div>",t+="<div id='"+b.wistiaPlayerID+"' class='ug-videoplayer-wrapper ug-videoplayer-wistia'></div>",0==b.standAloneMode&&1==f.video_enable_closebutton&&(t+="<div class='ug-videoplayer-button-close'></div>"),t+="</div>",e.append(t),i=e.children(".ug-videoplayer"),r=i.children(".ug-videoplayer-youtube"),o=i.children(".ug-videoplayer-vimeo"),a=i.children(".ug-videoplayer-html5"),l=i.children(".ug-videoplayer-soundcloud"),u=i.children(".ug-videoplayer-wistia"),0==b.standAloneMode&&1==f.video_enable_closebutton&&(s=i.children(".ug-videoplayer-button-close"))},this.destroy=function(){s&&(s.off("click"),s.off("touchend")),jQuery(_).off(_.events.START_PLAYING),jQuery(_).off(_.events.STOP_PLAYING),jQuery(g).off(g.events.START_PLAYING),jQuery(g).off(g.events.STOP_PLAYING),jQuery(c).off(c.events.START_PLAYING),jQuery(c).off(c.events.STOP_PLAYING),jQuery(h).off(h.events.START_PLAYING,y),jQuery(h).off(h.events.STOP_PLAYING,w),jQuery(p).off(p.events.START_PLAYING,y),jQuery(p).off(p.events.STOP_PLAYING,w),m=null},this.initEvents=function(){s&&(d.setButtonMobileReady(s),d.setButtonOnClick(s,v)),jQuery(_).on(_.events.START_PLAYING,y),jQuery(_).on(_.events.STOP_PLAYING,w),jQuery(_).on(_.events.VIDEO_ENDED,I),jQuery(g).on(g.events.START_PLAYING,y),jQuery(g).on(g.events.STOP_PLAYING,w),jQuery(g).on(g.events.VIDEO_ENDED,I),jQuery(c).on(c.events.START_PLAYING,y),jQuery(c).on(c.events.STOP_PLAYING,w),jQuery(c).on(c.events.VIDEO_ENDED,I),jQuery(h).on(h.events.START_PLAYING,y),jQuery(h).on(h.events.STOP_PLAYING,w),jQuery(h).on(h.events.VIDEO_ENDED,I),jQuery(p).on(p.events.START_PLAYING,y),jQuery(p).on(p.events.STOP_PLAYING,w),jQuery(p).on(p.events.VIDEO_ENDED,I)},this.setSize=function(e,t){d.setElementSize(i,e,t),s&&d.placeElement(s,"right","top")},this.setPosition=function(e,t){d.placeElement(i,e,t)},this.getObject=function(){return i},this.show=function(){if(1==t.isVisible())return!0;i.show(),i.fadeTo(0,1),s&&s.show(),e.trigger(t.events.SHOW)},this.hide=function(){if(0==t.isVisible())return!0;E(),m=null,i.hide(),e.trigger(t.events.HIDE)},this.getActiveAPI=function(){switch(m){case"youtube":return _;case"vimeo":return g;case"wistia":return p;case"soundcloud":return h;case"html5":return c;default:return null}},this.pause=function(){var e=t.getActiveAPI();if(null==e)return!1;"function"==typeof e.pause&&e.pause()},this.isVisible=function(){return i.is(":visible")},this.playYoutube=function(e,t,i){void 0===t&&(t=!0),i=i||null,E("youtube"),r.show(),0==r.children("#"+b.youtubeInnerID).length&&r.append("<div id='"+b.youtubeInnerID+"'></div>");var n={};i&&(n.start=i),1==_.isPlayerReady()&&1==b.standAloneMode?_.changeVideo(e,t):_.putVideo(b.youtubeInnerID,e,"100%","100%",t,n),m="youtube"},this.playVimeo=function(e,t){void 0===t&&(t=!0),E("vimeo"),o.show(),g.putVideo(b.vimeoPlayerID,e,"100%","100%",t),m="vimeo"},this.playHtml5Video=function(e,t,i,n,r){void 0===r&&(r=!0),E("html5"),a.show();n={ogv:e,webm:t,mp4:i,posterImage:n};c.putVideo(b.html5PlayerID,n,"100%","100%",r),m="html5"},this.playSoundCloud=function(e,t){void 0===t&&(t=!0),E("soundcloud"),l.show(),h.putSound(b.soundCloudPlayerID,e,"100%","100%",t),m="soundcloud"},this.playWistia=function(e,t){void 0===t&&(t=!0),E("wistia"),u.show(),p.putVideo(b.wistiaPlayerID,e,"100%","100%",t),m="wistia"}}var g_ugYoutubeAPI=new UGYoutubeAPI,g_ugVimeoAPI=new UGVimeoAPI,g_ugHtml5MediaAPI=new UGHtml5MediaAPI,g_ugSoundCloudAPI=new UGSoundCloudAPI,g_ugWistiaAPI=new UGWistiaAPI;function ugCheckForMinJQueryVersion(){if(0==g_ugFunctions.checkMinJqueryVersion("1.8.0"))throw new Error("The gallery can run from jquery 1.8 You have jQuery "+jQuery.fn.jquery+" Please update your jQuery library.")}function ugCheckForErrors(t,i){try{"jquery"==i?(function(){if("undefined"==typeof jQuery)throw new Error("jQuery library not included")}(),ugCheckForMinJQueryVersion()):(ugCheckForMinJQueryVersion(),function(){if("function"!=typeof jQuery.fn.unitegallery){var e="You have some jquery.js library include that comes after the gallery files js include.";throw e+="<br> This include eliminates the gallery libraries, and make it not work.","cms"==i?(e+="<br><br> To fix it you can:<br>&nbsp;&nbsp;&nbsp; 1. In the Gallery Settings -> Troubleshooting set option: <strong><b>Put JS Includes To Body</b></strong> option to true.",e+="<br>&nbsp;&nbsp;&nbsp; 2. Find the double jquery.js include and remove it."):e+="<br><br> Please find and remove this jquery.js include and the gallery will work. <br> * There should be only one jquery.js include before all other js includes in the page.",new Error(e)}}())}catch(e){var n,r=e.message;return r="<div style='font-size:16px;color:#BC0C06;max-width:900px;border:1px solid red;padding:10px;'>"+(r="Unite Gallery Error: "+r)+"</div>","jquery"==i?((n=document.getElementById(t)).innerHTML=r,n.style.display="block"):jQuery(t).show().html(r),!1}return!0}function UniteGalleryMain(){var t=this,g_galleryID,g_objGallery=jQuery(t),g_objWrapper,g_objParent,g_objThumbs,g_objSlider,g_objLightbox,g_functions=new UGFunctions,g_objTabs,g_objLoadMore,g_arrItems=[],g_numItems,g_selectedItem=null,g_selectedItemIndex=-1,g_objTheme,g_objCache={};this.events={ITEM_CHANGE:"item_change",SIZE_CHANGE:"size_change",ENTER_FULLSCREEN:"enter_fullscreen",EXIT_FULLSCREEN:"exit_fullscreen",START_PLAY:"start_play",STOP_PLAY:"stop_play",PAUSE_PLAYING:"pause_playing",CONTINUE_PLAYING:"continue_playing",SLIDER_ACTION_START:"slider_action_start",SLIDER_ACTION_END:"slider_action_end",ITEM_IMAGE_UPDATED:"item_image_updated",GALLERY_KEYPRESS:"gallery_keypress",GALLERY_BEFORE_REQUEST_ITEMS:"gallery_before_request_items",OPEN_LIGHTBOX:"open_lightbox",CLOSE_LIGHTBOX:"close_lightbox"};var g_options={gallery_width:900,gallery_height:500,gallery_height_mobile:null,gallery_min_width:150,gallery_min_height:100,gallery_theme:"default",gallery_skin:"default",gallery_images_preload_type:"minimal",gallery_autoplay:!1,gallery_play_interval:3e3,gallery_pause_on_mouseover:!0,gallery_mousewheel_role:"zoom",gallery_control_keyboard:!0,gallery_carousel:!0,gallery_preserve_ratio:!0,gallery_background_color:"",gallery_debug_errors:!1,gallery_shuffle:!1,gallery_urlajax:null,gallery_enable_tabs:!1,gallery_enable_loadmore:!1,gallery_enable_cache:!0,gallery_initial_catid:"",load_api_externally:!1},g_temp={objCustomOptions:{},isAllItemsPreloaded:!1,isFreestyleMode:!1,lastWidth:0,lastHeigh:0,handleResize:null,isInited:!1,isPlayMode:!1,isPlayModePaused:!1,playTimePassed:0,playTimeLastStep:0,playHandle:"",playStepInterval:33,objProgress:null,isFakeFullscreen:!1,thumbsType:null,isYoutubePresent:!1,isVimeoPresent:!1,isHtml5VideoPresent:!1,isSoundCloudPresent:!1,isWistiaPresent:!1,resizeDelay:100,isRunFirstTime:!0,originalOptions:{},funcCustomHeight:null};function __________INIT_GALLERY_______(){}function getThemeFunction(e){return-1==e.indexOf("UGTheme_")&&(e="UGTheme_"+e),e}function initTheme(objCustomOptions){var defaultTheme;objCustomOptions.hasOwnProperty("gallery_theme")?g_options.gallery_theme=objCustomOptions.gallery_theme:(defaultTheme=g_options.gallery_theme,0==g_ugFunctions.isThemeRegistered(defaultTheme)&&(g_options.gallery_theme=g_ugFunctions.getFirstRegisteredTheme()));var themeFunction=getThemeFunction(g_options.gallery_theme);try{g_options.gallery_theme=eval(themeFunction)}catch(e){}g_options.gallery_theme=eval(themeFunction),g_objTheme=new g_options.gallery_theme,g_objTheme.init(t,objCustomOptions)}function resetOptions(){g_options=jQuery.extend({},g_temp.originalOptions),g_selectedItemIndex=-1,g_selectedItem=null,g_objLightbox=g_objThumbs=g_objSlider=void 0}function checkForStartupErrors(){try{ugCheckForMinJQueryVersion()}catch(e){throwErrorShowMessage(e.message)}"object"==typeof g_objWrapper.outerWidth()&&throwErrorShowMessage("You have some buggy script. most chances jquery-ui.js that destroy jquery outerWidth, outerHeight functions. The gallery can't run. Please update jquery-ui.js to latest version."),setTimeout(function(){ugCheckForErrors(g_galleryID,"cms")},5e3)}function runGallery(e,i,n,r){var o="object"==typeof i;if(o&&(g_temp.objCustomOptions=i),1==g_temp.isRunFirstTime){if(g_galleryID=e,0==(g_objWrapper=jQuery(g_galleryID)).length)return void trace("div with id: "+g_galleryID+" not found");g_objParent=g_objWrapper.parent(),checkForStartupErrors(),g_temp.originalOptions=jQuery.extend({},g_options),o&&(g_options=jQuery.extend(g_options,i)),1==g_options.gallery_enable_cache&&g_options.gallery_initial_catid&&cacheItems(g_options.gallery_initial_catid),t.setSizeClass(),fillItemsArray(g_objWrapper.children()),loadAPIs(),g_objWrapper.find("img").fadeTo(0,0).hide(),g_objWrapper.show(),clearInitData()}else if(t.destroy(),resetOptions(),g_options=jQuery.extend(g_options,g_temp.objCustomOptions),n){if(r&&1==g_options.gallery_enable_cache&&cacheItems(r,n),"noitems"==n)return void showErrorMessage("No items in this category","");g_objWrapper.html(n),fillItemsArray(g_objWrapper.children()),loadAPIs(),g_objWrapper.children().fadeTo(0,0).hide(),g_objWrapper.show(),clearInitData()}1==g_temp.isRunFirstTime&&1==g_options.gallery_enable_tabs&&(g_objTabs=new UGTabs).init(t,g_options),1==g_temp.isRunFirstTime&&1==g_options.gallery_enable_loadmore&&(g_objLoadMore=new UGLoadMore).init(t,g_options),o&&modifyInitParams(g_temp.objCustomOptions),validateParams(),1==g_options.gallery_shuffle&&t.shuffleItems(),initTheme(g_temp.objCustomOptions),setGalleryHtml(),setHtmlObjectsProperties(),0==g_objWrapper.width()?g_functions.waitForWidth(g_objWrapper,runGalleryActually):runGalleryActually()}function runGalleryActually(){t.setSizeClass(),0==g_temp.isFreestyleMode&&1==g_options.gallery_preserve_ratio&&setHeightByOriginalRatio(),g_objTheme.run(),g_objTabs&&g_temp.isRunFirstTime&&g_objTabs.run(),preloadBigImages(),initEvents(),0<g_numItems&&t.selectItem(0),1==g_options.gallery_autoplay&&t.startPlayMode(),g_temp.isRunFirstTime=!1}function showErrorMessage(e,t){e="<div class='ug-error-message-wrapper'><div class='ug-error-message'>"+(e=(t=void 0===t?"<b>Unite Gallery Error: </b>":"<b>"+t+": </b>")+e)+"</div></div>";g_objWrapper.children().remove(),g_objWrapper.html(e),g_objWrapper.show()}function throwErrorShowMessage(e){throw showErrorMessage(e),new Error(e)}function modifyInitParams(){g_options.gallery_images_preload_type||(g_options.gallery_images_preload_type="minimal"),(null==g_options.gallery_min_height||g_options.gallery_height<g_options.gallery_min_height)&&(g_options.gallery_min_height=0),(null==g_options.gallery_min_width||g_options.gallery_width<g_options.gallery_min_width)&&(g_options.gallery_min_width=0)}function validateParams(){if(!g_options.gallery_theme)throw new Error("The gallery can't run without theme");if(jQuery.isNumeric(g_options.gallery_height)&&g_options.gallery_height<g_options.gallery_min_height)throw new Error("The <b>gallery_height</b> option must be bigger then <b>gallery_min_height option</b>");if(g_options.gallery_width<g_options.gallery_min_width)throw new Error("The <b>gallery_width</b> option must be bigger then <b>gallery_min_width option</b>")}function setGalleryHtml(){g_objWrapper.addClass("ug-gallery-wrapper"),g_objWrapper.append("<div class='ug-overlay-disabled' style='display:none'></div>"),t.setSizeClass()}function clearInitData(){g_objWrapper.children().remove()}function storeLastSize(){var e=t.getSize();g_temp.lastWidth=e.width,g_temp.lastHeight=e.height}function setHeightByOriginalRatio(){var e=t.getSize();e.width/e.height!=e.orig_ratio&&(e=e.width/e.orig_ratio,(e=Math.round(e))<g_options.gallery_min_height&&(e=g_options.gallery_min_height),g_objWrapper.height(e))}function setHtmlObjectsProperties(){var e,i={"max-width":g_functions.getCssSizeParam(g_options.gallery_width),"min-width":g_functions.getCssSizeParam(g_options.gallery_min_width)};0==g_temp.isFreestyleMode?(e=g_functions.getCssSizeParam(g_options.gallery_height),1==t.isMobileMode()&&g_options.gallery_height_mobile&&(e=g_functions.getCssSizeParam(g_options.gallery_height_mobile)),i.height=e):i.overflow="visible",g_options.gallery_background_color&&(i["background-color"]=g_options.gallery_background_color),g_objWrapper.css(i)}function fillItemByChild(e){var i=t.isMobileMode(),n=e.prop("tagName").toLowerCase();if("noscript"==n)return null;if("picture"==n){var r=e.find("img");if(0==r.length)return null;e=r,n="img"}var o=e.data("lazy-src");o&&e.attr("src",o);var a="";if("a"==n){a=e.attr("href");var s=e.children();if(0==(e=e.find("img")).length)return null;n="img"}var l=e.data("type");null==l&&(l="image");var u={};if(u.type=l,"img"==n){var d="lazyload-src",_=e.data(d);_||(d="lazy-src",_=e.data(d)),_||(d="src",_=e.data(d)),_&&""!=_&&(e.attr("src",_),jQuery.removeData(e,d));r=e.data("image"),o=e.data("thumb"),_=e.data("title");void 0===r&&(r=null),void 0===o&&(o=null);d=e.attr("src"),r=r||d;o=(o=o||d)||r,r=r||o,u.urlThumb=o,u.urlImage=r,u.title=e.attr("alt"),_&&(u.title=_),u.objThumbImage=e,u.objThumbImage.attr("src",u.urlThumb)}else{if("image"==l)throw trace("Problematic gallery item found:"),trace(e),trace("Please look for some third party js script that could add this item to the gallery"),new Error("The item should not be image type");u.urlThumb=e.data("thumb"),u.title=e.data("title"),u.objThumbImage=null,u.urlImage=e.data("image")}1==i&&(void 0!==(g=e.data("thumb-mobile"))&&""!=g&&(u.urlThumb=g,"img"==n&&e.attr("src",u.urlThumb)),void 0!==(g=e.data("image-mobile"))&&""!=g&&(u.urlImage=g)),u.link=a,u.description=e.attr("title"),u.description||(u.description=e.data("description")),u.description||(u.description=""),u.isNewAdded=!1,u.isLoaded=!1,u.isThumbImageLoaded=!1,u.objPreloadImage=null,u.isBigImageLoadStarted=!1,u.isBigImageLoaded=!1,u.isBigImageLoadError=!1,u.imageWidth=0,u.imageHeight=0,u.thumbWidth=0,u.thumbHeight=0,u.thumbRatioByWidth=0,u.thumbRatioByHeight=0;var g=e.data("width"),a=e.data("height");g&&"number"==typeof g&&a&&"number"==typeof a&&(u.thumbWidth=g,u.thumbHeight=a,u.thumbRatioByWidth=g/a,u.thumbRatioByHeight=a/g);var c=(u.addHtml=null)==u.urlImage||""==u.urlImage,h=null==u.urlThumb||""==u.urlThumb;switch(u.type){case"youtube":u.videoid=e.data("videoid"),u.video_start=e.data("start"),(c||h)&&(p=g_ugYoutubeAPI.getVideoImages(u.videoid),c&&(u.urlImage=p.preview),h&&(u.urlThumb=p.thumb,"img"==n&&e.attr("src",u.urlThumb))),g_temp.isYoutubePresent=!0;break;case"vimeo":u.videoid=e.data("videoid"),g_temp.isVimeoPresent=!0;break;case"html5video":u.videoogv=e.data("videoogv"),u.videowebm=e.data("videowebm"),u.videomp4=e.data("videomp4"),g_temp.isHtml5VideoPresent=!0;break;case"soundcloud":u.trackid=e.data("trackid"),g_temp.isSoundCloudPresent=!0;break;case"wistia":u.videoid=e.data("videoid"),g_temp.isWistiaPresent=!0;break;case"custom":var p=e.children("img");p.length&&(p=jQuery(p[0]),u.urlThumb=p.attr("src"),u.title=p.attr("alt"),u.objThumbImage=p),(s=e.children().not("img:first-child")).length&&(u.addHtml=s.clone())}return u.objThumbImage&&(u.objThumbImage.removeAttr("data-description",""),u.objThumbImage.removeAttr("data-image",""),u.objThumbImage.removeAttr("data-thumb",""),u.objThumbImage.removeAttr("title","")),u}function fillItemsArray(e,t){if(!0!==t)g_arrItems=[];else for(var i=0;i<g_numItems;i++)g_arrItems[i].isNewAdded=!1;for(i=0;i<e.length;i++){var n,r=jQuery(e[i]),o=fillItemByChild(r);null!==o?(n=g_arrItems.length,o.index=n,!0===t&&(o.isNewAdded=!0),g_arrItems.push(o)):r.remove()}g_numItems=g_arrItems.length}function loadAPIs(){var e=g_options.load_api_externally;g_temp.isYoutubePresent&&g_ugYoutubeAPI.loadAPI(e),g_temp.isVimeoPresent&&g_ugVimeoAPI.loadAPI(e),g_temp.isHtml5VideoPresent&&g_ugHtml5MediaAPI.loadAPI(e),g_temp.isSoundCloudPresent&&g_ugSoundCloudAPI.loadAPI(e),g_temp.isWistiaPresent&&g_ugWistiaAPI.loadAPI(e)}function preloadBigImages(){if("visible"!=g_options.gallery_images_preload_type||g_objThumbs||(g_options.gallery_images_preload_type="minimal"),1==g_temp.isAllItemsPreloaded)return 1;switch(g_options.gallery_images_preload_type){default:case"minimal":break;case"all":jQuery(g_arrItems).each(function(){preloadItemImage(this)});break;case"visible":jQuery(g_arrItems).each(function(){1==g_objThumbs.isItemThumbVisible(this)&&preloadItemImage(this)})}}function checkPreloadItemImage(e){if(1!=e.isBigImageLoadStarted&&1!=e.isBigImageLoaded&&1!=e.isBigImageLoadError)switch(g_options.gallery_images_preload_type){default:case"minimal":break;case"all":preloadItemImage(e);break;case"visible":1==g_objThumbs.isItemThumbVisible(e)&&preloadItemImage(e)}}function preloadItemImage(e){if(1==e.isBigImageLoadStarted||1==e.isBigImageLoaded||1==e.isBigImageLoadError)return 1;var i=e.urlImage;""!=i&&null!=i?(e.isBigImageLoadStarted=!0,e.objPreloadImage=jQuery("<img/>").attr("src",i),e.objPreloadImage.data("itemIndex",e.index),e.objPreloadImage.on("load",t.onItemBigImageLoaded),e.objPreloadImage.on("error",function(){var e=jQuery(this).data("itemIndex"),i=g_arrItems[e];i.isBigImageLoadError=!0,i.isBigImageLoaded=!1;var n=jQuery(this).attr("src");console.log("Can't load image: "+n),g_objGallery.trigger(t.events.ITEM_IMAGE_UPDATED,[e,i.urlImage]),i.objThumbImage.attr("src",i.urlThumb)}),checkAllItemsStartedPreloading()):e.isBigImageLoadError=!0}function preloadNearBigImages(e){if(1!=g_temp.isAllItemsPreloaded){if(!(e=e||g_selectedItem))return 1;var t=e.index,e=t-1,t=t+1;0<e&&preloadItemImage(g_arrItems[e]),t<g_numItems&&preloadItemImage(g_arrItems[t])}}function checkAllItemsStartedPreloading(){if(1!=g_temp.isAllItemsPreloaded){for(var e in g_arrItems)if(0==g_arrItems[e].isBigImageLoadStarted)return;g_temp.isAllItemsPreloaded=!0}}function __________END_INIT_GALLERY_______(){}function __________EVENTS_____________(){}function onSliderMouseEnter(e){1==g_options.gallery_pause_on_mouseover&&0==t.isFullScreen()&&1==g_temp.isPlayMode&&g_objSlider&&0==g_objSlider.isSlideActionActive()&&t.pausePlaying()}function onSliderMouseLeave(e){1==g_options.gallery_pause_on_mouseover&&1==g_temp.isPlayMode&&g_objSlider&&0==g_objSlider.isSlideActionActive()&&0==g_objSlider.isCurrentSlideLoadingImage()&&t.continuePlaying()}function isThisGalleryForKeyAction(){if(!window.ugArrGalleriesObjects)return!0;window.ugArrGalleriesObjects.length;if(1==window.ugArrGalleriesObjects.length)return!0;var n,r=0,o=t.getGalleryID();return jQuery.each(window.ugArrGalleriesObjects,function(e,t){var i=t.getGalleryID(),t=t.getKeyPressScore();r<t&&(r=t),i==o&&(n=t)}),n==r}function onKeyPress(e){var i=jQuery(e.target);if(i.is("textarea")||i.is("select")||i.is("input"))return!0;var i=e.charCode||e.keyCode||e.which||0,n=!1;switch(i){case 39:1==isThisGalleryForKeyAction()&&(t.nextItem(),n=!0);break;case 37:1==isThisGalleryForKeyAction()&&(t.prevItem(),n=!0);break;default:n=!1}1==n&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()),g_objGallery.trigger(t.events.GALLERY_KEYPRESS,[i,e])}function onGalleryResized(){var e,i=t.getSize();if(0==i.width)return!0;t.setSizeClass(),((i=t.getSize()).width!=g_temp.lastWidth||0==g_temp.isFreestyleMode&&i.height!=g_temp.lastHeight)&&(e=!1,!g_temp.funcCustomHeight||(i=g_temp.funcCustomHeight(i))&&(g_objWrapper.height(i),e=!0),0==e&&0==g_temp.isFreestyleMode&&(1==g_options.gallery_preserve_ratio?setHeightByOriginalRatio():g_options.gallery_height_mobile&&setHtmlObjectsProperties()),storeLastSize(),g_objGallery.trigger(t.events.SIZE_CHANGE))}function onThumbsChange(e){"visible"==g_options.gallery_images_preload_type&&0==g_temp.isAllItemsPreloaded&&preloadBigImages()}function onFullScreenChange(){var e=g_functions.isFullScreen(),i=e?t.events.ENTER_FULLSCREEN:t.events.EXIT_FULLSCREEN,n=g_functions.getGlobalData("fullscreenID");if(g_galleryID!==n)return!0;e?g_objWrapper.addClass("ug-fullscreen"):g_objWrapper.removeClass("ug-fullscreen"),g_objGallery.trigger(i),onGalleryResized()}function onItemImageUpdated(e,i){checkPreloadItemImage(t.getItem(i))}function onCurrentSlideImageLoadEnd(){1==t.isPlayMode()&&t.continuePlaying()}function initEvents(){if(g_objWrapper.on("dragstart",function(e){e.preventDefault()}),g_objGallery.on(t.events.ITEM_IMAGE_UPDATED,onItemImageUpdated),g_objThumbs)switch(g_temp.thumbsType){case"strip":jQuery(g_objThumbs).on(g_objThumbs.events.STRIP_MOVE,onThumbsChange);break;case"grid":jQuery(g_objThumbs).on(g_objThumbs.events.PANE_CHANGE,onThumbsChange)}"advance"==g_options.gallery_mousewheel_role&&0==g_temp.isFreestyleMode&&g_objWrapper.on("mousewheel",t.onGalleryMouseWheel),storeLastSize(),jQuery(window).resize(function(){g_objWrapper.css("width","auto"),g_functions.whenContiniousEventOver("gallery_resize",onGalleryResized,g_temp.resizeDelay)}),setTimeout(function(){setInterval(onGalleryResized,2e3)},1e4),g_functions.addFullScreenChangeEvent(onFullScreenChange),g_objSlider&&(jQuery(g_objSlider).on(g_objSlider.events.ITEM_CHANGED,function(){var e=g_objSlider.getCurrentItemIndex();-1!=e&&t.selectItem(e)}),1==g_options.gallery_pause_on_mouseover&&(g_objSlider.getElement().hover(onSliderMouseEnter,onSliderMouseLeave),g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){onSliderMouseLeave()})),retriggerEvent(g_objSlider,g_objSlider.events.ACTION_START,t.events.SLIDER_ACTION_START),retriggerEvent(g_objSlider,g_objSlider.events.ACTION_END,t.events.SLIDER_ACTION_END),jQuery(g_objSlider).on(g_objSlider.events.CURRENTSLIDE_LOAD_END,onCurrentSlideImageLoadEnd)),1==g_options.gallery_control_keyboard&&jQuery(document).keydown(onKeyPress)}function __________GENERAL_______(){}function cacheItems(e,t){var i;t?"noitems"!=(i=t)&&(i=jQuery(t).clone()):i=g_objWrapper.children().clone(),g_objCache[e]=i}function removeAllSizeClasses(e){(e=e||g_objWrapper).removeClass("ug-under-480"),e.removeClass("ug-under-780"),e.removeClass("ug-under-960")}function retriggerEvent(e,t,i){jQuery(e).on(t,function(e){g_objGallery.trigger(i,[this])})}function advanceNextStep(){var e=jQuery.now(),i=e-g_temp.playTimeLastStep;if(g_temp.playTimeLastStep=e,0==t.isGalleryVisible())return!1;g_temp.playTimePassed+=i,g_temp.objProgress&&(i=g_temp.playTimePassed/g_options.gallery_play_interval,g_temp.objProgress.setProgress(i)),g_temp.playTimePassed>=g_options.gallery_play_interval&&(t.nextItem(),g_temp.playTimePassed=0)}function unselectSeletedItem(){if(null==g_selectedItem)return 1;g_objThumbs&&g_objThumbs.setThumbUnselected(g_selectedItem.objThumbWrapper),g_selectedItem=null,g_selectedItemIndex=-1}function toFakeFullScreen(){jQuery("body").addClass("ug-body-fullscreen"),g_objWrapper.addClass("ug-fake-fullscreen"),g_temp.isFakeFullscreen=!0,g_objGallery.trigger(t.events.ENTER_FULLSCREEN),g_objGallery.trigger(t.events.SIZE_CHANGE)}function exitFakeFullscreen(){jQuery("body").removeClass("ug-body-fullscreen"),g_objWrapper.removeClass("ug-fake-fullscreen"),g_temp.isFakeFullscreen=!1,g_objGallery.trigger(t.events.EXIT_FULLSCREEN),g_objGallery.trigger(t.events.SIZE_CHANGE)}this.onItemBigImageLoaded=function(e,t){var i=(t=t||jQuery(this)).data("itemIndex"),i=g_arrItems[i];i.isBigImageLoaded=!0;t=g_functions.getImageOriginalSize(t);i.imageWidth=t.width,i.imageHeight=t.height},this.checkFillImageSize=function(e,t){if(!t){var i=e.data("itemIndex");if(void 0===i)throw new Error("Wrong image given to gallery.checkFillImageSize");t=g_arrItems[i]}e=g_functions.getImageOriginalSize(e);t.imageWidth=e.width,t.imageHeight=e.height},this.setFreestyleMode=function(){g_temp.isFreestyleMode=!0},this.attachThumbsPanel=function(e,t){g_temp.thumbsType=e,g_objThumbs=t},this.initSlider=function(e,i){e=e||{},e=jQuery.extend(g_temp.objCustomOptions,e),(g_objSlider=new UGSlider).init(t,e,i)},this.onGalleryMouseWheel=function(e,i,n,r){e.preventDefault(),0<i?t.prevItem():t.nextItem()},this.getKeyPressScore=function(){if(t.isGalleryInsideScreen())return 1;if(g_objLightbox&&1==g_objLightbox.isOpened())return 2;return 0},this.getGalleryID=function(){return g_galleryID},this.destroy=function(){if(g_objWrapper.off("dragstart"),g_objGallery.off(t.events.ITEM_IMAGE_UPDATED),g_objThumbs)switch(g_temp.thumbsType){case"strip":jQuery(g_objThumbs).off(g_objThumbs.events.STRIP_MOVE);break;case"grid":jQuery(g_objThumbs).off(g_objThumbs.events.PANE_CHANGE)}var e;g_objWrapper.off("mousewheel"),jQuery(window).off("resize"),g_functions.destroyFullScreenChangeEvent(),g_objSlider&&(jQuery(g_objSlider).off(g_objSlider.events.ITEM_CHANGED),(e=g_objSlider.getElement()).off("mouseenter"),e.off("mouseleave"),g_objGallery.off(t.events.ENTER_FULLSCREEN),jQuery(g_objSlider).off(g_objSlider.events.ACTION_START),jQuery(g_objSlider).off(g_objSlider.events.ACTION_END),jQuery(g_objSlider).off(g_objSlider.events.CURRENTSLIDE_LOAD_END)),1==g_options.gallery_control_keyboard&&jQuery(document).off("keydown"),g_objTheme&&"function"==typeof g_objTheme.destroy&&g_objTheme.destroy(),g_objWrapper.html("")},this.getArrItems=function(){return g_arrItems},this.getObjects=function(){return{g_galleryID:g_galleryID,g_objWrapper:g_objWrapper,g_objThumbs:g_objThumbs,g_objSlider:g_objSlider,g_options:g_options,g_arrItems:g_arrItems,g_numItems:g_numItems}},this.getObjSlider=function(){return g_objSlider},this.getItem=function(e){if(e<0)throw new Error("item with index: "+e+" not found");if(g_numItems<=e)throw new Error("item with index: "+e+" not found");return g_arrItems[e]},this.getWidth=function(){return t.getSize().width},this.getHeight=function(){return t.getSize().height},this.getSize=function(){var e=g_functions.getElementSize(g_objWrapper);return e.orig_width=g_options.gallery_width,e.orig_height=g_options.gallery_height,e.orig_ratio=e.orig_width/e.orig_height,e},this.getGalleryID=function(){return g_galleryID.replace("#","")},this.getNextItem=function(e,t){"object"==typeof e&&(e=e.index);e+=1;if(!0!==t&&1==g_numItems)return null;if(g_numItems<=e){if(1!=g_options.gallery_carousel&&!0!==t)return null;e=0}return g_arrItems[e]},this.getPrevItem=function(e){"object"==typeof e&&(e=e.index);--e;if(e<0){if(1!=g_options.gallery_carousel&&!0!==forceCarousel)return null;e=g_numItems-1}return g_arrItems[e]},this.getSelectedItem=function(){return g_selectedItem},this.getSelectedItemIndex=function(){return g_selectedItemIndex},this.getNumItems=function(){return g_numItems},this.isLastItem=function(){return g_selectedItemIndex==g_numItems-1},this.isFirstItem=function(){return 0==g_selectedItemIndex},this.getOptions=function(){return g_options},this.getElement=function(){return g_objWrapper},this.___________SET_CONTROLS___________=function(){},this.setNextButton=function(e){e.data("ug-button",!0),g_functions.setButtonOnClick(e,t.nextItem)},this.setPrevButton=function(e){e.data("ug-button",!0),g_functions.setButtonOnClick(e,t.prevItem)},this.setFullScreenToggleButton=function(e){e.data("ug-button",!0);var i=e.html();g_functions.setButtonOnTap(e,t.toggleFullscreen),g_objGallery.on(t.events.ENTER_FULLSCREEN,function(){e.addClass("ug-fullscreenmode");e.html('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_23_15)"><path d="M15.7799 4.88073L13.945 3.08257L15.7799 1.24771C16.0734 0.954129 16.0734 0.513762 15.7799 0.220184C15.4863 -0.0733945 15.0459 -0.0733945 14.7523 0.220184L12.9542 2.01835L11.156 0.220184C11.0092 0.0733945 10.789 0.0733945 10.6422 0.220184C10.5689 0.293578 10.5322 0.366973 10.5322 0.440367L9.72482 5.87156C9.68812 6.09174 9.8716 6.27523 10.0551 6.27523C10.0918 6.27523 10.0918 6.27523 10.1285 6.27523L15.5597 5.50459C15.7432 5.46789 15.89 5.2844 15.8533 5.10092C15.8533 5.02752 15.8166 4.95413 15.7799 4.88073Z" fill="white"/><path d="M10.4955 15.5596C10.5321 15.7431 10.7156 15.8899 10.8991 15.8532C10.9725 15.8532 11.0459 15.8165 11.1193 15.7431L12.9175 13.945L14.7156 15.7431C15.0092 16.0367 15.4496 16.0367 15.7432 15.7431C16.0367 15.4495 16.0367 15.0092 15.7432 14.7156L13.945 12.9174L15.7432 11.1193C15.8899 10.9725 15.8899 10.7523 15.7432 10.6055C15.6698 10.5321 15.5964 10.4954 15.523 10.4954L10.0918 9.72478C9.90829 9.68808 9.68811 9.83487 9.68811 10.0184C9.68811 10.0551 9.68811 10.0917 9.68811 10.1284L10.4955 15.5596Z" fill="white"/><path d="M0.220184 11.1192L2.01835 12.9174L0.220184 14.7156C-0.0733945 15.0091 -0.0733945 15.4495 0.220184 15.7431C0.513762 16.0367 0.954129 16.0367 1.24771 15.7431L3.04587 13.9449L4.84404 15.7431C4.99083 15.8899 5.21101 15.8899 5.3578 15.7431C5.43119 15.6697 5.46789 15.5963 5.46789 15.5229L6.23853 10.0917C6.27523 9.90823 6.12844 9.68805 5.94495 9.68805C5.90826 9.68805 5.87156 9.68805 5.83486 9.68805L0.440367 10.4954C0.256881 10.5321 0.110092 10.7156 0.146789 10.8991C0.110092 10.9725 0.146789 11.0458 0.220184 11.1192Z" fill="white"/><path d="M1.24771 0.220184C0.954129 -0.0733945 0.513762 -0.0733945 0.220184 0.220184C-0.0733945 0.513762 -0.0733945 0.954129 0.220184 1.24771L2.01835 3.04587L0.220184 4.84404C0.0733945 4.99083 0.0733945 5.21101 0.220184 5.3578C0.256881 5.46789 0.330275 5.50459 0.440367 5.50459L5.87156 6.27523C6.05505 6.31193 6.27523 6.16514 6.27523 5.98165C6.27523 5.94495 6.27523 5.90826 6.27523 5.87156L5.50459 0.440367C5.46789 0.256881 5.2844 0.110092 5.10092 0.146789C5.02752 0.146789 4.95413 0.183486 4.88073 0.256881L3.08257 2.01835L1.24771 0.220184Z" fill="white"/></g><defs><clipPath id="clip0_23_15"><rect width="16" height="16" fill="white"/></clipPath></defs></svg>')}),g_objGallery.on(t.events.EXIT_FULLSCREEN,function(){e.removeClass("ug-fullscreenmode"),e.html(i)})},this.destroyFullscreenButton=function(e){g_functions.destroyButton(e),g_objGallery.off(t.events.ENTER_FULLSCREEN),g_objGallery.off(t.events.EXIT_FULLSCREEN)},this.setPlayButton=function(e){e.data("ug-button",!0);var i=e.html();g_functions.setButtonOnClick(e,t.togglePlayMode),g_objGallery.on(t.events.START_PLAY,function(){e.addClass("ug-stop-mode");e.html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16"><g transform="translate(0, 0)"><path fill="#ffffff" d="M5,1H2C1.4,1,1,1.4,1,2v12c0,0.6,0.4,1,1,1h3c0.6,0,1-0.4,1-1V2C6,1.4,5.6,1,5,1z"></path><path fill="#ffffff" d="M14,1h-3c-0.6,0-1,0.4-1,1v12c0,0.6,0.4,1,1,1h3c0.6,0,1-0.4,1-1V2C15,1.4,14.6,1,14,1z"></path></g></svg>')}),g_objGallery.on(t.events.STOP_PLAY,function(){e.removeClass("ug-stop-mode"),e.html(i)})},this.destroyPlayButton=function(e){g_functions.destroyButton(e),g_objGallery.off(t.events.START_PLAY),g_objGallery.off(t.events.STOP_PLAY)},this.setProgressIndicator=function(e){g_temp.objProgress=e},this.setTextContainers=function(i,n){g_objGallery.on(t.events.ITEM_CHANGE,function(){var e=t.getSelectedItem();i.html(e.title),n.html(e.description)})},this.showDisabledOverlay=function(){g_objWrapper.children(".ug-overlay-disabled").show()},this.hideDisabledOverlay=function(){g_objWrapper.children(".ug-overlay-disabled").hide()},this.___________END_SET_CONTROLS___________=function(){},this.___________PLAY_MODE___________=function(){},this.startPlayMode=function(){var e;g_temp.isPlayMode=!0,g_temp.isPlayModePaused=!1,g_temp.playTimePassed=0,g_temp.playTimeLastStep=jQuery.now(),g_temp.playHandle=setInterval(advanceNextStep,g_temp.playStepInterval),g_temp.objProgress&&(e=g_temp.objProgress.getElement(),g_temp.objProgress.setProgress(0),e.show()),g_objGallery.trigger(t.events.START_PLAY),g_objSlider&&1==g_objSlider.isCurrentSlideLoadingImage()&&t.pausePlaying()},this.resetPlaying=function(){if(0==g_temp.isPlayMode)return!0;g_temp.playTimePassed=0,g_temp.playTimeLastStep=jQuery.now()},this.pausePlaying=function(){if(1==g_temp.isPlayModePaused)return!0;g_temp.isPlayModePaused=!0,clearInterval(g_temp.playHandle),g_objGallery.trigger(t.events.PAUSE_PLAYING)},this.continuePlaying=function(){if(0==g_temp.isPlayModePaused)return!0;g_temp.isPlayModePaused=!1,g_temp.playTimeLastStep=jQuery.now(),g_temp.playHandle=setInterval(advanceNextStep,g_temp.playStepInterval)},this.stopPlayMode=function(){g_temp.isPlayMode=!1,clearInterval(g_temp.playHandle),g_temp.playTimePassed=0,g_temp.objProgress&&g_temp.objProgress.getElement().hide(),g_objGallery.trigger(t.events.STOP_PLAY)},this.isPlayMode=function(){return g_temp.isPlayMode},this.togglePlayMode=function(){0==t.isPlayMode()?t.startPlayMode():t.stopPlayMode()},this.___________GENERAL_EXTERNAL___________=function(){},this.getCurrentNumItem=function(){return g_selectedItemIndex},this.shuffleItems=function(){for(var e in g_arrItems=g_functions.arrayShuffle(g_arrItems))g_arrItems[e].index=parseInt(e)},this.setOptions=function(e){g_options=jQuery.extend(g_options,e)},this.selectItem=function(e,i){"number"==typeof e&&(e=t.getItem(e));var n=e.index;if(n==g_selectedItemIndex)return!0;unselectSeletedItem(),g_selectedItem=e,g_selectedItemIndex=n,g_objGallery.trigger(t.events.ITEM_CHANGE,[e,i]),1==g_temp.isPlayMode&&(t.resetPlaying(),1==g_objSlider.isCurrentSlideLoadingImage()&&t.pausePlaying())},this.nextItem=function(){var e=g_selectedItemIndex+1;return 0==g_numItems||(0==g_options.gallery_carousel&&g_numItems<=e||(g_numItems<=e&&(e=0),void t.selectItem(e,"next")))},this.prevItem=function(){var e=-1==g_selectedItemIndex?0:g_selectedItemIndex-1;return 0==g_numItems||(0==g_options.gallery_carousel&&e<0||(e<0&&(e=g_numItems-1),void t.selectItem(e,"prev")))},this.isFullScreen=function(){return 1==g_temp.isFakeFullscreen||1==g_functions.isFullScreen()},this.isFakeFullscreen=function(){return g_temp.isFakeFullscreen},this.toFullScreen=function(){g_functions.setGlobalData("fullscreenID",g_galleryID);var e=g_objWrapper.get(0);0==g_functions.toFullscreen(e)&&toFakeFullScreen()},this.exitFullScreen=function(){1==g_temp.isFakeFullscreen?exitFakeFullscreen():g_functions.exitFullscreen()},this.toggleFullscreen=function(){0==t.isFullScreen()?t.toFullScreen():t.exitFullScreen()},this.resize=function(e,t,i){g_objWrapper.css("width","auto"),g_objWrapper.css("max-width",e+"px"),t&&g_objWrapper.height(t),i||!0===i||onGalleryResized()},this.setSizeClass=function(e,i){e=e||g_objWrapper,0==(i=i||t.getSize().width)&&(i=jQuery(window).width());var n="";if(i<=480?n="ug-under-480":i<=780?n="ug-under-780":i<960&&(n="ug-under-960"),1==e.hasClass(n))return!0;removeAllSizeClasses(e),""!=n&&e.addClass(n)},this.isMobileMode=function(){return!!g_objWrapper.hasClass("ug-under-780")||!!g_objWrapper.hasClass("ug-under-480")},this.isSmallWindow=function(){var e=jQuery(window).width();return!e||e<=480},this.isGalleryVisible=function(){return g_objWrapper.is(":visible")},this.isGalleryInsideScreen=function(){return 1!=g_temp.isFreestyleMode&&(!!g_objSlider&&g_functions.isElementInsideScreen(g_objWrapper))},this.changeItems=function(e,t){runGallery(g_galleryID,"nochange",e=e||"noitems",t)},this.addItems=function(e){if(!e||0==e.length)return!1;var t=g_objWrapper.children(".ug-newitems-wrapper");if(0==t.length&&g_objWrapper.append("<div class='ug-newitems-wrapper' style='display:none'></div>"),(t=g_objWrapper.children(".ug-newitems-wrapper")).append(e),fillItemsArray(jQuery(t.children()),!0),loadAPIs(),!g_objTheme||"function"!=typeof g_objTheme.addItems)throw new Error("addItems function not found in the theme");t.remove(),g_objTheme.addItems()},this.getNewAddedItemsIndexes=function(){var i=[];return jQuery.each(g_arrItems,function(e,t){1==t.isNewAdded&&i.push(e)}),i},this.showErrorMessageReplaceGallery=function(e){showErrorMessage(e)},this.setFuncCustomHeight=function(e){g_temp.funcCustomHeight=e},this.setObjLightbox=function(e){g_objLightbox=e},this.__________EXTERNAL_EVENTS_______=function(){},this.triggerEvent=function(e,t){t?("array"!=jQuery.type(t)&&(t=[t]),g_objGallery.trigger(e,t)):g_objGallery.trigger(e)},this.onEvent=function(e,t){g_objGallery.on(e,t)},this.destroyEvent=function(e){g_objGallery.off(e)},this.__________AJAX_REQUEST_______=function(){},this.ajaxRequest=function(e,t,i,n){if(!i||"function"!=typeof i)throw new Error("ajaxRequest error: success function should be passed");var r=g_options.gallery_urlajax;if(!r||""==r)throw new Error("ajaxRequest error: Ajax url don't passed");void 0===t&&(t={});t={action:"unitegallery_ajax_action",client_action:e,galleryID:g_galleryID,data:t};jQuery.ajax({type:"post",url:g_options.gallery_urlajax,dataType:"json",data:t,success:function(e){if(!e)throw new Error("Empty ajax response!");if(-1==e||0===e)throw new Error("ajax error!!!");if(void 0===e.success)throw new Error("ajax error!!!");if(0==e.success)return showErrorMessage(e.message,"ajax error"),!1;i(e)},error:function(e,t,i){console.log("Ajax Error!!! "+t),responseText=e.responseText,(n&&"function"==typeof n?n:trace)(responseText)}})},this.requestNewItems=function(e,i,n){var r=g_options.gallery_enable_cache;n=n||e,1==i&&(r=!1),1==r&&g_objCache.hasOwnProperty(n)?(r=g_objCache[n],t.changeItems(r,n)):(g_objGallery.trigger(t.events.GALLERY_BEFORE_REQUEST_ITEMS),t.ajaxRequest("front_get_cat_items",{catid:e},function(e){e=e.html;t.changeItems(e,n)}))},this.run=function(e,t){if(t&&t.hasOwnProperty("gallery_debug_errors")&&(g_options.gallery_debug_errors=t.gallery_debug_errors),1==g_options.gallery_debug_errors)try{runGallery(e,t)}catch(e){var i,n,r;"object"==typeof e?(r=e.message,i=e.lineNumber,n=e.fileName,e.stack,r+=" <br><br> in file: "+n,r+=" <b> line "+i+"</b>",trace(e)):r=e,showErrorMessage(r=r.replace("Error:",""))}else runGallery(e,t)}}function UGLightbox(){var i,l,n,u,d,_,o,r,a=this,s=jQuery(this),g=new UniteGalleryMain,c=new UGSlider,h=new UGFunctions,p=new UGTextPanel,m={lightbox_type:"wide",lightbox_show_textpanel:!0,lightbox_textpanel_width:550,lightbox_hide_arrows_onvideoplay:!0,lightbox_arrows_position:"sides",lightbox_arrows_offset:10,lightbox_arrows_inside_offset:10,lightbox_arrows_inside_alwayson:!1,lightbox_overlay_color:null,lightbox_overlay_opacity:1,lightbox_top_panel_opacity:null,lightbox_show_numbers:!0,lightbox_numbers_size:null,lightbox_numbers_color:null,lightbox_numbers_padding_top:null,lightbox_numbers_padding_right:null,lightbox_compact_closebutton_offsetx:1,lightbox_compact_closebutton_offsety:1,lightbox_close_on_emptyspace:!0},f={topPanelHeight:44,initTextPanelHeight:26,isOpened:!(this.events={LIGHTBOX_INIT:"lightbox_init"}),isRightNowOpened:!1,putSlider:!0,isCompact:!1,fadeDuration:300,positionFrom:null,textPanelTop:null,textPanelLeft:null,isArrowsInside:!1,isArrowsOnHoverMode:!1,lastMouseX:null,lastMouseY:null,originalOptions:null,isSliderChangedOnce:!1,isTopPanelEnabled:!0},b={lightbox_slider_controls_always_on:!0,lightbox_slider_enable_bullets:!1,lightbox_slider_enable_arrows:!1,lightbox_slider_enable_progress_indicator:!1,lightbox_slider_enable_play_button:!1,lightbox_slider_enable_fullscreen_button:!1,lightbox_slider_enable_zoom_panel:!1,lightbox_slider_enable_text_panel:!1,lightbox_slider_scale_mode_media:"down",lightbox_slider_scale_mode:"down",lightbox_slider_loader_type:3,lightbox_slider_loader_color:"black",lightbox_slider_transition:"fade",lightbox_slider_image_padding_top:f.topPanelHeight,lightbox_slider_image_padding_bottom:0,lightbox_slider_video_padding_top:38,lightbox_slider_video_padding_bottom:0,lightbox_textpanel_align:"middle",lightbox_textpanel_padding_top:5,lightbox_textpanel_padding_bottom:5,slider_video_constantsize:!1,lightbox_slider_image_border:!1,lightbox_textpanel_enable_title:!0,lightbox_textpanel_enable_description:!1,lightbox_textpanel_desc_style_as_title:!0,lightbox_textpanel_enable_bg:!1,video_enable_closebutton:!1,lightbox_slider_video_enable_closebutton:!1,video_youtube_showinfo:!1,lightbox_slider_enable_links:!1},v={lightbox_overlay_opacity:.6,lightbox_slider_image_border:!0,lightbox_slider_image_shadow:!0,lightbox_slider_image_padding_top:30,lightbox_slider_image_padding_bottom:30,slider_video_constantsize:!0,lightbox_textpanel_align:"bottom",lightbox_textpanel_title_text_align:"left",lightbox_textpanel_desc_text_align:"left",lightbox_textpanel_padding_left:10,lightbox_textpanel_padding_right:10};function y(){1==f.isCompact&&1==m.lightbox_show_textpanel&&(m.lightbox_slider_image_padding_bottom=f.initTextPanelHeight),1==f.isCompact&&"inside"==m.lightbox_arrows_position&&(f.isArrowsInside=!0),1==f.isArrowsInside&&0==m.lightbox_arrows_inside_alwayson&&(f.isArrowsOnHoverMode=!0),0==m.lightbox_show_textpanel&&(f.isTopPanelEnabled=!1,f.topPanelHeight=0,m.lightbox_slider_image_padding_top=0)}function w(e){if(!c)return 1;e={slider_image_padding_top:e};c.setOptions(e),c.refreshSlideItems()}function I(){var e,t,i;r&&(!p||0!=(e=r.height())&&0!=r.is(":visible")&&(t=e,i=p.getSize().height,e!=f.topPanelHeight&&(t=f.topPanelHeight),t<i&&(t=i),e!=t&&(r.height(t),c&&0==c.isAnimating()&&w(t))))}function E(e){if(0==f.isOpened)return!1;if(!p)return!1;if(!c)return!1;var t,i=h.getElementSize(l),n=p.getSize();if(0==n.width||120<n.height)return!1;if(e||(t=c.getSlideImage(),e=h.getElementSize(t)),0==e.height||0==e.width)return!1;if(e.bottom+n.height<i.height)return!1;i=c.getOptions(),n=n.height;if(n!=i.slider_image_padding_bottom){n={slider_image_padding_bottom:n};if(0==c.isAnimating())return c.setOptions(n),c.refreshSlideItems(),!0}return!1}function T(e){h.getElementSize(l);var t,i,n=c.getSlideImage(),r=h.getElementSize(n);0!=r.width&&(f.textPanelLeft=r.left,f.textPanelTop=r.bottom,n=r.width,o&&(n-=(t=h.getElementSize(o)).width,t=r.right-t.width,h.placeElement(o,t,f.textPanelTop)),p&&(p.show(),p.refresh(!0,!0,n),(t=r)||(n=c.getSlideImage(),t=h.getElementSize(n)),f.textPanelTop=t.bottom,!0===i&&p.positionPanel(f.textPanelTop,f.textPanelLeft)),0==E(r)&&(f.positionFrom="handleCompactTextpanelSizes",p&&(p.positionPanel(f.textPanelTop,f.textPanelLeft),!0===e&&(e(),N()))))}function S(){return 0==c.isCurrentSlideType("image")||1==c.isCurrentImageInPlace()}function x(e,t){var i,n,r,o,a,s;0!=f.isArrowsInside&&u&&(o=S(),u.show(),d.show(),f.positionFrom="positionArrowsInside",1==f.isArrowsOnHoverMode&&1==o&&0==A()&&M(!0),o=(r=0==o?(i=h.getElementRelativePos(u,"left",m.lightbox_arrows_offset),n=h.getElementRelativePos(u,"middle"),h.getElementRelativePos(d,"right",m.lightbox_arrows_offset)):(a=c.getSlideImage(),s=h.getElementSize(a),h.getElementSize(c.getElement()),i=h.getElementRelativePos(u,"left",0,a)+s.left+m.lightbox_arrows_inside_offset,n=h.getElementRelativePos(u,"middle",0,a)+s.top,h.getElementRelativePos(u,"right",0,a)+s.left-m.lightbox_arrows_inside_offset),n),!0===t?(a={left:i,top:n},s={left:r,top:o},u.stop().animate(a,{duration:f.fadeDuration}),d.stop().animate(s,{duration:f.fadeDuration})):(u.stop(),d.stop(),h.placeElement(u,i,n),h.placeElement(d,r,o)),1==e&&O(t))}function P(e,t){f.positionFrom=null;var i,n,r,o,a=S(),s=h.getElementRelativePos(_,"right",2,l);0==a?(o=2,r=s):(n=c.getSlideImage(),i=h.getElementSize(n),a=h.getElementSize(c.getElement()),n=h.getElementSize(_),a.top==a.height&&(a.top=0),r=a.left+i.right-n.width/2+m.lightbox_compact_closebutton_offsetx,(o=a.top+i.top-n.height/2-m.lightbox_compact_closebutton_offsety)<2&&(o=2),s<r&&(r=s)),!0===t?(s={left:r,top:o},_.stop().animate(s,{duration:f.fadeDuration})):(_.stop(),h.placeElement(_,r,o)),!0===e&&(!0!==t&&_.stop(),_.fadeTo(f.fadeDuration,1))}function t(){_&&_.stop().fadeTo(f.fadeDuration,0),e(),C(),f.positionFrom="hideCompactElements",1==f.isArrowsInside&&M()}function j(){var e,t=h.getElementSize(l);r&&h.setElementSizeAndPosition(r,0,0,t.width,f.topPanelHeight),u&&0==f.isArrowsInside&&(1==m.lightbox_hide_arrows_onvideoplay&&(u.show(),d.show()),h.placeElement(u,"left","middle",m.lightbox_arrows_offset),h.placeElement(d,"right","middle",m.lightbox_arrows_offset)),0==f.isCompact&&h.placeElement(_,"right","top",2,2),p&&(f.positionFrom="positionElements",0==f.isCompact?(e=t,n={},i=m.lightbox_textpanel_width,e.width-47-40<i?(n.textpanel_padding_left=47,n.textpanel_padding_right=40,n.textpanel_title_text_align="center",n.textpanel_desc_text_align="center"):(n.textpanel_padding_left=Math.floor((e.width-i)/2),n.textpanel_padding_right=n.textpanel_padding_left,n.textpanel_title_text_align="left",n.textpanel_desc_text_align="left",m.lightbox_textpanel_title_text_align&&(n.textpanel_title_text_align=m.lightbox_textpanel_desc_text_align),m.lightbox_textpanel_desc_text_align&&(n.textpanel_desc_text_align=m.lightbox_textpanel_desc_text_align)),p.setOptions(n),p.refresh(!0,!0),I(),p.positionPanel()):(L(),N()));var i=t.width,n=t.height;c&&(r&&(t={slider_image_padding_top:r.height()},c.setOptions(t)),c.setSize(i,n),c.setPosition(0,0))}function e(){p&&p.getElement().stop().fadeTo(f.fadeDuration,0)}function C(){o&&o.stop().fadeTo(f.fadeDuration,0)}function A(){if(!f.lastMouseX)return!0;var e={pageX:f.lastMouseX,pageY:f.lastMouseY};return c.isMouseInsideSlideImage(e)}function M(e,t){return u&&(1==f.isArrowsOnHoverMode&&!1===t?(A(),1):void(!0===e?(u.stop().fadeTo(0,0),d.stop().fadeTo(0,0)):(u.stop().fadeTo(f.fadeDuration,0),d.stop().fadeTo(f.fadeDuration,0))))}function O(e,t){return u&&(1==f.isArrowsOnHoverMode&&!0!==t&&1==S()||(1==c.isSwiping()||(!0!==e&&(u.stop(),d.stop()),u.fadeTo(f.fadeDuration,1),void d.fadeTo(f.fadeDuration,1))))}function z(e){p&&(e=e||c.getCurrentItem(),p.setTextPlain(e.title,e.description))}function k(e){var t;o&&(e=e||c.getCurrentItem(),t=g.getNumItems(),e=e.index+1,o.html(e+" / "+t))}function L(){p&&p.getElement().show().stop().fadeTo(f.fadeDuration,1)}function N(){o&&o.stop().fadeTo(f.fadeDuration,1)}function H(){if(0==f.isCompact)return!0;t()}function R(){if(0==f.isCompact)return!0;f.positionFrom="onZoomChange",P(!1,!0),x(!1,!0),1==f.isCompact&&(0==(c.isCurrentSlideType("image")&&1==c.isCurrentImageInPlace())?(e(),C()):(f.positionFrom="onZoomChange",L(),N()))}function G(){if(0==f.isCompact)return!0;f.positionFrom="onSliderAfterReturn",P(!0),x(!0),0==E()&&T(),L(),N()}function D(e,t){return t=jQuery(t),0==f.isCompact||(0==c.isSlideCurrent(t)||(f.positionFrom="onSliderAfterPutImage",P(!0),x(!0),void T()))}function Q(){var e,t=c.getOptions().slider_image_padding_top;!r||(e=r.height())!=t&&w(e),1==f.isCompact&&(z(),k(),f.positionFrom="onSliderTransitionEnd",P(!0),x(!0),0==c.isSlideActionActive()&&0==E()&&T(),L(),N())}function W(e,t){0==f.isCompact?(o&&k(t),p&&(z(t),0==f.isRightNowOpened&&(p.positionElements(!1),I(),p.positionPanel()))):0==c.isAnimating()&&(p&&z(t),o&&k(t)),0==f.isSliderChangedOnce&&(f.isSliderChangedOnce=!0,s.trigger(a.events.LIGHTBOX_INIT))}function B(e,t){return!("image"==c.getSlideType()||0!=f.isCompact||!c.isSlideActionActive())||(1==c.isPreloading()?(a.close("slider"),!0):void(1==m.lightbox_close_on_emptyspace&&0==c.isMouseInsideSlideImage(t)&&a.close("slider_inside")))}function F(){j()}function Y(){r?r&&r.hide():o&&o.hide(),u&&1==m.lightbox_hide_arrows_onvideoplay&&(u.hide(),d.hide())}function U(){r?(r&&r.show(),I()):o&&o.show(),u&&1==m.lightbox_hide_arrows_onvideoplay&&(u.show(),d.show())}function V(e,t,i){var n=!1;switch(t){case 27:1==f.isOpened&&a.close("keypress");break;case 38:case 40:case 33:case 34:n=!0}1==f.isOpened&&1==n&&i.preventDefault()}function X(){1==f.isArrowsOnHoverMode&&O(!1,!0)}function Z(e){f.positionFrom="hideCompactElements",1==f.isArrowsOnHoverMode&&1==S()&&M(!1,!0)}function q(e){f.lastMouseX=e.pageX,f.lastMouseY=e.pageY,1==(!u||(0==u.is(":visible")||1!=u.css("opacity")))&&A()&&0==c.isAnimating()&&(f.positionFrom="onMouseMove",u&&0==u.is(":animated")&&O(!1,!0))}function K(e,t,i,n){if(0==f.isOpened)return!0;switch(m.gallery_mousewheel_role){default:case"zoom":"image"!=c.getSlideType()&&e.preventDefault();break;case"none":e.preventDefault();break;case"advance":g.onGalleryMouseWheel(e,t,i,n)}}this.destroy=function(){var e;jQuery(document).unbind("mousemove"),n.off("touchstart"),n.off("touchend"),_.off("click"),i.off(g.events.ITEM_CHANGE),c&&(jQuery(c).off(c.events.TRANSITION_END),jQuery(c).off(c.events.CLICK),jQuery(c).off(c.events.START_DRAG),jQuery(c).off(c.events.TRANSITION_START),jQuery(c).off(c.events.AFTER_DRAG_CHANGE),jQuery(c).off(c.events.AFTER_RETURN),e=c.getVideoObject(),jQuery(e).off(e.events.PLAY_START),jQuery(e).off(e.events.PLAY_STOP),jQuery(c).on(c.events.IMAGE_MOUSEENTER,X),jQuery(c).on(c.events.IMAGE_MOUSELEAVE,Z),c.destroy()),jQuery(window).unbind("resize"),i.off(g.events.GALLERY_KEYPRESS,V),l.off("mousewheel"),l.remove()},this.isOpened=function(){return f.isOpened},this.open=function(e){e=g.getItem(e);f.isOpened=!0,f.isRightNowOpened=!0,setTimeout(function(){f.isRightNowOpened=!1},100),c&&c.setItem(e,"lightbox_open"),p&&p.setTextPlain(e.title,e.description),n.stop().fadeTo(0,0),l.show(),l.fadeTo(0,1),n.stop().fadeTo(f.fadeDuration,m.lightbox_overlay_opacity),j(),1==f.isCompact&&(1==c.isPreloading()?(_&&_.hide(),u&&1==f.isArrowsInside&&(u.hide(),d.hide()),o&&o.hide(),p&&p.hide()):1==f.isArrowsInside&&(u.hide(),d.hide())),c&&c.startSlideAction(),i.trigger(g.events.OPEN_LIGHTBOX,e)},this.close=function(e){f.isOpened=!1,1==f.isCompact&&t(),c&&c.stopSlideAction(),"image"!=c.getSlideType()?l.hide():l.fadeTo(f.fadeDuration,0,function(){l.hide()}),i.trigger(g.events.CLOSE_LIGHTBOX)},this.init=function(e,t){t=t,g=e=e,i=jQuery(e),g.setObjLightbox(a),m=jQuery.extend(m,b),m=jQuery.extend(m,t),f.originalOptions=jQuery.extend({},m),"compact"==m.lightbox_type&&(f.isCompact=!0,m=jQuery.extend(m,v),m=jQuery.extend(m,t)),y(),c=1==f.putSlider?(g.initSlider(m,"lightbox"),e.getObjects().g_objSlider):null,1==m.lightbox_show_textpanel?p.init(g,m,"lightbox"):p=null},this.putHtml=function(){var e,t;g.isSmallWindow()&&1==f.isCompact&&(f.isCompact=!1,y(),f.isArrowsInside=!1,f.isArrowsOnHoverMode=!1,(m=jQuery.extend({},f.originalOptions)).lightbox_arrows_position="sides",c.setOptions(m)),t=e="",1==f.isCompact&&(t=" ug-lightbox-compact"),e+="<div class='ug-gallery-wrapper ug-lightbox"+t+"' >",e+="<div class='ug-lightbox-overlay'></div>",0==f.isCompact&&f.isTopPanelEnabled?(e+="<div class='ug-lightbox-top-panel'>",e+="<div class='ug-lightbox-top-panel-overlay'></div>",m.lightbox_show_numbers&&(e+="<div class='ug-lightbox-numbers'></div>"),e+="</div>"):m.lightbox_show_numbers&&(e+="<div class='ug-lightbox-numbers'></div>"),e+="<div href=\"javascript:void(0)\" class='ug-lightbox-button-close'></div>",e+="<div class='ug-lightbox-arrow-left'></div>",e+="<div class='ug-lightbox-arrow-right'></div>",e+="</div>",l=jQuery(e),jQuery("body").append(l),c&&c.setHtml(l),n=l.children(".ug-lightbox-overlay"),0==f.isCompact&&1==f.isTopPanelEnabled&&0==(r=l.children(".ug-lightbox-top-panel")).length&&(r=null),_=l.find(".ug-lightbox-button-close"),m.lightbox_show_numbers&&(o=l.find(".ug-lightbox-numbers")),u=l.children(".ug-lightbox-arrow-left"),d=l.children(".ug-lightbox-arrow-right"),p&&(r?p.appendHTML(r):p.appendHTML(l))},this.run=function(){var e;null!==m.lightbox_overlay_color&&n.css("background-color",m.lightbox_overlay_color),null!==m.lightbox_overlay_opacity&&n.fadeTo(0,m.lightbox_overlay_opacity),r&&null!==m.lightbox_top_panel_opacity&&r.children(".ug-lightbox-top-panel-overlay").fadeTo(0,m.lightbox_top_panel_opacity),o&&(e={},null!==m.lightbox_numbers_size&&(e["font-size"]=m.lightbox_numbers_size+"px"),m.lightbox_numbers_color&&(e.color=m.lightbox_numbers_color),null!==m.lightbox_numbers_padding_right&&(e["padding-right"]=m.lightbox_numbers_padding_right+"px"),null!==m.lightbox_numbers_padding_top&&(e["padding-top"]=m.lightbox_numbers_padding_top+"px"),o.css(e)),c&&c.run(),n.on("touchstart",function(e){e.preventDefault()}),n.on("touchend",function(e){a.close("overlay")}),h.addClassOnHover(d,"ug-arrow-hover"),h.addClassOnHover(u,"ug-arrow-hover"),h.addClassOnHover(_),g.setNextButton(d),g.setPrevButton(u),_.on("click",function(){a.close("button")}),i.on(g.events.ITEM_CHANGE,W),c&&(jQuery(c).on(c.events.TRANSITION_END,Q),jQuery(c).on(c.events.CLICK,B),e=c.getVideoObject(),jQuery(e).on(e.events.PLAY_START,Y),jQuery(e).on(e.events.PLAY_STOP,U),jQuery(c).on(c.events.START_DRAG,H),jQuery(c).on(c.events.TRANSITION_START,H),jQuery(c).on(c.events.AFTER_DRAG_CHANGE,G),jQuery(c).on(c.events.AFTER_RETURN,G),jQuery(c).on(c.events.AFTER_PUT_IMAGE,D),jQuery(c).on(c.events.ZOOM_CHANGE,R),jQuery(c).on(c.events.IMAGE_MOUSEENTER,X),jQuery(c).on(c.events.IMAGE_MOUSELEAVE,Z)),jQuery(window).resize(function(){return 0==f.isOpened||void h.whenContiniousEventOver("lightbox_resize",F,100)}),i.on(g.events.GALLERY_KEYPRESS,V),1==f.isArrowsOnHoverMode&&jQuery(document).bind("mousemove",q),l.on("mousewheel",K)}}function UGCarousel(){var n,r,s,l,o,i=this,t=jQuery(this),u=new UniteGalleryMain,d=new UGFunctions,a=new UGTileDesign,_=new UGThumbsGeneral,g={carousel_padding:8,carousel_space_between_tiles:20,carousel_navigation_numtiles:3,carousel_scroll_duration:500,carousel_scroll_easing:"easeOutCubic",carousel_autoplay:!0,carousel_autoplay_timeout:3e3,carousel_autoplay_direction:"right",carousel_autoplay_pause_onhover:!0,carousel_vertical_scroll_ondrag:!1},c={eventSizeChange:"thumb_size_change",isFirstTimeRun:!0,carouselMaxWidth:null,tileWidth:0,initTileWidth:0,initTileHeight:0,sideSpace:1500,spaceActionSize:500,numCurrent:0,touchActive:!(this.events={START_PLAY:"carousel_start_play",PAUSE_PLAY:"carousel_pause_play",STOP_PLAY:"carousel_stop_play"}),startInnerPos:0,lastTime:0,startTime:0,startMousePos:0,lastMousePos:0,scrollShortDuration:200,scrollShortEasing:"easeOutQuad",handle:null,isPlayMode:!1,isPaused:!1,storedEventID:"carousel"};function h(e,t){t=t||c.initTileHeight/c.initTileWidth*e;var i={tile_width:c.tileWidth=e,tile_height:t};a.setOptions(i),g.tile_width=e,g.tile_height=t,a.resizeAllTiles(e),I(!0)}function e(){if(null===c.carouselMaxWidth)throw new Error("The carousel width not set");var e;c.tileWidth<c.initTileWidth?((e=c.carouselMaxWidth-2*g.carousel_padding)>c.initTileWidth&&(e=c.initTileWidth),h(e),t=d.getNumItemsInSpace(c.carouselMaxWidth,e,g.carousel_space_between_tiles)):(t=d.getNumItemsInSpace(c.carouselMaxWidth,c.tileWidth,g.carousel_space_between_tiles))<=0&&(t=1,h(e=c.carouselMaxWidth-2*g.carousel_padding));var t=d.getSpaceByNumItems(t,c.tileWidth,g.carousel_space_between_tiles);t+=2*g.carousel_padding,s.width(t),1==c.isFirstTimeRun?(a.initEvents(),s.bind("mousedown touchstart",A),jQuery("body").bind("mousemove touchmove",M),jQuery(window).add("body").bind("mouseup touchend",O),s.hover(z,k),a.run(),jQuery.each(r,function(e,t){t.objThumbWrapper.data("index",e),n.trigger(c.eventSizeChange,[t.objThumbWrapper,!0]),t.objTileOriginal=t.objThumbWrapper.clone(!0,!0)}),I(!0)):(1==g.carousel_autoplay&&i.pauseAutoplay(),x(0,!1)),1==g.carousel_autoplay&&i.startAutoplay(),d.placeElement(l,0,g.carousel_padding),j(),c.isFirstTimeRun=!1}function p(){return d.getElementSize(l).left}function m(e){return d.getMousePosition(e).pageX}function f(){return l.children(".ug-thumb-wrapper")}function b(e){return d.getNumItemsInSpace(e,c.tileWidth,g.carousel_space_between_tiles)}function v(){return f().length}function y(e){E(e);var t=f();return jQuery(t[e])}function w(){return b(d.getElementSize(s).width)}function I(e){e=e||!1;var i,n=f(),r=0,o=0;return jQuery.each(n,function(e,t){t=jQuery(t),d.placeElement(t,r,0);t=d.getElementSize(t);r+=t.width+g.carousel_space_between_tiles,o=Math.max(o,t.height),e==n.length-1&&(i=t.right)}),l.width(i),o+=2*g.carousel_padding,!0===e&&(l.height(o),s.height(o)),x(c.numCurrent,!1),i}function E(e){if(e>f().length-1)throw new Error("Wrogn tile number: "+e)}function T(e,i){e=function(e,t,i){if(null==(s=e.data("index")))throw new Error("every tile should have index!");for(var n,r=[],o=0;o<t;o++){if(!(n="prev"==i?u.getPrevItem(s,!0):u.getNextItem(s,!0)))throw new Error("the item to add is empty");var a=n.objTileOriginal.clone(!0,!0),s=n.index;a.addClass("cloned"),r.push(a)}return r}("left"==i?l.children(".ug-thumb-wrapper").first():l.children(".ug-thumb-wrapper").last(),e,"left"==i?"prev":"next");jQuery.each(e,function(e,t){"left"==i?l.prepend(t):l.append(t),n.trigger(c.eventSizeChange,t),a.loadTileImage(t)})}function S(e,t){E(void 0);for(var i=f(),n=i.length,r=0;r<e;r++)("left"==t?jQuery(i[r]):jQuery(i[n-1-r])).remove()}function x(e,t,i){if(void 0===t){t=!0;if(l.is(":animated"))return 1}var n=y(e),r={left:-d.getElementSize(n).left+g.carousel_padding+"px"};!0===t?(n=g.carousel_scroll_duration,t=g.carousel_scroll_easing,!0===i&&(n=c.scrollShortDuration,t=c.scrollShortEasing),l.stop(!0).animate(r,{duration:n,easing:t,queue:!1,complete:function(){c.numCurrent=e,j()}})):(c.numCurrent=e,l.css(r))}function P(){var e,t,i,n;x((e=-p(),t=b(e),i=d.getElementSize(y(t)).left,n=d.getElementSize(y(t+1)).left,Math.abs(i-e)<Math.abs(n-e)?t:t+1),!0,!0)}function j(){var e=(r=-p(),c.sideSpace-r),t=(o=d.getElementSize(s),a=(a=d.getElementSize(l)).width-o.width+a.left,c.sideSpace-a),i=0,n=0,r=0,o=0,a=v();if(e>c.spaceActionSize?(T(i=b(e),"left"),c.numCurrent+=i):e<-c.spaceActionSize&&(S(r=b(Math.abs(e)),"left"),c.numCurrent-=r),t>c.spaceActionSize?T(n=b(t),"right"):t<-c.spaceActionSize&&S(o=b(Math.abs(t)),"right"),a<o)throw new Error("Can't remove more then num tiles");a=!1;return(i||n||r||o)&&(I(),a=!0),a}function C(){"left"==g.carousel_autoplay_direction?i.scrollRight(1):i.scrollLeft(1)}function A(e){if(1==c.touchActive)return!0;c.touchActive=!0,i.pauseAutoplay(),c.startTime=jQuery.now(),c.startMousePos=m(e),c.startInnerPos=p(),c.lastTime=c.startTime,c.lastMousePos=c.startMousePos,d.storeEventData(e,c.storedEventID)}function M(e){if(0==c.touchActive)return!0;d.updateStoredEventData(e,c.storedEventID),e.preventDefault();var t=null;if(1==g.carousel_vertical_scroll_ondrag&&(t=d.handleScrollTop(c.storedEventID)),"vert"===t)return!0;c.lastMousePos=m(e);var i=c.lastMousePos-c.startMousePos,t=c.startInnerPos+i,e=0<i?"prev":"next";0<t&&"prev"==e&&(t/=3),t<-d.getElementSize(l).width&&"next"==e&&(t=c.startInnerPos+i/3),t={left:(t=t)+"px"},l.css(t)}function O(e){if(0==c.touchActive)return!0;c.touchActive=!1,P(),i.unpauseAutoplay()}function z(e){if(0==g.carousel_autoplay_pause_onhover)return!0;1==c.isPlayMode&&0==c.isPaused&&i.pauseAutoplay()}function k(e){if(0==g.carousel_autoplay_pause_onhover)return!0;i.unpauseAutoplay()}function L(){var e=c.lastTime-c.startTime,t=Math.abs(c.lastMousePos-c.startMousePos);return!(300<e)&&!(30<t)}this.startAutoplay=function(){c.isPlayMode=!0,c.isPaused=!1,t.trigger(i.events.START_PLAY),c.handle&&clearInterval(c.handle),c.handle=setInterval(C,g.carousel_autoplay_timeout)},this.unpauseAutoplay=function(){return 0==c.isPlayMode||(0==c.isPaused||void i.startAutoplay())},this.pauseAutoplay=function(){if(0==c.isPlayMode)return!0;c.isPaused=!0,c.handle&&clearInterval(c.handle),t.trigger(i.events.PAUSE_PLAY)},this.stopAutoplay=function(){if(0==c.isPlayMode)return!0;c.isPaused=!1,c.isPlayMode=!1,c.handle&&clearInterval(c.handle),t.trigger(i.events.STOP_PLAY)},this.destroy=function(){c.handle&&clearInterval(c.handle),t.off(i.events.START_PLAY),t.off(i.events.STOP_PLAY),s.unbind("mousedown"),s.unbind("touchstart"),jQuery("body").unbind("mousemove"),jQuery("body").unbind("touchmove"),jQuery(window).add("body").unbind("mouseup").unbind("touchend"),s.off("mouseenter").off("mouseleave"),a.destroy()},this.init=function(e,t,i){i&&this.setMaxWidth(i),t=t,o=(e=e).getObjects(),u=e,jQuery(e),n=o.g_objWrapper,r=o.g_arrItems,g=jQuery.extend(g,t),a.setFixedMode(),a.setApproveClickFunction(L),a.init(e,g),_=a.getObjThumbs(),g=a.getOptions(),c.initTileWidth=g.tile_width,c.initTileHeight=g.tile_height,c.tileWidth=g.tile_width},this.setMaxWidth=function(e){c.carouselMaxWidth=e},this.setHtml=function(e){n.append("<div class='ug-carousel-wrapper'><div class='ug-carousel-inner'></div></div>"),s=n.children(".ug-carousel-wrapper"),l=s.children(".ug-carousel-inner"),a.setHtml(l),_.getThumbs().fadeTo(0,1)},this.getElement=function(){return s},this.getObjTileDesign=function(){return a},this.getEstimatedHeight=function(){return g.tile_height+2*g.carousel_padding},this.run=function(){e()},this.scrollRight=function(e){e&&"object"!=typeof e||(e=g.carousel_navigation_numtiles);var t=w();t<e&&(e=t);e=c.numCurrent-e;e<=0&&(e=0),x(e)},this.scrollLeft=function(e){e&&"object"!=typeof e||(e=g.carousel_navigation_numtiles);var t=w();t<e&&(e=t);t=v(),e=c.numCurrent+e;t<=e&&(e=t-1),x(e)},this.setScrollLeftButton=function(e){d.setButtonMobileReady(e),d.setButtonOnClick(e,i.scrollLeft)},this.setScrollRightButton=function(e){d.setButtonMobileReady(e),d.setButtonOnClick(e,i.scrollRight)},this.setPlayPauseButton=function(e){d.setButtonMobileReady(e),1==c.isPlayMode&&0==c.isPaused&&e.addClass("ug-pause-icon"),t.on(i.events.START_PLAY,function(){e.addClass("ug-pause-icon")}),t.on(i.events.STOP_PLAY,function(){e.removeClass("ug-pause-icon")}),d.setButtonOnClick(e,function(){0==c.isPlayMode||1==c.isPaused?i.startAutoplay():i.stopAutoplay()})}}function UGLoadMore(){jQuery(this);var i,n,r,o,a=new UniteGalleryMain,s=(new UGFunctions,{isInited:!1}),l={loadmore_container:"ug_loadmore_wrapper"};function u(){i.show()}function d(){n.hide(),r.show();var e={numitems:a.getNumItems()};a.ajaxRequest("front_loadmore",e,function(e){r.hide();var t=e.html_items;1==e.show_loadmore?(n.blur().show(),r.hide()):i.hide(),a.addItems(t)},function(e){e="Ajax Error!"+e,r.hide(),o.show(),o.html(e)})}this.events={},this.destroy=function(){if(0==s.isInited)return!1},this.init=function(e,t){if(a=e,jQuery(a),l=jQuery.extend(l,t),0!=(i=jQuery("#"+l.loadmore_container)).length&&0!=(n=i.find(".ug-loadmore-button")).length&&0!=(r=i.find(".ug-loadmore-loader")).length&&0!=(o=i.find(".ug-loadmore-error")).length&&(s.isInited=!0),0==s.isInited)return trace("load more not inited, something is wrong"),!1;a.onEvent("tiles_first_placed",u),n.click(d)}}function UGTabs(){jQuery(this);var i,n,r=new UniteGalleryMain,o=(new UGFunctions,{tabs_type:"tabs",tabs_container:"#ug_tabs",tabs_class_selected:"ug-tab-selected"});function e(){"select"==o.tabs_type?n.change(s):i.click(t)}function a(e){r.requestNewItems(e)}function t(){var e=o.tabs_class_selected,t=jQuery(this);if(t.hasClass(e))return!0;i.not(t).removeClass(e),t.addClass(e);t=t.data("catid");if(!t)return!0;a(t)}function s(){var e=jQuery(this).val();if(!e)return!0;a(e)}this.events={},this.destroy=function(){n&&n.off("change"),i&&i.off("click")},this.init=function(e,t){t=t,r=e,jQuery(r),"select"==(o=jQuery.extend(o,t)).tabs_type?n=jQuery(o.tabs_container):i=jQuery(o.tabs_container+" .ug-tab")},this.run=function(){e()}}function UG_API(e){var n,r=this,o=(jQuery(r),new UniteGalleryMain),a=[];function s(e){var t,i={index:e.index,title:e.title,description:e.description,urlImage:e.urlImage,urlThumb:e.urlThumb},n=e.objThumbImage.data();for(t in n){switch(t){case"image":case"description":continue}i[t]=n[t]}return i}o=e,n=jQuery(e),this.events={API_INIT_FUNCTIONS:"api_init",API_ON_EVENT:"api_on_event"},this.on=function(e,t,i){switch(!0!==i&&a.push({event:e,func:t}),e){case"item_change":n.on(o.events.ITEM_CHANGE,function(){var e=s(o.getSelectedItem());t(e.index,e)});break;case"resize":n.on(o.events.SIZE_CHANGE,t);break;case"enter_fullscreen":n.on(o.events.ENTER_FULLSCREEN,t);break;case"exit_fullscreen":n.on(o.events.EXIT_FULLSCREEN,t);break;case"play":n.on(o.events.START_PLAY,t);break;case"stop":n.on(o.events.STOP_PLAY,t);break;case"pause":n.on(o.events.PAUSE_PLAYING,t);break;case"continue":n.on(o.events.CONTINUE_PLAYING,t);break;case"open_lightbox":n.on(o.events.OPEN_LIGHTBOX,t);break;case"close_lightbox":n.on(o.events.CLOSE_LIGHTBOX,t);break;default:console&&console.log("wrong api event: "+e)}n.trigger(r.events.API_ON_EVENT,[e,t])},this.play=function(){o.startPlayMode()},this.stop=function(){o.stopPlayMode()},this.togglePlay=function(){o.togglePlayMode()},this.enterFullscreen=function(){o.toFullScreen()},this.exitFullscreen=function(){o.exitFullScreen()},this.toggleFullscreen=function(){o.toggleFullscreen()},this.resetZoom=function(){var e=o.getObjSlider();if(!e)return!1;e.zoomBack()},this.zoomIn=function(){var e=o.getObjSlider();if(!e)return!1;e.zoomIn()},this.zoomOut=function(){var e=o.getObjSlider();if(!e)return!1;e.zoomOut()},this.nextItem=function(){o.nextItem()},this.prevItem=function(){o.prevItem()},this.selectItem=function(e){o.selectItem(e)},this.resize=function(e,t){t?o.resize(e,t):o.resize(e)},this.getItem=function(e){return s(o.getItem(e))},this.getNumItems=function(){return o.getNumItems()},this.getNumCurrent=function(){return o.getCurrentNumItem()},this.reloadGallery=function(e){e=e||{},o.run(null,e),a.map(function(e){r.on(e.event,e.func,!0)})},this.changeItems=function(e){o.changeItems(e)},this.addItems=function(e){o.addItems(e)},this.destroy=function(){o.destroy()},n.trigger(r.events.API_INIT_FUNCTIONS,r)}jQuery.fn.unitegallery=function(e){var t="#"+jQuery(this).attr("id");e=e||{};var i=new UniteGalleryMain;return i.run(t,e),void 0===window.ugArrGalleriesObjects&&(window.ugArrGalleriesObjects=[]),window.ugArrGalleriesObjects.push(i),new UG_API(i)};
assets_libraries/unitegallery/release_log.txt CHANGED
@@ -1,7 +1,20 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  version 1.7.60
3
 
4
- feature: changed the arrows to svg
5
 
6
  version 1.7.59
7
 
1
 
2
+
3
+ version 1.7.64
4
+
5
+ -fixed strict standards
6
+
7
+ version 1.7.63
8
+
9
+ -fixed some lazy load issues
10
+
11
+ version 1.7.61
12
+
13
+ -feature: added option: gallery_height_mobile
14
+
15
  version 1.7.60
16
 
17
+ -feature: changed the arrows to svg
18
 
19
  version 1.7.59
20
 
assets_libraries/unitegallery/skins/default/slider_bullets.png DELETED
Binary file
assets_libraries/unitegallery/skins/default/tile_bullets_blue.png DELETED
Binary file
assets_libraries/unitegallery/skins/default/tile_bullets_brown.png DELETED
Binary file
assets_libraries/unitegallery/skins/default/tile_bullets_gray.png DELETED
Binary file
assets_libraries/unitegallery/skins/default/tile_bullets_green.png DELETED
Binary file
assets_libraries/unitegallery/skins/default/tile_bullets_red.png DELETED
Binary file
css/unitecreator_styles.css CHANGED
@@ -1669,3 +1669,40 @@ ul.uc-list-pages-thumbs li a i{
1669
  padding-top:20px;
1670
  padding-bottom:10px;
1671
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1669
  padding-top:20px;
1670
  padding-bottom:10px;
1671
  }
1672
+
1673
+ #---------------PREVIEW-ADDON-NEW---------------------{}
1674
+
1675
+ .uc-preview-addon-wrapper{
1676
+ display:flex;
1677
+ padding-top:20px;
1678
+ }
1679
+
1680
+ .uc-preview-addon-left{
1681
+ width:450px;
1682
+ padding:20px;
1683
+ }
1684
+
1685
+ .uc-preview-addon-right{
1686
+ width:calc(100% - 450px);
1687
+ xborder:1px solid gray;
1688
+ margin-right:20px;
1689
+ padding:20px;
1690
+ box-sizing:border-box;
1691
+ position:relative;
1692
+ }
1693
+
1694
+ .uc-preview-addon-loader{
1695
+
1696
+ position:absolute;
1697
+ top:40px;
1698
+ left:115px;
1699
+ }
1700
+
1701
+ .uc-preview-loading{
1702
+
1703
+ opacity:0.4;
1704
+
1705
+ }
1706
+
1707
+
1708
+
inc_php/unitecreator_actions.class.php CHANGED
@@ -9,6 +9,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
9
 
10
  class UniteCreatorActions{
11
 
 
12
 
13
  /**
14
  * on update layout response, function for override
@@ -69,6 +70,9 @@ class UniteCreatorActions{
69
  */
70
  public function onAjaxAction(){
71
 
 
 
 
72
  $actionType = UniteFunctionsUC::getPostGetVariable("action","",UniteFunctionsUC::SANITIZE_KEY);
73
 
74
  if($actionType != GlobalsUC::PLUGIN_NAME."_ajax_action")
9
 
10
  class UniteCreatorActions{
11
 
12
+ const DEBUG_ERRORS = false;
13
 
14
  /**
15
  * on update layout response, function for override
70
  */
71
  public function onAjaxAction(){
72
 
73
+ if(self::DEBUG_ERRORS == true)
74
+ ini_set("display_errors","on");
75
+
76
  $actionType = UniteFunctionsUC::getPostGetVariable("action","",UniteFunctionsUC::SANITIZE_KEY);
77
 
78
  if($actionType != GlobalsUC::PLUGIN_NAME."_ajax_action")
inc_php/unitecreator_addon_config.class.php CHANGED
@@ -8,7 +8,8 @@
8
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
9
 
10
  class UniteCreatorAddonConfig extends HtmlOutputBaseUC{
11
-
 
12
  private $startWithAddon = false;
13
  private $isPreviewMode = false;
14
  private $startAddon;
@@ -40,6 +41,7 @@ class UniteCreatorAddonConfig extends HtmlOutputBaseUC{
40
  * get preview html
41
  */
42
  private function getHtmlPreview(){
 
43
  $html = "";
44
 
45
  //preview
@@ -64,7 +66,7 @@ class UniteCreatorAddonConfig extends HtmlOutputBaseUC{
64
  * get item settings html
65
  */
66
  private function getHtmlSettings($putMode = false){
67
-
68
  $html = "";
69
 
70
  $html .= self::TAB3."<div class='uc-addon-config-settings unite-settings'>".self::BR;
@@ -149,7 +151,6 @@ class UniteCreatorAddonConfig extends HtmlOutputBaseUC{
149
 
150
  $options = $this->startAddon->getOptions();
151
  $urlIcon = $this->startAddon->getUrlIcon();
152
-
153
 
154
  $options["title"] = $this->startAddon->getTitle();
155
  $options["url_icon"] = $urlIcon;
8
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
9
 
10
  class UniteCreatorAddonConfig extends HtmlOutputBaseUC{
11
+
12
+
13
  private $startWithAddon = false;
14
  private $isPreviewMode = false;
15
  private $startAddon;
41
  * get preview html
42
  */
43
  private function getHtmlPreview(){
44
+
45
  $html = "";
46
 
47
  //preview
66
  * get item settings html
67
  */
68
  private function getHtmlSettings($putMode = false){
69
+
70
  $html = "";
71
 
72
  $html .= self::TAB3."<div class='uc-addon-config-settings unite-settings'>".self::BR;
151
 
152
  $options = $this->startAddon->getOptions();
153
  $urlIcon = $this->startAddon->getUrlIcon();
 
154
 
155
  $options["title"] = $this->startAddon->getTitle();
156
  $options["url_icon"] = $urlIcon;
inc_php/unitecreator_addons.class.php CHANGED
@@ -667,14 +667,27 @@ class UniteCreatorAddons extends UniteElementsBaseUC{
667
 
668
  $addonName = UniteFunctionsUC::getVal($addonData, "name");
669
  $addonType = UniteFunctionsUC::getVal($addonData, "addontype");
670
-
 
 
671
  //init addon
672
  $objAddon = new UniteCreatorAddon();
 
 
673
 
674
- if(empty($addonType))
675
- $objAddon->initByName($addonName);
676
- else
677
- $objAddon->initByAlias($addonName, $addonType);
 
 
 
 
 
 
 
 
 
678
 
679
  $elementorSettings = UniteFunctionsUC::getVal($addonData, "elementor_settings");
680
 
@@ -689,22 +702,32 @@ class UniteCreatorAddons extends UniteElementsBaseUC{
689
  $objAddon = $objWidget->setAddonSettingsFromElementorSettings($objAddon, $elementorSettings);
690
 
691
  }else{ //init by blox settings
692
-
693
- //set addon data
694
- $arrConfig = UniteFunctionsUC::getVal($addonData, "config");
695
- if(!empty($arrConfig))
696
- $objAddon->setParamsValues($arrConfig);
697
-
698
- $arrItems = UniteFunctionsUC::getVal($addonData, "items");
699
- if(!empty($arrItems))
700
- $objAddon->setArrItems($arrItems);
701
-
702
- $arrFonts = UniteFunctionsUC::getVal($addonData, "fonts");
703
- if(!empty($arrFonts))
704
- $objAddon->setArrFonts($arrFonts);
 
 
 
 
 
 
 
 
 
 
 
705
 
706
  }
707
-
708
 
709
  return($objAddon);
710
  }
667
 
668
  $addonName = UniteFunctionsUC::getVal($addonData, "name");
669
  $addonType = UniteFunctionsUC::getVal($addonData, "addontype");
670
+
671
+ $addonID = UniteFunctionsUC::getVal($addonData, "id");
672
+
673
  //init addon
674
  $objAddon = new UniteCreatorAddon();
675
+
676
+ if(empty($addonName) && !empty($addonID) && is_numeric($addonID)){
677
 
678
+ // init by id
679
+
680
+ $objAddon->initByID($addonID);
681
+ }else{
682
+
683
+ // init by name or alias and type
684
+
685
+ if(empty($addonType))
686
+ $objAddon->initByName($addonName);
687
+ else
688
+ $objAddon->initByAlias($addonName, $addonType);
689
+
690
+ }
691
 
692
  $elementorSettings = UniteFunctionsUC::getVal($addonData, "elementor_settings");
693
 
702
  $objAddon = $objWidget->setAddonSettingsFromElementorSettings($objAddon, $elementorSettings);
703
 
704
  }else{ //init by blox settings
705
+
706
+ $arrSettings = UniteFunctionsUC::getVal($addonData, "settings");
707
+
708
+ if(!empty($arrSettings)){
709
+
710
+ $objAddon->setParamsValues($arrSettings);
711
+
712
+ }else{
713
+
714
+ //set addon data
715
+ $arrConfig = UniteFunctionsUC::getVal($addonData, "config");
716
+ if(!empty($arrConfig))
717
+ $objAddon->setParamsValues($arrConfig);
718
+
719
+ $arrItems = UniteFunctionsUC::getVal($addonData, "items");
720
+ if(!empty($arrItems))
721
+ $objAddon->setArrItems($arrItems);
722
+
723
+ $arrFonts = UniteFunctionsUC::getVal($addonData, "fonts");
724
+ if(!empty($arrFonts))
725
+ $objAddon->setArrFonts($arrFonts);
726
+
727
+ }
728
+
729
 
730
  }
 
731
 
732
  return($objAddon);
733
  }
inc_php/unitecreator_dialog_param.class.php CHANGED
@@ -969,6 +969,12 @@ class UniteCreatorDialogParamWork{
969
 
970
  <div class="vert_sap10"></div>
971
 
 
 
 
 
 
 
972
  <hr>
973
 
974
  <div class="vert_sap10"></div>
969
 
970
  <div class="vert_sap10"></div>
971
 
972
+ <?php
973
+ $this->putCheckbox("disable_pagination", __("Disable Pagination Pane", "unlimited-elements-for-elementor"));
974
+ ?>
975
+
976
+ <div class="vert_sap10"></div>
977
+
978
  <hr>
979
 
980
  <div class="vert_sap10"></div>
inc_php/unitecreator_entrance_animations.class.php CHANGED
@@ -120,20 +120,20 @@ class UniteCreatorEntranceAnimations{
120
 
121
  $objSettings->addRangeSlider($name."_duration", 0.6, __("Animation Duration (sec)","unlimited-elements-for-elementor"), $params);
122
 
 
 
123
  $params = array();
124
  $params["origtype"] = UniteCreatorDialogParam::PARAM_SLIDER;
125
  $params["elementor_condition"] = array(
126
  $name."_type!" => "none"
127
  );
128
 
129
- //------ animation step----------
130
-
131
- $params["min"] = 0;
132
- $params["max"] = 0.7;
133
  $params["step"] = 0.1;
134
  $params["units"] = "nothing";
135
 
136
- $objSettings->addRangeSlider($name."_step", 0.3, __("Step Duration (sec)","unlimited-elements-for-elementor"), $params);
137
 
138
 
139
  //------ item order----------
@@ -433,18 +433,17 @@ class UniteCreatorEntranceAnimations{
433
  * put entrance animation functions
434
  */
435
  private function putEntranceAnimationJS_functions($checkRunOnce = true){
436
-
437
  if($checkRunOnce == true){
438
 
439
  $isRunOnce = HelperUC::isRunCodeOnce("ue_entrance_animations_js");
440
-
441
- if($isRunOnce === true){
442
 
443
  return(false);
444
  }
445
 
446
  }
447
-
448
 
449
  ?>
450
 
@@ -563,7 +562,11 @@ jQuery(document).ready(function(){
563
  ?>
564
 
565
  var objElement = jQuery("#<?php echo $id?>");
566
-
 
 
 
 
567
  ueCheckEntranceAnimation(objElement, <?php echo $animationStep?>,"<?php echo $classItem?>", "<?php echo $order?>");
568
 
569
  jQuery(window).on("scroll", function(){
120
 
121
  $objSettings->addRangeSlider($name."_duration", 0.6, __("Animation Duration (sec)","unlimited-elements-for-elementor"), $params);
122
 
123
+ //------ animation step----------
124
+
125
  $params = array();
126
  $params["origtype"] = UniteCreatorDialogParam::PARAM_SLIDER;
127
  $params["elementor_condition"] = array(
128
  $name."_type!" => "none"
129
  );
130
 
131
+ $params["min"] = 0.1;
132
+ $params["max"] = 1;
 
 
133
  $params["step"] = 0.1;
134
  $params["units"] = "nothing";
135
 
136
+ $objSettings->addRangeSlider($name."_step", 0.3, __("Animation Step (sec)","unlimited-elements-for-elementor"), $params);
137
 
138
 
139
  //------ item order----------
433
  * put entrance animation functions
434
  */
435
  private function putEntranceAnimationJS_functions($checkRunOnce = true){
436
+
437
  if($checkRunOnce == true){
438
 
439
  $isRunOnce = HelperUC::isRunCodeOnce("ue_entrance_animations_js");
440
+
441
+ if($isRunOnce === false){
442
 
443
  return(false);
444
  }
445
 
446
  }
 
447
 
448
  ?>
449
 
562
  ?>
563
 
564
  var objElement = jQuery("#<?php echo $id?>");
565
+
566
+ if(typeof ueCheckEntranceAnimation == "undefined"){
567
+ return(false);
568
+ }
569
+
570
  ueCheckEntranceAnimation(objElement, <?php echo $animationStep?>,"<?php echo $classItem?>", "<?php echo $order?>");
571
 
572
  jQuery(window).on("scroll", function(){
inc_php/unitecreator_filters_process.class.php CHANGED
@@ -31,7 +31,8 @@ class UniteCreatorFiltersProcess{
31
  private $contentWidgetsDebug = array();
32
  private static $lastArgs = null;
33
 
34
- const TYPE_TERMS = "terms";
 
35
 
36
 
37
  /**
@@ -265,11 +266,11 @@ class UniteCreatorFiltersProcess{
265
 
266
  if($isTermsAnd == true)
267
  $arrValues["relation"] = "AND";
268
-
269
- $type = self::TYPE_TERMS;
270
 
271
  switch($type){
272
- case self::TYPE_TERMS:
273
  $arrTerms[$key] = $arrValues;
274
  break;
275
  }
@@ -279,7 +280,7 @@ class UniteCreatorFiltersProcess{
279
  $arrOutput = array();
280
 
281
  if(!empty($arrTerms))
282
- $arrOutput[self::TYPE_TERMS] = $arrTerms;
283
 
284
  return($arrOutput);
285
  }
@@ -392,7 +393,7 @@ class UniteCreatorFiltersProcess{
392
  if(empty($arrInputFilters))
393
  return(self::$filters);
394
 
395
- $arrTerms = UniteFunctionsUC::getVal($arrInputFilters, self::TYPE_TERMS);
396
 
397
  if(!empty($arrTerms))
398
  self::$filters["terms"] = $arrTerms;
@@ -701,11 +702,13 @@ class UniteCreatorFiltersProcess{
701
  * get content element html
702
  */
703
  private function getContentWidgetHtml($arrContent, $elementID, $isGrid = true){
704
-
705
  $arrElement = HelperProviderCoreUC_EL::getArrElementFromContent($arrContent, $elementID);
706
 
707
- if(empty($arrElement))
708
- UniteFunctionsUC::throwError("Elementor Widget not found");
 
 
709
 
710
  $type = UniteFunctionsUC::getVal($arrElement, "elType");
711
 
@@ -715,8 +718,8 @@ class UniteCreatorFiltersProcess{
715
  $widgetType = UniteFunctionsUC::getVal($arrElement, "widgetType");
716
 
717
  if(strpos($widgetType, "ucaddon_") === false)
718
- UniteFunctionsUC::throwError("Cannot output widget content");
719
-
720
  $arrSettingsValues = UniteFunctionsUC::getVal($arrElement, "settings");
721
 
722
  $widgetName = str_replace("ucaddon_", "", $widgetType);
@@ -839,10 +842,12 @@ class UniteCreatorFiltersProcess{
839
 
840
  $request = str_replace("SQL_CALC_FOUND_ROWS", "", $request);
841
 
842
- //wrap it in get term id's request
843
-
844
  $prefix = UniteProviderFunctionsUC::$tablePrefix;
845
 
 
 
 
 
846
  $arrTermIDs = explode(",", $strTestIDs);
847
 
848
  if(empty($arrTermIDs))
@@ -879,8 +884,10 @@ class UniteCreatorFiltersProcess{
879
  GROUP BY p.`id`";
880
 
881
  $query .= $sql;
882
-
883
  $fullQuery = "SELECT $selectTop from($query) as summary";
 
 
884
 
885
  return($fullQuery);
886
  }
@@ -967,19 +974,18 @@ class UniteCreatorFiltersProcess{
967
  $query = new WP_Query($args);
968
 
969
  $request = $query->request;
970
-
971
  $taxRequest = $this->getInitFiltersTaxRequest($request, $testTermIDs);
972
-
973
  $db = HelperUC::getDB();
974
  $arrFoundTermIDs = $db->fetchSql($taxRequest);
975
-
976
  $arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
977
 
978
  //set the test term id's for the output
979
  GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
980
-
981
  }
982
-
983
  $htmlGridItems = UniteFunctionsUC::getVal($arrHtmlWidget, "html");
984
  $htmlGridItems2 = UniteFunctionsUC::getVal($arrHtmlWidget, "html2");
985
 
@@ -1173,29 +1179,6 @@ class UniteCreatorFiltersProcess{
1173
  }
1174
 
1175
 
1176
- /**
1177
- * put checkbox filters test
1178
- */
1179
- public function putCheckboxFiltersTest($data){
1180
-
1181
- $arrActiveFilters = $this->getInputFiltersAssoc();
1182
-
1183
- $taxonomy = UniteFunctionsUC::getVal($data, "taxonomy", "category");
1184
-
1185
- //remove me
1186
- $taxonomy = "product_cat";
1187
-
1188
- $terms = $this->getActiveArchiveTerms($taxonomy);
1189
-
1190
- if(empty($terms))
1191
- return(null);
1192
-
1193
- $this->includeClientSideScripts();
1194
-
1195
- $html = $this->getHtml_termsCheckboxes($terms, $arrActiveFilters,$taxonomy);
1196
-
1197
- echo $html;
1198
- }
1199
 
1200
  /**
1201
  * add values to settings from data
@@ -1276,7 +1259,14 @@ class UniteCreatorFiltersProcess{
1276
 
1277
  $search = UniteFunctionsUC::getGetVar("s","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
1278
 
1279
- if(!empty($search)){
 
 
 
 
 
 
 
1280
  $search = urlencode($search);
1281
  $urlBase = UniteFunctionsUC::addUrlParams($urlBase, "s=$search");
1282
  }
@@ -1292,6 +1282,7 @@ class UniteCreatorFiltersProcess{
1292
  return($arrData);
1293
  }
1294
 
 
1295
  private function _____MODIFY_PARAMS_PROCESS_TERMS_______(){}
1296
 
1297
 
@@ -1389,6 +1380,7 @@ class UniteCreatorFiltersProcess{
1389
  if($isSelected == true){
1390
  $term["iscurrent"] = true;
1391
  $term["isselected"] = true;
 
1392
  }else{
1393
 
1394
  $term["iscurrent"] = false;
@@ -1404,59 +1396,105 @@ class UniteCreatorFiltersProcess{
1404
 
1405
 
1406
  /**
1407
- * modify the selected and add first term if needed
1408
  */
1409
- private function modifyOutputTerms_modifySelected($arrTerms, $data){
1410
-
1411
- $isSelectFirst = UniteFunctionsUC::getVal($data, "select_first");
1412
- $isSelectFirst = UniteFunctionsUC::strToBool($isSelectFirst);
1413
 
1414
  $addFirst = UniteFunctionsUC::getVal($data, "add_first");
1415
  $addFirst = UniteFunctionsUC::strToBool($addFirst);
1416
 
1417
- //add first and check if selected
 
1418
 
1419
- if($addFirst == true){
1420
-
1421
- $text = UniteFunctionsUC::getVal($data, "first_item_text", __("All","unlimited-elements-for-elementor"));
1422
-
1423
- $firstTerm = array();
1424
- $firstTerm["index"] = 0;
1425
- $firstTerm["name"] = $text;
1426
- $firstTerm["slug"] = "";
1427
- $firstTerm["link"] = "";
1428
- $firstTerm["parent_id"] = "";
1429
- $firstTerm["taxonomy"] = "";
1430
-
1431
- if($isSelectFirst == true){
1432
- $firstTerm["iscurrent"] = true;
1433
- $firstTerm["isselected"] = true;
1434
- }
1435
-
1436
- $firstTerm["addclass"] = " uc-item-all";
1437
-
1438
- if(!empty(self::$numTotalPosts))
1439
- $firstTerm["num_posts"] = self::$numTotalPosts;
1440
-
1441
- array_unshift($arrTerms, $firstTerm);
1442
- }
1443
 
 
 
1444
 
1445
- //add first selected
 
 
 
 
 
 
 
 
 
1446
 
1447
  if(empty($arrTerms))
1448
  return($arrTerms);
1449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1450
  foreach($arrTerms as $index => $term){
1451
 
 
 
 
1452
  $term["index"] = $index;
1453
 
1454
- if($index == 0 && $isSelectFirst == true)
 
 
 
 
 
 
 
 
 
 
 
1455
  $term["isselected"] = true;
 
 
1456
 
1457
  $arrTerms[$index] = $term;
1458
  }
1459
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1460
 
1461
  return($arrTerms);
1462
  }
@@ -1519,8 +1557,8 @@ class UniteCreatorFiltersProcess{
1519
  /**
1520
  * modify limit loaded items
1521
  */
1522
- private function modifyOutputTerms_modifyLimitGrayed($arrTerms, $limitGrayedItems){
1523
-
1524
  if(empty($limitGrayedItems))
1525
  return($arrTerms);
1526
 
@@ -1549,7 +1587,7 @@ class UniteCreatorFiltersProcess{
1549
  /**
1550
  * set selected class by options
1551
  */
1552
- private function modifyOutputTerms_setSelectedClass($arrTerms){
1553
 
1554
  if(empty($arrTerms))
1555
  return($arrTerms);
@@ -1567,17 +1605,92 @@ class UniteCreatorFiltersProcess{
1567
 
1568
  $term["addclass"] = $class;
1569
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1570
  $arrTerms[$index] = $term;
1571
 
1572
  }
1573
-
 
1574
  return($arrTerms);
1575
  }
1576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1577
  /**
1578
  * get editor filter arguments
1579
  */
1580
- public function addEditorFilterArguments($data){
 
 
 
 
 
 
 
 
 
1581
 
1582
  //add the filter related js and css includes
1583
  $this->includeClientSideScripts();
@@ -1636,36 +1749,57 @@ class UniteCreatorFiltersProcess{
1636
  if($isReplaceTerms == true)
1637
  $attributes .= " data-replace-mode=\"true\"";
1638
 
1639
- $data["filter_isajax"] = $isUnderAjax?"yes":"no";
1640
- $data["filter_attributes"] = $attributes;
1641
- $data["filter_style"] = $style;
1642
- $data["filter_addclass"] = $addClass;
1643
- $data["filter_addclass_item"] = $addClassItem;
1644
- $data["filter_first_load"] = $isFirstLoad?"yes":"no";
1645
 
1646
  //modify terms
1647
-
1648
  $arrTerms = UniteFunctionsUC::getVal($data, "taxonomy");
1649
 
1650
  $arrTerms = $this->modifyOutputTerms_setNumPosts($arrTerms, $isInitAfter, $isFirstLoad);
 
 
 
1651
 
1652
  //modify the selected class
1653
- $arrTerms = $this->modifyOutputTerms_modifySelected($arrTerms, $data);
1654
 
1655
- //on init mode - modify selected and grayed loader - canceled it
1656
- //if($isUnderAjax == false || self::$isModeInit == true){
1657
-
1658
  $arrTerms = $this->modifyOutputTerms_modifySelectedByRequest($arrTerms);
1659
 
1660
- //}
1661
 
 
1662
 
1663
- if($isInitAfter == true && !empty($limitGrayedItems) && $isUnderAjax == false)
1664
- $arrTerms = $this->modifyOutputTerms_modifyLimitGrayed($arrTerms, $limitGrayedItems);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1665
 
1666
- $arrTerms = $this->modifyOutputTerms_setSelectedClass($arrTerms);
1667
 
1668
-
1669
  $data["taxonomy"] = $arrTerms;
1670
 
1671
  return($data);
31
  private $contentWidgetsDebug = array();
32
  private static $lastArgs = null;
33
 
34
+ const TYPE_TABS = "tabs";
35
+ const TYPE_SELECT = "select";
36
 
37
 
38
  /**
266
 
267
  if($isTermsAnd == true)
268
  $arrValues["relation"] = "AND";
269
+
270
+ $type = self::TYPE_TABS;
271
 
272
  switch($type){
273
+ case self::TYPE_TABS:
274
  $arrTerms[$key] = $arrValues;
275
  break;
276
  }
280
  $arrOutput = array();
281
 
282
  if(!empty($arrTerms))
283
+ $arrOutput[self::TYPE_TABS] = $arrTerms;
284
 
285
  return($arrOutput);
286
  }
393
  if(empty($arrInputFilters))
394
  return(self::$filters);
395
 
396
+ $arrTerms = UniteFunctionsUC::getVal($arrInputFilters, self::TYPE_TABS);
397
 
398
  if(!empty($arrTerms))
399
  self::$filters["terms"] = $arrTerms;
702
  * get content element html
703
  */
704
  private function getContentWidgetHtml($arrContent, $elementID, $isGrid = true){
705
+
706
  $arrElement = HelperProviderCoreUC_EL::getArrElementFromContent($arrContent, $elementID);
707
 
708
+ if(empty($arrElement)){
709
+
710
+ UniteFunctionsUC::throwError("Elementor Widget with id: $elementID not found");
711
+ }
712
 
713
  $type = UniteFunctionsUC::getVal($arrElement, "elType");
714
 
718
  $widgetType = UniteFunctionsUC::getVal($arrElement, "widgetType");
719
 
720
  if(strpos($widgetType, "ucaddon_") === false)
721
+ UniteFunctionsUC::throwError("Cannot output widget content for widget: $widgetType");
722
+
723
  $arrSettingsValues = UniteFunctionsUC::getVal($arrElement, "settings");
724
 
725
  $widgetName = str_replace("ucaddon_", "", $widgetType);
842
 
843
  $request = str_replace("SQL_CALC_FOUND_ROWS", "", $request);
844
 
 
 
845
  $prefix = UniteProviderFunctionsUC::$tablePrefix;
846
 
847
+ $request = str_replace($prefix."posts.*", $prefix."posts.id", $request);
848
+
849
+ //wrap it in get term id's request
850
+
851
  $arrTermIDs = explode(",", $strTestIDs);
852
 
853
  if(empty($arrTermIDs))
884
  GROUP BY p.`id`";
885
 
886
  $query .= $sql;
887
+
888
  $fullQuery = "SELECT $selectTop from($query) as summary";
889
+
890
+
891
 
892
  return($fullQuery);
893
  }
974
  $query = new WP_Query($args);
975
 
976
  $request = $query->request;
977
+
978
  $taxRequest = $this->getInitFiltersTaxRequest($request, $testTermIDs);
979
+
980
  $db = HelperUC::getDB();
981
  $arrFoundTermIDs = $db->fetchSql($taxRequest);
982
+
983
  $arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
984
 
985
  //set the test term id's for the output
986
  GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
 
987
  }
988
+
989
  $htmlGridItems = UniteFunctionsUC::getVal($arrHtmlWidget, "html");
990
  $htmlGridItems2 = UniteFunctionsUC::getVal($arrHtmlWidget, "html2");
991
 
1179
  }
1180
 
1181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1182
 
1183
  /**
1184
  * add values to settings from data
1259
 
1260
  $search = UniteFunctionsUC::getGetVar("s","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
1261
 
1262
+ if(empty($search)){
1263
+ $search = null;
1264
+
1265
+ if(isset($_GET["s"]) && $_GET["s"] == "")
1266
+ $search = "";
1267
+ }
1268
+
1269
+ if($search !== null){
1270
  $search = urlencode($search);
1271
  $urlBase = UniteFunctionsUC::addUrlParams($urlBase, "s=$search");
1272
  }
1282
  return($arrData);
1283
  }
1284
 
1285
+
1286
  private function _____MODIFY_PARAMS_PROCESS_TERMS_______(){}
1287
 
1288
 
1380
  if($isSelected == true){
1381
  $term["iscurrent"] = true;
1382
  $term["isselected"] = true;
1383
+
1384
  }else{
1385
 
1386
  $term["iscurrent"] = false;
1396
 
1397
 
1398
  /**
1399
+ * modify filters - add first item
1400
  */
1401
+ private function modifyOutputTerms_addFirstItem($arrTerms, $data, $filterType){
 
 
 
1402
 
1403
  $addFirst = UniteFunctionsUC::getVal($data, "add_first");
1404
  $addFirst = UniteFunctionsUC::strToBool($addFirst);
1405
 
1406
+ if($addFirst == false)
1407
+ return($arrTerms);
1408
 
1409
+ $text = UniteFunctionsUC::getVal($data, "first_item_text", __("All","unlimited-elements-for-elementor"));
1410
+
1411
+ $firstTerm = array();
1412
+ $firstTerm["index"] = 0;
1413
+ $firstTerm["name"] = $text;
1414
+ $firstTerm["slug"] = "";
1415
+ $firstTerm["link"] = "";
1416
+ $firstTerm["parent_id"] = "";
1417
+ $firstTerm["taxonomy"] = "";
1418
+
1419
+ $firstTerm["addclass"] = " uc-item-all";
 
 
 
 
 
 
 
 
 
 
 
 
 
1420
 
1421
+ if(!empty(self::$numTotalPosts))
1422
+ $firstTerm["num_posts"] = self::$numTotalPosts;
1423
 
1424
+ array_unshift($arrTerms, $firstTerm);
1425
+
1426
+ return($arrTerms);
1427
+ }
1428
+
1429
+
1430
+ /**
1431
+ * modify the selected and add first term if needed
1432
+ */
1433
+ private function modifyOutputTerms_modifySelected($arrTerms, $data, $filterType){
1434
 
1435
  if(empty($arrTerms))
1436
  return($arrTerms);
1437
 
1438
+ $isSelectFirst = UniteFunctionsUC::getVal($data, "select_first");
1439
+ $isSelectFirst = UniteFunctionsUC::strToBool($isSelectFirst);
1440
+
1441
+ if($filterType == self::TYPE_SELECT)
1442
+ $isSelectFirst = true;
1443
+
1444
+ $numSelectedTab = UniteFunctionsUC::getVal($data, "selected_tab_number");
1445
+ if(empty($numSelectedTab))
1446
+ $numSelectedTab = 1;
1447
+
1448
+ //correct selected tab
1449
+
1450
+ $numTerms = count($arrTerms);
1451
+
1452
+ if($isSelectFirst == true && $numSelectedTab > $numTerms)
1453
+ $numSelectedTab = 1;
1454
+
1455
+ $firstNotHiddenIndex = null;
1456
+
1457
+ $hasSelected = false;
1458
+
1459
  foreach($arrTerms as $index => $term){
1460
 
1461
+ //set the index
1462
+ $numTab = ($index + 1);
1463
+
1464
  $term["index"] = $index;
1465
 
1466
+ //check if hidden
1467
+
1468
+ $isHidden = UniteFunctionsUC::getVal($term, "hidden");
1469
+ $isHidden = UniteFunctionsUC::strToBool($isHidden);
1470
+
1471
+ if($isHidden == true)
1472
+ continue;
1473
+
1474
+ if($firstNotHiddenIndex === null)
1475
+ $firstNotHiddenIndex = $index;
1476
+
1477
+ if($numTab == $numSelectedTab){
1478
  $term["isselected"] = true;
1479
+ $hasSelected = true;
1480
+ }
1481
 
1482
  $arrTerms[$index] = $term;
1483
  }
1484
+
1485
+ if($hasSelected == true)
1486
+ return($arrTerms);
1487
+
1488
+ if($firstNotHiddenIndex === null)
1489
+ return($arrTerms);
1490
+
1491
+ if($filterType != self::TYPE_SELECT)
1492
+ return($arrTerms);
1493
+
1494
+ //make sure the first item selected in select filter
1495
+
1496
+ $arrTerms[$firstNotHiddenIndex]["isselected"] = true;
1497
+
1498
 
1499
  return($arrTerms);
1500
  }
1557
  /**
1558
  * modify limit loaded items
1559
  */
1560
+ private function modifyOutputTerms_tabs_modifyLimitGrayed($arrTerms, $limitGrayedItems){
1561
+
1562
  if(empty($limitGrayedItems))
1563
  return($arrTerms);
1564
 
1587
  /**
1588
  * set selected class by options
1589
  */
1590
+ private function modifyOutputTerms_setSelectedClass($arrTerms, $filterType){
1591
 
1592
  if(empty($arrTerms))
1593
  return($arrTerms);
1605
 
1606
  $term["addclass"] = $class;
1607
 
1608
+ //set select attribute
1609
+ if($filterType == self::TYPE_SELECT){
1610
+
1611
+ $htmlAttributes = UniteFunctionsUC::getVal($term, "html_attributes");
1612
+
1613
+ if(empty($htmlAttributes))
1614
+ $htmlAttributes = "";
1615
+
1616
+ $htmlAttributes .= " selected";
1617
+
1618
+ $term["html_attributes"] = $htmlAttributes;
1619
+
1620
+ }
1621
+
1622
  $arrTerms[$index] = $term;
1623
 
1624
  }
1625
+
1626
+
1627
  return($arrTerms);
1628
  }
1629
 
1630
+
1631
+ /**
1632
+ * check if filter should be hidden, if selected items avaliable
1633
+ * only for select filters / child roje and under ajax
1634
+ */
1635
+ private function modifyOutputTerms_isFilterHidden($data, $arrTerms, $isUnderAjax){
1636
+
1637
+ if($isUnderAjax == false)
1638
+ return(false);
1639
+
1640
+ $role = UniteFunctionsUC::getVal($data, "filter_role");
1641
+
1642
+ if($role != "child")
1643
+ return(false);
1644
+
1645
+ if(empty($arrTerms))
1646
+ return(true);
1647
+
1648
+
1649
+ $numItems = 0;
1650
+
1651
+ foreach($arrTerms as $term){
1652
+
1653
+ $isHidden = UniteFunctionsUC::getVal($term, "hidden");
1654
+ $isHidden = UniteFunctionsUC::strToBool($isHidden);
1655
+
1656
+ if($isHidden == true)
1657
+ continue;
1658
+
1659
+ $numItems++;
1660
+ }
1661
+
1662
+ if($numItems > 1)
1663
+ return(false);
1664
+
1665
+ $firstItem = $arrTerms[0];
1666
+
1667
+ $slug = UniteFunctionsUC::getVal($firstItem, "slug");
1668
+
1669
+ $isAllItem = empty($slug);
1670
+
1671
+ //if there is only "all" item, it should be hidden as well
1672
+
1673
+ if($isAllItem == true)
1674
+ return(true);
1675
+
1676
+
1677
+ return(false);
1678
+ }
1679
+
1680
+
1681
  /**
1682
  * get editor filter arguments
1683
  */
1684
+ public function addEditorFilterArguments($data, $typeArg){
1685
+
1686
+ $filterType = self::TYPE_TABS;
1687
+
1688
+ switch($typeArg){
1689
+ case "type_select":
1690
+ $filterType = self::TYPE_SELECT;
1691
+ break;
1692
+ }
1693
+
1694
 
1695
  //add the filter related js and css includes
1696
  $this->includeClientSideScripts();
1749
  if($isReplaceTerms == true)
1750
  $attributes .= " data-replace-mode=\"true\"";
1751
 
 
 
 
 
 
 
1752
 
1753
  //modify terms
1754
+
1755
  $arrTerms = UniteFunctionsUC::getVal($data, "taxonomy");
1756
 
1757
  $arrTerms = $this->modifyOutputTerms_setNumPosts($arrTerms, $isInitAfter, $isFirstLoad);
1758
+
1759
+ //modify the selected class - add first
1760
+ $arrTerms = $this->modifyOutputTerms_addFirstItem($arrTerms, $data, $filterType);
1761
 
1762
  //modify the selected class
1763
+ $arrTerms = $this->modifyOutputTerms_modifySelected($arrTerms, $data,$filterType);
1764
 
 
 
 
1765
  $arrTerms = $this->modifyOutputTerms_modifySelectedByRequest($arrTerms);
1766
 
 
1767
 
1768
+ $isFilterHidden = false;
1769
 
1770
+ switch($filterType){
1771
+ case self::TYPE_TABS:
1772
+
1773
+ if($isInitAfter == true && !empty($limitGrayedItems) && $isUnderAjax == false)
1774
+ $arrTerms = $this->modifyOutputTerms_tabs_modifyLimitGrayed($arrTerms, $limitGrayedItems);
1775
+
1776
+ $isFilterHidden = $this->modifyOutputTerms_isFilterHidden($data, $arrTerms, $isUnderAjax);
1777
+
1778
+ break;
1779
+ case self::TYPE_SELECT:
1780
+
1781
+ //modify if hidden
1782
+
1783
+ $isFilterHidden = $this->modifyOutputTerms_isFilterHidden($data, $arrTerms, $isUnderAjax);
1784
+
1785
+ break;
1786
+ }
1787
+
1788
+ $arrTerms = $this->modifyOutputTerms_setSelectedClass($arrTerms, $filterType);
1789
+
1790
+ if($isFilterHidden)
1791
+ $addClass .= " uc-filter-hidden";
1792
+
1793
+ //return data
1794
+
1795
+ $data["filter_isajax"] = $isUnderAjax?"yes":"no";
1796
+ $data["filter_attributes"] = $attributes;
1797
+ $data["filter_style"] = $style;
1798
+ $data["filter_addclass"] = $addClass;
1799
+ $data["filter_addclass_item"] = $addClassItem;
1800
+ $data["filter_first_load"] = $isFirstLoad?"yes":"no";
1801
 
 
1802
 
 
1803
  $data["taxonomy"] = $arrTerms;
1804
 
1805
  return($data);
inc_php/unitecreator_operations.class.php CHANGED
@@ -462,6 +462,24 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
462
  return($response);
463
  }
464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
 
466
  /**
467
  * put debug of post custom fields
@@ -479,7 +497,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
479
 
480
  $htmlFields = HelperHtmlUC::getHtmlArrayTable($arrCustomFields, "No Meta Fields Found");
481
 
482
- echo "<br>Meta fields for post: $postTitle <br>";
483
 
484
  dmp($htmlFields);
485
 
462
  return($response);
463
  }
464
 
465
+ /**
466
+ * put posts meta fields debug
467
+ */
468
+ public function putPostsCustomFieldsDebug($arrPosts){
469
+
470
+ if(empty($arrPosts))
471
+ return(false);
472
+
473
+ dmp("Show the posts meta fields. Please turn off this option before release.");
474
+
475
+ foreach($arrPosts as $post){
476
+
477
+ $postID = $post->ID;
478
+
479
+ $this->putPostCustomFieldsDebug($postID);
480
+ }
481
+
482
+ }
483
 
484
  /**
485
  * put debug of post custom fields
497
 
498
  $htmlFields = HelperHtmlUC::getHtmlArrayTable($arrCustomFields, "No Meta Fields Found");
499
 
500
+ echo "<br>Meta fields for post: <b>$postTitle </b>, post id: $postID <br>";
501
 
502
  dmp($htmlFields);
503
 
inc_php/unitecreator_output.class.php CHANGED
@@ -2039,7 +2039,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
2039
 
2040
  $this->objTemplate->setParams($arrData);
2041
  }
2042
- else{
2043
 
2044
  if($this->processType == UniteCreatorParamsProcessor::PROCESS_TYPE_CONFIG)
2045
  $arrItemData = array();
@@ -2116,15 +2116,26 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
2116
 
2117
  if(is_string($dataValue) && $dataValue === "uc_items")
2118
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2119
-
 
 
 
2120
 
 
 
 
 
2121
  break;
2122
  default:
2123
 
2124
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2125
  break;
2126
  }
2127
-
 
 
 
 
2128
  $itemIndex = 0;
2129
  foreach($arrItemData as $key=>$item){
2130
 
2039
 
2040
  $this->objTemplate->setParams($arrData);
2041
  }
2042
+ else{ //items exists
2043
 
2044
  if($this->processType == UniteCreatorParamsProcessor::PROCESS_TYPE_CONFIG)
2045
  $arrItemData = array();
2116
 
2117
  if(is_string($dataValue) && $dataValue === "uc_items")
2118
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2119
+ elseif(is_array($dataValue)){
2120
+
2121
+ $arrItemData = $dataValue;
2122
+ }else{
2123
 
2124
+ dmp($arrItemData);
2125
+ UniteFunctionsUC::throwError("Wrong multisouce data");
2126
+ }
2127
+
2128
  break;
2129
  default:
2130
 
2131
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2132
  break;
2133
  }
2134
+
2135
+ //some small protection
2136
+ if(empty($arrItemData))
2137
+ $arrItemData = array();
2138
+
2139
  $itemIndex = 0;
2140
  foreach($arrItemData as $key=>$item){
2141
 
inc_php/unitecreator_params_processor.class.php CHANGED
@@ -1567,6 +1567,7 @@ class UniteCreatorParamsProcessorWork{
1567
  protected function getSliderData_work($data, $value, $name, $valueOnly = false){
1568
 
1569
  if(is_array($value) == false){
 
1570
  $data[$name."_unit"] = "px";
1571
  $data[$name."_nounit"] = $value;
1572
  return($data);
@@ -1639,7 +1640,7 @@ class UniteCreatorParamsProcessorWork{
1639
  * get processe param data, function with override
1640
  */
1641
  protected function getProcessedParamData($data, $value, $param, $processType){
1642
-
1643
  $type = UniteFunctionsUC::getVal($param, "type");
1644
  $name = UniteFunctionsUC::getVal($param, "name");
1645
 
@@ -1727,7 +1728,7 @@ class UniteCreatorParamsProcessorWork{
1727
  * @param $objParams
1728
  */
1729
  public function getProcessedParamsValues($arrParams, $processType, $filterType = null){
1730
-
1731
  self::validateProcessType($processType);
1732
 
1733
  $arrParams = $this->processParamsForOutput($arrParams);
@@ -1751,7 +1752,7 @@ class UniteCreatorParamsProcessorWork{
1751
  $value = UniteFunctionsUC::getVal($param, "value");
1752
 
1753
  $value = $this->convertValueByType($value, $type, $param);
1754
-
1755
  if(empty($name))
1756
  continue;
1757
 
@@ -1853,7 +1854,8 @@ class UniteCreatorParamsProcessorWork{
1853
  * get item data
1854
  */
1855
  public function getProcessedItemsData($arrItems, $processType, $forTemplate = true, $filterType = null){
1856
-
 
1857
  $this->validateInited();
1858
  self::validateProcessType($processType);
1859
 
@@ -1960,6 +1962,9 @@ class UniteCreatorParamsProcessorWork{
1960
  }
1961
 
1962
 
 
 
 
1963
  return($arrItemsNew);
1964
  }
1965
 
1567
  protected function getSliderData_work($data, $value, $name, $valueOnly = false){
1568
 
1569
  if(is_array($value) == false){
1570
+
1571
  $data[$name."_unit"] = "px";
1572
  $data[$name."_nounit"] = $value;
1573
  return($data);
1640
  * get processe param data, function with override
1641
  */
1642
  protected function getProcessedParamData($data, $value, $param, $processType){
1643
+
1644
  $type = UniteFunctionsUC::getVal($param, "type");
1645
  $name = UniteFunctionsUC::getVal($param, "name");
1646
 
1728
  * @param $objParams
1729
  */
1730
  public function getProcessedParamsValues($arrParams, $processType, $filterType = null){
1731
+
1732
  self::validateProcessType($processType);
1733
 
1734
  $arrParams = $this->processParamsForOutput($arrParams);
1752
  $value = UniteFunctionsUC::getVal($param, "value");
1753
 
1754
  $value = $this->convertValueByType($value, $type, $param);
1755
+
1756
  if(empty($name))
1757
  continue;
1758
 
1854
  * get item data
1855
  */
1856
  public function getProcessedItemsData($arrItems, $processType, $forTemplate = true, $filterType = null){
1857
+
1858
+
1859
  $this->validateInited();
1860
  self::validateProcessType($processType);
1861
 
1962
  }
1963
 
1964
 
1965
+ //dmp("get processed data output"); dmp($arrItemsNew); exit();
1966
+
1967
+
1968
  return($arrItemsNew);
1969
  }
1970
 
inc_php/unitecreator_settings_output.class.php CHANGED
@@ -711,12 +711,15 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
711
  <select class="unite-setting-dimentions-select-units unite-input-dimentions" >
712
  <option value="px" <?php echo $optionUnitsPX?>>PX</option>
713
  <option value="%" <?php echo $optionPercent?>>%</option>
 
 
714
  </select>
715
 
716
  <?php endif?>
717
  </td>
718
  </tr>
719
-
 
720
  <?php
721
  }
722
 
@@ -764,6 +767,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
764
  ?>
765
 
766
  </table>
 
767
  </div>
768
 
769
  <?php
711
  <select class="unite-setting-dimentions-select-units unite-input-dimentions" >
712
  <option value="px" <?php echo $optionUnitsPX?>>PX</option>
713
  <option value="%" <?php echo $optionPercent?>>%</option>
714
+ <option value="em" >em</option>
715
+ <option value="rem" >rem</option>
716
  </select>
717
 
718
  <?php endif?>
719
  </td>
720
  </tr>
721
+
722
+
723
  <?php
724
  }
725
 
767
  ?>
768
 
769
  </table>
770
+
771
  </div>
772
 
773
  <?php
inc_php/unitecreator_template_engine.class.php CHANGED
@@ -320,7 +320,13 @@ class UniteCreatorTemplateEngineWork{
320
  /**
321
  * filter uc date, clear html first, then replace the date
322
  */
323
- public function filterUCDate($dateStamp, $format = "d F Y, H:i", $formatDateFrom = "d/m/Y"){
 
 
 
 
 
 
324
 
325
  $hasTags = false;
326
  $stamp = $dateStamp;
@@ -351,7 +357,7 @@ class UniteCreatorTemplateEngineWork{
351
 
352
  if($hasTags == true)
353
  $strDate = str_replace($stamp, $strDate, $dateStamp);
354
-
355
  return($strDate);
356
  }
357
 
@@ -511,7 +517,7 @@ class UniteCreatorTemplateEngineWork{
511
  /**
512
  * get post terms
513
  */
514
- public function getPostTerms($postID, $taxonomy, $addCustomFields = false, $type = ""){
515
 
516
  dmp("no terms in this platform");
517
 
@@ -929,6 +935,7 @@ class UniteCreatorTemplateEngineWork{
929
  break;
930
  case "get_posts":
931
 
 
932
  $arrPosts = HelperUC::$operations->getPostsFromTwig($arg1,$arg2,$arg3);
933
 
934
  return($arrPosts);
320
  /**
321
  * filter uc date, clear html first, then replace the date
322
  */
323
+ public function filterUCDate($dateStamp, $format = "", $formatDateFrom = "d/m/Y"){
324
+
325
+ if(empty($format))
326
+ $format = get_option("date_format");
327
+
328
+ if(empty($format))
329
+ $format = "d F Y";
330
 
331
  $hasTags = false;
332
  $stamp = $dateStamp;
357
 
358
  if($hasTags == true)
359
  $strDate = str_replace($stamp, $strDate, $dateStamp);
360
+
361
  return($strDate);
362
  }
363
 
517
  /**
518
  * get post terms
519
  */
520
+ public function getPostTerms($postID, $taxonomy, $addCustomFields = false, $type = "", $maxTerms = null){
521
 
522
  dmp("no terms in this platform");
523
 
935
  break;
936
  case "get_posts":
937
 
938
+ //$postType, $strCats, $strArgs
939
  $arrPosts = HelperUC::$operations->getPostsFromTwig($arg1,$arg2,$arg3);
940
 
941
  return($arrPosts);
includes.php CHANGED
@@ -12,7 +12,7 @@ if(!defined('UNLIMITED_ELEMENTS_INC'))
12
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
13
 
14
  if(!defined("UNLIMITED_ELEMENTS_VERSION"))
15
- define("UNLIMITED_ELEMENTS_VERSION", "1.5.22");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
12
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
13
 
14
  if(!defined("UNLIMITED_ELEMENTS_VERSION"))
15
+ define("UNLIMITED_ELEMENTS_VERSION", "1.5.31");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
js/admin.js CHANGED
@@ -2114,8 +2114,9 @@ function UniteAdminUC(){
2114
  ajaxOptions.contentType = false;
2115
  }
2116
 
2117
- jQuery.ajax(ajaxOptions);
2118
 
 
2119
  };//ajaxrequest
2120
 
2121
 
2114
  ajaxOptions.contentType = false;
2115
  }
2116
 
2117
+ var request = jQuery.ajax(ajaxOptions);
2118
 
2119
+ return(request);
2120
  };//ajaxrequest
2121
 
2122
 
js/unitecreator_helper.js ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ function UniteCreatorHelper(){
4
+
5
+ var t = this;
6
+
7
+ if(!g_ucAdmin)
8
+ var g_ucAdmin = new UniteAdminUC();
9
+
10
+ /**
11
+ * put addon includes
12
+ */
13
+ function putIncludes(windowIframe, objIncludes, funcOnLoaded){
14
+
15
+ var isLoadOneByOne = true;
16
+
17
+ var handlePrefix = "uc_include_";
18
+
19
+ //make a list of js handles
20
+ var arrHandles = {};
21
+ jQuery.each(objIncludes, function(event, objInclude){
22
+
23
+ var handle = handlePrefix + objInclude.type + "_" + objInclude.handle;
24
+
25
+ if( !(objInclude.type == "js" && objInclude.handle == "jquery") )
26
+ arrHandles[handle] = objInclude;
27
+ });
28
+
29
+ var isAllFilesLoaded = false;
30
+
31
+ //inner function that check that all files loaded by handle
32
+ function checkAllFilesLoaded(){
33
+
34
+ if(isAllFilesLoaded == true)
35
+ return(false);
36
+
37
+ if(!jQuery.isEmptyObject(arrHandles))
38
+ return(false);
39
+
40
+ isAllFilesLoaded = true;
41
+
42
+ if(!funcOnLoaded)
43
+ return(false);
44
+
45
+ funcOnLoaded();
46
+
47
+ }
48
+
49
+
50
+ /**
51
+ * on js file loaded - load first js file, from available handles
52
+ * in case that loading one by one
53
+ */
54
+ function onJsFileLoaded(){
55
+
56
+ for(var index in arrHandles){
57
+ var objInclude = arrHandles[index];
58
+
59
+ if(objInclude.type == "js"){
60
+ loadIncludeFile(objInclude);
61
+ return(false);
62
+ }
63
+
64
+ }
65
+
66
+ }
67
+
68
+
69
+ /**
70
+ * load include file
71
+ */
72
+ function loadIncludeFile(objInclude){
73
+
74
+ var url = objInclude.url;
75
+ var handle = handlePrefix + objInclude.type + "_" + objInclude.handle;
76
+ var type = objInclude.type;
77
+ var isModule = false;
78
+ if(objInclude.hasOwnProperty("is_module") && objInclude.is_module == true && type == "js")
79
+ isModule = true;
80
+
81
+
82
+ //skip jquery for now
83
+ if(objInclude.handle == "jquery"){
84
+
85
+ checkAllFilesLoaded();
86
+
87
+ if(isLoadOneByOne)
88
+ onJsFileLoaded();
89
+
90
+ return(true);
91
+ }
92
+
93
+ var data = {
94
+ replaceID:handle,
95
+ name: "uc_include_file",
96
+ iframe:windowIframe,
97
+ ismodule:isModule
98
+ };
99
+
100
+ //onload throw event when all scripts loaded
101
+ data.onload = function(obj, handle){
102
+
103
+ var objDomInclude = jQuery(obj);
104
+
105
+ objDomInclude.data("isloaded", true);
106
+
107
+ //delete the handle from the list, and check for all files loaded
108
+ if(arrHandles.hasOwnProperty(handle) == true){
109
+
110
+ delete arrHandles[handle];
111
+
112
+ checkAllFilesLoaded();
113
+
114
+ }//end checking
115
+
116
+ if(isLoadOneByOne){
117
+ var tagName = objDomInclude.prop("tagName").toLowerCase();
118
+ if(tagName == "script")
119
+ onJsFileLoaded();
120
+ }
121
+
122
+ };
123
+
124
+
125
+ //if file not included - include it
126
+ var objDomInclude = jQuery("#"+handle);
127
+
128
+ if(objDomInclude.length == 0){
129
+
130
+ objDomInclude = loadDOMIncludeFile(type, url, data);
131
+ }
132
+ else{
133
+
134
+ //if the files is in the loading list but still not loaded,
135
+ //wait until they will be loaded and then check for firing the finish event (addons with same files)
136
+
137
+ //check if the file is loaded
138
+ var isLoaded = objDomInclude.data("isloaded");
139
+ if(isLoaded == true){
140
+
141
+ //if it's already included - remove from handle
142
+ if(arrHandles.hasOwnProperty(handle) == true)
143
+ delete arrHandles[handle];
144
+
145
+ if(isLoadOneByOne){
146
+ var tagName = objDomInclude.prop("tagName").toLowerCase();
147
+ if(tagName == "script")
148
+ onJsFileLoaded();
149
+ }
150
+
151
+
152
+ }else{
153
+
154
+ var timeoutHandle = setInterval(function(){
155
+ var isLoaded = objDomInclude.data("isloaded");
156
+
157
+ if(isLoaded == true){
158
+ clearInterval(timeoutHandle);
159
+
160
+ if(arrHandles.hasOwnProperty(handle) == true)
161
+ delete arrHandles[handle];
162
+
163
+ checkAllFilesLoaded();
164
+
165
+ if(isLoadOneByOne){
166
+ var tagName = objDomInclude.prop("tagName").toLowerCase();
167
+ if(tagName == "script")
168
+ onJsFileLoaded();
169
+ }
170
+
171
+ }
172
+
173
+ },100);
174
+
175
+ }
176
+
177
+ }
178
+
179
+ }
180
+
181
+ if(isLoadOneByOne == false){
182
+
183
+ jQuery.each(objIncludes, function(event, objInclude){
184
+ loadIncludeFile(objInclude);
185
+ });
186
+
187
+ }else{
188
+
189
+ //load css files and first js files
190
+ var isFirstJS = true;
191
+
192
+ jQuery.each(objIncludes, function(event, objInclude){
193
+ if(objInclude.type == "css")
194
+ loadIncludeFile(objInclude);
195
+ else{ //js file, load first only
196
+
197
+ if(isFirstJS == true){
198
+ loadIncludeFile(objInclude);
199
+ isFirstJS = false;
200
+ }
201
+
202
+ }
203
+ });
204
+
205
+
206
+ }
207
+
208
+ //check if all files loaded
209
+ checkAllFilesLoaded();
210
+ }
211
+
212
+ /**
213
+ * get value function
214
+ */
215
+ function getVal(data, name, defaultValue, opt){
216
+
217
+ var value = g_ucAdmin.getVal(data, name, defaultValue, opt);
218
+
219
+ return(value);
220
+ }
221
+
222
+
223
+ /**
224
+ * load include file, js or css
225
+ */
226
+ function loadDOMIncludeFile(type, url, data){
227
+
228
+ if(!url)
229
+ return(false);
230
+
231
+ //additional input values
232
+ var replaceID = getVal(data, "replaceID");
233
+ var name = getVal(data, "name");
234
+ var onload = getVal(data, "onload");
235
+ var iframeWindow = getVal(data, "iframe");
236
+ var isModule = getVal(data, "ismodule");
237
+
238
+ //add random number at the end
239
+ var noRand = getVal(data, "norand");
240
+ if(!noRand){
241
+ var rand = Math.floor((Math.random()*100000)+1);
242
+
243
+ if(url.indexOf("?") == -1)
244
+ url += "?rand="+rand;
245
+ else
246
+ url += "&rand="+rand;
247
+ }
248
+
249
+ if(replaceID)
250
+ jQuery("#"+replaceID).remove();
251
+
252
+ var objWindow = window;
253
+ if(iframeWindow)
254
+ objWindow = iframeWindow;
255
+
256
+ switch(type){
257
+ case "js":
258
+ var tag = objWindow.document.createElement('script');
259
+ tag.src = url;
260
+
261
+ if(isModule === true)
262
+ tag.type = "module";
263
+
264
+ //add onload function if exists
265
+ if(typeof onload == "function"){
266
+
267
+ tag.onload = function(){
268
+ onload(jQuery(this), replaceID);
269
+ };
270
+
271
+ }
272
+
273
+ var firstScriptTag = objWindow.document.getElementsByTagName('script')[0];
274
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
275
+ tag = jQuery(tag);
276
+
277
+ if(name)
278
+ tag.attr("name", name);
279
+
280
+ break;
281
+ case "css":
282
+
283
+ var objHead = jQuery(objWindow.document).find("head");
284
+
285
+ objHead.append("<link>");
286
+ var tag = objHead.children(":last");
287
+ var attributes = {
288
+ rel: "stylesheet",
289
+ type: "text/css",
290
+ href: url
291
+ };
292
+
293
+ if(name)
294
+ attributes.name = name;
295
+
296
+ //add onload function if exists
297
+ if(typeof onload == "function"){
298
+
299
+ attributes.onload = function(){
300
+
301
+ onload(jQuery(this), replaceID);
302
+ };
303
+
304
+ }
305
+
306
+ tag.attr(attributes);
307
+ break;
308
+ default:
309
+ throw Error("Undefined include type: "+type);
310
+ break;
311
+ }
312
+
313
+
314
+ //replace current element
315
+ if(replaceID)
316
+ tag.attr({id:replaceID});
317
+
318
+ return(tag);
319
+ };
320
+
321
+
322
+ /**
323
+ * put includes
324
+ */
325
+ this.putIncludes = function(outputWindow, objIncludes, func){
326
+
327
+ putIncludes(outputWindow, objIncludes, func);
328
+
329
+ }
330
+
331
+ }
js/unitecreator_testaddon_new.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ function UniteCreatorTestAddonNew(){
4
+
5
+ var g_settings, g_objPreview, g_addonID, g_requestPreview;
6
+
7
+ var g_helper = new UniteCreatorHelper();
8
+
9
+ var t = this;
10
+
11
+ if(!g_ucAdmin)
12
+ var g_ucAdmin = new UniteAdminUC();
13
+
14
+
15
+ /**
16
+ * output preview
17
+ */
18
+ function outputWidgetPreview(response){
19
+
20
+ var html = g_ucAdmin.getVal(response, "html");
21
+ var arrIncludes = g_ucAdmin.getVal(response, "includes");
22
+
23
+ g_helper.putIncludes(window, arrIncludes, function(){
24
+
25
+ g_objPreview.html(html);
26
+
27
+ });
28
+
29
+ }
30
+
31
+
32
+ /**
33
+ * refresh preview
34
+ */
35
+ function refreshPreview(){
36
+
37
+ var objValues = g_settings.getSettingsValues();
38
+
39
+ var data = {
40
+ id:g_addonID,
41
+ settings: objValues
42
+ };
43
+
44
+ g_ucAdmin.setAjaxLoaderID("uc_preview_loader");
45
+
46
+ g_objPreview.addClass("uc-preview-loading");
47
+
48
+ if(g_requestPreview)
49
+ g_requestPreview.abort();
50
+
51
+ g_requestPreview = g_ucAdmin.ajaxRequest("get_addon_output_data", data, function(response){
52
+
53
+ g_objPreview.removeClass("uc-preview-loading");
54
+
55
+ outputWidgetPreview(response);
56
+
57
+ });
58
+
59
+ }
60
+
61
+
62
+ /**
63
+ * init the settings by it's html
64
+ */
65
+ function initSettingsByHtml(htmlSettings){
66
+
67
+ var objSettingsContainer = jQuery("#uc_settings_container");
68
+
69
+ objSettingsContainer.html(htmlSettings);
70
+
71
+ g_settings = new UniteSettingsUC();
72
+
73
+ g_settings.init(objSettingsContainer);
74
+
75
+ g_settings.setEventOnChange(refreshPreview);
76
+ }
77
+
78
+
79
+ /**
80
+ * load the settings from ajax
81
+ */
82
+ function loadSettings(){
83
+
84
+ var data = {};
85
+ data["id"] = g_addonID;
86
+
87
+ g_ucAdmin.setAjaxLoaderID("uc_settings_loader");
88
+
89
+ g_ucAdmin.ajaxRequest("get_addon_settings_html", data, function(response){
90
+
91
+ initSettingsByHtml(response.html);
92
+
93
+ refreshPreview();
94
+
95
+ });
96
+
97
+
98
+ }
99
+
100
+
101
+
102
+ /**
103
+ * init the testaddon class
104
+ */
105
+ this.init = function(){
106
+
107
+ var objWrapper = jQuery("#uc_preview_addon_wrapper");
108
+ g_addonID = objWrapper.data("addonid");
109
+
110
+ g_objPreview = jQuery("#uc_preview_wrapper");
111
+
112
+ loadSettings();
113
+
114
+ }
115
+
116
+ }
provider/acf_integrate.class.php CHANGED
@@ -77,7 +77,7 @@ class UniteCreatorAcfIntegrate{
77
 
78
  $urlImage = UniteFunctionsUC::getVal($field, "url");
79
  $arrSizes = UniteFunctionsUC::getVal($field, "sizes");
80
-
81
  $width = UniteFunctionsUC::getVal($field, "width");
82
  $height = UniteFunctionsUC::getVal($field, "height");
83
 
@@ -107,7 +107,10 @@ class UniteCreatorAcfIntegrate{
107
 
108
  $arrValues[$keyprefix."thumb_width"] = $thumbMediumWidth;
109
  $arrValues[$keyprefix."thumb_height"] = $thumbMediumHeight;
110
-
 
 
 
111
  foreach($arrSizes as $size => $value){
112
 
113
  if( $size == "medium")
77
 
78
  $urlImage = UniteFunctionsUC::getVal($field, "url");
79
  $arrSizes = UniteFunctionsUC::getVal($field, "sizes");
80
+
81
  $width = UniteFunctionsUC::getVal($field, "width");
82
  $height = UniteFunctionsUC::getVal($field, "height");
83
 
107
 
108
  $arrValues[$keyprefix."thumb_width"] = $thumbMediumWidth;
109
  $arrValues[$keyprefix."thumb_height"] = $thumbMediumHeight;
110
+
111
+ if(empty($arrSizes))
112
+ $arrSizes = array();
113
+
114
  foreach($arrSizes as $size => $value){
115
 
116
  if( $size == "medium")
provider/admin_notices.class.php CHANGED
@@ -64,7 +64,6 @@ class UniteCreatorAdminNotices{
64
  */
65
  private function getNoticeHtml($text, $id, $isDissmissable = true, $params = array()){
66
 
67
-
68
  $type = UniteFunctionsUC::getVal($params, "type");
69
 
70
  $isNoWrap = UniteFunctionsUC::getVal($params, "no-notice-wrap");
@@ -74,8 +73,24 @@ class UniteCreatorAdminNotices{
74
 
75
  if($isNoWrap == true)
76
  $classWrap = "";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- $class = "notice uc-admin-notice notice-info uc-banner-type-banner";
79
 
80
  if($type == self::TYPE_ADVANCED)
81
  $class .= " uc-notice-advanced";
@@ -109,7 +124,7 @@ class UniteCreatorAdminNotices{
109
 
110
  $htmlDissmiss = "\n<a class=\"uc-notice-dismiss\" href=\"{$urlDissmiss}\" aria-label=\"$textDissmissLabel\">$textDissmiss</a>\n";
111
 
112
- if(self::TYPE_BANNER)
113
  $htmlDissmiss = "\n<a class=\"uc-notice-dismiss-banner\" href=\"{$urlDissmiss}\" title=\"{$textDissmiss}\" aria-label=\"$textDissmissLabel\">X</a>\n";
114
 
115
  }
@@ -166,6 +181,26 @@ class UniteCreatorAdminNotices{
166
  return($html);
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
 
171
  /**
@@ -186,7 +221,17 @@ class UniteCreatorAdminNotices{
186
  if($isDissmissed == true)
187
  continue;
188
 
 
 
 
 
 
 
189
  $htmlNotices = $this->getNoticeHtml($text, $id, true, $notice);
 
 
 
 
190
  echo $htmlNotices;
191
  }
192
 
@@ -291,6 +336,11 @@ class UniteCreatorAdminNotices{
291
  color:#ffffff;
292
  }
293
 
 
 
 
 
 
294
  </style>
295
  <?php
296
  }
64
  */
65
  private function getNoticeHtml($text, $id, $isDissmissable = true, $params = array()){
66
 
 
67
  $type = UniteFunctionsUC::getVal($params, "type");
68
 
69
  $isNoWrap = UniteFunctionsUC::getVal($params, "no-notice-wrap");
73
 
74
  if($isNoWrap == true)
75
  $classWrap = "";
76
+
77
+ //set color class
78
+
79
+ $color = UniteFunctionsUC::getVal($params, "color");
80
+
81
+ switch($color){
82
+ default:
83
+ case "error":
84
+ case "warning":
85
+ case "info":
86
+ $noticeClass = "notice-$color";
87
+ break;
88
+ case "doubly":
89
+ $noticeClass = "uc-notice-doubly";
90
+ break;
91
+ }
92
 
93
+ $class = "notice uc-admin-notice $noticeClass uc-banner-type-banner";
94
 
95
  if($type == self::TYPE_ADVANCED)
96
  $class .= " uc-notice-advanced";
124
 
125
  $htmlDissmiss = "\n<a class=\"uc-notice-dismiss\" href=\"{$urlDissmiss}\" aria-label=\"$textDissmissLabel\">$textDissmiss</a>\n";
126
 
127
+ if($type == self::TYPE_BANNER)
128
  $htmlDissmiss = "\n<a class=\"uc-notice-dismiss-banner\" href=\"{$urlDissmiss}\" title=\"{$textDissmiss}\" aria-label=\"$textDissmissLabel\">X</a>\n";
129
 
130
  }
181
  return($html);
182
  }
183
 
184
+ /**
185
+ * check condition
186
+ */
187
+ private function isConditionAllowed($notice){
188
+
189
+ $condition = UniteFunctionsUC::getVal($notice, "condition");
190
+
191
+ if(empty($condition))
192
+ return(true);
193
+
194
+ switch($condition){
195
+ case "no_doubly":
196
+
197
+ if(defined("DOUBLY_INC"))
198
+ return(false);
199
+ break;
200
+ }
201
+
202
+ return(true);
203
+ }
204
 
205
 
206
  /**
221
  if($isDissmissed == true)
222
  continue;
223
 
224
+ //check condition
225
+ $isAllowed = $this->isConditionAllowed($notice);
226
+
227
+ if($isAllowed == false)
228
+ return(false);
229
+
230
  $htmlNotices = $this->getNoticeHtml($text, $id, true, $notice);
231
+
232
+ if(empty($htmlNotices))
233
+ continue;
234
+
235
  echo $htmlNotices;
236
  }
237
 
336
  color:#ffffff;
337
  }
338
 
339
+ .uc-notice-doubly{
340
+ border-left-color:#ff6a00 !important;
341
+ border-color:#ff6a00 !important;
342
+ }
343
+
344
  </style>
345
  <?php
346
  }
provider/core/plugins/unlimited_elements/copy_paste.class.php DELETED
@@ -1,247 +0,0 @@
1
- <?php
2
- /**
3
- * @package Unlimited Elements
4
- * @author unlimited-elements.com
5
- * @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
6
- * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
7
- * */
8
- defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
9
-
10
- class UniteCreatorElementorCopyPaste{
11
-
12
-
13
- /**
14
- * add copy related scripts
15
- */
16
- public function addCopyScripts(){
17
-
18
- UniteProviderFunctionsUC::addjQueryInclude();
19
-
20
- HelperUC::addScriptAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_section_copy.js", "unlimited_elments_copy_section");
21
- HelperUC::addStyleAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_section_copy.css", "unlimited_elments_copy_section_css");
22
- }
23
-
24
- /**
25
- * add paste related scripts
26
- */
27
- public function addPasteScripts(){
28
-
29
- UniteProviderFunctionsUC::addjQueryInclude();
30
-
31
- HelperUC::addScriptAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_section_paste.js", "unlimited_elments_paste_section");
32
- HelperUC::addStyleAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_section_paste.css", "unlimited_elments_paste_section_css");
33
- }
34
-
35
-
36
- /**
37
- * print footer html
38
- */
39
- public function onPrintFooterHtml_paste(){
40
-
41
- $currentPost = get_post();
42
-
43
- if(empty($currentPost))
44
- return(false);
45
-
46
- $postID = $currentPost->ID;
47
-
48
- $config = array();
49
- $config["ajax_url"] = GlobalsUC::$url_ajax_full;
50
- $config["post_id"] = $postID;
51
-
52
- $jsonConfig = UniteFunctionsUC::jsonEncodeForClientSide($config);
53
-
54
- ?>
55
-
56
- <script>
57
- var g_ucPasteSectionConfig = <?php echo $jsonConfig?>;
58
- </script>
59
-
60
- <?php
61
- }
62
-
63
- /**
64
- * print footer html
65
- */
66
- public function onPrintFooterHtml_copy(){
67
-
68
- $config = array();
69
- $config["ajax_url"] = HelperUC::URLtoFull(GlobalsUC::$url_ajax_full);
70
-
71
- $jsonConfig = UniteFunctionsUC::jsonEncodeForClientSide($config);
72
-
73
- ?>
74
-
75
- <script>
76
- var g_ucCopySectionConfig = <?php echo $jsonConfig?>;
77
- </script>
78
-
79
- <?php
80
- }
81
-
82
-
83
- /**
84
- * get remote section zip from params
85
- */
86
- private function pasteSection_getRemoteZip($arrParams){
87
-
88
- $postID = UniteFunctionsUC::getVal($arrParams, "post_id");
89
- $sectionID = UniteFunctionsUC::getVal($arrParams, "section_id");
90
- $urlAjax = UniteFunctionsUC::getVal($arrParams, "remote_ajax_url");
91
-
92
- $data = array();
93
- $data["action"] = "unlimitedelements_ajax_action";
94
- $data["client_action"] = "get_section_zip";
95
- $data["postid"] = $postID;
96
- $data["sectionid"] = $sectionID;
97
-
98
- try{
99
-
100
- $contentZIP = UniteFunctionsUC::getUrlContents($urlAjax, $data);
101
-
102
- if(strpos($contentZIP, "<!doctype html>") === 0)
103
- UniteFunctionsUC::throwError("Wrong return content");
104
-
105
- }catch(Exception $e){
106
-
107
- UniteFunctionsUC::throwError("Failed to paste section from remote site");
108
- }
109
-
110
- return($contentZIP);
111
- }
112
-
113
- /**
114
- * get paste params from params string
115
- */
116
- private function getArrPasteParams($params){
117
-
118
- if(is_string($params) == false)
119
- UniteFunctionsUC::throwError("wrong paste params format");
120
-
121
- if(empty($params))
122
- UniteFunctionsUC::throwError("no paste params found");
123
-
124
- if(strpos($params, "---uc-section-copy") !== 0)
125
- UniteFunctionsUC::throwError("paste params - wrong format");
126
-
127
- $arrParams = explode("~", $params);
128
-
129
- if(count($arrParams) != 4)
130
- UniteFunctionsUC::throwError("wrong paste params number");
131
-
132
- $postID = $arrParams[1];
133
- $sectionID = $arrParams[2];
134
- $urlWebsite = $arrParams[3];
135
-
136
- $arrParams = array();
137
- $arrParams["post_id"] = $postID;
138
- $arrParams["section_id"] = $sectionID;
139
- $arrParams["remote_ajax_url"] = $urlWebsite;
140
-
141
- return($arrParams);
142
- }
143
-
144
-
145
- /**
146
- * on paste section ajax action
147
- */
148
- public function pasteSectionAjaxAction($data){
149
-
150
- $paramsData = UniteFunctionsUC::getVal($data, "params_data");
151
- if(empty($paramsData))
152
- UniteFunctionsUC::throwError("no paste data found");
153
-
154
- $targetID = UniteFunctionsUC::getVal($data, "targetid");
155
-
156
- if(empty($targetID))
157
- UniteFunctionsUC::throwError("target post not given");
158
-
159
- //clean:
160
- $paramsData = str_replace("uesection--", "", $paramsData);
161
-
162
- //decode
163
- $paramsString = UniteFunctionsUC::decodeTextContent($paramsData);
164
-
165
- $arrParams = $this->getArrPasteParams($paramsString);
166
-
167
- $contentZip = $this->pasteSection_getRemoteZip($arrParams);
168
-
169
- if(empty($contentZip) || strlen($contentZip) == 0)
170
- UniteFunctionsUC::throwError("Failed to paste section");
171
-
172
- $objExporter = new UniteCreatorLayoutsExporterElementor();
173
- $objExporter->importElementorZipContentSection($contentZip, $targetID);
174
-
175
- return(true);
176
- }
177
-
178
-
179
- /**
180
- * get section zip from data
181
- */
182
- public function getSectionZipFromData($data){
183
-
184
- try{
185
-
186
- $postID = UniteFunctionsUC::getVal($data, "postid");
187
- $sectionID = UniteFunctionsUC::getVal($data, "sectionid");
188
-
189
- if(empty($postID))
190
- return(null);
191
-
192
- if(empty($sectionID))
193
- return(null);
194
-
195
- $objExporter = new UniteCreatorLayoutsExporterElementor();
196
- $arrData = $objExporter->exportElementorPost($postID, null, true,array("sectionid"=>$sectionID));
197
- if(empty($arrData))
198
- return(null);
199
-
200
- $filepath = UniteFunctionsUC::getVal($arrData, "filepath");
201
-
202
- $content = file_get_contents($filepath);
203
-
204
- echo $content;
205
- exit();
206
-
207
- }catch(Exception $e){
208
-
209
- dmp($e);
210
-
211
- return(null);
212
- }
213
-
214
- }
215
-
216
- /**
217
- * init copy
218
- */
219
- private function initCopy(){
220
-
221
- add_action('wp_print_footer_scripts', array($this, 'onPrintFooterHtml_copy'));
222
-
223
- }
224
-
225
- /**
226
- * init paste
227
- */
228
- private function initPaste(){
229
-
230
- add_action('wp_print_footer_scripts', array($this, 'onPrintFooterHtml_paste'));
231
-
232
- }
233
-
234
- /**
235
- * init copy and paste, front
236
- */
237
- public function init(){
238
-
239
- if(UniteCreatorElementorIntegrate::$enableCopySectionButton)
240
- $this->initCopy();
241
-
242
- if(UniteCreatorElementorIntegrate::$enablePasteSectionButton)
243
- $this->initPaste();
244
-
245
- }
246
-
247
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
provider/core/plugins/unlimited_elements/dialog_param_elementor.class.php CHANGED
@@ -1108,6 +1108,22 @@ class UniteCreatorDialogParamElementor extends UniteCreatorDialogParam{
1108
 
1109
  <?php $this->addHtmlSelector()?>
1110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1111
  <?php
1112
  }
1113
 
1108
 
1109
  <?php $this->addHtmlSelector()?>
1110
 
1111
+ <!-- additional units -->
1112
+
1113
+ <div class="unite-inputs-sap-double"></div>
1114
+
1115
+ <div class="unite-inputs-label">
1116
+
1117
+ <?php esc_html_e("Additional Units", "unlimited-elements-for-elementor")?>:
1118
+ </div>
1119
+
1120
+ <input type="text" name="add_units" value="">
1121
+
1122
+ <div class="unite-dialog-description-left">
1123
+ * <?php esc_html_e("Here you can specify additional units comma saparated like vw, vh etc.", "unlimited-elements-for-elementor")?>
1124
+ </div>
1125
+
1126
+
1127
  <?php
1128
  }
1129
 
provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js CHANGED
@@ -192,14 +192,17 @@ function UniteCreatorElementorEditorAdmin(){
192
  var arrPostTypes = selectPostType.val();
193
 
194
  //force array always
195
- if(jQuery.isArray(arrPostTypes) == false)
196
  arrPostTypes = [arrPostTypes];
197
-
 
198
  var selectedCatID = objSelectPostCategory.select2("val");
199
 
200
  var options = [];
201
 
202
- for(var postType of arrPostTypes){
 
 
203
 
204
  var objPostType = getVal(dataPostTypes, postType);
205
 
@@ -660,7 +663,7 @@ function UniteCreatorElementorEditorAdmin(){
660
  function initPostIDsSelect(objSelect){
661
 
662
  var widgetSettings = getLastOpenedWidgetSettings();
663
-
664
  var settingName = objSelect.data("setting");
665
  var isSingle = objSelect.data("issingle");
666
  var dataType = objSelect.data("datatype");
@@ -829,7 +832,7 @@ function UniteCreatorElementorEditorAdmin(){
829
  * occure on change of settings panel
830
  */
831
  function onSettingsPanelInit(){
832
-
833
  initSpecialSelects();
834
 
835
  var isInited = initStyleControls();
@@ -1221,7 +1224,7 @@ function UniteCreatorElementorEditorAdmin(){
1221
  * search elementor data
1222
  */
1223
  function searchElementorData(data, id){
1224
-
1225
  //get from last opened object
1226
  if(id == window.ucLastElementorModelID){
1227
  var objSettings = getVal(window.ucLastElementorModel, "settings");
@@ -1281,13 +1284,45 @@ function UniteCreatorElementorEditorAdmin(){
1281
  */
1282
  function getSettingsFromElementor(id){
1283
 
1284
- var data = elementor.config.data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1285
 
1286
- var objSettings = searchElementorData(data, id);
 
 
 
 
 
 
 
 
 
 
 
1287
 
1288
- return(objSettings);
 
 
 
 
1289
  }
1290
 
 
1291
  /**
1292
  * ajax request to unlimited plugin from the editor
1293
  */
@@ -1397,7 +1432,7 @@ function UniteCreatorElementorEditorAdmin(){
1397
  function loadBGWidget(bgType, objSettings, funResponse){
1398
 
1399
  var settingsData = getBGSettingsData(bgType, objSettings);
1400
-
1401
  var data = {
1402
  addontype: "bg_addon",
1403
  name: bgType,
@@ -1415,7 +1450,7 @@ function UniteCreatorElementorEditorAdmin(){
1415
  * apply background to section
1416
  */
1417
  function applyBackgroundToElement(objElement, response, settingsData){
1418
-
1419
  var objIframeWindow = jQuery("#elementor-preview-iframe");
1420
 
1421
  if(objIframeWindow.length == 0)
@@ -1529,7 +1564,7 @@ function UniteCreatorElementorEditorAdmin(){
1529
  * get last widget settings
1530
  */
1531
  function getLastOpenedWidgetSettings(){
1532
-
1533
  if(!window.ucLastElementorModelID)
1534
  return(null);
1535
 
192
  var arrPostTypes = selectPostType.val();
193
 
194
  //force array always
195
+ if(jQuery.isArray(arrPostTypes) == false){
196
  arrPostTypes = [arrPostTypes];
197
+ }
198
+
199
  var selectedCatID = objSelectPostCategory.select2("val");
200
 
201
  var options = [];
202
 
203
+ for(var index in arrPostTypes){
204
+
205
+ var postType = arrPostTypes[index];
206
 
207
  var objPostType = getVal(dataPostTypes, postType);
208
 
663
  function initPostIDsSelect(objSelect){
664
 
665
  var widgetSettings = getLastOpenedWidgetSettings();
666
+
667
  var settingName = objSelect.data("setting");
668
  var isSingle = objSelect.data("issingle");
669
  var dataType = objSelect.data("datatype");
832
  * occure on change of settings panel
833
  */
834
  function onSettingsPanelInit(){
835
+
836
  initSpecialSelects();
837
 
838
  var isInited = initStyleControls();
1224
  * search elementor data
1225
  */
1226
  function searchElementorData(data, id){
1227
+
1228
  //get from last opened object
1229
  if(id == window.ucLastElementorModelID){
1230
  var objSettings = getVal(window.ucLastElementorModel, "settings");
1284
  */
1285
  function getSettingsFromElementor(id){
1286
 
1287
+ var objSettings = getVal(window.ucLastElementorModel, "settings");
1288
+
1289
+ var cid = getVal(objSettings, "cid");
1290
+ var attributes = getVal(objSettings, "attributes");
1291
+
1292
+ if(cid && attributes)
1293
+ return(attributes);
1294
+
1295
+ if(typeof elementor == "undefined")
1296
+ return(null);
1297
+
1298
+ var config = getVal(elementor, "config");
1299
+
1300
+ if(!config)
1301
+ return(null);
1302
+
1303
+ var elements = getVal(config, "elements");
1304
 
1305
+ if(!elements)
1306
+ return(null);
1307
+
1308
+ var objSettings = searchElementorData(elements, id);
1309
+
1310
+ if(!objSettings)
1311
+ return(null);
1312
+
1313
+ //if objSettings is model object, return the attributes
1314
+
1315
+ var cid = getVal(objSettings, "cid");
1316
+ var attributes = getVal(objSettings, "attributes");
1317
 
1318
+ if(!cid && !attributes)
1319
+ return(objSettings);
1320
+
1321
+
1322
+ return(attributes);
1323
  }
1324
 
1325
+
1326
  /**
1327
  * ajax request to unlimited plugin from the editor
1328
  */
1432
  function loadBGWidget(bgType, objSettings, funResponse){
1433
 
1434
  var settingsData = getBGSettingsData(bgType, objSettings);
1435
+
1436
  var data = {
1437
  addontype: "bg_addon",
1438
  name: bgType,
1450
  * apply background to section
1451
  */
1452
  function applyBackgroundToElement(objElement, response, settingsData){
1453
+
1454
  var objIframeWindow = jQuery("#elementor-preview-iframe");
1455
 
1456
  if(objIframeWindow.length == 0)
1564
  * get last widget settings
1565
  */
1566
  function getLastOpenedWidgetSettings(){
1567
+
1568
  if(!window.ucLastElementorModelID)
1569
  return(null);
1570
 
provider/core/plugins/unlimited_elements/elementor/elementor_integrate.class.php CHANGED
@@ -59,9 +59,9 @@ class UniteCreatorElementorIntegrate{
59
  public static $showWidgetPreviews = true;
60
  public static $arrWidgetIcons = array(); //fill by the widgets
61
  public static $isDarkMode = false;
62
- public static $enableCopySectionButton = false;
63
- public static $enablePasteSectionButton = false;
64
- private $objCopyPaste;
65
 
66
 
67
  /**
@@ -113,7 +113,7 @@ class UniteCreatorElementorIntegrate{
113
 
114
  require_once $this->pathPlugin."test_widget.class.php";
115
 
116
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new ElementorWidgetTest());
117
  }
118
 
119
 
@@ -128,7 +128,7 @@ class UniteCreatorElementorIntegrate{
128
  $addon = $arrAddons[0];
129
 
130
  $widget = new UniteCreatorElementorWidget();
131
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type($widget);
132
 
133
  }
134
 
@@ -172,6 +172,9 @@ class UniteCreatorElementorIntegrate{
172
  * register addons
173
  */
174
  private function registerWidgets_addons($arrAddons, $isRecords = false){
 
 
 
175
 
176
  foreach ($arrAddons as $addon) {
177
 
@@ -214,8 +217,15 @@ class UniteCreatorElementorIntegrate{
214
  try{
215
 
216
  $widget = new $className();
217
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type($widget);
 
 
 
 
 
 
218
 
 
219
  self::logMemoryUsage("Register Widget: ".$name.", counter: ".self::$counterWidgets);
220
 
221
  }catch(Exception $e){
@@ -224,6 +234,7 @@ class UniteCreatorElementorIntegrate{
224
 
225
  }
226
 
 
227
 
228
  }
229
 
@@ -238,7 +249,13 @@ class UniteCreatorElementorIntegrate{
238
  eval($code);
239
 
240
  $widget = new $className();
241
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type($widget);
 
 
 
 
 
 
242
 
243
  }
244
 
@@ -396,29 +413,50 @@ class UniteCreatorElementorIntegrate{
396
  * register controls
397
  */
398
  public function onRegisterControls($controls_manager) {
399
-
 
 
 
400
  self::logMemoryUsage("before controls registered");
401
-
 
 
 
 
402
  //add hr control
403
  require $this->pathControls."control_hr.php";
404
- $controls_manager->register(new Elementor\Control_UC_HR());
405
-
 
 
 
406
  //add audio control
407
  require $this->pathControls."control_audio.php";
408
- $controls_manager->register(new Elementor\Control_UC_AUDIO());
 
 
 
409
 
410
  //add addons selector control
411
  require $this->pathControls."control_addon_selector.php";
 
 
 
412
  $controls_manager->register(new Elementor\Control_UC_AddonSelector());
413
 
414
  //add select post type control
415
 
416
  require $this->pathControls."control_select_posttype.php";
 
 
 
417
  $controls_manager->register(new Elementor\Control_UC_SelectSpecial);
418
 
419
 
420
  self::logMemoryUsage("after controls registered");
421
 
 
 
422
  }
423
 
424
 
@@ -452,7 +490,7 @@ class UniteCreatorElementorIntegrate{
452
  * add all categories
453
  */
454
  private function addUCCategories(){
455
-
456
  $objElementsManager = \Elementor\Plugin::instance()->elements_manager;
457
 
458
  //add general category
@@ -878,7 +916,7 @@ class UniteCreatorElementorIntegrate{
878
  }
879
 
880
  $default = $none;
881
-
882
  //Section background
883
  $objControls->start_controls_section(
884
  'section_background_uc',
@@ -1010,13 +1048,6 @@ class UniteCreatorElementorIntegrate{
1010
  HelperUC::addStyleAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_admin.css", "unlimited_elements_front_admin_css");
1011
  }
1012
 
1013
- //---- copy paste related
1014
- if(self::$enableCopySectionButton == true && self::$isEditMode == false)
1015
- $this->objCopyPaste->addCopyScripts();
1016
-
1017
- if(self::$enablePasteSectionButton == true && self::$isEditMode == false)
1018
- $this->objCopyPaste->addPasteScripts();
1019
-
1020
 
1021
  }
1022
 
@@ -1452,12 +1483,15 @@ class UniteCreatorElementorIntegrate{
1452
 
1453
  //get post id from query
1454
 
1455
- if(is_admin() == true || is_archive() == true || is_front_page() == true)
 
 
 
1456
  return($filterValue);
1457
 
1458
  if(empty(self::$arrPostsWidgetNames))
1459
  return($filterValue);
1460
-
1461
  $postID = $wp_query->queried_object_id;
1462
 
1463
  }
@@ -1559,6 +1593,10 @@ class UniteCreatorElementorIntegrate{
1559
 
1560
  $arrSettingsValues = HelperProviderCoreUC_EL::getGeneralSettingsValues();
1561
 
 
 
 
 
1562
 
1563
  //consolidation always false
1564
  self::$isConsolidated = false;
@@ -1589,13 +1627,19 @@ class UniteCreatorElementorIntegrate{
1589
 
1590
 
1591
  add_action('elementor/editor/init', array($this, 'onEditorInit'));
1592
-
1593
- add_action('elementor/widgets/widgets_registered', array($this, 'onWidgetsRegistered'));
 
 
 
1594
 
1595
  add_action('elementor/frontend/after_register_scripts', array($this, 'onRegisterFrontScripts'), 10);
1596
  add_action('elementor/editor/after_enqueue_scripts', array($this, 'onEnqueueEditorScripts'), 10);
1597
 
1598
- add_action('elementor/controls/register', array($this, 'onRegisterControls'));
 
 
 
1599
 
1600
  add_action('elementor/frontend/after_enqueue_scripts', array($this, 'onFrontendAfterRegisterControls'));
1601
 
59
  public static $showWidgetPreviews = true;
60
  public static $arrWidgetIcons = array(); //fill by the widgets
61
  public static $isDarkMode = false;
62
+ private $isControlsRegistered = false;
63
+ private $isWidgetsRegistered = false;
64
+ private $isOldElementorVersion = false;
65
 
66
 
67
  /**
113
 
114
  require_once $this->pathPlugin."test_widget.class.php";
115
 
116
+ \Elementor\Plugin::instance()->widgets_manager->register(new ElementorWidgetTest());
117
  }
118
 
119
 
128
  $addon = $arrAddons[0];
129
 
130
  $widget = new UniteCreatorElementorWidget();
131
+ \Elementor\Plugin::instance()->widgets_manager->register($widget);
132
 
133
  }
134
 
172
  * register addons
173
  */
174
  private function registerWidgets_addons($arrAddons, $isRecords = false){
175
+
176
+ if($this->isWidgetsRegistered == true)
177
+ return(false);
178
 
179
  foreach ($arrAddons as $addon) {
180
 
217
  try{
218
 
219
  $widget = new $className();
220
+
221
+ $manager = \Elementor\Plugin::instance()->widgets_manager;
222
+
223
+ if(method_exists($manager, "register"))
224
+ $manager->register($widget);
225
+ else
226
+ $manager->register_widget_type($widget);
227
 
228
+
229
  self::logMemoryUsage("Register Widget: ".$name.", counter: ".self::$counterWidgets);
230
 
231
  }catch(Exception $e){
234
 
235
  }
236
 
237
+ $this->isWidgetsRegistered = true;
238
 
239
  }
240
 
249
  eval($code);
250
 
251
  $widget = new $className();
252
+
253
+ $manager = \Elementor\Plugin::instance()->widgets_manager;
254
+
255
+ if(method_exists($manager, "register"))
256
+ $manager->register($widget);
257
+ else
258
+ $manager->register_widget_type($widget);
259
 
260
  }
261
 
413
  * register controls
414
  */
415
  public function onRegisterControls($controls_manager) {
416
+
417
+ if($this->isControlsRegistered == true)
418
+ return(false);
419
+
420
  self::logMemoryUsage("before controls registered");
421
+
422
+ $isOldWay = false;
423
+ if(method_exists($controls_manager, "register") == false)
424
+ $isOldWay = true;
425
+
426
  //add hr control
427
  require $this->pathControls."control_hr.php";
428
+ if($isOldWay == true)
429
+ $controls_manager->register_control('uc_hr', new Elementor\Control_UC_HR());
430
+ else
431
+ $controls_manager->register(new Elementor\Control_UC_HR());
432
+
433
  //add audio control
434
  require $this->pathControls."control_audio.php";
435
+ if($isOldWay == true)
436
+ $controls_manager->register_control('uc_mp3',new Elementor\Control_UC_AUDIO());
437
+ else
438
+ $controls_manager->register(new Elementor\Control_UC_AUDIO());
439
 
440
  //add addons selector control
441
  require $this->pathControls."control_addon_selector.php";
442
+ if($isOldWay == true)
443
+ $controls_manager->register_control('uc_addon_selector',new Elementor\Control_UC_AddonSelector());
444
+ else
445
  $controls_manager->register(new Elementor\Control_UC_AddonSelector());
446
 
447
  //add select post type control
448
 
449
  require $this->pathControls."control_select_posttype.php";
450
+ if($isOldWay == true)
451
+ $controls_manager->register_control('uc_select_special',new Elementor\Control_UC_SelectSpecial);
452
+ else
453
  $controls_manager->register(new Elementor\Control_UC_SelectSpecial);
454
 
455
 
456
  self::logMemoryUsage("after controls registered");
457
 
458
+ $this->isControlsRegistered = true;
459
+
460
  }
461
 
462
 
490
  * add all categories
491
  */
492
  private function addUCCategories(){
493
+
494
  $objElementsManager = \Elementor\Plugin::instance()->elements_manager;
495
 
496
  //add general category
916
  }
917
 
918
  $default = $none;
919
+
920
  //Section background
921
  $objControls->start_controls_section(
922
  'section_background_uc',
1048
  HelperUC::addStyleAbsoluteUrl(HelperProviderCoreUC_EL::$urlCore."elementor/assets/uc_front_admin.css", "unlimited_elements_front_admin_css");
1049
  }
1050
 
 
 
 
 
 
 
 
1051
 
1052
  }
1053
 
1483
 
1484
  //get post id from query
1485
 
1486
+ if(is_admin() == true || is_singular() == false)
1487
+ return($filterValue);
1488
+
1489
+ if(@is_front_page() == true)
1490
  return($filterValue);
1491
 
1492
  if(empty(self::$arrPostsWidgetNames))
1493
  return($filterValue);
1494
+
1495
  $postID = $wp_query->queried_object_id;
1496
 
1497
  }
1593
 
1594
  $arrSettingsValues = HelperProviderCoreUC_EL::getGeneralSettingsValues();
1595
 
1596
+ //detect old elementor version
1597
+ $compare = version_compare(ELEMENTOR_VERSION, '3.7.0');
1598
+ if($compare < 0)
1599
+ $this->isOldElementorVersion = true;
1600
 
1601
  //consolidation always false
1602
  self::$isConsolidated = false;
1627
 
1628
 
1629
  add_action('elementor/editor/init', array($this, 'onEditorInit'));
1630
+
1631
+ if($this->isOldElementorVersion == true)
1632
+ add_action('elementor/widgets/widgets_registered', array($this, 'onWidgetsRegistered'));
1633
+ else
1634
+ add_action('elementor/widgets/register', array($this, 'onWidgetsRegistered'));
1635
 
1636
  add_action('elementor/frontend/after_register_scripts', array($this, 'onRegisterFrontScripts'), 10);
1637
  add_action('elementor/editor/after_enqueue_scripts', array($this, 'onEnqueueEditorScripts'), 10);
1638
 
1639
+ if($this->isOldElementorVersion == true)
1640
+ add_action('elementor/controls/controls_registered', array($this, 'onRegisterControls'));
1641
+ else
1642
+ add_action('elementor/controls/register', array($this, 'onRegisterControls'));
1643
 
1644
  add_action('elementor/frontend/after_enqueue_scripts', array($this, 'onFrontendAfterRegisterControls'));
1645
 
provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php CHANGED
@@ -31,7 +31,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
31
  protected $objControls;
32
  protected $isAddSapBefore = false;
33
  protected $tabsCounter = 1;
34
-
35
  const DEBUG_SETTINGS_VALUES = false;
36
 
37
 
@@ -493,6 +493,9 @@ class UniteCreatorElementorWidget extends Widget_Base {
493
  $itemsHeading = $this->objAddon->getOption("items_section_heading");
494
  $itemsHeading = trim($itemsHeading);
495
 
 
 
 
496
 
497
  if(!empty($itemsTitle))
498
  $itemsLabel = $itemsTitle;
@@ -534,9 +537,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
534
 
535
  $paramsItems = $this->objAddon->getProcessedItemsParams();
536
  $paramsItems = $this->addDynamicAttributes($paramsItems);
537
-
538
- $titleField = null;
539
-
540
  $activeTab = null;
541
 
542
  foreach($paramsItems as $param){
@@ -544,9 +545,9 @@ class UniteCreatorElementorWidget extends Widget_Base {
544
  $name = UniteFunctionsUC::getVal($param, "name");
545
  $type = UniteFunctionsUC::getVal($param, "type");
546
 
547
- if($name == "title")
548
- $titleField = $name;
549
-
550
  switch($type){
551
  case UniteCreatorDialogParam::PARAM_TEMPLATE: //convert template to text param
552
 
@@ -647,7 +648,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
647
  $arrItemsControl["fields"] = $repeater->get_controls();
648
 
649
  if(!empty($titleField))
650
- $arrItemsControl["title_field"] = "{{{ $titleField }}}";
651
 
652
  //---- set default data
653
 
@@ -674,7 +675,20 @@ class UniteCreatorElementorWidget extends Widget_Base {
674
  }
675
 
676
  //add the control actually
677
-
 
 
 
 
 
 
 
 
 
 
 
 
 
678
  $this->objControls->add_control($controlName, $arrItemsControl);
679
 
680
  if($this->isBGWidget == false)
@@ -1082,8 +1096,17 @@ class UniteCreatorElementorWidget extends Widget_Base {
1082
  case UniteCreatorDialogParam::PARAM_PADDING:
1083
  case UniteCreatorDialogParam::PARAM_MARGINS:
1084
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
 
 
 
 
 
 
 
 
1085
 
1086
- $arrControl["size_units"] = array("px","%");
 
1087
 
1088
  $isResponsive = UniteFunctionsUC::getVal($param, "is_responsive");
1089
  $isResponsive = UniteFunctionsUC::strToBool($isResponsive);
31
  protected $objControls;
32
  protected $isAddSapBefore = false;
33
  protected $tabsCounter = 1;
34
+
35
  const DEBUG_SETTINGS_VALUES = false;
36
 
37
 
493
  $itemsHeading = $this->objAddon->getOption("items_section_heading");
494
  $itemsHeading = trim($itemsHeading);
495
 
496
+ $titleField = $this->objAddon->getOption("items_title_field");
497
+ $titleField = trim($titleField);
498
+
499
 
500
  if(!empty($itemsTitle))
501
  $itemsLabel = $itemsTitle;
537
 
538
  $paramsItems = $this->objAddon->getProcessedItemsParams();
539
  $paramsItems = $this->addDynamicAttributes($paramsItems);
540
+
 
 
541
  $activeTab = null;
542
 
543
  foreach($paramsItems as $param){
545
  $name = UniteFunctionsUC::getVal($param, "name");
546
  $type = UniteFunctionsUC::getVal($param, "type");
547
 
548
+ if($name == "title" && empty($titleField))
549
+ $titleField = "{{{ $name }}}";
550
+
551
  switch($type){
552
  case UniteCreatorDialogParam::PARAM_TEMPLATE: //convert template to text param
553
 
648
  $arrItemsControl["fields"] = $repeater->get_controls();
649
 
650
  if(!empty($titleField))
651
+ $arrItemsControl["title_field"] = $titleField;
652
 
653
  //---- set default data
654
 
675
  }
676
 
677
  //add the control actually
678
+
679
+ $widgetName = $this->objAddon->getName();
680
+
681
+ /*
682
+ if($widgetName == "your_widget"){
683
+
684
+ dmp("debug repeater");
685
+ dmp($widgetName);
686
+ dmp($controlName);
687
+ dmp($arrItemsControl);
688
+ exit();
689
+ }
690
+ */
691
+
692
  $this->objControls->add_control($controlName, $arrItemsControl);
693
 
694
  if($this->isBGWidget == false)
1096
  case UniteCreatorDialogParam::PARAM_PADDING:
1097
  case UniteCreatorDialogParam::PARAM_MARGINS:
1098
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
1099
+
1100
+ $arrControl["size_units"] = array("px","%","em","rem");
1101
+
1102
+ $addUnits = UniteFunctionsUC::getVal($param, "add_units");
1103
+
1104
+ if(!empty($addUnits)){
1105
+
1106
+ $arrAddUnits = explode(",", $addUnits);
1107
 
1108
+ $arrControl["size_units"] = array_merge($arrControl["size_units"], $arrAddUnits);
1109
+ }
1110
 
1111
  $isResponsive = UniteFunctionsUC::getVal($param, "is_responsive");
1112
  $isResponsive = UniteFunctionsUC::strToBool($isResponsive);
provider/core/plugins/unlimited_elements/elementor/pagination.class.php CHANGED
@@ -17,7 +17,6 @@ class UniteCreatorElementorPagination{
17
  * add content controls
18
  */
19
  private function addElementorControls_content($widget, $postListParam){
20
-
21
 
22
  $condition = UniteFunctionsUC::getVal($postListParam, "condition");
23
 
@@ -27,8 +26,14 @@ class UniteCreatorElementorPagination{
27
  $enableAjax = UniteFunctionsUC::getVal($postListParam, "enable_ajax");
28
  $enableAjax = UniteFunctionsUC::strToBool($enableAjax);
29
 
30
- $paramName = UniteFunctionsUC::getVal($postListParam, "name");
 
 
 
 
 
31
 
 
32
 
33
  $textSection = esc_html__("Posts Pagination", "unlimited-elements-for-elementor");
34
  if($isFilterable == true)
@@ -47,7 +52,7 @@ class UniteCreatorElementorPagination{
47
  $widget->start_controls_section(
48
  'section_pagination', $arrSectionSettings
49
  );
50
-
51
  $widget->add_control(
52
  'pagination_heading',
53
  [
@@ -245,7 +250,7 @@ class UniteCreatorElementorPagination{
245
  * add elementor controls
246
  */
247
  public function addElementorSectionControls($widget, $postListParam = null){
248
-
249
  $this->addElementorControls_content($widget,$postListParam);
250
 
251
  //$this->addElementorControls_styles($widget);
@@ -673,9 +678,7 @@ class UniteCreatorElementorPagination{
673
 
674
  //editor mode
675
  if($isEditMode == true){
676
-
677
- dmp("edit mode!");
678
-
679
  $output = array();
680
  $output["attributes"] = "";
681
  $output["style"] = "";
17
  * add content controls
18
  */
19
  private function addElementorControls_content($widget, $postListParam){
 
20
 
21
  $condition = UniteFunctionsUC::getVal($postListParam, "condition");
22
 
26
  $enableAjax = UniteFunctionsUC::getVal($postListParam, "enable_ajax");
27
  $enableAjax = UniteFunctionsUC::strToBool($enableAjax);
28
 
29
+ $disablePagination = UniteFunctionsUC::getVal($postListParam, "disable_pagination");
30
+ $disablePagination = UniteFunctionsUC::strToBool($disablePagination);
31
+
32
+ if($disablePagination === true)
33
+ return(false);
34
+
35
 
36
+ $paramName = UniteFunctionsUC::getVal($postListParam, "name");
37
 
38
  $textSection = esc_html__("Posts Pagination", "unlimited-elements-for-elementor");
39
  if($isFilterable == true)
52
  $widget->start_controls_section(
53
  'section_pagination', $arrSectionSettings
54
  );
55
+
56
  $widget->add_control(
57
  'pagination_heading',
58
  [
250
  * add elementor controls
251
  */
252
  public function addElementorSectionControls($widget, $postListParam = null){
253
+
254
  $this->addElementorControls_content($widget,$postListParam);
255
 
256
  //$this->addElementorControls_styles($widget);
678
 
679
  //editor mode
680
  if($isEditMode == true){
681
+
 
 
682
  $output = array();
683
  $output["attributes"] = "";
684
  $output["style"] = "";
provider/core/plugins/unlimited_elements/elementor/plugin.php CHANGED
@@ -32,7 +32,7 @@ class Plugin {
32
  * @access private
33
  */
34
  private function add_actions() {
35
- add_action( 'elementor/widgets/widgets_registered', [ $this, 'on_widgets_registered' ] );
36
 
37
  }
38
 
@@ -48,7 +48,7 @@ class Plugin {
48
 
49
 
50
  private function register_widget() {
51
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new ElementorWidgetTest() );
52
  }
53
 
54
  }
32
  * @access private
33
  */
34
  private function add_actions() {
35
+ add_action( 'elementor/widgets/register', [ $this, 'on_widgets_registered' ] );
36
 
37
  }
38
 
48
 
49
 
50
  private function register_widget() {
51
+ \Elementor\Plugin::instance()->widgets_manager->register( new ElementorWidgetTest() );
52
  }
53
 
54
  }
provider/core/plugins/unlimited_elements/globals.class.php CHANGED
@@ -15,6 +15,24 @@ class GlobalsUnlimitedElements{
15
  public static $insideNotificationUrl = "https://unlimited-elements.com/pricing/";
16
 
17
  public static $showAdminNotice = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  public static $arrAdminNotice = array(
19
  "id"=>"birthday-3-sale",
20
  //"text"=>"Birthday Sale IS Here!",
@@ -27,6 +45,7 @@ class GlobalsUnlimitedElements{
27
  "free_only"=>true,
28
  "no-notice-wrap"=>true
29
  );
 
30
 
31
  const PLUGIN_NAME = "unlimitedelements";
32
  const VIEW_ADDONS_ELEMENTOR = "addons_elementor";
@@ -68,6 +87,19 @@ class GlobalsUnlimitedElements{
68
  public static $urlTemplatesList;
69
  public static $renderingDynamicData;
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  /**
73
  * init globals
@@ -76,6 +108,8 @@ class GlobalsUnlimitedElements{
76
 
77
  self::$urlTemplatesList = admin_url("edit.php?post_type=elementor_library&tabs_group=library");
78
 
 
 
79
 
80
  }
81
 
15
  public static $insideNotificationUrl = "https://unlimited-elements.com/pricing/";
16
 
17
  public static $showAdminNotice = false;
18
+
19
+ public static $arrAdminNotice = array(
20
+ "id"=>"doubly1",
21
+ "text"=>"temp text", //real text goes from event
22
+ //"banner"=>"birthday-3-banner.png",
23
+ "type"=>"simple",
24
+ "color"=>"doubly", //info , error, doubly, warning
25
+ //"type"=>"banner", //advanced,banner
26
+ //"button_text"=>"Show Me More",
27
+ //"button_link"=>"https://doubly.pro",
28
+ "expire"=>"",
29
+ "free_only"=>false,
30
+ //"condition"=>"no_doubly",
31
+ "internal_only"=>true, //show only in ue page
32
+ "no-notice-wrap"=>false
33
+ );
34
+
35
+ /*
36
  public static $arrAdminNotice = array(
37
  "id"=>"birthday-3-sale",
38
  //"text"=>"Birthday Sale IS Here!",
45
  "free_only"=>true,
46
  "no-notice-wrap"=>true
47
  );
48
+ */
49
 
50
  const PLUGIN_NAME = "unlimitedelements";
51
  const VIEW_ADDONS_ELEMENTOR = "addons_elementor";
87
  public static $urlTemplatesList;
88
  public static $renderingDynamicData;
89
 
90
+ /**
91
+ * on admin init
92
+ */
93
+ public static function onAdminInit(){
94
+
95
+ $urlInstallDoubly = UniteFunctionsWPUC::getInstallPluginLink("doubly");
96
+
97
+ $textDoubly = "Unlimited Elements Notice - Do you know, you can copy sections from our site using our Doubly plugin. <a href='{$urlInstallDoubly}'>Install Doubly Now</a>";
98
+
99
+ self::$arrAdminNotice["text"] = $textDoubly;
100
+
101
+ }
102
+
103
 
104
  /**
105
  * init globals
108
 
109
  self::$urlTemplatesList = admin_url("edit.php?post_type=elementor_library&tabs_group=library");
110
 
111
+ add_action("init",array("GlobalsUnlimitedElements", "onAdminInit"));
112
+
113
 
114
  }
115
 
provider/core/plugins/unlimited_elements/helper_provider_core.class.php CHANGED
@@ -185,7 +185,7 @@ class HelperProviderCoreUC_EL{
185
  eval($code);
186
 
187
  $widget = new $className();
188
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type($widget);
189
 
190
  }
191
 
185
  eval($code);
186
 
187
  $widget = new $className();
188
+ \Elementor\Plugin::instance()->widgets_manager->register($widget);
189
 
190
  }
191
 
provider/core/plugins/unlimited_elements/provider_core_admin.class.php CHANGED
@@ -143,7 +143,7 @@ class UniteProviderCoreAdminUC_Elementor extends UniteProviderAdminUC{
143
  /**
144
  * init the admin notices
145
  */
146
- private function initAdminNotices(){
147
 
148
  if(GlobalsUnlimitedElements::$showAdminNotice == false)
149
  return(false);
@@ -177,8 +177,10 @@ class UniteProviderCoreAdminUC_Elementor extends UniteProviderAdminUC{
177
  if(GlobalsUnlimitedElements::ALLOW_FEEDBACK_ONUNINSTALL == true)
178
  $this->initFeedbackUninstall();
179
 
180
- $this->initAdminNotices();
181
-
 
 
182
  parent::init();
183
  }
184
 
143
  /**
144
  * init the admin notices
145
  */
146
+ public function initAdminNotices(){
147
 
148
  if(GlobalsUnlimitedElements::$showAdminNotice == false)
149
  return(false);
177
  if(GlobalsUnlimitedElements::ALLOW_FEEDBACK_ONUNINSTALL == true)
178
  $this->initFeedbackUninstall();
179
 
180
+ //init the admin notices - on admin init ation
181
+
182
+ add_action("admin_init",array($this,"initAdminNotices"));
183
+
184
  parent::init();
185
  }
186
 
provider/freemius/includes/class-freemius.php CHANGED
@@ -4058,7 +4058,7 @@
4058
  if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4059
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4060
 
4061
- $secure_auth = SECURE_AUTH_KEY;
4062
  if ( empty( $secure_auth ) ||
4063
  false !== strpos( $secure_auth, ' ' ) ||
4064
  'put your unique phrase here' === $secure_auth
@@ -18330,7 +18330,6 @@
18330
 
18331
  if ( $add_submenu_items ) {
18332
  if (! WP_FS__DEMO_MODE && ! $this->is_whitelabeled() ) {
18333
- /*
18334
  // Add contact page.
18335
  $this->add_submenu_item(
18336
  $this->get_text_inline( 'Contact Us', 'contact-us' ),
@@ -18342,7 +18341,6 @@
18342
  WP_FS__DEFAULT_PRIORITY,
18343
  $this->is_submenu_item_visible( 'contact' )
18344
  );
18345
- */
18346
  }
18347
 
18348
  if ( $this->has_addons() ) {
4058
  if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4059
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4060
 
4061
+ $secure_auth = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
4062
  if ( empty( $secure_auth ) ||
4063
  false !== strpos( $secure_auth, ' ' ) ||
4064
  'put your unique phrase here' === $secure_auth
18330
 
18331
  if ( $add_submenu_items ) {
18332
  if (! WP_FS__DEMO_MODE && ! $this->is_whitelabeled() ) {
 
18333
  // Add contact page.
18334
  $this->add_submenu_item(
18335
  $this->get_text_inline( 'Contact Us', 'contact-us' ),
18341
  WP_FS__DEFAULT_PRIORITY,
18342
  $this->is_submenu_item_visible( 'contact' )
18343
  );
 
18344
  }
18345
 
18346
  if ( $this->has_addons() ) {
provider/freemius/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -298,6 +298,7 @@
298
  return $this->get( $k, null );
299
  }
300
 
 
301
  function offsetSet( $k, $v ) {
302
  if ( is_null( $k ) ) {
303
  throw new Exception( 'Can\'t append value to request params.' );
@@ -306,14 +307,17 @@
306
  }
307
  }
308
 
 
309
  function offsetExists( $k ) {
310
  return array_key_exists( $k, $this->_data );
311
  }
312
 
 
313
  function offsetUnset( $k ) {
314
  unset( $this->$k );
315
  }
316
 
 
317
  function offsetGet( $k ) {
318
  return $this->get( $k, null );
319
  }
@@ -325,6 +329,7 @@
325
  * @link http://php.net/manual/en/iterator.current.php
326
  * @return mixed Can return any type.
327
  */
 
328
  public function current() {
329
  return current( $this->_data );
330
  }
@@ -336,6 +341,7 @@
336
  * @link http://php.net/manual/en/iterator.next.php
337
  * @return void Any returned value is ignored.
338
  */
 
339
  public function next() {
340
  next( $this->_data );
341
  }
@@ -347,6 +353,7 @@
347
  * @link http://php.net/manual/en/iterator.key.php
348
  * @return mixed scalar on success, or null on failure.
349
  */
 
350
  public function key() {
351
  return key( $this->_data );
352
  }
@@ -359,6 +366,7 @@
359
  * @return boolean The return value will be casted to boolean and then evaluated.
360
  * Returns true on success or false on failure.
361
  */
 
362
  public function valid() {
363
  $key = key( $this->_data );
364
 
@@ -372,6 +380,7 @@
372
  * @link http://php.net/manual/en/iterator.rewind.php
373
  * @return void Any returned value is ignored.
374
  */
 
375
  public function rewind() {
376
  reset( $this->_data );
377
  }
@@ -386,6 +395,7 @@
386
  * <p>
387
  * The return value is cast to an integer.
388
  */
 
389
  public function count() {
390
  return count( $this->_data );
391
  }
298
  return $this->get( $k, null );
299
  }
300
 
301
+ #[ReturnTypeWillChange]
302
  function offsetSet( $k, $v ) {
303
  if ( is_null( $k ) ) {
304
  throw new Exception( 'Can\'t append value to request params.' );
307
  }
308
  }
309
 
310
+ #[ReturnTypeWillChange]
311
  function offsetExists( $k ) {
312
  return array_key_exists( $k, $this->_data );
313
  }
314
 
315
+ #[ReturnTypeWillChange]
316
  function offsetUnset( $k ) {
317
  unset( $this->$k );
318
  }
319
 
320
+ #[ReturnTypeWillChange]
321
  function offsetGet( $k ) {
322
  return $this->get( $k, null );
323
  }
329
  * @link http://php.net/manual/en/iterator.current.php
330
  * @return mixed Can return any type.
331
  */
332
+ #[ReturnTypeWillChange]
333
  public function current() {
334
  return current( $this->_data );
335
  }
341
  * @link http://php.net/manual/en/iterator.next.php
342
  * @return void Any returned value is ignored.
343
  */
344
+ #[ReturnTypeWillChange]
345
  public function next() {
346
  next( $this->_data );
347
  }
353
  * @link http://php.net/manual/en/iterator.key.php
354
  * @return mixed scalar on success, or null on failure.
355
  */
356
+ #[ReturnTypeWillChange]
357
  public function key() {
358
  return key( $this->_data );
359
  }
366
  * @return boolean The return value will be casted to boolean and then evaluated.
367
  * Returns true on success or false on failure.
368
  */
369
+ #[ReturnTypeWillChange]
370
  public function valid() {
371
  $key = key( $this->_data );
372
 
380
  * @link http://php.net/manual/en/iterator.rewind.php
381
  * @return void Any returned value is ignored.
382
  */
383
+ #[ReturnTypeWillChange]
384
  public function rewind() {
385
  reset( $this->_data );
386
  }
395
  * <p>
396
  * The return value is cast to an integer.
397
  */
398
+ #[ReturnTypeWillChange]
399
  public function count() {
400
  return count( $this->_data );
401
  }
provider/freemius/languages/freemius-cs_CZ.mo CHANGED
Binary file
provider/freemius/languages/freemius-da_DK.mo CHANGED
Binary file
provider/freemius/languages/freemius-de_DE.mo ADDED
Binary file
provider/freemius/languages/freemius-en.mo CHANGED
Binary file
provider/freemius/languages/freemius-es_ES.mo CHANGED
Binary file
provider/freemius/languages/freemius-fr_FR.mo CHANGED
Binary file
provider/freemius/languages/freemius-he_IL.mo CHANGED
Binary file
provider/freemius/languages/freemius-hu_HU.mo CHANGED
Binary file
provider/freemius/languages/freemius-it_IT.mo CHANGED
Binary file
provider/freemius/languages/freemius-ja.mo CHANGED
Binary file
provider/freemius/languages/freemius-nl_NL.mo CHANGED
Binary file
provider/freemius/languages/freemius-ru_RU.mo CHANGED
Binary file
provider/freemius/languages/freemius-ta.mo CHANGED
Binary file
provider/freemius/languages/freemius-zh_CN.mo CHANGED
Binary file
provider/freemius/languages/freemius.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021 freemius
2
  # This file is distributed under the same license as the freemius package.
3
  msgid ""
4
  msgstr ""
@@ -8,6 +8,7 @@ msgstr ""
8
  "Content-Transfer-Encoding: 8bit\n"
9
  "Language-Team: Freemius Team <admin@freemius.com>\n"
10
  "Last-Translator: Vova Feldman <vova@freemius.com>\n"
 
11
  "Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
12
  "X-Poedit-Basepath: ..\n"
13
  "X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
@@ -16,796 +17,32 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
- #: includes/class-freemius.php:1919, templates/account.php:912
20
  msgid "An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned."
21
  msgstr ""
22
 
23
- #: includes/class-freemius.php:1926
24
  msgid "Would you like to proceed with the update?"
25
  msgstr ""
26
 
27
- #: includes/class-freemius.php:2138
28
- msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
29
- msgstr ""
30
-
31
- #: includes/class-freemius.php:2140
32
- msgid "Error"
33
- msgstr ""
34
-
35
- #: includes/class-freemius.php:2540
36
- msgid "I found a better %s"
37
- msgstr ""
38
-
39
- #: includes/class-freemius.php:2542
40
- msgid "What's the %s's name?"
41
- msgstr ""
42
-
43
- #: includes/class-freemius.php:2548
44
- msgid "It's a temporary %s. I'm just debugging an issue."
45
- msgstr ""
46
-
47
- #: includes/class-freemius.php:2550
48
- msgid "Deactivation"
49
- msgstr ""
50
-
51
- #: includes/class-freemius.php:2551
52
- msgid "Theme Switch"
53
- msgstr ""
54
-
55
- #: includes/class-freemius.php:2560, templates/forms/resend-key.php:24, templates/forms/user-change.php:29
56
- msgid "Other"
57
- msgstr ""
58
-
59
- #: includes/class-freemius.php:2568
60
- msgid "I no longer need the %s"
61
- msgstr ""
62
-
63
- #: includes/class-freemius.php:2575
64
- msgid "I only needed the %s for a short period"
65
- msgstr ""
66
-
67
- #: includes/class-freemius.php:2581
68
- msgid "The %s broke my site"
69
- msgstr ""
70
-
71
- #: includes/class-freemius.php:2588
72
- msgid "The %s suddenly stopped working"
73
- msgstr ""
74
-
75
- #: includes/class-freemius.php:2598
76
- msgid "I can't pay for it anymore"
77
- msgstr ""
78
-
79
- #: includes/class-freemius.php:2600
80
- msgid "What price would you feel comfortable paying?"
81
- msgstr ""
82
-
83
- #: includes/class-freemius.php:2606
84
- msgid "I don't like to share my information with you"
85
- msgstr ""
86
-
87
- #: includes/class-freemius.php:2627
88
- msgid "The %s didn't work"
89
- msgstr ""
90
-
91
- #: includes/class-freemius.php:2637
92
- msgid "I couldn't understand how to make it work"
93
- msgstr ""
94
-
95
- #: includes/class-freemius.php:2645
96
- msgid "The %s is great, but I need specific feature that you don't support"
97
- msgstr ""
98
-
99
- #: includes/class-freemius.php:2647
100
- msgid "What feature?"
101
- msgstr ""
102
-
103
- #: includes/class-freemius.php:2651
104
- msgid "The %s is not working"
105
- msgstr ""
106
-
107
- #: includes/class-freemius.php:2653
108
- msgid "Kindly share what didn't work so we can fix it for future users..."
109
- msgstr ""
110
-
111
- #: includes/class-freemius.php:2657
112
- msgid "It's not what I was looking for"
113
- msgstr ""
114
-
115
- #: includes/class-freemius.php:2659
116
- msgid "What you've been looking for?"
117
- msgstr ""
118
-
119
- #: includes/class-freemius.php:2663
120
- msgid "The %s didn't work as expected"
121
- msgstr ""
122
-
123
- #: includes/class-freemius.php:2665
124
- msgid "What did you expect?"
125
- msgstr ""
126
-
127
- #: includes/class-freemius.php:3520, templates/debug.php:20
128
  msgid "Freemius Debug"
129
  msgstr ""
130
 
131
- #: includes/class-freemius.php:4272
132
- msgid "I don't know what is cURL or how to install it, help me!"
133
- msgstr ""
134
-
135
- #: includes/class-freemius.php:4274
136
- msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
137
- msgstr ""
138
-
139
- #: includes/class-freemius.php:4281
140
- msgid "Great, please install cURL and enable it in your php.ini file. In addition, search for the 'disable_functions' directive in your php.ini file and remove any disabled methods starting with 'curl_'. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the %s and reactivate it back again."
141
- msgstr ""
142
-
143
- #: includes/class-freemius.php:4386
144
- msgid "Yes - do your thing"
145
- msgstr ""
146
-
147
- #: includes/class-freemius.php:4391
148
- msgid "No - just deactivate"
149
- msgstr ""
150
-
151
- #: includes/class-freemius.php:4436, includes/class-freemius.php:4930, includes/class-freemius.php:6191, includes/class-freemius.php:13368, includes/class-freemius.php:14110, includes/class-freemius.php:17542, includes/class-freemius.php:17647, includes/class-freemius.php:17822, includes/class-freemius.php:20056, includes/class-freemius.php:20414, includes/class-freemius.php:20424, includes/class-freemius.php:21109, includes/class-freemius.php:22015, includes/class-freemius.php:22148, includes/class-freemius.php:22304, templates/add-ons.php:57
152
- msgctxt "exclamation"
153
- msgid "Oops"
154
- msgstr ""
155
-
156
- #: includes/class-freemius.php:4505
157
- msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
158
- msgstr ""
159
-
160
- #: includes/class-freemius.php:4927
161
- msgctxt "addonX cannot run without pluginY"
162
- msgid "%s cannot run without %s."
163
- msgstr ""
164
-
165
- #: includes/class-freemius.php:4928
166
- msgctxt "addonX cannot run..."
167
- msgid "%s cannot run without the plugin."
168
- msgstr ""
169
-
170
- #: includes/class-freemius.php:5127, includes/class-freemius.php:5152, includes/class-freemius.php:21180
171
- msgid "Unexpected API error. Please contact the %s's author with the following error."
172
- msgstr ""
173
-
174
- #: includes/class-freemius.php:5857
175
- msgid "Premium %s version was successfully activated."
176
- msgstr ""
177
-
178
- #: includes/class-freemius.php:5869, includes/class-freemius.php:7774
179
- msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
180
- msgid "W00t"
181
- msgstr ""
182
-
183
- #: includes/class-freemius.php:5884
184
- msgid "You have a %s license."
185
- msgstr ""
186
-
187
- #: includes/class-freemius.php:5888, includes/class-freemius.php:16947, includes/class-freemius.php:16958, includes/class-freemius.php:20325, includes/class-freemius.php:20689, includes/class-freemius.php:20758, includes/class-freemius.php:20930
188
- msgctxt "interjection expressing joy or exuberance"
189
- msgid "Yee-haw"
190
- msgstr ""
191
-
192
- #: includes/class-freemius.php:6174
193
- msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
194
- msgstr ""
195
-
196
- #: includes/class-freemius.php:6178
197
- msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
198
- msgstr ""
199
-
200
- #: includes/class-freemius.php:6187, templates/add-ons.php:186, templates/account/partials/addon.php:381
201
- msgid "More information about %s"
202
- msgstr ""
203
-
204
- #: includes/class-freemius.php:6188
205
- msgid "Purchase License"
206
- msgstr ""
207
-
208
- #: includes/class-freemius.php:7125, templates/connect.php:171
209
- msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
210
- msgstr ""
211
-
212
- #: includes/class-freemius.php:7129
213
- msgid "start the trial"
214
- msgstr ""
215
-
216
- #: includes/class-freemius.php:7130, templates/connect.php:175
217
- msgid "complete the install"
218
- msgstr ""
219
-
220
- #: includes/class-freemius.php:7249
221
- msgid "You are just one step away - %s"
222
- msgstr ""
223
-
224
- #: includes/class-freemius.php:7252
225
- msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
226
- msgid "Complete \"%s\" Activation Now"
227
- msgstr ""
228
-
229
- #: includes/class-freemius.php:7334
230
- msgid "We made a few tweaks to the %s, %s"
231
- msgstr ""
232
-
233
- #: includes/class-freemius.php:7338
234
- msgid "Opt in to make \"%s\" better!"
235
- msgstr ""
236
-
237
- #: includes/class-freemius.php:7773
238
- msgid "The upgrade of %s was successfully completed."
239
- msgstr ""
240
-
241
- #: includes/class-freemius.php:10255, includes/class-fs-plugin-updater.php:1087, includes/class-fs-plugin-updater.php:1282, includes/class-fs-plugin-updater.php:1289, templates/auto-installation.php:32
242
- msgid "Add-On"
243
- msgstr ""
244
-
245
- #: includes/class-freemius.php:10257, templates/account.php:394, templates/account.php:402, templates/debug.php:358, templates/debug.php:549
246
- msgid "Plugin"
247
- msgstr ""
248
-
249
- #: includes/class-freemius.php:10258, templates/account.php:395, templates/account.php:403, templates/debug.php:358, templates/debug.php:549, templates/forms/deactivation/form.php:71
250
- msgid "Theme"
251
- msgstr ""
252
-
253
- #: includes/class-freemius.php:13188
254
  msgid "An unknown error has occurred while trying to toggle the license's white-label mode."
255
  msgstr ""
256
 
257
- #: includes/class-freemius.php:13202
258
- msgid "Your %s license was flagged as white-labeled to hide sensitive information from the WP Admin (e.g. your email, license key, prices, billing address & invoices). If you ever wish to revert it back, you can easily do it through your %s. If this was a mistake you can also %s."
259
- msgstr ""
260
-
261
- #: includes/class-freemius.php:13207
262
- msgid "User Dashboard"
263
- msgstr ""
264
-
265
- #: includes/class-freemius.php:13208
266
- msgid "revert it now"
267
- msgstr ""
268
-
269
- #: includes/class-freemius.php:13266
270
  msgid "An unknown error has occurred while trying to set the user's beta mode."
271
  msgstr ""
272
 
273
- #: includes/class-freemius.php:13339
274
  msgid "Invalid new user ID or email address."
275
  msgstr ""
276
 
277
- #: includes/class-freemius.php:13369, includes/class-freemius.php:22259
278
- msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
279
- msgstr ""
280
-
281
- #: includes/class-freemius.php:13370, includes/class-freemius.php:22260
282
- msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
283
- msgstr ""
284
-
285
- #: includes/class-freemius.php:13377, includes/class-freemius.php:22267
286
- msgid "Change Ownership"
287
- msgstr ""
288
-
289
- #: includes/class-freemius.php:13977
290
- msgid "Invalid site details collection."
291
- msgstr ""
292
-
293
- #: includes/class-freemius.php:14097
294
- msgid "We couldn't find your email address in the system, are you sure it's the right address?"
295
- msgstr ""
296
-
297
- #: includes/class-freemius.php:14099
298
- msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
299
- msgstr ""
300
-
301
- #: includes/class-freemius.php:14373
302
- msgid "Account is pending activation."
303
- msgstr ""
304
-
305
- #: includes/class-freemius.php:14485, templates/forms/premium-versions-upgrade-handler.php:47
306
- msgid "Buy a license now"
307
- msgstr ""
308
-
309
- #: includes/class-freemius.php:14497, templates/forms/premium-versions-upgrade-handler.php:46
310
- msgid "Renew your license now"
311
- msgstr ""
312
-
313
- #: includes/class-freemius.php:14501
314
- msgid "%s to access version %s security & feature updates, and support."
315
- msgstr ""
316
-
317
- #: includes/class-freemius.php:16929
318
- msgid "%s activation was successfully completed."
319
- msgstr ""
320
-
321
- #: includes/class-freemius.php:16943
322
- msgid "Your account was successfully activated with the %s plan."
323
- msgstr ""
324
-
325
- #: includes/class-freemius.php:16954, includes/class-freemius.php:20754
326
- msgid "Your trial has been successfully started."
327
- msgstr ""
328
-
329
- #: includes/class-freemius.php:17540, includes/class-freemius.php:17645, includes/class-freemius.php:17820
330
- msgid "Couldn't activate %s."
331
- msgstr ""
332
-
333
- #: includes/class-freemius.php:17541, includes/class-freemius.php:17646, includes/class-freemius.php:17821
334
- msgid "Please contact us with the following message:"
335
- msgstr ""
336
-
337
- #: includes/class-freemius.php:17642, templates/forms/data-debug-mode.php:162
338
- msgid "An unknown error has occurred."
339
- msgstr ""
340
-
341
- #: includes/class-freemius.php:18178, includes/class-freemius.php:23340
342
- msgid "Upgrade"
343
- msgstr ""
344
-
345
- #: includes/class-freemius.php:18184
346
- msgid "Start Trial"
347
- msgstr ""
348
-
349
- #: includes/class-freemius.php:18186
350
- msgid "Pricing"
351
- msgstr ""
352
-
353
- #: includes/class-freemius.php:18266, includes/class-freemius.php:18268
354
- msgid "Affiliation"
355
- msgstr ""
356
-
357
- #: includes/class-freemius.php:18296, includes/class-freemius.php:18298, templates/account.php:242, templates/debug.php:324
358
- msgid "Account"
359
- msgstr ""
360
-
361
- #: includes/class-freemius.php:18312, includes/class-freemius.php:18314, includes/customizer/class-fs-customizer-support-section.php:60
362
- msgid "Contact Us"
363
- msgstr ""
364
-
365
- #: includes/class-freemius.php:18325, includes/class-freemius.php:18327, includes/class-freemius.php:23354, templates/account.php:121, templates/account/partials/addon.php:44
366
- msgid "Add-Ons"
367
- msgstr ""
368
-
369
- #: includes/class-freemius.php:18361
370
- msgctxt "ASCII arrow left icon"
371
- msgid "&#x2190;"
372
- msgstr ""
373
-
374
- #: includes/class-freemius.php:18361
375
- msgctxt "ASCII arrow right icon"
376
- msgid "&#x27a4;"
377
- msgstr ""
378
-
379
- #: includes/class-freemius.php:18363, templates/pricing.php:109
380
- msgctxt "noun"
381
- msgid "Pricing"
382
- msgstr ""
383
-
384
- #: includes/class-freemius.php:18576, includes/customizer/class-fs-customizer-support-section.php:67
385
- msgid "Support Forum"
386
- msgstr ""
387
-
388
- #: includes/class-freemius.php:19550
389
- msgid "Your email has been successfully verified - you are AWESOME!"
390
- msgstr ""
391
-
392
- #: includes/class-freemius.php:19551
393
- msgctxt "a positive response"
394
- msgid "Right on"
395
- msgstr ""
396
-
397
- #: includes/class-freemius.php:20057
398
- msgid "seems like the key you entered doesn't match our records."
399
- msgstr ""
400
-
401
- #: includes/class-freemius.php:20081
402
- msgid "Debug mode was successfully enabled and will be automatically disabled in 60 min. You can also disable it earlier by clicking the \"Stop Debug\" link."
403
- msgstr ""
404
-
405
- #: includes/class-freemius.php:20316
406
- msgid "Your %s Add-on plan was successfully upgraded."
407
- msgstr ""
408
-
409
- #: includes/class-freemius.php:20318
410
- msgid "%s Add-on was successfully purchased."
411
- msgstr ""
412
-
413
- #: includes/class-freemius.php:20321
414
- msgid "Download the latest version"
415
- msgstr ""
416
-
417
- #: includes/class-freemius.php:20407
418
- msgid "Your server is blocking the access to Freemius' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s"
419
- msgstr ""
420
-
421
- #: includes/class-freemius.php:20413, includes/class-freemius.php:20423, includes/class-freemius.php:20889, includes/class-freemius.php:20978
422
- msgid "Error received from the server:"
423
- msgstr ""
424
-
425
- #: includes/class-freemius.php:20423
426
- msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
427
- msgstr ""
428
-
429
- #: includes/class-freemius.php:20651, includes/class-freemius.php:20894, includes/class-freemius.php:20949, includes/class-freemius.php:21056
430
- msgctxt "something somebody says when they are thinking about what you have just said."
431
- msgid "Hmm"
432
- msgstr ""
433
-
434
- #: includes/class-freemius.php:20664
435
- msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
436
- msgstr ""
437
-
438
- #: includes/class-freemius.php:20665, templates/account.php:123, templates/add-ons.php:250, templates/account/partials/addon.php:46
439
- msgctxt "trial period"
440
- msgid "Trial"
441
- msgstr ""
442
-
443
- #: includes/class-freemius.php:20670
444
- msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
445
- msgstr ""
446
-
447
- #: includes/class-freemius.php:20674, includes/class-freemius.php:20733
448
- msgid "Please contact us here"
449
- msgstr ""
450
-
451
- #: includes/class-freemius.php:20685
452
- msgid "Your plan was successfully activated."
453
- msgstr ""
454
-
455
- #: includes/class-freemius.php:20686
456
- msgid "Your plan was successfully upgraded."
457
- msgstr ""
458
-
459
- #: includes/class-freemius.php:20703
460
- msgid "Your plan was successfully changed to %s."
461
- msgstr ""
462
-
463
- #: includes/class-freemius.php:20719
464
- msgid "Your license has expired. You can still continue using the free %s forever."
465
- msgstr ""
466
-
467
- #: includes/class-freemius.php:20721
468
- msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
469
- msgstr ""
470
-
471
- #: includes/class-freemius.php:20729
472
- msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
473
- msgstr ""
474
-
475
- #: includes/class-freemius.php:20742
476
- msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
477
- msgstr ""
478
-
479
- #: includes/class-freemius.php:20768
480
- msgid "Your free trial has expired. You can still continue using all our free features."
481
- msgstr ""
482
-
483
- #: includes/class-freemius.php:20770
484
- msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
485
- msgstr ""
486
-
487
- #: includes/class-freemius.php:20885
488
- msgid "It looks like the license could not be activated."
489
- msgstr ""
490
-
491
- #: includes/class-freemius.php:20927
492
- msgid "Your license was successfully activated."
493
- msgstr ""
494
-
495
- #: includes/class-freemius.php:20953
496
- msgid "It looks like your site currently doesn't have an active license."
497
- msgstr ""
498
-
499
- #: includes/class-freemius.php:20977
500
- msgid "It looks like the license deactivation failed."
501
- msgstr ""
502
-
503
- #: includes/class-freemius.php:21006
504
- msgid "Your %s license was successfully deactivated."
505
- msgstr ""
506
-
507
- #: includes/class-freemius.php:21007
508
- msgid "Your license was successfully deactivated, you are back to the %s plan."
509
- msgstr ""
510
-
511
- #: includes/class-freemius.php:21010
512
- msgid "O.K"
513
- msgstr ""
514
-
515
- #: includes/class-freemius.php:21063
516
- msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
517
- msgstr ""
518
-
519
- #: includes/class-freemius.php:21072
520
- msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
521
- msgstr ""
522
-
523
- #: includes/class-freemius.php:21114
524
- msgid "You are already running the %s in a trial mode."
525
- msgstr ""
526
-
527
- #: includes/class-freemius.php:21125
528
- msgid "You already utilized a trial before."
529
- msgstr ""
530
-
531
- #: includes/class-freemius.php:21139
532
- msgid "Plan %s do not exist, therefore, can't start a trial."
533
- msgstr ""
534
-
535
- #: includes/class-freemius.php:21150
536
- msgid "Plan %s does not support a trial period."
537
- msgstr ""
538
-
539
- #: includes/class-freemius.php:21161
540
- msgid "None of the %s's plans supports a trial period."
541
- msgstr ""
542
-
543
- #: includes/class-freemius.php:21211
544
- msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
545
- msgstr ""
546
-
547
- #: includes/class-freemius.php:21247
548
- msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
549
- msgstr ""
550
-
551
- #: includes/class-freemius.php:21266
552
- msgid "Your %s free trial was successfully cancelled."
553
- msgstr ""
554
-
555
- #: includes/class-freemius.php:21582
556
- msgid "Version %s was released."
557
- msgstr ""
558
-
559
- #: includes/class-freemius.php:21582
560
- msgid "Please download %s."
561
- msgstr ""
562
-
563
- #: includes/class-freemius.php:21589
564
- msgid "the latest %s version here"
565
- msgstr ""
566
-
567
- #: includes/class-freemius.php:21594
568
- msgid "New"
569
- msgstr ""
570
-
571
- #: includes/class-freemius.php:21599
572
- msgid "Seems like you got the latest release."
573
- msgstr ""
574
-
575
- #: includes/class-freemius.php:21600
576
- msgid "You are all good!"
577
- msgstr ""
578
-
579
- #: includes/class-freemius.php:21903
580
- msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
581
- msgstr ""
582
-
583
- #: includes/class-freemius.php:22043
584
- msgid "Site successfully opted in."
585
- msgstr ""
586
-
587
- #: includes/class-freemius.php:22044, includes/class-freemius.php:23050
588
- msgid "Awesome"
589
- msgstr ""
590
-
591
- #: includes/class-freemius.php:22060, templates/forms/optout.php:41
592
- msgid "We appreciate your help in making the %s better by letting us track some usage data."
593
- msgstr ""
594
-
595
- #: includes/class-freemius.php:22061
596
- msgid "Thank you!"
597
- msgstr ""
598
-
599
- #: includes/class-freemius.php:22068
600
- msgid "We will no longer be sending any usage data of %s on %s to %s."
601
- msgstr ""
602
-
603
- #: includes/class-freemius.php:22226
604
- msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
605
- msgstr ""
606
-
607
- #: includes/class-freemius.php:22232
608
- msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
609
- msgstr ""
610
-
611
- #: includes/class-freemius.php:22237
612
- msgid "%s is the new owner of the account."
613
- msgstr ""
614
-
615
- #: includes/class-freemius.php:22239
616
- msgctxt "as congratulations"
617
- msgid "Congrats"
618
- msgstr ""
619
-
620
- #: includes/class-freemius.php:22275
621
- msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
622
- msgstr ""
623
-
624
- #: includes/class-freemius.php:22287
625
- msgid "Please provide your full name."
626
- msgstr ""
627
-
628
- #: includes/class-freemius.php:22292
629
- msgid "Your name was successfully updated."
630
- msgstr ""
631
-
632
- #: includes/class-freemius.php:22353
633
- msgid "You have successfully updated your %s."
634
- msgstr ""
635
-
636
- #: includes/class-freemius.php:22412
637
- msgid "Is this your client's site? %s if you wish to hide sensitive info like your email, license key, prices, billing address & invoices from the WP Admin."
638
- msgstr ""
639
-
640
- #: includes/class-freemius.php:22415
641
- msgid "Click here"
642
- msgstr ""
643
-
644
- #: includes/class-freemius.php:22513
645
- msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
646
- msgstr ""
647
-
648
- #: includes/class-freemius.php:22514
649
- msgctxt "advance notice of something that will need attention."
650
- msgid "Heads up"
651
- msgstr ""
652
-
653
- #: includes/class-freemius.php:23090
654
- msgctxt "exclamation"
655
- msgid "Hey"
656
- msgstr ""
657
-
658
- #: includes/class-freemius.php:23090
659
- msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
660
- msgstr ""
661
-
662
- #: includes/class-freemius.php:23098
663
- msgid "No commitment for %s days - cancel anytime!"
664
- msgstr ""
665
-
666
- #: includes/class-freemius.php:23099
667
- msgid "No credit card required"
668
- msgstr ""
669
-
670
- #: includes/class-freemius.php:23106, templates/forms/trial-start.php:53
671
- msgctxt "call to action"
672
- msgid "Start free trial"
673
- msgstr ""
674
-
675
- #: includes/class-freemius.php:23183
676
- msgid "Hey there, did you know that %s has an affiliate program? If you like the %s you can become our ambassador and earn some cash!"
677
- msgstr ""
678
-
679
- #: includes/class-freemius.php:23192
680
- msgid "Learn more"
681
- msgstr ""
682
-
683
- #: includes/class-freemius.php:23378, templates/account.php:558, templates/account.php:708, templates/connect.php:179, templates/connect.php:461, templates/forms/license-activation.php:27, templates/account/partials/addon.php:321
684
- msgid "Activate License"
685
- msgstr ""
686
-
687
- #: includes/class-freemius.php:23379, templates/account.php:652, templates/account.php:707, templates/account/partials/addon.php:322, templates/account/partials/site.php:271
688
- msgid "Change License"
689
- msgstr ""
690
-
691
- #: includes/class-freemius.php:23500, templates/account/partials/site.php:169
692
- msgid "Opt Out"
693
- msgstr ""
694
-
695
- #: includes/class-freemius.php:23502, includes/class-freemius.php:23508, templates/account/partials/site.php:49, templates/account/partials/site.php:169
696
- msgid "Opt In"
697
- msgstr ""
698
-
699
- #: includes/class-freemius.php:23738
700
- msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
701
- msgstr ""
702
-
703
- #: includes/class-freemius.php:23746
704
- msgid "Activate %s features"
705
- msgstr ""
706
-
707
- #: includes/class-freemius.php:23759
708
- msgid "Please follow these steps to complete the upgrade"
709
- msgstr ""
710
-
711
- #: includes/class-freemius.php:23763
712
- msgid "Download the latest %s version"
713
- msgstr ""
714
-
715
- #: includes/class-freemius.php:23767
716
- msgid "Upload and activate the downloaded version"
717
- msgstr ""
718
-
719
- #: includes/class-freemius.php:23769
720
- msgid "How to upload and activate?"
721
- msgstr ""
722
-
723
- #: includes/class-freemius.php:23903
724
- msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
725
- msgstr ""
726
-
727
- #: includes/class-freemius.php:24072
728
- msgid "Auto installation only works for opted-in users."
729
- msgstr ""
730
-
731
- #: includes/class-freemius.php:24082, includes/class-freemius.php:24115, includes/class-fs-plugin-updater.php:1261, includes/class-fs-plugin-updater.php:1275
732
- msgid "Invalid module ID."
733
- msgstr ""
734
-
735
- #: includes/class-freemius.php:24091, includes/class-fs-plugin-updater.php:1297
736
- msgid "Premium version already active."
737
- msgstr ""
738
-
739
- #: includes/class-freemius.php:24098
740
- msgid "You do not have a valid license to access the premium version."
741
- msgstr ""
742
-
743
- #: includes/class-freemius.php:24105
744
- msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
745
- msgstr ""
746
-
747
- #: includes/class-freemius.php:24123, includes/class-fs-plugin-updater.php:1296
748
- msgid "Premium add-on version already installed."
749
- msgstr ""
750
-
751
- #: includes/class-freemius.php:24473
752
- msgid "View paid features"
753
- msgstr ""
754
-
755
- #: includes/class-freemius.php:24795
756
- msgid "Thank you so much for using %s and its add-ons!"
757
- msgstr ""
758
-
759
- #: includes/class-freemius.php:24796
760
- msgid "Thank you so much for using %s!"
761
- msgstr ""
762
-
763
- #: includes/class-freemius.php:24802
764
- msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
765
- msgstr ""
766
-
767
- #: includes/class-freemius.php:24806
768
- msgid "Thank you so much for using our products!"
769
- msgstr ""
770
-
771
- #: includes/class-freemius.php:24807
772
- msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
773
- msgstr ""
774
-
775
- #: includes/class-freemius.php:24826
776
- msgid "%s and its add-ons"
777
- msgstr ""
778
-
779
- #: includes/class-freemius.php:24835
780
- msgid "Products"
781
- msgstr ""
782
-
783
- #: includes/class-freemius.php:24842, templates/connect.php:275
784
- msgid "Yes"
785
- msgstr ""
786
-
787
- #: includes/class-freemius.php:24843, templates/connect.php:276
788
- msgid "send me security & feature updates, educational content and offers."
789
- msgstr ""
790
-
791
- #: includes/class-freemius.php:24844, templates/connect.php:281
792
- msgid "No"
793
- msgstr ""
794
-
795
- #: includes/class-freemius.php:24846, templates/connect.php:283
796
- msgid "do %sNOT%s send me security & feature updates, educational content and offers."
797
- msgstr ""
798
-
799
- #: includes/class-freemius.php:24856
800
- msgid "Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard :-)"
801
- msgstr ""
802
-
803
- #: includes/class-freemius.php:24858, templates/connect.php:290
804
- msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
805
- msgstr ""
806
-
807
- #: includes/class-freemius.php:25140
808
- msgid "License key is empty."
809
  msgstr ""
810
 
811
  #: includes/class-fs-plugin-updater.php:206, templates/forms/premium-versions-upgrade-handler.php:57
@@ -816,31 +53,23 @@ msgstr ""
816
  msgid "Buy license"
817
  msgstr ""
818
 
819
- #: includes/class-fs-plugin-updater.php:327, includes/class-fs-plugin-updater.php:360
820
  msgid "There is a %s of %s available."
821
  msgstr ""
822
 
823
- #: includes/class-fs-plugin-updater.php:329, includes/class-fs-plugin-updater.php:365
824
  msgid "new Beta version"
825
  msgstr ""
826
 
827
- #: includes/class-fs-plugin-updater.php:330, includes/class-fs-plugin-updater.php:366
828
  msgid "new version"
829
  msgstr ""
830
 
831
- #: includes/class-fs-plugin-updater.php:389
832
  msgid "Important Upgrade Notice:"
833
  msgstr ""
834
 
835
- #: includes/class-fs-plugin-updater.php:1326
836
- msgid "Installing plugin: %s"
837
- msgstr ""
838
-
839
- #: includes/class-fs-plugin-updater.php:1367
840
- msgid "Unable to connect to the filesystem. Please confirm your credentials."
841
- msgstr ""
842
-
843
- #: includes/class-fs-plugin-updater.php:1549
844
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
845
  msgstr ""
846
 
@@ -848,29 +77,30 @@ msgstr ""
848
  msgid "Purchase More"
849
  msgstr ""
850
 
851
- #: includes/fs-plugin-info-dialog.php:542, templates/account/partials/addon.php:385
852
  msgctxt "verb"
853
  msgid "Purchase"
854
  msgstr ""
855
 
 
856
  #: includes/fs-plugin-info-dialog.php:546
857
  msgid "Start my free %s"
858
  msgstr ""
859
 
860
- #: includes/fs-plugin-info-dialog.php:744
861
- msgid "Install Free Version Update Now"
862
  msgstr ""
863
 
864
- #: includes/fs-plugin-info-dialog.php:745, templates/account.php:641
865
- msgid "Install Update Now"
866
  msgstr ""
867
 
868
- #: includes/fs-plugin-info-dialog.php:754
869
- msgid "Install Free Version Now"
870
  msgstr ""
871
 
872
- #: includes/fs-plugin-info-dialog.php:755, templates/add-ons.php:323, templates/auto-installation.php:111, templates/account/partials/addon.php:365, templates/account/partials/addon.php:418
873
- msgid "Install Now"
874
  msgstr ""
875
 
876
  #: includes/fs-plugin-info-dialog.php:771
@@ -878,20 +108,20 @@ msgctxt "as download latest version"
878
  msgid "Download Latest Free Version"
879
  msgstr ""
880
 
881
- #: includes/fs-plugin-info-dialog.php:772, templates/account.php:101, templates/add-ons.php:37, templates/account/partials/addon.php:25
882
  msgctxt "as download latest version"
883
  msgid "Download Latest"
884
  msgstr ""
885
 
886
- #: includes/fs-plugin-info-dialog.php:787, templates/add-ons.php:329, templates/account/partials/addon.php:356, templates/account/partials/addon.php:412
887
  msgid "Activate this add-on"
888
  msgstr ""
889
 
890
- #: includes/fs-plugin-info-dialog.php:789, templates/connect.php:458
891
  msgid "Activate Free Version"
892
  msgstr ""
893
 
894
- #: includes/fs-plugin-info-dialog.php:790, templates/account.php:125, templates/add-ons.php:330, templates/account/partials/addon.php:48
895
  msgid "Activate"
896
  msgstr ""
897
 
@@ -1004,6 +234,7 @@ msgctxt "noun"
1004
  msgid "Price"
1005
  msgstr ""
1006
 
 
1007
  #: includes/fs-plugin-info-dialog.php:1290
1008
  msgid "Save %s"
1009
  msgstr ""
@@ -1020,7 +251,7 @@ msgstr ""
1020
  msgid "Details"
1021
  msgstr ""
1022
 
1023
- #: includes/fs-plugin-info-dialog.php:1318, templates/account.php:112, templates/debug.php:201, templates/debug.php:238, templates/debug.php:455, templates/account/partials/addon.php:36
1024
  msgctxt "product version"
1025
  msgid "Version"
1026
  msgstr ""
@@ -1034,7 +265,8 @@ msgstr ""
1034
  msgid "Last Updated"
1035
  msgstr ""
1036
 
1037
- #: includes/fs-plugin-info-dialog.php:1337, templates/account.php:527
 
1038
  msgctxt "x-ago"
1039
  msgid "%s ago"
1040
  msgstr ""
@@ -1055,10 +287,12 @@ msgstr ""
1055
  msgid "Downloaded"
1056
  msgstr ""
1057
 
 
1058
  #: includes/fs-plugin-info-dialog.php:1366
1059
  msgid "%s time"
1060
  msgstr ""
1061
 
 
1062
  #: includes/fs-plugin-info-dialog.php:1368
1063
  msgid "%s times"
1064
  msgstr ""
@@ -1083,22 +317,27 @@ msgstr ""
1083
  msgid "based on %s"
1084
  msgstr ""
1085
 
 
1086
  #: includes/fs-plugin-info-dialog.php:1415
1087
  msgid "%s rating"
1088
  msgstr ""
1089
 
 
1090
  #: includes/fs-plugin-info-dialog.php:1417
1091
  msgid "%s ratings"
1092
  msgstr ""
1093
 
 
1094
  #: includes/fs-plugin-info-dialog.php:1432
1095
  msgid "%s star"
1096
  msgstr ""
1097
 
 
1098
  #: includes/fs-plugin-info-dialog.php:1434
1099
  msgid "%s stars"
1100
  msgstr ""
1101
 
 
1102
  #: includes/fs-plugin-info-dialog.php:1446
1103
  msgid "Click to see reviews that provided a rating of %s"
1104
  msgstr ""
@@ -1107,18 +346,18 @@ msgstr ""
1107
  msgid "Contributors"
1108
  msgstr ""
1109
 
1110
- #: includes/fs-plugin-info-dialog.php:1489, includes/fs-plugin-info-dialog.php:1491
1111
  msgid "Warning"
1112
  msgstr ""
1113
 
1114
- #: includes/fs-plugin-info-dialog.php:1489
1115
- msgid "This plugin has not been tested with your current version of WordPress."
1116
- msgstr ""
1117
-
1118
  #: includes/fs-plugin-info-dialog.php:1491
1119
  msgid "This plugin has not been marked as compatible with your version of WordPress."
1120
  msgstr ""
1121
 
 
 
 
 
1122
  #: includes/fs-plugin-info-dialog.php:1510
1123
  msgid "Paid add-on must be deployed to Freemius."
1124
  msgstr ""
@@ -1127,14 +366,6 @@ msgstr ""
1127
  msgid "Add-on must be deployed to WordPress.org or Freemius."
1128
  msgstr ""
1129
 
1130
- #: includes/fs-plugin-info-dialog.php:1532
1131
- msgid "Newer Version (%s) Installed"
1132
- msgstr ""
1133
-
1134
- #: includes/fs-plugin-info-dialog.php:1533
1135
- msgid "Newer Free Version (%s) Installed"
1136
- msgstr ""
1137
-
1138
  #: includes/fs-plugin-info-dialog.php:1540
1139
  msgid "Latest Version Installed"
1140
  msgstr ""
@@ -1143,293 +374,330 @@ msgstr ""
1143
  msgid "Latest Free Version Installed"
1144
  msgstr ""
1145
 
1146
- #: templates/account.php:102, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:26, templates/account/partials/site.php:311
 
 
 
 
 
 
 
 
1147
  msgid "Downgrading your plan"
1148
  msgstr ""
1149
 
1150
- #: templates/account.php:103, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:27, templates/account/partials/site.php:312
1151
  msgid "Cancelling the subscription"
1152
  msgstr ""
1153
 
1154
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1155
- #: templates/account.php:105, templates/forms/subscription-cancellation.php:99, templates/account/partials/site.php:314
1156
  msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
1157
  msgstr ""
1158
 
1159
- #: templates/account.php:106, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:30, templates/account/partials/site.php:315
1160
  msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
1161
  msgstr ""
1162
 
1163
- #: templates/account.php:107, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:31
1164
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
1165
  msgstr ""
1166
 
1167
- #: templates/account.php:108, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:32, templates/account/partials/site.php:316
1168
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
1169
  msgstr ""
1170
 
1171
- #: templates/account.php:109, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:33, templates/account/partials/site.php:317
1172
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
1173
  msgstr ""
1174
 
1175
  #. translators: %s: Plan title (e.g. "Professional")
1176
- #: templates/account.php:111, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:35
1177
  msgid "Activate %s Plan"
1178
  msgstr ""
1179
 
1180
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
1181
- #: templates/account.php:114, templates/account/partials/addon.php:38, templates/account/partials/site.php:291
1182
  msgid "Auto renews in %s"
1183
  msgstr ""
1184
 
1185
  #. translators: %s: Time period (e.g. Expires in "2 months")
1186
- #: templates/account.php:116, templates/account/partials/addon.php:40, templates/account/partials/site.php:293
1187
  msgid "Expires in %s"
1188
  msgstr ""
1189
 
1190
- #: templates/account.php:117
1191
  msgctxt "as synchronize license"
1192
  msgid "Sync License"
1193
  msgstr ""
1194
 
1195
- #: templates/account.php:118, templates/account/partials/addon.php:41
1196
  msgid "Cancel Trial"
1197
  msgstr ""
1198
 
1199
- #: templates/account.php:119, templates/account/partials/addon.php:42
1200
  msgid "Change Plan"
1201
  msgstr ""
1202
 
1203
- #: templates/account.php:120, templates/account/partials/addon.php:43
1204
  msgctxt "verb"
1205
  msgid "Upgrade"
1206
  msgstr ""
1207
 
1208
- #: templates/account.php:122, templates/account/partials/addon.php:45, templates/account/partials/site.php:318
 
 
 
 
1209
  msgctxt "verb"
1210
  msgid "Downgrade"
1211
  msgstr ""
1212
 
1213
- #: templates/account.php:124, templates/add-ons.php:246, templates/plugin-info/features.php:72, templates/account/partials/addon.php:47, templates/account/partials/site.php:33
 
 
 
 
 
1214
  msgid "Free"
1215
  msgstr ""
1216
 
1217
- #: templates/account.php:126, templates/debug.php:371, includes/customizer/class-fs-customizer-upsell-control.php:110, templates/account/partials/addon.php:49
1218
  msgctxt "as product pricing plan"
1219
  msgid "Plan"
1220
  msgstr ""
1221
 
1222
- #: templates/account.php:127
1223
  msgid "Bundle Plan"
1224
  msgstr ""
1225
 
1226
- #: templates/account.php:250
 
 
 
 
1227
  msgid "Free Trial"
1228
  msgstr ""
1229
 
1230
- #: templates/account.php:261
1231
  msgid "Account Details"
1232
  msgstr ""
1233
 
1234
- #: templates/account.php:268, templates/forms/data-debug-mode.php:33
1235
- msgid "Start Debug"
1236
  msgstr ""
1237
 
1238
- #: templates/account.php:270
1239
- msgid "Stop Debug"
1240
  msgstr ""
1241
 
1242
- #: templates/account.php:277
1243
  msgid "Billing & Invoices"
1244
  msgstr ""
1245
 
1246
- #: templates/account.php:288
1247
- msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
1248
  msgstr ""
1249
 
1250
- #: templates/account.php:290
1251
- msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
1252
  msgstr ""
1253
 
1254
- #: templates/account.php:293
1255
  msgid "Delete Account"
1256
  msgstr ""
1257
 
1258
- #: templates/account.php:305, templates/account/partials/addon.php:231, templates/account/partials/deactivate-license-button.php:35
1259
  msgid "Deactivate License"
1260
  msgstr ""
1261
 
1262
- #: templates/account.php:328, templates/forms/subscription-cancellation.php:125
1263
  msgid "Are you sure you want to proceed?"
1264
  msgstr ""
1265
 
1266
- #: templates/account.php:328, templates/account/partials/addon.php:255
1267
  msgid "Cancel Subscription"
1268
  msgstr ""
1269
 
1270
- #: templates/account.php:357, templates/account/partials/addon.php:340
1271
  msgctxt "as synchronize"
1272
  msgid "Sync"
1273
  msgstr ""
1274
 
1275
- #: templates/account.php:372, templates/debug.php:505
1276
  msgid "Name"
1277
  msgstr ""
1278
 
1279
- #: templates/account.php:378, templates/debug.php:506
1280
  msgid "Email"
1281
  msgstr ""
1282
 
1283
- #: templates/account.php:385, templates/debug.php:369, templates/debug.php:555
1284
  msgid "User ID"
1285
  msgstr ""
1286
 
1287
- #: templates/account.php:403, templates/account.php:721, templates/account.php:754, templates/debug.php:236, templates/debug.php:363, templates/debug.php:452, templates/debug.php:504, templates/debug.php:553, templates/debug.php:632, templates/account/payments.php:35, templates/debug/logger.php:21
 
 
 
 
 
 
 
 
1288
  msgid "ID"
1289
  msgstr ""
1290
 
1291
- #: templates/account.php:410
1292
  msgid "Site ID"
1293
  msgstr ""
1294
 
1295
- #: templates/account.php:413
1296
  msgid "No ID"
1297
  msgstr ""
1298
 
1299
- #: templates/account.php:418, templates/debug.php:243, templates/debug.php:372, templates/debug.php:456, templates/debug.php:508, templates/account/partials/site.php:227
1300
  msgid "Public Key"
1301
  msgstr ""
1302
 
1303
- #: templates/account.php:424, templates/debug.php:373, templates/debug.php:457, templates/debug.php:509, templates/account/partials/site.php:239
1304
  msgid "Secret Key"
1305
  msgstr ""
1306
 
1307
- #: templates/account.php:427
1308
  msgctxt "as secret encryption key missing"
1309
  msgid "No Secret"
1310
  msgstr ""
1311
 
1312
- #: templates/account.php:454, templates/account/partials/site.php:120, templates/account/partials/site.php:122
1313
- msgid "Trial"
1314
  msgstr ""
1315
 
1316
- #: templates/account.php:481, templates/debug.php:561, templates/account/partials/site.php:260
1317
- msgid "License Key"
1318
  msgstr ""
1319
 
1320
- #: templates/account.php:512
1321
  msgid "Join the Beta program"
1322
  msgstr ""
1323
 
1324
- #: templates/account.php:518
1325
  msgid "not verified"
1326
  msgstr ""
1327
 
1328
- #: templates/account.php:527, templates/account/partials/addon.php:190
1329
- msgid "Expired"
1330
  msgstr ""
1331
 
1332
- #: templates/account.php:587
1333
  msgid "Premium version"
1334
  msgstr ""
1335
 
1336
- #: templates/account.php:589
1337
- msgid "Free version"
 
 
 
 
1338
  msgstr ""
1339
 
1340
- #: templates/account.php:601
1341
  msgid "Verify Email"
1342
  msgstr ""
1343
 
1344
- #: templates/account.php:615
1345
- msgid "Download %s Version"
1346
  msgstr ""
1347
 
1348
- #: templates/account.php:631
1349
- msgid "Download Paid Version"
1350
  msgstr ""
1351
 
1352
- #: templates/account.php:649, templates/account.php:892, templates/account/partials/site.php:248, templates/account/partials/site.php:270
 
 
 
 
 
1353
  msgctxt "verb"
1354
  msgid "Show"
1355
  msgstr ""
1356
 
1357
- #: templates/account.php:664
1358
- msgid "What is your %s?"
1359
  msgstr ""
1360
 
1361
- #: templates/account.php:672, templates/account/billing.php:21
1362
- msgctxt "verb"
1363
- msgid "Edit"
1364
  msgstr ""
1365
 
1366
- #: templates/account.php:676, templates/forms/user-change.php:27
1367
- msgid "Change User"
1368
  msgstr ""
1369
 
1370
- #: templates/account.php:700
1371
  msgid "Sites"
1372
  msgstr ""
1373
 
1374
- #: templates/account.php:713
1375
  msgid "Search by address"
1376
  msgstr ""
1377
 
1378
- #: templates/account.php:722, templates/debug.php:366
1379
  msgid "Address"
1380
  msgstr ""
1381
 
1382
- #: templates/account.php:723
1383
  msgid "License"
1384
  msgstr ""
1385
 
1386
- #: templates/account.php:724
1387
  msgid "Plan"
1388
  msgstr ""
1389
 
1390
- #: templates/account.php:757
1391
  msgctxt "as software license"
1392
  msgid "License"
1393
  msgstr ""
1394
 
1395
- #: templates/account.php:886
1396
  msgctxt "verb"
1397
  msgid "Hide"
1398
  msgstr ""
1399
 
1400
- #: templates/account.php:908, templates/forms/data-debug-mode.php:31
1401
  msgid "Processing"
1402
  msgstr ""
1403
 
1404
- #: templates/account.php:911
1405
  msgid "Get updates for bleeding edge Beta versions of %s."
1406
  msgstr ""
1407
 
1408
- #: templates/account.php:969
1409
  msgid "Cancelling %s"
1410
  msgstr ""
1411
 
1412
- #: templates/account.php:969, templates/account.php:986, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:133
1413
  msgid "trial"
1414
  msgstr ""
1415
 
1416
- #: templates/account.php:984, templates/forms/deactivation/form.php:150
1417
  msgid "Cancelling %s..."
1418
  msgstr ""
1419
 
1420
- #: templates/account.php:987, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:134
1421
  msgid "subscription"
1422
  msgstr ""
1423
 
1424
- #: templates/account.php:1001
1425
  msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
1426
  msgstr ""
1427
 
1428
- #: templates/account.php:1075
1429
  msgid "Disabling white-label mode"
1430
  msgstr ""
1431
 
1432
- #: templates/account.php:1076
1433
  msgid "Enabling white-label mode"
1434
  msgstr ""
1435
 
@@ -1441,10 +709,19 @@ msgstr ""
1441
  msgid "Add Ons for %s"
1442
  msgstr ""
1443
 
 
 
 
 
 
1444
  #: templates/add-ons.php:58
1445
  msgid "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
1446
  msgstr ""
1447
 
 
 
 
 
1448
  #: templates/add-ons.php:229
1449
  msgctxt "active add-on"
1450
  msgid "Active"
@@ -1455,11 +732,16 @@ msgctxt "installed add-on"
1455
  msgid "Installed"
1456
  msgstr ""
1457
 
1458
- #: templates/admin-notice.php:13, templates/forms/license-activation.php:222, templates/forms/resend-key.php:77
1459
  msgctxt "as close a window"
1460
  msgid "Dismiss"
1461
  msgstr ""
1462
 
 
 
 
 
 
1463
  #: templates/auto-installation.php:45
1464
  msgid "%s sec"
1465
  msgstr ""
@@ -1480,215 +762,147 @@ msgstr ""
1480
  msgid "Cancel Installation"
1481
  msgstr ""
1482
 
1483
- #: templates/checkout.php:180
1484
- msgid "Checkout"
1485
- msgstr ""
1486
-
1487
- #: templates/checkout.php:180
1488
- msgid "PCI compliant"
1489
- msgstr ""
1490
-
1491
  #. translators: %s: name (e.g. Hey John,)
1492
- #: templates/connect.php:112
1493
  msgctxt "greeting"
1494
  msgid "Hey %s,"
1495
  msgstr ""
1496
 
1497
- #: templates/connect.php:162
1498
  msgid "Allow & Continue"
1499
  msgstr ""
1500
 
1501
- #: templates/connect.php:166
1502
- msgid "Re-send activation email"
1503
  msgstr ""
1504
 
1505
- #: templates/connect.php:170
1506
- msgid "Thanks %s!"
 
 
 
 
1507
  msgstr ""
1508
 
1509
- #: templates/connect.php:180, templates/forms/license-activation.php:46
1510
  msgid "Agree & Activate License"
1511
  msgstr ""
1512
 
1513
- #: templates/connect.php:184
1514
  msgid "Welcome to %s! To get started, please enter your license key:"
1515
  msgstr ""
1516
 
1517
- #: templates/connect.php:191
1518
- msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
1519
  msgstr ""
1520
 
1521
- #: templates/connect.php:192
1522
- msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
1523
  msgstr ""
1524
 
1525
- #: templates/connect.php:198
1526
- msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1527
  msgstr ""
1528
 
1529
- #: templates/connect.php:199
1530
- msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
1531
  msgstr ""
1532
 
1533
- #: templates/connect.php:233
1534
  msgid "We're excited to introduce the Freemius network-level integration."
1535
  msgstr ""
1536
 
1537
- #: templates/connect.php:236
 
 
 
 
1538
  msgid "During the update process we detected %d site(s) that are still pending license activation."
1539
  msgstr ""
1540
 
1541
- #: templates/connect.php:238
1542
  msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
1543
  msgstr ""
1544
 
1545
- #: templates/connect.php:240
1546
  msgid "%s's paid features"
1547
  msgstr ""
1548
 
1549
- #: templates/connect.php:245
1550
  msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
1551
  msgstr ""
1552
 
1553
- #: templates/connect.php:247
1554
- msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
1555
- msgstr ""
1556
-
1557
- #: templates/connect.php:256, templates/forms/data-debug-mode.php:35, templates/forms/license-activation.php:49
1558
  msgid "License key"
1559
  msgstr ""
1560
 
1561
- #: templates/connect.php:259, templates/forms/license-activation.php:22
1562
  msgid "Can't find your license key?"
1563
  msgstr ""
1564
 
1565
- #: templates/connect.php:318, templates/connect.php:700, templates/forms/deactivation/retry-skip.php:20
 
 
 
 
1566
  msgctxt "verb"
1567
  msgid "Skip"
1568
  msgstr ""
1569
 
1570
- #: templates/connect.php:321
1571
  msgid "Delegate to Site Admins"
1572
  msgstr ""
1573
 
1574
- #: templates/connect.php:321
1575
  msgid "If you click it, this decision will be delegated to the sites administrators."
1576
  msgstr ""
1577
 
1578
- #: templates/connect.php:346
1579
  msgid "License issues?"
1580
  msgstr ""
1581
 
1582
- #: templates/connect.php:362
1583
- msgid "Your Profile Overview"
1584
- msgstr ""
1585
-
1586
- #: templates/connect.php:363
1587
- msgid "Name and email address"
1588
- msgstr ""
1589
-
1590
- #: templates/connect.php:370
1591
- msgid "So you can manage and control your license remotely from the User Dashboard."
1592
- msgstr ""
1593
-
1594
- #: templates/connect.php:371
1595
- msgid "Your Site Overview"
1596
- msgstr ""
1597
-
1598
- #: templates/connect.php:372
1599
- msgid "Site URL, WP version, PHP info"
1600
- msgstr ""
1601
-
1602
- #: templates/connect.php:379
1603
- msgid "Admin Notices"
1604
- msgstr ""
1605
-
1606
- #: templates/connect.php:380, templates/connect.php:398
1607
- msgid "Updates, announcements, marketing, no spam"
1608
- msgstr ""
1609
-
1610
- #: templates/connect.php:387
1611
- msgid "So you can reuse the license when the %s is no longer active."
1612
- msgstr ""
1613
-
1614
- #: templates/connect.php:388
1615
- msgid "Current %s Status"
1616
- msgstr ""
1617
-
1618
- #: templates/connect.php:389
1619
- msgid "Active, deactivated, or uninstalled"
1620
- msgstr ""
1621
-
1622
- #: templates/connect.php:397
1623
- msgid "Newsletter"
1624
- msgstr ""
1625
-
1626
- #: templates/connect.php:405
1627
- msgid "Plugins & Themes"
1628
- msgstr ""
1629
-
1630
- #: templates/connect.php:405
1631
- msgid "optional"
1632
- msgstr ""
1633
-
1634
- #: templates/connect.php:406
1635
- msgid "To help us troubleshoot any potential issues that may arise from other plugin or theme conflicts."
1636
- msgstr ""
1637
-
1638
- #: templates/connect.php:407
1639
- msgid "Title, slug, version, and is active"
1640
  msgstr ""
1641
 
1642
- #: templates/connect.php:424
1643
  msgid "The %1$s will periodically send %2$s to %3$s for security & feature updates delivery, and license management."
1644
  msgstr ""
1645
 
1646
- #: templates/connect.php:426
1647
  msgid "diagnostic data"
1648
  msgstr ""
1649
 
1650
- #: templates/connect.php:427
1651
- msgid "Freemius is our licensing and software updates engine"
1652
- msgstr ""
1653
-
1654
- #: templates/connect.php:430
1655
- msgid "What permissions are being granted?"
1656
  msgstr ""
1657
 
1658
- #: templates/connect.php:457
1659
  msgid "Don't have a license key?"
1660
  msgstr ""
1661
 
1662
- #: templates/connect.php:460
1663
- msgid "Have a license key?"
1664
- msgstr ""
1665
-
1666
- #: templates/connect.php:468
1667
  msgid "Privacy Policy"
1668
  msgstr ""
1669
 
1670
- #: templates/connect.php:470
1671
  msgid "License Agreement"
1672
  msgstr ""
1673
 
1674
- #: templates/connect.php:470
1675
  msgid "Terms of Service"
1676
  msgstr ""
1677
 
1678
- #: templates/connect.php:866
1679
  msgctxt "as in the process of sending an email"
1680
  msgid "Sending email"
1681
  msgstr ""
1682
 
1683
- #: templates/connect.php:867
1684
  msgctxt "as activating plugin"
1685
  msgid "Activating"
1686
  msgstr ""
1687
 
1688
- #: templates/contact.php:78
1689
- msgid "Contact"
1690
- msgstr ""
1691
-
1692
  #: templates/debug.php:17
1693
  msgctxt "as turned off"
1694
  msgid "Off"
@@ -1708,237 +922,234 @@ msgctxt "as code debugging"
1708
  msgid "Debugging"
1709
  msgstr ""
1710
 
1711
- #: templates/debug.php:52, templates/debug.php:248, templates/debug.php:374, templates/debug.php:510
1712
  msgid "Actions"
1713
  msgstr ""
1714
 
1715
- #: templates/debug.php:62
1716
  msgid "Are you sure you want to delete all Freemius data?"
1717
  msgstr ""
1718
 
1719
- #: templates/debug.php:62
1720
  msgid "Delete All Accounts"
1721
  msgstr ""
1722
 
1723
- #: templates/debug.php:69
1724
  msgid "Clear API Cache"
1725
  msgstr ""
1726
 
1727
- #: templates/debug.php:77
1728
  msgid "Clear Updates Transients"
1729
  msgstr ""
1730
 
1731
- #: templates/debug.php:84
 
 
 
 
1732
  msgid "Sync Data From Server"
1733
  msgstr ""
1734
 
1735
- #: templates/debug.php:93
1736
  msgid "Migrate Options to Network"
1737
  msgstr ""
1738
 
1739
- #: templates/debug.php:98
1740
  msgid "Load DB Option"
1741
  msgstr ""
1742
 
1743
- #: templates/debug.php:101
1744
  msgid "Set DB Option"
1745
  msgstr ""
1746
 
1747
- #: templates/debug.php:180
1748
  msgid "Key"
1749
  msgstr ""
1750
 
1751
- #: templates/debug.php:181
1752
  msgid "Value"
1753
  msgstr ""
1754
 
1755
- #: templates/debug.php:197
1756
  msgctxt "as software development kit versions"
1757
  msgid "SDK Versions"
1758
  msgstr ""
1759
 
1760
- #: templates/debug.php:202
1761
  msgid "SDK Path"
1762
  msgstr ""
1763
 
1764
- #: templates/debug.php:203, templates/debug.php:242
1765
  msgid "Module Path"
1766
  msgstr ""
1767
 
1768
- #: templates/debug.php:204
1769
  msgid "Is Active"
1770
  msgstr ""
1771
 
1772
- #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:35
1773
  msgid "Plugins"
1774
  msgstr ""
1775
 
1776
- #: templates/debug.php:232, templates/debug/plugins-themes-sync.php:56
1777
  msgid "Themes"
1778
  msgstr ""
1779
 
1780
- #: templates/debug.php:237, templates/debug.php:368, templates/debug.php:454, templates/debug/scheduled-crons.php:80
1781
  msgid "Slug"
1782
  msgstr ""
1783
 
1784
- #: templates/debug.php:239, templates/debug.php:453
1785
  msgid "Title"
1786
  msgstr ""
1787
 
1788
- #: templates/debug.php:240
1789
  msgctxt "as application program interface"
1790
  msgid "API"
1791
  msgstr ""
1792
 
1793
- #: templates/debug.php:241
1794
  msgid "Freemius State"
1795
  msgstr ""
1796
 
1797
- #: templates/debug.php:245
1798
  msgid "Network Blog"
1799
  msgstr ""
1800
 
1801
- #: templates/debug.php:246
1802
  msgid "Network User"
1803
  msgstr ""
1804
 
1805
- #: templates/debug.php:283
1806
  msgctxt "as connection was successful"
1807
  msgid "Connected"
1808
  msgstr ""
1809
 
1810
- #: templates/debug.php:284
1811
  msgctxt "as connection blocked"
1812
  msgid "Blocked"
1813
  msgstr ""
1814
 
1815
- #: templates/debug.php:320
1816
  msgid "Simulate Trial Promotion"
1817
  msgstr ""
1818
 
1819
- #: templates/debug.php:332
1820
  msgid "Simulate Network Upgrade"
1821
  msgstr ""
1822
 
1823
- #: templates/debug.php:357
 
1824
  msgid "%s Installs"
1825
  msgstr ""
1826
 
1827
- #: templates/debug.php:359
1828
  msgctxt "like websites"
1829
  msgid "Sites"
1830
  msgstr ""
1831
 
1832
- #: templates/debug.php:365, templates/account/partials/site.php:156
1833
  msgid "Blog ID"
1834
  msgstr ""
1835
 
1836
- #: templates/debug.php:370
1837
  msgid "License ID"
1838
  msgstr ""
1839
 
1840
- #: templates/debug.php:434, templates/debug.php:533, templates/account/partials/addon.php:435
1841
  msgctxt "verb"
1842
  msgid "Delete"
1843
  msgstr ""
1844
 
1845
- #: templates/debug.php:448
1846
  msgid "Add Ons of module %s"
1847
  msgstr ""
1848
 
1849
- #: templates/debug.php:500
1850
  msgid "Users"
1851
  msgstr ""
1852
 
1853
- #: templates/debug.php:507
1854
  msgid "Verified"
1855
  msgstr ""
1856
 
1857
- #: templates/debug.php:549
1858
  msgid "%s Licenses"
1859
  msgstr ""
1860
 
1861
- #: templates/debug.php:554
1862
  msgid "Plugin ID"
1863
  msgstr ""
1864
 
1865
- #: templates/debug.php:556
1866
  msgid "Plan ID"
1867
  msgstr ""
1868
 
1869
- #: templates/debug.php:557
1870
  msgid "Quota"
1871
  msgstr ""
1872
 
1873
- #: templates/debug.php:558
1874
  msgid "Activated"
1875
  msgstr ""
1876
 
1877
- #: templates/debug.php:559
1878
  msgid "Blocking"
1879
  msgstr ""
1880
 
1881
- #: templates/debug.php:560, templates/debug.php:631, templates/debug/logger.php:22
1882
  msgid "Type"
1883
  msgstr ""
1884
 
1885
- #: templates/debug.php:562
1886
  msgctxt "as expiration date"
1887
  msgid "Expiration"
1888
  msgstr ""
1889
 
1890
- #: templates/debug.php:590
1891
  msgid "Debug Log"
1892
  msgstr ""
1893
 
1894
- #: templates/debug.php:594
1895
  msgid "All Types"
1896
  msgstr ""
1897
 
1898
- #: templates/debug.php:601
1899
  msgid "All Requests"
1900
  msgstr ""
1901
 
1902
- #: templates/debug.php:606, templates/debug.php:635, templates/debug/logger.php:25
1903
  msgid "File"
1904
  msgstr ""
1905
 
1906
- #: templates/debug.php:607, templates/debug.php:633, templates/debug/logger.php:23
1907
  msgid "Function"
1908
  msgstr ""
1909
 
1910
- #: templates/debug.php:608
1911
  msgid "Process ID"
1912
  msgstr ""
1913
 
1914
- #: templates/debug.php:609
1915
  msgid "Logger"
1916
  msgstr ""
1917
 
1918
- #: templates/debug.php:610, templates/debug.php:634, templates/debug/logger.php:24
1919
  msgid "Message"
1920
  msgstr ""
1921
 
1922
- #: templates/debug.php:612
1923
  msgid "Filter"
1924
  msgstr ""
1925
 
1926
- #: templates/debug.php:620
1927
  msgid "Download"
1928
  msgstr ""
1929
 
1930
- #: templates/debug.php:636, templates/debug/logger.php:26
1931
  msgid "Timestamp"
1932
  msgstr ""
1933
 
1934
- #: templates/secure-https-header.php:28
1935
- msgid "Secure HTTPS %s page, running from an external domain"
1936
- msgstr ""
1937
-
1938
- #: includes/customizer/class-fs-customizer-support-section.php:55, templates/plugin-info/features.php:43
1939
- msgid "Support"
1940
- msgstr ""
1941
-
1942
  #: includes/debug/class-fs-debug-bar-panel.php:48, templates/debug/api-calls.php:54, templates/debug/logger.php:62
1943
  msgctxt "milliseconds"
1944
  msgid "ms"
@@ -1952,6 +1163,120 @@ msgstr ""
1952
  msgid "Requests"
1953
  msgstr ""
1954
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1955
  #: templates/account/billing.php:22
1956
  msgctxt "verb"
1957
  msgid "Update"
@@ -2105,143 +1430,143 @@ msgstr ""
2105
  msgid "Next"
2106
  msgstr ""
2107
 
2108
- #: templates/forms/affiliation.php:82
2109
  msgid "Non-expiring"
2110
  msgstr ""
2111
 
2112
- #: templates/forms/affiliation.php:85
2113
  msgid "Apply to become an affiliate"
2114
  msgstr ""
2115
 
2116
- #: templates/forms/affiliation.php:107
2117
- msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
2118
  msgstr ""
2119
 
2120
- #: templates/forms/affiliation.php:122
2121
- msgid "Thank you for applying for our affiliate program, we'll review your details during the next 14 days and will get back to you with further information."
2122
  msgstr ""
2123
 
2124
- #: templates/forms/affiliation.php:125
2125
  msgid "Your affiliation account was temporarily suspended."
2126
  msgstr ""
2127
 
2128
- #: templates/forms/affiliation.php:128
2129
- msgid "Thank you for applying for our affiliate program, unfortunately, we've decided at this point to reject your application. Please try again in 30 days."
2130
  msgstr ""
2131
 
2132
- #: templates/forms/affiliation.php:131
2133
- msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
2134
  msgstr ""
2135
 
2136
- #: templates/forms/affiliation.php:144
2137
  msgid "Like the %s? Become our ambassador and earn cash ;-)"
2138
  msgstr ""
2139
 
2140
- #: templates/forms/affiliation.php:145
2141
  msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
2142
  msgstr ""
2143
 
2144
- #: templates/forms/affiliation.php:148
2145
  msgid "Program Summary"
2146
  msgstr ""
2147
 
2148
- #: templates/forms/affiliation.php:150
2149
  msgid "%s commission when a customer purchases a new license."
2150
  msgstr ""
2151
 
2152
- #: templates/forms/affiliation.php:152
2153
  msgid "Get commission for automated subscription renewals."
2154
  msgstr ""
2155
 
2156
- #: templates/forms/affiliation.php:155
2157
  msgid "%s tracking cookie after the first visit to maximize earnings potential."
2158
  msgstr ""
2159
 
2160
- #: templates/forms/affiliation.php:158
2161
  msgid "Unlimited commissions."
2162
  msgstr ""
2163
 
2164
- #: templates/forms/affiliation.php:160
2165
  msgid "%s minimum payout amount."
2166
  msgstr ""
2167
 
2168
- #: templates/forms/affiliation.php:161
2169
  msgid "Payouts are in USD and processed monthly via PayPal."
2170
  msgstr ""
2171
 
2172
- #: templates/forms/affiliation.php:162
2173
  msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
2174
  msgstr ""
2175
 
2176
- #: templates/forms/affiliation.php:165
2177
  msgid "Affiliate"
2178
  msgstr ""
2179
 
2180
- #: templates/forms/affiliation.php:168, templates/forms/resend-key.php:23
2181
  msgid "Email address"
2182
  msgstr ""
2183
 
2184
- #: templates/forms/affiliation.php:172
2185
  msgid "Full name"
2186
  msgstr ""
2187
 
2188
- #: templates/forms/affiliation.php:176
2189
  msgid "PayPal account email address"
2190
  msgstr ""
2191
 
2192
- #: templates/forms/affiliation.php:180
2193
  msgid "Where are you going to promote the %s?"
2194
  msgstr ""
2195
 
2196
- #: templates/forms/affiliation.php:182
2197
  msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
2198
  msgstr ""
2199
 
2200
- #: templates/forms/affiliation.php:184
2201
  msgid "Add another domain"
2202
  msgstr ""
2203
 
2204
- #: templates/forms/affiliation.php:188
2205
  msgid "Extra Domains"
2206
  msgstr ""
2207
 
2208
- #: templates/forms/affiliation.php:189
2209
  msgid "Extra domains where you will be marketing the product from."
2210
  msgstr ""
2211
 
2212
- #: templates/forms/affiliation.php:199
2213
  msgid "Promotion methods"
2214
  msgstr ""
2215
 
2216
- #: templates/forms/affiliation.php:202
2217
  msgid "Social media (Facebook, Twitter, etc.)"
2218
  msgstr ""
2219
 
2220
- #: templates/forms/affiliation.php:206
2221
  msgid "Mobile apps"
2222
  msgstr ""
2223
 
2224
- #: templates/forms/affiliation.php:210
2225
  msgid "Website, email, and social media statistics (optional)"
2226
  msgstr ""
2227
 
2228
- #: templates/forms/affiliation.php:213
2229
  msgid "Please feel free to provide any relevant website or social media statistics, e.g. monthly unique site visits, number of email subscribers, followers, etc. (we will keep this information confidential)."
2230
  msgstr ""
2231
 
2232
- #: templates/forms/affiliation.php:217
2233
  msgid "How will you promote us?"
2234
  msgstr ""
2235
 
2236
- #: templates/forms/affiliation.php:220
2237
  msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
2238
  msgstr ""
2239
 
2240
- #: templates/forms/affiliation.php:232, templates/forms/resend-key.php:22
2241
  msgid "Cancel"
2242
  msgstr ""
2243
 
2244
- #: templates/forms/affiliation.php:234
2245
  msgid "Become an affiliate"
2246
  msgstr ""
2247
 
@@ -2261,6 +1586,55 @@ msgstr ""
2261
  msgid "User key"
2262
  msgstr ""
2263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2264
  #: templates/forms/license-activation.php:23
2265
  msgid "Please enter the license key that you received in the email right after the purchase:"
2266
  msgstr ""
@@ -2273,7 +1647,7 @@ msgstr ""
2273
  msgid "The %1$s will be periodically sending data to %2$s to check for security and feature updates, and verify the validity of your license."
2274
  msgstr ""
2275
 
2276
- #: templates/forms/license-activation.php:183
2277
  msgid "Associate with the license owner's account."
2278
  msgstr ""
2279
 
@@ -2287,6 +1661,18 @@ msgctxt "verb"
2287
  msgid "Opt In"
2288
  msgstr ""
2289
 
 
 
 
 
 
 
 
 
 
 
 
 
2290
  #: templates/forms/optout.php:34
2291
  msgid "Connectivity to the licensing engine was successfully re-established. Automatic security & feature updates are now available through the WP Admin Dashboard."
2292
  msgstr ""
@@ -2303,14 +1689,6 @@ msgstr ""
2303
  msgid "I'd like to keep automatic updates"
2304
  msgstr ""
2305
 
2306
- #: templates/forms/optout.php:44
2307
- msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking."
2308
- msgstr ""
2309
-
2310
- #: templates/forms/optout.php:45
2311
- msgid "On second thought - I want to continue helping"
2312
- msgstr ""
2313
-
2314
  #: templates/forms/optout.php:49
2315
  msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
2316
  msgstr ""
@@ -2331,6 +1709,14 @@ msgstr ""
2331
  msgid " %s to access version %s security & feature updates, and support."
2332
  msgstr ""
2333
 
 
 
 
 
 
 
 
 
2334
  #: templates/forms/premium-versions-upgrade-handler.php:54
2335
  msgid "New Version Available"
2336
  msgstr ""
@@ -2344,7 +1730,15 @@ msgstr ""
2344
  msgid "Send License Key"
2345
  msgstr ""
2346
 
2347
- #: templates/forms/resend-key.php:57
 
 
 
 
 
 
 
 
2348
  msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
2349
  msgstr ""
2350
 
@@ -2356,10 +1750,6 @@ msgstr ""
2356
  msgid "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
2357
  msgstr ""
2358
 
2359
- #: templates/forms/subscription-cancellation.php:52
2360
- msgid "license"
2361
- msgstr ""
2362
-
2363
  #: templates/forms/subscription-cancellation.php:57
2364
  msgid "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
2365
  msgstr ""
@@ -2380,18 +1770,25 @@ msgstr ""
2380
  msgid "Proceed"
2381
  msgstr ""
2382
 
2383
- #: templates/forms/subscription-cancellation.php:191, templates/forms/deactivation/form.php:171
2384
  msgid "Cancel %s & Proceed"
2385
  msgstr ""
2386
 
 
2387
  #: templates/forms/trial-start.php:22
2388
  msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
2389
  msgstr ""
2390
 
 
2391
  #: templates/forms/trial-start.php:28
2392
  msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt in with your user and non-sensitive site information, allowing the %s to periodically send data to %s to check for version updates and to validate your trial."
2393
  msgstr ""
2394
 
 
 
 
 
 
2395
  #: templates/forms/user-change.php:26
2396
  msgid "By changing the user, you agree to transfer the account ownership to:"
2397
  msgstr ""
@@ -2404,44 +1801,31 @@ msgstr ""
2404
  msgid "Enter email address"
2405
  msgstr ""
2406
 
2407
- #: templates/forms/user-change.php:81
2408
- msgctxt "close window"
2409
- msgid "Dismiss"
2410
- msgstr ""
2411
-
2412
- #: templates/js/style-premium-theme.php:39
2413
- msgid "Premium"
2414
  msgstr ""
2415
 
2416
- #: templates/js/style-premium-theme.php:42
2417
- msgid "Beta"
2418
  msgstr ""
2419
 
2420
- #: templates/partials/network-activation.php:27
2421
  msgid "Activate license on all sites in the network."
2422
  msgstr ""
2423
 
2424
- #: templates/partials/network-activation.php:28
2425
  msgid "Apply on all sites in the network."
2426
  msgstr ""
2427
 
2428
- #: templates/partials/network-activation.php:31
2429
- msgid "Activate license on all pending sites."
2430
- msgstr ""
2431
-
2432
- #: templates/partials/network-activation.php:32
2433
- msgid "Apply on all pending sites."
2434
- msgstr ""
2435
-
2436
- #: templates/partials/network-activation.php:40, templates/partials/network-activation.php:74
2437
  msgid "allow"
2438
  msgstr ""
2439
 
2440
- #: templates/partials/network-activation.php:43, templates/partials/network-activation.php:77
2441
  msgid "delegate"
2442
  msgstr ""
2443
 
2444
- #: templates/partials/network-activation.php:47, templates/partials/network-activation.php:81
2445
  msgid "skip"
2446
  msgstr ""
2447
 
@@ -2449,6 +1833,10 @@ msgstr ""
2449
  msgid "Click to view full-size screenshot %d"
2450
  msgstr ""
2451
 
 
 
 
 
2452
  #: templates/plugin-info/features.php:56
2453
  msgid "Unlimited Updates"
2454
  msgstr ""
@@ -2467,16 +1855,24 @@ msgid "Last license"
2467
  msgstr ""
2468
 
2469
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
2470
- #: templates/account/partials/addon.php:29
2471
  msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
2472
  msgstr ""
2473
 
2474
- #: templates/account/partials/addon.php:185
 
 
 
 
2475
  msgid "Cancelled"
2476
  msgstr ""
2477
 
2478
- #: templates/account/partials/addon.php:195
2479
- msgid "No expiration"
 
 
 
 
2480
  msgstr ""
2481
 
2482
  #: templates/account/partials/site.php:189
@@ -2503,47 +1899,63 @@ msgstr ""
2503
  msgid "Contact Support"
2504
  msgstr ""
2505
 
2506
- #: templates/forms/deactivation/form.php:64
2507
  msgid "Anonymous feedback"
2508
  msgstr ""
2509
 
2510
- #: templates/forms/deactivation/form.php:70
 
 
 
 
 
 
 
 
 
 
 
 
2511
  msgid "Deactivate"
2512
  msgstr ""
2513
 
2514
- #: templates/forms/deactivation/form.php:72
2515
  msgid "Activate %s"
2516
  msgstr ""
2517
 
2518
- #: templates/forms/deactivation/form.php:87
 
 
 
 
2519
  msgid "Quick Feedback"
2520
  msgstr ""
2521
 
2522
- #: templates/forms/deactivation/form.php:91
2523
  msgid "If you have a moment, please let us know why you are %s"
2524
  msgstr ""
2525
 
2526
- #: templates/forms/deactivation/form.php:91
2527
  msgid "deactivating"
2528
  msgstr ""
2529
 
2530
- #: templates/forms/deactivation/form.php:91
2531
  msgid "switching"
2532
  msgstr ""
2533
 
2534
- #: templates/forms/deactivation/form.php:369
2535
- msgid "Submit & %s"
2536
  msgstr ""
2537
 
2538
- #: templates/forms/deactivation/form.php:390
2539
- msgid "Kindly tell us the reason so we can improve."
2540
  msgstr ""
2541
 
2542
- #: templates/forms/deactivation/form.php:515
2543
  msgid "Yes - %s"
2544
  msgstr ""
2545
 
2546
- #: templates/forms/deactivation/form.php:522
2547
  msgid "Skip & %s"
2548
  msgstr ""
2549
 
1
+ # Copyright (C) 2022 freemius
2
  # This file is distributed under the same license as the freemius package.
3
  msgid ""
4
  msgstr ""
8
  "Content-Transfer-Encoding: 8bit\n"
9
  "Language-Team: Freemius Team <admin@freemius.com>\n"
10
  "Last-Translator: Vova Feldman <vova@freemius.com>\n"
11
+ "POT-Creation-Date: 2022-07-06 12:49+0000\n"
12
  "Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
 
20
+ #: includes/class-freemius.php:1932, templates/account.php:941
21
  msgid "An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned."
22
  msgstr ""
23
 
24
+ #: includes/class-freemius.php:1939
25
  msgid "Would you like to proceed with the update?"
26
  msgstr ""
27
 
28
+ #: includes/class-freemius.php:3751, templates/debug.php:20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  msgid "Freemius Debug"
30
  msgstr ""
31
 
32
+ #: includes/class-freemius.php:13791
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  msgid "An unknown error has occurred while trying to toggle the license's white-label mode."
34
  msgstr ""
35
 
36
+ #: includes/class-freemius.php:13869
 
 
 
 
 
 
 
 
 
 
 
 
37
  msgid "An unknown error has occurred while trying to set the user's beta mode."
38
  msgstr ""
39
 
40
+ #: includes/class-freemius.php:13942
41
  msgid "Invalid new user ID or email address."
42
  msgstr ""
43
 
44
+ #: includes/class-freemius.php:23326
45
+ msgid "Bundle"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  msgstr ""
47
 
48
  #: includes/class-fs-plugin-updater.php:206, templates/forms/premium-versions-upgrade-handler.php:57
53
  msgid "Buy license"
54
  msgstr ""
55
 
56
+ #: includes/class-fs-plugin-updater.php:364, includes/class-fs-plugin-updater.php:331
57
  msgid "There is a %s of %s available."
58
  msgstr ""
59
 
60
+ #: includes/class-fs-plugin-updater.php:369, includes/class-fs-plugin-updater.php:333
61
  msgid "new Beta version"
62
  msgstr ""
63
 
64
+ #: includes/class-fs-plugin-updater.php:370, includes/class-fs-plugin-updater.php:334
65
  msgid "new version"
66
  msgstr ""
67
 
68
+ #: includes/class-fs-plugin-updater.php:393
69
  msgid "Important Upgrade Notice:"
70
  msgstr ""
71
 
72
+ #: includes/class-fs-plugin-updater.php:1551
 
 
 
 
 
 
 
 
73
  msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
74
  msgstr ""
75
 
77
  msgid "Purchase More"
78
  msgstr ""
79
 
80
+ #: includes/fs-plugin-info-dialog.php:542, templates/account/partials/addon.php:390
81
  msgctxt "verb"
82
  msgid "Purchase"
83
  msgstr ""
84
 
85
+ #. translators: %s: N-days trial
86
  #: includes/fs-plugin-info-dialog.php:546
87
  msgid "Start my free %s"
88
  msgstr ""
89
 
90
+ #: includes/fs-plugin-info-dialog.php:754
91
+ msgid "Install Free Version Now"
92
  msgstr ""
93
 
94
+ #: includes/fs-plugin-info-dialog.php:755, templates/add-ons.php:323, templates/auto-installation.php:111, templates/account/partials/addon.php:423, templates/account/partials/addon.php:370
95
+ msgid "Install Now"
96
  msgstr ""
97
 
98
+ #: includes/fs-plugin-info-dialog.php:744
99
+ msgid "Install Free Version Update Now"
100
  msgstr ""
101
 
102
+ #: includes/fs-plugin-info-dialog.php:745, templates/account.php:650
103
+ msgid "Install Update Now"
104
  msgstr ""
105
 
106
  #: includes/fs-plugin-info-dialog.php:771
108
  msgid "Download Latest Free Version"
109
  msgstr ""
110
 
111
+ #: includes/fs-plugin-info-dialog.php:772, templates/account.php:109, templates/add-ons.php:37, templates/account/partials/addon.php:30
112
  msgctxt "as download latest version"
113
  msgid "Download Latest"
114
  msgstr ""
115
 
116
+ #: includes/fs-plugin-info-dialog.php:787, templates/add-ons.php:329, templates/account/partials/addon.php:417, templates/account/partials/addon.php:361
117
  msgid "Activate this add-on"
118
  msgstr ""
119
 
120
+ #: includes/fs-plugin-info-dialog.php:789, templates/connect.php:483
121
  msgid "Activate Free Version"
122
  msgstr ""
123
 
124
+ #: includes/fs-plugin-info-dialog.php:790, templates/account.php:133, templates/add-ons.php:330, templates/account/partials/addon.php:53
125
  msgid "Activate"
126
  msgstr ""
127
 
234
  msgid "Price"
235
  msgstr ""
236
 
237
+ #. translators: %s: Discount (e.g. discount of $5 or 10%)
238
  #: includes/fs-plugin-info-dialog.php:1290
239
  msgid "Save %s"
240
  msgstr ""
251
  msgid "Details"
252
  msgstr ""
253
 
254
+ #: includes/fs-plugin-info-dialog.php:1318, templates/account.php:120, templates/debug.php:215, templates/debug.php:252, templates/debug.php:466, templates/account/partials/addon.php:41
255
  msgctxt "product version"
256
  msgid "Version"
257
  msgstr ""
265
  msgid "Last Updated"
266
  msgstr ""
267
 
268
+ #. translators: %s: time period (e.g. "2 hours" ago)
269
+ #: includes/fs-plugin-info-dialog.php:1337, templates/account.php:536
270
  msgctxt "x-ago"
271
  msgid "%s ago"
272
  msgstr ""
287
  msgid "Downloaded"
288
  msgstr ""
289
 
290
+ #. translators: %s: 1 or One (Number of times downloaded)
291
  #: includes/fs-plugin-info-dialog.php:1366
292
  msgid "%s time"
293
  msgstr ""
294
 
295
+ #. translators: %s: Number of times downloaded
296
  #: includes/fs-plugin-info-dialog.php:1368
297
  msgid "%s times"
298
  msgstr ""
317
  msgid "based on %s"
318
  msgstr ""
319
 
320
+ #. translators: %s: 1 or One
321
  #: includes/fs-plugin-info-dialog.php:1415
322
  msgid "%s rating"
323
  msgstr ""
324
 
325
+ #. translators: %s: Number larger than 1
326
  #: includes/fs-plugin-info-dialog.php:1417
327
  msgid "%s ratings"
328
  msgstr ""
329
 
330
+ #. translators: %s: 1 or One
331
  #: includes/fs-plugin-info-dialog.php:1432
332
  msgid "%s star"
333
  msgstr ""
334
 
335
+ #. translators: %s: Number larger than 1
336
  #: includes/fs-plugin-info-dialog.php:1434
337
  msgid "%s stars"
338
  msgstr ""
339
 
340
+ #. translators: %s: # of stars (e.g. 5 stars)
341
  #: includes/fs-plugin-info-dialog.php:1446
342
  msgid "Click to see reviews that provided a rating of %s"
343
  msgstr ""
346
  msgid "Contributors"
347
  msgstr ""
348
 
349
+ #: includes/fs-plugin-info-dialog.php:1491, includes/fs-plugin-info-dialog.php:1489
350
  msgid "Warning"
351
  msgstr ""
352
 
 
 
 
 
353
  #: includes/fs-plugin-info-dialog.php:1491
354
  msgid "This plugin has not been marked as compatible with your version of WordPress."
355
  msgstr ""
356
 
357
+ #: includes/fs-plugin-info-dialog.php:1489
358
+ msgid "This plugin has not been tested with your current version of WordPress."
359
+ msgstr ""
360
+
361
  #: includes/fs-plugin-info-dialog.php:1510
362
  msgid "Paid add-on must be deployed to Freemius."
363
  msgstr ""
366
  msgid "Add-on must be deployed to WordPress.org or Freemius."
367
  msgstr ""
368
 
 
 
 
 
 
 
 
 
369
  #: includes/fs-plugin-info-dialog.php:1540
370
  msgid "Latest Version Installed"
371
  msgstr ""
374
  msgid "Latest Free Version Installed"
375
  msgstr ""
376
 
377
+ #: includes/fs-plugin-info-dialog.php:1532
378
+ msgid "Newer Version (%s) Installed"
379
+ msgstr ""
380
+
381
+ #: includes/fs-plugin-info-dialog.php:1533
382
+ msgid "Newer Free Version (%s) Installed"
383
+ msgstr ""
384
+
385
+ #: templates/account.php:110, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:31, templates/account/partials/site.php:311
386
  msgid "Downgrading your plan"
387
  msgstr ""
388
 
389
+ #: templates/account.php:111, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:32, templates/account/partials/site.php:312
390
  msgid "Cancelling the subscription"
391
  msgstr ""
392
 
393
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
394
+ #: templates/account.php:113, templates/forms/subscription-cancellation.php:99, templates/account/partials/site.php:314
395
  msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
396
  msgstr ""
397
 
398
+ #: templates/account.php:114, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:35, templates/account/partials/site.php:315
399
  msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
400
  msgstr ""
401
 
402
+ #: templates/account.php:115, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:36
403
  msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
404
  msgstr ""
405
 
406
+ #: templates/account.php:116, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:37, templates/account/partials/site.php:316
407
  msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
408
  msgstr ""
409
 
410
+ #: templates/account.php:117, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:38, templates/account/partials/site.php:317
411
  msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
412
  msgstr ""
413
 
414
  #. translators: %s: Plan title (e.g. "Professional")
415
+ #: templates/account.php:119, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:40
416
  msgid "Activate %s Plan"
417
  msgstr ""
418
 
419
  #. translators: %s: Time period (e.g. Auto renews in "2 months")
420
+ #: templates/account.php:122, templates/account/partials/addon.php:43, templates/account/partials/site.php:291
421
  msgid "Auto renews in %s"
422
  msgstr ""
423
 
424
  #. translators: %s: Time period (e.g. Expires in "2 months")
425
+ #: templates/account.php:124, templates/account/partials/addon.php:45, templates/account/partials/site.php:293
426
  msgid "Expires in %s"
427
  msgstr ""
428
 
429
+ #: templates/account.php:125
430
  msgctxt "as synchronize license"
431
  msgid "Sync License"
432
  msgstr ""
433
 
434
+ #: templates/account.php:126, templates/account/partials/addon.php:46
435
  msgid "Cancel Trial"
436
  msgstr ""
437
 
438
+ #: templates/account.php:127, templates/account/partials/addon.php:47
439
  msgid "Change Plan"
440
  msgstr ""
441
 
442
+ #: templates/account.php:128, templates/account/partials/addon.php:48
443
  msgctxt "verb"
444
  msgid "Upgrade"
445
  msgstr ""
446
 
447
+ #: templates/account.php:129, templates/account/partials/addon.php:49
448
+ msgid "Add-Ons"
449
+ msgstr ""
450
+
451
+ #: templates/account.php:130, templates/account/partials/addon.php:50, templates/account/partials/site.php:318
452
  msgctxt "verb"
453
  msgid "Downgrade"
454
  msgstr ""
455
 
456
+ #: templates/account.php:131, templates/add-ons.php:250, templates/account/partials/addon.php:51
457
+ msgctxt "trial period"
458
+ msgid "Trial"
459
+ msgstr ""
460
+
461
+ #: templates/account.php:132, templates/add-ons.php:246, templates/plugin-info/features.php:72, templates/account/partials/addon.php:52, templates/account/partials/site.php:33
462
  msgid "Free"
463
  msgstr ""
464
 
465
+ #: templates/account.php:134, templates/debug.php:385, templates/account/partials/addon.php:54
466
  msgctxt "as product pricing plan"
467
  msgid "Plan"
468
  msgstr ""
469
 
470
+ #: templates/account.php:135
471
  msgid "Bundle Plan"
472
  msgstr ""
473
 
474
+ #: templates/account.php:251, templates/debug.php:338
475
+ msgid "Account"
476
+ msgstr ""
477
+
478
+ #: templates/account.php:259
479
  msgid "Free Trial"
480
  msgstr ""
481
 
482
+ #: templates/account.php:270
483
  msgid "Account Details"
484
  msgstr ""
485
 
486
+ #: templates/account.php:279
487
+ msgid "Stop Debug"
488
  msgstr ""
489
 
490
+ #: templates/account.php:277, templates/forms/data-debug-mode.php:33
491
+ msgid "Start Debug"
492
  msgstr ""
493
 
494
+ #: templates/account.php:286
495
  msgid "Billing & Invoices"
496
  msgstr ""
497
 
498
+ #: templates/account.php:299
499
+ msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
500
  msgstr ""
501
 
502
+ #: templates/account.php:297
503
+ msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
504
  msgstr ""
505
 
506
+ #: templates/account.php:302
507
  msgid "Delete Account"
508
  msgstr ""
509
 
510
+ #: templates/account.php:314, templates/account/partials/addon.php:236, templates/account/partials/deactivate-license-button.php:35
511
  msgid "Deactivate License"
512
  msgstr ""
513
 
514
+ #: templates/account.php:337, templates/forms/subscription-cancellation.php:125
515
  msgid "Are you sure you want to proceed?"
516
  msgstr ""
517
 
518
+ #: templates/account.php:337, templates/account/partials/addon.php:260
519
  msgid "Cancel Subscription"
520
  msgstr ""
521
 
522
+ #: templates/account.php:366, templates/account/partials/addon.php:345
523
  msgctxt "as synchronize"
524
  msgid "Sync"
525
  msgstr ""
526
 
527
+ #: templates/account.php:381, templates/debug.php:523
528
  msgid "Name"
529
  msgstr ""
530
 
531
+ #: templates/account.php:387, templates/debug.php:524
532
  msgid "Email"
533
  msgstr ""
534
 
535
+ #: templates/account.php:394, templates/debug.php:383, templates/debug.php:573
536
  msgid "User ID"
537
  msgstr ""
538
 
539
+ #: templates/account.php:403, templates/account.php:411, templates/debug.php:372, templates/debug.php:567
540
+ msgid "Plugin"
541
+ msgstr ""
542
+
543
+ #: templates/account.php:404, templates/account.php:412, templates/debug.php:372, templates/debug.php:567, templates/forms/deactivation/form.php:107
544
+ msgid "Theme"
545
+ msgstr ""
546
+
547
+ #: templates/account.php:412, templates/account.php:732, templates/account.php:783, templates/debug.php:250, templates/debug.php:377, templates/debug.php:463, templates/debug.php:522, templates/debug.php:571, templates/debug.php:650, templates/account/payments.php:35, templates/debug/logger.php:21
548
  msgid "ID"
549
  msgstr ""
550
 
551
+ #: templates/account.php:419
552
  msgid "Site ID"
553
  msgstr ""
554
 
555
+ #: templates/account.php:422
556
  msgid "No ID"
557
  msgstr ""
558
 
559
+ #: templates/account.php:427, templates/debug.php:257, templates/debug.php:386, templates/debug.php:467, templates/debug.php:526, templates/account/partials/site.php:227
560
  msgid "Public Key"
561
  msgstr ""
562
 
563
+ #: templates/account.php:433, templates/debug.php:387, templates/debug.php:468, templates/debug.php:527, templates/account/partials/site.php:239
564
  msgid "Secret Key"
565
  msgstr ""
566
 
567
+ #: templates/account.php:436
568
  msgctxt "as secret encryption key missing"
569
  msgid "No Secret"
570
  msgstr ""
571
 
572
+ #: templates/account.php:490, templates/debug.php:579, templates/account/partials/site.php:260
573
+ msgid "License Key"
574
  msgstr ""
575
 
576
+ #: templates/account.php:463, templates/account/partials/site.php:122, templates/account/partials/site.php:120
577
+ msgid "Trial"
578
  msgstr ""
579
 
580
+ #: templates/account.php:521
581
  msgid "Join the Beta program"
582
  msgstr ""
583
 
584
+ #: templates/account.php:527
585
  msgid "not verified"
586
  msgstr ""
587
 
588
+ #: templates/account.php:598
589
+ msgid "Free version"
590
  msgstr ""
591
 
592
+ #: templates/account.php:596
593
  msgid "Premium version"
594
  msgstr ""
595
 
596
+ #: templates/account.php:536, templates/account/partials/addon.php:195
597
+ msgid "Expired"
598
+ msgstr ""
599
+
600
+ #: templates/account.php:567, templates/account.php:719, templates/connect.php:198, templates/connect.php:486, includes/managers/class-fs-clone-manager.php:1123, templates/forms/license-activation.php:27, templates/account/partials/addon.php:326
601
+ msgid "Activate License"
602
  msgstr ""
603
 
604
+ #: templates/account.php:610
605
  msgid "Verify Email"
606
  msgstr ""
607
 
608
+ #: templates/account.php:687, templates/forms/user-change.php:27
609
+ msgid "Change User"
610
  msgstr ""
611
 
612
+ #: templates/account.php:674
613
+ msgid "What is your %s?"
614
  msgstr ""
615
 
616
+ #: templates/account.php:682, templates/account/billing.php:21
617
+ msgctxt "verb"
618
+ msgid "Edit"
619
+ msgstr ""
620
+
621
+ #: templates/account.php:658, templates/account.php:921, templates/account/partials/site.php:248, templates/account/partials/site.php:270
622
  msgctxt "verb"
623
  msgid "Show"
624
  msgstr ""
625
 
626
+ #: templates/account.php:661, templates/account.php:718, templates/account/partials/addon.php:327, templates/account/partials/site.php:271
627
+ msgid "Change License"
628
  msgstr ""
629
 
630
+ #: templates/account.php:624
631
+ msgid "Download %s Version"
 
632
  msgstr ""
633
 
634
+ #: templates/account.php:640
635
+ msgid "Download Paid Version"
636
  msgstr ""
637
 
638
+ #: templates/account.php:711
639
  msgid "Sites"
640
  msgstr ""
641
 
642
+ #: templates/account.php:724
643
  msgid "Search by address"
644
  msgstr ""
645
 
646
+ #: templates/account.php:733, templates/debug.php:380
647
  msgid "Address"
648
  msgstr ""
649
 
650
+ #: templates/account.php:734
651
  msgid "License"
652
  msgstr ""
653
 
654
+ #: templates/account.php:735
655
  msgid "Plan"
656
  msgstr ""
657
 
658
+ #: templates/account.php:786
659
  msgctxt "as software license"
660
  msgid "License"
661
  msgstr ""
662
 
663
+ #: templates/account.php:915
664
  msgctxt "verb"
665
  msgid "Hide"
666
  msgstr ""
667
 
668
+ #: templates/account.php:937, templates/forms/data-debug-mode.php:31, templates/forms/deactivation/form.php:358, templates/forms/deactivation/form.php:389
669
  msgid "Processing"
670
  msgstr ""
671
 
672
+ #: templates/account.php:940
673
  msgid "Get updates for bleeding edge Beta versions of %s."
674
  msgstr ""
675
 
676
+ #: templates/account.php:998
677
  msgid "Cancelling %s"
678
  msgstr ""
679
 
680
+ #: templates/account.php:998, templates/account.php:1015, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:178
681
  msgid "trial"
682
  msgstr ""
683
 
684
+ #: templates/account.php:1013, templates/forms/deactivation/form.php:195
685
  msgid "Cancelling %s..."
686
  msgstr ""
687
 
688
+ #: templates/account.php:1016, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:179
689
  msgid "subscription"
690
  msgstr ""
691
 
692
+ #: templates/account.php:1030
693
  msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
694
  msgstr ""
695
 
696
+ #: templates/account.php:1104
697
  msgid "Disabling white-label mode"
698
  msgstr ""
699
 
700
+ #: templates/account.php:1105
701
  msgid "Enabling white-label mode"
702
  msgstr ""
703
 
709
  msgid "Add Ons for %s"
710
  msgstr ""
711
 
712
+ #: templates/add-ons.php:57
713
+ msgctxt "exclamation"
714
+ msgid "Oops"
715
+ msgstr ""
716
+
717
  #: templates/add-ons.php:58
718
  msgid "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
719
  msgstr ""
720
 
721
+ #: templates/add-ons.php:186, templates/account/partials/addon.php:386
722
+ msgid "More information about %s"
723
+ msgstr ""
724
+
725
  #: templates/add-ons.php:229
726
  msgctxt "active add-on"
727
  msgid "Active"
732
  msgid "Installed"
733
  msgstr ""
734
 
735
+ #: templates/admin-notice.php:13, templates/forms/license-activation.php:250, templates/forms/resend-key.php:80
736
  msgctxt "as close a window"
737
  msgid "Dismiss"
738
  msgstr ""
739
 
740
+ #: templates/auto-installation.php:32
741
+ msgid "Add-On"
742
+ msgstr ""
743
+
744
+ #. translators: %s: Number of seconds
745
  #: templates/auto-installation.php:45
746
  msgid "%s sec"
747
  msgstr ""
762
  msgid "Cancel Installation"
763
  msgstr ""
764
 
 
 
 
 
 
 
 
 
765
  #. translators: %s: name (e.g. Hey John,)
766
+ #: templates/connect.php:121
767
  msgctxt "greeting"
768
  msgid "Hey %s,"
769
  msgstr ""
770
 
771
+ #: templates/connect.php:181
772
  msgid "Allow & Continue"
773
  msgstr ""
774
 
775
+ #: templates/connect.php:210, templates/connect.php:217
776
+ msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
777
  msgstr ""
778
 
779
+ #: templates/connect.php:211, templates/connect.php:218
780
+ msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
781
+ msgstr ""
782
+
783
+ #: templates/connect.php:221
784
+ msgid "If you skip this, that's okay! %1$s will still work just fine."
785
  msgstr ""
786
 
787
+ #: templates/connect.php:199, templates/forms/license-activation.php:46
788
  msgid "Agree & Activate License"
789
  msgstr ""
790
 
791
+ #: templates/connect.php:203
792
  msgid "Welcome to %s! To get started, please enter your license key:"
793
  msgstr ""
794
 
795
+ #: templates/connect.php:185
796
+ msgid "Re-send activation email"
797
  msgstr ""
798
 
799
+ #: templates/connect.php:189
800
+ msgid "Thanks %s!"
801
  msgstr ""
802
 
803
+ #: templates/connect.php:190
804
+ msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
805
  msgstr ""
806
 
807
+ #: templates/connect.php:194
808
+ msgid "complete the install"
809
  msgstr ""
810
 
811
+ #: templates/connect.php:251
812
  msgid "We're excited to introduce the Freemius network-level integration."
813
  msgstr ""
814
 
815
+ #: templates/connect.php:265
816
+ msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
817
+ msgstr ""
818
+
819
+ #: templates/connect.php:254
820
  msgid "During the update process we detected %d site(s) that are still pending license activation."
821
  msgstr ""
822
 
823
+ #: templates/connect.php:256
824
  msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
825
  msgstr ""
826
 
827
+ #: templates/connect.php:258
828
  msgid "%s's paid features"
829
  msgstr ""
830
 
831
+ #: templates/connect.php:263
832
  msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
833
  msgstr ""
834
 
835
+ #: templates/connect.php:274, templates/forms/data-debug-mode.php:35, templates/forms/license-activation.php:49
 
 
 
 
836
  msgid "License key"
837
  msgstr ""
838
 
839
+ #: templates/connect.php:277, templates/forms/license-activation.php:22
840
  msgid "Can't find your license key?"
841
  msgstr ""
842
 
843
+ #: templates/connect.php:308
844
+ msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
845
+ msgstr ""
846
+
847
+ #: templates/connect.php:340, templates/connect.php:730, templates/forms/deactivation/retry-skip.php:20
848
  msgctxt "verb"
849
  msgid "Skip"
850
  msgstr ""
851
 
852
+ #: templates/connect.php:343
853
  msgid "Delegate to Site Admins"
854
  msgstr ""
855
 
856
+ #: templates/connect.php:343
857
  msgid "If you click it, this decision will be delegated to the sites administrators."
858
  msgstr ""
859
 
860
+ #: templates/connect.php:368
861
  msgid "License issues?"
862
  msgstr ""
863
 
864
+ #: templates/connect.php:454
865
+ msgid "What permissions are being granted?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
866
  msgstr ""
867
 
868
+ #: templates/connect.php:448
869
  msgid "The %1$s will periodically send %2$s to %3$s for security & feature updates delivery, and license management."
870
  msgstr ""
871
 
872
+ #: templates/connect.php:450
873
  msgid "diagnostic data"
874
  msgstr ""
875
 
876
+ #: templates/connect.php:485
877
+ msgid "Have a license key?"
 
 
 
 
878
  msgstr ""
879
 
880
+ #: templates/connect.php:482
881
  msgid "Don't have a license key?"
882
  msgstr ""
883
 
884
+ #: templates/connect.php:493
 
 
 
 
885
  msgid "Privacy Policy"
886
  msgstr ""
887
 
888
+ #: templates/connect.php:495
889
  msgid "License Agreement"
890
  msgstr ""
891
 
892
+ #: templates/connect.php:495
893
  msgid "Terms of Service"
894
  msgstr ""
895
 
896
+ #: templates/connect.php:896
897
  msgctxt "as in the process of sending an email"
898
  msgid "Sending email"
899
  msgstr ""
900
 
901
+ #: templates/connect.php:897
902
  msgctxt "as activating plugin"
903
  msgid "Activating"
904
  msgstr ""
905
 
 
 
 
 
906
  #: templates/debug.php:17
907
  msgctxt "as turned off"
908
  msgid "Off"
922
  msgid "Debugging"
923
  msgstr ""
924
 
925
+ #: templates/debug.php:54, templates/debug.php:262, templates/debug.php:388, templates/debug.php:528
926
  msgid "Actions"
927
  msgstr ""
928
 
929
+ #: templates/debug.php:64
930
  msgid "Are you sure you want to delete all Freemius data?"
931
  msgstr ""
932
 
933
+ #: templates/debug.php:64
934
  msgid "Delete All Accounts"
935
  msgstr ""
936
 
937
+ #: templates/debug.php:71
938
  msgid "Clear API Cache"
939
  msgstr ""
940
 
941
+ #: templates/debug.php:79
942
  msgid "Clear Updates Transients"
943
  msgstr ""
944
 
945
+ #: templates/debug.php:88
946
+ msgid "Reset Deactivation Snoozing"
947
+ msgstr ""
948
+
949
+ #: templates/debug.php:96
950
  msgid "Sync Data From Server"
951
  msgstr ""
952
 
953
+ #: templates/debug.php:105
954
  msgid "Migrate Options to Network"
955
  msgstr ""
956
 
957
+ #: templates/debug.php:110
958
  msgid "Load DB Option"
959
  msgstr ""
960
 
961
+ #: templates/debug.php:113
962
  msgid "Set DB Option"
963
  msgstr ""
964
 
965
+ #: templates/debug.php:194
966
  msgid "Key"
967
  msgstr ""
968
 
969
+ #: templates/debug.php:195
970
  msgid "Value"
971
  msgstr ""
972
 
973
+ #: templates/debug.php:211
974
  msgctxt "as software development kit versions"
975
  msgid "SDK Versions"
976
  msgstr ""
977
 
978
+ #: templates/debug.php:216
979
  msgid "SDK Path"
980
  msgstr ""
981
 
982
+ #: templates/debug.php:217, templates/debug.php:256
983
  msgid "Module Path"
984
  msgstr ""
985
 
986
+ #: templates/debug.php:218
987
  msgid "Is Active"
988
  msgstr ""
989
 
990
+ #: templates/debug.php:246, templates/debug/plugins-themes-sync.php:35
991
  msgid "Plugins"
992
  msgstr ""
993
 
994
+ #: templates/debug.php:246, templates/debug/plugins-themes-sync.php:56
995
  msgid "Themes"
996
  msgstr ""
997
 
998
+ #: templates/debug.php:251, templates/debug.php:382, templates/debug.php:465, templates/debug/scheduled-crons.php:80
999
  msgid "Slug"
1000
  msgstr ""
1001
 
1002
+ #: templates/debug.php:253, templates/debug.php:464
1003
  msgid "Title"
1004
  msgstr ""
1005
 
1006
+ #: templates/debug.php:254
1007
  msgctxt "as application program interface"
1008
  msgid "API"
1009
  msgstr ""
1010
 
1011
+ #: templates/debug.php:255
1012
  msgid "Freemius State"
1013
  msgstr ""
1014
 
1015
+ #: templates/debug.php:259
1016
  msgid "Network Blog"
1017
  msgstr ""
1018
 
1019
+ #: templates/debug.php:260
1020
  msgid "Network User"
1021
  msgstr ""
1022
 
1023
+ #: templates/debug.php:297
1024
  msgctxt "as connection was successful"
1025
  msgid "Connected"
1026
  msgstr ""
1027
 
1028
+ #: templates/debug.php:298
1029
  msgctxt "as connection blocked"
1030
  msgid "Blocked"
1031
  msgstr ""
1032
 
1033
+ #: templates/debug.php:334
1034
  msgid "Simulate Trial Promotion"
1035
  msgstr ""
1036
 
1037
+ #: templates/debug.php:346
1038
  msgid "Simulate Network Upgrade"
1039
  msgstr ""
1040
 
1041
+ #. translators: %s: 'plugin' or 'theme'
1042
+ #: templates/debug.php:371
1043
  msgid "%s Installs"
1044
  msgstr ""
1045
 
1046
+ #: templates/debug.php:373
1047
  msgctxt "like websites"
1048
  msgid "Sites"
1049
  msgstr ""
1050
 
1051
+ #: templates/debug.php:379, templates/account/partials/site.php:156
1052
  msgid "Blog ID"
1053
  msgstr ""
1054
 
1055
+ #: templates/debug.php:384
1056
  msgid "License ID"
1057
  msgstr ""
1058
 
1059
+ #: templates/debug.php:445, templates/debug.php:551, templates/account/partials/addon.php:440
1060
  msgctxt "verb"
1061
  msgid "Delete"
1062
  msgstr ""
1063
 
1064
+ #: templates/debug.php:459
1065
  msgid "Add Ons of module %s"
1066
  msgstr ""
1067
 
1068
+ #: templates/debug.php:518
1069
  msgid "Users"
1070
  msgstr ""
1071
 
1072
+ #: templates/debug.php:525
1073
  msgid "Verified"
1074
  msgstr ""
1075
 
1076
+ #: templates/debug.php:567
1077
  msgid "%s Licenses"
1078
  msgstr ""
1079
 
1080
+ #: templates/debug.php:572
1081
  msgid "Plugin ID"
1082
  msgstr ""
1083
 
1084
+ #: templates/debug.php:574
1085
  msgid "Plan ID"
1086
  msgstr ""
1087
 
1088
+ #: templates/debug.php:575
1089
  msgid "Quota"
1090
  msgstr ""
1091
 
1092
+ #: templates/debug.php:576
1093
  msgid "Activated"
1094
  msgstr ""
1095
 
1096
+ #: templates/debug.php:577
1097
  msgid "Blocking"
1098
  msgstr ""
1099
 
1100
+ #: templates/debug.php:578, templates/debug.php:649, templates/debug/logger.php:22
1101
  msgid "Type"
1102
  msgstr ""
1103
 
1104
+ #: templates/debug.php:580
1105
  msgctxt "as expiration date"
1106
  msgid "Expiration"
1107
  msgstr ""
1108
 
1109
+ #: templates/debug.php:608
1110
  msgid "Debug Log"
1111
  msgstr ""
1112
 
1113
+ #: templates/debug.php:612
1114
  msgid "All Types"
1115
  msgstr ""
1116
 
1117
+ #: templates/debug.php:619
1118
  msgid "All Requests"
1119
  msgstr ""
1120
 
1121
+ #: templates/debug.php:624, templates/debug.php:653, templates/debug/logger.php:25
1122
  msgid "File"
1123
  msgstr ""
1124
 
1125
+ #: templates/debug.php:625, templates/debug.php:651, templates/debug/logger.php:23
1126
  msgid "Function"
1127
  msgstr ""
1128
 
1129
+ #: templates/debug.php:626
1130
  msgid "Process ID"
1131
  msgstr ""
1132
 
1133
+ #: templates/debug.php:627
1134
  msgid "Logger"
1135
  msgstr ""
1136
 
1137
+ #: templates/debug.php:628, templates/debug.php:652, templates/debug/logger.php:24
1138
  msgid "Message"
1139
  msgstr ""
1140
 
1141
+ #: templates/debug.php:630
1142
  msgid "Filter"
1143
  msgstr ""
1144
 
1145
+ #: templates/debug.php:638
1146
  msgid "Download"
1147
  msgstr ""
1148
 
1149
+ #: templates/debug.php:654, templates/debug/logger.php:26
1150
  msgid "Timestamp"
1151
  msgstr ""
1152
 
 
 
 
 
 
 
 
 
1153
  #: includes/debug/class-fs-debug-bar-panel.php:48, templates/debug/api-calls.php:54, templates/debug/logger.php:62
1154
  msgctxt "milliseconds"
1155
  msgid "ms"
1163
  msgid "Requests"
1164
  msgstr ""
1165
 
1166
+ #: includes/managers/class-fs-clone-manager.php:703
1167
+ msgid "Invalid clone resolution action."
1168
+ msgstr ""
1169
+
1170
+ #: includes/managers/class-fs-clone-manager.php:851
1171
+ msgid "products"
1172
+ msgstr ""
1173
+
1174
+ #: includes/managers/class-fs-clone-manager.php:1039
1175
+ msgid "The products below have been placed into safe mode because we noticed that %2$s is an exact copy of %3$s:%1$s"
1176
+ msgstr ""
1177
+
1178
+ #: includes/managers/class-fs-clone-manager.php:1040
1179
+ msgid "The products below have been placed into safe mode because we noticed that %2$s is an exact copy of these sites:%3$s%1$s"
1180
+ msgstr ""
1181
+
1182
+ #: includes/managers/class-fs-clone-manager.php:1033
1183
+ msgid "%1$s has been placed into safe mode because we noticed that %2$s is an exact copy of %3$s."
1184
+ msgstr ""
1185
+
1186
+ #: includes/managers/class-fs-clone-manager.php:1066
1187
+ msgid "the above-mentioned sites"
1188
+ msgstr ""
1189
+
1190
+ #: includes/managers/class-fs-clone-manager.php:1079
1191
+ msgid "Is %2$s a duplicate of %4$s?"
1192
+ msgstr ""
1193
+
1194
+ #: includes/managers/class-fs-clone-manager.php:1080
1195
+ msgid "Yes, %2$s is a duplicate of %4$s for the purpose of testing, staging, or development."
1196
+ msgstr ""
1197
+
1198
+ #: includes/managers/class-fs-clone-manager.php:1085
1199
+ msgid "Long-Term Duplicate"
1200
+ msgstr ""
1201
+
1202
+ #: includes/managers/class-fs-clone-manager.php:1090
1203
+ msgid "Duplicate Website"
1204
+ msgstr ""
1205
+
1206
+ #: includes/managers/class-fs-clone-manager.php:1096
1207
+ msgid "Is %2$s the new home of %4$s?"
1208
+ msgstr ""
1209
+
1210
+ #: includes/managers/class-fs-clone-manager.php:1098
1211
+ msgid "Yes, %%2$s is replacing %%4$s. I would like to migrate my %s from %%4$s to %%2$s."
1212
+ msgstr ""
1213
+
1214
+ #: includes/managers/class-fs-clone-manager.php:1099, templates/forms/subscription-cancellation.php:52
1215
+ msgid "license"
1216
+ msgstr ""
1217
+
1218
+ #: includes/managers/class-fs-clone-manager.php:1099
1219
+ msgid "data"
1220
+ msgstr ""
1221
+
1222
+ #: includes/managers/class-fs-clone-manager.php:1105
1223
+ msgid "Migrate License"
1224
+ msgstr ""
1225
+
1226
+ #: includes/managers/class-fs-clone-manager.php:1106
1227
+ msgid "Migrate"
1228
+ msgstr ""
1229
+
1230
+ #: includes/managers/class-fs-clone-manager.php:1112
1231
+ msgid "Is %2$s a new website?"
1232
+ msgstr ""
1233
+
1234
+ #: includes/managers/class-fs-clone-manager.php:1113
1235
+ msgid "Yes, %2$s is a new and different website that is separate from %4$s."
1236
+ msgstr ""
1237
+
1238
+ #: includes/managers/class-fs-clone-manager.php:1115
1239
+ msgid "It requires license activation."
1240
+ msgstr ""
1241
+
1242
+ #: includes/managers/class-fs-clone-manager.php:1122
1243
+ msgid "New Website"
1244
+ msgstr ""
1245
+
1246
+ #: includes/managers/class-fs-clone-manager.php:1145
1247
+ msgctxt "Clone resolution admin notice products list label"
1248
+ msgid "Products"
1249
+ msgstr ""
1250
+
1251
+ #: includes/managers/class-fs-clone-manager.php:1230
1252
+ msgid "You marked this website, %s, as a temporary duplicate of %s."
1253
+ msgstr ""
1254
+
1255
+ #: includes/managers/class-fs-clone-manager.php:1231
1256
+ msgid "You marked this website, %s, as a temporary duplicate of these sites"
1257
+ msgstr ""
1258
+
1259
+ #: includes/managers/class-fs-clone-manager.php:1245
1260
+ msgid "%s automatic security & feature updates and paid functionality will keep working without interruptions until %s (or when your license expires, whatever comes first)."
1261
+ msgstr ""
1262
+
1263
+ #: includes/managers/class-fs-clone-manager.php:1248
1264
+ msgctxt "\"The <product_label>\", e.g.: \"The plugin\""
1265
+ msgid "The %s's"
1266
+ msgstr ""
1267
+
1268
+ #: includes/managers/class-fs-clone-manager.php:1251
1269
+ msgid "The following products'"
1270
+ msgstr ""
1271
+
1272
+ #: includes/managers/class-fs-clone-manager.php:1259
1273
+ msgid "If this is a long term duplicate, to keep automatic updates and paid functionality after %s, please %s."
1274
+ msgstr ""
1275
+
1276
+ #: includes/managers/class-fs-clone-manager.php:1261
1277
+ msgid "activate a license here"
1278
+ msgstr ""
1279
+
1280
  #: templates/account/billing.php:22
1281
  msgctxt "verb"
1282
  msgid "Update"
1430
  msgid "Next"
1431
  msgstr ""
1432
 
1433
+ #: templates/forms/affiliation.php:83
1434
  msgid "Non-expiring"
1435
  msgstr ""
1436
 
1437
+ #: templates/forms/affiliation.php:86
1438
  msgid "Apply to become an affiliate"
1439
  msgstr ""
1440
 
1441
+ #: templates/forms/affiliation.php:132
1442
+ msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
1443
  msgstr ""
1444
 
1445
+ #: templates/forms/affiliation.php:129
1446
+ msgid "Thank you for applying for our affiliate program, unfortunately, we've decided at this point to reject your application. Please try again in 30 days."
1447
  msgstr ""
1448
 
1449
+ #: templates/forms/affiliation.php:126
1450
  msgid "Your affiliation account was temporarily suspended."
1451
  msgstr ""
1452
 
1453
+ #: templates/forms/affiliation.php:123
1454
+ msgid "Thank you for applying for our affiliate program, we'll review your details during the next 14 days and will get back to you with further information."
1455
  msgstr ""
1456
 
1457
+ #: templates/forms/affiliation.php:108
1458
+ msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
1459
  msgstr ""
1460
 
1461
+ #: templates/forms/affiliation.php:145
1462
  msgid "Like the %s? Become our ambassador and earn cash ;-)"
1463
  msgstr ""
1464
 
1465
+ #: templates/forms/affiliation.php:146
1466
  msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
1467
  msgstr ""
1468
 
1469
+ #: templates/forms/affiliation.php:149
1470
  msgid "Program Summary"
1471
  msgstr ""
1472
 
1473
+ #: templates/forms/affiliation.php:151
1474
  msgid "%s commission when a customer purchases a new license."
1475
  msgstr ""
1476
 
1477
+ #: templates/forms/affiliation.php:153
1478
  msgid "Get commission for automated subscription renewals."
1479
  msgstr ""
1480
 
1481
+ #: templates/forms/affiliation.php:156
1482
  msgid "%s tracking cookie after the first visit to maximize earnings potential."
1483
  msgstr ""
1484
 
1485
+ #: templates/forms/affiliation.php:159
1486
  msgid "Unlimited commissions."
1487
  msgstr ""
1488
 
1489
+ #: templates/forms/affiliation.php:161
1490
  msgid "%s minimum payout amount."
1491
  msgstr ""
1492
 
1493
+ #: templates/forms/affiliation.php:162
1494
  msgid "Payouts are in USD and processed monthly via PayPal."
1495
  msgstr ""
1496
 
1497
+ #: templates/forms/affiliation.php:163
1498
  msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
1499
  msgstr ""
1500
 
1501
+ #: templates/forms/affiliation.php:166
1502
  msgid "Affiliate"
1503
  msgstr ""
1504
 
1505
+ #: templates/forms/affiliation.php:169, templates/forms/resend-key.php:23
1506
  msgid "Email address"
1507
  msgstr ""
1508
 
1509
+ #: templates/forms/affiliation.php:173
1510
  msgid "Full name"
1511
  msgstr ""
1512
 
1513
+ #: templates/forms/affiliation.php:177
1514
  msgid "PayPal account email address"
1515
  msgstr ""
1516
 
1517
+ #: templates/forms/affiliation.php:181
1518
  msgid "Where are you going to promote the %s?"
1519
  msgstr ""
1520
 
1521
+ #: templates/forms/affiliation.php:183
1522
  msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
1523
  msgstr ""
1524
 
1525
+ #: templates/forms/affiliation.php:185
1526
  msgid "Add another domain"
1527
  msgstr ""
1528
 
1529
+ #: templates/forms/affiliation.php:189
1530
  msgid "Extra Domains"
1531
  msgstr ""
1532
 
1533
+ #: templates/forms/affiliation.php:190
1534
  msgid "Extra domains where you will be marketing the product from."
1535
  msgstr ""
1536
 
1537
+ #: templates/forms/affiliation.php:200
1538
  msgid "Promotion methods"
1539
  msgstr ""
1540
 
1541
+ #: templates/forms/affiliation.php:203
1542
  msgid "Social media (Facebook, Twitter, etc.)"
1543
  msgstr ""
1544
 
1545
+ #: templates/forms/affiliation.php:207
1546
  msgid "Mobile apps"
1547
  msgstr ""
1548
 
1549
+ #: templates/forms/affiliation.php:211
1550
  msgid "Website, email, and social media statistics (optional)"
1551
  msgstr ""
1552
 
1553
+ #: templates/forms/affiliation.php:214
1554
  msgid "Please feel free to provide any relevant website or social media statistics, e.g. monthly unique site visits, number of email subscribers, followers, etc. (we will keep this information confidential)."
1555
  msgstr ""
1556
 
1557
+ #: templates/forms/affiliation.php:218
1558
  msgid "How will you promote us?"
1559
  msgstr ""
1560
 
1561
+ #: templates/forms/affiliation.php:221
1562
  msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
1563
  msgstr ""
1564
 
1565
+ #: templates/forms/affiliation.php:233, templates/forms/resend-key.php:22
1566
  msgid "Cancel"
1567
  msgstr ""
1568
 
1569
+ #: templates/forms/affiliation.php:235
1570
  msgid "Become an affiliate"
1571
  msgstr ""
1572
 
1586
  msgid "User key"
1587
  msgstr ""
1588
 
1589
+ #: templates/forms/data-debug-mode.php:162
1590
+ msgid "An unknown error has occurred."
1591
+ msgstr ""
1592
+
1593
+ #: templates/forms/email-address-update.php:32
1594
+ msgid "Email address update"
1595
+ msgstr ""
1596
+
1597
+ #: templates/forms/email-address-update.php:33, templates/forms/user-change.php:81
1598
+ msgctxt "close window"
1599
+ msgid "Dismiss"
1600
+ msgstr ""
1601
+
1602
+ #: templates/forms/email-address-update.php:38
1603
+ msgid "Enter the new email address"
1604
+ msgstr ""
1605
+
1606
+ #: templates/forms/email-address-update.php:42
1607
+ msgid "Are both %s and %s your email addresses?"
1608
+ msgstr ""
1609
+
1610
+ #: templates/forms/email-address-update.php:50
1611
+ msgid "Yes - both addresses are mine"
1612
+ msgstr ""
1613
+
1614
+ #: templates/forms/email-address-update.php:57
1615
+ msgid "%s is my client's email address"
1616
+ msgstr ""
1617
+
1618
+ #: templates/forms/email-address-update.php:66
1619
+ msgid "%s is my email address"
1620
+ msgstr ""
1621
+
1622
+ #: templates/forms/email-address-update.php:75
1623
+ msgid "Would you like to merge %s into %s?"
1624
+ msgstr ""
1625
+
1626
+ #: templates/forms/email-address-update.php:84
1627
+ msgid "Yes - move all my data and assets from %s to %s"
1628
+ msgstr ""
1629
+
1630
+ #: templates/forms/email-address-update.php:94
1631
+ msgid "No - only move this site's data to %s"
1632
+ msgstr ""
1633
+
1634
+ #: templates/forms/email-address-update.php:292, templates/forms/email-address-update.php:298
1635
+ msgid "Update"
1636
+ msgstr ""
1637
+
1638
  #: templates/forms/license-activation.php:23
1639
  msgid "Please enter the license key that you received in the email right after the purchase:"
1640
  msgstr ""
1647
  msgid "The %1$s will be periodically sending data to %2$s to check for security and feature updates, and verify the validity of your license."
1648
  msgstr ""
1649
 
1650
+ #: templates/forms/license-activation.php:211
1651
  msgid "Associate with the license owner's account."
1652
  msgstr ""
1653
 
1661
  msgid "Opt In"
1662
  msgstr ""
1663
 
1664
+ #: templates/forms/optout.php:41
1665
+ msgid "We appreciate your help in making the %s better by letting us track some usage data."
1666
+ msgstr ""
1667
+
1668
+ #: templates/forms/optout.php:44
1669
+ msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking."
1670
+ msgstr ""
1671
+
1672
+ #: templates/forms/optout.php:45
1673
+ msgid "On second thought - I want to continue helping"
1674
+ msgstr ""
1675
+
1676
  #: templates/forms/optout.php:34
1677
  msgid "Connectivity to the licensing engine was successfully re-established. Automatic security & feature updates are now available through the WP Admin Dashboard."
1678
  msgstr ""
1689
  msgid "I'd like to keep automatic updates"
1690
  msgstr ""
1691
 
 
 
 
 
 
 
 
 
1692
  #: templates/forms/optout.php:49
1693
  msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
1694
  msgstr ""
1709
  msgid " %s to access version %s security & feature updates, and support."
1710
  msgstr ""
1711
 
1712
+ #: templates/forms/premium-versions-upgrade-handler.php:46
1713
+ msgid "Renew your license now"
1714
+ msgstr ""
1715
+
1716
+ #: templates/forms/premium-versions-upgrade-handler.php:47
1717
+ msgid "Buy a license now"
1718
+ msgstr ""
1719
+
1720
  #: templates/forms/premium-versions-upgrade-handler.php:54
1721
  msgid "New Version Available"
1722
  msgstr ""
1730
  msgid "Send License Key"
1731
  msgstr ""
1732
 
1733
+ #: templates/forms/resend-key.php:24, templates/forms/user-change.php:29
1734
+ msgid "Other"
1735
+ msgstr ""
1736
+
1737
+ #: templates/forms/resend-key.php:58
1738
+ msgid "Enter the email address you've used during the purchase and we will resend you the license key."
1739
+ msgstr ""
1740
+
1741
+ #: templates/forms/resend-key.php:59
1742
  msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
1743
  msgstr ""
1744
 
1750
  msgid "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
1751
  msgstr ""
1752
 
 
 
 
 
1753
  #: templates/forms/subscription-cancellation.php:57
1754
  msgid "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
1755
  msgstr ""
1770
  msgid "Proceed"
1771
  msgstr ""
1772
 
1773
+ #: templates/forms/subscription-cancellation.php:191, templates/forms/deactivation/form.php:216
1774
  msgid "Cancel %s & Proceed"
1775
  msgstr ""
1776
 
1777
+ #. translators: %1$s: Number of trial days; %2$s: Plan name;
1778
  #: templates/forms/trial-start.php:22
1779
  msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
1780
  msgstr ""
1781
 
1782
+ #. translators: %s: Link to freemius.com
1783
  #: templates/forms/trial-start.php:28
1784
  msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt in with your user and non-sensitive site information, allowing the %s to periodically send data to %s to check for version updates and to validate your trial."
1785
  msgstr ""
1786
 
1787
+ #: templates/forms/trial-start.php:53
1788
+ msgctxt "call to action"
1789
+ msgid "Start free trial"
1790
+ msgstr ""
1791
+
1792
  #: templates/forms/user-change.php:26
1793
  msgid "By changing the user, you agree to transfer the account ownership to:"
1794
  msgstr ""
1801
  msgid "Enter email address"
1802
  msgstr ""
1803
 
1804
+ #: templates/partials/network-activation.php:36
1805
+ msgid "Activate license on all pending sites."
 
 
 
 
 
1806
  msgstr ""
1807
 
1808
+ #: templates/partials/network-activation.php:37
1809
+ msgid "Apply on all pending sites."
1810
  msgstr ""
1811
 
1812
+ #: templates/partials/network-activation.php:32
1813
  msgid "Activate license on all sites in the network."
1814
  msgstr ""
1815
 
1816
+ #: templates/partials/network-activation.php:33
1817
  msgid "Apply on all sites in the network."
1818
  msgstr ""
1819
 
1820
+ #: templates/partials/network-activation.php:45, templates/partials/network-activation.php:79
 
 
 
 
 
 
 
 
1821
  msgid "allow"
1822
  msgstr ""
1823
 
1824
+ #: templates/partials/network-activation.php:48, templates/partials/network-activation.php:82
1825
  msgid "delegate"
1826
  msgstr ""
1827
 
1828
+ #: templates/partials/network-activation.php:52, templates/partials/network-activation.php:86
1829
  msgid "skip"
1830
  msgstr ""
1831
 
1833
  msgid "Click to view full-size screenshot %d"
1834
  msgstr ""
1835
 
1836
+ #: templates/plugin-info/features.php:43
1837
+ msgid "Support"
1838
+ msgstr ""
1839
+
1840
  #: templates/plugin-info/features.php:56
1841
  msgid "Unlimited Updates"
1842
  msgstr ""
1855
  msgstr ""
1856
 
1857
  #. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
1858
+ #: templates/account/partials/addon.php:34
1859
  msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
1860
  msgstr ""
1861
 
1862
+ #: templates/account/partials/addon.php:200
1863
+ msgid "No expiration"
1864
+ msgstr ""
1865
+
1866
+ #: templates/account/partials/addon.php:190
1867
  msgid "Cancelled"
1868
  msgstr ""
1869
 
1870
+ #: templates/account/partials/site.php:49, templates/account/partials/site.php:169
1871
+ msgid "Opt In"
1872
+ msgstr ""
1873
+
1874
+ #: templates/account/partials/site.php:169
1875
+ msgid "Opt Out"
1876
  msgstr ""
1877
 
1878
  #: templates/account/partials/site.php:189
1899
  msgid "Contact Support"
1900
  msgstr ""
1901
 
1902
+ #: templates/forms/deactivation/form.php:65
1903
  msgid "Anonymous feedback"
1904
  msgstr ""
1905
 
1906
+ #: templates/forms/deactivation/form.php:71
1907
+ msgid "hour"
1908
+ msgstr ""
1909
+
1910
+ #: templates/forms/deactivation/form.php:76
1911
+ msgid "hours"
1912
+ msgstr ""
1913
+
1914
+ #: templates/forms/deactivation/form.php:81, templates/forms/deactivation/form.php:86
1915
+ msgid "days"
1916
+ msgstr ""
1917
+
1918
+ #: templates/forms/deactivation/form.php:106
1919
  msgid "Deactivate"
1920
  msgstr ""
1921
 
1922
+ #: templates/forms/deactivation/form.php:108
1923
  msgid "Activate %s"
1924
  msgstr ""
1925
 
1926
+ #: templates/forms/deactivation/form.php:111
1927
+ msgid "Submit & %s"
1928
+ msgstr ""
1929
+
1930
+ #: templates/forms/deactivation/form.php:130
1931
  msgid "Quick Feedback"
1932
  msgstr ""
1933
 
1934
+ #: templates/forms/deactivation/form.php:134
1935
  msgid "If you have a moment, please let us know why you are %s"
1936
  msgstr ""
1937
 
1938
+ #: templates/forms/deactivation/form.php:134
1939
  msgid "deactivating"
1940
  msgstr ""
1941
 
1942
+ #: templates/forms/deactivation/form.php:134
1943
  msgid "switching"
1944
  msgstr ""
1945
 
1946
+ #: templates/forms/deactivation/form.php:448
1947
+ msgid "Kindly tell us the reason so we can improve."
1948
  msgstr ""
1949
 
1950
+ #: templates/forms/deactivation/form.php:478
1951
+ msgid "Snooze & %s"
1952
  msgstr ""
1953
 
1954
+ #: templates/forms/deactivation/form.php:638
1955
  msgid "Yes - %s"
1956
  msgstr ""
1957
 
1958
+ #: templates/forms/deactivation/form.php:645
1959
  msgid "Skip & %s"
1960
  msgstr ""
1961
 
provider/freemius/package.json CHANGED
@@ -4,7 +4,7 @@
4
  "author": "Freemius, Inc.",
5
  "license": "GPL-3.0",
6
  "homepage": "https://freemius.com",
7
- "version": "2.4.2",
8
  "main": "gulpfile.js",
9
  "dependencies": {},
10
  "scripts": {
4
  "author": "Freemius, Inc.",
5
  "license": "GPL-3.0",
6
  "homepage": "https://freemius.com",
7
+ "version": "2.4.3",
8
  "main": "gulpfile.js",
9
  "dependencies": {},
10
  "scripts": {
provider/freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '2.4.3';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '2.4.5';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
provider/functions_wordpress.class.php CHANGED
@@ -1928,7 +1928,6 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1928
  $categoryExcludeChildren = UniteFunctionsUC::strToBool($categoryExcludeChildren);
1929
 
1930
  $arrTax = self::getPosts_getTaxQuery($category, $categoryRelation, $categoryIncludeChildren, $excludeCategory, $categoryExcludeChildren);
1931
-
1932
 
1933
  if($isTaxonly === true){
1934
  if(!empty($arrTax)){
@@ -3025,6 +3024,28 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
3025
 
3026
  public static function a___________OTHER_FUNCTIONS__________(){}
3027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3028
  /**
3029
  * get queried object by type
3030
  * fill the empty objects by default objects
1928
  $categoryExcludeChildren = UniteFunctionsUC::strToBool($categoryExcludeChildren);
1929
 
1930
  $arrTax = self::getPosts_getTaxQuery($category, $categoryRelation, $categoryIncludeChildren, $excludeCategory, $categoryExcludeChildren);
 
1931
 
1932
  if($isTaxonly === true){
1933
  if(!empty($arrTax)){
3024
 
3025
  public static function a___________OTHER_FUNCTIONS__________(){}
3026
 
3027
+ /**
3028
+ * get install plugin slug
3029
+ */
3030
+ public static function getInstallPluginLink($slug){
3031
+
3032
+ $action = 'install-plugin';
3033
+ $slug = 'doubly';
3034
+ $urlInstall = wp_nonce_url(
3035
+ add_query_arg(
3036
+ array(
3037
+ 'action' => $action,
3038
+ 'plugin' => $slug
3039
+ ),
3040
+ admin_url( 'update.php' )
3041
+ ),
3042
+ $action.'_'.$slug
3043
+ );
3044
+
3045
+ return($urlInstall);
3046
+ }
3047
+
3048
+
3049
  /**
3050
  * get queried object by type
3051
  * fill the empty objects by default objects
provider/integrations.class.php CHANGED
@@ -22,7 +22,7 @@ class UniteCreatorPluginIntegrations{
22
  */
23
  public static function isWPPopularPostsExists(){
24
 
25
- $isExists = defined("WPP_VERSION") && defined("WPP_MIN_PHP_VERSION");
26
 
27
  return($isExists);
28
  }
@@ -53,6 +53,9 @@ class UniteCreatorPluginIntegrations{
53
  if(is_array($cat))
54
  $cat = $cat[0];
55
 
 
 
 
56
  $params = array();
57
  $params["post_type"] = $postType;
58
  $params["limit"] = $limit;
22
  */
23
  public static function isWPPopularPostsExists(){
24
 
25
+ $isExists = defined("WPP_VERSION");
26
 
27
  return($isExists);
28
  }
53
  if(is_array($cat))
54
  $cat = $cat[0];
55
 
56
+ if($cat == "all")
57
+ $cat = null;
58
+
59
  $params = array();
60
  $params["post_type"] = $postType;
61
  $params["limit"] = $limit;
provider/provider_functions.class.php CHANGED
@@ -585,15 +585,27 @@ class UniteProviderFunctionsUC{
585
  return($nonce);
586
  }
587
 
 
588
  /**
589
  * veryfy nonce
590
  */
591
  public static function verifyNonce($nonce){
592
 
 
 
 
 
 
 
 
 
 
 
 
593
  $verified = wp_verify_nonce($nonce, GlobalsUC::PLUGIN_NAME."_actions");
594
  if($verified == false)
595
  UniteFunctionsUC::throwError("Action security failed, please refresh the page and try again.");
596
-
597
  }
598
 
599
 
585
  return($nonce);
586
  }
587
 
588
+
589
  /**
590
  * veryfy nonce
591
  */
592
  public static function verifyNonce($nonce){
593
 
594
+
595
+ if(function_exists("wp_verify_nonce") == false){
596
+
597
+ dmp("verify nonce function not found. some other plugin interrupting this call");
598
+ dmp("please find it in this trace by follow 'wp-content/plugins'");
599
+
600
+ UniteFunctionsUC::showTrace();
601
+ exit();
602
+ }
603
+
604
+
605
  $verified = wp_verify_nonce($nonce, GlobalsUC::PLUGIN_NAME."_actions");
606
  if($verified == false)
607
  UniteFunctionsUC::throwError("Action security failed, please refresh the page and try again.");
608
+
609
  }
610
 
611
 
provider/provider_helper.class.php CHANGED
@@ -406,6 +406,7 @@ class HelperProviderUC{
406
  $showPHPError = HelperProviderCoreUC_EL::getGeneralSetting("show_php_error");
407
  $showPHPError = UniteFunctionsUC::strToBool($showPHPError);
408
 
 
409
  if($showPHPError == true)
410
  add_filter("wp_php_error_message", array("HelperProviderUC","onPHPErrorMessage"),100,2);
411
 
406
  $showPHPError = HelperProviderCoreUC_EL::getGeneralSetting("show_php_error");
407
  $showPHPError = UniteFunctionsUC::strToBool($showPHPError);
408
 
409
+
410
  if($showPHPError == true)
411
  add_filter("wp_php_error_message", array("HelperProviderUC","onPHPErrorMessage"),100,2);
412
 
provider/provider_params_processor.class.php CHANGED
@@ -9,6 +9,8 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
9
 
10
  class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
11
 
 
 
12
  private static $arrPostTypeTaxCache = array();
13
 
14
 
@@ -349,6 +351,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
349
 
350
  protected function z_______________POSTS____________(){}
351
 
 
352
  /**
353
  * show meta debug if needed
354
  */
@@ -946,7 +949,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
946
 
947
  $metaField = UniteFunctionsUC::getVal($value, "{$name}_include_date_meta");
948
  $metaField = trim($metaField);
949
-
 
 
 
 
 
950
  $arrDateQuery = array();
951
  $arrMetaQuery = array();
952
 
@@ -967,8 +975,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
967
  case "this_day":
968
 
969
  if(!empty($metaField)){
970
- $afterMeta = date('Ymd');
971
- $beforeMeta = date('Ymd');
972
  }else{
973
 
974
  $year = date("Y");
@@ -982,7 +990,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
982
  case "past_from_today":
983
 
984
  if(!empty($metaField)){
985
- $beforeMeta = date('Ymd');
986
  }else{
987
 
988
  $before = "tomorrow";
@@ -994,7 +1002,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
994
  case "past_from_yesterday":
995
 
996
  if(!empty($metaField)){
997
- $beforeMeta = date('Ymd',strtotime('-1 day'));
998
  }else{
999
 
1000
  $before = "today";
@@ -1035,8 +1043,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1035
 
1036
  if(!empty($metaField)){
1037
 
1038
- $afterMeta = date('Ymd',strtotime('first day of +1 month'));
1039
- $beforeMeta = date('Ymd',strtotime('last day of +1 month'));
1040
  }else{
1041
 
1042
  $time = strtotime('first day of +1 month');
@@ -1049,7 +1057,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1049
  case "future":
1050
 
1051
  if(!empty($metaField)){
1052
- $afterMeta = date('Ymd');
1053
  }else{
1054
 
1055
  $after = "today";
@@ -1062,7 +1070,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1062
 
1063
  if(!empty($metaField)){
1064
 
1065
- $afterMeta = date('Ymd',strtotime('+1 day'));
1066
  }else{
1067
 
1068
  $after = "today";
@@ -1086,7 +1094,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1086
  if(!empty($metaField)){
1087
 
1088
  if(!empty($after) && empty($afterMeta)){
1089
- $afterMeta = date("Ymd", strtotime($after));
1090
  }
1091
 
1092
  if(!empty($afterMeta))
@@ -1097,7 +1105,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1097
  );
1098
 
1099
  if(!empty($before) && empty($beforeMeta))
1100
- $beforeMeta = date("Ymd", strtotime($before));
1101
 
1102
  if(!empty($beforeMeta))
1103
  $arrMetaQuery[] = array(
@@ -1152,6 +1160,9 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1152
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
1153
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
1154
 
 
 
 
1155
  $debugType = null;
1156
  if($showDebugQuery == true)
1157
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
@@ -1160,6 +1171,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1160
 
1161
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
1162
  $isForWoo = UniteFunctionsUC::strToBool($isForWoo);
 
 
 
 
 
 
1163
 
1164
  //enable filters
1165
 
@@ -1193,6 +1210,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1193
  $filters["posttype"] = $postType;
1194
 
1195
  $post = null;
 
1196
 
1197
  if($isRelatedPosts == true){
1198
 
@@ -1246,12 +1264,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1246
  $filters["exclude_current_post"] = true;
1247
  }
1248
 
1249
- }else{
1250
 
1251
  $category = UniteFunctionsUC::getVal($value, "{$name}_category");
1252
-
1253
  if(!empty($category))
1254
- $filters["category"] = UniteFunctionsUC::getVal($value, "{$name}_category");
1255
 
1256
  $relation = UniteFunctionsUC::getVal($value, "{$name}_category_relation");
1257
 
@@ -1382,6 +1400,32 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1382
  if(!empty($arrExcludeTerms))
1383
  $filters["exclude_category"] = $arrExcludeTerms;
1384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1385
  $filters["limit"] = $limit;
1386
 
1387
  $filters = $this->getPostListData_addOrderBy($filters, $value, $name);
@@ -1464,10 +1508,6 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1464
  }
1465
 
1466
 
1467
- //add the include by
1468
- $arrIncludeBy = UniteFunctionsUC::getVal($value, "{$name}_includeby");
1469
- if(empty($arrIncludeBy))
1470
- $arrIncludeBy = array();
1471
 
1472
  $args["ignore_sticky_posts"] = true;
1473
 
@@ -1485,11 +1525,13 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1485
  $arrIDsPostMeta = array();
1486
  $arrIDsDynamicField = array();
1487
  $arrIDsFromContent = array();
 
1488
 
1489
  $currentTaxQuery = null;
1490
 
1491
  $makePostINOrder = false;
1492
 
 
1493
  foreach($arrIncludeBy as $includeby){
1494
 
1495
  switch($includeby){
@@ -1739,9 +1781,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1739
  "limit"=>$limit,
1740
  "range"=>$wppRange
1741
  );
 
1742
  if(!empty($category))
1743
  $wpp_args["cat"] = $category;
1744
-
1745
  $response = $objIntegrations->WPP_getPopularPosts($wpp_args, $showDebugQuery);
1746
 
1747
  $arrIDsPopular = UniteFunctionsUC::getVal($response, "post_ids");
@@ -1859,7 +1902,6 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1859
  $objWoo = new UniteCreatorWooIntegrate();
1860
  $arrRelatedProductIDs = $objWoo->getRelatedProductsFromCart($limit, $arrPostsNotIn);
1861
 
1862
-
1863
  }else{
1864
 
1865
  $arrRelatedProductIDs = wc_get_related_products($productID, $limit, $arrPostsNotIn);
@@ -2159,13 +2201,13 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2159
  $orderByMetaKey = UniteFunctionsUC::getVal($value, $name."_orderby_meta_key1");
2160
 
2161
  $maxItems = UniteFunctionsUC::getVal($value, $name."_maxitems_current");
2162
-
2163
  //enable filters
2164
  $isFilterable = $this->getIsFilterable($value, $name);
2165
 
2166
  if($orderBy == "default")
2167
  $orderBy = null;
2168
-
2169
  if($orderDir == "default")
2170
  $orderDir = null;
2171
 
@@ -2202,7 +2244,9 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2202
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
2203
 
2204
  $debugType = null;
2205
-
 
 
2206
 
2207
  $isForWoo = false;
2208
  if($showDebugQuery == true){
@@ -2232,7 +2276,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2232
  GlobalsProviderUC::$lastQueryArgs = $wp_query->query_vars;
2233
 
2234
  //remake the query - not inside ajax
2235
-
2236
  if($currentQueryVars !== $wp_query->query_vars){
2237
 
2238
  //dmp($currentQueryVars);exit();
@@ -2288,8 +2332,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2288
  $this->showPostsDebugCallbacks($isForWoo);
2289
 
2290
  }
2291
-
2292
-
2293
  if($showDebugQuery == true){
2294
  dmp("Found Posts: ".count($arrPosts));
2295
 
@@ -2447,6 +2491,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2447
  break;
2448
  }
2449
 
 
 
 
 
 
 
2450
 
2451
  if(empty($arrPosts))
2452
  $arrPosts = array();
@@ -3238,8 +3288,15 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3238
  if(!empty($parentName2))
3239
  $attributes .= " data-parentid2='$parentName2'";
3240
  }
 
 
 
 
3241
 
 
 
3242
 
 
3243
  $arrOutput = array();
3244
  $arrOutput["attributes"] = $attributes;
3245
 
@@ -3467,7 +3524,6 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3467
  */
3468
  private function modifyMultisourceItems_getFields($arrValues, $namePosts){
3469
 
3470
-
3471
  $arrFields = array();
3472
 
3473
  foreach($arrValues as $key => $value){
@@ -3486,23 +3542,146 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3486
  }
3487
 
3488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3489
  /**
3490
  * modify multisource posts items
3491
  */
3492
- private function modifyMultisourceItems_posts($arrPosts, $namePosts, $arrValues){
3493
 
 
 
 
3494
  $arrFields = $this->modifyMultisourceItems_getFields($arrValues, $namePosts);
3495
 
3496
- dmp("modify multisource posts items");
3497
 
3498
- dmp($arrFields);
3499
-
3500
- dmp($namePosts);
3501
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3502
 
3503
- UniteFunctionsUC::throwError("multisource - posts not ready yet :(");
3504
 
3505
- return($arrPosts);
3506
  }
3507
 
3508
 
@@ -3524,7 +3703,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3524
  case "posts":
3525
 
3526
  $paramPosts = $param;
3527
- $namePosts = $name."_post";
3528
 
3529
  $paramPosts["name"] = $namePosts;
3530
  $paramPosts["name_listing"] = $name;
@@ -3534,8 +3713,16 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3534
 
3535
  $arrPosts = UniteFunctionsUC::getVal($dataResponse, $name."_items");
3536
 
3537
- $response = $this->modifyMultisourceItems_posts($arrPosts, $namePosts, $value);
3538
-
 
 
 
 
 
 
 
 
3539
  break;
3540
  default:
3541
  UniteFunctionsUC::throwError("Wrong multisource source: $itemsSource");
@@ -3543,7 +3730,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3543
  }
3544
 
3545
  $data[$name] = $response;
3546
-
3547
  return($data);
3548
  }
3549
 
@@ -3642,7 +3829,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3642
  $params["meta_key"] = $metaKey;
3643
  }
3644
  }
3645
-
3646
  $arrTerms = UniteFunctionsWPUC::getTerms($taxonomy, $orderBy, $orderDir, $isHide, $arrExcludeSlugs, $params);
3647
 
3648
  if($showDebug == true){
@@ -4234,11 +4421,11 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4234
  /**
4235
  * get post filter options
4236
  */
4237
- private function modifyData_postFilterOptions($data){
4238
 
4239
  $objFilters = new UniteCreatorFiltersProcess();
4240
 
4241
- $data = $objFilters->addEditorFilterArguments($data);
4242
 
4243
  return($data);
4244
  }
@@ -4250,13 +4437,14 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4250
  protected function modifyDataBySpecialAddonBehaviour($data){
4251
 
4252
  $special = $this->addon->getOption("special");
 
4253
 
4254
  if(empty($special))
4255
  return($data);
4256
 
4257
  switch($special){
4258
  case "post_filter":
4259
- $data = $this->modifyData_postFilterOptions($data);
4260
  break;
4261
  }
4262
 
9
 
10
  class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
11
 
12
+ const SHOW_DEBUG_QUERY = false;
13
+
14
  private static $arrPostTypeTaxCache = array();
15
 
16
 
351
 
352
  protected function z_______________POSTS____________(){}
353
 
354
+
355
  /**
356
  * show meta debug if needed
357
  */
949
 
950
  $metaField = UniteFunctionsUC::getVal($value, "{$name}_include_date_meta");
951
  $metaField = trim($metaField);
952
+
953
+ $metaFormat = UniteFunctionsUC::getVal($value, "{$name}_include_date_meta_format");
954
+
955
+ if(empty($metaFormat))
956
+ $metaFormat = "Ymd";
957
+
958
  $arrDateQuery = array();
959
  $arrMetaQuery = array();
960
 
975
  case "this_day":
976
 
977
  if(!empty($metaField)){
978
+ $afterMeta = date($metaFormat);
979
+ $beforeMeta = date($metaFormat);
980
  }else{
981
 
982
  $year = date("Y");
990
  case "past_from_today":
991
 
992
  if(!empty($metaField)){
993
+ $beforeMeta = date($metaFormat);
994
  }else{
995
 
996
  $before = "tomorrow";
1002
  case "past_from_yesterday":
1003
 
1004
  if(!empty($metaField)){
1005
+ $beforeMeta = date($metaFormat,strtotime('-1 day'));
1006
  }else{
1007
 
1008
  $before = "today";
1043
 
1044
  if(!empty($metaField)){
1045
 
1046
+ $afterMeta = date($metaFormat,strtotime('first day of +1 month'));
1047
+ $beforeMeta = date($metaFormat,strtotime('last day of +1 month'));
1048
  }else{
1049
 
1050
  $time = strtotime('first day of +1 month');
1057
  case "future":
1058
 
1059
  if(!empty($metaField)){
1060
+ $afterMeta = date($metaFormat);
1061
  }else{
1062
 
1063
  $after = "today";
1070
 
1071
  if(!empty($metaField)){
1072
 
1073
+ $afterMeta = date($metaFormat,strtotime('+1 day'));
1074
  }else{
1075
 
1076
  $after = "today";
1094
  if(!empty($metaField)){
1095
 
1096
  if(!empty($after) && empty($afterMeta)){
1097
+ $afterMeta = date($metaFormat, strtotime($after));
1098
  }
1099
 
1100
  if(!empty($afterMeta))
1105
  );
1106
 
1107
  if(!empty($before) && empty($beforeMeta))
1108
+ $beforeMeta = date($metaFormat, strtotime($before));
1109
 
1110
  if(!empty($beforeMeta))
1111
  $arrMetaQuery[] = array(
1160
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
1161
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
1162
 
1163
+ if(self::SHOW_DEBUG_QUERY == true)
1164
+ $showDebugQuery = true;
1165
+
1166
  $debugType = null;
1167
  if($showDebugQuery == true)
1168
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
1171
 
1172
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
1173
  $isForWoo = UniteFunctionsUC::strToBool($isForWoo);
1174
+
1175
+ //add the include by
1176
+ $arrIncludeBy = UniteFunctionsUC::getVal($value, "{$name}_includeby");
1177
+ if(empty($arrIncludeBy))
1178
+ $arrIncludeBy = array();
1179
+
1180
 
1181
  //enable filters
1182
 
1210
  $filters["posttype"] = $postType;
1211
 
1212
  $post = null;
1213
+ $category = null;
1214
 
1215
  if($isRelatedPosts == true){
1216
 
1264
  $filters["exclude_current_post"] = true;
1265
  }
1266
 
1267
+ }else{ //if not related posts
1268
 
1269
  $category = UniteFunctionsUC::getVal($value, "{$name}_category");
1270
+
1271
  if(!empty($category))
1272
+ $filters["category"] = $category;
1273
 
1274
  $relation = UniteFunctionsUC::getVal($value, "{$name}_category_relation");
1275
 
1400
  if(!empty($arrExcludeTerms))
1401
  $filters["exclude_category"] = $arrExcludeTerms;
1402
 
1403
+ //includeby before filters
1404
+ foreach($arrIncludeBy as $includeby){
1405
+
1406
+ switch($includeby){
1407
+ case "terms_from_dynamic":
1408
+
1409
+ $strTermIDs = UniteFunctionsUC::getVal($value, $name."_includeby_dynamic_field");
1410
+
1411
+ $arrTermIDs = UniteFunctionsUC::getIDsArray($strTermIDs);
1412
+
1413
+ if(!empty($arrTermIDs)){
1414
+ if(empty($category))
1415
+ $category = array();
1416
+
1417
+ $category = array_merge($arrTermIDs, $category);
1418
+ $category = array_unique($category);
1419
+
1420
+ $filters["category"] = $category;
1421
+ }
1422
+
1423
+ break;
1424
+ }
1425
+
1426
+ }
1427
+
1428
+
1429
  $filters["limit"] = $limit;
1430
 
1431
  $filters = $this->getPostListData_addOrderBy($filters, $value, $name);
1508
  }
1509
 
1510
 
 
 
 
 
1511
 
1512
  $args["ignore_sticky_posts"] = true;
1513
 
1525
  $arrIDsPostMeta = array();
1526
  $arrIDsDynamicField = array();
1527
  $arrIDsFromContent = array();
1528
+ $arrTermIDs = array();
1529
 
1530
  $currentTaxQuery = null;
1531
 
1532
  $makePostINOrder = false;
1533
 
1534
+
1535
  foreach($arrIncludeBy as $includeby){
1536
 
1537
  switch($includeby){
1781
  "limit"=>$limit,
1782
  "range"=>$wppRange
1783
  );
1784
+
1785
  if(!empty($category))
1786
  $wpp_args["cat"] = $category;
1787
+
1788
  $response = $objIntegrations->WPP_getPopularPosts($wpp_args, $showDebugQuery);
1789
 
1790
  $arrIDsPopular = UniteFunctionsUC::getVal($response, "post_ids");
1902
  $objWoo = new UniteCreatorWooIntegrate();
1903
  $arrRelatedProductIDs = $objWoo->getRelatedProductsFromCart($limit, $arrPostsNotIn);
1904
 
 
1905
  }else{
1906
 
1907
  $arrRelatedProductIDs = wc_get_related_products($productID, $limit, $arrPostsNotIn);
2201
  $orderByMetaKey = UniteFunctionsUC::getVal($value, $name."_orderby_meta_key1");
2202
 
2203
  $maxItems = UniteFunctionsUC::getVal($value, $name."_maxitems_current");
2204
+
2205
  //enable filters
2206
  $isFilterable = $this->getIsFilterable($value, $name);
2207
 
2208
  if($orderBy == "default")
2209
  $orderBy = null;
2210
+
2211
  if($orderDir == "default")
2212
  $orderDir = null;
2213
 
2244
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
2245
 
2246
  $debugType = null;
2247
+
2248
+ if(self::SHOW_DEBUG_QUERY == true)
2249
+ $showDebugQuery = true;
2250
 
2251
  $isForWoo = false;
2252
  if($showDebugQuery == true){
2276
  GlobalsProviderUC::$lastQueryArgs = $wp_query->query_vars;
2277
 
2278
  //remake the query - not inside ajax
2279
+
2280
  if($currentQueryVars !== $wp_query->query_vars){
2281
 
2282
  //dmp($currentQueryVars);exit();
2332
  $this->showPostsDebugCallbacks($isForWoo);
2333
 
2334
  }
2335
+
2336
+
2337
  if($showDebugQuery == true){
2338
  dmp("Found Posts: ".count($arrPosts));
2339
 
2491
  break;
2492
  }
2493
 
2494
+ if(self::SHOW_DEBUG_QUERY == true){
2495
+
2496
+ dmp("don't forget to turn off the query debug");
2497
+ exit();
2498
+ }
2499
+
2500
 
2501
  if(empty($arrPosts))
2502
  $arrPosts = array();
3288
  if(!empty($parentName2))
3289
  $attributes .= " data-parentid2='$parentName2'";
3290
  }
3291
+
3292
+ //show debug
3293
+ $showDebug = UniteFunctionsUC::getVal($value, $name."_show_debug");
3294
+ $showDebug = UniteFunctionsUC::strToBool($showDebug);
3295
 
3296
+ if($showDebug == true)
3297
+ $attributes .= " data-debug='true'";
3298
 
3299
+
3300
  $arrOutput = array();
3301
  $arrOutput["attributes"] = $attributes;
3302
 
3524
  */
3525
  private function modifyMultisourceItems_getFields($arrValues, $namePosts){
3526
 
 
3527
  $arrFields = array();
3528
 
3529
  foreach($arrValues as $key => $value){
3542
  }
3543
 
3544
 
3545
+ /**
3546
+ * get post data by source, modify item
3547
+ */
3548
+ private function modifyMultisourceItems_getFieldDataFromPost($item, $source, $fieldName, $postData, $param, $metaValue){
3549
+
3550
+ //set as default value
3551
+
3552
+ $defaultValue = UniteFunctionsUC::getVal($param, "default_value");
3553
+
3554
+ $item[$fieldName] = $defaultValue;
3555
+
3556
+ if($source == "default")
3557
+ return($item);
3558
+
3559
+ if(empty($postData))
3560
+ return($item);
3561
+
3562
+ if(!is_array($postData))
3563
+ return($item);
3564
+
3565
+
3566
+
3567
+ //post values source
3568
+
3569
+ foreach($postData as $name => $value){
3570
+
3571
+ //if equal - just copy the data
3572
+
3573
+ if($name === $source){
3574
+
3575
+ $paramType = UniteFunctionsUC::getVal($param, "type");
3576
+
3577
+ switch($paramType){
3578
+ case UniteCreatorDialogParam::PARAM_NUMBER:
3579
+ case UniteCreatorDialogParam::PARAM_SLIDER:
3580
+
3581
+ //protection - set to default if not numeric
3582
+ if(is_string($value) && is_numeric($value) == false){
3583
+
3584
+ if(empty($value))
3585
+ $value = 0;
3586
+ else
3587
+ $value = UniteFunctionsUC::getVal($param, "default_value");
3588
+
3589
+ }
3590
+
3591
+ $item = $this->getProcessedParamData($item, $value, $param, self::PROCESS_TYPE_OUTPUT);
3592
+
3593
+ break;
3594
+ }
3595
+
3596
+ $item[$fieldName] = $value;
3597
+
3598
+ continue;
3599
+ }
3600
+
3601
+
3602
+ if(strpos($name, $source."_") === 0){
3603
+
3604
+ $suffix = substr($name, strlen($source));
3605
+
3606
+ $item[$fieldName.$suffix] = $value;
3607
+ }
3608
+
3609
+ }
3610
+
3611
+
3612
+
3613
+ return($item);
3614
+ }
3615
+
3616
+
3617
  /**
3618
  * modify multisource posts items
3619
  */
3620
+ private function getMultisourceItems_posts($arrPosts, $namePosts, $arrValues){
3621
 
3622
+ if(empty($arrPosts))
3623
+ return(array());
3624
+
3625
  $arrFields = $this->modifyMultisourceItems_getFields($arrValues, $namePosts);
3626
 
3627
+ $arrItemParams = $this->addon->getParamsItems();
3628
 
3629
+ $arrItemParams = UniteFunctionsUC::arrayToAssoc($arrItemParams,"name");
3630
+
3631
+ $arrItems = array();
3632
 
3633
+ foreach($arrPosts as $index => $post){
3634
+
3635
+ $postData = $this->getPostDataByObj($post);
3636
+
3637
+ $item = array();
3638
+
3639
+ foreach($arrFields as $fieldKey => $source){
3640
+
3641
+ $paramName = str_replace($namePosts."_field_source_", "", $fieldKey);
3642
+
3643
+ $param = UniteFunctionsUC::getVal($arrItemParams, $paramName);
3644
+
3645
+
3646
+ if($source == "static_value"){
3647
+
3648
+ $staticValueKey = $namePosts."_field_value_{$paramName}";
3649
+
3650
+ $item[$paramName] = UniteFunctionsUC::getVal($arrValues, $staticValueKey);
3651
+ continue;
3652
+ }
3653
+
3654
+
3655
+ $metaValue = null;
3656
+ if($source == "meta_field"){
3657
+
3658
+ dmp("get meta field max ");
3659
+ dmp("postid: ". $postData["id"]);
3660
+
3661
+ //dmp($arrValues);
3662
+ //exit();
3663
+ }
3664
+
3665
+
3666
+ $item = $this->modifyMultisourceItems_getFieldDataFromPost($item, $source, $paramName, $postData, $param, $metaValue);
3667
+ }
3668
+
3669
+ //add extra fields
3670
+
3671
+ $postID = UniteFunctionsUC::getVal($postData, "id");
3672
+
3673
+ $item["item_source"] = "post";
3674
+ $item["item_postid"] = $postID;
3675
+
3676
+ //add extra fields
3677
+ $elementorID = UniteFunctionsUC::getRandomString(5);
3678
+ $item["item_repeater_class"] = "elementor-repeater-item-".$elementorID;
3679
+
3680
+ $arrItems[] = array("item" => $item);
3681
+ }
3682
 
 
3683
 
3684
+ return($arrItems);
3685
  }
3686
 
3687
 
3703
  case "posts":
3704
 
3705
  $paramPosts = $param;
3706
+ $namePosts = $name."_posts";
3707
 
3708
  $paramPosts["name"] = $namePosts;
3709
  $paramPosts["name_listing"] = $name;
3713
 
3714
  $arrPosts = UniteFunctionsUC::getVal($dataResponse, $name."_items");
3715
 
3716
+ //shoe meta fields
3717
+ $isShowMeta = UniteFunctionsUC::getVal($value, $name."_show_metafields");
3718
+ $isShowMeta = UniteFunctionsUC::strToBool($isShowMeta);
3719
+
3720
+ if($isShowMeta == true)
3721
+ HelperUC::$operations->putPostsCustomFieldsDebug($arrPosts);
3722
+
3723
+ $response = $this->getMultisourceItems_posts($arrPosts, $namePosts, $value);
3724
+
3725
+
3726
  break;
3727
  default:
3728
  UniteFunctionsUC::throwError("Wrong multisource source: $itemsSource");
3730
  }
3731
 
3732
  $data[$name] = $response;
3733
+
3734
  return($data);
3735
  }
3736
 
3829
  $params["meta_key"] = $metaKey;
3830
  }
3831
  }
3832
+
3833
  $arrTerms = UniteFunctionsWPUC::getTerms($taxonomy, $orderBy, $orderDir, $isHide, $arrExcludeSlugs, $params);
3834
 
3835
  if($showDebug == true){
4421
  /**
4422
  * get post filter options
4423
  */
4424
+ private function modifyData_postFilterOptions($data, $filterType){
4425
 
4426
  $objFilters = new UniteCreatorFiltersProcess();
4427
 
4428
+ $data = $objFilters->addEditorFilterArguments($data, $filterType);
4429
 
4430
  return($data);
4431
  }
4437
  protected function modifyDataBySpecialAddonBehaviour($data){
4438
 
4439
  $special = $this->addon->getOption("special");
4440
+ $specialData = $this->addon->getOption("special_data");
4441
 
4442
  if(empty($special))
4443
  return($data);
4444
 
4445
  switch($special){
4446
  case "post_filter":
4447
+ $data = $this->modifyData_postFilterOptions($data, $specialData);
4448
  break;
4449
  }
4450
 
provider/provider_settings.class.php CHANGED
@@ -1226,7 +1226,8 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1226
  $arrIncludeBy["most_viewed"] = __("Most Viewed", "unlimited-elements-for-elementor");
1227
  $arrIncludeBy["php_function"] = __("IDs from PHP function","unlimited-elements-for-elementor");
1228
  $arrIncludeBy["ids_from_meta"] = __("IDs from Post Meta","unlimited-elements-for-elementor");
1229
- $arrIncludeBy["ids_from_dynamic"] = __("IDs from Dynamic Field","unlimited-elements-for-elementor");
 
1230
 
1231
  if($isForWooProducts == true){
1232
  $arrIncludeBy["products_on_sale"] = __("Products On Sale Only (woo)","unlimited-elements-for-elementor");
@@ -1295,16 +1296,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1295
  $arrDates = array_flip($arrDates);
1296
 
1297
  $this->addSelect($name."_includeby_date", $arrDates, __("Include By Date", "unlimited-elements-for-elementor"), "all", $params);
1298
-
1299
- //----- date meta field -------
1300
-
1301
- $params = array();
1302
- $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1303
- $params["description"] = __("Optional, Select custom field (like ACF) with date format 20210310 (Ymd). For example: event_date","unlimited-elements-for-elementor");
1304
- $params["elementor_condition"] = $arrConditionIncludeByDate;
1305
-
1306
- $this->addTextBox($name."_include_date_meta","",__("Date by Meta Field","unlimited-elements-for-elementor"),$params);
1307
-
1308
  //----- add date before and after -------
1309
 
1310
  $params = array();
@@ -1322,6 +1314,26 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1322
 
1323
  $this->addTextBox($name."_include_date_after","", __("Published After Date","unlimited-elements-for-elementor"),$params);
1324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1325
  //----- add hr after date -------
1326
 
1327
  $params = array();
@@ -1516,6 +1528,22 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1516
 
1517
  $this->addTextBox($name."_includeby_postmeta_metafield", "", esc_html__("Meta Field Name", "unlimited-elements-for-elementor"), $params);
1518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  //----- include id's from dynamic field -------
1520
 
1521
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
@@ -1528,7 +1556,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1528
  $params["label_block"] = true;
1529
  $params["add_dynamic"] = true;
1530
 
1531
- $this->addTextBox($name."_includeby_dynamic_field","",__("Include Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1532
 
1533
 
1534
  // --------- include by most viewed -------------
@@ -1693,7 +1721,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1693
  $arrExclude["current_tags"] = sprintf(__("%s With Current Tags", "unlimited-elements-for-elementor"),$textPosts);
1694
  $arrExclude["offset"] = sprintf(__("Offset", "unlimited-elements-for-elementor"),$textPosts);
1695
  $arrExclude["avoid_duplicates"] = sprintf(__("Avoid Duplicates", "unlimited-elements-for-elementor"),$textPosts);
1696
- $arrExclude["ids_from_dynamic"] = sprintf(__("IDs from Dynamic Field", "unlimited-elements-for-elementor"),$textPosts);
1697
 
1698
  $params = array();
1699
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
@@ -1708,6 +1736,8 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1708
  $arrExcludeValues = "";
1709
 
1710
  $this->addMultiSelect($name."_excludeby", $arrExclude, __("Exclude By", "unlimited-elements-for-elementor"), $arrExcludeValues, $params);
 
 
1711
 
1712
  //----- exclude id's from dynamic field -------
1713
 
@@ -2091,6 +2121,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
2091
 
2092
  }
2093
 
 
2094
 
2095
  $params = array();
2096
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
@@ -2098,6 +2129,16 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
2098
 
2099
  $this->addTextBox($prefix."custom_name", "", __("Custom Parent Name","unlimited-elements-for-elementor"), $params);
2100
 
 
 
 
 
 
 
 
 
 
 
2101
  $params = array();
2102
  $params["origtype"] = UniteCreatorDialogParam::PARAM_HR;
2103
 
1226
  $arrIncludeBy["most_viewed"] = __("Most Viewed", "unlimited-elements-for-elementor");
1227
  $arrIncludeBy["php_function"] = __("IDs from PHP function","unlimited-elements-for-elementor");
1228
  $arrIncludeBy["ids_from_meta"] = __("IDs from Post Meta","unlimited-elements-for-elementor");
1229
+ $arrIncludeBy["ids_from_dynamic"] = __("Post IDs from Dynamic Field","unlimited-elements-for-elementor");
1230
+ $arrIncludeBy["terms_from_dynamic"] = __("Terms from Dynamic Field", "unlimited-elements-for-elementor");
1231
 
1232
  if($isForWooProducts == true){
1233
  $arrIncludeBy["products_on_sale"] = __("Products On Sale Only (woo)","unlimited-elements-for-elementor");
1296
  $arrDates = array_flip($arrDates);
1297
 
1298
  $this->addSelect($name."_includeby_date", $arrDates, __("Include By Date", "unlimited-elements-for-elementor"), "all", $params);
1299
+
 
 
 
 
 
 
 
 
 
1300
  //----- add date before and after -------
1301
 
1302
  $params = array();
1314
 
1315
  $this->addTextBox($name."_include_date_after","", __("Published After Date","unlimited-elements-for-elementor"),$params);
1316
 
1317
+
1318
+ //----- date meta field -------
1319
+
1320
+ $params = array();
1321
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1322
+ $params["description"] = __("Optional, Select custom field (like ACF) with date format 20210310 (Ymd). For example: event_date","unlimited-elements-for-elementor");
1323
+ $params["elementor_condition"] = $arrConditionIncludeByDate;
1324
+
1325
+ $this->addTextBox($name."_include_date_meta","",__("Date by Meta Field","unlimited-elements-for-elementor"),$params);
1326
+
1327
+ //----- date meta format -------
1328
+
1329
+ $params = array();
1330
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1331
+ $params["description"] = __("Here you can set the date format for the meta field","unlimited-elements-for-elementor");
1332
+ $params["elementor_condition"] = $arrConditionIncludeByDate;
1333
+
1334
+ $this->addTextBox($name."_include_date_meta_format","Ymd",__("Date by Meta Field - Format","unlimited-elements-for-elementor"),$params);
1335
+
1336
+
1337
  //----- add hr after date -------
1338
 
1339
  $params = array();
1528
 
1529
  $this->addTextBox($name."_includeby_postmeta_metafield", "", esc_html__("Meta Field Name", "unlimited-elements-for-elementor"), $params);
1530
 
1531
+
1532
+ //----- include terms from dynamic field by ids -------
1533
+
1534
+ $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1535
+ $arrConditionIncludeDynamic[$name."_includeby"] = "terms_from_dynamic";
1536
+
1537
+ $params = array();
1538
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1539
+ $params["description"] = __("Enter term id's like 12,434,1289, or select from dynamic tag. You can use the term relation and include children options from below","unlimited-elements-for-elementor");
1540
+ $params["elementor_condition"] = $arrConditionIncludeDynamic;
1541
+ $params["label_block"] = true;
1542
+ $params["add_dynamic"] = true;
1543
+
1544
+ $this->addTextBox($name."_includeby_dynamic_field","",__("Include by Terms from Dynamic Field","unlimited-elements-for-elementor"), $params);
1545
+
1546
+
1547
  //----- include id's from dynamic field -------
1548
 
1549
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1556
  $params["label_block"] = true;
1557
  $params["add_dynamic"] = true;
1558
 
1559
+ $this->addTextBox($name."_includeby_terms_dynamic_field","",__("Include Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1560
 
1561
 
1562
  // --------- include by most viewed -------------
1721
  $arrExclude["current_tags"] = sprintf(__("%s With Current Tags", "unlimited-elements-for-elementor"),$textPosts);
1722
  $arrExclude["offset"] = sprintf(__("Offset", "unlimited-elements-for-elementor"),$textPosts);
1723
  $arrExclude["avoid_duplicates"] = sprintf(__("Avoid Duplicates", "unlimited-elements-for-elementor"),$textPosts);
1724
+ $arrExclude["ids_from_dynamic"] = sprintf(__("Post IDs from Dynamic Field", "unlimited-elements-for-elementor"),$textPosts);
1725
 
1726
  $params = array();
1727
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
1736
  $arrExcludeValues = "";
1737
 
1738
  $this->addMultiSelect($name."_excludeby", $arrExclude, __("Exclude By", "unlimited-elements-for-elementor"), $arrExcludeValues, $params);
1739
+
1740
+
1741
 
1742
  //----- exclude id's from dynamic field -------
1743
 
2121
 
2122
  }
2123
 
2124
+ // ---- custom name
2125
 
2126
  $params = array();
2127
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
2129
 
2130
  $this->addTextBox($prefix."custom_name", "", __("Custom Parent Name","unlimited-elements-for-elementor"), $params);
2131
 
2132
+
2133
+ // ---- show debug
2134
+
2135
+ $params = array();
2136
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
2137
+
2138
+ $this->addRadioBoolean($prefix."show_debug", __("Show Debug", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
2139
+
2140
+ // ---- hr
2141
+
2142
  $params = array();
2143
  $params["origtype"] = UniteCreatorDialogParam::PARAM_HR;
2144
 
provider/provider_settings_multisource.class.php CHANGED
@@ -22,14 +22,16 @@ class UniteCreatorSettingsMultisource{
22
  $this->objAddon = null;
23
 
24
  $this->arrPostFields = array(
25
- "none"=>__("None","unlimited-elements-for-elementor"),
26
- "post_title"=>__("Post Title","unlimited-elements-for-elementor"),
27
- "post_excerpt"=>__("Post Excerpt","unlimited-elements-for-elementor") ,
28
- "post_content"=>__("Post Content","unlimited-elements-for-elementor"),
29
- "post_image"=>__("Post Featured Image","unlimited-elements-for-elementor"),
30
- "post_date"=>__("Post Date","unlimited-elements-for-elementor"),
31
- "post_link"=>__("Post Url","unlimited-elements-for-elementor"),
32
- "post_meta"=>__("Post Meta Field","unlimited-elements-for-elementor")
 
 
33
  );
34
 
35
  $this->arrPostFields = array_flip($this->arrPostFields);
@@ -63,6 +65,7 @@ class UniteCreatorSettingsMultisource{
63
  $arrSource["items"] = __("Items", "unlimited-elements-for-elementor");
64
  $arrSource["posts"] = __("Posts", "unlimited-elements-for-elementor");
65
 
 
66
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
67
  if($isWooActive == true)
68
  $arrSource["products"] = __("Products", "unlimited-elements-for-elementor");
@@ -79,6 +82,8 @@ class UniteCreatorSettingsMultisource{
79
  if($hasInstagram)
80
  $arrSource["instagram"] = __("Instagram", "unlimited-elements-for-elementor");
81
 
 
 
82
  $arrSource = array_flip($arrSource);
83
 
84
  $params = array();
@@ -109,6 +114,8 @@ class UniteCreatorSettingsMultisource{
109
  if(empty($paramsItems))
110
  return(false);
111
 
 
 
112
  // --- hr before fields source
113
 
114
  $params = array();
@@ -122,16 +129,36 @@ class UniteCreatorSettingsMultisource{
122
 
123
  foreach($paramsItems as $itemParam){
124
 
125
- $this->putParamConnector_post($name, $itemParam);
126
-
127
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
  }
130
 
 
131
  /**
132
  * get post param connector
133
  */
134
- private function putParamConnector_post($fieldName, $param){
135
 
136
  $title = UniteFunctionsUC::getVal($param, "title");
137
 
@@ -143,18 +170,49 @@ class UniteCreatorSettingsMultisource{
143
  if(empty($name))
144
  return(false);
145
 
146
-
147
- //add the select param
148
-
149
  $params = array();
150
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
 
151
 
152
  $text = $title. " ".__("Source", "unlimited-elements-for-elementor");
153
 
154
- $this->settings->addSelect($fieldName."_post_field_source_$name", $this->arrPostFields, $text, "none", $params);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
 
157
  }
158
 
159
 
 
160
  }
22
  $this->objAddon = null;
23
 
24
  $this->arrPostFields = array(
25
+ "default"=>__("-- Item Default --","unlimited-elements-for-elementor"),
26
+ "static_value"=>__("-- Static Value --","unlimited-elements-for-elementor"),
27
+ "title"=>__("Post Title","unlimited-elements-for-elementor"),
28
+ "alias"=>__("Post Name","unlimited-elements-for-elementor"),
29
+ "intro"=>__("Post Intro","unlimited-elements-for-elementor") ,
30
+ "content"=>__("Post Content","unlimited-elements-for-elementor"),
31
+ "image"=>__("Post Featured Image","unlimited-elements-for-elementor"),
32
+ "date"=>__("Post Date","unlimited-elements-for-elementor"),
33
+ "link"=>__("Post Url","unlimited-elements-for-elementor"),
34
+ "meta_field"=>__("Post Meta Field","unlimited-elements-for-elementor")
35
  );
36
 
37
  $this->arrPostFields = array_flip($this->arrPostFields);
65
  $arrSource["items"] = __("Items", "unlimited-elements-for-elementor");
66
  $arrSource["posts"] = __("Posts", "unlimited-elements-for-elementor");
67
 
68
+ /*
69
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
70
  if($isWooActive == true)
71
  $arrSource["products"] = __("Products", "unlimited-elements-for-elementor");
82
  if($hasInstagram)
83
  $arrSource["instagram"] = __("Instagram", "unlimited-elements-for-elementor");
84
 
85
+ */
86
+
87
  $arrSource = array_flip($arrSource);
88
 
89
  $params = array();
114
  if(empty($paramsItems))
115
  return(false);
116
 
117
+ $condition = array($name."_source"=>"posts");
118
+
119
  // --- hr before fields source
120
 
121
  $params = array();
129
 
130
  foreach($paramsItems as $itemParam){
131
 
132
+ $this->putParamConnector_post($name, $itemParam, $condition);
 
133
  }
134
+
135
+ //--------- h3 before meta ----------
136
+
137
+ $params = array();
138
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_HR;
139
+ $params["elementor_condition"] = $condition;
140
+
141
+ $this->settings->addHr($name."_hr_before_debug",$params);
142
+
143
+
144
+ //--------- debug meta ----------
145
+
146
+ $params = array();
147
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
148
+ $params["description"] = __("Show the current post meta fields, turn off it after choose the right one", "unlimited-elements-for-elementor");
149
+ $params["elementor_condition"] = $condition;
150
+
151
+ $this->settings->addRadioBoolean($name."_show_metafields", __("Debug - Show Meta Fields", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
152
+
153
+
154
 
155
  }
156
 
157
+
158
  /**
159
  * get post param connector
160
  */
161
+ private function putParamConnector_post($fieldName, $param, $condition){
162
 
163
  $title = UniteFunctionsUC::getVal($param, "title");
164
 
170
  if(empty($name))
171
  return(false);
172
 
173
+ //-------------- select param ----------------
174
+
 
175
  $params = array();
176
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
177
+ $params["elementor_condition"] = $condition;
178
 
179
  $text = $title. " ".__("Source", "unlimited-elements-for-elementor");
180
 
181
+ $selectName = $fieldName."_posts_field_source_$name";
182
+
183
+ $this->settings->addSelect($selectName, $this->arrPostFields, $text, "default", $params);
184
+
185
+
186
+ //-------------- meta field ----------------
187
+
188
+ $conditionMetaField = $condition;
189
+ $conditionMetaField[$selectName] = "meta_field";
190
+
191
+ $params = array();
192
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
193
+ $params["elementor_condition"] = $conditionMetaField;
194
+
195
+ $text = $title. " ".__("Meta Field", "unlimited-elements-for-elementor");
196
+
197
+ $this->settings->addTextBox($fieldName."_posts_field_meta_{$name}", "", $text, $params);
198
+
199
+ //-------------- static value ----------------
200
+
201
+ $conditionMetaField = $condition;
202
+ $conditionStaticValue[$selectName] = "static_value";
203
+
204
+ $params = array();
205
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
206
+ $params["elementor_condition"] = $conditionStaticValue;
207
+ $params["label_block"] = true;
208
+
209
+ $text = $title. " ".__("Static Value", "unlimited-elements-for-elementor");
210
+
211
+ $this->settings->addTextBox($fieldName."_posts_field_value_{$name}", "", $text, $params);
212
 
213
 
214
  }
215
 
216
 
217
+
218
  }
provider/provider_template_engine.class.php CHANGED
@@ -86,7 +86,7 @@ class UniteCreatorTemplateEngine extends UniteCreatorTemplateEngineWork{
86
  /**
87
  * get post terms
88
  */
89
- public function getPostTerms($postID, $taxonomy, $addCustomFields = false, $type = ""){
90
 
91
  $post = get_post($postID);
92
 
@@ -103,6 +103,11 @@ class UniteCreatorTemplateEngine extends UniteCreatorTemplateEngineWork{
103
  if(empty($arrTerms))
104
  return(array());
105
 
 
 
 
 
 
106
  $arrTermsOutput = $this->objParamsProcessor->modifyArrTermsForOutput($arrTerms, $addCustomFields);
107
 
108
  return($arrTermsOutput);
86
  /**
87
  * get post terms
88
  */
89
+ public function getPostTerms($postID, $taxonomy, $addCustomFields = false, $type = "", $maxTerms = null){
90
 
91
  $post = get_post($postID);
92
 
103
  if(empty($arrTerms))
104
  return(array());
105
 
106
+ if(!empty($maxTerms) && count($arrTerms) > $maxTerms){
107
+
108
+ $arrTerms = array_slice($arrTerms, 0, $maxTerms, true);
109
+ }
110
+
111
  $arrTermsOutput = $this->objParamsProcessor->modifyArrTermsForOutput($arrTerms, $addCustomFields);
112
 
113
  return($arrTermsOutput);
readme.txt CHANGED
@@ -90,378 +90,1132 @@ Fully compatible and integrated with Toolset custom post types and fields.
90
  <li><a href="https://unitecms.ticksy.com" rel="nofollow">Support Desk</a></li>
91
  </ul>
92
 
93
- <h3>Creative Widgets for Elementor</h3>
94
- <ol>
95
- <li><a href="https://unlimited-elements.com/image-tooltip-widget-for-elementor/">Image Tooltip Widget for Elementor (Free)</a> - The easiest way to set a tooltip to any Image on the page with a short text description or any HTML code.</li>
96
- <li><a href="https://unlimited-elements.com/blob-shape-widget-for-elementor/">Blob Shapes Widget for Elementor (Free)</a> - Create Blob Shapes with animated morphing effects. This free Elementor widget will help you make your images into random, unique, and organic-looking blob shapes. </li>
97
- <li><a href="https://unlimited-elements.com/flip-box-widget-for-elementor/">Flip Box Widget for Elementor (Free)</a> - Make your content more interesting with the Elementor Flip Box widget. Use the animated Flip Boxes to highlight any content inside your page with a flip effect.</li>
98
- <li><a href="https://unlimited-elements.com/number-box-widget-widget-for-elementor/">Number Box Widget for Elementor (Free)</a> - Create stunning number blocks with various styles. The Number Box widget for Elementor helps you display content for step-by-step diagrams and instructions.</li>
99
- <li><a href="https://unlimited-elements.com/animated-mouse-scroll-icon-widget-for-elementor/">Animated Mouse Scroll Icon Widget for Elementor (Free)</a> - The Animated Mouse Scroll Icon is a small micro animation to indicate to users they need to scroll down the page to view more. You can make the icon an anchor point that scrolls down to any section when clicked on.
100
- </li>
101
- <li><a href="https://unlimited-elements.com/svg-animation-widget-for-elementor">SVG Animation Widget for Elementor (Free)</a> - The SVG animation widget for Elementor makes it easy -to create impressive SVG animations for your websitet, without any coding skills just copy paste your SVG code and your animated icon is ready.</li>
102
- <li><a href="https://unlimited-elements.com/timeline-bullets-widget-for-elementor/">Timeline Bullets Widget for Elementor (Free)</a> - List your features or services using bullet points in a timeline layout to make it easier for users to read the important information.</li>
103
- <li><a href="https://unlimited-elements.com/lordicon-animated-icons-widget-for-elementor/">Lordicon: Animated Icons Widget for Elementor (Free)</a> - The most powerful animated icon library with 1500+ free and premium animated Lottie animations.</li>
104
- <li><a href="https://unlimited-elements.com/animated-hamburger-icon-for-elementor/">Animated Hamburger Icon Widget for Elementor (Free)</a> - Use the animated hamburger icon widget to toggle Elementor pro popups. You can even put a menu in a popup and create a full-screen menu.</li>
105
- <li><a href="https://unlimited-elements.com/icon-bullets-widget-for-elementor">Icon Bullets Widget for Elementor (Free)</a> - Display feature lists with custom icons and styles. Each list item can have its own icon title and text. Use the bullets widget to display features and highlights on your Elementor website.</li>
106
- <li><a href="https://unlimited-elements.com/image-zoom-magnifier-widget-for-elementor/">Image Zoom Magnifier Widget for Elementor (Pro)</a> - Image Zoom Magnifier is a Elmentor Widget for creating a direction-aware magnifying glass effect to provide an inner zoom functionality on any given image. Enlarge images on touch, click, or mouseover.</li>
107
- <li><a href="https://unlimited-elements.com/christmas-icons-widget-for-elementor/">Christmas Icons Widget for Elementor (Pro)</a></li>
108
- <li><a href="https://unlimited-elements.com/image-reveal-on-scroll-widget-for-elementor">Image Reveal On Scroll Widget for Elementor (Pro)</a> - The Image Reveal on Scroll widget adds an awesome reveal on scroll effect to your images to spice up your Elementor website design.</li>
109
- <li><a href="https://unlimited-elements.com/image-shapes-for-elementor-page-builder/">Image Shapes Widget for Elementor (Pro)</a> - The Image Shapes Elementor Widget allows you to make complex shape addons by clipping images using CSS to make various element layouts: circle, ellipse, polygon, and more.</li>
110
- <li><a href="https://unlimited-elements.com/image-particle-widget-for-elementor/">Particle Image Widget for Elementor (Pro)</a></li>
111
- <li><a href="https://unlimited-elements.com/image-accordion-widget-for-elementor/">Image Accordion Widget for Elementor (Pro)</a> - Our image accordion addon for Elementor highlights your images with amazing hover effects and interactive layouts.</li>
112
- <li><a href="https://unlimited-elements.com/background-switcher-widget-for-elementor/">Background Switcher Widget for Elementor (Pro)</a> - The background switcher addon lets you set up cool content boxes. When you hover over a box it will change the background for the whole section. </li>
113
- <li><a href="https://unlimited-elements.com/icon-accordion-widget-for-elementor/">Icon Accordion Widget for Elementor (Pro)</a> - Advanced accordion addon for Elementor page builder offers multiple styles to create interactive collapsable content with multiple layouts on your page.</li>
114
- <li><a href="https://unlimited-elements.com/before-after-image-comparison-widget-for-elementor/">Before After Widget for Elementor (Pro)</a> - The Before After widget is an image comparison addon for Elementor. This widget allows you to create the effect for comparing two before and after images.</li>
115
- <li><a href="https://unlimited-elements.com/hotspots-for-elementor-page-builder/">Hotspots Widget for Elementor (Pro)</a> - Add hotspots to your images with a tooltip an option for opening a built in popup. Each hotspot popup can contain and image and description text.</li>
116
- <li><a href="https://unlimited-elements.com/icon-tabs-widget-for-elementor">Icon Tabs Widget for Elementor (Pro)</a> - The Tab Widget for Elementor will help you show your text on your page divided into horizontal or vertical tabs. Customize your tabs using icons and make the content on your website interactive and fun to read.</li>
117
- <li><a href="https://unlimited-elements.com/shape-bullets-widget-for-elementor/">Shape Bullets Widget for Elementor (Pro)</a> - The Shape Bullets Widget for Elementor, creates an easy-to-manage bulleted list of items. Each item can be highlighted by its own icon.
118
- </li>
119
- <li><a href="https://unlimited-elements.com/flip-box-carousel-widget-for-elementor/">Flip Box Carousel Widget for Elementor (Pro)</a> - Use the animated Carousel Flip Box to highlight content inside your Elementor page in an interactive way.
120
- </li>
121
- <li><a href="https://unlimited-elements.com/morph-slider-widget-for-elementor/">Morph Slider Widget for Elementor (Pro)</a></li>
122
- </ol>
123
 
124
- <h3>Post Widgets for Elementor</h3>
125
- <ol>
126
- <li><a href="https://unlimited-elements.com/post-accordions-for-elementor/">Post Accordion Widget for Elementor (Free)</a></li>
127
- <li><a href="https://unlimited-elements.com/card-post-carousel-widget-for-elementor">Post Carousel Lite Widget for Elementor (Free)</a> - The Post Carousel widget allows you to choose a set of posts, pages, products, or any custom post type based on category, tags, or author and present them in an interactive carousel format.</li>
128
- <li><a href="https://unlimited-elements.com/post-blocks-widget-for-elementor">Post Blocks Widget for Elementor (Free)</a></li>
129
- <li><a href="https://unlimited-elements.com/post-list-widget-for-elementor">Post List Widget for Elementor (Free)</a> - The Post List widget lets you display your WordPress posts in a list layout with multiple columns. You can also add advanced filtering, pagination, load more button, and even infinite scroll to any post list your desire. </li>
130
- <li><a href="https://unlimited-elements.com/post-pagination-widget-for-elementor/">Post Pagination Widget for Elementor (Free)</a></li>
131
- <li><a href="https://unlimited-elements.com/post-tabs-for-elementor/">Post Tabs Widget for Elementor (Free)</a> - The Post Tabs widget allows you to create custom-made tab designs and display your WordPress posts in an interactive tabs layout.</li>
132
- <li><a href="https://unlimited-elements.com/post-news-ticker-widget-for-elementor">Post Ticker Widget for Elementor (Free)</a> - Display a horizontal post news ticker on your website using WordPress posts, pages, products, or any other custom post type with the help of the Post News Ticker.</li>
133
- <li><a href="https://unlimited-elements.com/post-grid-widget-for-elementor/">Post Grid Widget for Elementor (Pro)</a> - The Post Grid widget places multiple posts in an aesthetic post grid layout. The purpose of this widget is to let you organize and display your posts on your Elementor website.</li>
134
- <li><a href="https://unlimited-elements.com/post-horizontal-timeline-widget-for-elementor/">Post Horizontal Timeline Widget for Elementor (Pro)</a></li>
135
- <li><a href="https://unlimited-elements.com/elementor-author-list-widget/">Author List Widget for Elementor (Pro)</a></li>
136
- <li><a href="https://unlimited-elements.com/masonry-post-grid-widget-for-elementor">Masonry Post Grid Widget for Elementor (Pro)</a></li>
137
- <li><a href="https://unlimited-elements.com/post-tiles-widget-for-elementor">Post Tile Widget for Elementor (Pro)</a></li>
138
- <li><a href="https://unlimited-elements.com/post-sliders/">Post Slider Widget for Elementor (Pro)</a></li>
139
- <li><a href="https://unlimited-elements.com/load-more-infinite-scroll-widget-for-elementor/">Load More / Infinite Scroll Widget for Elementor (Pro)</a> - Add a load more button to your post or product grids. You can even make an infinite scroll effect that works with AJAX.</li>
140
- <li><a href="https://unlimited-elements.com/blog-card-slider-widget-for-elementor">Post Card Slider Widget for Elementor (Pro)</a></li>
141
- <li><a href="https://unlimited-elements.com/tabs-filter-widget-for-elementor/">Tabs Filter Widget for Elementor (Pro)</a> - The Tabs Filter is the best post filtering widget for Elementor. You can ad post filters using category and tag taxonomies.</li>
142
- <li><a href="https://unlimited-elements.com/post-timeline-widget-for-elementor/">Post Timeline Widget for Elementor (Pro)</a></li>
143
- <li><a href="https://unlimited-elements.com/post-scroll-widget-for-elementor">Post Scroll Widget for Elementor (Pro)</a></li>
144
- <li><a href="https://unlimited-elements.com/taxonomy-terms-widget-for-elementor/">Taxonomy Terms Widget for Elementor (Pro)</a> - Showcase your WordPress tags and categories in different ways using the Taxonomy Widget for Elementor.
145
-
146
- </li>
147
- <li><a href="https://unlimited-elements.com/post-carousels-for-elementor/">Post Carousel Widget for Elementor (Pro)</a> - The Post Carousel widget allows you to quickly showcase posts, pages, products, or custom post types in a beautiful interactive carousel layout.</li>
148
- <li><a href="https://unlimited-elements.com/post-magazine-grid-widget-for-elementor/">Post Magazine Grid Widget for Elementor (Pro)</a></li>
149
- <li><a href="https://unlimited-elements.com/tag-cloud-widget-for-elementor/">Tag Cloud Widget for Elementor (Pro)</a> - The tag cloud widget is a visual representation of the most popular tags or categories found on your website.</li>
150
- </ol>
151
 
152
- <h3>WooCommerce for Elementor</h3>
153
- <ol>
154
- <li><a href="https://unlimited-elements.com/woocommerce-product-list-widget-for-elementor/">WooCommerce Product List Widget for Elementor (Free)</a> - Showcase your WooCommerce products in an attractive list layout with many customization options. You can choose how many products to show per page, what information to display about each product, and much more.</li>
155
- <li><a href="https://unlimited-elements.com/woocommerce-product-grid-widget-for-elementor/">WooCommerce Product Grid Widget for Elementor (Pro)</a> - The WooCommerce Product Grid is a powerful widget that allows you to present your products in the most appealing style on your Elementor pages. Showcase your products in multiple layouts and design the with unlimited customization possibilities.</li>
156
- <li><a href="https://unlimited-elements.com/woocommerce-product-carousel-widget-for-elementor">WooCommerce Product Carousel Widget for Elementor (Pro)</a> - The Woocommerce product carousel helps showcase your Woocommerce products on any Elementor page in an interactive carousel format.</li>
157
- <li><a href="https://unlimited-elements.com/woocommerce-product-slider-widget-for-elementor">WooCommerce Product Slider Widget for Elementor (Pro)</a></li>
158
- <li><a href="https://unlimited-elements.com/woocommerce-category-grid-for-elemenetor/">WooCommerce Category Grid Widget for Elementor (Pro)</a></li>
159
- <li><a href="https://unlimited-elements.com/woocommerce-category-carousel-widget-for-elementor/">WooCommerce Category Carousel Widget for Elementor (Pro)</a></li>
160
- </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  <li><a href="https://unitecms.ticksy.com" rel="nofollow">Support Desk</a></li>
91
  </ul>
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
+ === Creative Widgets for Elementor ===
96
+
97
+ == 1. Elementor Image Tooltip Widget ==
98
+
99
+ [Image Tooltip For Elementor](https://unlimited-elements.com/image-tooltip-widget-for-elementor/) - Free Elementor Image Tooltip Widget. The easiest way to set a tooltip to any Image on the page with a short text description or any HTML code. Check out the demo [in the link](https://unlimited-elements.com/image-tooltip-widget-for-elementor/)
100
+
101
+ == 2. Elementor Blob Shapes Widget ==
102
+
103
+ [Blob Shapes For Elementor](https://unlimited-elements.com/blob-shape-widget-for-elementor/) - Free Elementor Blob Shapes Widget. Create Blob Shapes with animated morphing effects. This free Elementor widget will help you make your images into random, unique, and organic-looking blob shapes. Check out the demo [in the link](https://unlimited-elements.com/blob-shape-widget-for-elementor/)
104
+
105
+ == 3. Elementor Flip Box Widget ==
106
+
107
+ [Flip Box For Elementor](https://unlimited-elements.com/flip-box-widget-for-elementor/) - Free Elementor Flip Box Widget. Make your content more interesting with the Elementor Flip Box widget. Use the animated Flip Boxes to highlight any content inside your page with a flip effect. Check out the demo [in the link](https://unlimited-elements.com/flip-box-widget-for-elementor/)
108
+
109
+ == 4. Elementor Number Box Widget ==
110
+
111
+ [Number Box For Elementor](https://unlimited-elements.com/number-box-widget-widget-for-elementor/) - Free Elementor Number Box Widget. Create stunning number blocks with various styles. The Number Box widget for Elementor helps you display content for step-by-step diagrams and instructions. Check out the demo [in the link](https://unlimited-elements.com/number-box-widget-widget-for-elementor/)
112
+
113
+ == 5. Elementor Animated Mouse Scroll Icon Widget ==
114
+
115
+ [Animated Mouse Scroll Icon For Elementor](https://unlimited-elements.com/animated-mouse-scroll-icon-widget-for-elementor/) - Free Elementor Animated Mouse Scroll Icon Widget. The Animated Mouse Scroll Icon is a small micro animation to indicate to users they need to scroll down the page to view more. You can make the icon an anchor point that scrolls down to any section when clicked on. Check out the demo [in the link](https://unlimited-elements.com/animated-mouse-scroll-icon-widget-for-elementor/)
116
+
117
+ == 6. Elementor SVG Animation Widget ==
118
+
119
+ [SVG Animation For Elementor](https://unlimited-elements.com/svg-animation-widget-for-elementor) - Free Elementor SVG Animation Widget. The SVG animation widget for Elementor makes it easy -to create impressive SVG animations for your websitet, without any coding skills just copy paste your SVG code and your animated icon is ready. Check out the demo [in the link](https://unlimited-elements.com/svg-animation-widget-for-elementor)
120
+
121
+ == 7. Elementor Animated Hamburger Icon Widget ==
122
+
123
+ [Animated Hamburger Icon For Elementor](https://unlimited-elements.com/animated-hamburger-icon-for-elementor/) - Free Elementor Animated Hamburger Icon Widget. Use the animated hamburger icon widget to toggle Elementor pro popups. You can even put a menu in a popup and create a full-screen menu. Check out the demo [in the link](https://unlimited-elements.com/animated-hamburger-icon-for-elementor/)
124
+
125
+ == 8. Elementor Timeline Bullets Widget ==
126
+
127
+ [Timeline Bullets For Elementor](https://unlimited-elements.com/timeline-bullets-widget-for-elementor/) - Free Elementor Timeline Bullets Widget. List your features or services using bullet points to make it easier for users to read the important information. Make the Timeline Bullets widget look and work exactly like you want it too by customizing the settings. Sync the timeline bullets to other widgets and create advanced interactive layouts. Check out the demo [in the link](https://unlimited-elements.com/timeline-bullets-widget-for-elementor/)
128
+
129
+ == 9. Elementor Lordicon: Animated Icons Widget ==
130
+
131
+ [Lordicon: Animated Icons For Elementor](https://unlimited-elements.com/lordicon-animated-icons-widget-for-elementor/) - Free Elementor Lordicon: Animated Icons Widget. The most powerful animated icon library with 1500+ free and premium animated Lottie animations. Check out the demo [in the link](https://unlimited-elements.com/lordicon-animated-icons-widget-for-elementor/)
132
+
133
+ == 10. Elementor Icon Bullets Widget ==
134
+
135
+ [Icon Bullets For Elementor](https://unlimited-elements.com/icon-bullets-widget-for-elementor) - Free Elementor Icon Bullets Widget. Display feature lists with custom icons and styles. Each list item can have its own icon title and text. Use the bullets widget to display features and highlights on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/icon-bullets-widget-for-elementor)
136
+
137
+ == 11. Elementor Image Accordion Widget ==
138
+
139
+ [Image Accordion For Elementor](https://unlimited-elements.com/image-accordion-widget-for-elementor/) - Pro Elementor Image Accordion Widget. Our image accordion addon for Elementor highlights your images with amazing hover effects and interactive layouts. Check out the demo [in the link](https://unlimited-elements.com/image-accordion-widget-for-elementor/)
140
+
141
+ == 12. Elementor Image Shapes Widget ==
142
+
143
+ [Image Shapes For Elementor](https://unlimited-elements.com/image-shapes-for-elementor-page-builder/) - Pro Elementor Image Shapes Widget. The Image Shapes Elementor Widget allows you to make complex shape addons by clipping images using CSS to make various element layouts: circle, ellipse, polygon, and more. Check out the demo [in the link](https://unlimited-elements.com/image-shapes-for-elementor-page-builder/)
144
+
145
+ == 13. Elementor Christmas Icons Widget ==
146
+
147
+ [Christmas Icons For Elementor](https://unlimited-elements.com/christmas-icons-widget-for-elementor/) - Pro Elementor Christmas Icons Widget. Check out the demo [in the link](https://unlimited-elements.com/christmas-icons-widget-for-elementor/)
148
+
149
+ == 14. Elementor Image Reveal On Scroll Widget ==
150
+
151
+ [Image Reveal On Scroll For Elementor](https://unlimited-elements.com/image-reveal-on-scroll-widget-for-elementor) - Pro Elementor Image Reveal On Scroll Widget. The Image Reveal on Scroll widget adds an awesome reveal on scroll effect to your images to spice up your Elementor website design. Check out the demo [in the link](https://unlimited-elements.com/image-reveal-on-scroll-widget-for-elementor)
152
+
153
+ == 15. Elementor Particle Image Widget ==
154
+
155
+ [Particle Image For Elementor](https://unlimited-elements.com/image-particle-widget-for-elementor/) - Pro Elementor Particle Image Widget. Check out the demo [in the link](https://unlimited-elements.com/image-particle-widget-for-elementor/)
156
+
157
+ == 16. Elementor Morph Slider Widget ==
158
+
159
+ [Morph Slider For Elementor](https://unlimited-elements.com/morph-slider-widget-for-elementor/) - Pro Elementor Morph Slider Widget. Morphing effects slider with advanced awesome transitions. WebGL-based Image slider widget . Use it to create beautiful webpages, landing pages, and image slideshows for your Elementor website. Use advanced transitions like noise transition, displacement transition, blend transition and color mix transition to create unique designs on your website. Check out the demo [in the link](https://unlimited-elements.com/morph-slider-widget-for-elementor/)
160
+
161
+ == 17. Elementor 360 Panorama Virtual Tour Widget ==
162
+
163
+ [360 Panorama Virtual Tour For Elementor](https://unlimited-elements.com/360-panorama-virtual-tour-widget-for-elementor/) - Pro Elementor 360 Panorama Virtual Tour Widget. Create amazing virtual 360 tours on your Elementor website. Let visitors take a tour of your place remotely, and keep them engaged. Create a virtual tour, where your visitors can navigate through your place in a 360 panoramic view and get an overall idea of how it looks in reality. Add hotspots to your 360 scenes to give users more information about certain interest points. Use a wide range of customization and styling options to create the perfect panoramic 360 tour on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/360-panorama-virtual-tour-widget-for-elementor/)
164
+
165
+ == 18. Elementor Hotspots Widget ==
166
+
167
+ [Hotspots For Elementor](https://unlimited-elements.com/hotspots-for-elementor-page-builder/) - Pro Elementor Hotspots Widget. Add hotspots to your images with a tooltip an option for opening a built in popup. Each hotspot popup can contain and image and description text. Check out the demo [in the link](https://unlimited-elements.com/hotspots-for-elementor-page-builder/)
168
+
169
+ == 19. Elementor Image Zoom Magnifier Widget ==
170
+
171
+ [Image Zoom Magnifier For Elementor](https://unlimited-elements.com/image-zoom-magnifier-widget-for-elementor/) - Pro Elementor Image Zoom Magnifier Widget. Image Zoom Magnifier is a Elmentor Widget for creating a direction-aware magnifying glass effect to provide an inner zoom functionality on any given image. Enlarge images on touch, click, or mouseover. Check out the demo [in the link](https://unlimited-elements.com/image-zoom-magnifier-widget-for-elementor/)
172
+
173
+ == 20. Elementor Background Switcher Widget ==
174
+
175
+ [Background Switcher For Elementor](https://unlimited-elements.com/background-switcher-widget-for-elementor/) - Pro Elementor Background Switcher Widget. The background switcher addon lets you set up cool content boxes. When you hover over a box it will change the background for the whole section. Check out the demo [in the link](https://unlimited-elements.com/background-switcher-widget-for-elementor/)
176
+
177
+ == 21. Elementor Icon Accordion Widget ==
178
+
179
+ [Icon Accordion For Elementor](https://unlimited-elements.com/icon-accordion-widget-for-elementor/) - Pro Elementor Icon Accordion Widget. Advanced accordion addon for Elementor page builder offers multiple styles to create interactive collapsable content with multiple layouts on your page. Check out the demo [in the link](https://unlimited-elements.com/icon-accordion-widget-for-elementor/)
180
+
181
+ == 22. Elementor Before After Widget ==
182
+
183
+ [Before After For Elementor](https://unlimited-elements.com/before-after-image-comparison-widget-for-elementor/) - Pro Elementor Before After Widget. The Before & After widget is a super easy way to compare before and after images between any two images that you choose from. The Before & After widget is a perfect way to show two images side by side for a visual comparison that is both eye-catching and engaging. The comparison slider can be customized to adjust the look and feel to suit your Elementor website's look and feel. Use the widget to emphasize how your services or products work by comparing before and after photos. Check out the demo [in the link](https://unlimited-elements.com/before-after-image-comparison-widget-for-elementor/)
184
+
185
+ == 23. Elementor Icon Tabs Widget ==
186
+
187
+ [Icon Tabs For Elementor](https://unlimited-elements.com/icon-tabs-widget-for-elementor) - Pro Elementor Icon Tabs Widget. The Tab Widget for Elementor will help you show your text on your page divided into horizontal or vertical tabs. Customize your tabs using icons and make the content on your website interactive and fun to read. Check out the demo [in the link](https://unlimited-elements.com/icon-tabs-widget-for-elementor)
188
+
189
+ == 24. Elementor Shape Bullets Widget ==
190
+
191
+ [Shape Bullets For Elementor](https://unlimited-elements.com/shape-bullets-widget-for-elementor/) - Pro Elementor Shape Bullets Widget. The Shape Bullets Widget for Elementor, creates an easy-to-manage bulleted list of items. Each item can be highlighted by its own icon. Check out the demo [in the link](https://unlimited-elements.com/shape-bullets-widget-for-elementor/)
192
+
193
+ == 25. Elementor Flip Box Carousel Widget ==
194
+
195
+ [Flip Box Carousel For Elementor](https://unlimited-elements.com/flip-box-carousel-widget-for-elementor/) - Pro Elementor Flip Box Carousel Widget. Use the animated Carousel Flip Box to highlight content inside your Elementor page in an interactive way. Check out the demo [in the link](https://unlimited-elements.com/flip-box-carousel-widget-for-elementor/)
196
+
197
+ == 26. Elementor Icon Box Accordion Widget ==
198
+
199
+ [Icon Box Accordion For Elementor](https://unlimited-elements.com/icon-box-accordion-widget-for-elementor/) - Pro Elementor Icon Box Accordion Widget. Check out the demo [in the link](https://unlimited-elements.com/icon-box-accordion-widget-for-elementor/)
200
+
201
+
202
+ === Post Widgets for Elementor ===
203
+
204
+ == 1. Elementor Post Tabs Widget ==
205
+
206
+ [Post Tabs For Elementor](https://unlimited-elements.com/post-tabs-for-elementor/) - Free Elementor Post Tabs Widget. The Post Tabs widget allows you to create custom-made tab designs and display your WordPress posts in an interactive tab layout. Use the Post Tabs widget to show your most important and profitable blog pieces by sequence and category. Manage the output of your posts using the advanced post-selection to query your posts to your website visitors. Check out the demo [in the link](https://unlimited-elements.com/post-tabs-for-elementor/)
207
+
208
+ == 2. Elementor Post Accordion Widget ==
209
+
210
+ [Post Accordion For Elementor](https://unlimited-elements.com/post-accordions-for-elementor/) - Free Elementor Post Accordion Widget. The Post Accordion Widget displays WordPress posts, pages, products, or even custom post types as a unique interactive accordion layout. Create fully customized and beautiful post accordions with advanced customization and styling options. The Post Accordion widget lets you present a lot of information in a small space by collapsing and condensing the text. This is great for saving space on your Elementor web page or blog post. With the Post Accordion, visitors can scan item titles and select to expand an item only if it is relevant to their needs and read more text about the certain item. Check out the demo [in the link](https://unlimited-elements.com/post-accordions-for-elementor/)
211
+
212
+ == 3. Elementor Post Carousel Lite Widget ==
213
+
214
+ [Post Carousel Lite For Elementor](https://unlimited-elements.com/card-post-carousel-widget-for-elementor) - Free Elementor Post Carousel Lite Widget. The Post Carousel widget allows you to choose a set of posts, pages, products, or any custom post type based on category, tags, or author and present them in an interactive carousel format. Check out the demo [in the link](https://unlimited-elements.com/card-post-carousel-widget-for-elementor)
215
+
216
+ == 4. Elementor Post Blocks Widget ==
217
+
218
+ [Post Blocks For Elementor](https://unlimited-elements.com/post-blocks-widget-for-elementor) - Free Elementor Post Blocks Widget. Check out the demo [in the link](https://unlimited-elements.com/post-blocks-widget-for-elementor)
219
+
220
+ == 5. Elementor Post List Widget ==
221
+
222
+ [Post List For Elementor](https://unlimited-elements.com/post-list-widget-for-elementor) - Free Elementor Post List Widget. The Post List widget lets you display your WordPress posts in a list layout with multiple columns. You can also add advanced filtering, pagination, load more button, and even infinite scroll to any post list your desire. Check out the demo [in the link](https://unlimited-elements.com/post-list-widget-for-elementor)
223
+
224
+ == 6. Elementor Post Ticker Widget ==
225
+
226
+ [Post Ticker For Elementor](https://unlimited-elements.com/post-news-ticker-widget-for-elementor) - Free Elementor Post Ticker Widget. Display a horizontal post news ticker on your website using WordPress posts, pages, products, or any other custom post type with the help of the Post News Ticker. The Post Ticker is a widget that can show the chosen posts one at a time in the order and amount you've specified in the post query settings. This widget is greater for showcasing your news items as a post ticker on your Elementor website. Showcase the latest breaking news headlines on your website in an interactive ticker layout with the post ticker widget. Check out the demo [in the link](https://unlimited-elements.com/post-news-ticker-widget-for-elementor)
227
+
228
+ == 7. Elementor Tag Cloud Widget ==
229
+
230
+ [Tag Cloud For Elementor](https://unlimited-elements.com/tag-cloud-widget-for-elementor/) - Pro Elementor Tag Cloud Widget. Showcase your WordPress tags and categories in different ways using the Taxonomy Widget for Elementor. Tags are usually single words, and the importance of each tag is shown with font size or color. Check out the demo [in the link](https://unlimited-elements.com/tag-cloud-widget-for-elementor/)
231
+
232
+ == 8. Elementor Post Horizontal Timeline Widget ==
233
+
234
+ [Post Horizontal Timeline For Elementor](https://unlimited-elements.com/post-horizontal-timeline-widget-for-elementor/) - Pro Elementor Post Horizontal Timeline Widget. Check out the demo [in the link](https://unlimited-elements.com/post-horizontal-timeline-widget-for-elementor/)
235
+
236
+ == 9. Elementor Author List Widget ==
237
+
238
+ [Author List For Elementor](https://unlimited-elements.com/elementor-author-list-widget/) - Pro Elementor Author List Widget. Check out the demo [in the link](https://unlimited-elements.com/elementor-author-list-widget/)
239
+
240
+ == 10. Elementor Post Tile Widget ==
241
+
242
+ [Post Tile For Elementor](https://unlimited-elements.com/post-tiles-widget-for-elementor) - Pro Elementor Post Tile Widget. Check out the demo [in the link](https://unlimited-elements.com/post-tiles-widget-for-elementor)
243
+
244
+ == 11. Elementor Post Slider Widget ==
245
+
246
+ [Post Slider For Elementor](https://unlimited-elements.com/post-sliders/) - Pro Elementor Post Slider Widget. The Post Slider widget displays WordPress posts, pages, products, or even custom post types as unique interactive sliders with beautiful layouts. Display your blog posts in a beautiful slider that will catch the attention of your readers. The Posts Slider is an amazing widget that will help you highlight your post content and output the exact posts you want to show using advanced post-selection to query your widget output. Check out the demo [in the link](https://unlimited-elements.com/post-sliders/)
247
+
248
+ == 12. Elementor Post Grid Widget ==
249
+
250
+ [Post Grid For Elementor](https://unlimited-elements.com/post-grid-widget-for-elementor/) - Pro Elementor Post Grid Widget. The Post Grid widget places multiple posts in an aesthetic post grid layout. The purpose of this widget is to let you organize and display your posts on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/post-grid-widget-for-elementor/)
251
+
252
+ == 13. Elementor Post Card Slider Widget ==
253
+
254
+ [Post Card Slider For Elementor](https://unlimited-elements.com/blog-card-slider-widget-for-elementor) - Pro Elementor Post Card Slider Widget. Check out the demo [in the link](https://unlimited-elements.com/blog-card-slider-widget-for-elementor)
255
+
256
+ == 14. Elementor Post Magazine Grid Widget ==
257
+
258
+ [Post Magazine Grid For Elementor](https://unlimited-elements.com/post-magazine-grid-widget-for-elementor/) - Pro Elementor Post Magazine Grid Widget. Showcase your WordPress tags and categories in different ways using the Taxonomy Widget for Elementor. The Taxonomy Terms widget allows you to create an archive-type navigation menu using a taxonomy. The widget generates a list of the terms that belong to a specific taxonomy so that each item can be clicked to navigate easily to the term archive on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/post-magazine-grid-widget-for-elementor/)
259
+
260
+ == 15. Elementor Post Timeline Widget ==
261
+
262
+ [Post Timeline For Elementor](https://unlimited-elements.com/post-timeline-widget-for-elementor/) - Pro Elementor Post Timeline Widget. Check out the demo [in the link](https://unlimited-elements.com/post-timeline-widget-for-elementor/)
263
+
264
+ == 16. Elementor Post Scroll Widget ==
265
+
266
+ [Post Scroll For Elementor](https://unlimited-elements.com/post-scroll-widget-for-elementor) - Pro Elementor Post Scroll Widget. This Post Scroll widget is the best way to showcase all the latest posts to website visitors. The widget allows you to scroll down recently posted titles in a widget, with the posts scrolling vertically from bottom to top. This is an elegant way of presenting all your latest post content to users. Used the advanced post selection options to query your posts and showcase the exact content you want to show users. Create a post scroller for the most viewed posts or products. Use the post scroll not just for posts but also for pages, products, or any other custom post type you may have on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/post-scroll-widget-for-elementor)
267
+
268
+ == 17. Elementor Taxonomy Terms Widget ==
269
+
270
+ [Taxonomy Terms For Elementor](https://unlimited-elements.com/taxonomy-terms-widget-for-elementor/) - Pro Elementor Taxonomy Terms Widget. Showcase your WordPress tags and categories in different ways using the Taxonomy Widget for Elementor. The Taxonomy Terms widget allows you to create an archive-type navigation menu using a taxonomy. The widget generates a list of the terms that belong to a specific taxonomy so that each item can be clicked to navigate easily to the term archive on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/taxonomy-terms-widget-for-elementor/)
271
+
272
+ == 18. Elementor Post Carousel Widget ==
273
+
274
+ [Post Carousel For Elementor](https://unlimited-elements.com/post-carousels-for-elementor/) - Pro Elementor Post Carousel Widget. The Post Carousel widget allows you to quickly showcase posts, pages, products, or custom post types in a beautiful interactive carousel layout. Check out the demo [in the link](https://unlimited-elements.com/post-carousels-for-elementor/)
275
+
276
+ == 19. Elementor Masonry Post Grid Widget ==
277
+
278
+ [Masonry Post Grid For Elementor](https://unlimited-elements.com/masonry-post-grid-widget-for-elementor) - Pro Elementor Masonry Post Grid Widget. Check out the demo [in the link](https://unlimited-elements.com/masonry-post-grid-widget-for-elementor)
279
+
280
+
281
+ === Post Filters for Elementor ===
282
+
283
+ == 1. Elementor Post Pagination Widget ==
284
+
285
+ [Post Pagination For Elementor](https://unlimited-elements.com/post-pagination-widget-for-elementor/) - Free Elementor Post Pagination Widget. The post pagination widget is used in posts archive pages or with a post widget in any Elementor page. Check out the demo [in the link](https://unlimited-elements.com/post-pagination-widget-for-elementor/)
286
+
287
+ == 2. Elementor Tabs Filter Widget ==
288
+
289
+ [Tabs Filter For Elementor](https://unlimited-elements.com/tabs-filter-widget-for-elementor/) - Pro Elementor Tabs Filter Widget. The Tabs Filter is the best post filtering widget for Elementor. You can ad post filters using category and tag taxonomies. Check out the demo [in the link](https://unlimited-elements.com/tabs-filter-widget-for-elementor/)
290
+
291
+ == 3. Elementor Select Dropdown Filter Widget ==
292
+
293
+ [Select Dropdown Filter For Elementor](https://unlimited-elements.com/select-dropdown-filter-widget-for-elementor/) - Pro Elementor Select Dropdown Filter Widget. The Select Dropdown Filter is the best post filtering widget for Elementor. You can add post filters using category and tag taxonomies. Our filtering system allows users to quickly and easily find the products or posts they are looking for by selecting various options from a drop-down list directly on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/select-dropdown-filter-widget-for-elementor/)
294
+
295
+ == 4. Elementor Load More / Infinite Scroll Widget ==
296
+
297
+ [Load More / Infinite Scroll For Elementor](https://unlimited-elements.com/load-more-infinite-scroll-widget-for-elementor/) - Pro Elementor Load More / Infinite Scroll Widget. Add a load more button to your post or product grids. You can even make an infinite scroll effect that works with AJAX. Check out the demo [in the link](https://unlimited-elements.com/load-more-infinite-scroll-widget-for-elementor/)
298
+
299
+
300
+ === WooCommerce for Elementor ===
301
+
302
+ == 1. Elementor WooCommerce Product List Widget ==
303
+
304
+ [WooCommerce Product List For Elementor](https://unlimited-elements.com/woocommerce-product-list-widget-for-elementor/) - Free Elementor WooCommerce Product List Widget. Showcase your WooCommerce products in an attractive list layout with many customization options. You can choose how many products to show per page, what information to display about each product, and much more. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-product-list-widget-for-elementor/)
305
+
306
+ == 2. Elementor WooCommerce Product Grid Widget ==
307
+
308
+ [WooCommerce Product Grid For Elementor](https://unlimited-elements.com/woocommerce-product-grid-widget-for-elementor/) - Pro Elementor WooCommerce Product Grid Widget. The WooCommerce Product Grid is a powerful widget that allows you to present your products in the most appealing style on your Elementor pages. Showcase your products in multiple layouts and design the with unlimited customization possibilities. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-product-grid-widget-for-elementor/)
309
+
310
+ == 3. Elementor WooCommerce Product Carousel Widget ==
311
+
312
+ [WooCommerce Product Carousel For Elementor](https://unlimited-elements.com/woocommerce-product-carousel-widget-for-elementor) - Pro Elementor WooCommerce Product Carousel Widget. The Woocommerce product carousel helps showcase your Woocommerce products on any Elementor page in an interactive carousel format. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-product-carousel-widget-for-elementor)
313
+
314
+ == 4. Elementor WooCommerce Product Slider Widget ==
315
+
316
+ [WooCommerce Product Slider For Elementor](https://unlimited-elements.com/woocommerce-product-slider-widget-for-elementor) - Pro Elementor WooCommerce Product Slider Widget. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-product-slider-widget-for-elementor)
317
+
318
+ == 5. Elementor WooCommerce Category Grid Widget ==
319
+
320
+ [WooCommerce Category Grid For Elementor](https://unlimited-elements.com/woocommerce-category-grid-for-elemenetor/) - Pro Elementor WooCommerce Category Grid Widget. The WooCommerce Category Grid Widget helps you showcase WooCommerce categories in a responsive grid layout inside of Elementor. Set the grid number of columns in each row and the gap between the grid items to customize your WooCommerce Category Grid. The perfect solution to display your product categories on your Elementor shop page in a stylish grid layout. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-category-grid-for-elemenetor/)
321
+
322
+ == 6. Elementor WooCommerce Category Carousel Widget ==
323
+
324
+ [WooCommerce Category Carousel For Elementor](https://unlimited-elements.com/woocommerce-category-carousel-widget-for-elementor/) - Pro Elementor WooCommerce Category Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/woocommerce-category-carousel-widget-for-elementor/)
325
+
326
+
327
+ === Marketing Widgets for Elementor ===
328
+
329
+ == 1. Elementor Counter Widget ==
330
+
331
+ [Counter For Elementor](https://unlimited-elements.com/statistic-counters-for-elementor) - Free Elementor Counter Widget. Showcasing your business statistics and show fun facts and figures on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/statistic-counters-for-elementor)
332
+
333
+ == 2. Elementor Business Hours Widget ==
334
+
335
+ [Business Hours For Elementor](https://unlimited-elements.com/business-hours-widget-for-elementor) - Free Elementor Business Hours Widget. Check out the demo [in the link](https://unlimited-elements.com/business-hours-widget-for-elementor)
336
+
337
+ == 3. Elementor Call To Action Button Widget ==
338
+
339
+ [Call To Action Button For Elementor](https://unlimited-elements.com/call-to-action-button-widget-for-elementor/) - Free Elementor Call To Action Button Widget. Use the call to action button widget on your Elementor website to get visitors moving in the right direction quickly. The widget consists of many design options to make the button blend with your website design. The Call to Action widget is an effective marketing tool for Elementor users. It allows you to add CTAs throughout your website so that you can direct visitors where you want them to go. With this widget, you can create buttons with links such as, phone number, SMS, email, facebook messenger, or WhatsApp, or use just a simple link for redirecting visitors to a special offer or featured product page. Check out the demo [in the link](https://unlimited-elements.com/call-to-action-button-widget-for-elementor/)
340
+
341
+ == 4. Elementor Price List Widget ==
342
+
343
+ [Price List For Elementor](https://unlimited-elements.com/price-list-widget-for-elementor/) - Free Elementor Price List Widget. Using the Price List widget create stunning pricing menus on your Elementor website. This widget is great for restaurant menus or even showing your products or services with price tags. The widget displays a list of items, services, or anything else you want and is highly customizable! The Price List widget allows you to create beautiful, professional catalogs and menus that list pricing information. Display prices in the form of beautiful lists with the Price List Widget for Elementor. Check out the demo [in the link](https://unlimited-elements.com/price-list-widget-for-elementor/)
344
+
345
+ == 5. Elementor Event Box Widget ==
346
+
347
+ [Event Box For Elementor](https://unlimited-elements.com/event-box-widget-for-elementor) - Free Elementor Event Box Widget. Showcase events & special occasions on your websites using this unique Elementor addon. Check out the demo [in the link](https://unlimited-elements.com/event-box-widget-for-elementor)
348
+
349
+ == 6. Elementor Notification Widget ==
350
+
351
+ [Notification For Elementor](https://unlimited-elements.com/notification-widget-for-elementor) - Free Elementor Notification Widget. The Notification widget enables you to display a colored alert box and draw attention to important messages on your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/notification-widget-for-elementor)
352
+
353
+ == 7. Elementor Timer Countdown Widget ==
354
+
355
+ [Timer Countdown For Elementor](https://unlimited-elements.com/timer-countdowns-for-elementor-page-builder/) - Free Elementor Timer Countdown Widget. Instantly create a beautiful, animated countdown clock addon, to share on your Elementor website. Count down to a date with your own unique timer. Check out the demo [in the link](https://unlimited-elements.com/timer-countdowns-for-elementor-page-builder/)
356
+
357
+ == 8. Elementor Pricing Table Widget ==
358
+
359
+ [Pricing Table For Elementor](https://unlimited-elements.com/pricing-table-widget-for-elementor/) - Free Elementor Pricing Table Widget. The Pricing Table widget makes it easy to create beautiful, readable pricing tables for your website. With loads of customization options, you can make your pricing tables eye-catching and interactive, boosting conversions on your site. Enhance the layout and appearance of the pricing table with just a few clicks and make it look great on your Elementor website. You can effortlessly customize the header, features, price, badge, button, and even the pricing table’s footer to your liking. Change the currency, price, or symbol, or with ease, and adjust the content of the pricing table to match your website packages. Check out the demo [in the link](https://unlimited-elements.com/pricing-table-widget-for-elementor/)
360
+
361
+ == 9. Elementor Overlay Product Box Widget ==
362
+
363
+ [Overlay Product Box For Elementor](https://unlimited-elements.com/overlay-product-box-widget-for-elementor/) - Free Elementor Overlay Product Box Widget. Check out the demo [in the link](https://unlimited-elements.com/overlay-product-box-widget-for-elementor/)
364
+
365
+ == 10. Elementor Product Card Widget ==
366
+
367
+ [Product Card For Elementor](http://unlimited-elements.com/food-menu-box-widget-for-elementor/) - Free Elementor Product Card Widget. Check out the demo [in the link](http://unlimited-elements.com/food-menu-box-widget-for-elementor/)
368
+
369
+ == 11. Elementor Review Box Widget ==
370
+
371
+ [Review Box For Elementor](https://unlimited-elements.com/review-box-widget-for-elementor) - Free Elementor Review Box Widget. Simply create and display reviews on your Elementor website to build customers’ trust and increase SEO. Check out the demo [in the link](https://unlimited-elements.com/review-box-widget-for-elementor)
372
+
373
+ == 12. Elementor List Widget ==
374
+
375
+ [List For Elementor](https://unlimited-elements.com/list-widget-for-elementor/) - Free Elementor List Widget. Create styled ordered and unordered lists easily. The ordered list will add index numbers automatically to your list items. Check out the demo [in the link](https://unlimited-elements.com/list-widget-for-elementor/)
376
+
377
+ == 13. Elementor Product Box Widget ==
378
+
379
+ [Product Box For Elementor](https://unlimited-elements.com/price-label-product-box-widget-for-elementor/) - Free Elementor Product Box Widget. Check out the demo [in the link](https://unlimited-elements.com/price-label-product-box-widget-for-elementor/)
380
+
381
+ == 14. Elementor Copy Coupon Code Widget ==
382
+
383
+ [Copy Coupon Code For Elementor](https://unlimited-elements.com/copy-coupon-code-widget-for-elementor) - Pro Elementor Copy Coupon Code Widget. Click to copy the coupon code to the clipboard. This widget makes it easy for users to redeem your promotions coupon codes. Giveaways, marketing, and more can all benefit from the Coupon Code Widget that will help you turn more visitors into sales. Create engaging, beautiful, and highly-targeting discount code sections and coupon popups for website and product promotions. Simply input the phrase of your button, the text you want to reveal, and the URL – and our easy-to-use widget will produce a reveal button for you to use on your Elementor website. With this Elementor widget, you can effortlessly convert more visitors into purchasers. Generate more leads, sales, or email subscribers by creating adding the Copy Coupon Code to your website. Check out the demo [in the link](https://unlimited-elements.com/copy-coupon-code-widget-for-elementor)
384
+
385
+ == 15. Elementor Timer Countdown Banner Widget ==
386
+
387
+ [Timer Countdown Banner For Elementor](https://unlimited-elements.com/timer-countdown-banner-widget-for-elementor) - Pro Elementor Timer Countdown Banner Widget. An awesome countdown banner with a a call to action button. Check out the demo [in the link](https://unlimited-elements.com/timer-countdown-banner-widget-for-elementor)
388
+
389
+ == 16. Elementor Review Carousel Widget ==
390
+
391
+ [Review Carousel For Elementor](https://unlimited-elements.com/card-testimonial-review-carousel-widget-for-elementor) - Pro Elementor Review Carousel Widget. The Reviews Carousel increases the visibility reviews you want to highlight to your users by letting you display them throughout your site in an interactive carousel format. Check out the demo [in the link](https://unlimited-elements.com/card-testimonial-review-carousel-widget-for-elementor)
392
+
393
+ == 17. Elementor List Marquee Widget ==
394
+
395
+ [List Marquee For Elementor](https://unlimited-elements.com/list-marquee-widget-for-elementor/) - Pro Elementor List Marquee Widget. Check out the demo [in the link](https://unlimited-elements.com/list-marquee-widget-for-elementor/)
396
+
397
+ == 18. Elementor Pricing Table Flip Box Widget ==
398
+
399
+ [Pricing Table Flip Box For Elementor](https://unlimited-elements.com/pricing-flip-box-widget-for-elementor/) - Pro Elementor Pricing Table Flip Box Widget. The Pricing Table Flip Box allows you to showcase the prices for your products, services, or packages in a beautiful flip box pricing table. Check out the demo [in the link](https://unlimited-elements.com/pricing-flip-box-widget-for-elementor/)
400
+
401
+ == 19. Elementor Floating Chat Buttons Widget ==
402
+
403
+ [Floating Chat Buttons For Elementor](https://unlimited-elements.com/floating-chat-buttons-widget-for-elementor) - Pro Elementor Floating Chat Buttons Widget. Floating action buttons that display the primary actions in your Elementor website. Provide quick access to social icons or any important or common actions to increase conversions. Check out the demo [in the link](https://unlimited-elements.com/floating-chat-buttons-widget-for-elementor)
404
+
405
+ == 20. Elementor Event List Widget ==
406
+
407
+ [Event List For Elementor](https://unlimited-elements.com/event-list-widget-for-elementor/) - Pro Elementor Event List Widget. The event list widget is a way to easily show your recent events like concerts, conferences, parties or special occasions. Check out the demo [in the link](https://unlimited-elements.com/event-list-widget-for-elementor/)
408
+
409
+ == 21. Elementor Price Box Widget ==
410
+
411
+ [Price Box For Elementor](https://unlimited-elements.com/price-box-widget-for-elementor/) - Pro Elementor Price Box Widget. Check out the demo [in the link](https://unlimited-elements.com/price-box-widget-for-elementor/)
412
+
413
+ == 22. Elementor Icon Mobile Menu Widget ==
414
+
415
+ [Icon Mobile Menu For Elementor](https://unlimited-elements.com/icon-mobile-menu-for-elementor) - Pro Elementor Icon Mobile Menu Widget. A perfect way to add an icon menu for making your CTA buttons stand out for website visitors using mobile devices. Check out the demo [in the link](https://unlimited-elements.com/icon-mobile-menu-for-elementor)
416
+
417
+ == 23. Elementor Pricing Plans Widget ==
418
+
419
+ [Pricing Plans For Elementor](https://unlimited-elements.com/pricing-plans-widget-for-elementor) - Pro Elementor Pricing Plans Widget. Use the Pricing Plans widget to display all the information to your potential clients in the clearest and comparable way and help them make a choice. Check out the demo [in the link](https://unlimited-elements.com/pricing-plans-widget-for-elementor)
420
+
421
+ == 24. Elementor Product Bullets Widget ==
422
+
423
+ [Product Bullets For Elementor](https://unlimited-elements.com/product-bullets-widget-for-elementor) - Pro Elementor Product Bullets Widget. Check out the demo [in the link](https://unlimited-elements.com/product-bullets-widget-for-elementor)
424
+
425
+ == 25. Elementor Product Highlights Widget ==
426
+
427
+ [Product Highlights For Elementor](https://unlimited-elements.com/two-column-product-bullets-widget-for-elementor/) - Pro Elementor Product Highlights Widget. Design a visually attractive product feature lists that will help your potential buyers to make purchase decision and learn more about your products. Check out the demo [in the link](https://unlimited-elements.com/two-column-product-bullets-widget-for-elementor/)
428
+
429
+ == 26. Elementor Memory Game Widget ==
430
+
431
+ [Memory Game For Elementor](https://unlimited-elements.com/memory-game-widget-for-elementor) - Pro Elementor Memory Game Widget. Check out the demo [in the link](https://unlimited-elements.com/memory-game-widget-for-elementor)
432
+
433
+ == 27. Elementor Unlimited Google Maps Widget ==
434
+
435
+ [Unlimited Google Maps For Elementor](https://unlimited-elements.com/google-maps-widget-for-elementor) - Pro Elementor Unlimited Google Maps Widget. Display beautiful google maps with multiple markers on your Elementor website in a matter of seconds. Check out the demo [in the link](https://unlimited-elements.com/google-maps-widget-for-elementor)
436
+
437
+ == 28. Elementor WhatsApp Chat Widget ==
438
+
439
+ [WhatsApp Chat For Elementor](https://unlimited-elements.com/whatsapp-chat-widget-for-elementor) - Pro Elementor WhatsApp Chat Widget. A floating WhatsApp button that allows your website visitors to start a chat conversation from your website directly to your WhatsApp phone number with just one click. Check out the demo [in the link](https://unlimited-elements.com/whatsapp-chat-widget-for-elementor)
440
+
441
+ == 29. Elementor Product Carousel Widget ==
442
+
443
+ [Product Carousel For Elementor](https://unlimited-elements.com/product-carousel-widget-for-elementor) - Pro Elementor Product Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/product-carousel-widget-for-elementor)
444
+
445
+
446
+ === Dynamic Loops for Elementor ===
447
+
448
+ == 1. Elementor Dynamic Template Grid Widget ==
449
+
450
+ [Dynamic Template Grid For Elementor](https://unlimited-elements.com/dynamic-template-grid-widget-for-elementor/) - Pro Elementor Dynamic Template Grid Widget. Check out the demo [in the link](https://unlimited-elements.com/dynamic-template-grid-widget-for-elementor/)
451
+
452
+ == 2. Elementor Dynamic Template Carousel Widget ==
453
+
454
+ [Dynamic Template Carousel For Elementor](https://unlimited-elements.com/dynamic-template-carousel-widget-for-elementor/) - Pro Elementor Dynamic Template Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/dynamic-template-carousel-widget-for-elementor/)
455
+
456
+ == 3. Elementor Dynamic Template Tabs Widget ==
457
+
458
+ [Dynamic Template Tabs For Elementor](https://unlimited-elements.com/dynamic-template-tabs-widget-for-elementor/) - Pro Elementor Dynamic Template Tabs Widget. The Dynamic Template Tabs widget allows you to design a loop item from a single post template and create an interactive tabs layout to showcase posts with custom fields and layout. Check out the demo [in the link](https://unlimited-elements.com/dynamic-template-tabs-widget-for-elementor/)
459
+
460
+ == 4. Elementor Dynamic Template Slider Widget ==
461
+
462
+ [Dynamic Template Slider For Elementor](https://unlimited-elements.com/dynamic-template-slider-widget-for-elementor) - Pro Elementor Dynamic Template Slider Widget. Check out the demo [in the link](https://unlimited-elements.com/dynamic-template-slider-widget-for-elementor)
463
+
464
+ == 5. Elementor Dynamic Template Accordion Widget ==
465
+
466
+ [Dynamic Template Accordion For Elementor](https://unlimited-elements.com/dynamic-template-accordion-widget-for-elementor/) - Pro Elementor Dynamic Template Accordion Widget. Check out the demo [in the link](https://unlimited-elements.com/dynamic-template-accordion-widget-for-elementor/)
467
+
468
+
469
+ === Remote Control Widgets for Elementor ===
470
+
471
+ == 1. Elementor Remote Arrows Widget ==
472
+
473
+ [Remote Arrows For Elementor](https://unlimited-elements.com/remote-arrows-widget-for-elementor/) - Free Elementor Remote Arrows Widget. Use the Remote Control Arrows widget to control navigation in interactive widgets such as sliders, carousels, accordions, tabs, and more. Now you have ultimate flexibility over your arrow navigation styles and you can create multiple layouts by editing the settings. Create vertical and horizontal arrow navigation and connect to any widget inside of the Unlimited Elements widget library. Check out the demo [in the link](https://unlimited-elements.com/remote-arrows-widget-for-elementor/)
474
+
475
+ == 2. Elementor Remote Bullets Widget ==
476
+
477
+ [Remote Bullets For Elementor](https://unlimited-elements.com/remote-bullets-widget-for-elementor/) - Free Elementor Remote Bullets Widget. Change between slides with the help of the Remote Bullets widget. Use the Remote control bullets to control navigation in interactive widgets such as sliders, carousels, accordions, tabs, and more. Enable numbers in your bullets to make the navigation dots have a pagination look and feel. Style the bullets vertically or horizontally to achieve the exact layout you need on your website. Check out the demo [in the link](https://unlimited-elements.com/remote-bullets-widget-for-elementor/)
478
+
479
+ == 3. Elementor Remote Counter Widget ==
480
+
481
+ [Remote Counter For Elementor](https://unlimited-elements.com/remote-counter-widget-for-elementor/) - Free Elementor Remote Counter Widget. Check out the demo [in the link](https://unlimited-elements.com/remote-counter-widget-for-elementor/)
482
+
483
+ == 4. Elementor Remote Play Pause Widget ==
484
+
485
+ [Remote Play Pause For Elementor](https://unlimited-elements.com/remote-control-widgets) - Free Elementor Remote Play Pause Widget. Check out the demo [in the link](https://unlimited-elements.com/remote-control-widgets)
486
+
487
+ == 5. Elementor Remote Tabs Widget ==
488
+
489
+ [Remote Tabs For Elementor](https://unlimited-elements.com/remote-tabs-widget-for-elementor) - Pro Elementor Remote Tabs Widget. Control your content using remote control tabs to create advanced interactive layouts. Break your website content into multiple tabs that can be folded and unfolded to organize the content and make the user's experience more friendly. Use the Remote Tabs to control other widgets and trigger specific items open. Can connect to a variety of different widgets like accordions, tabs, carousels, and sliders. Check out the demo [in the link](https://unlimited-elements.com/remote-tabs-widget-for-elementor)
490
+
491
+ == 6. Elementor Remote Link Widget ==
492
+
493
+ [Remote Link For Elementor](https://unlimited-elements.com/remote-link-widget-for-elementor) - Pro Elementor Remote Link Widget. Remote Link widget helps navigate to specific items inside of interactive widgets. Create advanced flexible layouts with full design control by creating a link that will help users find the content they want to read faster. Use the Remote Link widget to activate specific items in carousels, sliders, accordions and tabs. Check out the demo [in the link](https://unlimited-elements.com/remote-link-widget-for-elementor)
494
+
495
+ == 7. Elementor Remote Item Navigation Widget ==
496
+
497
+ [Remote Item Navigation For Elementor](https://unlimited-elements.com/remote-item-navigation-widget-for-elementor/) - Pro Elementor Remote Item Navigation Widget. Remote Item Navigation widget helps to build advanced layouts together with interactive widgets. Create customized navigation buttons for the layout of your widgets to create flexible designed layouts. Use Icons, Images, or Text for the navigation buttons and style them according to your website's look and feel. Control navigation in interactive widgets such as sliders, carousels, accordions, tabs, and more. Check out the demo [in the link](https://unlimited-elements.com/remote-item-navigation-widget-for-elementor/)
498
+
499
+
500
+ === Menu Widgets for Elementor ===
501
+
502
+ == 1. Elementor Fullscreen Menu Widget ==
503
+
504
+ [Fullscreen Menu For Elementor](https://unlimited-elements.com/fullscreen-menu-widget-for-elementor/) - Free Elementor Fullscreen Menu Widget. Create an awesome Elementor Full-Screen Menu​ easily using this widget. The easiest way to add a hamburger icon that triggers a fullscreen menu overlay with a close button. Check out the demo [in the link](https://unlimited-elements.com/fullscreen-menu-widget-for-elementor/)
505
+
506
+ == 2. Elementor List Menu Widget ==
507
+
508
+ [List Menu For Elementor](https://unlimited-elements.com/simple-list-menu-widget-for-elementor) - Free Elementor List Menu Widget. The List Menu widget is a responsive and free WordPress menu for Elementor. You can easily use the widget to add an awesome menu to your website and improve website navigation. It is easy to customize and configure. Check out the demo [in the link](https://unlimited-elements.com/simple-list-menu-widget-for-elementor)
509
+
510
+ == 3. Elementor Mega Menu Widget ==
511
+
512
+ [Mega Menu For Elementor](https://unlimited-elements.com/mega-menu-widget-for-elementor/) - Pro Elementor Mega Menu Widget. Create a unique Mega Menu on your website by adding images, icons, maps, or any other Elementor widget to your menu. Create any sort of Mega Menu layout directly inside of the Elementor page builder. Use sections as menu items and design with no limits. Use the Mega Menu Inner Links widget to create the layouts for your Mega Menu items easily with maximum design flexibility. We made it easy to design your Mega Menu item dropdowns just drag and drop widgets to your section and connect to a menu item using an ID. The Mega Menu widget is simple to use and doesn’t require any technical expertise. With just a few quick clicks, you can modify the widget to fit your needs using our straightforward settings. Check out the demo [in the link](https://unlimited-elements.com/mega-menu-widget-for-elementor/)
513
+
514
+ == 4. Elementor Mega Menu Inner Links Widget ==
515
+
516
+ [Mega Menu Inner Links For Elementor](https://unlimited-elements.com/mega-menu-inner-links-widget-for-elementor/) - Pro Elementor Mega Menu Inner Links Widget. The ultimate widget for adding Inner Links into your Mega Menu. Use the Mega Menu Inner Links widget to create the layouts for your Mega Menu items easily with maximum design flexibility. Each link can have an icon or image, title and description. Check out the demo [in the link](https://unlimited-elements.com/mega-menu-inner-links-widget-for-elementor/)
517
+
518
+ == 5. Elementor Side Menu Widget ==
519
+
520
+ [Side Menu For Elementor](http://unlimited-elements.com/side-menu-widget-for-elementor) - Pro Elementor Side Menu Widget. Off Canvas sidebar with a WordPress menu inside that can include icon links and a search bar. Use the toggle button to open the side menu and the close icon to close it. Check out the demo [in the link](http://unlimited-elements.com/side-menu-widget-for-elementor)
521
+
522
+ == 6. Elementor Liquid Full Screen Menu Widget ==
523
+
524
+ [Liquid Full Screen Menu For Elementor](https://unlimited-elements.com/liquid-fullscreen-menu-widget-for-elementor) - Pro Elementor Liquid Full Screen Menu Widget. A toggle button that animates into a fullscreen menu with a trendy liquid goo effect.
525
+
526
+ Code Credit:
527
+ https://github.com/ykob/shape-overlays Check out the demo [in the link](https://unlimited-elements.com/liquid-fullscreen-menu-widget-for-elementor)
528
+
529
+ == 7. Elementor One Page Scroll Navigation Widget ==
530
+
531
+ [One Page Scroll Navigation For Elementor](https://unlimited-elements.com/one-page-scroll-navigation-widget-for-elementor) - Pro Elementor One Page Scroll Navigation Widget. The best one-page scroll navigation menu solution for Elementor one-page websites. An advanced navigation widget that helps you create a smooth scrolling experience for your, website visitors. Help your website visitors navigate easily & improve the user experience on your Elementor website. The One Page Scroll Navigation widget is super-easy to configure. You can easily add a section ID to each anchor link and set up your one-page website within a few minutes. Check out the demo [in the link](https://unlimited-elements.com/one-page-scroll-navigation-widget-for-elementor)
532
+
533
+ == 8. Elementor Circle Menu Widget ==
534
+
535
+ [Circle Menu For Elementor](http://unlimited-elements.com/circle-menu-widget-for-elementor) - Pro Elementor Circle Menu Widget. The circle menu widget is a circular layout that distributes links evenly around its radius. Create a radial menu design on your Elementor website in just seconds. You can achieve different circle navigation menu variations using the styling options. Display your call-to-action links in a circular format to create a trendy and unique look and feel for your Elementor website. The circle menu can be used for social links, inner links on your website, or even contact links for a user profile. Check out the demo [in the link](http://unlimited-elements.com/circle-menu-widget-for-elementor)
536
+
537
+ == 9. Elementor Accordion Menu Widget ==
538
+
539
+ [Accordion Menu For Elementor](https://unlimited-elements.com/accordion-menu-widget-for-elementor) - Pro Elementor Accordion Menu Widget. This widget is an excellent way of adding an interactive accordion menu to your Elementor website. It works with the WordPress menu system and allows you to create attractive accordion menus with just a couple of clicks. Check out the demo [in the link](https://unlimited-elements.com/accordion-menu-widget-for-elementor)
540
+
541
+
542
+ === Content Widgets for Elementor ===
543
+
544
+ == 1. Elementor Content Accordion Widget ==
545
+
546
+ [Content Accordion For Elementor](https://unlimited-elements.com/content-accordion-widget-for-elementor/) - Free Elementor Content Accordion Widget. Display your website content in an interactive accordion widget. Load Elementor templates into your accordion items to create advanced accordion layouts. Each accordion-item can be assigned its own template to create a versatile design. Sync together two or more item-based widgets to create advanced creative layouts that will blow your website visitor’s minds. Create the layouts you have always dreamt of without needing a single line of code. Use remote control widgets to let users navigate between different accordion items. The remote controls will make the user experience on your Elementor website more unique and more friendly. Check out the demo [in the link](https://unlimited-elements.com/content-accordion-widget-for-elementor/)
547
+
548
+ == 2. Elementor Content Tabs Widget ==
549
+
550
+ [Content Tabs For Elementor](https://unlimited-elements.com/content-tabs-widget-for-elementor/) - Free Elementor Content Tabs Widget. The Content Tabs widget allows users to navigate various types of content on your website in an interactive tabs layout. Create a collection of headings in one content area, each connected header in the list can activate a different content area associated with it by click. Use tabs to break your content down into multiple parts that may be collapsed and expanded to make the page more tidy and user-friendly. Check out the demo [in the link](https://unlimited-elements.com/content-tabs-widget-for-elementor/)
551
+
552
+ == 3. Elementor Unfold Content Widget ==
553
+
554
+ [Unfold Content For Elementor](https://unlimited-elements.com/unfold-content-widget-for-elementor/) - Pro Elementor Unfold Content Widget. The Unfold Content widget is one of the space-saving widgets that may help you organize the look of your page by hiding long content that doesn't have to be shown by default. Check out the demo [in the link](https://unlimited-elements.com/unfold-content-widget-for-elementor/)
555
+
556
+ == 4. Elementor Unlimited Grid Widget ==
557
+
558
+ [Unlimited Grid For Elementor](https://unlimited-elements.com/unlimited-grid-widget-for-elementor/) - Pro Elementor Unlimited Grid Widget. Create advanced content layouts using an easy-to-use grid system with ultimate flexibility. Check out the demo [in the link](https://unlimited-elements.com/unlimited-grid-widget-for-elementor/)
559
+
560
+ == 5. Elementor Content Switcher Widget ==
561
+
562
+ [Content Switcher For Elementor](https://unlimited-elements.com/content-switcher-widget-for-elementor/) - Pro Elementor Content Switcher Widget. Allow users to switch between two or more types of content using interactive toggle buttons. You can even load Elementor templates as content to make advanced content switcher layouts. The content switcher is ideal for showcasing pricing tables, and pricing plans on your website. You can switch between different content types like images, and text, or even use Elementor templates for the content. Check out the demo [in the link](https://unlimited-elements.com/content-switcher-widget-for-elementor/)
563
+
564
+ == 6. Elementor Content Slider Widget ==
565
+
566
+ [Content Slider For Elementor](https://unlimited-elements.com/content-slider-widget-for-elementor) - Pro Elementor Content Slider Widget. Content slider is the most extensive and user-friendly Elementor widget for building amazing sliders. Create stunning animated sliders inside of your web designs in seconds. Check out the demo [in the link](https://unlimited-elements.com/content-slider-widget-for-elementor)
567
+
568
+ == 7. Elementor Content Carousel Widget ==
569
+
570
+ [Content Carousel For Elementor](https://unlimited-elements.com/content-carousel-widget-for-elementor/) - Pro Elementor Content Carousel Widget. Content carousel allows you to create an interactive carousel where the content for each slide can be anything you want: images, text, HTML, and even Elementor templates. Check out the demo [in the link](https://unlimited-elements.com/content-carousel-widget-for-elementor/)
571
+
572
+ == 8. Elementor Content Grid Widget ==
573
+
574
+ [Content Grid For Elementor](https://unlimited-elements.com/content-grid-widget-for-elementor/) - Pro Elementor Content Grid Widget. Check out the demo [in the link](https://unlimited-elements.com/content-grid-widget-for-elementor/)
575
+
576
+ == 9. Elementor Content Ticker Widget ==
577
+
578
+ [Content Ticker For Elementor](https://unlimited-elements.com/content-ticker-widget-for-elementor/) - Pro Elementor Content Ticker Widget. Check out the demo [in the link](https://unlimited-elements.com/content-ticker-widget-for-elementor/)
579
+
580
+
581
+ === Carousel Widgets for Elementor ===
582
+
583
+ == 1. Elementor Card Carousel Widget ==
584
+
585
+ [Card Carousel For Elementor](https://unlimited-elements.com/card-carousel-widget-for-elementor/) - Free Elementor Card Carousel Widget. Use the card carousel widget to display two or more pieces of content in a carousel format. Create any kind of carousel you can think about. Check out the demo [in the link](https://unlimited-elements.com/card-carousel-widget-for-elementor/)
586
+
587
+ == 2. Elementor Coverflow Carousel Widget ==
588
+
589
+ [Coverflow Carousel For Elementor](https://unlimited-elements.com/coverflow-carousel-widget-for-elementor/) - Pro Elementor Coverflow Carousel Widget. Coverflow carousel is a special kind of widget, that shows slides next to each other with a 3D effect and a reflection. This widget supports 4 different styles: Coverflow, Flat, Wheel, and Carousel. Check out the demo [in the link](https://unlimited-elements.com/coverflow-carousel-widget-for-elementor/)
590
+
591
+ == 3. Elementor Icon Carousel Widget ==
592
+
593
+ [Icon Carousel For Elementor](https://unlimited-elements.com/icon-carousel-widget-for-elementor/) - Pro Elementor Icon Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/icon-carousel-widget-for-elementor/)
594
+
595
+ == 4. Elementor Image Card Carousel Widget ==
596
+
597
+ [Image Card Carousel For Elementor](https://unlimited-elements.com/image-card-carousel-widget-for-elementor) - Pro Elementor Image Card Carousel Widget. The Image Card Carousel allows you to quickly add beautiful images in an interactive carousel layout with a title, text, and button on each card. You can style every element to make your carousel more appealing and add dot or arrow navigation to control the carousel. This widget is the best solution to create an advanced-looking carousel inside of your Elementor website. Check out the demo [in the link](https://unlimited-elements.com/image-card-carousel-widget-for-elementor)
598
+
599
+ == 5. Elementor Material Carousel Widget ==
600
+
601
+ [Material Carousel For Elementor](https://unlimited-elements.com/material-carousel-widget-for-elementor/) - Pro Elementor Material Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/material-carousel-widget-for-elementor/)
602
+
603
+ == 6. Elementor Overlay Carousel Widget ==
604
+
605
+ [Overlay Carousel For Elementor](https://unlimited-elements.com/overlay-carousel-widget-for-elementor) - Pro Elementor Overlay Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/overlay-carousel-widget-for-elementor)
606
+
607
+ == 7. Elementor Swipe Carousel Widget ==
608
+
609
+ [Swipe Carousel For Elementor](https://unlimited-elements.com/swipe-css-carousel-widget-for-elementor/) - Pro Elementor Swipe Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/swipe-css-carousel-widget-for-elementor/)
610
+
611
+ == 8. Elementor Portfolio Carousel Widget ==
612
+
613
+ [Portfolio Carousel For Elementor](https://unlimited-elements.com/portfolio-carousel-widget-for-elementor/) - Pro Elementor Portfolio Carousel Widget. Check out the demo [in the link](https://unlimited-elements.com/portfolio-carousel-widget-for-elementor/)
614
+
615
+ == 9. Elementor Justified Image Carousel Widget ==
616
+
617
+ [Justified Image Carousel For Elementor](https://unlimited-elements.com/justified-image-carousel-widget-for-elementor/) - Pro Elementor Justified Image Carousel Widget. Show images with different width dimensions all in the same height in an interactive carousel with arrow and dot navigation. Present your photos in all their glory, without cropping them, and create a beautiful justified image carousel on your Elementor Website. Connect the Justified Image Carousel to Remote Control Widgets and create advanced layouts with unlimited possibilities. Check out the demo [in the link](https://unlimited-elements.com/justified-image-carousel-widget-for-elementor/)
618
+
619
+
620
+ === Media Widgets for Elementor ===
621
+
622
+ == 1. Elementor Slider Gallery Widget ==
623
+
624
+ [Slider Gallery For Elementor](https://unlimited-elements.com/slider-gallery-widget-for-elementor/) - Free Elementor Slider Gallery Widget. Beautifully Designed, Powerful, and easy to Customize Slider Gallery for Elementor. Add multiple images to your slider gallery and use multiple gallery sources such as posts, products, Instagram images, video items, or an ACF gallery field to populate your Slider Gallery widget. You can present the images in an eye-catching slider with tons of customization and styling options. Draw attention to your photos, videos, and products in a beautiful image or video slider gallery. Choose your slide transition speed and transition style. Connect the Slider Gallery to Remote Control Widgets to create advanced layouts with unlimited possibilities. Check out the demo [in the link](https://unlimited-elements.com/slider-gallery-widget-for-elementor/)
625
+
626
+ == 2. Elementor Random Image Widget ==
627
+
628
+ [Random Image For Elementor](https://unlimited-elements.com/random-image-widget-for-elementor/) - Free Elementor Random Image Widget. Create a sequence of images to display a random image on your webpage each time the page is loaded. The widget shows a randomly picked image from a list of images defined by items. Each specific image can be linked using the link field. Each image can have a title showing before or after the image. Check out the demo [in the link](https://unlimited-elements.com/random-image-widget-for-elementor/)
629
+
630
+ == 3. Elementor Tile Gallery Widget ==
631
+
632
+ [Tile Gallery For Elementor](https://unlimited-elements.com/tile-gallery-widget-for-elementor/) - Free Elementor Tile Gallery Widget. This widget is an effective tool for adding a tile grid image gallery slider to your website. The gallery lets you navigate using bullets or arrows and o