Photo Gallery by WD – Responsive Photo Gallery - Version 1.1.6

Version Description

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

frontend/views/BWGViewAlbum_compact_preview.php CHANGED
@@ -139,7 +139,7 @@ class BWGViewAlbum_compact_preview {
139
  text-decoration: none;
140
  }
141
  <?php
142
- if ($params['compuct_album_title'] == 'show') { // Show album/gallery title at the bottom.
143
  ?>
144
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
145
  display: block;
@@ -150,7 +150,7 @@ class BWGViewAlbum_compact_preview {
150
  }
151
  <?php
152
  }
153
- elseif ($params['compuct_album_title'] == 'hover') { // Show album/gallery title on hover.
154
  ?>
155
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
156
  display: table;
@@ -251,7 +251,7 @@ class BWGViewAlbum_compact_preview {
251
  text-align: center;
252
  }
253
  <?php
254
- if ($params['compuct_album_image_title'] == 'show') { // Show image title at the bottom.
255
  ?>
256
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
257
  display: block;
@@ -263,7 +263,7 @@ class BWGViewAlbum_compact_preview {
263
  }
264
  <?php
265
  }
266
- elseif ($params['compuct_album_image_title'] == 'hover') { // Show image title on hover.
267
  ?>
268
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
269
  display: table;
139
  text-decoration: none;
140
  }
141
  <?php
142
+ if ($params['compuct_album_title'] == 'show') { /* Show album/gallery title at the bottom.*/
143
  ?>
144
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
145
  display: block;
150
  }
151
  <?php
152
  }
153
+ elseif ($params['compuct_album_title'] == 'hover') { /* Show album/gallery title on hover.*/
154
  ?>
155
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
156
  display: table;
251
  text-align: center;
252
  }
253
  <?php
254
+ if ($params['compuct_album_image_title'] == 'show') { /* Show image title at the bottom.*/
255
  ?>
256
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
257
  display: block;
263
  }
264
  <?php
265
  }
266
+ elseif ($params['compuct_album_image_title'] == 'hover') { /* Show image title on hover.*/
267
  ?>
268
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
269
  display: table;
frontend/views/BWGViewAlbum_extended_preview.php CHANGED
@@ -267,7 +267,7 @@ class BWGViewAlbum_extended_preview {
267
  text-align: center;
268
  }
269
  <?php
270
- if ($params['extended_album_image_title'] == 'show') { // Show image title at the bottom.
271
  ?>
272
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
273
  display: block;
@@ -279,7 +279,7 @@ class BWGViewAlbum_extended_preview {
279
  }
280
  <?php
281
  }
282
- elseif ($params['extended_album_image_title'] == 'hover') { // Show image title on hover.
283
  ?>
284
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
285
  display: table;
267
  text-align: center;
268
  }
269
  <?php
270
+ if ($params['extended_album_image_title'] == 'show') { /* Show image title at the bottom.*/
271
  ?>
272
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
273
  display: block;
279
  }
280
  <?php
281
  }
