{"html":"<div id=\"{{uc_id}}-wrapper\">\n  <div id=\"{{uc_id}}\" class=\"uc-items-wrapper{{uc_filtering_addclass}}\" data-custom-sethtml=\"true\" {{uc_filtering_attributes|raw}}>\n    {{put_items()}}  \n  <\/div>\n<\/div>","html_item":"{{ucfunc(\"put_unite_gallery_item\",item.images)}}","css":"#{{uc_id}}-wrapper{\n  min-height: 1px;\n}\n\n#{{uc_id}}{\n  margin:0 auto;\n  direction:{{direction}};\n  display: none;\n}\n\n{% if show_play_icon_always == \"true\" %}\n#{{uc_id}} .uc-video{\n  opacity: 1 !important;\n}\n{% endif %}","js":"{{ ucfunc(\"put_docready_start\") }}\n\t\t\n  var objWrapper = jQuery(\"#{{uc_id}}\");\n  var objParentElementorAccordion = objWrapper.parents(\".e-n-accordion\");\n  var isUnderElementorAccordion = objParentElementorAccordion && objParentElementorAccordion.length > 0;\n  var api;\n  \n  var options = {\n      gallery_theme:\"tilesgrid\",\n      grid_num_rows:{{grid_num_rows}},\n      grid_num_rows_tablet: 2,\n\t  grid_num_rows_mobile: 1,\n      gallery_width:\"{{gallery_width}}\",\n      tile_width: {{tile_width_nounit}},\n      tile_height: {{tile_height_nounit}},\n      grid_space_between_rows: {{grid_space_between_rows_nounit}},\n      grid_space_between_cols: {{grid_space_between_cols_nounit}},\n      tile_show_video_play_icons_always: {{show_play_icon_always}},\n      tiles_align:\"{{tiles_align}}\",\n      tile_as_link: {{tile_as_link}},\n      tile_link_newpage: {{tile_link_newpage}},\n      tile_enable_icons: {{tile_enable_icons}},\n      tile_overlay_opacity: {{tile_overlay_opacity_nounit}},\n      tile_overlay_color: \"{{tile_overlay_color}}\", \n      theme_navigation_type: \"{{theme_navigation_type}}\",\n      theme_navigation_arrows_type: \"{{arrows_icon_type}}\",\t\/\/default, custom - type of the arrows\n\t  theme_navigation_arrows_next_icon: \"{{arrows_icon_next_html|ucsafe|raw}}\",\t\/\/next icon (if custom)\n\t  theme_navigation_arrows_prev_icon: \"{{arrows_icon_prev_html|ucsafe|raw}}\",\t\/\/prev icon (if custom)\n\t  theme_navigation_arrows_icon_size: {{arrows_icon_size_nounit}},\t\/\/size of the arrows\n      theme_navigation_arrows_btn_size: {{arrows_btn_size_nounit}},\t\/\/size of the arrows\n\t  theme_navigation_arrows_icon_color: \"{{arrows_icon_color}}\",\t\/\/color of the arrow icons\n\t  theme_navigation_arrows_bg_color: \"{{arrows_icon_bg_color}}\",\t\/\/color of the arrow bg\n\t  theme_navigation_arrows_border_radius: 4,\t\/\/border radius of the arrows  \n      tile_icon_type: \"{{tile_icons_type}}\",\t\t\t\t\/\/tile icon type: default \/ custom\n\t  tile_zoom_icon_color: \"{{zoom_icon_color_def}}\",      \/\/tile icon color\n\t  tile_play_icon_color: \"{{play_icon_color_def}}\",      \/\/tile icon color\n\t  tile_link_icon_color: \"{{link_icon_color_def}}\",      \/\/tile icon color\n\t  tile_zoom_icon_custom: \"{{tile_zoom_icon_custom_html|ucsafe|raw}}\",\t\t\t\t\/\/tile zoom icon type: default \/ custom\n\t  tile_play_icon_custom: \"{{tile_play_icon_custom_html|ucsafe|raw}}\",\t\t\t\t\/\/tile play icon type: default \/ custom\n\t  tile_link_icon_custom: \"{{tile_link_icon_custom_html|ucsafe|raw}}\",\t\t\t\t\/\/tile link icon type: default \/ custom  \n\n      theme_bullets_margin_top: {{theme_bullets_margin_top}},\n      theme_bullets_color: \"{{theme_bullets_color}}\",\n      bullets_space_between: {{bullets_space_between}},\n      theme_arrows_margin_top: {{theme_arrows_margin_top_nounit}},\t\t\t\n      theme_space_between_arrows: {{theme_space_between_arrows_nounit}},\n      theme_navigation_align: \"{{theme_navigation_align}}\",\n      tiles_min_columns: 1,                           \n\n      tile_enable_textpanel:{{tile_enable_textpanel}},\n      tile_textpanel_always_on: {{tile_textpanel_always_on}},\n      tile_textpanel_appear_type: \"{{tile_textpanel_appear_type}}\",\n      tile_textpanel_position:\"{{tile_textpanel_position}}\",\n      tile_textpanel_padding_top:{{tile_textpanel_padding_nounit}},\t\t \t\n      tile_textpanel_padding_bottom:{{tile_textpanel_padding_nounit}},\t \t\n      tile_textpanel_padding_right: {{tile_textpanel_padding_nounit}},\t \t\n      tile_textpanel_padding_left: {{tile_textpanel_padding_nounit}},\n      tile_textpanel_bg_color:\"{{tile_textpanel_bg_color}}\",\n      tile_textpanel_bg_opacity:{{tile_textpanel_bg_opacity_nounit}},\n      tile_textpanel_title_text_align:\"{{tile_textpanel_title_text_align}}\",\n      tile_textpanel_title_color:\"{{tile_textpanel_title_color}}\",\n      tile_enable_background:true,\n      tile_background_color: \"{{tile_background_color}}\", \n\n      lightbox_type: \"{{lightbox_type}}\",\n      lightbox_hide_arrows_onvideoplay: {{lightbox_hide_arrows_onvideoplay}},\n      lightbox_arrows_position: \"{{lightbox_arrows_position}}\",                                \n      lightbox_overlay_color:\"{{lightbox_overlay_color}}\",\n      lightbox_overlay_opacity:{{lightbox_overlay_opacity_nounit}},\t\n      lightbox_show_numbers: {{lightbox_show_numbers}},\n      lightbox_show_textpanel: {{lightbox_show_textpanel}},\n      lightbox_slider_control_swipe:{{lightbox_slider_control_swipe}},\n      lightbox_slider_control_zoom:{{lightbox_slider_control_zoom}},\n      lightbox_textpanel_title_text_align:\"{{lightbox_textpanel_title_text_align}}\",                    \n      lightbox_slider_image_border: {{lightbox_slider_image_border}},\n      lightbox_slider_image_border_width: {{lightbox_slider_image_border_width_nounit}},\n      lightbox_slider_image_border_color: \"{{lightbox_slider_image_border_color}}\",\n      lightbox_slider_image_border_radius: {{lightbox_slider_image_border_radius_nounit}},\n      lightbox_close_icon_type: \"{{lightbox_close_icon_type}}\",        \/\/close icon type: default, custom\n \t  lightbox_close_icon_color: \"{{lightbox_close_icon_color_default}}\",        \/\/close icon color\n      lightbox_close_icon_color_custom: \"{{lightbox_close_icon_color_custom}}\",  \n\t  lightbox_close_icon_custom: \"{{lightbox_close_icon_custom_html|ucsafe|raw}}\",        \/\/close icon custom html  \n      lightbox_close_icon_size_custom: \"{{lightbox_close_icon_size_custom_nounit}}\",\n      lightbox_arrows_type: \"{{lightbox_arrows_icon_type}}\",        \/\/arrow type: default, custom\n\t  lightbox_arrows_color: \"{{lightbox_arrows_icon_color_default}}\",        \/\/arrow color\n\t  lightbox_arrows_color_custom: \"{{lightbox_arrows_icon_color_custom}}\",        \/\/arrow color\n\t  lightbox_arrow_next_custom: \"{{lightbox_arrows_icon_next_html|ucsafe|raw}}\",        \/\/arrow html\n\t  lightbox_arrow_prev_custom: \"{{lightbox_arrows_icon_prev_html|ucsafe|raw}}\",        \/\/arrow html\n\t  lightbox_arrows_size_custom: {{lightbox_arrows_icon_size_custom_nounit}},        \/\/arrow size custom\n      tile_enable_border:{{tile_enable_border}},\n      {% if tile_enable_border == \"true\" %}          \n        tile_border_color:\"{{tile_border_color}}\",\n        tile_border_width:{{tile_border_width_nounit}},\n        tile_border_radius:{{tile_border_radius_nounit}}, \n      {% endif %}\t\n      tile_enable_shadow:{{tile_enable_shadow}},\n      {% if tile_enable_shadow == \"true\" %}          \n        tile_shadow_color:\"{{tile_shadow_color}}\",\n        tile_shadow_h:{{tile_shadow_h_nounit}},\t\t\t\t\t\n        tile_shadow_v:{{tile_shadow_v_nounit}},\t\t\t\t\t\n        tile_shadow_blur:{{tile_shadow_blur_nounit}},\t\t\t\t\t\n        tile_shadow_spread:{{tile_shadow_spread_nounit}},\n      {% endif %}  \n      {% if tile_enable_image_effect == \"true\" %}\n          tile_enable_image_effect:{{tile_enable_image_effect}},\n          tile_image_effect_type: \"{{tile_image_effect_type}}\",\n          tile_image_effect_reverse: {{tile_image_effect_reverse}},\n      {% endif %}\n  }\n  \n       \n  if(isUnderElementorAccordion == false)\n  api = objWrapper.unitegallery(options);\n  else{\n    \n    var objParentElementorAccordionItem = objWrapper.parents(\".e-n-accordion-item\");\n    var objCurrentElementorAccordionTitle = objParentElementorAccordionItem.find(\".e-n-accordion-item-title\");\n    var isElementorAccordionItemOpened = objCurrentElementorAccordionTitle.attr(\"aria-expanded\");\n  \n    if(isElementorAccordionItemOpened == true || isElementorAccordionItemOpened == \"true\"){        \n        api = objWrapper.unitegallery(options); \n    }else{\n      var objAccordionTitles = objParentElementorAccordion.find(\".e-n-accordion-item-title\");\n      \n      if(!objAccordionTitles || objAccordionTitles.length == 0)\n        return(false);\n      \n      objAccordionTitles.on(\"click\", function(){\n        setTimeout(function(){\n          api = objWrapper.unitegallery(options);\n        },400);\n      });\n    }\n  }\n       \n  function addVideoClass(){\n    var objShowAlways = objWrapper.find(\".ug-button-play-show-always\");\n   \n    if(!objShowAlways || objShowAlways.length == 0)\n      return(false);\n    \n    objShowAlways.each(function(){\n      var objIcon = jQuery(this);\n      var objParent = objIcon.parent();\n    \n      objParent.addClass(\"uc-video\");\n    });\n    \n  }     \n       \n  addVideoClass();     \n\n  objWrapper.on(\"uc_ajax_sethtml\",function(event, htmlItems, isAppend){      \t\n        api.changeItems(htmlItems); \n    \taddVideoClass();\n    \n    if(!htmlItems)\n        api.showMessageReplaceGallery(\"{{empty_message|ucsafe|raw}}\");  \n  });\n    \t\n{{ ucfunc(\"put_docready_end\") }}"}