282
+ elseif ($params['extended_album_image_title'] == 'hover') { /* Show image title on hover.*/
283
  ?>
284
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_image_title_spun1_<?php echo $bwg; ?> {
285
  display: table;
frontend/views/BWGViewGalleryBox.php CHANGED
@@ -718,9 +718,9 @@ class BWGViewGalleryBox {
718
  if ((jQuery("#spider_popup_wrap").width() >= jQuery(window).width()) || (jQuery("#spider_popup_wrap").height() >= jQuery(window).height())) {
719
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
720
  }
721
- // Stop autoplay.
722
  clearInterval(bwg_playInterval);
723
- // Set watermark container size.
724
  function bwg_change_watermark_container() {
725
  jQuery(".bwg_slider").children().each(function() {
726
  if (jQuery(this).css("zIndex") == 2) {
@@ -730,7 +730,7 @@ class BWGViewGalleryBox {
730
  jQuery(".bwg_watermark_spun").width(width);
731
  jQuery(".bwg_watermark_spun").height(height);
732
  jQuery(".bwg_watermark").css({display: ''});
733
- // Set watermark image size.
734
  var comment_container_width = 0;
735
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
736
  comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
@@ -748,7 +748,7 @@ class BWGViewGalleryBox {
748
  }
749
  var bwg_current_key = '<?php echo $current_key; ?>';
750
  var bwg_current_filmstrip_pos = <?php echo $current_pos; ?>;
751
- // Set filmstrip initial position.
752
  function bwg_set_filmstrip_pos(filmStripWidth) {
753
  var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerWidth(true)) / 2;
754
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").width(), selectedImagePos + filmStripWidth / 2));
@@ -786,7 +786,7 @@ class BWGViewGalleryBox {
786
  });
787
  }
788
  }
789
- // Show/hide filmstrip arrows.
790
  function bwg_filmstrip_arrows() {
791
  if (jQuery(".bwg_filmstrip_thumbnails").width() < jQuery(".bwg_filmstrip").width()) {
792
  jQuery(".bwg_filmstrip_left").hide();
@@ -804,9 +804,9 @@ class BWGViewGalleryBox {
804
  return bwg_testDom('Perspective');
805
  }
806
  function bwg_testDom(prop) {
807
- // Browser vendor CSS prefixes.
808
  var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
809
- // Browser vendor DOM prefixes.
810
  var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
811
  var i = domPrefixes.length;
812
  while (i--) {
@@ -817,7 +817,7 @@ class BWGViewGalleryBox {
817
  return false;
818
  }
819
  function bwg_cube(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
820
- // If browser does not support 3d transforms/CSS transitions.
821
  if (!bwg_testBrowser_cssTransitions()) {
822
  return bwg_fallback(current_image_class, next_image_class, direction);
823
  }
@@ -825,7 +825,7 @@ class BWGViewGalleryBox {
825
  return bwg_fallback3d(current_image_class, next_image_class, direction);
826
  }
827
  bwg_trans_in_progress = true;
828
- // Set active thumbnail.
829
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
830
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
831
  jQuery(".bwg_slide_bg").css('perspective', 1000);
@@ -843,14 +843,14 @@ class BWGViewGalleryBox {
843
  transform: 'translateZ(-' + tz + 'px)',
844
  transformStyle: 'preserve-3d'
845
  });
846
- // Execution steps.
847
  setTimeout(function () {
848
  jQuery(".bwg_slider").css({
849
  transition: 'all ' + bwg_transition_duration + 'ms ease-in-out',
850
  transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
851
  });
852
  }, 20);
853
- // After transition.
854
  jQuery(".bwg_slider").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
855
  function bwg_after_trans() {
856
  jQuery(current_image_class).removeAttr('style');
@@ -869,7 +869,7 @@ class BWGViewGalleryBox {
869
  }
870
  }
871
  function bwg_cubeH(current_image_class, next_image_class, direction) {
872
- // Set to half of image width.
873
  var dimension = jQuery(current_image_class).width() / 2;
874
  if (direction == 'right') {
875
  bwg_cube(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
@@ -878,23 +878,23 @@ class BWGViewGalleryBox {
878
  bwg_cube(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
879
  }
880
  }
881
- // For browsers that does not support transitions.
882
  function bwg_fallback(current_image_class, next_image_class, direction) {
883
  bwg_fade(current_image_class, next_image_class, direction);
884
  }
885
- // For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).
886
  function bwg_fallback3d(current_image_class, next_image_class, direction) {
887
  bwg_sliceV(current_image_class, next_image_class, direction);
888
  }
889
  function bwg_none(current_image_class, next_image_class, direction) {
890
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
891
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
892
- // Set active thumbnail.
893
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
894
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
895
  }
896
  function bwg_fade(current_image_class, next_image_class, direction) {
897
- // Set active thumbnail.
898
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
899
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
900
  if (bwg_testBrowser_cssTransitions()) {
@@ -912,26 +912,26 @@ class BWGViewGalleryBox {
912
  duration: bwg_transition_duration,
913
  complete: function () { bwg_change_watermark_container(); }
914
  });
915
- // For IE.
916
  jQuery(current_image_class).fadeTo(bwg_transition_duration, 0);
917
  jQuery(next_image_class).fadeTo(bwg_transition_duration, 1);
918
  }
919
  }
920
  function bwg_grid(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
921
- // If browser does not support CSS transitions.
922
  if (!bwg_testBrowser_cssTransitions()) {
923
  return bwg_fallback(current_image_class, next_image_class, direction);
924
  }
925
  bwg_trans_in_progress = true;
926
- // Set active thumbnail.
927
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
928
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
929
- // The time (in ms) added to/subtracted from the delay total for each new gridlet.
930
  var count = (bwg_transition_duration) / (cols + rows);
931
- // Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)
932
  function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
933
  var delay = (c + r) * count;
934
- // Return a gridlet elem with styles for specific transition.
935
  return jQuery('<div class="bwg_gridlet" />').css({
936
  width : width,
937
  height : height,
@@ -947,19 +947,19 @@ class BWGViewGalleryBox {
947
  transform : 'none'
948
  });
949
  }
950
- // Get the current slide's image.
951
  var cur_img = jQuery(current_image_class).find('img');
952
- // Create a grid to hold the gridlets.
953
  var grid = jQuery('<div />').addClass('bwg_grid');
954
- // Prepend the grid to the next slide (i.e. so it's above the slide image).
955
  jQuery(current_image_class).prepend(grid);
956
- // Vars to calculate positioning/size of gridlets.
957
  var cont = jQuery(".bwg_slide_bg");
958
  var imgWidth = cur_img.width();
959
  var imgHeight = cur_img.height();
960
  var contWidth = cont.width(),
961
  contHeight = cont.height(),
962
- imgSrc = cur_img.attr('src'),//.replace('/thumb', ''),
963
  colWidth = Math.floor(contWidth / cols),
964
  rowHeight = Math.floor(contHeight / rows),
965
  colRemainder = contWidth - (cols * colWidth),
@@ -968,33 +968,33 @@ class BWGViewGalleryBox {
968
  rowAdd = Math.ceil(rowRemainder / rows),
969
  leftDist = 0,
970
  img_leftDist = Math.ceil((jQuery(".bwg_slide_bg").width() - cur_img.width()) / 2);
971
- // tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).
972
  tx = tx === 'auto' ? contWidth : tx;
973
  tx = tx === 'min-auto' ? - contWidth : tx;
974
  ty = ty === 'auto' ? contHeight : ty;
975
  ty = ty === 'min-auto' ? - contHeight : ty;
976
- // Loop through cols.
977
  for (var i = 0; i < cols; i++) {
978
  var topDist = 0,
979
  img_topDst = Math.floor((jQuery(".bwg_slide_bg").height() - cur_img.height()) / 2),
980
  newColWidth = colWidth;
981
- // If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.
982
  if (colRemainder > 0) {
983
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
984
  newColWidth += add;
985
  colRemainder -= add;
986
  }
987
- // Nested loop to create row gridlets for each col.
988
  for (var j = 0; j < rows; j++) {
989
  var newRowHeight = rowHeight,
990
  newRowRemainder = rowRemainder;
991
- // If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.
992
  if (newRowRemainder > 0) {
993
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
994
  newRowHeight += add;
995
  newRowRemainder -= add;
996
  }
997
- // Create & append gridlet to grid.
998
  grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
999
  topDist += newRowHeight;
1000
  img_topDst -= newRowHeight;
@@ -1002,17 +1002,17 @@ class BWGViewGalleryBox {
1002
  img_leftDist -= newColWidth;
1003
  leftDist += newColWidth;
1004
  }
1005
- // Set event listener on last gridlet to finish transitioning.
1006
  var last_gridlet = grid.children().last();
1007
- // Show grid & hide the image it replaces.
1008
  grid.show();
1009
  cur_img.css('opacity', 0);
1010
- // Add identifying classes to corner gridlets (useful if applying border radius).
1011
  grid.children().first().addClass('rs-top-left');
1012
  grid.children().last().addClass('rs-bottom-right');
1013
  grid.children().eq(rows - 1).addClass('rs-bottom-left');
1014
  grid.children().eq(- rows).addClass('rs-top-right');
1015
- // Execution steps.
1016
 
1017
  setTimeout(function () {
1018
  grid.children().css({
@@ -1022,7 +1022,7 @@ class BWGViewGalleryBox {
1022
  }, 1);
1023
 
1024
  jQuery(next_image_class).css('opacity', 1);
1025
- // After transition.
1026
  jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1027
  function bwg_after_trans() {
1028
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
@@ -1053,11 +1053,11 @@ class BWGViewGalleryBox {
1053
  function bwg_blindH(current_image_class, next_image_class, direction) {
1054
  bwg_grid(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
1055
  }
1056
- // jQuery(document).ready(function () {
1057
- // jQuery('meta[name="bwg_image"]').attr("content", "");
1058
- // jQuery('meta[name="bwg_description"]').attr("content", "");
1059
- // jQuery('meta[name="bwg_title"]').attr("content", "");
1060
- // });
1061
  function bwg_change_image(current_key, key, data, from_effect) {
1062
  if (data[key]) {
1063
  if (jQuery('.bwg_ctrl_btn').hasClass('fa-pause')) {
@@ -1065,11 +1065,11 @@ class BWGViewGalleryBox {
1065
  bwg_play();
1066
  }
1067
  if (!from_effect) {
1068
- // Change image key.
1069
  jQuery("#bwg_current_image_key").val(key);
1070
- // if (current_key == '-1') {
1071
- // current_key = jQuery(".bwg_thumb_active").children("img").attr("image_key");
1072
- // }
1073
  }
1074
  if (bwg_trans_in_progress) {
1075
  event_stack.push(current_key + '-' + key);
@@ -1084,19 +1084,19 @@ class BWGViewGalleryBox {
1084
  }
1085
  jQuery("#spider_popup_left").hover().css({"display": "inline"});
1086
  jQuery("#spider_popup_right").hover().css({"display": "inline"});
1087
- // Hide previous/next buttons on first/last images.
1088
  if (key == 0) {
1089
  jQuery("#spider_popup_left").hover().css({"display": "none"});
1090
  }
1091
  else if (key == (data.length - 1)) {
1092
  jQuery("#spider_popup_right").hover().css({"display": "none"});
1093
  }
1094
- // Set filmstrip initial position.
1095
  jQuery(".bwg_watermark").css({display: 'none'});
1096
- // Set active thumbnail position.
1097
  bwg_current_filmstrip_pos = key * (jQuery(".bwg_filmstrip_thumbnail").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
1098
  bwg_current_key = key;
1099
- // Change image id, title, description.
1100
  jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
1101
  jQuery(".bwg_info").attr('title', data[key]["alt"] + "<br />" + jQuery('<div />').html(data[key]["description"]).text());
1102
  var current_image_class = "#image_id_" + data[current_key]["id"];
@@ -1105,9 +1105,9 @@ class BWGViewGalleryBox {
1105
  jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1106
  jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1107
  jQuery("#bwg_download").attr("download", data[key]['image_url']);
1108
- // Add image url to meta.
1109
  jQuery("#bwg_facebook_a").attr("href", "https://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php echo urlencode($current_url); ?>&p[title]=" + data[key]['alt'] + "&p[summary]=" + data[key]['description'] + "&p[images][0]=<?php echo urlencode(site_url() . '/' . $WD_BWG_UPLOAD_DIR); ?>" + data[key]['thumb_url']);
1110
- // Load comments.
1111
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1112
  if (data[key]["comment_count"] == 0) {
1113
  jQuery("#bwg_added_comments").hide();
@@ -1119,7 +1119,7 @@ class BWGViewGalleryBox {
1119
  spider_ajax_save('bwg_comment_form');
1120
  }
1121
  }
1122
- // Update custom scroll.
1123
  jQuery(".bwg_comments").mCustomScrollbar({
1124
  advanced:{
1125
  updateOnContentResize: true
@@ -1136,16 +1136,16 @@ class BWGViewGalleryBox {
1136
  }
1137
  }
1138
  jQuery(document).on('keydown', function (e) {
1139
- if (e.keyCode === 39) { // Right arrow.
1140
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data)
1141
  }
1142
- else if (e.keyCode === 37) { // Left arrow.
1143
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data)
1144
  }
1145
- else if (e.keyCode === 27) { // Esc.
1146
  spider_destroypopup(1000);
1147
  }
1148
- else if (e.keyCode === 32) { // Space.
1149
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1150
  jQuery(".bwg_play_pause").trigger(isMobile ? 'touchend' : 'click');
1151
  }
@@ -1221,7 +1221,7 @@ class BWGViewGalleryBox {
1221
  jQuery(".bwg_filmstrip").css({width: (jQuery(window).width() - comment_container_width - 40)});
1222
  bwg_popup_current_width = jQuery(window).width();
1223
  }
1224
- // Set watermark container size.
1225
  bwg_change_watermark_container();
1226
  if ((jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) && (jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>)) {
1227
  jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
@@ -1237,14 +1237,14 @@ class BWGViewGalleryBox {
1237
  bwg_popup_resize();
1238
  }
1239
  });
1240
- // Popup current width/height.
1241
  var bwg_popup_current_width = <?php echo $image_width; ?>;
1242
  var bwg_popup_current_height = <?php echo $image_height; ?>;
1243
- // Open/close comments.
1244
  function bwg_comment() {
1245
  jQuery(".bwg_watermark").css({display: 'none'});
1246
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1247
- // Close comment.
1248
  var border_width = parseInt(jQuery(".bwg_comment_container").css('borderRightWidth'));
1249
  if (!border_width) {
1250
  border_width = 0;
@@ -1262,14 +1262,14 @@ class BWGViewGalleryBox {
1262
  });
1263
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(".spider_popup_wrap").width()}, 500);
1264
  jQuery(".bwg_filmstrip").animate({width: jQuery(".spider_popup_wrap").width() - 40}, 500);
1265
- // Set filmstrip initial position.
1266
  bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width() - 40);
1267
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_close");
1268
  jQuery(".bwg_comment").attr("title", "<?php echo __('Show Comments', 'bwg'); ?>");
1269
  jQuery(".spider_popup_close_fullscreen").show();
1270
  }
1271
  else {
1272
- // Open comment.
1273
  var comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
1274
  if (comment_container_width > jQuery(window).width()) {
1275
  comment_container_width = jQuery(window).width();
@@ -1297,11 +1297,11 @@ class BWGViewGalleryBox {
1297
  });
1298
  jQuery(".bwg_filmstrip_container").css({width: jQuery("#spider_popup_wrap").width() - jQuery(".bwg_comment_container").width()});
1299
  jQuery(".bwg_filmstrip").animate({width: jQuery(".bwg_filmstrip_container").width() - 40}, 500);
1300
- // Set filmstrip initial position.
1301
  bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width() - 40);
1302
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_open");
1303
  jQuery(".bwg_comment").attr("title", "<?php echo __('Hide Comments', 'bwg'); ?>");
1304
- // Load comments.
1305
  var cur_image_key = parseInt(jQuery("#bwg_current_image_key").val());
1306
  if (data[cur_image_key]["comment_count"] != 0) {
1307
  jQuery("#bwg_added_comments").show();
@@ -1334,33 +1334,33 @@ class BWGViewGalleryBox {
1334
  setTimeout(function () {
1335
  bwg_change_watermark_container();
1336
  }, 500);
1337
- // If browser doesn't support Fullscreen API.
1338
  if (!jQuery.fullscreen.isNativelySupported()) {
1339
  jQuery(".bwg_fullscreen").hide();
1340
  }
1341
- // Set image container height.
1342
  jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height() - <?php echo $image_filmstrip_height; ?>);
1343
- // Show image info in cloud.
1344
  jQuery(".bwg_info").tooltip({
1345
  track: true,
1346
  content: function () {
1347
  return jQuery(this).prop('title');
1348
  }
1349
  });
1350
- // Change default scrollbar in comments.
1351
  jQuery(".bwg_comments").mCustomScrollbar({scrollInertia: 150});
1352
- var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" //FF doesn't recognize mousewheel as of FF3.x
1353
  jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
1354
- var evt = window.event || e // Equalize event object.
1355
- evt = evt.originalEvent ? evt.originalEvent : evt; // Convert to originalEvent if possible.
1356
- var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta // Check for detail first, because it is used by Opera and FF.
1357
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1358
  if (delta > 0) {
1359
- // Scroll up.
1360
  jQuery(".bwg_filmstrip_left").trigger(isMobile ? 'touchend' : 'click');
1361
  }
1362
  else {
1363
- // Scroll down.
1364
  jQuery(".bwg_filmstrip_right").trigger(isMobile ? 'touchend' : 'click');
1365
  }
1366
  });
@@ -1375,7 +1375,7 @@ class BWGViewGalleryBox {
1375
  jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left - 2 - <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1376
  }
1377
  }
1378
- // Disable right arrow.
1379
  window.setTimeout(function(){
1380
  if (jQuery(".bwg_filmstrip_thumbnails").position().left == -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())) {
1381
  jQuery(".bwg_filmstrip_right").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
@@ -1393,23 +1393,23 @@ class BWGViewGalleryBox {
1393
  jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left + 2 + <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1394
  }
1395
  }
1396
- // Disable left arrow.
1397
  window.setTimeout(function(){
1398
  if (jQuery(".bwg_filmstrip_thumbnails").position().left == 0) {
1399
  jQuery(".bwg_filmstrip_left").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1400
  }
1401
  }, 500);
1402
  });
1403
- // Set filmstrip initial position.
1404
  bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width());
1405
- // Open/close comments.
1406
  jQuery(".bwg_comment, .bwg_comments_close_btn").on(bwg_click, function() { bwg_comment()});
1407
- // Open/close control buttons.
1408
  jQuery(".bwg_toggle_container").on(bwg_click, function () {
1409
  var bwg_open_toggle_btn_class = "<?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'; ?>";
1410
  var bwg_close_toggle_btn_class = "<?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-down' : 'fa-angle-up'; ?>";
1411
  if (jQuery(".bwg_toggle_container i").hasClass(bwg_open_toggle_btn_class)) {
1412
- // Close controll buttons.
1413
  jQuery(".bwg_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".bwg_ctrl_btn_container").height()}, 500);
1414
  jQuery(".bwg_toggle_container").animate({
1415
  <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
@@ -1419,7 +1419,7 @@ class BWGViewGalleryBox {
1419
  });
1420
  }
1421
  else {
1422
- // Open controll buttons.
1423
  jQuery(".bwg_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
1424
  jQuery(".bwg_toggle_container").animate({
1425
  <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".bwg_ctrl_btn_container").height()
@@ -1429,7 +1429,7 @@ class BWGViewGalleryBox {
1429
  });
1430
  }
1431
  });
1432
- // Maximize/minimize.
1433
  jQuery(".bwg_resize-full").on(bwg_click, function () {
1434
  jQuery(".bwg_watermark").css({display: 'none'});
1435
  var comment_container_width = 0;
@@ -1443,7 +1443,7 @@ class BWGViewGalleryBox {
1443
  if (jQuery(window).height() > <?php echo $image_height; ?>) {
1444
  bwg_popup_current_height = <?php echo $image_height; ?>;
1445
  }
1446
- // Minimize.
1447
  jQuery("#spider_popup_wrap").animate({
1448
  width: bwg_popup_current_width,
1449
  height: bwg_popup_current_height,
@@ -1469,7 +1469,7 @@ class BWGViewGalleryBox {
1469
  });
1470
  jQuery(".bwg_filmstrip_container").animate({width: bwg_popup_current_width - comment_container_width}, 500);
1471
  jQuery(".bwg_filmstrip").animate({width: bwg_popup_current_width - comment_container_width - 40}, 500);
1472
- // Set filmstrip initial position.
1473
  bwg_set_filmstrip_pos(bwg_popup_current_width - 40);
1474
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-full");
1475
  jQuery(".bwg_resize-full").attr("title", "<?php echo __('Maximize', 'bwg'); ?>");
@@ -1477,7 +1477,7 @@ class BWGViewGalleryBox {
1477
  else {
1478
  bwg_popup_current_width = jQuery(window).width();
1479
  bwg_popup_current_height = jQuery(window).height();
1480
- // Maximize.
1481
  jQuery("#spider_popup_wrap").animate({
1482
  width: jQuery(window).width(),
1483
  height: jQuery(window).height(),
@@ -1497,14 +1497,14 @@ class BWGViewGalleryBox {
1497
  });
1498
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(window).width() - comment_container_width}, 500);
1499
  jQuery(".bwg_filmstrip").animate({width: jQuery(window).width() - comment_container_width - 40}, 500);
1500
- // Set filmstrip initial position.
1501
  bwg_set_filmstrip_pos(jQuery(window).width() - comment_container_width - 40);
1502
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-small");
1503
  jQuery(".bwg_resize-full").attr("title", "<?php echo __('Restore', 'bwg'); ?>");
1504
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1505
  }
1506
  });
1507
- // Fullscreen.
1508
  jQuery(".bwg_fullscreen").on(bwg_click, function () {
1509
  jQuery(".bwg_watermark").css({display: 'none'});
1510
  var comment_container_width = 0;
@@ -1513,7 +1513,7 @@ class BWGViewGalleryBox {
1513
  }
1514
  jQuery(document).on("fscreenchange", function () {
1515
  if (jQuery.fullscreen.isFullScreen()) {
1516
- // bwg_exit_fullscreen();
1517
  }
1518
  });
1519
  function bwg_exit_fullscreen() {
@@ -1535,17 +1535,17 @@ class BWGViewGalleryBox {
1535
  });
1536
  jQuery(".bwg_image_wrap").css({width: bwg_popup_current_width - comment_container_width});
1537
  jQuery(".bwg_image_container").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});
1538
- // jQuery(".bwg_slide_bg").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});
1539
- // jQuery(".bwg_popup_image_spun1").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});
1540
  jQuery(".bwg_popup_image").css({
1541
  maxWidth: bwg_popup_current_width - comment_container_width,
1542
  maxHeight: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1543
  });
1544
- // Set watermark container size.
1545
  bwg_change_watermark_container();
1546
  jQuery(".bwg_filmstrip_container").css({width: bwg_popup_current_width - comment_container_width});
1547
  jQuery(".bwg_filmstrip").css({width: bwg_popup_current_width - comment_container_width- 40});
1548
- // Set filmstrip initial position.
1549
  bwg_set_filmstrip_pos(bwg_popup_current_width - 40);
1550
  jQuery(".bwg_resize-full").show();
1551
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-full");
@@ -1558,17 +1558,16 @@ class BWGViewGalleryBox {
1558
  });
1559
  }
1560
  if (jQuery.fullscreen.isFullScreen()) {
1561
- // Exit Fullscreen.
1562
  jQuery.fullscreen.exit();
1563
  bwg_exit_fullscreen();
1564
  }
1565
  else {
1566
- // Fullscreen.
1567
  jQuery("#spider_popup_wrap").fullscreen();
1568
- // jQuery("#spider_popup_wrap").on("fscreenopen", function() {
1569
- // if (jQuery.fullscreen.isFullScreen()) {
1570
  var screen_width = screen.width;
1571
- // alert(screen_width);
1572
  var screen_height = screen.height;
1573
  jQuery("#spider_popup_wrap").css({
1574
  width: screen_width,
@@ -1581,37 +1580,37 @@ class BWGViewGalleryBox {
1581
 
1582
  jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
1583
  jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
1584
- // jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});
1585
  jQuery(".bwg_popup_image").css({
1586
  maxWidth: (screen_width - comment_container_width),
1587
  maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
1588
  });
1589
 
1590
- // Set watermark container size.
1591
  bwg_change_watermark_container();
1592
  jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
1593
  jQuery(".bwg_filmstrip").css({width: (screen_width - comment_container_width - 40)});
1594
- // Set filmstrip initial position.
1595
  bwg_set_filmstrip_pos(screen_width - comment_container_width - 40);
1596
  jQuery(".bwg_resize-full").hide();
1597
  jQuery(".bwg_fullscreen").attr("class", "bwg_ctrl_btn bwg_fullscreen fa fa-resize-small");
1598
  jQuery(".bwg_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', 'bwg'); ?>");
1599
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1600
- // });
1601
- // }
1602
  }
1603
  return false;
1604
  });
1605
- // Play/pause.
1606
  jQuery(".bwg_play_pause, .bwg_popup_image").on(bwg_click, function () {
1607
  if (jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
1608
- // PLay.
1609
  bwg_play();
1610
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1611
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
1612
  }
1613
  else {
1614
- // Pause.
1615
  clearInterval(bwg_playInterval);
1616
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1617
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
@@ -1621,7 +1620,7 @@ class BWGViewGalleryBox {
1621
  function bwg_play() {
1622
  bwg_playInterval = setInterval(function () {
1623
  if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
1624
- // Wrap around.
1625
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
1626
  return;
1627
  }
@@ -1629,7 +1628,7 @@ class BWGViewGalleryBox {
1629
  }, '<?php echo $slideshow_interval * 1000; ?>');
1630
  }
1631
  jQuery(window).focus(function() {
1632
- // event_stack = [];
1633
  if (!jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
1634
  clearInterval(bwg_playInterval);
1635
  bwg_play();
718
  if ((jQuery("#spider_popup_wrap").width() >= jQuery(window).width()) || (jQuery("#spider_popup_wrap").height() >= jQuery(window).height())) {
719
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
720
  }
721
+ /* Stop autoplay.*/
722
  clearInterval(bwg_playInterval);
723
+ /* Set watermark container size.*/
724
  function bwg_change_watermark_container() {
725
  jQuery(".bwg_slider").children().each(function() {
726
  if (jQuery(this).css("zIndex") == 2) {
730
  jQuery(".bwg_watermark_spun").width(width);
731
  jQuery(".bwg_watermark_spun").height(height);
732
  jQuery(".bwg_watermark").css({display: ''});
733
+ /* Set watermark image size.*/
734
  var comment_container_width = 0;
735
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
736
  comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
748
  }
749
  var bwg_current_key = '<?php echo $current_key; ?>';
750
  var bwg_current_filmstrip_pos = <?php echo $current_pos; ?>;
751
+ /* Set filmstrip initial position.*/
752
  function bwg_set_filmstrip_pos(filmStripWidth) {
753
  var selectedImagePos = -bwg_current_filmstrip_pos - (jQuery(".bwg_filmstrip_thumbnail").outerWidth(true)) / 2;
754
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_filmstrip_thumbnails").width(), selectedImagePos + filmStripWidth / 2));
786
  });
787
  }
788
  }
789
+ /* Show/hide filmstrip arrows.*/
790
  function bwg_filmstrip_arrows() {
791
  if (jQuery(".bwg_filmstrip_thumbnails").width() < jQuery(".bwg_filmstrip").width()) {
792
  jQuery(".bwg_filmstrip_left").hide();
804
  return bwg_testDom('Perspective');
805
  }
806
  function bwg_testDom(prop) {
807
+ /* Browser vendor CSS prefixes.*/
808
  var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
809
+ /* Browser vendor DOM prefixes.*/
810
  var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
811
  var i = domPrefixes.length;
812
  while (i--) {
817
  return false;
818
  }
819
  function bwg_cube(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
820
+ /* If browser does not support 3d transforms/CSS transitions.*/
821
  if (!bwg_testBrowser_cssTransitions()) {
822
  return bwg_fallback(current_image_class, next_image_class, direction);
823
  }
825
  return bwg_fallback3d(current_image_class, next_image_class, direction);
826
  }
827
  bwg_trans_in_progress = true;
828
+ /* Set active thumbnail.*/
829
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
830
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
831
  jQuery(".bwg_slide_bg").css('perspective', 1000);
843
  transform: 'translateZ(-' + tz + 'px)',
844
  transformStyle: 'preserve-3d'
845
  });
846
+ /* Execution steps.*/
847
  setTimeout(function () {
848
  jQuery(".bwg_slider").css({
849
  transition: 'all ' + bwg_transition_duration + 'ms ease-in-out',
850
  transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
851
  });
852
  }, 20);
853
+ /* After transition.*/
854
  jQuery(".bwg_slider").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
855
  function bwg_after_trans() {
856
  jQuery(current_image_class).removeAttr('style');
869
  }
870
  }
871
  function bwg_cubeH(current_image_class, next_image_class, direction) {
872
+ /* Set to half of image width.*/
873
  var dimension = jQuery(current_image_class).width() / 2;
874
  if (direction == 'right') {
875
  bwg_cube(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
878
  bwg_cube(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
879
  }
880
  }
881
+ /* For browsers that does not support transitions.*/
882
  function bwg_fallback(current_image_class, next_image_class, direction) {
883
  bwg_fade(current_image_class, next_image_class, direction);
884
  }
885
+ /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
886
  function bwg_fallback3d(current_image_class, next_image_class, direction) {
887
  bwg_sliceV(current_image_class, next_image_class, direction);
888
  }
889
  function bwg_none(current_image_class, next_image_class, direction) {
890
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
891
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
892
+ /* Set active thumbnail.*/
893
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
894
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
895
  }
896
  function bwg_fade(current_image_class, next_image_class, direction) {
897
+ /* Set active thumbnail.*/
898
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
899
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
900
  if (bwg_testBrowser_cssTransitions()) {
912
  duration: bwg_transition_duration,
913
  complete: function () { bwg_change_watermark_container(); }
914
  });
915
+ /* For IE.*/
916
  jQuery(current_image_class).fadeTo(bwg_transition_duration, 0);
917
  jQuery(next_image_class).fadeTo(bwg_transition_duration, 1);
918
  }
919
  }
920
  function bwg_grid(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
921
+ /* If browser does not support CSS transitions.*/
922
  if (!bwg_testBrowser_cssTransitions()) {
923
  return bwg_fallback(current_image_class, next_image_class, direction);
924
  }
925
  bwg_trans_in_progress = true;
926
+ /* Set active thumbnail.*/
927
  jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive");
928
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active");
929
+ /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
930
  var count = (bwg_transition_duration) / (cols + rows);
931
+ /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
932
  function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
933
  var delay = (c + r) * count;
934
+ /*/ Return a gridlet elem with styles for specific transition.*/
935
  return jQuery('<div class="bwg_gridlet" />').css({
936
  width : width,
937
  height : height,
947
  transform : 'none'
948
  });
949
  }
950
+ /* Get the current slide's image.*/
951
  var cur_img = jQuery(current_image_class).find('img');
952
+ /* Create a grid to hold the gridlets.*/
953
  var grid = jQuery('<div />').addClass('bwg_grid');
954
+ /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
955
  jQuery(current_image_class).prepend(grid);
956
+ /* Vars to calculate positioning/size of gridlets.*/
957
  var cont = jQuery(".bwg_slide_bg");
958
  var imgWidth = cur_img.width();
959
  var imgHeight = cur_img.height();
960
  var contWidth = cont.width(),
961
  contHeight = cont.height(),
962
+ imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
963
  colWidth = Math.floor(contWidth / cols),
964
  rowHeight = Math.floor(contHeight / rows),
965
  colRemainder = contWidth - (cols * colWidth),
968
  rowAdd = Math.ceil(rowRemainder / rows),
969
  leftDist = 0,
970
  img_leftDist = Math.ceil((jQuery(".bwg_slide_bg").width() - cur_img.width()) / 2);
971
+ /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
972
  tx = tx === 'auto' ? contWidth : tx;
973
  tx = tx === 'min-auto' ? - contWidth : tx;
974
  ty = ty === 'auto' ? contHeight : ty;
975
  ty = ty === 'min-auto' ? - contHeight : ty;
976
+ /* Loop through cols.*/
977
  for (var i = 0; i < cols; i++) {
978
  var topDist = 0,
979
  img_topDst = Math.floor((jQuery(".bwg_slide_bg").height() - cur_img.height()) / 2),
980
  newColWidth = colWidth;
981
+ /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
982
  if (colRemainder > 0) {
983
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
984
  newColWidth += add;
985
  colRemainder -= add;
986
  }
987
+ /* Nested loop to create row gridlets for each col.*/
988
  for (var j = 0; j < rows; j++) {
989
  var newRowHeight = rowHeight,
990
  newRowRemainder = rowRemainder;
991
+ /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
992
  if (newRowRemainder > 0) {
993
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
994
  newRowHeight += add;
995
  newRowRemainder -= add;
996
  }
997
+ /* Create & append gridlet to grid.*/
998
  grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
999
  topDist += newRowHeight;
1000
  img_topDst -= newRowHeight;
1002
  img_leftDist -= newColWidth;
1003
  leftDist += newColWidth;
1004
  }
1005
+ /* Set event listener on last gridlet to finish transitioning.*/
1006
  var last_gridlet = grid.children().last();
1007
+ /* Show grid & hide the image it replaces.*/
1008
  grid.show();
1009
  cur_img.css('opacity', 0);
1010
+ /* Add identifying classes to corner gridlets (useful if applying border radius).*/
1011
  grid.children().first().addClass('rs-top-left');
1012
  grid.children().last().addClass('rs-bottom-right');
1013
  grid.children().eq(rows - 1).addClass('rs-bottom-left');
1014
  grid.children().eq(- rows).addClass('rs-top-right');
1015
+ /* Execution steps.*/
1016
 
1017
  setTimeout(function () {
1018
  grid.children().css({
1022
  }, 1);
1023
 
1024
  jQuery(next_image_class).css('opacity', 1);
1025
+ /* After transition.*/
1026
  jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1027
  function bwg_after_trans() {
1028
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1053
  function bwg_blindH(current_image_class, next_image_class, direction) {
1054
  bwg_grid(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
1055
  }
1056
+ /*jQuery(document).ready(function () {
1057
+ jQuery('meta[name="bwg_image"]').attr("content", "");
1058
+ jQuery('meta[name="bwg_description"]').attr("content", "");
1059
+ jQuery('meta[name="bwg_title"]').attr("content", "");
1060
+ });*/
1061
  function bwg_change_image(current_key, key, data, from_effect) {
1062
  if (data[key]) {
1063
  if (jQuery('.bwg_ctrl_btn').hasClass('fa-pause')) {
1065
  bwg_play();
1066
  }
1067
  if (!from_effect) {
1068
+ /* Change image key.*/
1069
  jQuery("#bwg_current_image_key").val(key);
1070
+ /*if (current_key == '-1') {
1071
+ current_key = jQuery(".bwg_thumb_active").children("img").attr("image_key");
1072
+ }*/
1073
  }
1074
  if (bwg_trans_in_progress) {
1075
  event_stack.push(current_key + '-' + key);
1084
  }
1085
  jQuery("#spider_popup_left").hover().css({"display": "inline"});
1086
  jQuery("#spider_popup_right").hover().css({"display": "inline"});
1087
+ /* Hide previous/next buttons on first/last images.*/
1088
  if (key == 0) {
1089
  jQuery("#spider_popup_left").hover().css({"display": "none"});
1090
  }
1091
  else if (key == (data.length - 1)) {
1092
  jQuery("#spider_popup_right").hover().css({"display": "none"});
1093
  }
1094
+ /* Set filmstrip initial position.*/
1095
  jQuery(".bwg_watermark").css({display: 'none'});
1096
+ /* Set active thumbnail position.*/
1097
  bwg_current_filmstrip_pos = key * (jQuery(".bwg_filmstrip_thumbnail").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
1098
  bwg_current_key = key;
1099
+ /* Change image id, title, description.*/
1100
  jQuery("#bwg_popup_image").attr('image_id', data[key]["id"]);
1101
  jQuery(".bwg_info").attr('title', data[key]["alt"] + "<br />" + jQuery('<div />').html(data[key]["description"]).text());
1102
  var current_image_class = "#image_id_" + data[current_key]["id"];
1105
  jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1106
  jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
1107
  jQuery("#bwg_download").attr("download", data[key]['image_url']);
1108
+ /* Add image url to meta.*/
1109
  jQuery("#bwg_facebook_a").attr("href", "https://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php echo urlencode($current_url); ?>&p[title]=" + data[key]['alt'] + "&p[summary]=" + data[key]['description'] + "&p[images][0]=<?php echo urlencode(site_url() . '/' . $WD_BWG_UPLOAD_DIR); ?>" + data[key]['thumb_url']);
1110
+ /* Load comments.*/
1111
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1112
  if (data[key]["comment_count"] == 0) {
1113
  jQuery("#bwg_added_comments").hide();
1119
  spider_ajax_save('bwg_comment_form');
1120
  }
1121
  }
1122
+ /* Update custom scroll.*/
1123
  jQuery(".bwg_comments").mCustomScrollbar({
1124
  advanced:{
1125
  updateOnContentResize: true
1136
  }
1137
  }
1138
  jQuery(document).on('keydown', function (e) {
1139
+ if (e.keyCode === 39) { /* Right arrow.*/
1140
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) + 1, data)
1141
  }
1142
+ else if (e.keyCode === 37) { /* Left arrow.*/
1143
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), parseInt(jQuery('#bwg_current_image_key').val()) - 1, data)
1144
  }
1145
+ else if (e.keyCode === 27) { /* Esc.*/
1146
  spider_destroypopup(1000);
1147
  }
1148
+ else if (e.keyCode === 32) { /* Space.*/
1149
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1150
  jQuery(".bwg_play_pause").trigger(isMobile ? 'touchend' : 'click');
1151
  }
1221
  jQuery(".bwg_filmstrip").css({width: (jQuery(window).width() - comment_container_width - 40)});
1222
  bwg_popup_current_width = jQuery(window).width();
1223
  }
1224
+ /* Set watermark container size.*/
1225
  bwg_change_watermark_container();
1226
  if ((jQuery(window).height() > <?php echo $image_height - 2 * $theme_row->lightbox_close_btn_top; ?>) && (jQuery(window).width() >= <?php echo $image_width - 2 * $theme_row->lightbox_close_btn_right; ?>)) {
1227
  jQuery(".spider_popup_close_fullscreen").attr("class", "spider_popup_close");
1237
  bwg_popup_resize();
1238
  }
1239
  });
1240
+ /* Popup current width/height.*/
1241
  var bwg_popup_current_width = <?php echo $image_width; ?>;
1242
  var bwg_popup_current_height = <?php echo $image_height; ?>;
1243
+ /* Open/close comments.*/
1244
  function bwg_comment() {
1245
  jQuery(".bwg_watermark").css({display: 'none'});
1246
  if (jQuery(".bwg_comment_container").hasClass("bwg_open")) {
1247
+ /* Close comment.*/
1248
  var border_width = parseInt(jQuery(".bwg_comment_container").css('borderRightWidth'));
1249
  if (!border_width) {
1250
  border_width = 0;
1262
  });
1263
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(".spider_popup_wrap").width()}, 500);
1264
  jQuery(".bwg_filmstrip").animate({width: jQuery(".spider_popup_wrap").width() - 40}, 500);
1265
+ /* Set filmstrip initial position.*/
1266
  bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width() - 40);
1267
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_close");
1268
  jQuery(".bwg_comment").attr("title", "<?php echo __('Show Comments', 'bwg'); ?>");
1269
  jQuery(".spider_popup_close_fullscreen").show();
1270
  }
1271
  else {
1272
+ /* Open comment.*/
1273
  var comment_container_width = <?php echo $theme_row->lightbox_comment_width; ?>;
1274
  if (comment_container_width > jQuery(window).width()) {
1275
  comment_container_width = jQuery(window).width();
1297
  });
1298
  jQuery(".bwg_filmstrip_container").css({width: jQuery("#spider_popup_wrap").width() - jQuery(".bwg_comment_container").width()});
1299
  jQuery(".bwg_filmstrip").animate({width: jQuery(".bwg_filmstrip_container").width() - 40}, 500);
1300
+ /* Set filmstrip initial position.*/
1301
  bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width() - 40);
1302
  jQuery(".bwg_comment_container").attr("class", "bwg_comment_container bwg_open");
1303
  jQuery(".bwg_comment").attr("title", "<?php echo __('Hide Comments', 'bwg'); ?>");
1304
+ /* Load comments.*/
1305
  var cur_image_key = parseInt(jQuery("#bwg_current_image_key").val());
1306
  if (data[cur_image_key]["comment_count"] != 0) {
1307
  jQuery("#bwg_added_comments").show();
1334
  setTimeout(function () {
1335
  bwg_change_watermark_container();
1336
  }, 500);
1337
+ /* If browser doesn't support Fullscreen API.*/
1338
  if (!jQuery.fullscreen.isNativelySupported()) {
1339
  jQuery(".bwg_fullscreen").hide();
1340
  }
1341
+ /* Set image container height.*/
1342
  jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height() - <?php echo $image_filmstrip_height; ?>);
1343
+ /* Show image info in cloud.*/
1344
  jQuery(".bwg_info").tooltip({
1345
  track: true,
1346
  content: function () {
1347
  return jQuery(this).prop('title');
1348
  }
1349
  });
1350
+ /* Change default scrollbar in comments.*/
1351
  jQuery(".bwg_comments").mCustomScrollbar({scrollInertia: 150});
1352
+ var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel" /*FF doesn't recognize mousewheel as of FF3.x*/
1353
  jQuery('.bwg_filmstrip').on(mousewheelevt, function(e) {
1354
+ var evt = window.event || e; /* Equalize event object.*/
1355
+ evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
1356
+ var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/
1357
  var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
1358
  if (delta > 0) {
1359
+ /* Scroll up.*/
1360
  jQuery(".bwg_filmstrip_left").trigger(isMobile ? 'touchend' : 'click');
1361
  }
1362
  else {
1363
+ /* Scroll down.*/
1364
  jQuery(".bwg_filmstrip_right").trigger(isMobile ? 'touchend' : 'click');
1365
  }
1366
  });
1375
  jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left - 2 - <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1376
  }
1377
  }
1378
+ /* Disable right arrow.*/
1379
  window.setTimeout(function(){
1380
  if (jQuery(".bwg_filmstrip_thumbnails").position().left == -(jQuery(".bwg_filmstrip_thumbnails").width() - jQuery(".bwg_filmstrip").width())) {
1381
  jQuery(".bwg_filmstrip_right").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1393
  jQuery(".bwg_filmstrip_thumbnails").animate({left: (jQuery(".bwg_filmstrip_thumbnails").position().left + 2 + <?php echo $image_filmstrip_width; ?>)}, 500, 'linear');
1394
  }
1395
  }
1396
+ /* Disable left arrow.*/
1397
  window.setTimeout(function(){
1398
  if (jQuery(".bwg_filmstrip_thumbnails").position().left == 0) {
1399
  jQuery(".bwg_filmstrip_left").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1400
  }
1401
  }, 500);
1402
  });
1403
+ /* Set filmstrip initial position.*/
1404
  bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width());
1405
+ /* Open/close comments.*/
1406
  jQuery(".bwg_comment, .bwg_comments_close_btn").on(bwg_click, function() { bwg_comment()});
1407
+ /* Open/close control buttons.*/
1408
  jQuery(".bwg_toggle_container").on(bwg_click, function () {
1409
  var bwg_open_toggle_btn_class = "<?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-up' : 'fa-angle-down'; ?>";
1410
  var bwg_close_toggle_btn_class = "<?php echo ($theme_row->lightbox_ctrl_btn_pos == 'top') ? 'fa-angle-down' : 'fa-angle-up'; ?>";
1411
  if (jQuery(".bwg_toggle_container i").hasClass(bwg_open_toggle_btn_class)) {
1412
+ /* Close controll buttons.*/
1413
  jQuery(".bwg_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: '-' + jQuery(".bwg_ctrl_btn_container").height()}, 500);
1414
  jQuery(".bwg_toggle_container").animate({
1415
  <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0
1419
  });
1420
  }
1421
  else {
1422
+ /* Open controll buttons.*/
1423
  jQuery(".bwg_ctrl_btn_container").animate({<?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: 0}, 500);
1424
  jQuery(".bwg_toggle_container").animate({
1425
  <?php echo $theme_row->lightbox_ctrl_btn_pos; ?>: jQuery(".bwg_ctrl_btn_container").height()
1429
  });
1430
  }
1431
  });
1432
+ /* Maximize/minimize.*/
1433
  jQuery(".bwg_resize-full").on(bwg_click, function () {
1434
  jQuery(".bwg_watermark").css({display: 'none'});
1435
  var comment_container_width = 0;
1443
  if (jQuery(window).height() > <?php echo $image_height; ?>) {
1444
  bwg_popup_current_height = <?php echo $image_height; ?>;
1445
  }
1446
+ /* Minimize.*/
1447
  jQuery("#spider_popup_wrap").animate({
1448
  width: bwg_popup_current_width,
1449
  height: bwg_popup_current_height,
1469
  });
1470
  jQuery(".bwg_filmstrip_container").animate({width: bwg_popup_current_width - comment_container_width}, 500);
1471
  jQuery(".bwg_filmstrip").animate({width: bwg_popup_current_width - comment_container_width - 40}, 500);
1472
+ /* Set filmstrip initial position.*/
1473
  bwg_set_filmstrip_pos(bwg_popup_current_width - 40);
1474
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-full");
1475
  jQuery(".bwg_resize-full").attr("title", "<?php echo __('Maximize', 'bwg'); ?>");
1477
  else {
1478
  bwg_popup_current_width = jQuery(window).width();
1479
  bwg_popup_current_height = jQuery(window).height();
1480
+ /* Maximize.*/
1481
  jQuery("#spider_popup_wrap").animate({
1482
  width: jQuery(window).width(),
1483
  height: jQuery(window).height(),
1497
  });
1498
  jQuery(".bwg_filmstrip_container").animate({width: jQuery(window).width() - comment_container_width}, 500);
1499
  jQuery(".bwg_filmstrip").animate({width: jQuery(window).width() - comment_container_width - 40}, 500);
1500
+ /* Set filmstrip initial position.*/
1501
  bwg_set_filmstrip_pos(jQuery(window).width() - comment_container_width - 40);
1502
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-small");
1503
  jQuery(".bwg_resize-full").attr("title", "<?php echo __('Restore', 'bwg'); ?>");
1504
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1505
  }
1506
  });
1507
+ /* Fullscreen.*/
1508
  jQuery(".bwg_fullscreen").on(bwg_click, function () {
1509
  jQuery(".bwg_watermark").css({display: 'none'});
1510
  var comment_container_width = 0;
1513
  }
1514
  jQuery(document).on("fscreenchange", function () {
1515
  if (jQuery.fullscreen.isFullScreen()) {
1516
+ /* bwg_exit_fullscreen();*/
1517
  }
1518
  });
1519
  function bwg_exit_fullscreen() {
1535
  });
1536
  jQuery(".bwg_image_wrap").css({width: bwg_popup_current_width - comment_container_width});
1537
  jQuery(".bwg_image_container").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});
1538
+ /*jQuery(".bwg_slide_bg").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});
1539
+ jQuery(".bwg_popup_image_spun1").css({height: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>});*/
1540
  jQuery(".bwg_popup_image").css({
1541
  maxWidth: bwg_popup_current_width - comment_container_width,
1542
  maxHeight: bwg_popup_current_height - <?php echo $image_filmstrip_height; ?>
1543
  });
1544
+ /* Set watermark container size.*/
1545
  bwg_change_watermark_container();
1546
  jQuery(".bwg_filmstrip_container").css({width: bwg_popup_current_width - comment_container_width});
1547
  jQuery(".bwg_filmstrip").css({width: bwg_popup_current_width - comment_container_width- 40});
1548
+ /* Set filmstrip initial position.*/
1549
  bwg_set_filmstrip_pos(bwg_popup_current_width - 40);
1550
  jQuery(".bwg_resize-full").show();
1551
  jQuery(".bwg_resize-full").attr("class", "bwg_ctrl_btn bwg_resize-full fa fa-resize-full");
1558
  });
1559
  }
1560
  if (jQuery.fullscreen.isFullScreen()) {
1561
+ /* Exit Fullscreen.*/
1562
  jQuery.fullscreen.exit();
1563
  bwg_exit_fullscreen();
1564
  }
1565
  else {
1566
+ /* Fullscreen.*/
1567
  jQuery("#spider_popup_wrap").fullscreen();
1568
+ /*jQuery("#spider_popup_wrap").on("fscreenopen", function() {
1569
+ if (jQuery.fullscreen.isFullScreen()) {*/
1570
  var screen_width = screen.width;
 
1571
  var screen_height = screen.height;
1572
  jQuery("#spider_popup_wrap").css({
1573
  width: screen_width,
1580
 
1581
  jQuery(".bwg_image_wrap").css({width: screen_width - comment_container_width});
1582
  jQuery(".bwg_image_container").css({height: (screen_height - <?php echo $image_filmstrip_height; ?>)});
1583
+ /* jQuery(".bwg_slide_bg").css({height: screen_height - <?php echo $image_filmstrip_height; ?>});*/
1584
  jQuery(".bwg_popup_image").css({
1585
  maxWidth: (screen_width - comment_container_width),
1586
  maxHeight: (screen_height - <?php echo $image_filmstrip_height; ?>)
1587
  });
1588
 
1589
+ /* Set watermark container size.*/
1590
  bwg_change_watermark_container();
1591
  jQuery(".bwg_filmstrip_container").css({width: (screen_width - comment_container_width)});
1592
  jQuery(".bwg_filmstrip").css({width: (screen_width - comment_container_width - 40)});
1593
+ /* Set filmstrip initial position.*/
1594
  bwg_set_filmstrip_pos(screen_width - comment_container_width - 40);
1595
  jQuery(".bwg_resize-full").hide();
1596
  jQuery(".bwg_fullscreen").attr("class", "bwg_ctrl_btn bwg_fullscreen fa fa-resize-small");
1597
  jQuery(".bwg_fullscreen").attr("title", "<?php echo __('Exit Fullscreen', 'bwg'); ?>");
1598
  jQuery(".spider_popup_close").attr("class", "bwg_ctrl_btn spider_popup_close_fullscreen");
1599
+ /*});
1600
+ }*/
1601
  }
1602
  return false;
1603
  });
1604
+ /* Play/pause.*/
1605
  jQuery(".bwg_play_pause, .bwg_popup_image").on(bwg_click, function () {
1606
  if (jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
1607
+ /* PLay.*/
1608
  bwg_play();
1609
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
1610
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-pause");
1611
  }
1612
  else {
1613
+ /* Pause.*/
1614
  clearInterval(bwg_playInterval);
1615
  jQuery(".bwg_play_pause").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1616
  jQuery(".bwg_play_pause").attr("class", "bwg_ctrl_btn bwg_play_pause fa fa-play");
1620
  function bwg_play() {
1621
  bwg_playInterval = setInterval(function () {
1622
  if (!data[parseInt(jQuery('#bwg_current_image_key').val()) + 1]) {
1623
+ /* Wrap around.*/
1624
  bwg_change_image(parseInt(jQuery('#bwg_current_image_key').val()), 0, data);
1625
  return;
1626
  }
1628
  }, '<?php echo $slideshow_interval * 1000; ?>');
1629
  }
1630
  jQuery(window).focus(function() {
1631
+ /* event_stack = [];*/
1632
  if (!jQuery(".bwg_ctrl_btn").hasClass("fa-play")) {
1633
  clearInterval(bwg_playInterval);
1634
  bwg_play();
frontend/views/BWGViewSlideshow.php CHANGED
@@ -716,9 +716,9 @@ class BWGViewSlideshow {
716
  var bwg_trans_in_progress_<?php echo $bwg; ?> = false;
717
  var bwg_transition_duration_<?php echo $bwg; ?> = <?php echo (($slideshow_interval < 4) && ($slideshow_interval != 0)) ? ($slideshow_interval * 1000) / 4 : 800; ?>;
718
  var bwg_playInterval_<?php echo $bwg; ?>;
719
- // Stop autoplay.
720
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
721
- // Set watermark container size.
722
  function bwg_change_watermark_container_<?php echo $bwg; ?>() {
723
  jQuery(".bwg_slider_<?php echo $bwg; ?>").children().each(function() {
724
  if (jQuery(this).css("zIndex") == 2) {
@@ -743,7 +743,7 @@ class BWGViewSlideshow {
743
  }
744
  var bwg_current_key_<?php echo $bwg; ?> = '<?php echo (isset($current_key) ? $current_key : ''); ?>';
745
  var bwg_current_filmstrip_pos_<?php echo $bwg; ?> = <?php echo $current_pos; ?>;
746
- // Set filmstrip initial position.
747
  function bwg_set_filmstrip_pos_<?php echo $bwg; ?>(filmStripWidth) {
748
  var selectedImagePos = -bwg_current_filmstrip_pos_<?php echo $bwg; ?> - (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2) / 2;
749
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width(), selectedImagePos + filmStripWidth / 2));
@@ -808,7 +808,7 @@ class BWGViewSlideshow {
808
  });
809
  }
810
  }
811
- // Show/hide filmstrip arrows.
812
  function bwg_filmstrip_arrows_<?php echo $bwg; ?>() {
813
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() < jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width()) {
814
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").hide();
@@ -826,9 +826,9 @@ class BWGViewSlideshow {
826
  return bwg_testDom_<?php echo $bwg; ?>('Perspective');
827
  }
828
  function bwg_testDom_<?php echo $bwg; ?>(prop) {
829
- // Browser vendor CSS prefixes.
830
  var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
831
- // Browser vendor DOM prefixes.
832
  var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
833
  var i = domPrefixes.length;
834
  while (i--) {
@@ -839,7 +839,7 @@ class BWGViewSlideshow {
839
  return false;
840
  }
841
  function bwg_cube_<?php echo $bwg; ?>(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
842
- // If browser does not support 3d transforms/CSS transitions.
843
  if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
844
  return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
845
  }
@@ -847,7 +847,7 @@ class BWGViewSlideshow {
847
  return bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
848
  }
849
  bwg_trans_in_progress_<?php echo $bwg; ?> = true;
850
- // Set active thumbnail.
851
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
852
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
853
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
@@ -867,20 +867,20 @@ class BWGViewSlideshow {
867
  transform: 'translateZ(-' + tz + 'px)',
868
  transformStyle: 'preserve-3d'
869
  });
870
- // Execution steps.
871
  setTimeout(function () {
872
  jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
873
  transition: 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out',
874
  transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
875
  });
876
  }, 20);
877
- // After transition.
878
  jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
879
  function bwg_after_trans() {
880
- // if (bwg_from_focus_<?php echo $bwg; ?>) {
881
- // bwg_from_focus_<?php echo $bwg; ?> = false;
882
- // return;
883
- // }
884
  jQuery(current_image_class).removeAttr('style');
885
  jQuery(next_image_class).removeAttr('style');
886
  jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
@@ -896,7 +896,7 @@ class BWGViewSlideshow {
896
  }
897
  }
898
  function bwg_cubeH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
899
- // Set to half of image width.
900
  var dimension = jQuery(current_image_class).width() / 2;
901
  if (direction == 'right') {
902
  bwg_cube_<?php echo $bwg; ?>(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
@@ -905,25 +905,25 @@ class BWGViewSlideshow {
905
  bwg_cube_<?php echo $bwg; ?>(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
906
  }
907
  }
908
- // For browsers that does not support transitions.
909
  function bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
910
  bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
911
  }
912
- // For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).
913
  function bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
914
  bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
915
  }
916
  function bwg_none_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
917
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
918
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
919
- // Set active thumbnail.
920
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
921
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
922
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
923
  jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
924
  }
925
  function bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
926
- // Set active thumbnail.
927
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
928
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
929
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
@@ -943,28 +943,28 @@ class BWGViewSlideshow {
943
  duration: bwg_transition_duration_<?php echo $bwg; ?>,
944
  complete: function () { bwg_change_watermark_container_<?php echo $bwg; ?>(); }
945
  });
946
- // For IE.
947
  jQuery(current_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 0);
948
  jQuery(next_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 1);
949
  }
950
  }
951
  function bwg_grid_<?php echo $bwg; ?>(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
952
- // If browser does not support CSS transitions.
953
  if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
954
  return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
955
  }
956
  bwg_trans_in_progress_<?php echo $bwg; ?> = true;
957
- // Set active thumbnail.
958
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
959
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
960
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
961
  jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
962
- // The time (in ms) added to/subtracted from the delay total for each new gridlet.
963
  var count = (bwg_transition_duration_<?php echo $bwg; ?>) / (cols + rows);
964
- // Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)
965
  function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
966
  var delay = (c + r) * count;
967
- // Return a gridlet elem with styles for specific transition.
968
  return jQuery('<div class="bwg_gridlet_<?php echo $bwg; ?>" />').css({
969
  width : width,
970
  height : height,
@@ -980,19 +980,19 @@ class BWGViewSlideshow {
980
  transform : 'none'
981
  });
982
  }
983
- // Get the current slide's image.
984
  var cur_img = jQuery(current_image_class).find('img');
985
- // Create a grid to hold the gridlets.
986
  var grid = jQuery('<div />').addClass('bwg_grid_<?php echo $bwg; ?>');
987
- // Prepend the grid to the next slide (i.e. so it's above the slide image).
988
  jQuery(current_image_class).prepend(grid);
989
- // vars to calculate positioning/size of gridlets
990
  var cont = jQuery(".bwg_slide_bg_<?php echo $bwg; ?>");
991
  var imgWidth = cur_img.width();
992
  var imgHeight = cur_img.height();
993
  var contWidth = cont.width(),
994
  contHeight = cont.height(),
995
- imgSrc = cur_img.attr('src'),//.replace('/thumb', ''),
996
  colWidth = Math.floor(contWidth / cols),
997
  rowHeight = Math.floor(contHeight / rows),
998
  colRemainder = contWidth - (cols * colWidth),
@@ -1001,33 +1001,33 @@ class BWGViewSlideshow {
1001
  rowAdd = Math.ceil(rowRemainder / rows),
1002
  leftDist = 0,
1003
  img_leftDist = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").width() - cur_img.width()) / 2;
1004
- // tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).
1005
  tx = tx === 'auto' ? contWidth : tx;
1006
  tx = tx === 'min-auto' ? - contWidth : tx;
1007
  ty = ty === 'auto' ? contHeight : ty;
1008
  ty = ty === 'min-auto' ? - contHeight : ty;
1009
- // Loop through cols
1010
  for (var i = 0; i < cols; i++) {
1011
  var topDist = 0,
1012
  img_topDst = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").height() - cur_img.height()) / 2,
1013
  newColWidth = colWidth;
1014
- // If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.
1015
  if (colRemainder > 0) {
1016
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
1017
  newColWidth += add;
1018
  colRemainder -= add;
1019
  }
1020
- // Nested loop to create row gridlets for each col.
1021
  for (var j = 0; j < rows; j++) {
1022
  var newRowHeight = rowHeight,
1023
  newRowRemainder = rowRemainder;
1024
- // If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.
1025
  if (newRowRemainder > 0) {
1026
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
1027
  newRowHeight += add;
1028
  newRowRemainder -= add;
1029
  }
1030
- // Create & append gridlet to grid.
1031
  grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
1032
  topDist += newRowHeight;
1033
  img_topDst -= newRowHeight;
@@ -1035,17 +1035,17 @@ class BWGViewSlideshow {
1035
  img_leftDist -= newColWidth;
1036
  leftDist += newColWidth;
1037
  }
1038
- // Set event listener on last gridlet to finish transitioning.
1039
  var last_gridlet = grid.children().last();
1040
- // Show grid & hide the image it replaces.
1041
  grid.show();
1042
  cur_img.css('opacity', 0);
1043
- // Add identifying classes to corner gridlets (useful if applying border radius).
1044
  grid.children().first().addClass('rs-top-left');
1045
  grid.children().last().addClass('rs-bottom-right');
1046
  grid.children().eq(rows - 1).addClass('rs-bottom-left');
1047
  grid.children().eq(- rows).addClass('rs-top-right');
1048
- // Execution steps.
1049
  setTimeout(function () {
1050
  grid.children().css({
1051
  opacity: op,
@@ -1053,13 +1053,13 @@ class BWGViewSlideshow {
1053
  });
1054
  }, 1);
1055
  jQuery(next_image_class).css('opacity', 1);
1056
- // After transition.
1057
  jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1058
  function bwg_after_trans() {
1059
- // if (bwg_from_focus_<?php echo $bwg; ?>) {
1060
- // bwg_from_focus_<?php echo $bwg; ?> = false;
1061
- // return;
1062
- // }
1063
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1064
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
1065
  cur_img.css('opacity', 1);
@@ -1102,12 +1102,12 @@ class BWGViewSlideshow {
1102
  play_<?php echo $bwg; ?>();
1103
  }
1104
  if (!from_effect) {
1105
- // Change image key.
1106
  jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(key);
1107
- if (current_key == '-1') { // Filmstrip.
1108
  current_key = jQuery(".bwg_slideshow_thumb_active_<?php echo $bwg; ?>").children("img").attr("image_key");
1109
  }
1110
- else if (current_key == '-2') { // Dots.
1111
  current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
1112
  }
1113
 
@@ -1126,10 +1126,10 @@ class BWGViewSlideshow {
1126
  jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
1127
  jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
1128
  jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
1129
- // Set active thumbnail position.
1130
  bwg_current_filmstrip_pos_<?php echo $bwg; ?> = key * (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
1131
  bwg_current_key_<?php echo $bwg; ?> = key;
1132
- // Change image id, title, description.
1133
  jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
1134
  jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").text(data_<?php echo $bwg; ?>[key]["alt"]);
1135
  jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<div />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
@@ -1163,7 +1163,7 @@ class BWGViewSlideshow {
1163
  maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
1164
  cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1165
  });
1166
- // Set watermark container size.
1167
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1168
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1169
  jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (<?php echo $image_width; ?> - 40)});
@@ -1184,7 +1184,7 @@ class BWGViewSlideshow {
1184
  maxHeight: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)*/
1185
  cssText: "max-width: " + parent_width + "px !important; max-height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1186
  });
1187
- // Set watermark container size.
1188
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1189
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1190
  jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (parent_width - 40)});
@@ -1210,20 +1210,20 @@ class BWGViewSlideshow {
1210
  setTimeout(function () {
1211
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1212
  }, 500);
1213
- // Set image container height.
1214
  jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
1215
 
1216
- var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; // FF doesn't recognize mousewheel as of FF3.x
1217
  jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
1218
- var evt = window.event || e // Equalize event object.
1219
- evt = evt.originalEvent ? evt.originalEvent : evt; // Convert to originalEvent if possible.
1220
- var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta // Check for detail first, because it is used by Opera and FF.
1221
  if (delta > 0) {
1222
- // Scroll up.
1223
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").trigger("click");
1224
  }
1225
  else {
1226
- // Scroll down.
1227
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").trigger("click");
1228
  }
1229
  return false;
@@ -1239,7 +1239,7 @@ class BWGViewSlideshow {
1239
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left - 2 - <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1240
  }
1241
  }
1242
- // Disable right arrow.
1243
  window.setTimeout(function(){
1244
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
1245
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
@@ -1257,16 +1257,16 @@ class BWGViewSlideshow {
1257
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left + 2 + <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1258
  }
1259
  }
1260
- // Disable left arrow.
1261
  window.setTimeout(function(){
1262
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == 0) {
1263
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1264
  }
1265
  }, 500);
1266
  });
1267
- // Set filmstrip initial position.
1268
  bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
1269
- // Play/pause.
1270
  jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").on(bwg_click, function () {
1271
  if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1272
  play_<?php echo $bwg; ?>();
@@ -1277,7 +1277,7 @@ class BWGViewSlideshow {
1277
  }
1278
  }
1279
  else {
1280
- // Pause.
1281
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1282
  jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1283
  jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play");
@@ -1296,7 +1296,7 @@ class BWGViewSlideshow {
1296
  }
1297
  });
1298
  function play_<?php echo $bwg; ?>() {
1299
- // Play.
1300
  bwg_playInterval_<?php echo $bwg; ?> = setInterval(function () {
1301
  var iterator = 1;
1302
  if (<?php echo $enable_slideshow_shuffle; ?>) {
@@ -1306,7 +1306,7 @@ class BWGViewSlideshow {
1306
  }, '<?php echo $slideshow_interval * 1000; ?>');
1307
  }
1308
  jQuery(window).focus(function() {
1309
- // event_stack_<?php echo $bwg; ?> = [];
1310
  if (!jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1311
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1312
  play_<?php echo $bwg; ?>();
716
  var bwg_trans_in_progress_<?php echo $bwg; ?> = false;
717
  var bwg_transition_duration_<?php echo $bwg; ?> = <?php echo (($slideshow_interval < 4) && ($slideshow_interval != 0)) ? ($slideshow_interval * 1000) / 4 : 800; ?>;
718
  var bwg_playInterval_<?php echo $bwg; ?>;
719
+ /* Stop autoplay.*/
720
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
721
+ /* Set watermark container size.*/
722
  function bwg_change_watermark_container_<?php echo $bwg; ?>() {
723
  jQuery(".bwg_slider_<?php echo $bwg; ?>").children().each(function() {
724
  if (jQuery(this).css("zIndex") == 2) {
743
  }
744
  var bwg_current_key_<?php echo $bwg; ?> = '<?php echo (isset($current_key) ? $current_key : ''); ?>';
745
  var bwg_current_filmstrip_pos_<?php echo $bwg; ?> = <?php echo $current_pos; ?>;
746
+ /* Set filmstrip initial position.*/
747
  function bwg_set_filmstrip_pos_<?php echo $bwg; ?>(filmStripWidth) {
748
  var selectedImagePos = -bwg_current_filmstrip_pos_<?php echo $bwg; ?> - (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2) / 2;
749
  var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width(), selectedImagePos + filmStripWidth / 2));
808
  });
809
  }
810
  }
811
+ /* Show/hide filmstrip arrows.*/
812
  function bwg_filmstrip_arrows_<?php echo $bwg; ?>() {
813
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() < jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width()) {
814
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").hide();
826
  return bwg_testDom_<?php echo $bwg; ?>('Perspective');
827
  }
828
  function bwg_testDom_<?php echo $bwg; ?>(prop) {
829
+ /* Browser vendor CSS prefixes.*/
830
  var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
831
+ /* Browser vendor DOM prefixes.*/
832
  var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
833
  var i = domPrefixes.length;
834
  while (i--) {
839
  return false;
840
  }
841
  function bwg_cube_<?php echo $bwg; ?>(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
842
+ /* If browser does not support 3d transforms/CSS transitions.*/
843
  if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
844
  return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
845
  }
847
  return bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
848
  }
849
  bwg_trans_in_progress_<?php echo $bwg; ?> = true;
850
+ /* Set active thumbnail.*/
851
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
852
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
853
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
867
  transform: 'translateZ(-' + tz + 'px)',
868
  transformStyle: 'preserve-3d'
869
  });
870
+ /* Execution steps.*/
871
  setTimeout(function () {
872
  jQuery(".bwg_slider_<?php echo $bwg; ?>").css({
873
  transition: 'all ' + bwg_transition_duration_<?php echo $bwg; ?> + 'ms ease-in-out',
874
  transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
875
  });
876
  }, 20);
877
+ /* After transition.*/
878
  jQuery(".bwg_slider_<?php echo $bwg; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
879
  function bwg_after_trans() {
880
+ /* if (bwg_from_focus_<?php echo $bwg; ?>) {
881
+ bwg_from_focus_<?php echo $bwg; ?> = false;
882
+ return;
883
+ }*/
884
  jQuery(current_image_class).removeAttr('style');
885
  jQuery(next_image_class).removeAttr('style');
886
  jQuery(".bwg_slider_<?php echo $bwg; ?>").removeAttr('style');
896
  }
897
  }
898
  function bwg_cubeH_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
899
+ /* Set to half of image width.*/
900
  var dimension = jQuery(current_image_class).width() / 2;
901
  if (direction == 'right') {
902
  bwg_cube_<?php echo $bwg; ?>(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
905
  bwg_cube_<?php echo $bwg; ?>(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
906
  }
907
  }
908
+ /* For browsers that does not support transitions.*/
909
  function bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
910
  bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
911
  }
912
+ /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
913
  function bwg_fallback3d_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
914
  bwg_sliceV_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
915
  }
916
  function bwg_none_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
917
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
918
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
919
+ /* Set active thumbnail.*/
920
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
921
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
922
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
923
  jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
924
  }
925
  function bwg_fade_<?php echo $bwg; ?>(current_image_class, next_image_class, direction) {
926
+ /* Set active thumbnail.*/
927
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
928
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
929
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
943
  duration: bwg_transition_duration_<?php echo $bwg; ?>,
944
  complete: function () { bwg_change_watermark_container_<?php echo $bwg; ?>(); }
945
  });
946
+ /* For IE.*/
947
  jQuery(current_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 0);
948
  jQuery(next_image_class).fadeTo(bwg_transition_duration_<?php echo $bwg; ?>, 1);
949
  }
950
  }
951
  function bwg_grid_<?php echo $bwg; ?>(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
952
+ /* If browser does not support CSS transitions.*/
953
  if (!bwg_testBrowser_cssTransitions_<?php echo $bwg; ?>()) {
954
  return bwg_fallback_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
955
  }
956
  bwg_trans_in_progress_<?php echo $bwg; ?> = true;
957
+ /* Set active thumbnail.*/
958
  jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>");
959
  jQuery("#bwg_filmstrip_thumbnail_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_thumb_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_thumb_active_<?php echo $bwg; ?>");
960
  jQuery(".bwg_slideshow_dots_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>");
961
  jQuery("#bwg_dots_" + bwg_current_key_<?php echo $bwg; ?> + "_<?php echo $bwg; ?>").removeClass("bwg_slideshow_dots_deactive_<?php echo $bwg; ?>").addClass("bwg_slideshow_dots_active_<?php echo $bwg; ?>");
962
+ /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
963
  var count = (bwg_transition_duration_<?php echo $bwg; ?>) / (cols + rows);
964
+ /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
965
  function bwg_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
966
  var delay = (c + r) * count;
967
+ /* Return a gridlet elem with styles for specific transition.*/
968
  return jQuery('<div class="bwg_gridlet_<?php echo $bwg; ?>" />').css({
969
  width : width,
970
  height : height,
980
  transform : 'none'
981
  });
982
  }
983
+ /* Get the current slide's image.*/
984
  var cur_img = jQuery(current_image_class).find('img');
985
+ /* Create a grid to hold the gridlets.*/
986
  var grid = jQuery('<div />').addClass('bwg_grid_<?php echo $bwg; ?>');
987
+ /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
988
  jQuery(current_image_class).prepend(grid);
989
+ /* vars to calculate positioning/size of gridlets*/
990
  var cont = jQuery(".bwg_slide_bg_<?php echo $bwg; ?>");
991
  var imgWidth = cur_img.width();
992
  var imgHeight = cur_img.height();
993
  var contWidth = cont.width(),
994
  contHeight = cont.height(),
995
+ imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
996
  colWidth = Math.floor(contWidth / cols),
997
  rowHeight = Math.floor(contHeight / rows),
998
  colRemainder = contWidth - (cols * colWidth),
1001
  rowAdd = Math.ceil(rowRemainder / rows),
1002
  leftDist = 0,
1003
  img_leftDist = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").width() - cur_img.width()) / 2;
1004
+ /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
1005
  tx = tx === 'auto' ? contWidth : tx;
1006
  tx = tx === 'min-auto' ? - contWidth : tx;
1007
  ty = ty === 'auto' ? contHeight : ty;
1008
  ty = ty === 'min-auto' ? - contHeight : ty;
1009
+ /* Loop through cols*/
1010
  for (var i = 0; i < cols; i++) {
1011
  var topDist = 0,
1012
  img_topDst = (jQuery(".bwg_slide_bg_<?php echo $bwg; ?>").height() - cur_img.height()) / 2,
1013
  newColWidth = colWidth;
1014
+ /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
1015
  if (colRemainder > 0) {
1016
  var add = colRemainder >= colAdd ? colAdd : colRemainder;
1017
  newColWidth += add;
1018
  colRemainder -= add;
1019
  }
1020
+ /* Nested loop to create row gridlets for each col.*/
1021
  for (var j = 0; j < rows; j++) {
1022
  var newRowHeight = rowHeight,
1023
  newRowRemainder = rowRemainder;
1024
+ /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
1025
  if (newRowRemainder > 0) {
1026
  add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
1027
  newRowHeight += add;
1028
  newRowRemainder -= add;
1029
  }
1030
+ /* Create & append gridlet to grid.*/
1031
  grid.append(bwg_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
1032
  topDist += newRowHeight;
1033
  img_topDst -= newRowHeight;
1035
  img_leftDist -= newColWidth;
1036
  leftDist += newColWidth;
1037
  }
1038
+ /* Set event listener on last gridlet to finish transitioning.*/
1039
  var last_gridlet = grid.children().last();
1040
+ /* Show grid & hide the image it replaces.*/
1041
  grid.show();
1042
  cur_img.css('opacity', 0);
1043
+ /* Add identifying classes to corner gridlets (useful if applying border radius).*/
1044
  grid.children().first().addClass('rs-top-left');
1045
  grid.children().last().addClass('rs-bottom-right');
1046
  grid.children().eq(rows - 1).addClass('rs-bottom-left');
1047
  grid.children().eq(- rows).addClass('rs-top-right');
1048
+ /* Execution steps.*/
1049
  setTimeout(function () {
1050
  grid.children().css({
1051
  opacity: op,
1053
  });
1054
  }, 1);
1055
  jQuery(next_image_class).css('opacity', 1);
1056
+ /* After transition.*/
1057
  jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(bwg_after_trans));
1058
  function bwg_after_trans() {
1059
+ /*if (bwg_from_focus_<?php echo $bwg; ?>) {
1060
+ bwg_from_focus_<?php echo $bwg; ?> = false;
1061
+ return;
1062
+ }*/
1063
  jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
1064
  jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
1065
  cur_img.css('opacity', 1);
1102
  play_<?php echo $bwg; ?>();
1103
  }
1104
  if (!from_effect) {
1105
+ /* Change image key.*/
1106
  jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val(key);
1107
+ if (current_key == '-1') { /* Filmstrip.*/
1108
  current_key = jQuery(".bwg_slideshow_thumb_active_<?php echo $bwg; ?>").children("img").attr("image_key");
1109
  }
1110
+ else if (current_key == '-2') { /* Dots.*/
1111
  current_key = jQuery(".bwg_slideshow_dots_active_<?php echo $bwg; ?>").attr("image_key");
1112
  }
1113
 
1126
  jQuery(".bwg_slideshow_watermark_<?php echo $bwg; ?>").css({display: 'none'});
1127
  jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").css({display: 'none'});
1128
  jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({display: 'none'});
1129
+ /* Set active thumbnail position.*/
1130
  bwg_current_filmstrip_pos_<?php echo $bwg; ?> = key * (jQuery(".bwg_slideshow_filmstrip_thumbnail_<?php echo $bwg; ?>").width() + 2 + 2 * <?php echo $theme_row->lightbox_filmstrip_thumb_border_width; ?>);
1131
  bwg_current_key_<?php echo $bwg; ?> = key;
1132
+ /* Change image id, title, description.*/
1133
  jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
1134
  jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").text(data_<?php echo $bwg; ?>[key]["alt"]);
1135
  jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<div />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
1163
  maxHeight: <?php echo $image_height - $slideshow_filmstrip_height; ?>*/
1164
  cssText: "max-width: <?php echo $image_width; ?>px !important; max-height: <?php echo $image_height - $slideshow_filmstrip_height; ?>px !important;"
1165
  });
1166
+ /* Set watermark container size.*/
1167
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1168
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: <?php echo $image_width; ?>});
1169
  jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (<?php echo $image_width; ?> - 40)});
1184
  maxHeight: ((parent_width) * <?php echo $image_height / $image_width ?> - <?php echo $slideshow_filmstrip_height; ?>)*/
1185
  cssText: "max-width: " + parent_width + "px !important; max-height: " + (parent_width * (<?php echo $image_height / $image_width ?>) - <?php echo $slideshow_filmstrip_height; ?> - 1) + "px !important;"
1186
  });
1187
+ /* Set watermark container size.*/
1188
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1189
  jQuery(".bwg_slideshow_filmstrip_container_<?php echo $bwg; ?>").css({width: (parent_width)});
1190
  jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").css({width: (parent_width - 40)});
1210
  setTimeout(function () {
1211
  bwg_change_watermark_container_<?php echo $bwg; ?>();
1212
  }, 500);
1213
+ /* Set image container height.*/
1214
  jQuery(".bwg_slideshow_image_container_<?php echo $bwg; ?>").height(jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").height() - <?php echo $slideshow_filmstrip_height; ?>);
1215
 
1216
+ var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x*/
1217
  jQuery('.bwg_slideshow_filmstrip_<?php echo $bwg; ?>').bind(mousewheelevt, function(e) {
1218
+ var evt = window.event || e; /* Equalize event object.*/
1219
+ evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/
1220
+ var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/
1221
  if (delta > 0) {
1222
+ /* Scroll up.*/
1223
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").trigger("click");
1224
  }
1225
  else {
1226
+ /* Scroll down.*/
1227
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").trigger("click");
1228
  }
1229
  return false;
1239
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left - 2 - <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1240
  }
1241
  }
1242
+ /* Disable right arrow.*/
1243
  window.setTimeout(function(){
1244
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
1245
  jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1257
  jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").animate({left: (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left + 2 + <?php echo $slideshow_filmstrip_width; ?>)}, 500, 'linear');
1258
  }
1259
  }
1260
+ /* Disable left arrow.*/
1261
  window.setTimeout(function(){
1262
  if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left == 0) {
1263
  jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 0.3, filter: "Alpha(opacity=30)"});
1264
  }
1265
  }, 500);
1266
  });
1267
+ /* Set filmstrip initial position.*/
1268
  bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
1269
+ /* Play/pause.*/
1270
  jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").on(bwg_click, function () {
1271
  if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1272
  play_<?php echo $bwg; ?>();
1277
  }
1278
  }
1279
  else {
1280
+ /* Pause.*/
1281
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1282
  jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Play', 'bwg'); ?>");
1283
  jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("class", "bwg_ctrl_btn_<?php echo $bwg; ?> bwg_slideshow_play_pause_<?php echo $bwg; ?> fa fa-play");
1296
  }
1297
  });
1298
  function play_<?php echo $bwg; ?>() {
1299
+ /* Play.*/
1300
  bwg_playInterval_<?php echo $bwg; ?> = setInterval(function () {
1301
  var iterator = 1;
1302
  if (<?php echo $enable_slideshow_shuffle; ?>) {
1306
  }, '<?php echo $slideshow_interval * 1000; ?>');
1307
  }
1308
  jQuery(window).focus(function() {
1309
+ /* event_stack_<?php echo $bwg; ?> = [];*/
1310
  if (!jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
1311
  clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
1312
  play_<?php echo $bwg; ?>();
frontend/views/BWGViewThumbnails.php CHANGED
@@ -151,7 +151,7 @@ class BWGViewThumbnails {
151
  text-align: center;
152
  }
153
  <?php
154
- if ($params['image_title'] == 'show') { // Show image title at the bottom.
155
  ?>
156
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
157
  display: block;
@@ -163,7 +163,7 @@ class BWGViewThumbnails {
163
  }
164
  <?php
165
  }
166
- elseif ($params['image_title'] == 'hover') { // Show image title on hover.
167
  ?>
168
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
169
  display: table;
151
  text-align: center;
152
  }
153
  <?php
154
+ if ($params['image_title'] == 'show') { /* Show image title at the bottom.*/
155
  ?>
156
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
157
  display: block;
163
  }
164
  <?php
165
  }
166
+ elseif ($params['image_title'] == 'hover') { /* Show image title on hover.*/
167
  ?>
168
  #bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> .bwg_title_spun1_<?php echo $bwg; ?> {
169
  display: table;
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.1.5
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
@@ -2381,7 +2381,7 @@ function bwg_activate() {
2381
  ));
2382
  }
2383
  $version = str_replace('.', '', get_option("wd_bwg_version"));
2384
- $new_version = 115;
2385
  if ($version && $version < $new_version) {
2386
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2387
  for ($i = $version; $i < $new_version; $i++) {
@@ -2390,10 +2390,10 @@ function bwg_activate() {
2390
  $func_name();
2391
  }
2392
  }
2393
- update_option("wd_bwg_version", '1.1.5');
2394
  }
2395
  else {
2396
- add_option("wd_bwg_version", '1.1.5', '', 'no');
2397
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
2398
  }
2399
  }
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.1.6
8
  * Author: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
2381
  ));
2382
  }
2383
  $version = str_replace('.', '', get_option("wd_bwg_version"));
2384
+ $new_version = 116;
2385
  if ($version && $version < $new_version) {
2386
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2387
  for ($i = $version; $i < $new_version; $i++) {
2390
  $func_name();
2391
  }
2392
  }
2393
+ update_option("wd_bwg_version", '1.1.6');
2394
  }
2395
  else {
2396
+ add_option("wd_bwg_version", '1.1.6', '', 'no');
2397
  add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
2398
  }
2399
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
- Stable tag: 1.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -43,9 +43,7 @@ Photo Gallery product in addition to the main plugin includes 4 specific widgets
43
 
44
  * 100% Responsive
45
  * Multiple views to choose from: Thumbnails, Image Browser, Slideshow for galleries and Compact Album, Extended Album views for albums
46
- * Masonry and Blog Style View (commercial version)
47
  * Supports the following types of image files: JPG, JPEG, PNG and GIF
48
- * Editable themes (commercial version)
49
  * Unlimited quantity of photos
50
  * Possibility of adding unlimited quantity of galleries/albums
51
  * Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
@@ -58,13 +56,22 @@ Photo Gallery product in addition to the main plugin includes 4 specific widgets
58
  * Audio track playback possibility with the image slideshow
59
  * Possibility of adding Watermarks/Advertisements for each individual image
60
  * Direct Image download and original image display capabilities
61
- * Commenting possibility with Captcha protection possibility (commercial version)
62
- * Comment-managing possibility to avoid spamming (Unpublish/Delete) (commercial version)
63
- * Social sharing possibility (Facebook, Google+, Twitter) (commercial version)
64
- * Dynamic Photo Gallery Tag Cloud widget with image tag cloud and text tag cloud options(commercial version)
65
  * WordPress Tag cloud hosted widget
66
- * Photo Gallery Slideshow widget (15 effects with commercial version)
67
  * Photo Gallery Widget for displaying albums and galleries as widgets
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  ### Supported languages
69
 
70
  *If you need language of Photo Gallery which is not included in this list, please contact us and we will do the translation of Photo Gallery within 3 days. If you find some mistakes in the translation of Photo Gallery, please contact us and we will correct it within 3 days.*
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
43
 
44
  * 100% Responsive
45
  * Multiple views to choose from: Thumbnails, Image Browser, Slideshow for galleries and Compact Album, Extended Album views for albums
 
46
  * Supports the following types of image files: JPG, JPEG, PNG and GIF
 
47
  * Unlimited quantity of photos
48
  * Possibility of adding unlimited quantity of galleries/albums
49
  * Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
56
  * Audio track playback possibility with the image slideshow
57
  * Possibility of adding Watermarks/Advertisements for each individual image
58
  * Direct Image download and original image display capabilities
 
 
 
 
59
  * WordPress Tag cloud hosted widget
60
+ * Photo Gallery Slideshow widget
61
  * Photo Gallery Widget for displaying albums and galleries as widgets
62
+
63
+ Upgrade to [WordPress Photo Gallery Pro](http://web-dorado.com/products/wordpress-photo-gallery-plugin.html) to add features:
64
+
65
+ * Masonry View.
66
+ * Blog Style View.
67
+ * Slideshow/Lightbox 15 effects.
68
+ * Editable themes.
69
+ * Commenting possibility with Captcha protection possibility.
70
+ * Comment-managing possibility to avoid spamming (Unpublish/Delete).
71
+ * Social sharing possibility (Facebook, Google+, Twitter).
72
+ * Dynamic Photo Gallery Tag Cloud widget with image tag cloud and text tag cloud options.
73
+
74
+
75
  ### Supported languages
76
 
77
  *If you need language of Photo Gallery which is not included in this list, please contact us and we will do the translation of Photo Gallery within 3 days. If you find some mistakes in the translation of Photo Gallery, please contact us and we will correct it within 3 days.*